oziko-ui-kit 0.0.136 → 0.0.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -46,7 +46,7 @@ function(e,t){const n=ro(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
46
46
  * https://www.chartjs.org
47
47
  * (c) 2024 Chart.js Contributors
48
48
  * Released under the MIT License
49
- */class Vu{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){const o=t.listeners[r],i=t.duration;o.forEach((r=>r({chart:e,initial:t.initial,numSteps:i,currentStep:Math.min(n-t.start,i)})))}_refresh(){this._request||(this._running=!0,this._request=tc.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(e=Date.now()){let t=0;this._charts.forEach(((n,r)=>{if(!n.running||!n.items.length)return;const o=n.items;let i,a=o.length-1,s=!1;for(;a>=0;--a)i=o[a],i._active?(i._total>n.duration&&(n.duration=i._total),i.tick(e),s=!0):(o[a]=o[o.length-1],o.pop());s&&(r.draw(),this._notify(r,n,e,"progress")),o.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=o.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Yu=new Vu;const Xu="transparent",qu={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=hc(e||Xu),o=r.valid&&hc(t||Xu);return o&&o.valid?o.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class Uu{constructor(e,t,n,r){const o=t[n];r=Gc([e.to,r,o,e.from]);const i=Gc([e.from,o,r]);this._active=!0,this._fn=e.fn||qu[e.type||typeof i],this._easing=uc[e.easing]||uc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=i,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,i=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=Gc([e.to,t,r,e.from]),this._from=Gc([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,r=this._prop,o=this._from,i=this._loop,a=this._to;let s;if(this._active=o!==a&&(i||t<n),!this._active)return this._target[r]=a,void this._notify(!0);t<0?this._target[r]=o:(s=t/n%2,s=i&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(o,a,s))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let e=0;e<n.length;e++)n[e][t]()}}class Zu{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!il(e))return;const t=Object.keys(Cc.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach((r=>{const o=e[r];if(!il(o))return;const i={};for(const e of t)i[e]=o[e];(ol(o.properties)&&o.properties||[r]).forEach((e=>{e!==r&&n.has(e)||n.set(e,i)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const o=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let t=0;t<r.length;t++){const o=e[r[t]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}(e.options.$animations,n).then((()=>{e.options=n}),(()=>{})),o}_createAnimations(e,t){const n=this._properties,r=[],o=e.$animations||(e.$animations={}),i=Object.keys(t),a=Date.now();let s;for(s=i.length-1;s>=0;--s){const l=i[s];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let u=o[l];const d=n.get(l);if(u){if(d&&u.active()){u.update(d,c,a);continue}u.cancel()}d&&d.duration?(o[l]=u=new Uu(d,e,l,c),r.push(u)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(Yu.add(this._chart,n),!0):void 0}}function Gu(e,t){const n=e&&e.options||{},r=n.reverse,o=void 0===n.min?t:0,i=void 0===n.max?t:0;return{start:r?i:o,end:r?o:i}}function Ku(e,t){const n=[],r=e._getSortedDatasetMetas(t);let o,i;for(o=0,i=r.length;o<i;++o)n.push(r[o].index);return n}function Ju(e,t,n,r={}){const o=e.keys,i="single"===r.mode;let a,s,l,c;if(null===t)return;let u=!1;for(a=0,s=o.length;a<s;++a){if(l=+o[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],al(c)&&(i||0===t||Ll(t)===Ll(c))&&(t+=c)}return u||r.all?t:0}function Qu(e,t){const n=e&&e.options.stacked;return n||void 0===n&&void 0!==t.stack}function ed(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function td(e,t,n,r){for(const o of t.getMatchingVisibleMetas(r).reverse()){const t=e[o.index];if(n&&t>0||!n&&t<0)return o.index}return null}function nd(e,t){const{chart:n,_cachedMeta:r}=e,o=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:s}=r,l=i.axis,c=a.axis,u=function(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}(i,a,r),d=t.length;let h;for(let e=0;e<d;++e){const n=t[e],{[l]:i,[c]:d}=n;h=(n._stacks||(n._stacks={}))[c]=ed(o,u,i),h[s]=d,h._top=td(h,a,!0,r.type),h._bottom=td(h,a,!1,r.type);(h._visualValues||(h._visualValues={}))[s]=d}}function rd(e,t){const n=e.scales;return Object.keys(n).filter((e=>n[e].axis===t)).shift()}function od(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][n])return;delete t[r][n],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[n]&&delete t[r]._visualValues[n]}}}const id=e=>"reset"===e||"none"===e,ad=(e,t)=>t?e:Object.assign({},e);class sd{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Qu(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&od(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,o=t.xAxisID=ll(n.xAxisID,rd(e,"x")),i=t.yAxisID=ll(n.yAxisID,rd(e,"y")),a=t.rAxisID=ll(n.rAxisID,rd(e,"r")),s=t.indexAxis,l=t.iAxisID=r(s,o,i,a),c=t.vAxisID=r(s,i,o,a);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(i),t.rScale=this.getScaleForId(a),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ql(this._data,this),e._stacked&&od(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(il(t)){const e=this._cachedMeta;this._data=function(e,t){const{iScale:n,vScale:r}=t,o="x"===n.axis?"x":"y",i="x"===r.axis?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[o]:u,[i]:e[u]};return s}(t,e)}else if(n!==t){if(n){Ql(n,this);const e=this._cachedMeta;od(e),e._parsed=[]}t&&Object.isExtensible(t)&&function(e,t){e._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Jl.forEach((t=>{const n="_onData"+xl(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){const o=r.apply(this,t);return e._chartjs.listeners.forEach((e=>{"function"==typeof e[n]&&e[n](...t)})),o}})})))}(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const o=t._stacked;t._stacked=Qu(t.vScale,t),t.stack!==n.stack&&(r=!0,od(t),t.stack=n.stack),this._resyncElements(e),(r||o!==t._stacked)&&(nd(this,t._parsed),t._stacked=Qu(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:i}=n,a=o.axis;let s,l,c,u=0===e&&t===r.length||n._sorted,d=e>0&&n._parsed[e-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,c=r;else{c=ol(r[e])?this.parseArrayData(n,r,e,t):il(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);const o=()=>null===l[a]||d&&l[a]<d[a];for(s=0;s<t;++s)n._parsed[s+e]=l=c[s],u&&(o()&&(u=!1),d=l);n._sorted=u}i&&nd(this,c)}parsePrimitiveData(e,t,n,r){const{iScale:o,vScale:i}=e,a=o.axis,s=i.axis,l=o.getLabels(),c=o===i,u=new Array(r);let d,h,p;for(d=0,h=r;d<h;++d)p=d+n,u[d]={[a]:c||o.parse(l[p],p),[s]:i.parse(t[p],p)};return u}parseArrayData(e,t,n,r){const{xScale:o,yScale:i}=e,a=new Array(r);let s,l,c,u;for(s=0,l=r;s<l;++s)c=s+n,u=t[c],a[s]={x:o.parse(u[0],c),y:i.parse(u[1],c)};return a}parseObjectData(e,t,n,r){const{xScale:o,yScale:i}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l=new Array(r);let c,u,d,h;for(c=0,u=r;c<u;++c)d=c+n,h=t[d],l[c]={x:o.parse(_l(h,a),d),y:i.parse(_l(h,s),d)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){const r=this.chart,o=this._cachedMeta,i=t[e.axis];return Ju({keys:Ku(r,!0),values:t._stacks[e.axis]._visualValues},i,o.index,{mode:n})}updateRangeFromParsed(e,t,n,r){const o=n[t.axis];let i=null===o?NaN:o;const a=r&&n._stacks[t.axis];r&&a&&(r.values=a,i=Ju(r,o,this._cachedMeta.index)),e.min=Math.min(e.min,i),e.max=Math.max(e.max,i)}getMinMax(e,t){const n=this._cachedMeta,r=n._parsed,o=n._sorted&&e===n.iScale,i=r.length,a=this._getOtherScale(e),s=((e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Ku(n,!0),values:null})(t,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(e){const{min:t,max:n,minDefined:r,maxDefined:o}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}(a);let d,h;function p(){h=r[d];const t=h[a.axis];return!al(h[e.axis])||c>t||u<t}for(d=0;d<i&&(p()||(this.updateRangeFromParsed(l,e,h,s),!o));++d);if(o)for(d=i-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(l,e,h,s);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,o,i;for(r=0,o=t.length;r<o;++r)i=t[r][e.axis],al(i)&&n.push(i);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,n=t.iScale,r=t.vScale,o=this.getParsed(e);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=function(e){let t,n,r,o;return il(e)?(t=e.top,n=e.right,r=e.bottom,o=e.left):t=n=r=o=e,{top:t,right:n,bottom:r,left:o,disabled:!1===e}}(ll(this.options.clip,function(e,t,n){if(!1===n)return!1;const r=Gu(e,n),o=Gu(t,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],o=t.chartArea,i=[],a=this._drawStart||0,s=this._drawCount||r.length-a,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(e,o,a,s),c=a;c<a+s;++c){const t=r[c];t.hidden||(t.active&&l?i.push(t):t.draw(e,o))}for(c=0;c<i.length;++c)i[c].draw(e,o)}getStyle(e,t){const n=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){const r=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];o=t.$context||(t.$context=function(e,t,n){return Kc(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}(this.getContext(),e,t)),o.parsed=this.getParsed(e),o.raw=r.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=function(e,t){return Kc(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=n,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",n){const r="active"===t,o=this._cachedDataOpts,i=e+"-"+t,a=o[i],s=this.enableOptionSharing&&wl(n);if(a)return ad(a,s);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),u=r?[`${e}Hover`,"hover",e,""]:[e,""],d=l.getOptionScopes(this.getDataset(),c),h=Object.keys(Cc.elements[e]),p=l.resolveNamedOptions(d,h,(()=>this.getContext(n,r,t)),u);return p.$shared&&(p.$shared=s,o[i]=Object.freeze(ad(p,s))),p}_resolveAnimations(e,t,n){const r=this.chart,o=this._cachedDataOpts,i=`animation-${t}`,a=o[i];if(a)return a;let s;if(!1!==r.options.animation){const r=this.chart.config,o=r.datasetAnimationScopeKeys(this._type,t),i=r.getOptionScopes(this.getDataset(),o);s=r.createResolver(i,this.getContext(e,n,t))}const l=new Zu(r,s&&s.animations);return s&&s._cacheable&&(o[i]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||id(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,o=this.getSharedOptions(n),i=this.includeOptions(t,o)||o!==r;return this.updateSharedOptions(o,t,n),{sharedOptions:o,includeOptions:i}}updateElement(e,t,n,r){id(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!id(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const o=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];const r=n.length,o=t.length,i=Math.min(o,r);i&&this.parse(0,i),o>r?this._insertElements(r,o-r,e):o<r&&this._removeElements(o,r-o)}_insertElements(e,t,n=!0){const r=this._cachedMeta,o=r.data,i=e+t;let a;const s=e=>{for(e.length+=t,a=e.length-1;a>=i;a--)e[a]=e[a-t]};for(s(o),a=e;a<i;++a)o[a]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(e,t),n&&this.updateElements(o,e,t,"reset")}updateElements(e,t,n,r){}_removeElements(e,t){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(e,t);n._stacked&&od(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function ld(e){const t=e.iScale,n=function(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let t=0,o=n.length;t<o;t++)r=r.concat(n[t].controller.getAllParsedValues(e));e._cache.$bar=ec(r.sort(((e,t)=>e-t)))}return e._cache.$bar}(t,e.type);let r,o,i,a,s=t._length;const l=()=>{32767!==i&&-32768!==i&&(wl(a)&&(s=Math.min(s,Math.abs(i-a)||s)),a=i)};for(r=0,o=n.length;r<o;++r)i=t.getPixelForValue(n[r]),l();for(a=void 0,r=0,o=t.ticks.length;r<o;++r)i=t.getPixelForTick(r),l();return s}function cd(e,t,n,r){return ol(e)?function(e,t,n,r){const o=n.parse(e[0],r),i=n.parse(e[1],r),a=Math.min(o,i),s=Math.max(o,i);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:o,end:i,min:a,max:s}}(e,t,n,r):t[n.axis]=n.parse(e,r),t}function ud(e,t,n,r){const o=e.iScale,i=e.vScale,a=o.getLabels(),s=o===i,l=[];let c,u,d,h;for(c=n,u=n+r;c<u;++c)h=t[c],d={},d[o.axis]=s||o.parse(a[c],c),l.push(cd(h,d,i,c));return l}function dd(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function hd(e,t,n,r){let o=t.borderSkipped;const i={};if(!o)return void(e.borderSkipped=i);if(!0===o)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:s,reverse:l,top:c,bottom:u}=function(e){let t,n,r,o,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(o="end",i="start"):(o="start",i="end"),{start:n,end:r,reverse:t,top:o,bottom:i}}(e);"middle"===o&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?o=c:(n._bottom||0)===r?o=u:(i[pd(u,a,s,l)]=!0,o=c)),i[pd(o,a,s,l)]=!0,e.borderSkipped=i}function pd(e,t,n,r){var o,i,a;return r?(a=n,e=fd(e=(o=e)===(i=t)?a:o===a?i:o,n,t)):e=fd(e,t,n),e}function fd(e,t,n){return"start"===e?t:"end"===e?n:e}function md(e,{inflateAmount:t},n){e.inflateAmount="auto"===t?1===n?.33:0:t}class gd extends sd{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,n,r){return ud(e,t,n,r)}parseArrayData(e,t,n,r){return ud(e,t,n,r)}parseObjectData(e,t,n,r){const{iScale:o,vScale:i}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l="x"===o.axis?a:s,c="x"===i.axis?a:s,u=[];let d,h,p,f;for(d=n,h=n+r;d<h;++d)f=t[d],p={},p[o.axis]=o.parse(_l(f,l),d),u.push(cd(_l(f,c),p,i,d));return u}updateRangeFromParsed(e,t,n,r){super.updateRangeFromParsed(e,t,n,r);const o=n._custom;o&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:n,vScale:r}=t,o=this.getParsed(e),i=o._custom,a=dd(i)?"["+i.start+", "+i.end+"]":""+r.getLabelForValue(o[r.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,n,r){const o="reset"===r,{index:i,_cachedMeta:{vScale:a}}=this,s=a.getBasePixel(),l=a.isHorizontal(),c=this._getRuler(),{sharedOptions:u,includeOptions:d}=this._getSharedOptions(t,r);for(let h=t;h<t+n;h++){const t=this.getParsed(h),n=o||rl(t[a.axis])?{base:s,head:s}:this._calculateBarValuePixels(h),p=this._calculateBarIndexPixels(h,c),f=(t._stacks||{})[a.axis],m={horizontal:l,base:n.base,enableBorderRadius:!f||dd(t._custom)||i===f._top||i===f._bottom,x:l?n.head:p.center,y:l?p.center:n.head,height:l?p.size:Math.abs(n.size),width:l?Math.abs(n.size):p.size};d&&(m.options=u||this.resolveDataElementOptions(h,e[h].active?"active":r));const g=m.options||e[h].options;hd(m,g,f,i),md(m,g,c.ratio),this.updateElement(e[h],h,m,r)}}_getStacks(e,t){const{iScale:n}=this._cachedMeta,r=n.getMatchingVisibleMetas(this._type).filter((e=>e.controller.options.grouped)),o=n.options.stacked,i=[],a=this._cachedMeta.controller.getParsed(t),s=a&&a[n.axis],l=e=>{const t=e._parsed.find((e=>e[n.axis]===s)),r=t&&t[e.vScale.axis];if(rl(r)||isNaN(r))return!0};for(const n of r)if((void 0===t||!l(n))&&((!1===o||-1===i.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&i.push(n.stack),n.index===e))break;return i.length||i.push(void 0),i}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,n){const r=this._getStacks(e,n),o=void 0!==t?r.indexOf(t):-1;return-1===o?r.length-1:o}_getRuler(){const e=this.options,t=this._cachedMeta,n=t.iScale,r=[];let o,i;for(o=0,i=t.data.length;o<i;++o)r.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const a=e.barThickness;return{min:a||ld(t),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:n,index:r},options:{base:o,minBarLength:i}}=this,a=o||0,s=this.getParsed(e),l=s._custom,c=dd(l);let u,d,h=s[t.axis],p=0,f=n?this.applyStack(t,s,n):h;f!==h&&(p=f-h,f=h),c&&(h=l.barStart,f=l.barEnd-l.barStart,0!==h&&Ll(h)!==Ll(l.barEnd)&&(p=0),p+=h);const m=rl(o)||c?p:o;let g=t.getPixelForValue(m);if(u=this.chart.getDataVisibility(e)?t.getPixelForValue(p+f):g,d=u-g,Math.abs(d)<i){d=function(e,t,n){return 0!==e?Ll(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}(d,t,a)*i,h===a&&(g-=d/2);const e=t.getPixelForDecimal(0),o=t.getPixelForDecimal(1),l=Math.min(e,o),p=Math.max(e,o);g=Math.max(Math.min(g,p),l),u=g+d,n&&!c&&(s._stacks[t.axis]._visualValues[r]=t.getValueForPixel(u)-t.getValueForPixel(g))}if(g===t.getPixelForValue(a)){const e=Ll(d)*t.getLineWidthForValue(a)/2;g+=e,d-=e}return{size:d,base:g,head:u,center:u+d/2}}_calculateBarIndexPixels(e,t){const n=t.scale,r=this.options,o=r.skipNull,i=ll(r.maxBarThickness,1/0);let a,s;if(t.grouped){const n=o?this._getStackCount(e):t.stackCount,l="flex"===r.barThickness?function(e,t,n,r){const o=t.pixels,i=o[e];let a=e>0?o[e-1]:null,s=e<o.length-1?o[e+1]:null;const l=n.categoryPercentage;null===a&&(a=i-(null===s?t.end-t.start:s-i)),null===s&&(s=i+i-a);const c=i-(i-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}(e,t,r,n):function(e,t,n,r){const o=n.barThickness;let i,a;return rl(o)?(i=t.min*n.categoryPercentage,a=n.barPercentage):(i=o*r,a=1),{chunk:i/r,ratio:a,start:t.pixels[e]-i/2}}(e,t,r,n),c=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);a=l.start+l.chunk*c+l.chunk/2,s=Math.min(i,l.chunk*l.ratio)}else a=n.getPixelForValue(this.getParsed(e)[n.axis],e),s=Math.min(i,t.min*t.ratio);return{base:a-s/2,head:a+s/2,center:a,size:s}}draw(){const e=this._cachedMeta,t=e.vScale,n=e.data,r=n.length;let o=0;for(;o<r;++o)null===this.getParsed(o)[t.axis]||n[o].hidden||n[o].draw(this._ctx)}}class vd extends sd{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let o,i,a=e=>+n[e];if(il(n[e])){const{key:e="value"}=this._parsing;a=t=>+_l(n[t],e)}for(o=e,i=e+t;o<i;++o)r._parsed[o]=a(o)}}_getRotation(){return Fl(this.options.rotation-90)}_getCircumference(){return Fl(this.options.circumference)}_getRotationExtents(){let e=El,t=-El;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const r=this.chart.getDatasetMeta(n).controller,o=r._getRotation(),i=r._getCircumference();e=Math.min(e,o),t=Math.max(t,o+i)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:n}=t,r=this._cachedMeta,o=r.data,i=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-i)/2,0),s=Math.min((l=this.options.cutout,c=a,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const u=this._getRingWeight(this.index),{circumference:d,rotation:h}=this._getRotationExtents(),{ratioX:p,ratioY:f,offsetX:m,offsetY:g}=function(e,t,n){let r=1,o=1,i=0,a=0;if(t<El){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),h=Math.sin(l),p=(e,t,r)=>Xl(e,s,l,!0)?1:Math.max(t,t*n,r,r*n),f=(e,t,r)=>Xl(e,s,l,!0)?-1:Math.min(t,t*n,r,r*n),m=p(0,c,d),g=p(Tl,u,h),v=f(Cl,c,d),y=f(Cl+Tl,u,h);r=(m-v)/2,o=(g-y)/2,i=-(m+v)/2,a=-(g+y)/2}return{ratioX:r,ratioY:o,offsetX:i,offsetY:a}}(h,d,s),v=(n.width-i)/p,y=(n.height-i)/f,b=Math.max(Math.min(v,y)/2,0),_=cl(this.options.radius,b),x=(_-Math.max(_*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*_,this.offsetY=g*_,r.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*u,0),this.updateElements(o,0,o.length,e)}_circumference(e,t){const n=this.options,r=this._cachedMeta,o=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*o/El)}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.chartArea,s=i.options.animation,l=(a.left+a.right)/2,c=(a.top+a.bottom)/2,u=o&&s.animateScale,d=u?0:this.innerRadius,h=u?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m<t;++m)g+=this._circumference(m,o);for(m=t;m<t+n;++m){const t=this._circumference(m,o),n=e[m],i={x:l+this.offsetX,y:c+this.offsetY,startAngle:g,endAngle:g+t,circumference:t,outerRadius:h,innerRadius:d};f&&(i.options=p||this.resolveDataElementOptions(m,n.active?"active":r)),g+=t,this.updateElement(n,m,i,r)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let n,r=0;for(n=0;n<t.length;n++){const o=e._parsed[n];null===o||isNaN(o)||!this.chart.getDataVisibility(n)||t[n].hidden||(r+=Math.abs(o))}return r}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?El*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=vc(t._parsed[e],n.options.locale);return{label:r[e]||"",value:o}}getMaxBorderWidth(e){let t=0;const n=this.chart;let r,o,i,a,s;if(!e)for(r=0,o=n.data.datasets.length;r<o;++r)if(n.isDatasetVisible(r)){i=n.getDatasetMeta(r),e=i.data,a=i.controller;break}if(!e)return 0;for(r=0,o=e.length;r<o;++r)s=a.resolveDataElementOptions(r),"inner"!==s.borderAlign&&(t=Math.max(t,s.borderWidth||0,s.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let n=0,r=e.length;n<r;++n){const e=this.resolveDataElementOptions(n);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(ll(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class yd extends sd{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=vc(t._parsed[e].r,n.options.locale);return{label:r[e]||"",value:o}}parseObjectData(e,t,n,r){return du.bind(this)(e,t,n,r)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach(((e,n)=>{const r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(r<t.min&&(t.min=r),r>t.max&&(t.max=r))})),t}_updateRadius(){const e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(r/2,0),i=(o-Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=o-i*this.index,this.innerRadius=this.outerRadius-i}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.options.animation,s=this._cachedMeta.rScale,l=s.xCenter,c=s.yCenter,u=s.getIndexAngle(0)-.5*Cl;let d,h=u;const p=360/this.countVisibleElements();for(d=0;d<t;++d)h+=this._computeAngle(d,r,p);for(d=t;d<t+n;d++){const t=e[d];let n=h,f=h+this._computeAngle(d,r,p),m=i.getDataVisibility(d)?s.getDistanceFromCenterForValue(this.getParsed(d).r):0;h=f,o&&(a.animateScale&&(m=0),a.animateRotate&&(n=f=u));const g={x:l,y:c,innerRadius:0,outerRadius:m,startAngle:n,endAngle:f,options:this.resolveDataElementOptions(d,t.active?"active":r)};this.updateElement(t,d,g,r)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach(((e,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++})),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?Fl(this.resolveDataElementOptions(e,t).angle||n):0}}var bd=Object.freeze({__proto__:null,BarController:gd,BubbleController:class extends sd{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,n,r){const o=super.parsePrimitiveData(e,t,n,r);for(let e=0;e<o.length;e++)o[e]._custom=this.resolveDataElementOptions(e+n).radius;return o}parseArrayData(e,t,n,r){const o=super.parseArrayData(e,t,n,r);for(let e=0;e<o.length;e++){const r=t[n+e];o[e]._custom=ll(r[2],this.resolveDataElementOptions(e+n).radius)}return o}parseObjectData(e,t,n,r){const o=super.parseObjectData(e,t,n,r);for(let e=0;e<o.length;e++){const r=t[n+e];o[e]._custom=ll(r&&r.r&&+r.r,this.resolveDataElementOptions(e+n).radius)}return o}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:o}=t,i=this.getParsed(e),a=r.getLabelForValue(i.x),s=o.getLabelForValue(i.y),l=i._custom;return{label:n[e]||"",value:"("+a+", "+s+(l?", "+l:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a}=this._cachedMeta,{sharedOptions:s,includeOptions:l}=this._getSharedOptions(t,r),c=i.axis,u=a.axis;for(let d=t;d<t+n;d++){const t=e[d],n=!o&&this.getParsed(d),h={},p=h[c]=o?i.getPixelForDecimal(.5):i.getPixelForValue(n[c]),f=h[u]=o?a.getBasePixel():a.getPixelForValue(n[u]);h.skip=isNaN(p)||isNaN(f),l&&(h.options=s||this.resolveDataElementOptions(d,t.active?"active":r),o&&(h.options.radius=0)),this.updateElement(t,d,h,r)}}resolveDataElementOptions(e,t){const n=this.getParsed(e);let r=super.resolveDataElementOptions(e,t);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return"active"!==t&&(r.radius=0),r.radius+=ll(n&&n._custom,o),r}},DoughnutController:vd,LineController:class extends sd{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:n,data:r=[],_dataset:o}=t,i=this.chart._animationsDisabled;let{start:a,count:s}=ic(t,r,i);this._drawStart=a,this._drawCount=s,ac(t)&&(a=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=r;const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!i,options:l},e),this.updateElements(r,a,s,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(t,r),d=i.axis,h=a.axis,{spanGaps:p,segment:f}=this.options,m=Rl(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||o||"none"===r,v=t+n,y=e.length;let b=t>0&&this.getParsed(t-1);for(let n=0;n<y;++n){const p=e[n],y=g?p:{};if(n<t||n>=v){y.skip=!0;continue}const _=this.getParsed(n),x=rl(_[h]),w=y[d]=i.getPixelForValue(_[d],n),S=y[h]=o||x?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,_,s):_[h],n);y.skip=isNaN(w)||isNaN(S)||x,y.stop=n>0&&Math.abs(_[d]-b[d])>m,f&&(y.parsed=_,y.raw=l.data[n]),u&&(y.options=c||this.resolveDataElementOptions(n,p.active?"active":r)),g||this.updateElement(p,n,y,r),b=_}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const o=r[0].size(this.resolveDataElementOptions(0)),i=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,o,i)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},PieController:class extends vd{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:yd,RadarController:class extends sd{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){const t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(n[t.axis])}}parseObjectData(e,t,n,r){return du.bind(this)(e,t,n,r)}update(e){const t=this._cachedMeta,n=t.dataset,r=t.data||[],o=t.iScale.getLabels();if(n.points=r,"resize"!==e){const t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);const i={_loop:!0,_fullLoop:o.length===r.length,options:t};this.updateElement(n,void 0,i,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){const o=this._cachedMeta.rScale,i="reset"===r;for(let a=t;a<t+n;a++){const t=e[a],n=this.resolveDataElementOptions(a,t.active?"active":r),s=o.getPointPositionForValue(a,this.getParsed(a).r),l=i?o.xCenter:s.x,c=i?o.yCenter:s.y,u={x:l,y:c,angle:s.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(t,a,u,r)}}},ScatterController:class extends sd{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){const t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:o}=t,i=this.getParsed(e),a=r.getLabelForValue(i.x),s=o.getLabelForValue(i.y);return{label:n[e]||"",value:"("+a+", "+s+")"}}update(e){const t=this._cachedMeta,{data:n=[]}=t,r=this.chart._animationsDisabled;let{start:o,count:i}=ic(t,n,r);if(this._drawStart=o,this._drawCount=i,ac(t)&&(o=0,i=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:i}=t;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=n;const a=this.resolveDatasetElementOptions(e);a.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:a},e)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(n,o,i,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(t,r),u=this.getSharedOptions(c),d=this.includeOptions(r,u),h=i.axis,p=a.axis,{spanGaps:f,segment:m}=this.options,g=Rl(f)?f:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||"none"===r;let y=t>0&&this.getParsed(t-1);for(let c=t;c<t+n;++c){const t=e[c],n=this.getParsed(c),f=v?t:{},b=rl(n[p]),_=f[h]=i.getPixelForValue(n[h],c),x=f[p]=o||b?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,n,s):n[p],c);f.skip=isNaN(_)||isNaN(x)||b,f.stop=c>0&&Math.abs(n[h]-y[h])>g,m&&(f.parsed=n,f.raw=l.data[c]),d&&(f.options=u||this.resolveDataElementOptions(c,t.active?"active":r)),v||this.updateElement(t,c,f,r),y=n}this.updateSharedOptions(u,r,c)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}const n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;const o=t[0].size(this.resolveDataElementOptions(0)),i=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,o,i)/2}}});function _d(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xd{static override(e){Object.assign(xd.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return _d()}parse(){return _d()}format(){return _d()}add(){return _d()}diff(){return _d()}startOf(){return _d()}endOf(){return _d()}}var wd={_date:xd};function Sd(e,t,n,r){const{controller:o,data:i,_sorted:a}=e,s=o._cachedMeta.iScale;if(s&&t===s.axis&&"r"!==t&&a&&i.length){const e=s._reversePixels?Kl:Gl;if(!r)return e(i,t,n);if(o._sharedOptions){const r=i[0],o="function"==typeof r.getRange&&r.getRange(t);if(o){const r=e(i,t,n-o),a=e(i,t,n+o);return{lo:r.lo,hi:a.hi}}}}return{lo:0,hi:i.length-1}}function kd(e,t,n,r,o){const i=e.getSortedVisibleDatasetMetas(),a=n[t];for(let e=0,n=i.length;e<n;++e){const{index:n,data:s}=i[e],{lo:l,hi:c}=Sd(i[e],t,a,o);for(let e=l;e<=c;++e){const t=s[e];t.skip||r(t,n,e)}}}function Cd(e,t,n,r,o){const i=[];if(!o&&!e.isPointInArea(t))return i;return kd(e,n,t,(function(n,a,s){(o||Dc(n,e.chartArea,0))&&n.inRange(t.x,t.y,r)&&i.push({element:n,datasetIndex:a,index:s})}),!0),i}function Ed(e,t,n,r,o,i){let a=[];const s=function(e){const t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){const o=t?Math.abs(e.x-r.x):0,i=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(i,2))}}(n);let l=Number.POSITIVE_INFINITY;return kd(e,n,t,(function(n,c,u){const d=n.inRange(t.x,t.y,o);if(r&&!d)return;const h=n.getCenterPoint(o);if(!(!!i||e.isPointInArea(h))&&!d)return;const p=s(t,h);p<l?(a=[{element:n,datasetIndex:c,index:u}],l=p):p===l&&a.push({element:n,datasetIndex:c,index:u})})),a}function Md(e,t,n,r,o,i){return i||e.isPointInArea(t)?"r"!==n||r?Ed(e,t,n,r,o,i):function(e,t,n,r){let o=[];return kd(e,n,t,(function(e,n,i){const{startAngle:a,endAngle:s}=e.getProps(["startAngle","endAngle"],r),{angle:l}=Hl(e,{x:t.x,y:t.y});Xl(l,a,s)&&o.push({element:e,datasetIndex:n,index:i})})),o}(e,t,n,o):[]}function Pd(e,t,n,r,o){const i=[],a="x"===n?"inXRange":"inYRange";let s=!1;return kd(e,n,t,((e,r,l)=>{e[a]&&e[a](t[n],o)&&(i.push({element:e,datasetIndex:r,index:l}),s=s||e.inRange(t.x,t.y,o))})),r&&!s?[]:i}var Od={evaluateInteractionItems:kd,modes:{index(e,t,n,r){const o=Cu(t,e),i=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?Cd(e,o,i,r,a):Md(e,o,i,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=s[0].index,n=e.data[t];n&&!n.skip&&l.push({element:n,datasetIndex:e.index,index:t})})),l):[]},dataset(e,t,n,r){const o=Cu(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?Cd(e,o,i,r,a):Md(e,o,i,!1,r,a);if(s.length>0){const t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;e<n.length;++e)s.push({element:n[e],datasetIndex:t,index:e})}return s},point:(e,t,n,r)=>Cd(e,Cu(t,e),n.axis||"xy",r,n.includeInvisible||!1),nearest(e,t,n,r){const o=Cu(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;return Md(e,o,i,n.intersect,r,a)},x:(e,t,n,r)=>Pd(e,Cu(t,e),"x",n.intersect,r),y:(e,t,n,r)=>Pd(e,Cu(t,e),"y",n.intersect,r)}};const Td=["left","top","right","bottom"];function Nd(e,t){return e.filter((e=>e.pos===t))}function Dd(e,t){return e.filter((e=>-1===Td.indexOf(e.pos)&&e.box.axis===t))}function Ad(e,t){return e.sort(((e,n)=>{const r=t?n:e,o=t?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight}))}function Ld(e,t){const n=function(e){const t={};for(const n of e){const{stack:e,pos:r,stackWeight:o}=n;if(!e||!Td.includes(r))continue;const i=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=o}return t}(e),{vBoxMaxWidth:r,hBoxMaxHeight:o}=t;let i,a,s;for(i=0,a=e.length;i<a;++i){s=e[i];const{fullSize:a}=s.box,l=n[s.stack],c=l&&s.stackWeight/l.weight;s.horizontal?(s.width=c?c*r:a&&t.availableWidth,s.height=o):(s.width=r,s.height=c?c*o:a&&t.availableHeight)}return n}function Id(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function zd(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Rd(e,t,n,r){const{pos:o,box:i}=n,a=e.maxPadding;if(!il(o)){n.size&&(e[o]-=n.size);const t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?i.height:i.width),n.size=t.size/t.count,e[o]+=n.size}i.getPadding&&zd(a,i.getPadding());const s=Math.max(0,t.outerWidth-Id(a,e,"left","right")),l=Math.max(0,t.outerHeight-Id(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function $d(e,t){const n=t.maxPadding;function r(e){const r={left:0,top:0,right:0,bottom:0};return e.forEach((e=>{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function Fd(e,t,n,r){const o=[];let i,a,s,l,c,u;for(i=0,a=e.length,c=0;i<a;++i){s=e[i],l=s.box,l.update(s.width||t.w,s.height||t.h,$d(s.horizontal,t));const{same:a,other:d}=Rd(t,n,s,r);c|=a&&o.length,u=u||d,l.fullSize||o.push(s)}return c&&Fd(o,t,n,r)||u}function jd(e,t,n,r,o){e.top=n,e.left=t,e.right=t+r,e.bottom=n+o,e.width=r,e.height=o}function Bd(e,t,n,r){const o=n.padding;let{x:i,y:a}=t;for(const s of e){const e=s.box,l=r[s.stack]||{count:1,placed:0,weight:1},c=s.stackWeight/l.weight||1;if(s.horizontal){const r=t.w*c,i=l.size||e.height;wl(l.start)&&(a=l.start),e.fullSize?jd(e,o.left,a,n.outerWidth-o.right-o.left,i):jd(e,t.left+l.placed,a,r,i),l.start=a,l.placed+=r,a=e.bottom}else{const r=t.h*c,a=l.size||e.width;wl(l.start)&&(i=l.start),e.fullSize?jd(e,i,o.top,a,n.outerHeight-o.bottom-o.top):jd(e,i,t.top+l.placed,a,r),l.start=i,l.placed+=r,i=e.right}}t.x=i,t.y=a}var Hd={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const o=Uc(e.options.layout.padding),i=Math.max(t-o.width,0),a=Math.max(n-o.height,0),s=function(e){const t=function(e){const t=[];let n,r,o,i,a,s;for(n=0,r=(e||[]).length;n<r;++n)o=e[n],({position:i,options:{stack:a,stackWeight:s=1}}=o),t.push({index:n,box:o,pos:i,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&i+a,stackWeight:s});return t}(e),n=Ad(t.filter((e=>e.box.fullSize)),!0),r=Ad(Nd(t,"left"),!0),o=Ad(Nd(t,"right")),i=Ad(Nd(t,"top"),!0),a=Ad(Nd(t,"bottom")),s=Dd(t,"x"),l=Dd(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:o.concat(l).concat(a).concat(s),chartArea:Nd(t,"chartArea"),vertical:r.concat(o).concat(l),horizontal:i.concat(a).concat(s)}}(e.boxes),l=s.vertical,c=s.horizontal;dl(e.boxes,(e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()}));const u=l.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/u,hBoxMaxHeight:a/2}),h=Object.assign({},o);zd(h,Uc(r));const p=Object.assign({maxPadding:h,w:i,h:a,x:o.left,y:o.top},o),f=Ld(l.concat(c),d);Fd(s.fullSize,p,d,f),Fd(l,p,d,f),Fd(c,p,d,f)&&Fd(l,p,d,f),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(p),Bd(s.leftAndTop,p,d,f),p.x+=p.w,p.y+=p.h,Bd(s.rightAndBottom,p,d,f),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},dl(s.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class Wd{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}}class Vd extends Wd{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Yd="$chartjs",Xd={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},qd=e=>null===e||""===e;const Ud=!!Ou&&{passive:!0};function Zd(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Ud)}function Gd(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Kd(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||Gd(n.addedNodes,r),t=t&&!Gd(n.removedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}function Jd(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||Gd(n.removedNodes,r),t=t&&!Gd(n.addedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}const Qd=new Map;let eh=0;function th(){const e=window.devicePixelRatio;e!==eh&&(eh=e,Qd.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function nh(e,t,n){const r=e.canvas,o=r&&_u(r);if(!o)return;const i=nc(((e,t)=>{const r=o.clientWidth;n(e,t),r<o.clientWidth&&n()}),window),a=new ResizeObserver((e=>{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||i(n,r)}));return a.observe(o),function(e,t){Qd.size||window.addEventListener("resize",th),Qd.set(e,t)}(e,i),a}function rh(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){Qd.delete(e),Qd.size||window.removeEventListener("resize",th)}(e)}function oh(e,t,n){const r=e.canvas,o=nc((t=>{null!==e.ctx&&n(function(e,t){const n=Xd[e.type]||e.type,{x:r,y:o}=Cu(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==o?o:null}}(t,e))}),e);return function(e,t,n){e&&e.addEventListener(t,n,Ud)}(r,t,o),o}class ih extends Wd{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),o=e.getAttribute("width");if(e[Yd]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",qd(o)){const t=Tu(e,"width");void 0!==t&&(e.width=t)}if(qd(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=Tu(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[Yd])return!1;const n=t[Yd].initial;["height","width"].forEach((e=>{const r=n[e];rl(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t[Yd],!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),o={attach:Kd,detach:Jd,resize:nh}[t]||oh;r[t]=o(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:rh,detach:rh,resize:rh}[t]||Zd)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return Mu(e,t,n,r)}isAttached(e){const t=e&&_u(e);return!(!t||!t.isConnected)}}class ah{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return Rl(this.x)&&Rl(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach((e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function sh(e,t){const n=e.options.ticks,r=function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),o=e._maxLength/n;return Math.floor(Math.min(r,o))}(e),o=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}(t):[],a=i.length,s=i[0],l=i[a-1],c=[];if(a>o)return function(e,t,n,r){let o,i=0,a=n[0];for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}(t,c,i,a/o),c;const u=function(e,t,n){const r=function(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}(e),o=t.length/n;if(!r)return Math.max(o,1);const i=function(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r==0&&(t.push(r),t.push(e/r));return n===(0|n)&&t.push(n),t.sort(((e,t)=>e-t)).pop(),t}(r);for(let e=0,t=i.length-1;e<t;e++){const t=i[e];if(t>o)return t}return Math.max(o,1)}(i,t,o);if(a>0){let e,n;const r=a>1?Math.round((l-s)/(a-1)):null;for(lh(t,c,u,rl(r)?0:s-r,s),e=0,n=a-1;e<n;e++)lh(t,c,u,i[e],i[e+1]);return lh(t,c,u,l,rl(r)?t.length:l+r),c}return lh(t,c,u),c}function lh(e,t,n,r,o){const i=ll(r,0),a=Math.min(ll(o,e.length),e.length);let s,l,c,u=0;for(n=Math.ceil(n),o&&(s=o-r,n=s/Math.floor(s/n)),c=i;c<0;)u++,c=Math.round(i+u*n);for(l=Math.max(i,0);l<a;l++)l===c&&(t.push(e[l]),u++,c=Math.round(i+u*n))}const ch=(e,t,n)=>"top"===t||"left"===t?e[t]+n:e[t]-n,uh=(e,t)=>Math.min(t||e,e);function dh(e,t){const n=[],r=e.length/t,o=e.length;let i=0;for(;i<o;i+=r)n.push(e[Math.floor(i)]);return n}function hh(e,t,n){const r=e.ticks.length,o=Math.min(t,r-1),i=e._startPixel,a=e._endPixel,s=1e-6;let l,c=e.getPixelForTick(o);if(!(n&&(l=1===r?Math.max(c-i,a-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(o-1))/2,c+=o<t?l:-l,c<i-s||c>a+s)))return c}function ph(e){return e.drawTicks?e.tickLength:0}function fh(e,t){if(!e.display)return 0;const n=Zc(e.font,t),r=Uc(e.padding);return(ol(e.text)?e.text.length:1)*n.lineHeight+r.height}function mh(e,t,n){let r=rc(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class gh extends ah{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=sl(e,Number.POSITIVE_INFINITY),t=sl(t,Number.NEGATIVE_INFINITY),n=sl(n,Number.POSITIVE_INFINITY),r=sl(r,Number.NEGATIVE_INFINITY),{min:sl(e,n),max:sl(t,r),minDefined:al(e),maxDefined:al(t)}}getMinMax(e){let t,{min:n,max:r,minDefined:o,maxDefined:i}=this.getUserBounds();if(o&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let s=0,l=a.length;s<l;++s)t=a[s].controller.getMinMax(this,e),o||(n=Math.min(n,t.min)),i||(r=Math.max(r,t.max));return n=i&&n>r?r:n,r=o&&n>r?n:r,{min:sl(n,sl(r,n)),max:sl(r,sl(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ul(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:r,grace:o,ticks:i}=this.options,a=i.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){const{min:r,max:o}=e,i=cl(t,(o-r)/2),a=(e,t)=>n&&0===e?0:e+t;return{min:a(r,-Math.abs(i)),max:a(o,i)}}(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=a<this.ticks.length;this._convertTicksToLabels(s?dh(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||"auto"===i.source)&&(this.ticks=sh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,n=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,n=!n),this._startPixel=e,this._endPixel=t,this._reversePixels=n,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ul(this.options.afterUpdate,[this])}beforeSetDimensions(){ul(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ul(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ul(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ul(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let n,r,o;for(n=0,r=e.length;n<r;n++)o=e[n],o.label=ul(t.callback,[o.value,n,e],this)}afterTickToLabelConversion(){ul(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ul(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,n=uh(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,o=t.maxRotation;let i,a,s,l=r;if(!this._isVisible()||!t.display||r>=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),u=c.widest.width,d=c.highest.height,h=ql(this.chart.width-u,0,this.maxWidth);i=e.offset?this.maxWidth/n:h/(n-1),u+6>i&&(i=h/(n-(e.offset?.5:1)),a=this.maxHeight-ph(e.grid)-t.padding-fh(e.title,this.chart.options.font),s=Math.sqrt(u*u+d*d),l=jl(Math.min(Math.asin(ql((c.highest.height+6)/i,-1,1)),Math.asin(ql(a/s,-1,1))-Math.asin(ql(d/s,-1,1)))),l=Math.max(r,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){ul(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ul(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:o}}=this,i=this._isVisible(),a=this.isHorizontal();if(i){const i=fh(r,t.options.font);if(a?(e.width=this.maxWidth,e.height=ph(o)+i):(e.height=this.maxHeight,e.width=ph(o)+i),n.display&&this.ticks.length){const{first:t,last:r,widest:o,highest:i}=this._getLabelSizes(),s=2*n.padding,l=Fl(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(a){const t=n.mirror?0:u*o.width+c*i.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{const t=n.mirror?0:c*o.width+u*i.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,c)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){const{ticks:{align:o,padding:i},position:a}=this.options,s=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,d=0;s?l?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):"start"===o?d=t.width:"end"===o?u=e.width:"inner"!==o&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-a+i)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-c+i)*this.width/(this.width-c),0)}else{let n=t.height/2,r=e.height/2;"start"===o?(n=0,r=e.height):"end"===o&&(n=t.height,r=0),this.paddingTop=n+i,this.paddingBottom=r+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ul(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t<n;t++)rl(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let n=this.ticks;t<n.length&&(n=dh(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){const{ctx:r,_longestTextCache:o}=this,i=[],a=[],s=Math.floor(t/uh(t,n));let l,c,u,d,h,p,f,m,g,v,y,b=0,_=0;for(l=0;l<t;l+=s){if(d=e[l].label,h=this._resolveTickFontOptions(l),r.font=p=h.string,f=o[p]=o[p]||{data:{},gc:[]},m=h.lineHeight,g=v=0,rl(d)||ol(d)){if(ol(d))for(c=0,u=d.length;c<u;++c)y=d[c],rl(y)||ol(y)||(g=Ec(r,f.data,f.gc,g,y),v+=m)}else g=Ec(r,f.data,f.gc,g,d),v=m;i.push(g),a.push(v),b=Math.max(g,b),_=Math.max(v,_)}!function(e,t){dl(e,(e=>{const n=e.gc,r=n.length/2;let o;if(r>t){for(o=0;o<r;++o)delete e.data[n[o]];n.splice(0,r)}}))}(o,t);const x=i.indexOf(b),w=a.indexOf(_),S=e=>({width:i[e]||0,height:a[e]||0});return{first:S(0),last:S(t-1),widest:S(x),highest:S(w),widths:i,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return ql(this._alignToPixels?Pc(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const n=t[e];return n.$context||(n.$context=function(e,t,n){return Kc(e,{tick:n,index:t,type:"tick"})}(this.getContext(),e,n))}return this.$context||(this.$context=Kc(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const e=this.options.ticks,t=Fl(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),i=e.autoSkipPadding||0,a=o?o.widest.width+i:0,s=o?o.highest.height+i:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r<a*n?s/n:a/r}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,n=this.chart,r=this.options,{grid:o,position:i,border:a}=r,s=o.offset,l=this.isHorizontal(),c=this.ticks.length+(s?1:0),u=ph(o),d=[],h=a.setContext(this.getContext()),p=h.display?h.width:0,f=p/2,m=function(e){return Pc(n,e,p)};let g,v,y,b,_,x,w,S,k,C,E,M;if("top"===i)g=m(this.bottom),x=this.bottom-u,S=g-f,C=m(e.top)+f,M=e.bottom;else if("bottom"===i)g=m(this.top),C=e.top,M=m(e.bottom)-f,x=g+f,S=this.top+u;else if("left"===i)g=m(this.right),_=this.right-u,w=g-f,k=m(e.left)+f,E=e.right;else if("right"===i)g=m(this.left),k=e.left,E=m(e.right)-f,_=g+f,w=this.left+u;else if("x"===t){if("center"===i)g=m((e.top+e.bottom)/2+.5);else if(il(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}C=e.top,M=e.bottom,x=g+f,S=x+u}else if("y"===t){if("center"===i)g=m((e.left+e.right)/2);else if(il(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}_=g-f,w=_-u,k=e.left,E=e.right}const P=ll(r.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/P));for(v=0;v<c;v+=O){const e=this.getContext(v),t=o.setContext(e),r=a.setContext(e),i=t.lineWidth,c=t.color,u=r.dash||[],h=r.dashOffset,p=t.tickWidth,f=t.tickColor,m=t.tickBorderDash||[],g=t.tickBorderDashOffset;y=hh(this,v,s),void 0!==y&&(b=Pc(n,y,i),l?_=w=k=E=b:x=S=C=M=b,d.push({tx1:_,ty1:x,tx2:w,ty2:S,x1:k,y1:C,x2:E,y2:M,width:i,color:c,borderDash:u,borderDashOffset:h,tickWidth:p,tickColor:f,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,d}_computeLabelItems(e){const t=this.axis,n=this.options,{position:r,ticks:o}=n,i=this.isHorizontal(),a=this.ticks,{align:s,crossAlign:l,padding:c,mirror:u}=o,d=ph(n.grid),h=d+c,p=u?-c:h,f=-Fl(this.labelRotation),m=[];let g,v,y,b,_,x,w,S,k,C,E,M,P="middle";if("top"===r)x=this.bottom-p,w=this._getXAxisLabelAlignment();else if("bottom"===r)x=this.top+p,w=this._getXAxisLabelAlignment();else if("left"===r){const e=this._getYAxisLabelAlignment(d);w=e.textAlign,_=e.x}else if("right"===r){const e=this._getYAxisLabelAlignment(d);w=e.textAlign,_=e.x}else if("x"===t){if("center"===r)x=(e.top+e.bottom)/2+h;else if(il(r)){const e=Object.keys(r)[0],t=r[e];x=this.chart.scales[e].getPixelForValue(t)+h}w=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===r)_=(e.left+e.right)/2-h;else if(il(r)){const e=Object.keys(r)[0],t=r[e];_=this.chart.scales[e].getPixelForValue(t)}w=this._getYAxisLabelAlignment(d).textAlign}"y"===t&&("start"===s?P="top":"end"===s&&(P="bottom"));const O=this._getLabelSizes();for(g=0,v=a.length;g<v;++g){y=a[g],b=y.label;const e=o.setContext(this.getContext(g));S=this.getPixelForTick(g)+o.labelOffset,k=this._resolveTickFontOptions(g),C=k.lineHeight,E=ol(b)?b.length:1;const t=E/2,n=e.color,s=e.textStrokeColor,c=e.textStrokeWidth;let d,h=w;if(i?(_=S,"inner"===w&&(h=g===v-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),M="top"===r?"near"===l||0!==f?-E*C+C/2:"center"===l?-O.highest.height/2-t*C+C:-O.highest.height+C/2:"near"===l||0!==f?C/2:"center"===l?O.highest.height/2-t*C:O.highest.height-E*C,u&&(M*=-1),0===f||e.showLabelBackdrop||(_+=C/2*Math.sin(f))):(x=S,M=(1-E)*C/2),e.showLabelBackdrop){const t=Uc(e.backdropPadding),n=O.heights[g],r=O.widths[g];let o=M-t.top,i=0-t.left;switch(P){case"middle":o-=n/2;break;case"bottom":o-=n}switch(w){case"center":i-=r/2;break;case"right":i-=r;break;case"inner":g===v-1?i-=r:g>0&&(i-=r/2)}d={left:i,top:o,width:r+t.width,height:n+t.height,color:e.backdropColor}}m.push({label:b,font:k,textOffset:M,options:{rotation:f,color:n,strokeColor:s,strokeWidth:c,textAlign:h,textBaseline:P,translation:[_,x],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Fl(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,i=e+o,a=this._getLabelSizes().widest.width;let s,l;return"left"===t?r?(l=this.right+o,"near"===n?s="left":"center"===n?(s="center",l+=a/2):(s="right",l+=a)):(l=this.right-i,"near"===n?s="right":"center"===n?(s="center",l-=a/2):(s="left",l=this.left)):"right"===t?r?(l=this.left+o,"near"===n?s="right":"center"===n?(s="center",l-=a/2):(s="left",l-=a)):(l=this.left+i,"near"===n?s="left":"center"===n?(s="center",l+=a/2):(s="right",l=this.right)):s="right",{textAlign:s,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:o,height:i}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,o,i),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex((t=>t.value===e));if(n>=0){return t.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,i;const a=(e,t,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(o=0,i=r.length;o<i;++o){const e=r[o];t.drawOnChartArea&&a({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&a({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:n,grid:r}}=this,o=n.setContext(this.getContext()),i=n.display?o.width:0;if(!i)return;const a=r.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,c,u,d;this.isHorizontal()?(l=Pc(e,this.left,i)-i/2,c=Pc(e,this.right,a)+a/2,u=d=s):(u=Pc(e,this.top,i)-i/2,d=Pc(e,this.bottom,a)+a/2,l=c=s),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(l,u),t.lineTo(c,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,n=this._computeLabelArea();n&&Ac(t,n);const r=this.getLabelItems(e);for(const e of r){const n=e.options,r=e.font;Fc(t,e.label,0,e.textOffset,r,n)}n&&Lc(t)}drawTitle(){const{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;const o=Zc(n.font),i=Uc(n.padding),a=n.align;let s=o.lineHeight/2;"bottom"===t||"center"===t||il(t)?(s+=i.bottom,ol(n.text)&&(s+=o.lineHeight*(n.text.length-1))):s+=i.top;const{titleX:l,titleY:c,maxWidth:u,rotation:d}=function(e,t,n,r){const{top:o,left:i,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d,h,p,f=0;const m=a-o,g=s-i;if(e.isHorizontal()){if(h=oc(r,i,s),il(n)){const e=Object.keys(n)[0],r=n[e];p=u[e].getPixelForValue(r)+m-t}else p="center"===n?(c.bottom+c.top)/2+m-t:ch(e,n,t);d=s-i}else{if(il(n)){const e=Object.keys(n)[0],r=n[e];h=u[e].getPixelForValue(r)-g+t}else h="center"===n?(c.left+c.right)/2-g+t:ch(e,n,t);p=oc(r,a,o),f="left"===n?-Tl:Tl}return{titleX:h,titleY:p,maxWidth:d,rotation:f}}(this,s,t,a);Fc(e,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:d,textAlign:mh(a,t,r),textBaseline:"middle",translation:[l,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,n=ll(e.grid&&e.grid.z,-1),r=ll(e.border&&e.border.z,0);return this._isVisible()&&this.draw===gh.prototype.draw?[{z:n,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let o,i;for(o=0,i=t.length;o<i;++o){const i=t[o];i[n]!==this.id||e&&i.type!==e||r.push(i)}return r}_resolveTickFontOptions(e){return Zc(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class vh{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let n;(function(e){return"id"in e&&"defaults"in e})(t)&&(n=this.register(t));const r=this.items,o=e.id,i=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in r||(r[o]=e,function(e,t,n){const r=gl(Object.create(null),[n?Cc.get(n):{},Cc.get(t),e.defaults]);Cc.set(t,r),e.defaultRoutes&&function(e,t){Object.keys(t).forEach((n=>{const r=n.split("."),o=r.pop(),i=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Cc.route(i,o,l,s)}))}(t,e.defaultRoutes);e.descriptors&&Cc.describe(t,e.descriptors)}(e,i,n),this.override&&Cc.override(e.id,e.overrides)),i}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in Cc[r]&&(delete Cc[r][n],this.override&&delete _c[n])}}class yh{constructor(){this.controllers=new vh(sd,"datasets",!0),this.elements=new vh(ah,"elements"),this.plugins=new vh(Object,"plugins"),this.scales=new vh(gh,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,n){[...t].forEach((t=>{const r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):dl(t,(t=>{const r=n||this._getRegistryForType(t);this._exec(e,r,t)}))}))}_exec(e,t,n){const r=xl(e);ul(n["before"+r],[],n),t[e](n),ul(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){const r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+n+".");return r}}var bh=new yh;class _h{constructor(){this._init=[]}notify(e,t,n,r){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=r?this._descriptors(e).filter(r):this._descriptors(e),i=this._notify(o,e,t,n);return"afterDestroy"===t&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),i}_notify(e,t,n,r){r=r||{};for(const o of e){const e=o.plugin;if(!1===ul(e[n],[t,r,o.options],e)&&r.cancelable)return!1}return!0}invalidate(){rl(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const n=e&&e.config,r=ll(n.options&&n.options.plugins,{}),o=function(e){const t={},n=[],r=Object.keys(bh.plugins.items);for(let e=0;e<r.length;e++)n.push(bh.getPlugin(r[e]));const o=e.plugins||[];for(let e=0;e<o.length;e++){const r=o[e];-1===n.indexOf(r)&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}(n);return!1!==r||t?function(e,{plugins:t,localIds:n},r,o){const i=[],a=e.getContext();for(const s of t){const t=s.id,l=xh(r[t],o);null!==l&&i.push({plugin:s,options:wh(e.config,{plugin:s,local:n[t]},l,a)})}return i}(e,o,r,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}function xh(e,t){return t||!1!==e?!0===e?{}:e:null}function wh(e,{plugin:t,local:n},r,o){const i=e.pluginScopeKeys(t),a=e.getOptionScopes(r,i);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Sh(e,t){const n=Cc.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function kh(e){if("x"===e||"y"===e||"r"===e)return e}function Ch(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function Eh(e,...t){if(kh(e))return e;for(const n of t){const t=n.axis||Ch(n.position)||e.length>1&&kh(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Mh(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Ph(e,t){const n=_c[e.type]||{scales:{}},r=t.scales||{},o=Sh(e.type,t),i=Object.create(null);return Object.keys(r).forEach((t=>{const a=r[t];if(!il(a))return console.error(`Invalid scale configuration for scale: ${t}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const s=Eh(t,a,function(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter((t=>t.xAxisID===e||t.yAxisID===e));if(n.length)return Mh(e,"x",n[0])||Mh(e,"y",n[0])}return{}}(t,e),Cc.scales[a.type]),l=function(e,t){return e===t?"_index_":"_value_"}(s,o),c=n.scales||{};i[t]=vl(Object.create(null),[{axis:s},a,c[s],c[l]])})),e.data.datasets.forEach((n=>{const o=n.type||e.type,a=n.indexAxis||Sh(o,t),s=(_c[o]||{}).scales||{};Object.keys(s).forEach((e=>{const t=function(e,t){let n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,a),o=n[t+"AxisID"]||t;i[o]=i[o]||Object.create(null),vl(i[o],[{axis:t},r[o],s[e]])}))})),Object.keys(i).forEach((e=>{const t=i[e];vl(t,[Cc.scales[t.type],Cc.scale])})),i}function Oh(e){const t=e.options||(e.options={});t.plugins=ll(t.plugins,{}),t.scales=Ph(e,t)}function Th(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const Nh=new Map,Dh=new Set;function Ah(e,t){let n=Nh.get(e);return n||(n=t(),Nh.set(e,n),Dh.add(n)),n}const Lh=(e,t,n)=>{const r=_l(t,n);void 0!==r&&e.add(r)};class Ih{constructor(e){this._config=function(e){return(e=e||{}).data=Th(e.data),Oh(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Th(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Oh(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ah(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return Ah(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return Ah(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return Ah(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const n=this._scopeCache;let r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){const{options:r,type:o}=this,i=this._cachedScopes(e,n),a=i.get(t);if(a)return a;const s=new Set;t.forEach((t=>{e&&(s.add(e),t.forEach((t=>Lh(s,e,t)))),t.forEach((e=>Lh(s,r,e))),t.forEach((e=>Lh(s,_c[o]||{},e))),t.forEach((e=>Lh(s,Cc,e))),t.forEach((e=>Lh(s,xc,e)))}));const l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),Dh.has(t)&&i.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,_c[t]||{},Cc.datasets[t]||{},{type:t},Cc,xc]}resolveNamedOptions(e,t,n,r=[""]){const o={$shared:!0},{resolver:i,subPrefixes:a}=zh(this._resolverCache,e,r);let s=i;if(function(e,t){const{isScriptable:n,isIndexable:r}=eu(e);for(const o of t){const t=n(o),i=r(o),a=(i||t)&&e[o];if(t&&(Sl(a)||Rh(a))||i&&ol(a))return!0}return!1}(i,t)){o.$shared=!1;s=Qc(i,n=Sl(n)?n():n,this.createResolver(e,n,a))}for(const e of t)o[e]=s[e];return o}createResolver(e,t,n=[""],r){const{resolver:o}=zh(this._resolverCache,e,n);return il(t)?Qc(o,t,void 0,r):o}}function zh(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const o=n.join();let i=r.get(o);if(!i){i={resolver:Jc(t,n),subPrefixes:n.filter((e=>!e.toLowerCase().includes("hover")))},r.set(o,i)}return i}const Rh=e=>il(e)&&Object.getOwnPropertyNames(e).some((t=>Sl(e[t])));const $h=["top","bottom","left","right","chartArea"];function Fh(e,t){return"top"===e||"bottom"===e||-1===$h.indexOf(e)&&"x"===t}function jh(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Bh(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ul(n&&n.onComplete,[e],t)}function Hh(e){const t=e.chart,n=t.options.animation;ul(n&&n.onProgress,[e],t)}function Wh(e){return bu()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Vh={},Yh=e=>{const t=Wh(e);return Object.values(Vh).filter((e=>e.canvas===t)).pop()};function Xh(e,t,n){const r=Object.keys(e);for(const o of r){const r=+o;if(r>=t){const i=e[o];delete e[o],(n>0||r>t)&&(e[r+n]=i)}}}function qh(e,t,n){return e.options.clip?e[n]:t[n]}class Uh{static defaults=Cc;static instances=Vh;static overrides=_c;static registry=bh;static version="4.4.7";static getChart=Yh;static register(...e){bh.add(...e),Zh()}static unregister(...e){bh.remove(...e),Zh()}constructor(e,t){const n=this.config=new Ih(t),r=Wh(e),o=Yh(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const i=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(e){return!bu()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?Vd:ih}(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,i.aspectRatio),s=a&&a.canvas,l=s&&s.height,c=s&&s.width;this.id=nl(),this.ctx=a,this.canvas=s,this.width=c,this.height=l,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _h,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}((e=>this.update(e)),i.resizeDelay||0),this._dataChanges=[],Vh[this.id]=this,a&&s?(Yu.listen(this,"complete",Bh),Yu.listen(this,"progress",Hh),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:o}=this;return rl(e)?t&&o?o:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return bh}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Pu(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Oc(this.canvas,this.ctx),this}stop(){return Yu.stop(this),this}resize(e,t){Yu.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,e,t,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,Pu(this,a,!0)&&(this.notifyPlugins("resize",{size:i}),ul(n.onResize,[this,i],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){dl(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce(((e,t)=>(e[t]=!1,e)),{});let o=[];t&&(o=o.concat(Object.keys(t).map((e=>{const n=t[e],r=Eh(e,n),o="r"===r,i="x"===r;return{options:n,dposition:o?"chartArea":i?"bottom":"left",dtype:o?"radialLinear":i?"category":"linear"}})))),dl(o,(t=>{const o=t.options,i=o.id,a=Eh(i,o),s=ll(o.type,t.dtype);void 0!==o.position&&Fh(o.position,a)===Fh(t.dposition)||(o.position=t.dposition),r[i]=!0;let l=null;if(i in n&&n[i].type===s)l=n[i];else{l=new(bh.getScale(s))({id:i,type:s,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(o,e)})),dl(r,((e,t)=>{e||delete n[t]})),dl(n,(e=>{Hd.configure(this,e,e.options),Hd.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort(((e,t)=>e.index-t.index)),n>t){for(let e=t;e<n;++e)this._destroyDatasetMeta(e);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(jh("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach(((e,n)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){const r=t[n];let o=this.getDatasetMeta(n);const i=r.type||this.config.type;if(o.type&&o.type!==i&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=i,o.indexAxis=r.indexAxis||Sh(i,this.options),o.order=r.order||0,o.index=n,o.label=""+r.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const t=bh.getController(i),{datasetElementType:r,dataElementType:a}=Cc.datasets[i];Object.assign(t,{dataElementType:bh.getElement(a),datasetElementType:r&&bh.getElement(r)}),o.controller=new t(this,n),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){dl(this.data.datasets,((e,t)=>{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let e=0,t=this.data.datasets.length;e<t;e++){const{controller:t}=this.getDatasetMeta(e),n=!r&&-1===o.indexOf(t);t.buildOrUpdateElements(n),i=Math.max(+t.getMaxOverflow(),i)}i=this._minPadding=n.layout.autoPadding?i:0,this._updateLayout(i),r||dl(o,(e=>{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(jh("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){dl(this.scales,(e=>{Hd.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);kl(t,n)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:o}of t){Xh(e,r,"_removeElements"===n?-o:o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),r=n(0);for(let e=1;e<t;e++)if(!kl(r,n(e)))return;return Array.from(r).map((e=>e.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Hd.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],dl(this.boxes,(e=>{n&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,Sl(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Yu.has(this)?this.attached&&!Yu.running(this)&&Yu.start(this):(this.draw(),Bh({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,n=[];let r,o;for(r=0,o=t.length;r<o;++r){const o=t[r];e&&!o.visible||n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,r=!n.disabled,o=function(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:qh(n,t,"left"),right:qh(n,t,"right"),top:qh(r,t,"top"),bottom:qh(r,t,"bottom")}:t}(e,this.chartArea),i={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(r&&Ac(t,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?this.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?this.height:o.bottom+n.bottom}),e.controller.draw(),r&&Lc(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return Dc(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const o=Od.modes[t];return"function"==typeof o?o(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter((e=>e&&e._dataset===t)).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Kc(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"==typeof n.hidden?!n.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",o=this.getDatasetMeta(e),i=o.controller._resolveAnimations(void 0,r);wl(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),i.update(o,{visible:n}),this.update((t=>t.datasetIndex===e?r:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Yu.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Oc(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Vh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};dl(this.options.events,(e=>n(e,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},o=(e,t)=>{this.canvas&&this.resize(e,t)};let i;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",i)};i=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():i()}unbindEvents(){dl(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},dl(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let o,i,a,s;for("dataset"===t&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=e.length;a<s;++a){i=e[a];const t=i&&this.getDatasetMeta(i.datasetIndex).controller;t&&t[r+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],n=e.map((({datasetIndex:e,index:t})=>{const n=this.getDatasetMeta(e);if(!n)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:n.data[t],index:t}}));!hl(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return 1===this._plugins._cache.filter((t=>t.plugin.id===e)).length}_updateHoverStyles(e,t,n){const r=this.options.hover,o=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),i=o(t,e),a=n?e:o(e,t);i.length&&this.updateHoverStyle(i,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:o}=this,i=t,a=this._getActiveElements(e,r,n,i),s=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),l=function(e,t,n,r){return n&&"mouseout"!==e.type?r?t:e:null}(e,this._lastEvent,n,s);n&&(this._lastEvent=null,ul(o.onHover,[e,a,this],this),s&&ul(o.onClick,[e,a,this],this));const c=!hl(a,r);return(c||t)&&(this._active=a,this._updateHoverStyles(a,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if("mouseout"===e.type)return[];if(!n)return t;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,r)}}function Zh(){return dl(Uh.instances,(e=>e._plugins.invalidate()))}function Gh(e,t,n,r){const o=Yc(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const i=(n-t)/2,a=Math.min(i,r*t/2),s=e=>{const t=(n-Math.min(i,e))*r/2;return ql(e,0,Math.min(i,t))};return{outerStart:s(o.outerStart),outerEnd:s(o.outerEnd),innerStart:ql(o.innerStart,0,a),innerEnd:ql(o.innerEnd,0,a)}}function Kh(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Jh(e,t,n,r,o,i){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),h=u>0?u+r+n+c:0;let p=0;const f=o-l;if(r){const e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(f-(0!==e?f*e/(e+r):f))/2}const m=(f-Math.max(.001,f*d-n/Cl)/d)/2,g=l+m+p,v=o-m-p,{outerStart:y,outerEnd:b,innerStart:_,innerEnd:x}=Gh(t,h,d,v-g),w=d-y,S=d-b,k=g+y/w,C=v-b/S,E=h+_,M=h+x,P=g+_/E,O=v-x/M;if(e.beginPath(),i){const t=(k+C)/2;if(e.arc(a,s,d,k,t),e.arc(a,s,d,t,C),b>0){const t=Kh(S,C,a,s);e.arc(t.x,t.y,b,C,v+Tl)}const n=Kh(M,v,a,s);if(e.lineTo(n.x,n.y),x>0){const t=Kh(M,O,a,s);e.arc(t.x,t.y,x,v+Tl,O+Math.PI)}const r=(v-x/h+(g+_/h))/2;if(e.arc(a,s,h,v-x/h,r,!0),e.arc(a,s,h,r,g+_/h,!0),_>0){const t=Kh(E,P,a,s);e.arc(t.x,t.y,_,P+Math.PI,g-Tl)}const o=Kh(w,g,a,s);if(e.lineTo(o.x,o.y),y>0){const t=Kh(w,k,a,s);e.arc(t.x,t.y,y,g-Tl,k)}}else{e.moveTo(a,s);const t=Math.cos(k)*d+a,n=Math.sin(k)*d+s;e.lineTo(t,n);const r=Math.cos(C)*d+a,o=Math.sin(C)*d+s;e.lineTo(r,o)}e.closePath()}function Qh(e,t,n,r,o){const{fullCircles:i,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,p="inner"===l.borderAlign;if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=h,p?(e.lineWidth=2*c,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let f=t.endAngle;if(i){Jh(e,t,n,r,f,o);for(let t=0;t<i;++t)e.stroke();isNaN(s)||(f=a+(s%El||El))}p&&function(e,t,n){const{startAngle:r,pixelMargin:o,x:i,y:a,outerRadius:s,innerRadius:l}=t;let c=o/s;e.beginPath(),e.arc(i,a,s,r-c,n+c),l>o?(c=o/l,e.arc(i,a,l,n+c,r-c,!0)):e.arc(i,a,o,n+Tl,r-Tl),e.closePath(),e.clip()}(e,t,f),i||(Jh(e,t,n,r,f,o),e.stroke())}function ep(e,t,n=t){e.lineCap=ll(n.borderCapStyle,t.borderCapStyle),e.setLineDash(ll(n.borderDash,t.borderDash)),e.lineDashOffset=ll(n.borderDashOffset,t.borderDashOffset),e.lineJoin=ll(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=ll(n.borderWidth,t.borderWidth),e.strokeStyle=ll(n.borderColor,t.borderColor)}function tp(e,t,n){e.lineTo(n.x,n.y)}function np(e,t,n={}){const r=e.length,{start:o=0,end:i=r-1}=n,{start:a,end:s}=t,l=Math.max(o,a),c=Math.min(i,s),u=o<a&&i<a||o>s&&i>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function rp(e,t,n,r){const{points:o,options:i}=t,{count:a,start:s,loop:l,ilen:c}=np(o,n,r),u=function(e){return e.stepped?Ic:e.tension||"monotone"===e.cubicInterpolationMode?zc:tp}(i);let d,h,p,{move:f=!0,reverse:m}=r||{};for(d=0;d<=c;++d)h=o[(s+(m?c-d:d))%a],h.skip||(f?(e.moveTo(h.x,h.y),f=!1):u(e,p,h,m,i.stepped),p=h);return l&&(h=o[(s+(m?c:0))%a],u(e,p,h,m,i.stepped)),!!l}function op(e,t,n,r){const o=t.points,{count:i,start:a,ilen:s}=np(o,n,r),{move:l=!0,reverse:c}=r||{};let u,d,h,p,f,m,g=0,v=0;const y=e=>(a+(c?s-e:e))%i,b=()=>{p!==f&&(e.lineTo(g,f),e.lineTo(g,p),e.lineTo(g,m))};for(l&&(d=o[y(0)],e.moveTo(d.x,d.y)),u=0;u<=s;++u){if(d=o[y(u)],d.skip)continue;const t=d.x,n=d.y,r=0|t;r===h?(n<p?p=n:n>f&&(f=n),g=(v*g+t)/++v):(b(),e.lineTo(t,n),h=r,v=0,p=f=n),m=n}b()}function ip(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!(e._decimated||e._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||n)?op:rp}const ap="function"==typeof Path2D;function sp(e,t,n,r){ap&&!t.options.segment?function(e,t,n,r){let o=t._path;o||(o=t._path=new Path2D,t.path(o,n,r)&&o.closePath()),ep(e,t.options),e.stroke(o)}(e,t,n,r):function(e,t,n,r){const{segments:o,options:i}=t,a=ip(t);for(const s of o)ep(e,i,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}(e,t,n,r)}class lp extends ah{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;yu(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const n=e.points,r=e.options.spanGaps,o=n.length;if(!o)return[];const i=!!e._loop,{start:a,end:s}=function(e,t,n,r){let o=0,i=t-1;if(n&&!r)for(;o<t&&!e[o].skip;)o++;for(;o<t&&e[o].skip;)o++;for(o%=t,n&&(i+=o);i>o&&e[i%t].skip;)i--;return i%=t,{start:o,end:i}}(n,o,i,r);return Bu(e,!0===r?[{start:a,end:s,loop:i}]:function(e,t,n,r){const o=e.length,i=[];let a,s=t,l=e[t];for(a=t+1;a<=n;++a){const n=e[a%o];n.skip||n.stop?l.skip||(r=!1,i.push({start:t%o,end:(a-1)%o,loop:r}),t=s=n.stop?a:null):(s=a,l.skip&&(t=a)),l=n}return null!==s&&i.push({start:t%o,end:s%o,loop:r}),i}(n,a,s<a?s+o:s,!!e._fullLoop&&0===a&&s===o-1),n,t)}(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){const n=this.options,r=e[t],o=this.points,i=ju(this,{property:t,start:r,end:r});if(!i.length)return;const a=[],s=function(e){return e.stepped?Du:e.tension||"monotone"===e.cubicInterpolationMode?Au:Nu}(n);let l,c;for(l=0,c=i.length;l<c;++l){const{start:c,end:u}=i[l],d=o[c],h=o[u];if(d===h){a.push(d);continue}const p=s(d,h,Math.abs((r-d[t])/(h[t]-d[t])),n.stepped);p[t]=e[t],a.push(p)}return 1===a.length?a[0]:a}pathSegment(e,t,n){return ip(this)(e,this,t,n)}path(e,t,n){const r=this.segments,o=ip(this);let i=this._loop;t=t||0,n=n||this.points.length-t;for(const a of r)i&=o(e,this,a,{start:t,end:t+n-1});return!!i}draw(e,t,n,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),sp(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function cp(e,t,n,r){const o=e.options,{[n]:i}=e.getProps([n],r);return Math.abs(t-i)<o.radius+o.hitRadius}function up(e,t){const{x:n,y:r,base:o,width:i,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,o),l=Math.max(n,o),c=r-d,u=r+d):(d=i/2,s=n-d,l=n+d,c=Math.min(r,o),u=Math.max(r,o)),{left:s,top:c,right:l,bottom:u}}function dp(e,t,n,r){return e?0:ql(t,n,r)}function hp(e){const t=up(e),n=t.right-t.left,r=t.bottom-t.top,o=function(e,t,n){const r=e.options.borderWidth,o=e.borderSkipped,i=Xc(r);return{t:dp(o.top,i.top,0,n),r:dp(o.right,i.right,0,t),b:dp(o.bottom,i.bottom,0,n),l:dp(o.left,i.left,0,t)}}(e,n/2,r/2),i=function(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),o=e.options.borderRadius,i=qc(o),a=Math.min(t,n),s=e.borderSkipped,l=r||il(o);return{topLeft:dp(!l||s.top||s.left,i.topLeft,0,a),topRight:dp(!l||s.top||s.right,i.topRight,0,a),bottomLeft:dp(!l||s.bottom||s.left,i.bottomLeft,0,a),bottomRight:dp(!l||s.bottom||s.right,i.bottomRight,0,a)}}(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,i.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(o.b,o.r))}}}}function pp(e,t,n,r){const o=null===t,i=null===n,a=e&&!(o&&i)&&up(e,r);return a&&(o||Ul(t,a.left,a.right))&&(i||Ul(n,a.top,a.bottom))}function fp(e,t){e.rect(t.x,t.y,t.w,t.h)}function mp(e,t,n={}){const r=e.x!==n.x?-t:0,o=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-o;return{x:e.x+r,y:e.y+o,w:e.w+i,h:e.h+a,radius:e.radius}}class gp extends ah{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:n,backgroundColor:r}}=this,{inner:o,outer:i}=hp(this),a=(s=i.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?jc:fp;var s;e.save(),i.w===o.w&&i.h===o.h||(e.beginPath(),a(e,mp(i,t,o)),e.clip(),a(e,mp(o,-t,i)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),a(e,mp(o,t)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,t,n){return pp(this,e,t,n)}inXRange(e,t){return pp(this,e,null,t)}inYRange(e,t){return pp(this,null,e,t)}getCenterPoint(e){const{x:t,y:n,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+r)/2:t,y:o?n:(n+r)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}var vp=Object.freeze({__proto__:null,ArcElement:class extends ah{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.getProps(["x","y"],n),{angle:o,distance:i}=Hl(r,{x:e,y:t}),{startAngle:a,endAngle:s,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,h=ll(u,s-a),p=Xl(o,a,s)&&a!==s,f=h>=El||p,m=Ul(i,l+d,c+d);return f&&m}getCenterPoint(e){const{x:t,y:n,startAngle:r,endAngle:o,innerRadius:i,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:s,spacing:l}=this.options,c=(r+o)/2,u=(i+a+l+s)/2;return{x:t+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:n}=this,r=(t.offset||0)/4,o=(t.spacing||0)/2,i=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>El?Math.floor(n/El):0,0===n||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r);const s=r*(1-Math.sin(Math.min(Cl,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,o){const{fullCircles:i,startAngle:a,circumference:s}=t;let l=t.endAngle;if(i){Jh(e,t,n,r,l,o);for(let t=0;t<i;++t)e.fill();isNaN(s)||(l=a+(s%El||El))}Jh(e,t,n,r,l,o),e.fill()}(e,this,s,o,i),Qh(e,this,s,o,i),e.restore()}},BarElement:gp,LineElement:lp,PointElement:class extends ah{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.options,{x:o,y:i}=this.getProps(["x","y"],n);return Math.pow(e-o,2)+Math.pow(t-i,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,t){return cp(this,e,"x",t)}inYRange(e,t){return cp(this,e,"y",t)}getCenterPoint(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}size(e){let t=(e=e||this.options||{}).radius||0;t=Math.max(t,t&&e.hoverRadius||0);return 2*(t+(t&&e.borderWidth||0))}draw(e,t){const n=this.options;this.skip||n.radius<.1||!Dc(this,t,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,Tc(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}});const yp=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],bp=yp.map((e=>e.replace("rgb(","rgba(").replace(")",", 0.5)")));function _p(e){return yp[e%yp.length]}function xp(e){return bp[e%bp.length]}function wp(e){let t=0;return(n,r)=>{const o=e.getDatasetMeta(r).controller;o instanceof vd?t=function(e,t){return e.backgroundColor=e.data.map((()=>_p(t++))),t}(n,t):o instanceof yd?t=function(e,t){return e.backgroundColor=e.data.map((()=>xp(t++))),t}(n,t):o&&(t=function(e,t){return e.borderColor=_p(t),e.backgroundColor=xp(t),++t}(n,t))}}function Sp(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}var kp={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:o}=e.config,{elements:i}=o,a=Sp(r)||(s=o)&&(s.borderColor||s.backgroundColor)||i&&Sp(i)||"rgba(0,0,0,0.1)"!==Cc.borderColor||"rgba(0,0,0,0.1)"!==Cc.backgroundColor;var s;if(!n.forceOverride&&a)return;const l=wp(e);r.forEach(l)}};function Cp(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ep(e){e.data.datasets.forEach((e=>{Cp(e)}))}var Mp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled)return void Ep(e);const r=e.width;e.data.datasets.forEach(((t,o)=>{const{_data:i,indexAxis:a}=t,s=e.getDatasetMeta(o),l=i||t.data;if("y"===Gc([a,e.options.indexAxis]))return;if(!s.controller.supportsDecimation)return;const c=e.scales[s.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(e.options.parsing)return;let{start:u,count:d}=function(e,t){const n=t.length;let r,o=0;const{iScale:i}=e,{min:a,max:s,minDefined:l,maxDefined:c}=i.getUserBounds();return l&&(o=ql(Gl(t,i.axis,a).lo,0,n-1)),r=c?ql(Gl(t,i.axis,s).hi+1,o,n)-o:n-o,{start:o,count:r}}(s,l);if(d<=(n.threshold||4*r))return void Cp(t);let h;switch(rl(i)&&(t._data=l,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}})),n.algorithm){case"lttb":h=function(e,t,n,r,o){const i=o.samples||r;if(i>=n)return e.slice(t,t+n);const a=[],s=(n-2)/(i-2);let l=0;const c=t+n-1;let u,d,h,p,f,m=t;for(a[l++]=e[m],u=0;u<i-2;u++){let r,o=0,i=0;const c=Math.floor((u+1)*s)+1+t,g=Math.min(Math.floor((u+2)*s)+1,n)+t,v=g-c;for(r=c;r<g;r++)o+=e[r].x,i+=e[r].y;o/=v,i/=v;const y=Math.floor(u*s)+1+t,b=Math.min(Math.floor((u+1)*s)+1,n)+t,{x:_,y:x}=e[m];for(h=p=-1,r=y;r<b;r++)p=.5*Math.abs((_-o)*(e[r].y-x)-(_-e[r].x)*(i-x)),p>h&&(h=p,d=e[r],f=r);a[l++]=d,m=f}return a[l++]=e[c],a}(l,u,d,r,n);break;case"min-max":h=function(e,t,n,r){let o,i,a,s,l,c,u,d,h,p,f=0,m=0;const g=[],v=t+n-1,y=e[t].x,b=e[v].x-y;for(o=t;o<t+n;++o){i=e[o],a=(i.x-y)/b*r,s=i.y;const t=0|a;if(t===l)s<h?(h=s,c=o):s>p&&(p=s,u=o),f=(m*f+i.x)/++m;else{const n=o-1;if(!rl(c)&&!rl(u)){const t=Math.min(c,u),r=Math.max(c,u);t!==d&&t!==n&&g.push({...e[t],x:f}),r!==d&&r!==n&&g.push({...e[r],x:f})}o>0&&n!==d&&g.push(e[n]),g.push(i),l=t,m=0,h=p=s,c=u=d=o}}return g}(l,u,d,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}t._decimated=h}))},destroy(e){Ep(e)}};function Pp(e,t,n,r){if(r)return;let o=t[e],i=n[e];return"angle"===e&&(o=Yl(o),i=Yl(i)),{property:e,start:o,end:i}}function Op(e,t,n){for(;t>e;t--){const e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function Tp(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Np(e,t){let n=[],r=!1;return ol(e)?(r=!0,n=e):n=function(e,t){const{x:n=null,y:r=null}=e||{},o=t.points,i=[];return t.segments.forEach((({start:e,end:t})=>{t=Op(e,t,o);const a=o[e],s=o[t];null!==r?(i.push({x:a.x,y:r}),i.push({x:s.x,y:r})):null!==n&&(i.push({x:n,y:a.y}),i.push({x:n,y:s.y}))})),i}(e,t),n.length?new lp({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Dp(e){return e&&!1!==e.fill}function Ap(e,t,n){let r=e[t].fill;const o=[t];let i;if(!n)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!al(r))return r;if(i=e[r],!i)return!1;if(i.visible)return r;o.push(r),r=i.fill}return!1}function Lp(e,t,n){const r=function(e){const t=e.options,n=t.fill;let r=ll(n&&n.target,n);void 0===r&&(r=!!t.backgroundColor);if(!1===r||null===r)return!1;if(!0===r)return"origin";return r}(e);if(il(r))return!isNaN(r.value)&&r;let o=parseFloat(r);return al(o)&&Math.floor(o)===o?function(e,t,n,r){"-"!==e&&"+"!==e||(n=t+n);if(n===t||n<0||n>=r)return!1;return n}(r[0],t,o,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Ip(e,t,n){const r=[];for(let o=0;o<n.length;o++){const i=n[o],{first:a,last:s,point:l}=zp(i,t,"x");if(!(!l||a&&s))if(a)r.unshift(l);else if(e.push(l),!s)break}e.push(...r)}function zp(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const o=r[n],i=e.segments,a=e.points;let s=!1,l=!1;for(let e=0;e<i.length;e++){const t=i[e],r=a[t.start][n],c=a[t.end][n];if(Ul(o,r,c)){s=o===r,l=o===c;break}}return{first:s,last:l,point:r}}class Rp{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){const{x:r,y:o,radius:i}=this;return t=t||{start:0,end:El},e.arc(r,o,i,t.end,t.start,!0),!n.bounds}interpolate(e){const{x:t,y:n,radius:r}=this,o=e.angle;return{x:t+Math.cos(o)*r,y:n+Math.sin(o)*r,angle:o}}}function $p(e){const{chart:t,fill:n,line:r}=e;if(al(n))return function(e,t){const n=e.getDatasetMeta(t),r=n&&e.isDatasetVisible(t);return r?n.dataset:null}(t,n);if("stack"===n)return function(e){const{scale:t,index:n,line:r}=e,o=[],i=r.segments,a=r.points,s=function(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let e=0;e<r.length;e++){const o=r[e];if(o.index===t)break;o.hidden||n.unshift(o.dataset)}return n}(t,n);s.push(Np({x:null,y:t.bottom},r));for(let e=0;e<i.length;e++){const t=i[e];for(let e=t.start;e<=t.end;e++)Ip(o,a[e],s)}return new lp({points:o,options:{}})}(e);if("shape"===n)return!0;const o=function(e){const t=e.scale||{};if(t.getPointPositionForValue)return function(e){const{scale:t,fill:n}=e,r=t.options,o=t.getLabels().length,i=r.reverse?t.max:t.min,a=function(e,t,n){let r;return r="start"===e?n:"end"===e?t.options.reverse?t.min:t.max:il(e)?e.value:t.getBaseValue(),r}(n,t,i),s=[];if(r.grid.circular){const e=t.getPointPositionForValue(0,i);return new Rp({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(a)})}for(let e=0;e<o;++e)s.push(t.getPointPositionForValue(e,a));return s}(e);return function(e){const{scale:t={},fill:n}=e,r=function(e,t){let n=null;return"start"===e?n=t.bottom:"end"===e?n=t.top:il(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}(n,t);if(al(r)){const e=t.isHorizontal();return{x:e?r:null,y:e?null:r}}return null}(e)}(e);return o instanceof Rp?o:Np(o,r)}function Fp(e,t,n){const r=$p(t),{line:o,scale:i,axis:a}=t,s=o.options,l=s.fill,c=s.backgroundColor,{above:u=c,below:d=c}=l||{};r&&o.points.length&&(Ac(e,n),function(e,t){const{line:n,target:r,above:o,below:i,area:a,scale:s}=t,l=n._loop?"angle":t.axis;e.save(),"x"===l&&i!==o&&(jp(e,r,a.top),Bp(e,{line:n,target:r,color:o,scale:s,property:l}),e.restore(),e.save(),jp(e,r,a.bottom));Bp(e,{line:n,target:r,color:i,scale:s,property:l}),e.restore()}(e,{line:o,target:r,above:u,below:d,area:n,scale:i,axis:a}),Lc(e))}function jp(e,t,n){const{segments:r,points:o}=t;let i=!0,a=!1;e.beginPath();for(const s of r){const{start:r,end:l}=s,c=o[r],u=o[Op(r,l,o)];i?(e.moveTo(c.x,c.y),i=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.y)),a=!!t.pathSegment(e,s,{move:a}),a?e.closePath():e.lineTo(u.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Bp(e,t){const{line:n,target:r,property:o,color:i,scale:a}=t,s=function(e,t,n){const r=e.segments,o=e.points,i=t.points,a=[];for(const e of r){let{start:r,end:s}=e;s=Op(r,s,o);const l=Pp(n,o[r],o[s],e.loop);if(!t.segments){a.push({source:e,target:l,start:o[r],end:o[s]});continue}const c=ju(t,l);for(const t of c){const r=Pp(n,i[t.start],i[t.end],t.loop),s=Fu(e,o,r);for(const e of s)a.push({source:e,target:t,start:{[n]:Tp(l,r,"start",Math.max)},end:{[n]:Tp(l,r,"end",Math.min)}})}}return a}(n,r,o);for(const{source:t,target:l,start:c,end:u}of s){const{style:{backgroundColor:s=i}={}}=t,d=!0!==r;e.save(),e.fillStyle=s,Hp(e,a,d&&Pp(o,c,u)),e.beginPath();const h=!!n.pathSegment(e,t);let p;if(d){h?e.closePath():Wp(e,r,u,o);const t=!!r.pathSegment(e,l,{move:h,reverse:!0});p=h&&t,p||Wp(e,r,c,o)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function Hp(e,t,n){const{top:r,bottom:o}=t.chart.chartArea,{property:i,start:a,end:s}=n||{};"x"===i&&(e.beginPath(),e.rect(a,r,s-a,o-r),e.clip())}function Wp(e,t,n,r){const o=t.interpolate(n,r);o&&e.lineTo(o.x,o.y)}var Vp={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,o=[];let i,a,s,l;for(a=0;a<r;++a)i=e.getDatasetMeta(a),s=i.dataset,l=null,s&&s.options&&s instanceof lp&&(l={visible:e.isDatasetVisible(a),index:a,fill:Lp(s,a,r),chart:e,axis:i.controller.options.indexAxis,scale:i.vScale,line:s}),i.$filler=l,o.push(l);for(a=0;a<r;++a)l=o[a],l&&!1!==l.fill&&(l.fill=Ap(o,a,n.propagate))},beforeDraw(e,t,n){const r="beforeDraw"===n.drawTime,o=e.getSortedVisibleDatasetMetas(),i=e.chartArea;for(let t=o.length-1;t>=0;--t){const n=o[t].$filler;n&&(n.line.updateControlPoints(i,n.axis),r&&n.fill&&Fp(e.ctx,n,i))}},beforeDatasetsDraw(e,t,n){if("beforeDatasetsDraw"!==n.drawTime)return;const r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){const n=r[t].$filler;Dp(n)&&Fp(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;Dp(r)&&"beforeDatasetDraw"===n.drawTime&&Fp(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Yp=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}};class Xp extends ah{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=ul(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,n)=>e.sort(t,n,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const n=e.labels,r=Zc(n.font),o=r.size,i=this._computeTitleHeight(),{boxWidth:a,itemHeight:s}=Yp(n,o);let l,c;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(i,o,a,s)+10):(c=this.maxHeight,l=this._fitCols(i,r,a,s)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){const{ctx:o,maxWidth:i,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+a;let u=e;o.textAlign="left",o.textBaseline="middle";let d=-1,h=-c;return this.legendItems.forEach(((e,p)=>{const f=n+t/2+o.measureText(e.text).width;(0===p||l[l.length-1]+f+2*a>i)&&(u+=c,l[l.length-(p>0?0:1)]=0,h+=c,d++),s[p]={left:0,top:h,row:d,width:f,height:r},l[l.length-1]+=f+a})),u}_fitCols(e,t,n,r){const{ctx:o,maxHeight:i,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],c=i-e;let u=a,d=0,h=0,p=0,f=0;return this.legendItems.forEach(((e,i)=>{const{itemWidth:m,itemHeight:g}=function(e,t,n,r,o){const i=function(e,t,n,r){let o=e.text;o&&"string"!=typeof o&&(o=o.reduce(((e,t)=>e.length>t.length?e:t)));return t+n.size/2+r.measureText(o).width}(r,e,t,n),a=function(e,t,n){let r=e;"string"!=typeof t.text&&(r=qp(t,n));return r}(o,r,t.lineHeight);return{itemWidth:i,itemHeight:a}}(n,t,o,e,r);i>0&&h+g+2*a>c&&(u+=d+a,l.push({width:d,height:h}),p+=d+a,f++,d=h=0),s[i]={left:p,top:h,col:f,width:m,height:g},d=Math.max(d,m),h+=g+a})),u+=d,l.push({width:d,height:h}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:o}}=this,i=Lu(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=oc(n,this.left+r,this.right-this.lineWidths[o]);for(const s of t)o!==s.row&&(o=s.row,a=oc(n,this.left+r,this.right-this.lineWidths[o])),s.top+=this.top+e+r,s.left=i.leftForLtr(i.x(a),s.width),a+=s.width+r}else{let o=0,a=oc(n,this.top+e+r,this.bottom-this.columnSizes[o].height);for(const s of t)s.col!==o&&(o=s.col,a=oc(n,this.top+e+r,this.bottom-this.columnSizes[o].height)),s.top=a,s.left+=this.left+r,s.left=i.leftForLtr(i.x(s.left),s.width),a+=s.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;Ac(e,this),this._draw(),Lc(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:o,labels:i}=e,a=Cc.color,s=Lu(e.rtl,this.left,this.width),l=Zc(i.font),{padding:c}=i,u=l.size,d=u/2;let h;this.drawTitle(),r.textAlign=s.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:p,boxHeight:f,itemHeight:m}=Yp(i,u),g=this.isHorizontal(),v=this._computeTitleHeight();h=g?{x:oc(o,this.left+c,this.right-n[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:oc(o,this.top+v+c,this.bottom-t[0].height),line:0},Iu(this.ctx,e.textDirection);const y=m+c;this.legendItems.forEach(((b,_)=>{r.strokeStyle=b.fontColor,r.fillStyle=b.fontColor;const x=r.measureText(b.text).width,w=s.textAlign(b.textAlign||(b.textAlign=i.textAlign)),S=p+d+x;let k=h.x,C=h.y;s.setWidth(this.width),g?_>0&&k+S+c>this.right&&(C=h.y+=y,h.line++,k=h.x=oc(o,this.left+c,this.right-n[h.line])):_>0&&C+y>this.bottom&&(k=h.x=k+t[h.line].width+c,h.line++,C=h.y=oc(o,this.top+v+c,this.bottom-t[h.line].height));if(function(e,t,n){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;r.save();const o=ll(n.lineWidth,1);if(r.fillStyle=ll(n.fillStyle,a),r.lineCap=ll(n.lineCap,"butt"),r.lineDashOffset=ll(n.lineDashOffset,0),r.lineJoin=ll(n.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=ll(n.strokeStyle,a),r.setLineDash(ll(n.lineDash,[])),i.usePointStyle){const a={radius:f*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},l=s.xPlus(e,p/2);Nc(r,a,l,t+d,i.pointStyleWidth&&p)}else{const i=t+Math.max((u-f)/2,0),a=s.leftForLtr(e,p),l=qc(n.borderRadius);r.beginPath(),Object.values(l).some((e=>0!==e))?jc(r,{x:a,y:i,w:p,h:f,radius:l}):r.rect(a,i,p,f),r.fill(),0!==o&&r.stroke()}r.restore()}(s.x(k),C,b),k=((e,t,n,r)=>e===(r?"left":"right")?n:"center"===e?(t+n)/2:t)(w,k+p+d,g?k+S:this.right,e.rtl),function(e,t,n){Fc(r,n.text,e,t+m/2,l,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})}(s.x(k),C,b),g)h.x+=S+c;else if("string"!=typeof b.text){const e=l.lineHeight;h.y+=qp(b,e)+c}else h.y+=y})),zu(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=Zc(t.font),r=Uc(t.padding);if(!t.display)return;const o=Lu(e.rtl,this.left,this.width),i=this.ctx,a=t.position,s=n.size/2,l=r.top+s;let c,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),c=this.top+l,u=oc(e.align,u,this.right-d);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);c=l+oc(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const h=oc(a,u,u+d);i.textAlign=o.textAlign(rc(a)),i.textBaseline="middle",i.strokeStyle=t.color,i.fillStyle=t.color,i.font=n.string,Fc(i,t.text,h,c,n)}_computeTitleHeight(){const e=this.options.title,t=Zc(e.font),n=Uc(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,o;if(Ul(e,this.left,this.right)&&Ul(t,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(r=o[n],Ul(e,r.left,r.left+r.width)&&Ul(t,r.top,r.top+r.height))return this.legendItems[n];return null}handleEvent(e){const t=this.options;if(!function(e,t){if(("mousemove"===e||"mouseout"===e)&&(t.onHover||t.onLeave))return!0;if(t.onClick&&("click"===e||"mouseup"===e))return!0;return!1}(e.type,t))return;const n=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const r=this._hoveredItem,o=((e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index)(r,n);r&&!o&&ul(t.onLeave,[e,r,this],this),this._hoveredItem=n,n&&!o&&ul(t.onHover,[e,n,this],this)}else n&&ul(t.onClick,[e,n,this],this)}}function qp(e,t){return t*(e.text?e.text.length:0)}var Up={id:"legend",_element:Xp,start(e,t,n){const r=e.legend=new Xp({ctx:e.ctx,options:n,chart:e});Hd.configure(e,r,n),Hd.addBox(e,r)},stop(e){Hd.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Hd.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,o=n.chart;o.isDatasetVisible(r)?(o.hide(r),t.hidden=!0):(o.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:i,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const l=e.controller.getStyle(n?0:void 0),c=Uc(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:i,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:o||l.textAlign,borderRadius:a&&(s||l.borderRadius),datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Zp extends ah{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const r=ol(n.text)?n.text.length:1;this._padding=Uc(n.padding);const o=r*Zc(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:n,bottom:r,right:o,options:i}=this,a=i.align;let s,l,c,u=0;return this.isHorizontal()?(l=oc(a,n,o),c=t+e,s=o-n):("left"===i.position?(l=n+e,c=oc(a,r,t),u=-.5*Cl):(l=o-e,c=oc(a,t,r),u=.5*Cl),s=r-t),{titleX:l,titleY:c,maxWidth:s,rotation:u}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const n=Zc(t.font),r=n.lineHeight/2+this._padding.top,{titleX:o,titleY:i,maxWidth:a,rotation:s}=this._drawArgs(r);Fc(e,t.text,0,0,n,{color:t.color,maxWidth:a,rotation:s,textAlign:rc(t.align),textBaseline:"middle",translation:[o,i]})}}var Gp={id:"title",_element:Zp,start(e,t,n){!function(e,t){const n=new Zp({ctx:e.ctx,options:t,chart:e});Hd.configure(e,n,t),Hd.addBox(e,n),e.titleBlock=n}(e,n)},stop(e){const t=e.titleBlock;Hd.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Hd.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Kp=new WeakMap;var Jp={id:"subtitle",start(e,t,n){const r=new Zp({ctx:e.ctx,options:n,chart:e});Hd.configure(e,r,n),Hd.addBox(e,r),Kp.set(e,r)},stop(e){Hd.removeBox(e,Kp.get(e)),Kp.delete(e)},beforeUpdate(e,t,n){const r=Kp.get(e);Hd.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Qp={average(e){if(!e.length)return!1;let t,n,r=new Set,o=0,i=0;for(t=0,n=e.length;t<n;++t){const n=e[t].element;if(n&&n.hasValue()){const e=n.tooltipPosition();r.add(e.x),o+=e.y,++i}}if(0===i||0===r.size)return!1;const a=[...r].reduce(((e,t)=>e+t))/r.size;return{x:a,y:o/i}},nearest(e,t){if(!e.length)return!1;let n,r,o,i=t.x,a=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){const r=e[n].element;if(r&&r.hasValue()){const e=Wl(t,r.getCenterPoint());e<s&&(s=e,o=r)}}if(o){const e=o.tooltipPosition();i=e.x,a=e.y}return{x:i,y:a}}};function ef(e,t){return t&&(ol(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function tf(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function nf(e,t){const{element:n,datasetIndex:r,index:o}=t,i=e.getDatasetMeta(r).controller,{label:a,value:s}=i.getLabelAndValue(o);return{chart:e,label:a,parsed:i.getParsed(o),raw:e.data.datasets[r].data[o],formattedValue:s,dataset:i.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function rf(e,t){const n=e.chart.ctx,{body:r,footer:o,title:i}=e,{boxWidth:a,boxHeight:s}=t,l=Zc(t.bodyFont),c=Zc(t.titleFont),u=Zc(t.footerFont),d=i.length,h=o.length,p=r.length,f=Uc(t.padding);let m=f.height,g=0,v=r.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){m+=p*(t.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(v-p)*l.lineHeight+(v-1)*t.bodySpacing}h&&(m+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let y=0;const b=function(e){g=Math.max(g,n.measureText(e).width+y)};return n.save(),n.font=c.string,dl(e.title,b),n.font=l.string,dl(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?a+2+t.boxPadding:0,dl(r,(e=>{dl(e.before,b),dl(e.lines,b),dl(e.after,b)})),y=0,n.font=u.string,dl(e.footer,b),n.restore(),g+=f.width,{width:g,height:m}}function of(e,t,n,r){const{x:o,width:i}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return"center"===r?c=o<=(s+l)/2?"left":"right":o<=i/2?c="left":o>=a-i/2&&(c="right"),function(e,t,n,r){const{x:o,width:i}=r,a=n.caretSize+n.caretPadding;return"left"===e&&o+i+a>t.width||"right"===e&&o-i-a<0||void 0}(c,e,t,n)&&(c="center"),c}function af(e,t,n){const r=n.yAlign||t.yAlign||function(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}(e,n);return{xAlign:n.xAlign||t.xAlign||of(e,t,n,r),yAlign:r}}function sf(e,t,n,r){const{caretSize:o,caretPadding:i,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=o+i,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=qc(a);let f=function(e,t){let{x:n,width:r}=e;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,s);const m=function(e,t,n){let{y:r,height:o}=e;return"top"===t?r+=n:r-="bottom"===t?o+n:o/2,r}(t,l,c);return"center"===l?"left"===s?f+=c:"right"===s&&(f-=c):"left"===s?f-=Math.max(u,h)+o:"right"===s&&(f+=Math.max(d,p)+o),{x:ql(f,0,r.width-t.width),y:ql(m,0,r.height-t.height)}}function lf(e,t,n){const r=Uc(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function cf(e){return ef([],tf(e))}function uf(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const df={beforeTitle:tl,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:tl,beforeBody:tl,beforeLabel:tl,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return rl(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:tl,afterBody:tl,beforeFooter:tl,footer:tl,afterFooter:tl};function hf(e,t,n,r){const o=e[t].call(n,r);return void 0===o?df[t].call(n,r):o}class pf extends ah{static positioners=Qp;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,o=new Zu(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this,n=this._tooltipItems,Kc(e,{tooltip:t,tooltipItems:n,type:"tooltip"})));var e,t,n}getTitle(e,t){const{callbacks:n}=t,r=hf(n,"beforeTitle",this,e),o=hf(n,"title",this,e),i=hf(n,"afterTitle",this,e);let a=[];return a=ef(a,tf(r)),a=ef(a,tf(o)),a=ef(a,tf(i)),a}getBeforeBody(e,t){return cf(hf(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:n}=t,r=[];return dl(e,(e=>{const t={before:[],lines:[],after:[]},o=uf(n,e);ef(t.before,tf(hf(o,"beforeLabel",this,e))),ef(t.lines,hf(o,"label",this,e)),ef(t.after,tf(hf(o,"afterLabel",this,e))),r.push(t)})),r}getAfterBody(e,t){return cf(hf(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:n}=t,r=hf(n,"beforeFooter",this,e),o=hf(n,"footer",this,e),i=hf(n,"afterFooter",this,e);let a=[];return a=ef(a,tf(r)),a=ef(a,tf(o)),a=ef(a,tf(i)),a}_createItems(e){const t=this._active,n=this.chart.data,r=[],o=[],i=[];let a,s,l=[];for(a=0,s=t.length;a<s;++a)l.push(nf(this.chart,t[a]));return e.filter&&(l=l.filter(((t,r,o)=>e.filter(t,r,o,n)))),e.itemSort&&(l=l.sort(((t,r)=>e.itemSort(t,r,n)))),dl(l,(t=>{const n=uf(e.callbacks,t);r.push(hf(n,"labelColor",this,t)),o.push(hf(n,"labelPointStyle",this,t)),i.push(hf(n,"labelTextColor",this,t))})),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=i,this.dataPoints=l,l}update(e,t){const n=this.options.setContext(this.getContext()),r=this._active;let o,i=[];if(r.length){const e=Qp[n.position].call(this,r,this._eventPosition);i=this._createItems(n),this.title=this.getTitle(i,n),this.beforeBody=this.getBeforeBody(i,n),this.body=this.getBody(i,n),this.afterBody=this.getAfterBody(i,n),this.footer=this.getFooter(i,n);const t=this._size=rf(this,n),a=Object.assign({},e,t),s=af(this.chart,n,a),l=sf(n,a,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,o={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=i,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){const o=this.getCaretPosition(e,n,r);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(e,t,n){const{xAlign:r,yAlign:o}=this,{caretSize:i,cornerRadius:a}=n,{topLeft:s,topRight:l,bottomLeft:c,bottomRight:u}=qc(a),{x:d,y:h}=e,{width:p,height:f}=t;let m,g,v,y,b,_;return"center"===o?(b=h+f/2,"left"===r?(m=d,g=m-i,y=b+i,_=b-i):(m=d+p,g=m+i,y=b-i,_=b+i),v=m):(g="left"===r?d+Math.max(s,c)+i:"right"===r?d+p-Math.max(l,u)-i:this.caretX,"top"===o?(y=h,b=y-i,m=g-i,v=g+i):(y=h+f,b=y+i,m=g+i,v=g-i),_=y),{x1:m,x2:g,x3:v,y1:y,y2:b,y3:_}}drawTitle(e,t,n){const r=this.title,o=r.length;let i,a,s;if(o){const l=Lu(n.rtl,this.x,this.width);for(e.x=lf(this,n.titleAlign,n),t.textAlign=l.textAlign(n.titleAlign),t.textBaseline="middle",i=Zc(n.titleFont),a=n.titleSpacing,t.fillStyle=n.titleColor,t.font=i.string,s=0;s<o;++s)t.fillText(r[s],l.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+a,s+1===o&&(e.y+=n.titleMarginBottom-a)}}_drawColorBox(e,t,n,r,o){const i=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:s,boxWidth:l}=o,c=Zc(o.bodyFont),u=lf(this,"left",o),d=r.x(u),h=s<c.lineHeight?(c.lineHeight-s)/2:0,p=t.y+h;if(o.usePointStyle){const t={radius:Math.min(l,s)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=r.leftForLtr(d,l)+l/2,c=p+s/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,Tc(e,t,n,c),e.strokeStyle=i.borderColor,e.fillStyle=i.backgroundColor,Tc(e,t,n,c)}else{e.lineWidth=il(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,e.strokeStyle=i.borderColor,e.setLineDash(i.borderDash||[]),e.lineDashOffset=i.borderDashOffset||0;const t=r.leftForLtr(d,l),n=r.leftForLtr(r.xPlus(d,1),l-2),a=qc(i.borderRadius);Object.values(a).some((e=>0!==e))?(e.beginPath(),e.fillStyle=o.multiKeyBackground,jc(e,{x:t,y:p,w:l,h:s,radius:a}),e.fill(),e.stroke(),e.fillStyle=i.backgroundColor,e.beginPath(),jc(e,{x:n,y:p+1,w:l-2,h:s-2,radius:a}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(t,p,l,s),e.strokeRect(t,p,l,s),e.fillStyle=i.backgroundColor,e.fillRect(n,p+1,l-2,s-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){const{body:r}=this,{bodySpacing:o,bodyAlign:i,displayColors:a,boxHeight:s,boxWidth:l,boxPadding:c}=n,u=Zc(n.bodyFont);let d=u.lineHeight,h=0;const p=Lu(n.rtl,this.x,this.width),f=function(n){t.fillText(n,p.x(e.x+h),e.y+d/2),e.y+=d+o},m=p.textAlign(i);let g,v,y,b,_,x,w;for(t.textAlign=i,t.textBaseline="middle",t.font=u.string,e.x=lf(this,m,n),t.fillStyle=n.bodyColor,dl(this.beforeBody,f),h=a&&"right"!==m?"center"===i?l/2+c:l+2+c:0,b=0,x=r.length;b<x;++b){for(g=r[b],v=this.labelTextColors[b],t.fillStyle=v,dl(g.before,f),y=g.lines,a&&y.length&&(this._drawColorBox(t,e,b,p,n),d=Math.max(u.lineHeight,s)),_=0,w=y.length;_<w;++_)f(y[_]),d=u.lineHeight;dl(g.after,f)}h=0,d=u.lineHeight,dl(this.afterBody,f),e.y-=o}drawFooter(e,t,n){const r=this.footer,o=r.length;let i,a;if(o){const s=Lu(n.rtl,this.x,this.width);for(e.x=lf(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=s.textAlign(n.footerAlign),t.textBaseline="middle",i=Zc(n.footerFont),t.fillStyle=n.footerColor,t.font=i.string,a=0;a<o;++a)t.fillText(r[a],s.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+n.footerSpacing}}drawBackground(e,t,n,r){const{xAlign:o,yAlign:i}=this,{x:a,y:s}=e,{width:l,height:c}=n,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=qc(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(a+u,s),"top"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+l-d,s),t.quadraticCurveTo(a+l,s,a+l,s+d),"center"===i&&"right"===o&&this.drawCaret(e,t,n,r),t.lineTo(a+l,s+c-p),t.quadraticCurveTo(a+l,s+c,a+l-p,s+c),"bottom"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+h,s+c),t.quadraticCurveTo(a,s+c,a,s+c-h),"center"===i&&"left"===o&&this.drawCaret(e,t,n,r),t.lineTo(a,s+u),t.quadraticCurveTo(a,s,a+u,s),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,n=this.$animations,r=n&&n.x,o=n&&n.y;if(r||o){const n=Qp[e.position].call(this,this._active,this._eventPosition);if(!n)return;const i=this._size=rf(this,e),a=Object.assign({},n,this._size),s=af(t,e,a),l=sf(e,a,s,t);r._to===l.x&&o._to===l.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=i.width,this.height=i.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const i=Uc(t.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&a&&(e.save(),e.globalAlpha=n,this.drawBackground(o,e,r,t),Iu(e,t.textDirection),o.y+=i.top,this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),zu(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this._active,r=e.map((({datasetIndex:e,index:t})=>{const n=this.chart.getDatasetMeta(e);if(!n)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:n.data[t],index:t}})),o=!hl(n,r),i=this._positionChanged(r,t);(o||i)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],i=this._getActiveElements(e,o,t,n),a=this._positionChanged(i,e),s=t||!hl(i,o)||a;return s&&(this._active=i,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,n,r){const o=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter((e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)));const i=this.chart.getElementsAtEventForMode(e,o.mode,o,n);return o.reverse&&i.reverse(),i}_positionChanged(e,t){const{caretX:n,caretY:r,options:o}=this,i=Qp[o.position].call(this,e,t);return!1!==i&&(n!==i.x||r!==i.y)}}var ff={id:"tooltip",_element:pf,positioners:Qp,afterInit(e,t,n){n&&(e.tooltip=new pf({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:df},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},mf=Object.freeze({__proto__:null,Colors:kp,Decimation:Mp,Filler:Vp,Legend:Up,SubTitle:Jp,Title:Gp,Tooltip:ff});function gf(e,t,n,r){const o=e.indexOf(t);if(-1===o)return((e,t,n,r)=>("string"==typeof t?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n))(e,t,n,r);return o!==e.lastIndexOf(t)?n:o}function vf(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class yf extends gh{static id="category";static defaults={ticks:{callback:vf}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(rl(e))return null;const n=this.getLabels();return((e,t)=>null===e?null:ql(Math.round(e),0,t))(t=isFinite(t)&&n[t]===e?t:gf(n,e,ll(t,e),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,r=[];let o=this.getLabels();o=0===e&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=e;n<=t;n++)r.push({value:n});return r}getLabelForValue(e){return vf.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function bf(e,t){const n=[],{bounds:r,step:o,min:i,max:a,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=e,h=o||1,p=c-1,{min:f,max:m}=t,g=!rl(i),v=!rl(a),y=!rl(l),b=(m-f)/(u+1);let _,x,w,S,k=zl((m-f)/p/h)*h;if(k<1e-14&&!g&&!v)return[{value:f},{value:m}];S=Math.ceil(m/k)-Math.floor(f/k),S>p&&(k=zl(S*k/p/h)*h),rl(s)||(_=Math.pow(10,s),k=Math.ceil(k*_)/_),"ticks"===r?(x=Math.floor(f/k)*k,w=Math.ceil(m/k)*k):(x=f,w=m),g&&v&&o&&function(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}((a-i)/o,k/1e3)?(S=Math.round(Math.min((a-i)/k,c)),k=(a-i)/S,x=i,w=a):y?(x=g?i:x,w=v?a:w,S=l-1,k=(w-x)/S):(S=(w-x)/k,S=Il(S,Math.round(S),k/1e3)?Math.round(S):Math.ceil(S));const C=Math.max(Bl(k),Bl(x));_=Math.pow(10,rl(s)?C:s),x=Math.round(x*_)/_,w=Math.round(w*_)/_;let E=0;for(g&&(d&&x!==i?(n.push({value:i}),x<i&&E++,Il(Math.round((x+E*k)*_)/_,i,_f(i,b,e))&&E++):x<i&&E++);E<S;++E){const e=Math.round((x+E*k)*_)/_;if(v&&e>a)break;n.push({value:e})}return v&&d&&w!==a?n.length&&Il(n[n.length-1].value,a,_f(a,b,e))?n[n.length-1].value=a:n.push({value:a}):v&&w!==a||n.push({value:w}),n}function _f(e,t,{horizontal:n,minRotation:r}){const o=Fl(r),i=(n?Math.sin(o):Math.cos(o))||.001,a=.75*t*(""+e).length;return Math.min(t/i,a)}class xf extends gh{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return rl(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this;const i=e=>r=t?r:e,a=e=>o=n?o:e;if(e){const e=Ll(r),t=Ll(o);e<0&&t<0?a(0):e>0&&t>0&&i(0)}if(r===o){let t=0===o?1:Math.abs(.05*o);a(o+t),e||i(r-t)}this.min=r,this.max=o}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:n,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=bf({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&$l(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return vc(e,this.chart.options.locale,this.options.ticks.format)}}class wf extends xf{static id="linear";static defaults={ticks:{callback:bc.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=al(e)?e:0,this.max=al(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=Fl(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Sf=e=>Math.floor(Al(e)),kf=(e,t)=>Math.pow(10,Sf(e)+t);function Cf(e){return 1===e/Math.pow(10,Sf(e))}function Ef(e,t,n){const r=Math.pow(10,n),o=Math.floor(e/r);return Math.ceil(t/r)-o}function Mf(e,{min:t,max:n}){t=sl(e.min,t);const r=[],o=Sf(t);let i=function(e,t){let n=Sf(t-e);for(;Ef(e,t,n)>10;)n++;for(;Ef(e,t,n)<10;)n--;return Math.min(n,Sf(e))}(t,n),a=i<0?Math.pow(10,Math.abs(i)):1;const s=Math.pow(10,i),l=o>i?Math.pow(10,o):0,c=Math.round((t-l)*a)/a,u=Math.floor((t-l)/s/10)*s*10;let d=Math.floor((c-u)/Math.pow(10,i)),h=sl(e.min,Math.round((l+u+d*Math.pow(10,i))*a)/a);for(;h<n;)r.push({value:h,major:Cf(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(i++,d=2,a=i>=0?1:a),h=Math.round((l+u+d*Math.pow(10,i))*a)/a;const p=sl(e.max,h);return r.push({value:p,major:Cf(p),significand:d}),r}class Pf extends gh{static id="logarithmic";static defaults={ticks:{callback:bc.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const n=xf.prototype.parse.apply(this,[e,t]);if(0!==n)return al(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=al(e)?Math.max(0,e):null,this.max=al(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!al(this._userMin)&&(this.min=e===kf(this.min,0)?kf(this.min,-1):kf(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let n=this.min,r=this.max;const o=t=>n=e?n:t,i=e=>r=t?r:e;n===r&&(n<=0?(o(1),i(10)):(o(kf(n,-1)),i(kf(r,1)))),n<=0&&o(kf(r,-1)),r<=0&&i(kf(n,1)),this.min=n,this.max=r}buildTicks(){const e=this.options,t=Mf({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&$l(t,this,"value"),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return void 0===e?"0":vc(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Al(e),this._valueRange=Al(this.max)-Al(e)}getPixelForValue(e){return void 0!==e&&0!==e||(e=this.min),null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Al(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function Of(e){const t=e.ticks;if(t.display&&e.display){const e=Uc(t.backdropPadding);return ll(t.font&&t.font.size,Cc.font.size)+e.height}return 0}function Tf(e,t,n,r,o){return e===r||e===o?{start:t-n/2,end:t+n/2}:e<r||e>o?{start:t-n,end:t}:{start:t,end:t+n}}function Nf(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],o=[],i=e._pointLabels.length,a=e.options.pointLabels,s=a.centerPointLabels?Cl/i:0;for(let d=0;d<i;d++){const i=a.setContext(e.getPointLabelContext(d));o[d]=i.padding;const h=e.getPointPosition(d,e.drawingArea+o[d],s),p=Zc(i.font),f=(l=e.ctx,c=p,u=ol(u=e._pointLabels[d])?u:[u],{w:Mc(l,c.string,u),h:u.length*c.lineHeight});r[d]=f;const m=Yl(e.getIndexAngle(d)+s),g=Math.round(jl(m));Df(n,t,m,Tf(g,h.x,f.w,0,180),Tf(g,h.y,f.h,90,270))}var l,c,u;e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=function(e,t,n){const r=[],o=e._pointLabels.length,i=e.options,{centerPointLabels:a,display:s}=i.pointLabels,l={extra:Of(i)/2,additionalAngle:a?Cl/o:0};let c;for(let i=0;i<o;i++){l.padding=n[i],l.size=t[i];const o=Af(e,i,l);r.push(o),"auto"===s&&(o.visible=Lf(o,c),o.visible&&(c=o))}return r}(e,r,o)}function Df(e,t,n,r,o){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/i,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/i,e.r=Math.max(e.r,t.r+s)),o.start<t.t?(l=(t.t-o.start)/a,e.t=Math.min(e.t,t.t-l)):o.end>t.b&&(l=(o.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function Af(e,t,n){const r=e.drawingArea,{extra:o,additionalAngle:i,padding:a,size:s}=n,l=e.getPointPosition(t,r+o+a,i),c=Math.round(jl(Yl(l.angle+Tl))),u=function(e,t,n){90===n||270===n?e-=t/2:(n>270||n<90)&&(e-=t);return e}(l.y,s.h,c),d=function(e){if(0===e||180===e)return"center";if(e<180)return"left";return"right"}(c),h=function(e,t,n){"right"===n?e-=t:"center"===n&&(e-=t/2);return e}(l.x,s.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+s.w,bottom:u+s.h}}function Lf(e,t){if(!t)return!0;const{left:n,top:r,right:o,bottom:i}=e;return!(Dc({x:n,y:r},t)||Dc({x:n,y:i},t)||Dc({x:o,y:r},t)||Dc({x:o,y:i},t))}function If(e,t,n){const{left:r,top:o,right:i,bottom:a}=n,{backdropColor:s}=t;if(!rl(s)){const n=qc(t.borderRadius),l=Uc(t.backdropPadding);e.fillStyle=s;const c=r-l.left,u=o-l.top,d=i-r+l.width,h=a-o+l.height;Object.values(n).some((e=>0!==e))?(e.beginPath(),jc(e,{x:c,y:u,w:d,h:h,radius:n}),e.fill()):e.fillRect(c,u,d,h)}}function zf(e,t,n,r){const{ctx:o}=e;if(n)o.arc(e.xCenter,e.yCenter,t,0,El);else{let n=e.getPointPosition(0,t);o.moveTo(n.x,n.y);for(let i=1;i<r;i++)n=e.getPointPosition(i,t),o.lineTo(n.x,n.y)}}class Rf extends xf{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:bc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:e=>e,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Uc(Of(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=al(e)&&!isNaN(e)?e:0,this.max=al(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Of(this.options))}generateTickLabels(e){xf.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map(((e,t)=>{const n=ul(this.options.pointLabels.callback,[e,t],this);return n||0===n?n:""})).filter(((e,t)=>this.chart.getDataVisibility(t)))}fit(){const e=this.options;e.display&&e.pointLabels.display?Nf(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){return Yl(e*(El/(this._pointLabels.length||1))+Fl(this.options.startAngle||0))}getDistanceFromCenterForValue(e){if(rl(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(rl(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const n=t[e];return function(e,t,n){return Kc(e,{label:n,index:t,type:"pointLabel"})}(this.getContext(),e,n)}}getPointPosition(e,t,n=0){const r=this.getIndexAngle(e)-Tl+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:n,right:r,bottom:o}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const n=this.ctx;n.save(),n.beginPath(),zf(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:n,grid:r,border:o}=t,i=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&function(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let o=t-1;o>=0;o--){const t=e._pointLabelItems[o];if(!t.visible)continue;const i=r.setContext(e.getPointLabelContext(o));If(n,i,t);const a=Zc(i.font),{x:s,y:l,textAlign:c}=t;Fc(n,e._pointLabels[o],s,l+a.lineHeight/2,a,{color:i.color,textAlign:c,textBaseline:"middle"})}}(this,i),r.display&&this.ticks.forEach(((e,t)=>{if(0!==t||0===t&&this.min<0){s=this.getDistanceFromCenterForValue(e.value);const n=this.getContext(t),a=r.setContext(n),l=o.setContext(n);!function(e,t,n,r,o){const i=e.ctx,a=t.circular,{color:s,lineWidth:l}=t;!a&&!r||!s||!l||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=l,i.setLineDash(o.dash||[]),i.lineDashOffset=o.dashOffset,i.beginPath(),zf(e,n,a,r),i.closePath(),i.stroke(),i.restore())}(this,a,s,i,l)}})),n.display){for(e.save(),a=i-1;a>=0;a--){const r=n.setContext(this.getPointLabelContext(a)),{color:o,lineWidth:i}=r;i&&o&&(e.lineWidth=i,e.strokeStyle=o,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),l=this.getPointPosition(a,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let o,i;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach(((r,a)=>{if(0===a&&this.min>=0&&!t.reverse)return;const s=n.setContext(this.getContext(a)),l=Zc(s.font);if(o=this.getDistanceFromCenterForValue(this.ticks[a].value),s.showLabelBackdrop){e.font=l.string,i=e.measureText(r.label).width,e.fillStyle=s.backdropColor;const t=Uc(s.backdropPadding);e.fillRect(-i/2-t.left,-o-l.size/2-t.top,i+t.width,l.size+t.height)}Fc(e,r.label,0,-o,l,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})})),e.restore()}drawTitle(){}}const $f={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ff=Object.keys($f);function jf(e,t){return e-t}function Bf(e,t){if(rl(t))return null;const n=e._adapter,{parser:r,round:o,isoWeekday:i}=e._parseOpts;let a=t;return"function"==typeof r&&(a=r(a)),al(a)||(a="string"==typeof r?n.parse(a,r):n.parse(a)),null===a?null:(o&&(a="week"!==o||!Rl(i)&&!0!==i?n.startOf(a,o):n.startOf(a,"isoWeek",i)),+a)}function Hf(e,t,n,r){const o=Ff.length;for(let i=Ff.indexOf(e);i<o-1;++i){const e=$f[Ff[i]],o=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((n-t)/(o*e.size))<=r)return Ff[i]}return Ff[o-1]}function Wf(e,t,n){if(n){if(n.length){const{lo:r,hi:o}=Zl(n,t);e[n[r]>=t?n[r]:n[o]]=!0}}else e[t]=!0}function Vf(e,t,n){const r=[],o={},i=t.length;let a,s;for(a=0;a<i;++a)s=t[a],o[s]=a,r.push({value:s,major:!1});return 0!==i&&n?function(e,t,n,r){const o=e._adapter,i=+o.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=i;s<=a;s=+o.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}(e,r,o,n):r}class Yf extends gh{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const n=e.time||(e.time={}),r=this._adapter=new wd._date(e.adapters.date);r.init(t),vl(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:Bf(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,n=e.time.unit||"day";let{min:r,max:o,minDefined:i,maxDefined:a}=this.getUserBounds();function s(e){i||isNaN(e.min)||(r=Math.min(r,e.min)),a||isNaN(e.max)||(o=Math.max(o,e.max))}i&&a||(s(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||s(this.getMinMax(!1))),r=al(r)&&!isNaN(r)?r:+t.startOf(Date.now(),n),o=al(o)&&!isNaN(o)?o:+t.endOf(Date.now(),n)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){const e=this.options,t=e.time,n=e.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,i=function(e,t,n){let r=0,o=e.length;for(;r<o&&e[r]<t;)r++;for(;o>r&&e[o-1]>n;)o--;return r>0||o<e.length?e.slice(r,o):e}(r,o,this.max);return this._unit=t.unit||(n.autoSkip?Hf(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(e,t,n,r,o){for(let i=Ff.length-1;i>=Ff.indexOf(n);i--){const n=Ff[i];if($f[n].common&&e._adapter.diff(o,r,n)>=t-1)return n}return Ff[n?Ff.indexOf(n):0]}(this,i.length,t.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(e){for(let t=Ff.indexOf(e)+1,n=Ff.length;t<n;++t)if($f[Ff[t]].common)return Ff[t]}(this._unit):void 0,this.initOffsets(r),e.reverse&&i.reverse(),Vf(this,i,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((e=>+e.value)))}initOffsets(e=[]){let t,n,r=0,o=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),r=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,n=this.getDecimalForValue(e[e.length-1]),o=1===e.length?n:(n-this.getDecimalForValue(e[e.length-2]))/2);const i=e.length<3?.5:.25;r=ql(r,0,i),o=ql(o,0,i),this._offsets={start:r,end:o,factor:1/(r+1+o)}}_generate(){const e=this._adapter,t=this.min,n=this.max,r=this.options,o=r.time,i=o.unit||Hf(o.minUnit,t,n,this._getLabelCapacity(t)),a=ll(r.ticks.stepSize,1),s="week"===i&&o.isoWeekday,l=Rl(s)||!0===s,c={};let u,d,h=t;if(l&&(h=+e.startOf(h,"isoWeek",s)),h=+e.startOf(h,l?"day":i),e.diff(n,t,i)>1e5*a)throw new Error(t+" and "+n+" are too far apart with stepSize of "+a+" "+i);const p="data"===r.ticks.source&&this.getDataTimestamps();for(u=h,d=0;u<n;u=+e.add(u,a,i),d++)Wf(c,u,p);return u!==n&&"ticks"!==r.bounds&&1!==d||Wf(c,u,p),Object.keys(c).sort(jf).map((e=>+e))}getLabelForValue(e){const t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){const n=this.options.time.displayFormats,r=this._unit,o=t||n[r];return this._adapter.format(e,o)}_tickFormatFunction(e,t,n,r){const o=this.options,i=o.ticks.callback;if(i)return ul(i,[e,t,n],this);const a=o.time.displayFormats,s=this._unit,l=this._majorUnit,c=s&&a[s],u=l&&a[l],d=n[t],h=l&&u&&d&&d.major;return this._adapter.format(e,r||(h?u:c))}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t<n;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,n=this.ctx.measureText(e).width,r=Fl(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(r),i=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*i,h:n*i+a*o}}_getLabelCapacity(e){const t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,o=this._tickFormatFunction(e,0,Vf(this,[e],this._majorUnit),r),i=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return a>0?a:1}getDataTimestamps(){let e,t,n=this._cache.data||[];if(n.length)return n;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,t=r.length;e<t;++e)n=n.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const e=this._cache.labels||[];let t,n;if(e.length)return e;const r=this.getLabels();for(t=0,n=r.length;t<n;++t)e.push(Bf(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return ec(e.sort(jf))}}function Xf(e,t,n){let r,o,i,a,s=0,l=e.length-1;n?(t>=e[s].pos&&t<=e[l].pos&&({lo:s,hi:l}=Gl(e,"pos",t)),({pos:r,time:i}=e[s]),({pos:o,time:a}=e[l])):(t>=e[s].time&&t<=e[l].time&&({lo:s,hi:l}=Gl(e,"time",t)),({time:r,pos:i}=e[s]),({time:o,pos:a}=e[l]));const c=o-r;return c?i+(a-i)*(t-r)/c:i}var qf=Object.freeze({__proto__:null,CategoryScale:yf,LinearScale:wf,LogarithmicScale:Pf,RadialLinearScale:Rf,TimeScale:Yf,TimeSeriesScale:class extends Yf{static id="timeseries";static defaults=Yf.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Xf(t,this.min),this._tableRange=Xf(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:n}=this,r=[],o=[];let i,a,s,l,c;for(i=0,a=e.length;i<a;++i)l=e[i],l>=t&&l<=n&&r.push(l);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(i=0,a=r.length;i<a;++i)c=r[i+1],s=r[i-1],l=r[i],Math.round((c+s)/2)!==l&&o.push({time:l,pos:i/(a-1)});return o}_generate(){const e=this.min,t=this.max;let n=super.getDataTimestamps();return n.includes(e)&&n.length||n.splice(0,0,e),n.includes(t)&&1!==n.length||n.push(t),n.sort(((e,t)=>e-t))}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(Xf(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return Xf(this._table,n*this._tableRange+this._minPos,!0)}}});const Uf=[bd,vp,mf,qf];Uh.register(...Uf);const Zf=({type:t,data:n,options:r,className:o,style:i,plugins:a})=>{const c=s(null),u=s(null);return l((()=>{if(!c.current)return;const e=c.current.getContext("2d");return e?(u.current&&u.current.destroy(),u.current=new Uh(e,{type:t,data:n,options:r||{},plugins:a||[]}),()=>{u.current&&(u.current.destroy(),u.current=null)}):void 0}),[t,n,r,a]),e("canvas",{ref:c,className:o,style:i})};var Gf="Checkbox-module_container__v4ouY",Kf="Checkbox-module_disabled__PAavY",Jf="Checkbox-module_checkbox__tiPi8",Qf="Checkbox-module_indeterminate__GxPm3";var em=a((({checked:n=!1,disabled:r=!1,label:o,indeterminate:i=!1,labelProps:a,onChange:c,id:u,checkBoxClassName:d,...h})=>{const p=s(null),m=s(null),g=f();l((()=>{p.current&&(p.current.indeterminate=i)}),[i]),l((()=>{if(!n||i)return;const e=m.current;if(!e)return;e.style.transform="translateZ(0)";const t=requestAnimationFrame((()=>{e.style.transform=""}));return()=>{cancelAnimationFrame(t),e&&(e.style.transform="")}}),[n,i]);return e(H,{...h,onClick:e=>{r||c?.(e)},dimensionY:36,className:`${h.className} ${Gf} ${r&&Kf}`,prefix:{children:t("div",{className:`${Jf} ${i&&Qf} ${d}`,children:[e("input",{id:u??g,ref:p,type:"checkbox",checked:n,disabled:r,"aria-checked":i?"mixed":n,readOnly:!0}),e("label",{ref:m,htmlFor:u??g,onClick:e=>e.stopPropagation()})]}),...h.prefix},root:{children:e(V,{...a,children:o}),...h.root}})})),tm={chip:"Chip-module_chip__DLgqh",outlined:"Chip-module_outlined__1seXI",filled:"Chip-module_filled__iKdFt",noButton:"Chip-module_noButton__nEh--",closeButton:"Chip-module_closeButton__83TVb"};var nm=a((({label:t,variant:n="filled",icon:r,onDelete:o,suffixIcon:i,suffixOnClick:a,...s})=>e(H,{dimensionX:"hug",gap:8,prefix:{dimensionX:"hug",children:r?e(Ga,{name:r}):void 0,...s.prefix},root:{children:t,...s.root},suffix:(i||o)&&{dimensionX:"hug",alignment:"center",children:e(xs,{className:tm.closeButton,shape:"circle",color:"transparent",onClick:i?a:o,children:e(Ga,{name:i||"close"})}),...s.suffix},...s,className:`${s.className} ${tm.chip} ${tm[n]} ${o||i?"":tm.noButton}`}))),rm="Color-module_color__icl6l";var om=a((({value:t="#000000",prefixProps:n,rootProps:r,onChange:o,...i})=>e(H,{dimensionY:36,prefix:{children:e("input",{type:"color",value:t,onChange:e=>{o?.(e.target.value)}}),...n},root:{children:t&&e(V,{children:t}),...r},...i,className:`${i?.className} ${rm}`})));const im=(e,t,n)=>Math.min(Math.max(e,t),n),am=(e,t=0)=>{const n=Math.pow(10,t);return Math.round(e*n)/n},sm=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=Math.min(e,t,n),i=r-o,a=r+o,s=a/2;if(0===i)return{h:0,s:0,l:am(100*s,1)};const l=s>.5?i/(2-a):i/a;let c;switch(r){case e:c=(t-n)/i+(t<n?6:0);break;case t:c=(n-e)/i+2;break;case n:c=(e-t)/i+4;break;default:c=0}return{h:am(60*c,1),s:am(100*l,1),l:am(100*s,1)}},lm=(e,t,n)=>{if(e/=360,n/=100,0===(t/=100)){const e=Math.round(255*n);return{r:e,g:e,b:e}}const r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),o=n<.5?n*(1+t):n+t-n*t,i=2*n-o;return{r:Math.round(255*r(i,o,e+1/3)),g:Math.round(255*r(i,o,e)),b:Math.round(255*r(i,o,e-1/3))}},cm=(e,t,n)=>{e/=360;const r=(n/=100)*(t/=100),o=r*(1-Math.abs(6*e%2-1)),i=n-r;let a,s,l;return[a,s,l]=e<1/6?[r,o,0]:e<2/6?[o,r,0]:e<.5?[0,r,o]:e<4/6?[0,o,r]:e<5/6?[o,0,r]:[r,0,o],{r:Math.round(255*(a+i)),g:Math.round(255*(s+i)),b:Math.round(255*(l+i))}},um=({r:e,g:t,b:n,a:r})=>{const o=e=>{const t=Math.round(im(e,0,255)).toString(16);return 1===t.length?"0"+t:t},i=`#${o(e)}${o(t)}${o(n)}`.toUpperCase();if(r<1){return`${i}${o(255*r)}`}return i},dm=e=>{if(3===(e=e.replace("#","")).length&&(e=e.split("").map((e=>e+e)).join("")),6===e.length){return{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}}if(8===e.length){return{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:parseInt(e.substr(6,2),16)/255}}return null},hm=e=>{const t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3]),a:t[4]?parseFloat(t[4]):1}:null},pm=e=>{const t=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+))?\s*\)/);return t?{h:parseFloat(t[1]),s:parseFloat(t[2]),l:parseFloat(t[3]),a:t[4]?parseFloat(t[4]):1}:null},fm=e=>{const t=e.trim().toLowerCase();if(t.startsWith("#")){const e=dm(t);if(e){const t=sm(e.r,e.g,e.b);return{hex:um(e),rgb:e,hsl:{...t,a:e.a}}}}if(t.startsWith("rgb")){const e=hm(t);if(e){const t=sm(e.r,e.g,e.b);return{hex:um(e),rgb:e,hsl:{...t,a:e.a}}}}if(t.startsWith("hsl")){const e=pm(t);if(e){const t=lm(e.h,e.s,e.l);return{hex:um({...t,a:e.a}),rgb:{...t,a:e.a},hsl:e}}}return{hex:"#1677FF",rgb:{r:22,g:119,b:255,a:1},hsl:{h:220,s:100,l:54,a:1}}},mm=e=>{const t=((e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=r-Math.min(e,t,n),i=r,a=0===r?0:o/r;let s;if(0===o)s=0;else{switch(r){case e:s=(t-n)/o+(t<n?6:0);break;case t:s=(n-e)/o+2;break;case n:s=(e-t)/o+4;break;default:s=0}s/=6}return{h:am(360*s,1),s:am(100*a,1),v:am(100*i,1)}})(e.rgb.r,e.rgb.g,e.rgb.b);return{...t,a:e.rgb.a}},gm=e=>{const t=cm(e.h,e.s,e.v),n=sm(t.r,t.g,t.b);return{hex:um({...t,a:e.a}),rgb:{...t,a:e.a},hsl:{...n,a:e.a}}},vm=(e={})=>{const{onDragStart:t,onDrag:n,onDragEnd:r,onKeyDown:o,preventSelection:i=!0}=e,[a,d]=u({isDragging:!1,startX:0,startY:0,currentX:0,currentY:0}),h=s(null),p=s({left:0,top:0,width:0,height:0}),f=s(void 0),m=s(0),g=c((()=>{if(h.current){const e=h.current.getBoundingClientRect();p.current={left:e.left,top:e.top,width:e.width,height:e.height}}}),[]),v=c((e=>{if("touches"in e){const t=e.touches[0]||e.changedTouches[0];return{x:t.clientX,y:t.clientY}}return{x:e.clientX,y:e.clientY}}),[]),y=c(((e,t)=>{const n=p.current,r=(e-n.left)/n.width,o=(t-n.top)/n.height;return{x:Math.max(0,Math.min(1,r)),y:Math.max(0,Math.min(1,o))}}),[]),b=c(((e,t)=>{const r=performance.now();f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame((()=>{if(r-m.current>=16){const{x:o,y:i}=y(e,t);n?.(o,i,p.current),m.current=r}}))}),[y,n]),_=c((e=>{e.preventDefault(),g();const{x:n,y:r}=v(e);d({isDragging:!0,startX:n,startY:r,currentX:n,currentY:r}),t?.(e),b(n,r),i&&(document.body.style.userSelect="none",document.body.style.webkitUserSelect="none")}),[v,b,t,i,g]),x=c((e=>{if(!a.isDragging)return;e.preventDefault();const{x:t,y:n}=v(e);d((e=>({...e,currentX:t,currentY:n}))),b(t,n)}),[a.isDragging,v,b]),w=c((()=>{a.isDragging&&(d((e=>({...e,isDragging:!1}))),r?.(),i&&(document.body.style.userSelect="",document.body.style.webkitUserSelect=""),f.current&&cancelAnimationFrame(f.current))}),[a.isDragging,r,i]),S=c((e=>{e.preventDefault(),g();const{x:n,y:r}=v(e);d({isDragging:!0,startX:n,startY:r,currentX:n,currentY:r}),t?.(e),b(n,r)}),[v,b,t,g]),k=c((e=>{if(!a.isDragging)return;e.preventDefault();const{x:t,y:n}=v(e);d((e=>({...e,currentX:t,currentY:n}))),b(t,n)}),[a.isDragging,v,b]),C=c((()=>{a.isDragging&&(d((e=>({...e,isDragging:!1}))),r?.(),f.current&&cancelAnimationFrame(f.current))}),[a.isDragging,r]),E=c((e=>{o?.(e)}),[o]),M=c((()=>{g()}),[g]);return l((()=>{const e=h.current;if(e)return e.addEventListener("mousedown",_),e.addEventListener("touchstart",S,{passive:!1}),e.addEventListener("keydown",E),()=>{e.removeEventListener("mousedown",_),e.removeEventListener("touchstart",S),e.removeEventListener("keydown",E)}}),[_,S,E]),l((()=>{if(a.isDragging)return document.addEventListener("mousemove",x),document.addEventListener("mouseup",w),document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",C),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",C)}}),[a.isDragging,x,w,k,C]),l((()=>(window.addEventListener("resize",M),()=>window.removeEventListener("resize",M))),[M]),l((()=>()=>{f.current&&cancelAnimationFrame(f.current)}),[]),{elementRef:h,dragState:a,updateBounds:g}};var ym="ColorPicker-module_trigger__5Ukgm",bm="ColorPicker-module_triggerLabel__1qiCq",_m="ColorPicker-module_swatch__t-pF4",xm="ColorPicker-module_swatchColor__A-5J8",wm="ColorPicker-module_svPanel__Cr8Xb",Sm="ColorPicker-module_svBackground__VgABR",km="ColorPicker-module_svHandle__gPxoY",Cm="ColorPicker-module_slidersContainer__etZz6",Em="ColorPicker-module_sliders__Xpo3f",Mm="ColorPicker-module_slider__HmNSH",Pm="ColorPicker-module_hueSlider__smchE",Om="ColorPicker-module_alphaSlider__7bImL",Tm="ColorPicker-module_alphaGradient__pIdQ6",Nm="ColorPicker-module_sliderHandle__S-ghs",Dm="ColorPicker-module_formatSelect__5tLPh",Am="ColorPicker-module_colorInput__6ajlG",Lm="ColorPicker-module_error__tj3WS",Im="ColorPicker-module_alphaInputContainer__-RszK",zm="ColorPicker-module_alphaInput__IcWZ-",Rm="ColorPicker-module_preview__2wBPl",$m="ColorPicker-module_previewColor__7da0X",Fm="Select-module_container__txDHr",jm="Select-module_disabled__RJ71M",Bm="Select-module_displayer__gzmxI",Hm="Select-module_selectDropdown__HBmga",Wm="Portal-module_container__QcS9f";const Vm=m(null);function Ym(){let e=0;const t=[],n=e=>{if(!e.target)return;const n=e.target;for(let r=t.length-1;r>=0;r--){const o=t[r];if(o.refs.some((e=>e.current?.contains(n))))return;return void o.onClickOutside(e)}};return{register(e){t.push(e)},unregister(e){const n=t.findIndex((t=>t.id===e));-1!==n&&t.splice(n,1)},nextId:()=>++e,attach(){document.addEventListener("mousedown",n)},detach(){document.removeEventListener("mousedown",n)}}}let Xm=null;const qm=({children:t})=>{const n=s(null);n.current||(n.current=Ym());const r=n.current;l((()=>(r.attach(),()=>r.detach())),[r]);const o={register:r.register,unregister:r.unregister,nextId:r.nextId};return e(Vm.Provider,{value:o,children:t})};function Um(){const e=p(Vm);return e||(Xm||(Xm=Ym(),Xm.attach()),Xm)}function Zm(e,t,n=!0){const r=Um(),o=s(null),i=s(t);i.current=t;const a=c((e=>{i.current?.(e)}),[]);l((()=>{if(!n||!t)return void(null!==o.current&&(r.unregister(o.current),o.current=null));const i=r.nextId();return o.current=i,r.register({id:i,refs:e,onClickOutside:a}),()=>{r.unregister(i),o.current=null}}),[n,r,a,...e])}const Gm=({children:t,className:n,onClickOutside:r,additionalRefs:o=[]})=>{const i=s(null);return Zm([i,...o],r,!!r),l((()=>{const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[]),M.createPortal(e("div",{ref:i,className:`${Wm} ${n||""}`,children:t}),document.body)};var Km="SelectOption-module_option__wQb8V",Jm="SelectOption-module_disabled__m5fGS",Qm="SelectOption-module_selected__A6Rky",eg="SelectOption-module_displayer__lEn8X";var tg=a((({option:t,selected:n,multiple:r,disabled:o,onSelect:i,onClick:a,...s})=>{const{value:l,label:c}="object"==typeof t?{value:t.value,label:t.label}:{value:t,label:t};return e(H,{dimensionX:"fill",dimensionY:36,alignment:"leftCenter",onClick:a,root:{children:e(em,{disabled:o,dimensionX:"fill",checked:n,label:c,alignment:"leftCenter",prefix:r?void 0:{children:null},root:{className:`${s.root?.className} ${eg}`},labelProps:{className:eg}}),dimensionX:"fill"},...s,className:`${Km} ${n&&Qm} ${o&&Jm} ${s.className||""}`})}));var ng=a((({value:r,options:o,placeholder:i="Select an option",placement:a="bottom",multiple:c=!1,disabled:h=!1,maxCount:p,popupClassName:f="",optionProps:m,selectRef:v,disableClick:y,onChange:b,externalDropdownRef:_,...x})=>{const[w,S]=u(!1),[k,C]=u(r||(c?[]:null));l((()=>{(r||0===r||""===r)&&C(r)}),[r]);const E=s(null),M=s(null);g(_??{current:null},(()=>M.current));const{targetPosition:P,calculatePosition:O}=ee({containerRef:E,targetRef:M,initialPlacement:a});d((()=>{w&&E.current&&M.current&&O()}),[w,o,O]);g(v,(()=>({toggleDropdown:N,clear:T})));const T=()=>{C([]),b?.([]),S(!1)},N=e=>{S(void 0===e?e=>!e:e)},D=e=>"object"!=typeof o[0]?String(e):L(e),A=e=>e.length?"object"==typeof o[0]?e.map((e=>L(e))).join(", "):e.join(", "):i,L=e=>o.find((t=>t.value===e))?.label;return t(n,{children:[e(H,{ref:E,onClick:()=>{h||y||N()},dimensionX:"fill",dimensionY:36,...x,root:{children:e(V,{style:x.root?.style,className:`${x.root?.className} ${Bm}`,children:k?c?A(k):D(k):i}),dimensionX:"fill",alignment:"leftCenter"},suffix:{children:e(Ga,{name:"chevronDown"})},className:`${x.className} ${Fm} ${h&&jm}`}),w&&e(Gm,{onClickOutside:()=>{y||S(!1)},additionalRefs:[E],children:e(B,{ref:M,style:{...P},className:`${f} ${Hm}`,direction:"vertical",alignment:"leftTop",gap:0,children:o.map((t=>{const n="object"==typeof t?t.value:t,r=c?Array.isArray(k)&&k.includes(n):k===n,o=c&&!!p&&Array.isArray(k)&&k.length>=p&&!r;return e(tg,{disabled:o,dimensionX:E.current?.offsetWidth,multiple:c,option:t,selected:r,onClick:()=>(e=>{c?(()=>{if(!Array.isArray(k))return;const t=k.includes(e)?k.filter((t=>t!==e)):[...k,e];C(t),b?.(t)})():(C(e),b?.(e),S(!1))})(n),...m},n.toString())}))})})]})}));const rg=(e,t)=>{switch(t){case"hex":default:return e.hex;case"rgb":return((e,t,n,r)=>1===r?`rgb(${Math.round(e)}, ${Math.round(t)}, ${Math.round(n)})`:`rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(n)}, ${am(r,2)})`)(e.rgb.r,e.rgb.g,e.rgb.b,e.rgb.a);case"hsl":return((e,t,n,r)=>1===r?`hsl(${Math.round(e)}, ${Math.round(t)}%, ${Math.round(n)}%)`:`hsla(${Math.round(e)}, ${Math.round(t)}%, ${Math.round(n)}%, ${am(r,2)})`)(e.hsl.h,e.hsl.s,e.hsl.l,e.hsl.a)}},og=({value:n,defaultValue:r="#1677FF",onChange:o,format:a="hex",placement:d="bottomStart",disabled:h=!1,id:p,triggerDisplay:f="complete",containerProps:m,contentProps:g,...v})=>{const[y,b]=u(!1),[_,x]=u(a),[w,S]=u(""),[k,C]=u(!1),[E,M]=u("100"),P=i((()=>fm(n??r)),[n,r]),[O,T]=u(P),[N,D]=u((()=>mm(P))),A=s(null),L=s(null),I=s(null),z=s(null);l((()=>{if(void 0!==n){const e=fm(n);T(e),D(mm(e))}}),[n]),l((()=>{S(rg(O,_)),M(Math.round(100*O.rgb.a).toString())}),[O,_]);const R=c((e=>{T(e),D(mm(e)),o?.(e)}),[o]),$=vm({onDrag:(e,t)=>{const n={...N,s:100*e,v:100*(1-t)};D(n),R(gm(n))},onKeyDown:e=>{const t=e.shiftKey?10:1;let n=N.s,r=N.v;switch(e.key){case"ArrowLeft":e.preventDefault(),n=im(N.s-t,0,100);break;case"ArrowRight":e.preventDefault(),n=im(N.s+t,0,100);break;case"ArrowUp":e.preventDefault(),r=im(N.v+t,0,100);break;case"ArrowDown":e.preventDefault(),r=im(N.v-t,0,100)}if(n!==N.s||r!==N.v){const e={...N,s:n,v:r};D(e),R(gm(e))}}}),F=vm({onDrag:e=>{const t={...N,h:360*e};D(t),R(gm(t))},onKeyDown:e=>{const t=e.shiftKey?10:1;let n=N.h;switch(e.key){case"ArrowLeft":e.preventDefault(),n=(N.h-t+360)%360;break;case"ArrowRight":e.preventDefault(),n=(N.h+t)%360}if(n!==N.h){const e={...N,h:n};D(e),R(gm(e))}}}),j=vm({onDrag:e=>{const t={...N,a:e};D(t),R(gm(t))},onKeyDown:e=>{const t=e.shiftKey?.1:.01;let n=N.a;switch(e.key){case"ArrowLeft":e.preventDefault(),n=im(N.a-t,0,1);break;case"ArrowRight":e.preventDefault(),n=im(N.a+t,0,1)}if(n!==N.a){const e={...N,a:n};D(e),R(gm(e))}}}),H=e=>{if(S(e),e.trim()){const t=(e=>{const t=e.trim().toLowerCase();if(t.startsWith("#")){const e=dm(t);if(e){const t=sm(e.r,e.g,e.b);return{hex:um(e),rgb:e,hsl:{...t,a:e.a}}}return null}if(t.startsWith("rgb")){const e=hm(t);if(e){const t=sm(e.r,e.g,e.b);return{hex:um(e),rgb:e,hsl:{...t,a:e.a}}}return null}if(t.startsWith("hsl")){const e=pm(t);if(e){const t=lm(e.h,e.s,e.l);return{hex:um({...t,a:e.a}),rgb:{...t,a:e.a},hsl:e}}return null}return null})(e);t?(T(t),D(mm(t)),o?.(t),C(!1)):C(!0)}else C(!1)},W=i((()=>{const e=cm(N.h,100,100);return{backgroundColor:`rgb(${e.r}, ${e.g}, ${e.b})`}}),[N.h]),V=i((()=>({left:`${N.s}%`,top:100-N.v+"%"})),[N.s,N.v]),Y=i((()=>({left:N.h/360*100+"%"})),[N.h]),X=i((()=>{const e=cm(N.h,N.s,N.v);return{background:`linear-gradient(to right, rgba(${e.r}, ${e.g}, ${e.b}, 0), rgba(${e.r}, ${e.g}, ${e.b}, 1))`}}),[N.h,N.s,N.v]),q=i((()=>({left:100*N.a+"%"})),[N.a]),U=i((()=>({backgroundColor:um(O.rgb)})),[O.rgb]),Z=()=>{h||b(!y)};l((()=>{const e=e=>{"Escape"===e.key&&y&&(b(!1),A.current?.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[y]);const K="hex"===_?O.hex:w,J="only-code"!==f,Q="only-color"!==f;return e(jA,{content:t(B,{gap:5,direction:"vertical",children:[t("div",{ref:e=>{L.current=e,$.elementRef&&e&&($.elementRef.current=e)},className:wm,style:W,tabIndex:0,role:"application","aria-label":"Saturation and brightness color picker",children:[e("div",{className:Sm}),e("div",{className:km,style:V})]}),t("div",{className:Cm,children:[t("div",{className:Em,children:[e("div",{ref:e=>{I.current=e,F.elementRef&&e&&(F.elementRef.current=e)},className:`${Mm} ${Pm}`,tabIndex:0,role:"slider","aria-label":"Hue","aria-valuenow":Math.round(N.h),"aria-valuemin":0,"aria-valuemax":360,"aria-valuetext":`Hue ${Math.round(N.h)} degrees`,children:e("div",{className:Nm,style:Y})}),t("div",{ref:e=>{z.current=e,j.elementRef&&e&&(j.elementRef.current=e)},className:`${Mm} ${Om}`,tabIndex:0,role:"slider","aria-label":"Alpha","aria-valuenow":Math.round(100*N.a),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`Alpha ${Math.round(100*N.a)}%`,children:[e("div",{className:Tm,style:X}),e("div",{className:Nm,style:q})]})]}),e("div",{className:Rm,children:e("div",{className:$m,style:U})})]}),t(B,{gap:5,direction:"horizontal",children:[e(ng,{className:Dm,value:_,options:[{value:"hex",label:"HEX"},{value:"rgb",label:"RGB"},{value:"hsl",label:"HSL"}],onChange:e=>x(e),dimensionY:32}),e(G,{type:"text",className:`${Am} ${k?Lm:""}`,value:w,onChange:e=>H(e.target.value),onBlur:()=>{if(k||!w.trim())S(rg(O,_)),C(!1);else try{const e=fm(w);R(e),C(!1)}catch{C(!0),S(rg(O,_))}},"aria-label":"Color value","aria-invalid":k,dimensionY:32}),t(B,{className:Im,children:[e(G,{type:"text",className:zm,value:E,onChange:e=>(e=>{M(e);const t=Number.parseFloat(e);if(!Number.isNaN(t)&&t>=0&&t<=100){const e={...N,a:t/100};D(e),R(gm(e))}})(e.target.value),"aria-label":"Alpha percentage",dimensionY:32,dimensionX:30}),e("span",{children:"%"})]})]})]}),open:y,onClose:()=>b(!1),arrow:!0,placement:"bottom",containerProps:{alignment:"leftCenter",...m},contentProps:g,children:t(xs,{variant:"text",className:ym,onClick:Z,onKeyDown:e=>{"Enter"===e.key||" "===e.key?(e.preventDefault(),Z()):"Escape"===e.key&&y&&b(!1)},disabled:h,"aria-label":"Open color picker","aria-expanded":y,"aria-haspopup":"dialog",id:p,"data-display":f,fullWidth:!0,containerProps:{dimensionX:"fill"},children:[J&&e("div",{className:_m,children:e("div",{className:xm,style:U})}),Q&&e("span",{className:bm,children:K})]})})};var ig={container:"DashboardItem-module_container__Cu2fp",settingButton:"DashboardItem-module_settingButton__EVb24",header:"DashboardItem-module_header__1Ltls",chartContainer:"DashboardItem-module_chartContainer__xibFh",chart:"DashboardItem-module_chart__a5kGE"},ag="Section-module_sectionContainer__qECl2",sg="Section-module_header__1oDhY",lg="Section-module_content__3PfOv",cg="Section-module_footer__KPdum";const ug=a((({children:t,...n})=>e(B,{dimensionX:"fill",alignment:"leftTop",...n,className:`${sg} ${n.className}`,children:t}))),dg=a((({children:t,...n})=>e(B,{dimensionX:"fill",alignment:"leftTop",...n,className:`${lg} ${n.className}`,children:t}))),hg=a((({children:t,...n})=>e(B,{dimensionX:"fill",alignment:"leftTop",...n,className:`${cg} ${n.className}`,children:t}))),pg=a((({children:t,...n})=>e(B,{dimensionX:"fill",dimensionY:"fill",direction:"vertical",gap:0,...n,className:`${n.className} ${ag}`,children:t})));pg.Header=ug,pg.Content=dg,pg.Footer=hg;const fg=({headerProps:n,chartProps:r})=>t(pg,{className:ig.dashboardItem,children:[t(pg.Header,{children:[e(V,{children:n?.content}),n?.suffix||e(xs,{color:"transparent",shape:"circle",className:ig.settingButton,children:e(Ga,{name:"cog",className:ig.settingIcon,size:"xs"})})]}),e(pg.Content,{children:e(Zf,{type:r?.type,data:r?.data,options:r?.options,className:ig.chart})})]});var mg,gg={exports:{}};
49
+ */class Vu{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){const o=t.listeners[r],i=t.duration;o.forEach((r=>r({chart:e,initial:t.initial,numSteps:i,currentStep:Math.min(n-t.start,i)})))}_refresh(){this._request||(this._running=!0,this._request=tc.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(e=Date.now()){let t=0;this._charts.forEach(((n,r)=>{if(!n.running||!n.items.length)return;const o=n.items;let i,a=o.length-1,s=!1;for(;a>=0;--a)i=o[a],i._active?(i._total>n.duration&&(n.duration=i._total),i.tick(e),s=!0):(o[a]=o[o.length-1],o.pop());s&&(r.draw(),this._notify(r,n,e,"progress")),o.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=o.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Yu=new Vu;const Xu="transparent",qu={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=hc(e||Xu),o=r.valid&&hc(t||Xu);return o&&o.valid?o.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class Uu{constructor(e,t,n,r){const o=t[n];r=Gc([e.to,r,o,e.from]);const i=Gc([e.from,o,r]);this._active=!0,this._fn=e.fn||qu[e.type||typeof i],this._easing=uc[e.easing]||uc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=i,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,i=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=Gc([e.to,t,r,e.from]),this._from=Gc([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,r=this._prop,o=this._from,i=this._loop,a=this._to;let s;if(this._active=o!==a&&(i||t<n),!this._active)return this._target[r]=a,void this._notify(!0);t<0?this._target[r]=o:(s=t/n%2,s=i&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(o,a,s))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let e=0;e<n.length;e++)n[e][t]()}}class Zu{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!il(e))return;const t=Object.keys(Cc.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach((r=>{const o=e[r];if(!il(o))return;const i={};for(const e of t)i[e]=o[e];(ol(o.properties)&&o.properties||[r]).forEach((e=>{e!==r&&n.has(e)||n.set(e,i)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const o=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let t=0;t<r.length;t++){const o=e[r[t]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}(e.options.$animations,n).then((()=>{e.options=n}),(()=>{})),o}_createAnimations(e,t){const n=this._properties,r=[],o=e.$animations||(e.$animations={}),i=Object.keys(t),a=Date.now();let s;for(s=i.length-1;s>=0;--s){const l=i[s];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let u=o[l];const d=n.get(l);if(u){if(d&&u.active()){u.update(d,c,a);continue}u.cancel()}d&&d.duration?(o[l]=u=new Uu(d,e,l,c),r.push(u)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(Yu.add(this._chart,n),!0):void 0}}function Gu(e,t){const n=e&&e.options||{},r=n.reverse,o=void 0===n.min?t:0,i=void 0===n.max?t:0;return{start:r?i:o,end:r?o:i}}function Ku(e,t){const n=[],r=e._getSortedDatasetMetas(t);let o,i;for(o=0,i=r.length;o<i;++o)n.push(r[o].index);return n}function Ju(e,t,n,r={}){const o=e.keys,i="single"===r.mode;let a,s,l,c;if(null===t)return;let u=!1;for(a=0,s=o.length;a<s;++a){if(l=+o[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],al(c)&&(i||0===t||Ll(t)===Ll(c))&&(t+=c)}return u||r.all?t:0}function Qu(e,t){const n=e&&e.options.stacked;return n||void 0===n&&void 0!==t.stack}function ed(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function td(e,t,n,r){for(const o of t.getMatchingVisibleMetas(r).reverse()){const t=e[o.index];if(n&&t>0||!n&&t<0)return o.index}return null}function nd(e,t){const{chart:n,_cachedMeta:r}=e,o=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:s}=r,l=i.axis,c=a.axis,u=function(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}(i,a,r),d=t.length;let h;for(let e=0;e<d;++e){const n=t[e],{[l]:i,[c]:d}=n;h=(n._stacks||(n._stacks={}))[c]=ed(o,u,i),h[s]=d,h._top=td(h,a,!0,r.type),h._bottom=td(h,a,!1,r.type);(h._visualValues||(h._visualValues={}))[s]=d}}function rd(e,t){const n=e.scales;return Object.keys(n).filter((e=>n[e].axis===t)).shift()}function od(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][n])return;delete t[r][n],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[n]&&delete t[r]._visualValues[n]}}}const id=e=>"reset"===e||"none"===e,ad=(e,t)=>t?e:Object.assign({},e);class sd{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Qu(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&od(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,o=t.xAxisID=ll(n.xAxisID,rd(e,"x")),i=t.yAxisID=ll(n.yAxisID,rd(e,"y")),a=t.rAxisID=ll(n.rAxisID,rd(e,"r")),s=t.indexAxis,l=t.iAxisID=r(s,o,i,a),c=t.vAxisID=r(s,i,o,a);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(i),t.rScale=this.getScaleForId(a),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ql(this._data,this),e._stacked&&od(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(il(t)){const e=this._cachedMeta;this._data=function(e,t){const{iScale:n,vScale:r}=t,o="x"===n.axis?"x":"y",i="x"===r.axis?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[o]:u,[i]:e[u]};return s}(t,e)}else if(n!==t){if(n){Ql(n,this);const e=this._cachedMeta;od(e),e._parsed=[]}t&&Object.isExtensible(t)&&function(e,t){e._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Jl.forEach((t=>{const n="_onData"+xl(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){const o=r.apply(this,t);return e._chartjs.listeners.forEach((e=>{"function"==typeof e[n]&&e[n](...t)})),o}})})))}(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const o=t._stacked;t._stacked=Qu(t.vScale,t),t.stack!==n.stack&&(r=!0,od(t),t.stack=n.stack),this._resyncElements(e),(r||o!==t._stacked)&&(nd(this,t._parsed),t._stacked=Qu(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:i}=n,a=o.axis;let s,l,c,u=0===e&&t===r.length||n._sorted,d=e>0&&n._parsed[e-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,c=r;else{c=ol(r[e])?this.parseArrayData(n,r,e,t):il(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);const o=()=>null===l[a]||d&&l[a]<d[a];for(s=0;s<t;++s)n._parsed[s+e]=l=c[s],u&&(o()&&(u=!1),d=l);n._sorted=u}i&&nd(this,c)}parsePrimitiveData(e,t,n,r){const{iScale:o,vScale:i}=e,a=o.axis,s=i.axis,l=o.getLabels(),c=o===i,u=new Array(r);let d,h,p;for(d=0,h=r;d<h;++d)p=d+n,u[d]={[a]:c||o.parse(l[p],p),[s]:i.parse(t[p],p)};return u}parseArrayData(e,t,n,r){const{xScale:o,yScale:i}=e,a=new Array(r);let s,l,c,u;for(s=0,l=r;s<l;++s)c=s+n,u=t[c],a[s]={x:o.parse(u[0],c),y:i.parse(u[1],c)};return a}parseObjectData(e,t,n,r){const{xScale:o,yScale:i}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l=new Array(r);let c,u,d,h;for(c=0,u=r;c<u;++c)d=c+n,h=t[d],l[c]={x:o.parse(_l(h,a),d),y:i.parse(_l(h,s),d)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){const r=this.chart,o=this._cachedMeta,i=t[e.axis];return Ju({keys:Ku(r,!0),values:t._stacks[e.axis]._visualValues},i,o.index,{mode:n})}updateRangeFromParsed(e,t,n,r){const o=n[t.axis];let i=null===o?NaN:o;const a=r&&n._stacks[t.axis];r&&a&&(r.values=a,i=Ju(r,o,this._cachedMeta.index)),e.min=Math.min(e.min,i),e.max=Math.max(e.max,i)}getMinMax(e,t){const n=this._cachedMeta,r=n._parsed,o=n._sorted&&e===n.iScale,i=r.length,a=this._getOtherScale(e),s=((e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Ku(n,!0),values:null})(t,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(e){const{min:t,max:n,minDefined:r,maxDefined:o}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}(a);let d,h;function p(){h=r[d];const t=h[a.axis];return!al(h[e.axis])||c>t||u<t}for(d=0;d<i&&(p()||(this.updateRangeFromParsed(l,e,h,s),!o));++d);if(o)for(d=i-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(l,e,h,s);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,o,i;for(r=0,o=t.length;r<o;++r)i=t[r][e.axis],al(i)&&n.push(i);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,n=t.iScale,r=t.vScale,o=this.getParsed(e);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=function(e){let t,n,r,o;return il(e)?(t=e.top,n=e.right,r=e.bottom,o=e.left):t=n=r=o=e,{top:t,right:n,bottom:r,left:o,disabled:!1===e}}(ll(this.options.clip,function(e,t,n){if(!1===n)return!1;const r=Gu(e,n),o=Gu(t,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],o=t.chartArea,i=[],a=this._drawStart||0,s=this._drawCount||r.length-a,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(e,o,a,s),c=a;c<a+s;++c){const t=r[c];t.hidden||(t.active&&l?i.push(t):t.draw(e,o))}for(c=0;c<i.length;++c)i[c].draw(e,o)}getStyle(e,t){const n=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){const r=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];o=t.$context||(t.$context=function(e,t,n){return Kc(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}(this.getContext(),e,t)),o.parsed=this.getParsed(e),o.raw=r.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=function(e,t){return Kc(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=n,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",n){const r="active"===t,o=this._cachedDataOpts,i=e+"-"+t,a=o[i],s=this.enableOptionSharing&&wl(n);if(a)return ad(a,s);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),u=r?[`${e}Hover`,"hover",e,""]:[e,""],d=l.getOptionScopes(this.getDataset(),c),h=Object.keys(Cc.elements[e]),p=l.resolveNamedOptions(d,h,(()=>this.getContext(n,r,t)),u);return p.$shared&&(p.$shared=s,o[i]=Object.freeze(ad(p,s))),p}_resolveAnimations(e,t,n){const r=this.chart,o=this._cachedDataOpts,i=`animation-${t}`,a=o[i];if(a)return a;let s;if(!1!==r.options.animation){const r=this.chart.config,o=r.datasetAnimationScopeKeys(this._type,t),i=r.getOptionScopes(this.getDataset(),o);s=r.createResolver(i,this.getContext(e,n,t))}const l=new Zu(r,s&&s.animations);return s&&s._cacheable&&(o[i]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||id(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,o=this.getSharedOptions(n),i=this.includeOptions(t,o)||o!==r;return this.updateSharedOptions(o,t,n),{sharedOptions:o,includeOptions:i}}updateElement(e,t,n,r){id(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!id(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const o=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];const r=n.length,o=t.length,i=Math.min(o,r);i&&this.parse(0,i),o>r?this._insertElements(r,o-r,e):o<r&&this._removeElements(o,r-o)}_insertElements(e,t,n=!0){const r=this._cachedMeta,o=r.data,i=e+t;let a;const s=e=>{for(e.length+=t,a=e.length-1;a>=i;a--)e[a]=e[a-t]};for(s(o),a=e;a<i;++a)o[a]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(e,t),n&&this.updateElements(o,e,t,"reset")}updateElements(e,t,n,r){}_removeElements(e,t){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(e,t);n._stacked&&od(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function ld(e){const t=e.iScale,n=function(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let t=0,o=n.length;t<o;t++)r=r.concat(n[t].controller.getAllParsedValues(e));e._cache.$bar=ec(r.sort(((e,t)=>e-t)))}return e._cache.$bar}(t,e.type);let r,o,i,a,s=t._length;const l=()=>{32767!==i&&-32768!==i&&(wl(a)&&(s=Math.min(s,Math.abs(i-a)||s)),a=i)};for(r=0,o=n.length;r<o;++r)i=t.getPixelForValue(n[r]),l();for(a=void 0,r=0,o=t.ticks.length;r<o;++r)i=t.getPixelForTick(r),l();return s}function cd(e,t,n,r){return ol(e)?function(e,t,n,r){const o=n.parse(e[0],r),i=n.parse(e[1],r),a=Math.min(o,i),s=Math.max(o,i);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:o,end:i,min:a,max:s}}(e,t,n,r):t[n.axis]=n.parse(e,r),t}function ud(e,t,n,r){const o=e.iScale,i=e.vScale,a=o.getLabels(),s=o===i,l=[];let c,u,d,h;for(c=n,u=n+r;c<u;++c)h=t[c],d={},d[o.axis]=s||o.parse(a[c],c),l.push(cd(h,d,i,c));return l}function dd(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function hd(e,t,n,r){let o=t.borderSkipped;const i={};if(!o)return void(e.borderSkipped=i);if(!0===o)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:s,reverse:l,top:c,bottom:u}=function(e){let t,n,r,o,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(o="end",i="start"):(o="start",i="end"),{start:n,end:r,reverse:t,top:o,bottom:i}}(e);"middle"===o&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?o=c:(n._bottom||0)===r?o=u:(i[pd(u,a,s,l)]=!0,o=c)),i[pd(o,a,s,l)]=!0,e.borderSkipped=i}function pd(e,t,n,r){var o,i,a;return r?(a=n,e=fd(e=(o=e)===(i=t)?a:o===a?i:o,n,t)):e=fd(e,t,n),e}function fd(e,t,n){return"start"===e?t:"end"===e?n:e}function md(e,{inflateAmount:t},n){e.inflateAmount="auto"===t?1===n?.33:0:t}class gd extends sd{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,n,r){return ud(e,t,n,r)}parseArrayData(e,t,n,r){return ud(e,t,n,r)}parseObjectData(e,t,n,r){const{iScale:o,vScale:i}=e,{xAxisKey:a="x",yAxisKey:s="y"}=this._parsing,l="x"===o.axis?a:s,c="x"===i.axis?a:s,u=[];let d,h,p,f;for(d=n,h=n+r;d<h;++d)f=t[d],p={},p[o.axis]=o.parse(_l(f,l),d),u.push(cd(_l(f,c),p,i,d));return u}updateRangeFromParsed(e,t,n,r){super.updateRangeFromParsed(e,t,n,r);const o=n._custom;o&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:n,vScale:r}=t,o=this.getParsed(e),i=o._custom,a=dd(i)?"["+i.start+", "+i.end+"]":""+r.getLabelForValue(o[r.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,n,r){const o="reset"===r,{index:i,_cachedMeta:{vScale:a}}=this,s=a.getBasePixel(),l=a.isHorizontal(),c=this._getRuler(),{sharedOptions:u,includeOptions:d}=this._getSharedOptions(t,r);for(let h=t;h<t+n;h++){const t=this.getParsed(h),n=o||rl(t[a.axis])?{base:s,head:s}:this._calculateBarValuePixels(h),p=this._calculateBarIndexPixels(h,c),f=(t._stacks||{})[a.axis],m={horizontal:l,base:n.base,enableBorderRadius:!f||dd(t._custom)||i===f._top||i===f._bottom,x:l?n.head:p.center,y:l?p.center:n.head,height:l?p.size:Math.abs(n.size),width:l?Math.abs(n.size):p.size};d&&(m.options=u||this.resolveDataElementOptions(h,e[h].active?"active":r));const g=m.options||e[h].options;hd(m,g,f,i),md(m,g,c.ratio),this.updateElement(e[h],h,m,r)}}_getStacks(e,t){const{iScale:n}=this._cachedMeta,r=n.getMatchingVisibleMetas(this._type).filter((e=>e.controller.options.grouped)),o=n.options.stacked,i=[],a=this._cachedMeta.controller.getParsed(t),s=a&&a[n.axis],l=e=>{const t=e._parsed.find((e=>e[n.axis]===s)),r=t&&t[e.vScale.axis];if(rl(r)||isNaN(r))return!0};for(const n of r)if((void 0===t||!l(n))&&((!1===o||-1===i.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&i.push(n.stack),n.index===e))break;return i.length||i.push(void 0),i}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,n){const r=this._getStacks(e,n),o=void 0!==t?r.indexOf(t):-1;return-1===o?r.length-1:o}_getRuler(){const e=this.options,t=this._cachedMeta,n=t.iScale,r=[];let o,i;for(o=0,i=t.data.length;o<i;++o)r.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const a=e.barThickness;return{min:a||ld(t),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:n,index:r},options:{base:o,minBarLength:i}}=this,a=o||0,s=this.getParsed(e),l=s._custom,c=dd(l);let u,d,h=s[t.axis],p=0,f=n?this.applyStack(t,s,n):h;f!==h&&(p=f-h,f=h),c&&(h=l.barStart,f=l.barEnd-l.barStart,0!==h&&Ll(h)!==Ll(l.barEnd)&&(p=0),p+=h);const m=rl(o)||c?p:o;let g=t.getPixelForValue(m);if(u=this.chart.getDataVisibility(e)?t.getPixelForValue(p+f):g,d=u-g,Math.abs(d)<i){d=function(e,t,n){return 0!==e?Ll(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}(d,t,a)*i,h===a&&(g-=d/2);const e=t.getPixelForDecimal(0),o=t.getPixelForDecimal(1),l=Math.min(e,o),p=Math.max(e,o);g=Math.max(Math.min(g,p),l),u=g+d,n&&!c&&(s._stacks[t.axis]._visualValues[r]=t.getValueForPixel(u)-t.getValueForPixel(g))}if(g===t.getPixelForValue(a)){const e=Ll(d)*t.getLineWidthForValue(a)/2;g+=e,d-=e}return{size:d,base:g,head:u,center:u+d/2}}_calculateBarIndexPixels(e,t){const n=t.scale,r=this.options,o=r.skipNull,i=ll(r.maxBarThickness,1/0);let a,s;if(t.grouped){const n=o?this._getStackCount(e):t.stackCount,l="flex"===r.barThickness?function(e,t,n,r){const o=t.pixels,i=o[e];let a=e>0?o[e-1]:null,s=e<o.length-1?o[e+1]:null;const l=n.categoryPercentage;null===a&&(a=i-(null===s?t.end-t.start:s-i)),null===s&&(s=i+i-a);const c=i-(i-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}(e,t,r,n):function(e,t,n,r){const o=n.barThickness;let i,a;return rl(o)?(i=t.min*n.categoryPercentage,a=n.barPercentage):(i=o*r,a=1),{chunk:i/r,ratio:a,start:t.pixels[e]-i/2}}(e,t,r,n),c=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);a=l.start+l.chunk*c+l.chunk/2,s=Math.min(i,l.chunk*l.ratio)}else a=n.getPixelForValue(this.getParsed(e)[n.axis],e),s=Math.min(i,t.min*t.ratio);return{base:a-s/2,head:a+s/2,center:a,size:s}}draw(){const e=this._cachedMeta,t=e.vScale,n=e.data,r=n.length;let o=0;for(;o<r;++o)null===this.getParsed(o)[t.axis]||n[o].hidden||n[o].draw(this._ctx)}}class vd extends sd{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let o,i,a=e=>+n[e];if(il(n[e])){const{key:e="value"}=this._parsing;a=t=>+_l(n[t],e)}for(o=e,i=e+t;o<i;++o)r._parsed[o]=a(o)}}_getRotation(){return Fl(this.options.rotation-90)}_getCircumference(){return Fl(this.options.circumference)}_getRotationExtents(){let e=El,t=-El;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const r=this.chart.getDatasetMeta(n).controller,o=r._getRotation(),i=r._getCircumference();e=Math.min(e,o),t=Math.max(t,o+i)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:n}=t,r=this._cachedMeta,o=r.data,i=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-i)/2,0),s=Math.min((l=this.options.cutout,c=a,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const u=this._getRingWeight(this.index),{circumference:d,rotation:h}=this._getRotationExtents(),{ratioX:p,ratioY:f,offsetX:m,offsetY:g}=function(e,t,n){let r=1,o=1,i=0,a=0;if(t<El){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),h=Math.sin(l),p=(e,t,r)=>Xl(e,s,l,!0)?1:Math.max(t,t*n,r,r*n),f=(e,t,r)=>Xl(e,s,l,!0)?-1:Math.min(t,t*n,r,r*n),m=p(0,c,d),g=p(Tl,u,h),v=f(Cl,c,d),y=f(Cl+Tl,u,h);r=(m-v)/2,o=(g-y)/2,i=-(m+v)/2,a=-(g+y)/2}return{ratioX:r,ratioY:o,offsetX:i,offsetY:a}}(h,d,s),v=(n.width-i)/p,y=(n.height-i)/f,b=Math.max(Math.min(v,y)/2,0),_=cl(this.options.radius,b),x=(_-Math.max(_*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*_,this.offsetY=g*_,r.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*u,0),this.updateElements(o,0,o.length,e)}_circumference(e,t){const n=this.options,r=this._cachedMeta,o=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*o/El)}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.chartArea,s=i.options.animation,l=(a.left+a.right)/2,c=(a.top+a.bottom)/2,u=o&&s.animateScale,d=u?0:this.innerRadius,h=u?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m<t;++m)g+=this._circumference(m,o);for(m=t;m<t+n;++m){const t=this._circumference(m,o),n=e[m],i={x:l+this.offsetX,y:c+this.offsetY,startAngle:g,endAngle:g+t,circumference:t,outerRadius:h,innerRadius:d};f&&(i.options=p||this.resolveDataElementOptions(m,n.active?"active":r)),g+=t,this.updateElement(n,m,i,r)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let n,r=0;for(n=0;n<t.length;n++){const o=e._parsed[n];null===o||isNaN(o)||!this.chart.getDataVisibility(n)||t[n].hidden||(r+=Math.abs(o))}return r}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?El*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=vc(t._parsed[e],n.options.locale);return{label:r[e]||"",value:o}}getMaxBorderWidth(e){let t=0;const n=this.chart;let r,o,i,a,s;if(!e)for(r=0,o=n.data.datasets.length;r<o;++r)if(n.isDatasetVisible(r)){i=n.getDatasetMeta(r),e=i.data,a=i.controller;break}if(!e)return 0;for(r=0,o=e.length;r<o;++r)s=a.resolveDataElementOptions(r),"inner"!==s.borderAlign&&(t=Math.max(t,s.borderWidth||0,s.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let n=0,r=e.length;n<r;++n){const e=this.resolveDataElementOptions(n);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(ll(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class yd extends sd{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=vc(t._parsed[e].r,n.options.locale);return{label:r[e]||"",value:o}}parseObjectData(e,t,n,r){return du.bind(this)(e,t,n,r)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach(((e,n)=>{const r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(r<t.min&&(t.min=r),r>t.max&&(t.max=r))})),t}_updateRadius(){const e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(r/2,0),i=(o-Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=o-i*this.index,this.innerRadius=this.outerRadius-i}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.options.animation,s=this._cachedMeta.rScale,l=s.xCenter,c=s.yCenter,u=s.getIndexAngle(0)-.5*Cl;let d,h=u;const p=360/this.countVisibleElements();for(d=0;d<t;++d)h+=this._computeAngle(d,r,p);for(d=t;d<t+n;d++){const t=e[d];let n=h,f=h+this._computeAngle(d,r,p),m=i.getDataVisibility(d)?s.getDistanceFromCenterForValue(this.getParsed(d).r):0;h=f,o&&(a.animateScale&&(m=0),a.animateRotate&&(n=f=u));const g={x:l,y:c,innerRadius:0,outerRadius:m,startAngle:n,endAngle:f,options:this.resolveDataElementOptions(d,t.active?"active":r)};this.updateElement(t,d,g,r)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach(((e,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++})),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?Fl(this.resolveDataElementOptions(e,t).angle||n):0}}var bd=Object.freeze({__proto__:null,BarController:gd,BubbleController:class extends sd{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,n,r){const o=super.parsePrimitiveData(e,t,n,r);for(let e=0;e<o.length;e++)o[e]._custom=this.resolveDataElementOptions(e+n).radius;return o}parseArrayData(e,t,n,r){const o=super.parseArrayData(e,t,n,r);for(let e=0;e<o.length;e++){const r=t[n+e];o[e]._custom=ll(r[2],this.resolveDataElementOptions(e+n).radius)}return o}parseObjectData(e,t,n,r){const o=super.parseObjectData(e,t,n,r);for(let e=0;e<o.length;e++){const r=t[n+e];o[e]._custom=ll(r&&r.r&&+r.r,this.resolveDataElementOptions(e+n).radius)}return o}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:o}=t,i=this.getParsed(e),a=r.getLabelForValue(i.x),s=o.getLabelForValue(i.y),l=i._custom;return{label:n[e]||"",value:"("+a+", "+s+(l?", "+l:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a}=this._cachedMeta,{sharedOptions:s,includeOptions:l}=this._getSharedOptions(t,r),c=i.axis,u=a.axis;for(let d=t;d<t+n;d++){const t=e[d],n=!o&&this.getParsed(d),h={},p=h[c]=o?i.getPixelForDecimal(.5):i.getPixelForValue(n[c]),f=h[u]=o?a.getBasePixel():a.getPixelForValue(n[u]);h.skip=isNaN(p)||isNaN(f),l&&(h.options=s||this.resolveDataElementOptions(d,t.active?"active":r),o&&(h.options.radius=0)),this.updateElement(t,d,h,r)}}resolveDataElementOptions(e,t){const n=this.getParsed(e);let r=super.resolveDataElementOptions(e,t);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return"active"!==t&&(r.radius=0),r.radius+=ll(n&&n._custom,o),r}},DoughnutController:vd,LineController:class extends sd{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:n,data:r=[],_dataset:o}=t,i=this.chart._animationsDisabled;let{start:a,count:s}=ic(t,r,i);this._drawStart=a,this._drawCount=s,ac(t)&&(a=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=r;const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!i,options:l},e),this.updateElements(r,a,s,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(t,r),d=i.axis,h=a.axis,{spanGaps:p,segment:f}=this.options,m=Rl(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||o||"none"===r,v=t+n,y=e.length;let b=t>0&&this.getParsed(t-1);for(let n=0;n<y;++n){const p=e[n],y=g?p:{};if(n<t||n>=v){y.skip=!0;continue}const _=this.getParsed(n),x=rl(_[h]),w=y[d]=i.getPixelForValue(_[d],n),S=y[h]=o||x?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,_,s):_[h],n);y.skip=isNaN(w)||isNaN(S)||x,y.stop=n>0&&Math.abs(_[d]-b[d])>m,f&&(y.parsed=_,y.raw=l.data[n]),u&&(y.options=c||this.resolveDataElementOptions(n,p.active?"active":r)),g||this.updateElement(p,n,y,r),b=_}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const o=r[0].size(this.resolveDataElementOptions(0)),i=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,o,i)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},PieController:class extends vd{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:yd,RadarController:class extends sd{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){const t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(n[t.axis])}}parseObjectData(e,t,n,r){return du.bind(this)(e,t,n,r)}update(e){const t=this._cachedMeta,n=t.dataset,r=t.data||[],o=t.iScale.getLabels();if(n.points=r,"resize"!==e){const t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);const i={_loop:!0,_fullLoop:o.length===r.length,options:t};this.updateElement(n,void 0,i,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){const o=this._cachedMeta.rScale,i="reset"===r;for(let a=t;a<t+n;a++){const t=e[a],n=this.resolveDataElementOptions(a,t.active?"active":r),s=o.getPointPositionForValue(a,this.getParsed(a).r),l=i?o.xCenter:s.x,c=i?o.yCenter:s.y,u={x:l,y:c,angle:s.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(t,a,u,r)}}},ScatterController:class extends sd{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){const t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:o}=t,i=this.getParsed(e),a=r.getLabelForValue(i.x),s=o.getLabelForValue(i.y);return{label:n[e]||"",value:"("+a+", "+s+")"}}update(e){const t=this._cachedMeta,{data:n=[]}=t,r=this.chart._animationsDisabled;let{start:o,count:i}=ic(t,n,r);if(this._drawStart=o,this._drawCount=i,ac(t)&&(o=0,i=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:i}=t;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!i._decimated,o.points=n;const a=this.resolveDatasetElementOptions(e);a.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:a},e)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(n,o,i,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(t,r),u=this.getSharedOptions(c),d=this.includeOptions(r,u),h=i.axis,p=a.axis,{spanGaps:f,segment:m}=this.options,g=Rl(f)?f:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||"none"===r;let y=t>0&&this.getParsed(t-1);for(let c=t;c<t+n;++c){const t=e[c],n=this.getParsed(c),f=v?t:{},b=rl(n[p]),_=f[h]=i.getPixelForValue(n[h],c),x=f[p]=o||b?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,n,s):n[p],c);f.skip=isNaN(_)||isNaN(x)||b,f.stop=c>0&&Math.abs(n[h]-y[h])>g,m&&(f.parsed=n,f.raw=l.data[c]),d&&(f.options=u||this.resolveDataElementOptions(c,t.active?"active":r)),v||this.updateElement(t,c,f,r),y=n}this.updateSharedOptions(u,r,c)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}const n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;const o=t[0].size(this.resolveDataElementOptions(0)),i=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,o,i)/2}}});function _d(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xd{static override(e){Object.assign(xd.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return _d()}parse(){return _d()}format(){return _d()}add(){return _d()}diff(){return _d()}startOf(){return _d()}endOf(){return _d()}}var wd={_date:xd};function Sd(e,t,n,r){const{controller:o,data:i,_sorted:a}=e,s=o._cachedMeta.iScale;if(s&&t===s.axis&&"r"!==t&&a&&i.length){const e=s._reversePixels?Kl:Gl;if(!r)return e(i,t,n);if(o._sharedOptions){const r=i[0],o="function"==typeof r.getRange&&r.getRange(t);if(o){const r=e(i,t,n-o),a=e(i,t,n+o);return{lo:r.lo,hi:a.hi}}}}return{lo:0,hi:i.length-1}}function kd(e,t,n,r,o){const i=e.getSortedVisibleDatasetMetas(),a=n[t];for(let e=0,n=i.length;e<n;++e){const{index:n,data:s}=i[e],{lo:l,hi:c}=Sd(i[e],t,a,o);for(let e=l;e<=c;++e){const t=s[e];t.skip||r(t,n,e)}}}function Cd(e,t,n,r,o){const i=[];if(!o&&!e.isPointInArea(t))return i;return kd(e,n,t,(function(n,a,s){(o||Dc(n,e.chartArea,0))&&n.inRange(t.x,t.y,r)&&i.push({element:n,datasetIndex:a,index:s})}),!0),i}function Ed(e,t,n,r,o,i){let a=[];const s=function(e){const t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){const o=t?Math.abs(e.x-r.x):0,i=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(i,2))}}(n);let l=Number.POSITIVE_INFINITY;return kd(e,n,t,(function(n,c,u){const d=n.inRange(t.x,t.y,o);if(r&&!d)return;const h=n.getCenterPoint(o);if(!(!!i||e.isPointInArea(h))&&!d)return;const p=s(t,h);p<l?(a=[{element:n,datasetIndex:c,index:u}],l=p):p===l&&a.push({element:n,datasetIndex:c,index:u})})),a}function Md(e,t,n,r,o,i){return i||e.isPointInArea(t)?"r"!==n||r?Ed(e,t,n,r,o,i):function(e,t,n,r){let o=[];return kd(e,n,t,(function(e,n,i){const{startAngle:a,endAngle:s}=e.getProps(["startAngle","endAngle"],r),{angle:l}=Hl(e,{x:t.x,y:t.y});Xl(l,a,s)&&o.push({element:e,datasetIndex:n,index:i})})),o}(e,t,n,o):[]}function Pd(e,t,n,r,o){const i=[],a="x"===n?"inXRange":"inYRange";let s=!1;return kd(e,n,t,((e,r,l)=>{e[a]&&e[a](t[n],o)&&(i.push({element:e,datasetIndex:r,index:l}),s=s||e.inRange(t.x,t.y,o))})),r&&!s?[]:i}var Od={evaluateInteractionItems:kd,modes:{index(e,t,n,r){const o=Cu(t,e),i=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?Cd(e,o,i,r,a):Md(e,o,i,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=s[0].index,n=e.data[t];n&&!n.skip&&l.push({element:n,datasetIndex:e.index,index:t})})),l):[]},dataset(e,t,n,r){const o=Cu(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?Cd(e,o,i,r,a):Md(e,o,i,!1,r,a);if(s.length>0){const t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;e<n.length;++e)s.push({element:n[e],datasetIndex:t,index:e})}return s},point:(e,t,n,r)=>Cd(e,Cu(t,e),n.axis||"xy",r,n.includeInvisible||!1),nearest(e,t,n,r){const o=Cu(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;return Md(e,o,i,n.intersect,r,a)},x:(e,t,n,r)=>Pd(e,Cu(t,e),"x",n.intersect,r),y:(e,t,n,r)=>Pd(e,Cu(t,e),"y",n.intersect,r)}};const Td=["left","top","right","bottom"];function Nd(e,t){return e.filter((e=>e.pos===t))}function Dd(e,t){return e.filter((e=>-1===Td.indexOf(e.pos)&&e.box.axis===t))}function Ad(e,t){return e.sort(((e,n)=>{const r=t?n:e,o=t?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight}))}function Ld(e,t){const n=function(e){const t={};for(const n of e){const{stack:e,pos:r,stackWeight:o}=n;if(!e||!Td.includes(r))continue;const i=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=o}return t}(e),{vBoxMaxWidth:r,hBoxMaxHeight:o}=t;let i,a,s;for(i=0,a=e.length;i<a;++i){s=e[i];const{fullSize:a}=s.box,l=n[s.stack],c=l&&s.stackWeight/l.weight;s.horizontal?(s.width=c?c*r:a&&t.availableWidth,s.height=o):(s.width=r,s.height=c?c*o:a&&t.availableHeight)}return n}function Id(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function zd(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Rd(e,t,n,r){const{pos:o,box:i}=n,a=e.maxPadding;if(!il(o)){n.size&&(e[o]-=n.size);const t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?i.height:i.width),n.size=t.size/t.count,e[o]+=n.size}i.getPadding&&zd(a,i.getPadding());const s=Math.max(0,t.outerWidth-Id(a,e,"left","right")),l=Math.max(0,t.outerHeight-Id(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function $d(e,t){const n=t.maxPadding;function r(e){const r={left:0,top:0,right:0,bottom:0};return e.forEach((e=>{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function Fd(e,t,n,r){const o=[];let i,a,s,l,c,u;for(i=0,a=e.length,c=0;i<a;++i){s=e[i],l=s.box,l.update(s.width||t.w,s.height||t.h,$d(s.horizontal,t));const{same:a,other:d}=Rd(t,n,s,r);c|=a&&o.length,u=u||d,l.fullSize||o.push(s)}return c&&Fd(o,t,n,r)||u}function jd(e,t,n,r,o){e.top=n,e.left=t,e.right=t+r,e.bottom=n+o,e.width=r,e.height=o}function Bd(e,t,n,r){const o=n.padding;let{x:i,y:a}=t;for(const s of e){const e=s.box,l=r[s.stack]||{count:1,placed:0,weight:1},c=s.stackWeight/l.weight||1;if(s.horizontal){const r=t.w*c,i=l.size||e.height;wl(l.start)&&(a=l.start),e.fullSize?jd(e,o.left,a,n.outerWidth-o.right-o.left,i):jd(e,t.left+l.placed,a,r,i),l.start=a,l.placed+=r,a=e.bottom}else{const r=t.h*c,a=l.size||e.width;wl(l.start)&&(i=l.start),e.fullSize?jd(e,i,o.top,a,n.outerHeight-o.bottom-o.top):jd(e,i,t.top+l.placed,a,r),l.start=i,l.placed+=r,i=e.right}}t.x=i,t.y=a}var Hd={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const o=Uc(e.options.layout.padding),i=Math.max(t-o.width,0),a=Math.max(n-o.height,0),s=function(e){const t=function(e){const t=[];let n,r,o,i,a,s;for(n=0,r=(e||[]).length;n<r;++n)o=e[n],({position:i,options:{stack:a,stackWeight:s=1}}=o),t.push({index:n,box:o,pos:i,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&i+a,stackWeight:s});return t}(e),n=Ad(t.filter((e=>e.box.fullSize)),!0),r=Ad(Nd(t,"left"),!0),o=Ad(Nd(t,"right")),i=Ad(Nd(t,"top"),!0),a=Ad(Nd(t,"bottom")),s=Dd(t,"x"),l=Dd(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:o.concat(l).concat(a).concat(s),chartArea:Nd(t,"chartArea"),vertical:r.concat(o).concat(l),horizontal:i.concat(a).concat(s)}}(e.boxes),l=s.vertical,c=s.horizontal;dl(e.boxes,(e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()}));const u=l.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/u,hBoxMaxHeight:a/2}),h=Object.assign({},o);zd(h,Uc(r));const p=Object.assign({maxPadding:h,w:i,h:a,x:o.left,y:o.top},o),f=Ld(l.concat(c),d);Fd(s.fullSize,p,d,f),Fd(l,p,d,f),Fd(c,p,d,f)&&Fd(l,p,d,f),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(p),Bd(s.leftAndTop,p,d,f),p.x+=p.w,p.y+=p.h,Bd(s.rightAndBottom,p,d,f),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},dl(s.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class Wd{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}}class Vd extends Wd{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Yd="$chartjs",Xd={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},qd=e=>null===e||""===e;const Ud=!!Ou&&{passive:!0};function Zd(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Ud)}function Gd(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Kd(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||Gd(n.addedNodes,r),t=t&&!Gd(n.removedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}function Jd(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||Gd(n.removedNodes,r),t=t&&!Gd(n.addedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}const Qd=new Map;let eh=0;function th(){const e=window.devicePixelRatio;e!==eh&&(eh=e,Qd.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function nh(e,t,n){const r=e.canvas,o=r&&_u(r);if(!o)return;const i=nc(((e,t)=>{const r=o.clientWidth;n(e,t),r<o.clientWidth&&n()}),window),a=new ResizeObserver((e=>{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||i(n,r)}));return a.observe(o),function(e,t){Qd.size||window.addEventListener("resize",th),Qd.set(e,t)}(e,i),a}function rh(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){Qd.delete(e),Qd.size||window.removeEventListener("resize",th)}(e)}function oh(e,t,n){const r=e.canvas,o=nc((t=>{null!==e.ctx&&n(function(e,t){const n=Xd[e.type]||e.type,{x:r,y:o}=Cu(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==o?o:null}}(t,e))}),e);return function(e,t,n){e&&e.addEventListener(t,n,Ud)}(r,t,o),o}class ih extends Wd{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),o=e.getAttribute("width");if(e[Yd]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",qd(o)){const t=Tu(e,"width");void 0!==t&&(e.width=t)}if(qd(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=Tu(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[Yd])return!1;const n=t[Yd].initial;["height","width"].forEach((e=>{const r=n[e];rl(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t[Yd],!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),o={attach:Kd,detach:Jd,resize:nh}[t]||oh;r[t]=o(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:rh,detach:rh,resize:rh}[t]||Zd)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return Mu(e,t,n,r)}isAttached(e){const t=e&&_u(e);return!(!t||!t.isConnected)}}class ah{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return Rl(this.x)&&Rl(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach((e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function sh(e,t){const n=e.options.ticks,r=function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),o=e._maxLength/n;return Math.floor(Math.min(r,o))}(e),o=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}(t):[],a=i.length,s=i[0],l=i[a-1],c=[];if(a>o)return function(e,t,n,r){let o,i=0,a=n[0];for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}(t,c,i,a/o),c;const u=function(e,t,n){const r=function(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}(e),o=t.length/n;if(!r)return Math.max(o,1);const i=function(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r==0&&(t.push(r),t.push(e/r));return n===(0|n)&&t.push(n),t.sort(((e,t)=>e-t)).pop(),t}(r);for(let e=0,t=i.length-1;e<t;e++){const t=i[e];if(t>o)return t}return Math.max(o,1)}(i,t,o);if(a>0){let e,n;const r=a>1?Math.round((l-s)/(a-1)):null;for(lh(t,c,u,rl(r)?0:s-r,s),e=0,n=a-1;e<n;e++)lh(t,c,u,i[e],i[e+1]);return lh(t,c,u,l,rl(r)?t.length:l+r),c}return lh(t,c,u),c}function lh(e,t,n,r,o){const i=ll(r,0),a=Math.min(ll(o,e.length),e.length);let s,l,c,u=0;for(n=Math.ceil(n),o&&(s=o-r,n=s/Math.floor(s/n)),c=i;c<0;)u++,c=Math.round(i+u*n);for(l=Math.max(i,0);l<a;l++)l===c&&(t.push(e[l]),u++,c=Math.round(i+u*n))}const ch=(e,t,n)=>"top"===t||"left"===t?e[t]+n:e[t]-n,uh=(e,t)=>Math.min(t||e,e);function dh(e,t){const n=[],r=e.length/t,o=e.length;let i=0;for(;i<o;i+=r)n.push(e[Math.floor(i)]);return n}function hh(e,t,n){const r=e.ticks.length,o=Math.min(t,r-1),i=e._startPixel,a=e._endPixel,s=1e-6;let l,c=e.getPixelForTick(o);if(!(n&&(l=1===r?Math.max(c-i,a-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(o-1))/2,c+=o<t?l:-l,c<i-s||c>a+s)))return c}function ph(e){return e.drawTicks?e.tickLength:0}function fh(e,t){if(!e.display)return 0;const n=Zc(e.font,t),r=Uc(e.padding);return(ol(e.text)?e.text.length:1)*n.lineHeight+r.height}function mh(e,t,n){let r=rc(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class gh extends ah{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=sl(e,Number.POSITIVE_INFINITY),t=sl(t,Number.NEGATIVE_INFINITY),n=sl(n,Number.POSITIVE_INFINITY),r=sl(r,Number.NEGATIVE_INFINITY),{min:sl(e,n),max:sl(t,r),minDefined:al(e),maxDefined:al(t)}}getMinMax(e){let t,{min:n,max:r,minDefined:o,maxDefined:i}=this.getUserBounds();if(o&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let s=0,l=a.length;s<l;++s)t=a[s].controller.getMinMax(this,e),o||(n=Math.min(n,t.min)),i||(r=Math.max(r,t.max));return n=i&&n>r?r:n,r=o&&n>r?n:r,{min:sl(n,sl(r,n)),max:sl(r,sl(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ul(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:r,grace:o,ticks:i}=this.options,a=i.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){const{min:r,max:o}=e,i=cl(t,(o-r)/2),a=(e,t)=>n&&0===e?0:e+t;return{min:a(r,-Math.abs(i)),max:a(o,i)}}(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=a<this.ticks.length;this._convertTicksToLabels(s?dh(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||"auto"===i.source)&&(this.ticks=sh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,n=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,n=!n),this._startPixel=e,this._endPixel=t,this._reversePixels=n,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ul(this.options.afterUpdate,[this])}beforeSetDimensions(){ul(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ul(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ul(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ul(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let n,r,o;for(n=0,r=e.length;n<r;n++)o=e[n],o.label=ul(t.callback,[o.value,n,e],this)}afterTickToLabelConversion(){ul(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ul(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,n=uh(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,o=t.maxRotation;let i,a,s,l=r;if(!this._isVisible()||!t.display||r>=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),u=c.widest.width,d=c.highest.height,h=ql(this.chart.width-u,0,this.maxWidth);i=e.offset?this.maxWidth/n:h/(n-1),u+6>i&&(i=h/(n-(e.offset?.5:1)),a=this.maxHeight-ph(e.grid)-t.padding-fh(e.title,this.chart.options.font),s=Math.sqrt(u*u+d*d),l=jl(Math.min(Math.asin(ql((c.highest.height+6)/i,-1,1)),Math.asin(ql(a/s,-1,1))-Math.asin(ql(d/s,-1,1)))),l=Math.max(r,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){ul(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ul(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:o}}=this,i=this._isVisible(),a=this.isHorizontal();if(i){const i=fh(r,t.options.font);if(a?(e.width=this.maxWidth,e.height=ph(o)+i):(e.height=this.maxHeight,e.width=ph(o)+i),n.display&&this.ticks.length){const{first:t,last:r,widest:o,highest:i}=this._getLabelSizes(),s=2*n.padding,l=Fl(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(a){const t=n.mirror?0:u*o.width+c*i.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{const t=n.mirror?0:c*o.width+u*i.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,c)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){const{ticks:{align:o,padding:i},position:a}=this.options,s=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,d=0;s?l?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):"start"===o?d=t.width:"end"===o?u=e.width:"inner"!==o&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-a+i)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-c+i)*this.width/(this.width-c),0)}else{let n=t.height/2,r=e.height/2;"start"===o?(n=0,r=e.height):"end"===o&&(n=t.height,r=0),this.paddingTop=n+i,this.paddingBottom=r+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ul(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t<n;t++)rl(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let n=this.ticks;t<n.length&&(n=dh(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){const{ctx:r,_longestTextCache:o}=this,i=[],a=[],s=Math.floor(t/uh(t,n));let l,c,u,d,h,p,f,m,g,v,y,b=0,_=0;for(l=0;l<t;l+=s){if(d=e[l].label,h=this._resolveTickFontOptions(l),r.font=p=h.string,f=o[p]=o[p]||{data:{},gc:[]},m=h.lineHeight,g=v=0,rl(d)||ol(d)){if(ol(d))for(c=0,u=d.length;c<u;++c)y=d[c],rl(y)||ol(y)||(g=Ec(r,f.data,f.gc,g,y),v+=m)}else g=Ec(r,f.data,f.gc,g,d),v=m;i.push(g),a.push(v),b=Math.max(g,b),_=Math.max(v,_)}!function(e,t){dl(e,(e=>{const n=e.gc,r=n.length/2;let o;if(r>t){for(o=0;o<r;++o)delete e.data[n[o]];n.splice(0,r)}}))}(o,t);const x=i.indexOf(b),w=a.indexOf(_),S=e=>({width:i[e]||0,height:a[e]||0});return{first:S(0),last:S(t-1),widest:S(x),highest:S(w),widths:i,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return ql(this._alignToPixels?Pc(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const n=t[e];return n.$context||(n.$context=function(e,t,n){return Kc(e,{tick:n,index:t,type:"tick"})}(this.getContext(),e,n))}return this.$context||(this.$context=Kc(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const e=this.options.ticks,t=Fl(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),i=e.autoSkipPadding||0,a=o?o.widest.width+i:0,s=o?o.highest.height+i:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r<a*n?s/n:a/r}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,n=this.chart,r=this.options,{grid:o,position:i,border:a}=r,s=o.offset,l=this.isHorizontal(),c=this.ticks.length+(s?1:0),u=ph(o),d=[],h=a.setContext(this.getContext()),p=h.display?h.width:0,f=p/2,m=function(e){return Pc(n,e,p)};let g,v,y,b,_,x,w,S,k,C,E,M;if("top"===i)g=m(this.bottom),x=this.bottom-u,S=g-f,C=m(e.top)+f,M=e.bottom;else if("bottom"===i)g=m(this.top),C=e.top,M=m(e.bottom)-f,x=g+f,S=this.top+u;else if("left"===i)g=m(this.right),_=this.right-u,w=g-f,k=m(e.left)+f,E=e.right;else if("right"===i)g=m(this.left),k=e.left,E=m(e.right)-f,_=g+f,w=this.left+u;else if("x"===t){if("center"===i)g=m((e.top+e.bottom)/2+.5);else if(il(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}C=e.top,M=e.bottom,x=g+f,S=x+u}else if("y"===t){if("center"===i)g=m((e.left+e.right)/2);else if(il(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}_=g-f,w=_-u,k=e.left,E=e.right}const P=ll(r.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/P));for(v=0;v<c;v+=O){const e=this.getContext(v),t=o.setContext(e),r=a.setContext(e),i=t.lineWidth,c=t.color,u=r.dash||[],h=r.dashOffset,p=t.tickWidth,f=t.tickColor,m=t.tickBorderDash||[],g=t.tickBorderDashOffset;y=hh(this,v,s),void 0!==y&&(b=Pc(n,y,i),l?_=w=k=E=b:x=S=C=M=b,d.push({tx1:_,ty1:x,tx2:w,ty2:S,x1:k,y1:C,x2:E,y2:M,width:i,color:c,borderDash:u,borderDashOffset:h,tickWidth:p,tickColor:f,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,d}_computeLabelItems(e){const t=this.axis,n=this.options,{position:r,ticks:o}=n,i=this.isHorizontal(),a=this.ticks,{align:s,crossAlign:l,padding:c,mirror:u}=o,d=ph(n.grid),h=d+c,p=u?-c:h,f=-Fl(this.labelRotation),m=[];let g,v,y,b,_,x,w,S,k,C,E,M,P="middle";if("top"===r)x=this.bottom-p,w=this._getXAxisLabelAlignment();else if("bottom"===r)x=this.top+p,w=this._getXAxisLabelAlignment();else if("left"===r){const e=this._getYAxisLabelAlignment(d);w=e.textAlign,_=e.x}else if("right"===r){const e=this._getYAxisLabelAlignment(d);w=e.textAlign,_=e.x}else if("x"===t){if("center"===r)x=(e.top+e.bottom)/2+h;else if(il(r)){const e=Object.keys(r)[0],t=r[e];x=this.chart.scales[e].getPixelForValue(t)+h}w=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===r)_=(e.left+e.right)/2-h;else if(il(r)){const e=Object.keys(r)[0],t=r[e];_=this.chart.scales[e].getPixelForValue(t)}w=this._getYAxisLabelAlignment(d).textAlign}"y"===t&&("start"===s?P="top":"end"===s&&(P="bottom"));const O=this._getLabelSizes();for(g=0,v=a.length;g<v;++g){y=a[g],b=y.label;const e=o.setContext(this.getContext(g));S=this.getPixelForTick(g)+o.labelOffset,k=this._resolveTickFontOptions(g),C=k.lineHeight,E=ol(b)?b.length:1;const t=E/2,n=e.color,s=e.textStrokeColor,c=e.textStrokeWidth;let d,h=w;if(i?(_=S,"inner"===w&&(h=g===v-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),M="top"===r?"near"===l||0!==f?-E*C+C/2:"center"===l?-O.highest.height/2-t*C+C:-O.highest.height+C/2:"near"===l||0!==f?C/2:"center"===l?O.highest.height/2-t*C:O.highest.height-E*C,u&&(M*=-1),0===f||e.showLabelBackdrop||(_+=C/2*Math.sin(f))):(x=S,M=(1-E)*C/2),e.showLabelBackdrop){const t=Uc(e.backdropPadding),n=O.heights[g],r=O.widths[g];let o=M-t.top,i=0-t.left;switch(P){case"middle":o-=n/2;break;case"bottom":o-=n}switch(w){case"center":i-=r/2;break;case"right":i-=r;break;case"inner":g===v-1?i-=r:g>0&&(i-=r/2)}d={left:i,top:o,width:r+t.width,height:n+t.height,color:e.backdropColor}}m.push({label:b,font:k,textOffset:M,options:{rotation:f,color:n,strokeColor:s,strokeWidth:c,textAlign:h,textBaseline:P,translation:[_,x],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Fl(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,i=e+o,a=this._getLabelSizes().widest.width;let s,l;return"left"===t?r?(l=this.right+o,"near"===n?s="left":"center"===n?(s="center",l+=a/2):(s="right",l+=a)):(l=this.right-i,"near"===n?s="right":"center"===n?(s="center",l-=a/2):(s="left",l=this.left)):"right"===t?r?(l=this.left+o,"near"===n?s="right":"center"===n?(s="center",l-=a/2):(s="left",l-=a)):(l=this.left+i,"near"===n?s="left":"center"===n?(s="center",l+=a/2):(s="right",l=this.right)):s="right",{textAlign:s,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:o,height:i}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,o,i),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex((t=>t.value===e));if(n>=0){return t.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,i;const a=(e,t,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(o=0,i=r.length;o<i;++o){const e=r[o];t.drawOnChartArea&&a({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&a({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:n,grid:r}}=this,o=n.setContext(this.getContext()),i=n.display?o.width:0;if(!i)return;const a=r.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,c,u,d;this.isHorizontal()?(l=Pc(e,this.left,i)-i/2,c=Pc(e,this.right,a)+a/2,u=d=s):(u=Pc(e,this.top,i)-i/2,d=Pc(e,this.bottom,a)+a/2,l=c=s),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(l,u),t.lineTo(c,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,n=this._computeLabelArea();n&&Ac(t,n);const r=this.getLabelItems(e);for(const e of r){const n=e.options,r=e.font;Fc(t,e.label,0,e.textOffset,r,n)}n&&Lc(t)}drawTitle(){const{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;const o=Zc(n.font),i=Uc(n.padding),a=n.align;let s=o.lineHeight/2;"bottom"===t||"center"===t||il(t)?(s+=i.bottom,ol(n.text)&&(s+=o.lineHeight*(n.text.length-1))):s+=i.top;const{titleX:l,titleY:c,maxWidth:u,rotation:d}=function(e,t,n,r){const{top:o,left:i,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d,h,p,f=0;const m=a-o,g=s-i;if(e.isHorizontal()){if(h=oc(r,i,s),il(n)){const e=Object.keys(n)[0],r=n[e];p=u[e].getPixelForValue(r)+m-t}else p="center"===n?(c.bottom+c.top)/2+m-t:ch(e,n,t);d=s-i}else{if(il(n)){const e=Object.keys(n)[0],r=n[e];h=u[e].getPixelForValue(r)-g+t}else h="center"===n?(c.left+c.right)/2-g+t:ch(e,n,t);p=oc(r,a,o),f="left"===n?-Tl:Tl}return{titleX:h,titleY:p,maxWidth:d,rotation:f}}(this,s,t,a);Fc(e,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:d,textAlign:mh(a,t,r),textBaseline:"middle",translation:[l,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,n=ll(e.grid&&e.grid.z,-1),r=ll(e.border&&e.border.z,0);return this._isVisible()&&this.draw===gh.prototype.draw?[{z:n,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let o,i;for(o=0,i=t.length;o<i;++o){const i=t[o];i[n]!==this.id||e&&i.type!==e||r.push(i)}return r}_resolveTickFontOptions(e){return Zc(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class vh{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let n;(function(e){return"id"in e&&"defaults"in e})(t)&&(n=this.register(t));const r=this.items,o=e.id,i=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in r||(r[o]=e,function(e,t,n){const r=gl(Object.create(null),[n?Cc.get(n):{},Cc.get(t),e.defaults]);Cc.set(t,r),e.defaultRoutes&&function(e,t){Object.keys(t).forEach((n=>{const r=n.split("."),o=r.pop(),i=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Cc.route(i,o,l,s)}))}(t,e.defaultRoutes);e.descriptors&&Cc.describe(t,e.descriptors)}(e,i,n),this.override&&Cc.override(e.id,e.overrides)),i}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in Cc[r]&&(delete Cc[r][n],this.override&&delete _c[n])}}class yh{constructor(){this.controllers=new vh(sd,"datasets",!0),this.elements=new vh(ah,"elements"),this.plugins=new vh(Object,"plugins"),this.scales=new vh(gh,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,n){[...t].forEach((t=>{const r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):dl(t,(t=>{const r=n||this._getRegistryForType(t);this._exec(e,r,t)}))}))}_exec(e,t,n){const r=xl(e);ul(n["before"+r],[],n),t[e](n),ul(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){const r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+n+".");return r}}var bh=new yh;class _h{constructor(){this._init=[]}notify(e,t,n,r){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=r?this._descriptors(e).filter(r):this._descriptors(e),i=this._notify(o,e,t,n);return"afterDestroy"===t&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),i}_notify(e,t,n,r){r=r||{};for(const o of e){const e=o.plugin;if(!1===ul(e[n],[t,r,o.options],e)&&r.cancelable)return!1}return!0}invalidate(){rl(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const n=e&&e.config,r=ll(n.options&&n.options.plugins,{}),o=function(e){const t={},n=[],r=Object.keys(bh.plugins.items);for(let e=0;e<r.length;e++)n.push(bh.getPlugin(r[e]));const o=e.plugins||[];for(let e=0;e<o.length;e++){const r=o[e];-1===n.indexOf(r)&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}(n);return!1!==r||t?function(e,{plugins:t,localIds:n},r,o){const i=[],a=e.getContext();for(const s of t){const t=s.id,l=xh(r[t],o);null!==l&&i.push({plugin:s,options:wh(e.config,{plugin:s,local:n[t]},l,a)})}return i}(e,o,r,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}function xh(e,t){return t||!1!==e?!0===e?{}:e:null}function wh(e,{plugin:t,local:n},r,o){const i=e.pluginScopeKeys(t),a=e.getOptionScopes(r,i);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Sh(e,t){const n=Cc.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function kh(e){if("x"===e||"y"===e||"r"===e)return e}function Ch(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function Eh(e,...t){if(kh(e))return e;for(const n of t){const t=n.axis||Ch(n.position)||e.length>1&&kh(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Mh(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Ph(e,t){const n=_c[e.type]||{scales:{}},r=t.scales||{},o=Sh(e.type,t),i=Object.create(null);return Object.keys(r).forEach((t=>{const a=r[t];if(!il(a))return console.error(`Invalid scale configuration for scale: ${t}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const s=Eh(t,a,function(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter((t=>t.xAxisID===e||t.yAxisID===e));if(n.length)return Mh(e,"x",n[0])||Mh(e,"y",n[0])}return{}}(t,e),Cc.scales[a.type]),l=function(e,t){return e===t?"_index_":"_value_"}(s,o),c=n.scales||{};i[t]=vl(Object.create(null),[{axis:s},a,c[s],c[l]])})),e.data.datasets.forEach((n=>{const o=n.type||e.type,a=n.indexAxis||Sh(o,t),s=(_c[o]||{}).scales||{};Object.keys(s).forEach((e=>{const t=function(e,t){let n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,a),o=n[t+"AxisID"]||t;i[o]=i[o]||Object.create(null),vl(i[o],[{axis:t},r[o],s[e]])}))})),Object.keys(i).forEach((e=>{const t=i[e];vl(t,[Cc.scales[t.type],Cc.scale])})),i}function Oh(e){const t=e.options||(e.options={});t.plugins=ll(t.plugins,{}),t.scales=Ph(e,t)}function Th(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const Nh=new Map,Dh=new Set;function Ah(e,t){let n=Nh.get(e);return n||(n=t(),Nh.set(e,n),Dh.add(n)),n}const Lh=(e,t,n)=>{const r=_l(t,n);void 0!==r&&e.add(r)};class Ih{constructor(e){this._config=function(e){return(e=e||{}).data=Th(e.data),Oh(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Th(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Oh(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ah(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return Ah(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return Ah(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return Ah(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const n=this._scopeCache;let r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){const{options:r,type:o}=this,i=this._cachedScopes(e,n),a=i.get(t);if(a)return a;const s=new Set;t.forEach((t=>{e&&(s.add(e),t.forEach((t=>Lh(s,e,t)))),t.forEach((e=>Lh(s,r,e))),t.forEach((e=>Lh(s,_c[o]||{},e))),t.forEach((e=>Lh(s,Cc,e))),t.forEach((e=>Lh(s,xc,e)))}));const l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),Dh.has(t)&&i.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,_c[t]||{},Cc.datasets[t]||{},{type:t},Cc,xc]}resolveNamedOptions(e,t,n,r=[""]){const o={$shared:!0},{resolver:i,subPrefixes:a}=zh(this._resolverCache,e,r);let s=i;if(function(e,t){const{isScriptable:n,isIndexable:r}=eu(e);for(const o of t){const t=n(o),i=r(o),a=(i||t)&&e[o];if(t&&(Sl(a)||Rh(a))||i&&ol(a))return!0}return!1}(i,t)){o.$shared=!1;s=Qc(i,n=Sl(n)?n():n,this.createResolver(e,n,a))}for(const e of t)o[e]=s[e];return o}createResolver(e,t,n=[""],r){const{resolver:o}=zh(this._resolverCache,e,n);return il(t)?Qc(o,t,void 0,r):o}}function zh(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const o=n.join();let i=r.get(o);if(!i){i={resolver:Jc(t,n),subPrefixes:n.filter((e=>!e.toLowerCase().includes("hover")))},r.set(o,i)}return i}const Rh=e=>il(e)&&Object.getOwnPropertyNames(e).some((t=>Sl(e[t])));const $h=["top","bottom","left","right","chartArea"];function Fh(e,t){return"top"===e||"bottom"===e||-1===$h.indexOf(e)&&"x"===t}function jh(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Bh(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ul(n&&n.onComplete,[e],t)}function Hh(e){const t=e.chart,n=t.options.animation;ul(n&&n.onProgress,[e],t)}function Wh(e){return bu()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Vh={},Yh=e=>{const t=Wh(e);return Object.values(Vh).filter((e=>e.canvas===t)).pop()};function Xh(e,t,n){const r=Object.keys(e);for(const o of r){const r=+o;if(r>=t){const i=e[o];delete e[o],(n>0||r>t)&&(e[r+n]=i)}}}function qh(e,t,n){return e.options.clip?e[n]:t[n]}class Uh{static defaults=Cc;static instances=Vh;static overrides=_c;static registry=bh;static version="4.4.7";static getChart=Yh;static register(...e){bh.add(...e),Zh()}static unregister(...e){bh.remove(...e),Zh()}constructor(e,t){const n=this.config=new Ih(t),r=Wh(e),o=Yh(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const i=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(e){return!bu()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?Vd:ih}(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,i.aspectRatio),s=a&&a.canvas,l=s&&s.height,c=s&&s.width;this.id=nl(),this.ctx=a,this.canvas=s,this.width=c,this.height=l,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _h,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}((e=>this.update(e)),i.resizeDelay||0),this._dataChanges=[],Vh[this.id]=this,a&&s?(Yu.listen(this,"complete",Bh),Yu.listen(this,"progress",Hh),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:o}=this;return rl(e)?t&&o?o:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return bh}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Pu(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Oc(this.canvas,this.ctx),this}stop(){return Yu.stop(this),this}resize(e,t){Yu.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,e,t,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,Pu(this,a,!0)&&(this.notifyPlugins("resize",{size:i}),ul(n.onResize,[this,i],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){dl(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce(((e,t)=>(e[t]=!1,e)),{});let o=[];t&&(o=o.concat(Object.keys(t).map((e=>{const n=t[e],r=Eh(e,n),o="r"===r,i="x"===r;return{options:n,dposition:o?"chartArea":i?"bottom":"left",dtype:o?"radialLinear":i?"category":"linear"}})))),dl(o,(t=>{const o=t.options,i=o.id,a=Eh(i,o),s=ll(o.type,t.dtype);void 0!==o.position&&Fh(o.position,a)===Fh(t.dposition)||(o.position=t.dposition),r[i]=!0;let l=null;if(i in n&&n[i].type===s)l=n[i];else{l=new(bh.getScale(s))({id:i,type:s,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(o,e)})),dl(r,((e,t)=>{e||delete n[t]})),dl(n,(e=>{Hd.configure(this,e,e.options),Hd.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort(((e,t)=>e.index-t.index)),n>t){for(let e=t;e<n;++e)this._destroyDatasetMeta(e);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(jh("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach(((e,n)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){const r=t[n];let o=this.getDatasetMeta(n);const i=r.type||this.config.type;if(o.type&&o.type!==i&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=i,o.indexAxis=r.indexAxis||Sh(i,this.options),o.order=r.order||0,o.index=n,o.label=""+r.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const t=bh.getController(i),{datasetElementType:r,dataElementType:a}=Cc.datasets[i];Object.assign(t,{dataElementType:bh.getElement(a),datasetElementType:r&&bh.getElement(r)}),o.controller=new t(this,n),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){dl(this.data.datasets,((e,t)=>{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let e=0,t=this.data.datasets.length;e<t;e++){const{controller:t}=this.getDatasetMeta(e),n=!r&&-1===o.indexOf(t);t.buildOrUpdateElements(n),i=Math.max(+t.getMaxOverflow(),i)}i=this._minPadding=n.layout.autoPadding?i:0,this._updateLayout(i),r||dl(o,(e=>{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(jh("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){dl(this.scales,(e=>{Hd.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);kl(t,n)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:o}of t){Xh(e,r,"_removeElements"===n?-o:o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),r=n(0);for(let e=1;e<t;e++)if(!kl(r,n(e)))return;return Array.from(r).map((e=>e.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Hd.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],dl(this.boxes,(e=>{n&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,Sl(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Yu.has(this)?this.attached&&!Yu.running(this)&&Yu.start(this):(this.draw(),Bh({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,n=[];let r,o;for(r=0,o=t.length;r<o;++r){const o=t[r];e&&!o.visible||n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,r=!n.disabled,o=function(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:qh(n,t,"left"),right:qh(n,t,"right"),top:qh(r,t,"top"),bottom:qh(r,t,"bottom")}:t}(e,this.chartArea),i={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(r&&Ac(t,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?this.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?this.height:o.bottom+n.bottom}),e.controller.draw(),r&&Lc(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return Dc(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const o=Od.modes[t];return"function"==typeof o?o(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter((e=>e&&e._dataset===t)).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Kc(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"==typeof n.hidden?!n.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",o=this.getDatasetMeta(e),i=o.controller._resolveAnimations(void 0,r);wl(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),i.update(o,{visible:n}),this.update((t=>t.datasetIndex===e?r:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Yu.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Oc(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Vh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};dl(this.options.events,(e=>n(e,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},o=(e,t)=>{this.canvas&&this.resize(e,t)};let i;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",i)};i=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():i()}unbindEvents(){dl(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},dl(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let o,i,a,s;for("dataset"===t&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=e.length;a<s;++a){i=e[a];const t=i&&this.getDatasetMeta(i.datasetIndex).controller;t&&t[r+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],n=e.map((({datasetIndex:e,index:t})=>{const n=this.getDatasetMeta(e);if(!n)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:n.data[t],index:t}}));!hl(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return 1===this._plugins._cache.filter((t=>t.plugin.id===e)).length}_updateHoverStyles(e,t,n){const r=this.options.hover,o=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),i=o(t,e),a=n?e:o(e,t);i.length&&this.updateHoverStyle(i,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:o}=this,i=t,a=this._getActiveElements(e,r,n,i),s=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),l=function(e,t,n,r){return n&&"mouseout"!==e.type?r?t:e:null}(e,this._lastEvent,n,s);n&&(this._lastEvent=null,ul(o.onHover,[e,a,this],this),s&&ul(o.onClick,[e,a,this],this));const c=!hl(a,r);return(c||t)&&(this._active=a,this._updateHoverStyles(a,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if("mouseout"===e.type)return[];if(!n)return t;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,r)}}function Zh(){return dl(Uh.instances,(e=>e._plugins.invalidate()))}function Gh(e,t,n,r){const o=Yc(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const i=(n-t)/2,a=Math.min(i,r*t/2),s=e=>{const t=(n-Math.min(i,e))*r/2;return ql(e,0,Math.min(i,t))};return{outerStart:s(o.outerStart),outerEnd:s(o.outerEnd),innerStart:ql(o.innerStart,0,a),innerEnd:ql(o.innerEnd,0,a)}}function Kh(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Jh(e,t,n,r,o,i){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),h=u>0?u+r+n+c:0;let p=0;const f=o-l;if(r){const e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(f-(0!==e?f*e/(e+r):f))/2}const m=(f-Math.max(.001,f*d-n/Cl)/d)/2,g=l+m+p,v=o-m-p,{outerStart:y,outerEnd:b,innerStart:_,innerEnd:x}=Gh(t,h,d,v-g),w=d-y,S=d-b,k=g+y/w,C=v-b/S,E=h+_,M=h+x,P=g+_/E,O=v-x/M;if(e.beginPath(),i){const t=(k+C)/2;if(e.arc(a,s,d,k,t),e.arc(a,s,d,t,C),b>0){const t=Kh(S,C,a,s);e.arc(t.x,t.y,b,C,v+Tl)}const n=Kh(M,v,a,s);if(e.lineTo(n.x,n.y),x>0){const t=Kh(M,O,a,s);e.arc(t.x,t.y,x,v+Tl,O+Math.PI)}const r=(v-x/h+(g+_/h))/2;if(e.arc(a,s,h,v-x/h,r,!0),e.arc(a,s,h,r,g+_/h,!0),_>0){const t=Kh(E,P,a,s);e.arc(t.x,t.y,_,P+Math.PI,g-Tl)}const o=Kh(w,g,a,s);if(e.lineTo(o.x,o.y),y>0){const t=Kh(w,k,a,s);e.arc(t.x,t.y,y,g-Tl,k)}}else{e.moveTo(a,s);const t=Math.cos(k)*d+a,n=Math.sin(k)*d+s;e.lineTo(t,n);const r=Math.cos(C)*d+a,o=Math.sin(C)*d+s;e.lineTo(r,o)}e.closePath()}function Qh(e,t,n,r,o){const{fullCircles:i,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,p="inner"===l.borderAlign;if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=h,p?(e.lineWidth=2*c,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let f=t.endAngle;if(i){Jh(e,t,n,r,f,o);for(let t=0;t<i;++t)e.stroke();isNaN(s)||(f=a+(s%El||El))}p&&function(e,t,n){const{startAngle:r,pixelMargin:o,x:i,y:a,outerRadius:s,innerRadius:l}=t;let c=o/s;e.beginPath(),e.arc(i,a,s,r-c,n+c),l>o?(c=o/l,e.arc(i,a,l,n+c,r-c,!0)):e.arc(i,a,o,n+Tl,r-Tl),e.closePath(),e.clip()}(e,t,f),i||(Jh(e,t,n,r,f,o),e.stroke())}function ep(e,t,n=t){e.lineCap=ll(n.borderCapStyle,t.borderCapStyle),e.setLineDash(ll(n.borderDash,t.borderDash)),e.lineDashOffset=ll(n.borderDashOffset,t.borderDashOffset),e.lineJoin=ll(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=ll(n.borderWidth,t.borderWidth),e.strokeStyle=ll(n.borderColor,t.borderColor)}function tp(e,t,n){e.lineTo(n.x,n.y)}function np(e,t,n={}){const r=e.length,{start:o=0,end:i=r-1}=n,{start:a,end:s}=t,l=Math.max(o,a),c=Math.min(i,s),u=o<a&&i<a||o>s&&i>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function rp(e,t,n,r){const{points:o,options:i}=t,{count:a,start:s,loop:l,ilen:c}=np(o,n,r),u=function(e){return e.stepped?Ic:e.tension||"monotone"===e.cubicInterpolationMode?zc:tp}(i);let d,h,p,{move:f=!0,reverse:m}=r||{};for(d=0;d<=c;++d)h=o[(s+(m?c-d:d))%a],h.skip||(f?(e.moveTo(h.x,h.y),f=!1):u(e,p,h,m,i.stepped),p=h);return l&&(h=o[(s+(m?c:0))%a],u(e,p,h,m,i.stepped)),!!l}function op(e,t,n,r){const o=t.points,{count:i,start:a,ilen:s}=np(o,n,r),{move:l=!0,reverse:c}=r||{};let u,d,h,p,f,m,g=0,v=0;const y=e=>(a+(c?s-e:e))%i,b=()=>{p!==f&&(e.lineTo(g,f),e.lineTo(g,p),e.lineTo(g,m))};for(l&&(d=o[y(0)],e.moveTo(d.x,d.y)),u=0;u<=s;++u){if(d=o[y(u)],d.skip)continue;const t=d.x,n=d.y,r=0|t;r===h?(n<p?p=n:n>f&&(f=n),g=(v*g+t)/++v):(b(),e.lineTo(t,n),h=r,v=0,p=f=n),m=n}b()}function ip(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!(e._decimated||e._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||n)?op:rp}const ap="function"==typeof Path2D;function sp(e,t,n,r){ap&&!t.options.segment?function(e,t,n,r){let o=t._path;o||(o=t._path=new Path2D,t.path(o,n,r)&&o.closePath()),ep(e,t.options),e.stroke(o)}(e,t,n,r):function(e,t,n,r){const{segments:o,options:i}=t,a=ip(t);for(const s of o)ep(e,i,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}(e,t,n,r)}class lp extends ah{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;yu(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const n=e.points,r=e.options.spanGaps,o=n.length;if(!o)return[];const i=!!e._loop,{start:a,end:s}=function(e,t,n,r){let o=0,i=t-1;if(n&&!r)for(;o<t&&!e[o].skip;)o++;for(;o<t&&e[o].skip;)o++;for(o%=t,n&&(i+=o);i>o&&e[i%t].skip;)i--;return i%=t,{start:o,end:i}}(n,o,i,r);return Bu(e,!0===r?[{start:a,end:s,loop:i}]:function(e,t,n,r){const o=e.length,i=[];let a,s=t,l=e[t];for(a=t+1;a<=n;++a){const n=e[a%o];n.skip||n.stop?l.skip||(r=!1,i.push({start:t%o,end:(a-1)%o,loop:r}),t=s=n.stop?a:null):(s=a,l.skip&&(t=a)),l=n}return null!==s&&i.push({start:t%o,end:s%o,loop:r}),i}(n,a,s<a?s+o:s,!!e._fullLoop&&0===a&&s===o-1),n,t)}(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){const n=this.options,r=e[t],o=this.points,i=ju(this,{property:t,start:r,end:r});if(!i.length)return;const a=[],s=function(e){return e.stepped?Du:e.tension||"monotone"===e.cubicInterpolationMode?Au:Nu}(n);let l,c;for(l=0,c=i.length;l<c;++l){const{start:c,end:u}=i[l],d=o[c],h=o[u];if(d===h){a.push(d);continue}const p=s(d,h,Math.abs((r-d[t])/(h[t]-d[t])),n.stepped);p[t]=e[t],a.push(p)}return 1===a.length?a[0]:a}pathSegment(e,t,n){return ip(this)(e,this,t,n)}path(e,t,n){const r=this.segments,o=ip(this);let i=this._loop;t=t||0,n=n||this.points.length-t;for(const a of r)i&=o(e,this,a,{start:t,end:t+n-1});return!!i}draw(e,t,n,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),sp(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function cp(e,t,n,r){const o=e.options,{[n]:i}=e.getProps([n],r);return Math.abs(t-i)<o.radius+o.hitRadius}function up(e,t){const{x:n,y:r,base:o,width:i,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,o),l=Math.max(n,o),c=r-d,u=r+d):(d=i/2,s=n-d,l=n+d,c=Math.min(r,o),u=Math.max(r,o)),{left:s,top:c,right:l,bottom:u}}function dp(e,t,n,r){return e?0:ql(t,n,r)}function hp(e){const t=up(e),n=t.right-t.left,r=t.bottom-t.top,o=function(e,t,n){const r=e.options.borderWidth,o=e.borderSkipped,i=Xc(r);return{t:dp(o.top,i.top,0,n),r:dp(o.right,i.right,0,t),b:dp(o.bottom,i.bottom,0,n),l:dp(o.left,i.left,0,t)}}(e,n/2,r/2),i=function(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),o=e.options.borderRadius,i=qc(o),a=Math.min(t,n),s=e.borderSkipped,l=r||il(o);return{topLeft:dp(!l||s.top||s.left,i.topLeft,0,a),topRight:dp(!l||s.top||s.right,i.topRight,0,a),bottomLeft:dp(!l||s.bottom||s.left,i.bottomLeft,0,a),bottomRight:dp(!l||s.bottom||s.right,i.bottomRight,0,a)}}(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,i.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(o.b,o.r))}}}}function pp(e,t,n,r){const o=null===t,i=null===n,a=e&&!(o&&i)&&up(e,r);return a&&(o||Ul(t,a.left,a.right))&&(i||Ul(n,a.top,a.bottom))}function fp(e,t){e.rect(t.x,t.y,t.w,t.h)}function mp(e,t,n={}){const r=e.x!==n.x?-t:0,o=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-o;return{x:e.x+r,y:e.y+o,w:e.w+i,h:e.h+a,radius:e.radius}}class gp extends ah{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:n,backgroundColor:r}}=this,{inner:o,outer:i}=hp(this),a=(s=i.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?jc:fp;var s;e.save(),i.w===o.w&&i.h===o.h||(e.beginPath(),a(e,mp(i,t,o)),e.clip(),a(e,mp(o,-t,i)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),a(e,mp(o,t)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,t,n){return pp(this,e,t,n)}inXRange(e,t){return pp(this,e,null,t)}inYRange(e,t){return pp(this,null,e,t)}getCenterPoint(e){const{x:t,y:n,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+r)/2:t,y:o?n:(n+r)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}var vp=Object.freeze({__proto__:null,ArcElement:class extends ah{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.getProps(["x","y"],n),{angle:o,distance:i}=Hl(r,{x:e,y:t}),{startAngle:a,endAngle:s,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,h=ll(u,s-a),p=Xl(o,a,s)&&a!==s,f=h>=El||p,m=Ul(i,l+d,c+d);return f&&m}getCenterPoint(e){const{x:t,y:n,startAngle:r,endAngle:o,innerRadius:i,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:s,spacing:l}=this.options,c=(r+o)/2,u=(i+a+l+s)/2;return{x:t+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:n}=this,r=(t.offset||0)/4,o=(t.spacing||0)/2,i=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>El?Math.floor(n/El):0,0===n||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r);const s=r*(1-Math.sin(Math.min(Cl,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,o){const{fullCircles:i,startAngle:a,circumference:s}=t;let l=t.endAngle;if(i){Jh(e,t,n,r,l,o);for(let t=0;t<i;++t)e.fill();isNaN(s)||(l=a+(s%El||El))}Jh(e,t,n,r,l,o),e.fill()}(e,this,s,o,i),Qh(e,this,s,o,i),e.restore()}},BarElement:gp,LineElement:lp,PointElement:class extends ah{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.options,{x:o,y:i}=this.getProps(["x","y"],n);return Math.pow(e-o,2)+Math.pow(t-i,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,t){return cp(this,e,"x",t)}inYRange(e,t){return cp(this,e,"y",t)}getCenterPoint(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}size(e){let t=(e=e||this.options||{}).radius||0;t=Math.max(t,t&&e.hoverRadius||0);return 2*(t+(t&&e.borderWidth||0))}draw(e,t){const n=this.options;this.skip||n.radius<.1||!Dc(this,t,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,Tc(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}});const yp=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],bp=yp.map((e=>e.replace("rgb(","rgba(").replace(")",", 0.5)")));function _p(e){return yp[e%yp.length]}function xp(e){return bp[e%bp.length]}function wp(e){let t=0;return(n,r)=>{const o=e.getDatasetMeta(r).controller;o instanceof vd?t=function(e,t){return e.backgroundColor=e.data.map((()=>_p(t++))),t}(n,t):o instanceof yd?t=function(e,t){return e.backgroundColor=e.data.map((()=>xp(t++))),t}(n,t):o&&(t=function(e,t){return e.borderColor=_p(t),e.backgroundColor=xp(t),++t}(n,t))}}function Sp(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}var kp={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:o}=e.config,{elements:i}=o,a=Sp(r)||(s=o)&&(s.borderColor||s.backgroundColor)||i&&Sp(i)||"rgba(0,0,0,0.1)"!==Cc.borderColor||"rgba(0,0,0,0.1)"!==Cc.backgroundColor;var s;if(!n.forceOverride&&a)return;const l=wp(e);r.forEach(l)}};function Cp(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ep(e){e.data.datasets.forEach((e=>{Cp(e)}))}var Mp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled)return void Ep(e);const r=e.width;e.data.datasets.forEach(((t,o)=>{const{_data:i,indexAxis:a}=t,s=e.getDatasetMeta(o),l=i||t.data;if("y"===Gc([a,e.options.indexAxis]))return;if(!s.controller.supportsDecimation)return;const c=e.scales[s.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(e.options.parsing)return;let{start:u,count:d}=function(e,t){const n=t.length;let r,o=0;const{iScale:i}=e,{min:a,max:s,minDefined:l,maxDefined:c}=i.getUserBounds();return l&&(o=ql(Gl(t,i.axis,a).lo,0,n-1)),r=c?ql(Gl(t,i.axis,s).hi+1,o,n)-o:n-o,{start:o,count:r}}(s,l);if(d<=(n.threshold||4*r))return void Cp(t);let h;switch(rl(i)&&(t._data=l,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}})),n.algorithm){case"lttb":h=function(e,t,n,r,o){const i=o.samples||r;if(i>=n)return e.slice(t,t+n);const a=[],s=(n-2)/(i-2);let l=0;const c=t+n-1;let u,d,h,p,f,m=t;for(a[l++]=e[m],u=0;u<i-2;u++){let r,o=0,i=0;const c=Math.floor((u+1)*s)+1+t,g=Math.min(Math.floor((u+2)*s)+1,n)+t,v=g-c;for(r=c;r<g;r++)o+=e[r].x,i+=e[r].y;o/=v,i/=v;const y=Math.floor(u*s)+1+t,b=Math.min(Math.floor((u+1)*s)+1,n)+t,{x:_,y:x}=e[m];for(h=p=-1,r=y;r<b;r++)p=.5*Math.abs((_-o)*(e[r].y-x)-(_-e[r].x)*(i-x)),p>h&&(h=p,d=e[r],f=r);a[l++]=d,m=f}return a[l++]=e[c],a}(l,u,d,r,n);break;case"min-max":h=function(e,t,n,r){let o,i,a,s,l,c,u,d,h,p,f=0,m=0;const g=[],v=t+n-1,y=e[t].x,b=e[v].x-y;for(o=t;o<t+n;++o){i=e[o],a=(i.x-y)/b*r,s=i.y;const t=0|a;if(t===l)s<h?(h=s,c=o):s>p&&(p=s,u=o),f=(m*f+i.x)/++m;else{const n=o-1;if(!rl(c)&&!rl(u)){const t=Math.min(c,u),r=Math.max(c,u);t!==d&&t!==n&&g.push({...e[t],x:f}),r!==d&&r!==n&&g.push({...e[r],x:f})}o>0&&n!==d&&g.push(e[n]),g.push(i),l=t,m=0,h=p=s,c=u=d=o}}return g}(l,u,d,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}t._decimated=h}))},destroy(e){Ep(e)}};function Pp(e,t,n,r){if(r)return;let o=t[e],i=n[e];return"angle"===e&&(o=Yl(o),i=Yl(i)),{property:e,start:o,end:i}}function Op(e,t,n){for(;t>e;t--){const e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function Tp(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Np(e,t){let n=[],r=!1;return ol(e)?(r=!0,n=e):n=function(e,t){const{x:n=null,y:r=null}=e||{},o=t.points,i=[];return t.segments.forEach((({start:e,end:t})=>{t=Op(e,t,o);const a=o[e],s=o[t];null!==r?(i.push({x:a.x,y:r}),i.push({x:s.x,y:r})):null!==n&&(i.push({x:n,y:a.y}),i.push({x:n,y:s.y}))})),i}(e,t),n.length?new lp({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Dp(e){return e&&!1!==e.fill}function Ap(e,t,n){let r=e[t].fill;const o=[t];let i;if(!n)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!al(r))return r;if(i=e[r],!i)return!1;if(i.visible)return r;o.push(r),r=i.fill}return!1}function Lp(e,t,n){const r=function(e){const t=e.options,n=t.fill;let r=ll(n&&n.target,n);void 0===r&&(r=!!t.backgroundColor);if(!1===r||null===r)return!1;if(!0===r)return"origin";return r}(e);if(il(r))return!isNaN(r.value)&&r;let o=parseFloat(r);return al(o)&&Math.floor(o)===o?function(e,t,n,r){"-"!==e&&"+"!==e||(n=t+n);if(n===t||n<0||n>=r)return!1;return n}(r[0],t,o,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Ip(e,t,n){const r=[];for(let o=0;o<n.length;o++){const i=n[o],{first:a,last:s,point:l}=zp(i,t,"x");if(!(!l||a&&s))if(a)r.unshift(l);else if(e.push(l),!s)break}e.push(...r)}function zp(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const o=r[n],i=e.segments,a=e.points;let s=!1,l=!1;for(let e=0;e<i.length;e++){const t=i[e],r=a[t.start][n],c=a[t.end][n];if(Ul(o,r,c)){s=o===r,l=o===c;break}}return{first:s,last:l,point:r}}class Rp{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){const{x:r,y:o,radius:i}=this;return t=t||{start:0,end:El},e.arc(r,o,i,t.end,t.start,!0),!n.bounds}interpolate(e){const{x:t,y:n,radius:r}=this,o=e.angle;return{x:t+Math.cos(o)*r,y:n+Math.sin(o)*r,angle:o}}}function $p(e){const{chart:t,fill:n,line:r}=e;if(al(n))return function(e,t){const n=e.getDatasetMeta(t),r=n&&e.isDatasetVisible(t);return r?n.dataset:null}(t,n);if("stack"===n)return function(e){const{scale:t,index:n,line:r}=e,o=[],i=r.segments,a=r.points,s=function(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let e=0;e<r.length;e++){const o=r[e];if(o.index===t)break;o.hidden||n.unshift(o.dataset)}return n}(t,n);s.push(Np({x:null,y:t.bottom},r));for(let e=0;e<i.length;e++){const t=i[e];for(let e=t.start;e<=t.end;e++)Ip(o,a[e],s)}return new lp({points:o,options:{}})}(e);if("shape"===n)return!0;const o=function(e){const t=e.scale||{};if(t.getPointPositionForValue)return function(e){const{scale:t,fill:n}=e,r=t.options,o=t.getLabels().length,i=r.reverse?t.max:t.min,a=function(e,t,n){let r;return r="start"===e?n:"end"===e?t.options.reverse?t.min:t.max:il(e)?e.value:t.getBaseValue(),r}(n,t,i),s=[];if(r.grid.circular){const e=t.getPointPositionForValue(0,i);return new Rp({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(a)})}for(let e=0;e<o;++e)s.push(t.getPointPositionForValue(e,a));return s}(e);return function(e){const{scale:t={},fill:n}=e,r=function(e,t){let n=null;return"start"===e?n=t.bottom:"end"===e?n=t.top:il(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}(n,t);if(al(r)){const e=t.isHorizontal();return{x:e?r:null,y:e?null:r}}return null}(e)}(e);return o instanceof Rp?o:Np(o,r)}function Fp(e,t,n){const r=$p(t),{line:o,scale:i,axis:a}=t,s=o.options,l=s.fill,c=s.backgroundColor,{above:u=c,below:d=c}=l||{};r&&o.points.length&&(Ac(e,n),function(e,t){const{line:n,target:r,above:o,below:i,area:a,scale:s}=t,l=n._loop?"angle":t.axis;e.save(),"x"===l&&i!==o&&(jp(e,r,a.top),Bp(e,{line:n,target:r,color:o,scale:s,property:l}),e.restore(),e.save(),jp(e,r,a.bottom));Bp(e,{line:n,target:r,color:i,scale:s,property:l}),e.restore()}(e,{line:o,target:r,above:u,below:d,area:n,scale:i,axis:a}),Lc(e))}function jp(e,t,n){const{segments:r,points:o}=t;let i=!0,a=!1;e.beginPath();for(const s of r){const{start:r,end:l}=s,c=o[r],u=o[Op(r,l,o)];i?(e.moveTo(c.x,c.y),i=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.y)),a=!!t.pathSegment(e,s,{move:a}),a?e.closePath():e.lineTo(u.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Bp(e,t){const{line:n,target:r,property:o,color:i,scale:a}=t,s=function(e,t,n){const r=e.segments,o=e.points,i=t.points,a=[];for(const e of r){let{start:r,end:s}=e;s=Op(r,s,o);const l=Pp(n,o[r],o[s],e.loop);if(!t.segments){a.push({source:e,target:l,start:o[r],end:o[s]});continue}const c=ju(t,l);for(const t of c){const r=Pp(n,i[t.start],i[t.end],t.loop),s=Fu(e,o,r);for(const e of s)a.push({source:e,target:t,start:{[n]:Tp(l,r,"start",Math.max)},end:{[n]:Tp(l,r,"end",Math.min)}})}}return a}(n,r,o);for(const{source:t,target:l,start:c,end:u}of s){const{style:{backgroundColor:s=i}={}}=t,d=!0!==r;e.save(),e.fillStyle=s,Hp(e,a,d&&Pp(o,c,u)),e.beginPath();const h=!!n.pathSegment(e,t);let p;if(d){h?e.closePath():Wp(e,r,u,o);const t=!!r.pathSegment(e,l,{move:h,reverse:!0});p=h&&t,p||Wp(e,r,c,o)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function Hp(e,t,n){const{top:r,bottom:o}=t.chart.chartArea,{property:i,start:a,end:s}=n||{};"x"===i&&(e.beginPath(),e.rect(a,r,s-a,o-r),e.clip())}function Wp(e,t,n,r){const o=t.interpolate(n,r);o&&e.lineTo(o.x,o.y)}var Vp={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,o=[];let i,a,s,l;for(a=0;a<r;++a)i=e.getDatasetMeta(a),s=i.dataset,l=null,s&&s.options&&s instanceof lp&&(l={visible:e.isDatasetVisible(a),index:a,fill:Lp(s,a,r),chart:e,axis:i.controller.options.indexAxis,scale:i.vScale,line:s}),i.$filler=l,o.push(l);for(a=0;a<r;++a)l=o[a],l&&!1!==l.fill&&(l.fill=Ap(o,a,n.propagate))},beforeDraw(e,t,n){const r="beforeDraw"===n.drawTime,o=e.getSortedVisibleDatasetMetas(),i=e.chartArea;for(let t=o.length-1;t>=0;--t){const n=o[t].$filler;n&&(n.line.updateControlPoints(i,n.axis),r&&n.fill&&Fp(e.ctx,n,i))}},beforeDatasetsDraw(e,t,n){if("beforeDatasetsDraw"!==n.drawTime)return;const r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){const n=r[t].$filler;Dp(n)&&Fp(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;Dp(r)&&"beforeDatasetDraw"===n.drawTime&&Fp(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Yp=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}};class Xp extends ah{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=ul(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,n)=>e.sort(t,n,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const n=e.labels,r=Zc(n.font),o=r.size,i=this._computeTitleHeight(),{boxWidth:a,itemHeight:s}=Yp(n,o);let l,c;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(i,o,a,s)+10):(c=this.maxHeight,l=this._fitCols(i,r,a,s)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){const{ctx:o,maxWidth:i,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+a;let u=e;o.textAlign="left",o.textBaseline="middle";let d=-1,h=-c;return this.legendItems.forEach(((e,p)=>{const f=n+t/2+o.measureText(e.text).width;(0===p||l[l.length-1]+f+2*a>i)&&(u+=c,l[l.length-(p>0?0:1)]=0,h+=c,d++),s[p]={left:0,top:h,row:d,width:f,height:r},l[l.length-1]+=f+a})),u}_fitCols(e,t,n,r){const{ctx:o,maxHeight:i,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],c=i-e;let u=a,d=0,h=0,p=0,f=0;return this.legendItems.forEach(((e,i)=>{const{itemWidth:m,itemHeight:g}=function(e,t,n,r,o){const i=function(e,t,n,r){let o=e.text;o&&"string"!=typeof o&&(o=o.reduce(((e,t)=>e.length>t.length?e:t)));return t+n.size/2+r.measureText(o).width}(r,e,t,n),a=function(e,t,n){let r=e;"string"!=typeof t.text&&(r=qp(t,n));return r}(o,r,t.lineHeight);return{itemWidth:i,itemHeight:a}}(n,t,o,e,r);i>0&&h+g+2*a>c&&(u+=d+a,l.push({width:d,height:h}),p+=d+a,f++,d=h=0),s[i]={left:p,top:h,col:f,width:m,height:g},d=Math.max(d,m),h+=g+a})),u+=d,l.push({width:d,height:h}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:o}}=this,i=Lu(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=oc(n,this.left+r,this.right-this.lineWidths[o]);for(const s of t)o!==s.row&&(o=s.row,a=oc(n,this.left+r,this.right-this.lineWidths[o])),s.top+=this.top+e+r,s.left=i.leftForLtr(i.x(a),s.width),a+=s.width+r}else{let o=0,a=oc(n,this.top+e+r,this.bottom-this.columnSizes[o].height);for(const s of t)s.col!==o&&(o=s.col,a=oc(n,this.top+e+r,this.bottom-this.columnSizes[o].height)),s.top=a,s.left+=this.left+r,s.left=i.leftForLtr(i.x(s.left),s.width),a+=s.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;Ac(e,this),this._draw(),Lc(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:o,labels:i}=e,a=Cc.color,s=Lu(e.rtl,this.left,this.width),l=Zc(i.font),{padding:c}=i,u=l.size,d=u/2;let h;this.drawTitle(),r.textAlign=s.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:p,boxHeight:f,itemHeight:m}=Yp(i,u),g=this.isHorizontal(),v=this._computeTitleHeight();h=g?{x:oc(o,this.left+c,this.right-n[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:oc(o,this.top+v+c,this.bottom-t[0].height),line:0},Iu(this.ctx,e.textDirection);const y=m+c;this.legendItems.forEach(((b,_)=>{r.strokeStyle=b.fontColor,r.fillStyle=b.fontColor;const x=r.measureText(b.text).width,w=s.textAlign(b.textAlign||(b.textAlign=i.textAlign)),S=p+d+x;let k=h.x,C=h.y;s.setWidth(this.width),g?_>0&&k+S+c>this.right&&(C=h.y+=y,h.line++,k=h.x=oc(o,this.left+c,this.right-n[h.line])):_>0&&C+y>this.bottom&&(k=h.x=k+t[h.line].width+c,h.line++,C=h.y=oc(o,this.top+v+c,this.bottom-t[h.line].height));if(function(e,t,n){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;r.save();const o=ll(n.lineWidth,1);if(r.fillStyle=ll(n.fillStyle,a),r.lineCap=ll(n.lineCap,"butt"),r.lineDashOffset=ll(n.lineDashOffset,0),r.lineJoin=ll(n.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=ll(n.strokeStyle,a),r.setLineDash(ll(n.lineDash,[])),i.usePointStyle){const a={radius:f*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},l=s.xPlus(e,p/2);Nc(r,a,l,t+d,i.pointStyleWidth&&p)}else{const i=t+Math.max((u-f)/2,0),a=s.leftForLtr(e,p),l=qc(n.borderRadius);r.beginPath(),Object.values(l).some((e=>0!==e))?jc(r,{x:a,y:i,w:p,h:f,radius:l}):r.rect(a,i,p,f),r.fill(),0!==o&&r.stroke()}r.restore()}(s.x(k),C,b),k=((e,t,n,r)=>e===(r?"left":"right")?n:"center"===e?(t+n)/2:t)(w,k+p+d,g?k+S:this.right,e.rtl),function(e,t,n){Fc(r,n.text,e,t+m/2,l,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})}(s.x(k),C,b),g)h.x+=S+c;else if("string"!=typeof b.text){const e=l.lineHeight;h.y+=qp(b,e)+c}else h.y+=y})),zu(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=Zc(t.font),r=Uc(t.padding);if(!t.display)return;const o=Lu(e.rtl,this.left,this.width),i=this.ctx,a=t.position,s=n.size/2,l=r.top+s;let c,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),c=this.top+l,u=oc(e.align,u,this.right-d);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);c=l+oc(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const h=oc(a,u,u+d);i.textAlign=o.textAlign(rc(a)),i.textBaseline="middle",i.strokeStyle=t.color,i.fillStyle=t.color,i.font=n.string,Fc(i,t.text,h,c,n)}_computeTitleHeight(){const e=this.options.title,t=Zc(e.font),n=Uc(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,o;if(Ul(e,this.left,this.right)&&Ul(t,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(r=o[n],Ul(e,r.left,r.left+r.width)&&Ul(t,r.top,r.top+r.height))return this.legendItems[n];return null}handleEvent(e){const t=this.options;if(!function(e,t){if(("mousemove"===e||"mouseout"===e)&&(t.onHover||t.onLeave))return!0;if(t.onClick&&("click"===e||"mouseup"===e))return!0;return!1}(e.type,t))return;const n=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const r=this._hoveredItem,o=((e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index)(r,n);r&&!o&&ul(t.onLeave,[e,r,this],this),this._hoveredItem=n,n&&!o&&ul(t.onHover,[e,n,this],this)}else n&&ul(t.onClick,[e,n,this],this)}}function qp(e,t){return t*(e.text?e.text.length:0)}var Up={id:"legend",_element:Xp,start(e,t,n){const r=e.legend=new Xp({ctx:e.ctx,options:n,chart:e});Hd.configure(e,r,n),Hd.addBox(e,r)},stop(e){Hd.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Hd.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,o=n.chart;o.isDatasetVisible(r)?(o.hide(r),t.hidden=!0):(o.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:i,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const l=e.controller.getStyle(n?0:void 0),c=Uc(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:i,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:o||l.textAlign,borderRadius:a&&(s||l.borderRadius),datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Zp extends ah{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const r=ol(n.text)?n.text.length:1;this._padding=Uc(n.padding);const o=r*Zc(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:n,bottom:r,right:o,options:i}=this,a=i.align;let s,l,c,u=0;return this.isHorizontal()?(l=oc(a,n,o),c=t+e,s=o-n):("left"===i.position?(l=n+e,c=oc(a,r,t),u=-.5*Cl):(l=o-e,c=oc(a,t,r),u=.5*Cl),s=r-t),{titleX:l,titleY:c,maxWidth:s,rotation:u}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const n=Zc(t.font),r=n.lineHeight/2+this._padding.top,{titleX:o,titleY:i,maxWidth:a,rotation:s}=this._drawArgs(r);Fc(e,t.text,0,0,n,{color:t.color,maxWidth:a,rotation:s,textAlign:rc(t.align),textBaseline:"middle",translation:[o,i]})}}var Gp={id:"title",_element:Zp,start(e,t,n){!function(e,t){const n=new Zp({ctx:e.ctx,options:t,chart:e});Hd.configure(e,n,t),Hd.addBox(e,n),e.titleBlock=n}(e,n)},stop(e){const t=e.titleBlock;Hd.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Hd.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Kp=new WeakMap;var Jp={id:"subtitle",start(e,t,n){const r=new Zp({ctx:e.ctx,options:n,chart:e});Hd.configure(e,r,n),Hd.addBox(e,r),Kp.set(e,r)},stop(e){Hd.removeBox(e,Kp.get(e)),Kp.delete(e)},beforeUpdate(e,t,n){const r=Kp.get(e);Hd.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Qp={average(e){if(!e.length)return!1;let t,n,r=new Set,o=0,i=0;for(t=0,n=e.length;t<n;++t){const n=e[t].element;if(n&&n.hasValue()){const e=n.tooltipPosition();r.add(e.x),o+=e.y,++i}}if(0===i||0===r.size)return!1;const a=[...r].reduce(((e,t)=>e+t))/r.size;return{x:a,y:o/i}},nearest(e,t){if(!e.length)return!1;let n,r,o,i=t.x,a=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){const r=e[n].element;if(r&&r.hasValue()){const e=Wl(t,r.getCenterPoint());e<s&&(s=e,o=r)}}if(o){const e=o.tooltipPosition();i=e.x,a=e.y}return{x:i,y:a}}};function ef(e,t){return t&&(ol(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function tf(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function nf(e,t){const{element:n,datasetIndex:r,index:o}=t,i=e.getDatasetMeta(r).controller,{label:a,value:s}=i.getLabelAndValue(o);return{chart:e,label:a,parsed:i.getParsed(o),raw:e.data.datasets[r].data[o],formattedValue:s,dataset:i.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function rf(e,t){const n=e.chart.ctx,{body:r,footer:o,title:i}=e,{boxWidth:a,boxHeight:s}=t,l=Zc(t.bodyFont),c=Zc(t.titleFont),u=Zc(t.footerFont),d=i.length,h=o.length,p=r.length,f=Uc(t.padding);let m=f.height,g=0,v=r.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){m+=p*(t.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(v-p)*l.lineHeight+(v-1)*t.bodySpacing}h&&(m+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let y=0;const b=function(e){g=Math.max(g,n.measureText(e).width+y)};return n.save(),n.font=c.string,dl(e.title,b),n.font=l.string,dl(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?a+2+t.boxPadding:0,dl(r,(e=>{dl(e.before,b),dl(e.lines,b),dl(e.after,b)})),y=0,n.font=u.string,dl(e.footer,b),n.restore(),g+=f.width,{width:g,height:m}}function of(e,t,n,r){const{x:o,width:i}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return"center"===r?c=o<=(s+l)/2?"left":"right":o<=i/2?c="left":o>=a-i/2&&(c="right"),function(e,t,n,r){const{x:o,width:i}=r,a=n.caretSize+n.caretPadding;return"left"===e&&o+i+a>t.width||"right"===e&&o-i-a<0||void 0}(c,e,t,n)&&(c="center"),c}function af(e,t,n){const r=n.yAlign||t.yAlign||function(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}(e,n);return{xAlign:n.xAlign||t.xAlign||of(e,t,n,r),yAlign:r}}function sf(e,t,n,r){const{caretSize:o,caretPadding:i,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=o+i,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=qc(a);let f=function(e,t){let{x:n,width:r}=e;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,s);const m=function(e,t,n){let{y:r,height:o}=e;return"top"===t?r+=n:r-="bottom"===t?o+n:o/2,r}(t,l,c);return"center"===l?"left"===s?f+=c:"right"===s&&(f-=c):"left"===s?f-=Math.max(u,h)+o:"right"===s&&(f+=Math.max(d,p)+o),{x:ql(f,0,r.width-t.width),y:ql(m,0,r.height-t.height)}}function lf(e,t,n){const r=Uc(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function cf(e){return ef([],tf(e))}function uf(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const df={beforeTitle:tl,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:tl,beforeBody:tl,beforeLabel:tl,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return rl(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:tl,afterBody:tl,beforeFooter:tl,footer:tl,afterFooter:tl};function hf(e,t,n,r){const o=e[t].call(n,r);return void 0===o?df[t].call(n,r):o}class pf extends ah{static positioners=Qp;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,o=new Zu(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this,n=this._tooltipItems,Kc(e,{tooltip:t,tooltipItems:n,type:"tooltip"})));var e,t,n}getTitle(e,t){const{callbacks:n}=t,r=hf(n,"beforeTitle",this,e),o=hf(n,"title",this,e),i=hf(n,"afterTitle",this,e);let a=[];return a=ef(a,tf(r)),a=ef(a,tf(o)),a=ef(a,tf(i)),a}getBeforeBody(e,t){return cf(hf(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:n}=t,r=[];return dl(e,(e=>{const t={before:[],lines:[],after:[]},o=uf(n,e);ef(t.before,tf(hf(o,"beforeLabel",this,e))),ef(t.lines,hf(o,"label",this,e)),ef(t.after,tf(hf(o,"afterLabel",this,e))),r.push(t)})),r}getAfterBody(e,t){return cf(hf(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:n}=t,r=hf(n,"beforeFooter",this,e),o=hf(n,"footer",this,e),i=hf(n,"afterFooter",this,e);let a=[];return a=ef(a,tf(r)),a=ef(a,tf(o)),a=ef(a,tf(i)),a}_createItems(e){const t=this._active,n=this.chart.data,r=[],o=[],i=[];let a,s,l=[];for(a=0,s=t.length;a<s;++a)l.push(nf(this.chart,t[a]));return e.filter&&(l=l.filter(((t,r,o)=>e.filter(t,r,o,n)))),e.itemSort&&(l=l.sort(((t,r)=>e.itemSort(t,r,n)))),dl(l,(t=>{const n=uf(e.callbacks,t);r.push(hf(n,"labelColor",this,t)),o.push(hf(n,"labelPointStyle",this,t)),i.push(hf(n,"labelTextColor",this,t))})),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=i,this.dataPoints=l,l}update(e,t){const n=this.options.setContext(this.getContext()),r=this._active;let o,i=[];if(r.length){const e=Qp[n.position].call(this,r,this._eventPosition);i=this._createItems(n),this.title=this.getTitle(i,n),this.beforeBody=this.getBeforeBody(i,n),this.body=this.getBody(i,n),this.afterBody=this.getAfterBody(i,n),this.footer=this.getFooter(i,n);const t=this._size=rf(this,n),a=Object.assign({},e,t),s=af(this.chart,n,a),l=sf(n,a,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,o={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=i,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){const o=this.getCaretPosition(e,n,r);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(e,t,n){const{xAlign:r,yAlign:o}=this,{caretSize:i,cornerRadius:a}=n,{topLeft:s,topRight:l,bottomLeft:c,bottomRight:u}=qc(a),{x:d,y:h}=e,{width:p,height:f}=t;let m,g,v,y,b,_;return"center"===o?(b=h+f/2,"left"===r?(m=d,g=m-i,y=b+i,_=b-i):(m=d+p,g=m+i,y=b-i,_=b+i),v=m):(g="left"===r?d+Math.max(s,c)+i:"right"===r?d+p-Math.max(l,u)-i:this.caretX,"top"===o?(y=h,b=y-i,m=g-i,v=g+i):(y=h+f,b=y+i,m=g+i,v=g-i),_=y),{x1:m,x2:g,x3:v,y1:y,y2:b,y3:_}}drawTitle(e,t,n){const r=this.title,o=r.length;let i,a,s;if(o){const l=Lu(n.rtl,this.x,this.width);for(e.x=lf(this,n.titleAlign,n),t.textAlign=l.textAlign(n.titleAlign),t.textBaseline="middle",i=Zc(n.titleFont),a=n.titleSpacing,t.fillStyle=n.titleColor,t.font=i.string,s=0;s<o;++s)t.fillText(r[s],l.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+a,s+1===o&&(e.y+=n.titleMarginBottom-a)}}_drawColorBox(e,t,n,r,o){const i=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:s,boxWidth:l}=o,c=Zc(o.bodyFont),u=lf(this,"left",o),d=r.x(u),h=s<c.lineHeight?(c.lineHeight-s)/2:0,p=t.y+h;if(o.usePointStyle){const t={radius:Math.min(l,s)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=r.leftForLtr(d,l)+l/2,c=p+s/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,Tc(e,t,n,c),e.strokeStyle=i.borderColor,e.fillStyle=i.backgroundColor,Tc(e,t,n,c)}else{e.lineWidth=il(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,e.strokeStyle=i.borderColor,e.setLineDash(i.borderDash||[]),e.lineDashOffset=i.borderDashOffset||0;const t=r.leftForLtr(d,l),n=r.leftForLtr(r.xPlus(d,1),l-2),a=qc(i.borderRadius);Object.values(a).some((e=>0!==e))?(e.beginPath(),e.fillStyle=o.multiKeyBackground,jc(e,{x:t,y:p,w:l,h:s,radius:a}),e.fill(),e.stroke(),e.fillStyle=i.backgroundColor,e.beginPath(),jc(e,{x:n,y:p+1,w:l-2,h:s-2,radius:a}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(t,p,l,s),e.strokeRect(t,p,l,s),e.fillStyle=i.backgroundColor,e.fillRect(n,p+1,l-2,s-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){const{body:r}=this,{bodySpacing:o,bodyAlign:i,displayColors:a,boxHeight:s,boxWidth:l,boxPadding:c}=n,u=Zc(n.bodyFont);let d=u.lineHeight,h=0;const p=Lu(n.rtl,this.x,this.width),f=function(n){t.fillText(n,p.x(e.x+h),e.y+d/2),e.y+=d+o},m=p.textAlign(i);let g,v,y,b,_,x,w;for(t.textAlign=i,t.textBaseline="middle",t.font=u.string,e.x=lf(this,m,n),t.fillStyle=n.bodyColor,dl(this.beforeBody,f),h=a&&"right"!==m?"center"===i?l/2+c:l+2+c:0,b=0,x=r.length;b<x;++b){for(g=r[b],v=this.labelTextColors[b],t.fillStyle=v,dl(g.before,f),y=g.lines,a&&y.length&&(this._drawColorBox(t,e,b,p,n),d=Math.max(u.lineHeight,s)),_=0,w=y.length;_<w;++_)f(y[_]),d=u.lineHeight;dl(g.after,f)}h=0,d=u.lineHeight,dl(this.afterBody,f),e.y-=o}drawFooter(e,t,n){const r=this.footer,o=r.length;let i,a;if(o){const s=Lu(n.rtl,this.x,this.width);for(e.x=lf(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=s.textAlign(n.footerAlign),t.textBaseline="middle",i=Zc(n.footerFont),t.fillStyle=n.footerColor,t.font=i.string,a=0;a<o;++a)t.fillText(r[a],s.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+n.footerSpacing}}drawBackground(e,t,n,r){const{xAlign:o,yAlign:i}=this,{x:a,y:s}=e,{width:l,height:c}=n,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=qc(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(a+u,s),"top"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+l-d,s),t.quadraticCurveTo(a+l,s,a+l,s+d),"center"===i&&"right"===o&&this.drawCaret(e,t,n,r),t.lineTo(a+l,s+c-p),t.quadraticCurveTo(a+l,s+c,a+l-p,s+c),"bottom"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+h,s+c),t.quadraticCurveTo(a,s+c,a,s+c-h),"center"===i&&"left"===o&&this.drawCaret(e,t,n,r),t.lineTo(a,s+u),t.quadraticCurveTo(a,s,a+u,s),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,n=this.$animations,r=n&&n.x,o=n&&n.y;if(r||o){const n=Qp[e.position].call(this,this._active,this._eventPosition);if(!n)return;const i=this._size=rf(this,e),a=Object.assign({},n,this._size),s=af(t,e,a),l=sf(e,a,s,t);r._to===l.x&&o._to===l.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=i.width,this.height=i.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const i=Uc(t.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&a&&(e.save(),e.globalAlpha=n,this.drawBackground(o,e,r,t),Iu(e,t.textDirection),o.y+=i.top,this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),zu(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this._active,r=e.map((({datasetIndex:e,index:t})=>{const n=this.chart.getDatasetMeta(e);if(!n)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:n.data[t],index:t}})),o=!hl(n,r),i=this._positionChanged(r,t);(o||i)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],i=this._getActiveElements(e,o,t,n),a=this._positionChanged(i,e),s=t||!hl(i,o)||a;return s&&(this._active=i,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,n,r){const o=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter((e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)));const i=this.chart.getElementsAtEventForMode(e,o.mode,o,n);return o.reverse&&i.reverse(),i}_positionChanged(e,t){const{caretX:n,caretY:r,options:o}=this,i=Qp[o.position].call(this,e,t);return!1!==i&&(n!==i.x||r!==i.y)}}var ff={id:"tooltip",_element:pf,positioners:Qp,afterInit(e,t,n){n&&(e.tooltip=new pf({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:df},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},mf=Object.freeze({__proto__:null,Colors:kp,Decimation:Mp,Filler:Vp,Legend:Up,SubTitle:Jp,Title:Gp,Tooltip:ff});function gf(e,t,n,r){const o=e.indexOf(t);if(-1===o)return((e,t,n,r)=>("string"==typeof t?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n))(e,t,n,r);return o!==e.lastIndexOf(t)?n:o}function vf(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class yf extends gh{static id="category";static defaults={ticks:{callback:vf}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(rl(e))return null;const n=this.getLabels();return((e,t)=>null===e?null:ql(Math.round(e),0,t))(t=isFinite(t)&&n[t]===e?t:gf(n,e,ll(t,e),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,r=[];let o=this.getLabels();o=0===e&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=e;n<=t;n++)r.push({value:n});return r}getLabelForValue(e){return vf.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function bf(e,t){const n=[],{bounds:r,step:o,min:i,max:a,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=e,h=o||1,p=c-1,{min:f,max:m}=t,g=!rl(i),v=!rl(a),y=!rl(l),b=(m-f)/(u+1);let _,x,w,S,k=zl((m-f)/p/h)*h;if(k<1e-14&&!g&&!v)return[{value:f},{value:m}];S=Math.ceil(m/k)-Math.floor(f/k),S>p&&(k=zl(S*k/p/h)*h),rl(s)||(_=Math.pow(10,s),k=Math.ceil(k*_)/_),"ticks"===r?(x=Math.floor(f/k)*k,w=Math.ceil(m/k)*k):(x=f,w=m),g&&v&&o&&function(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}((a-i)/o,k/1e3)?(S=Math.round(Math.min((a-i)/k,c)),k=(a-i)/S,x=i,w=a):y?(x=g?i:x,w=v?a:w,S=l-1,k=(w-x)/S):(S=(w-x)/k,S=Il(S,Math.round(S),k/1e3)?Math.round(S):Math.ceil(S));const C=Math.max(Bl(k),Bl(x));_=Math.pow(10,rl(s)?C:s),x=Math.round(x*_)/_,w=Math.round(w*_)/_;let E=0;for(g&&(d&&x!==i?(n.push({value:i}),x<i&&E++,Il(Math.round((x+E*k)*_)/_,i,_f(i,b,e))&&E++):x<i&&E++);E<S;++E){const e=Math.round((x+E*k)*_)/_;if(v&&e>a)break;n.push({value:e})}return v&&d&&w!==a?n.length&&Il(n[n.length-1].value,a,_f(a,b,e))?n[n.length-1].value=a:n.push({value:a}):v&&w!==a||n.push({value:w}),n}function _f(e,t,{horizontal:n,minRotation:r}){const o=Fl(r),i=(n?Math.sin(o):Math.cos(o))||.001,a=.75*t*(""+e).length;return Math.min(t/i,a)}class xf extends gh{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return rl(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this;const i=e=>r=t?r:e,a=e=>o=n?o:e;if(e){const e=Ll(r),t=Ll(o);e<0&&t<0?a(0):e>0&&t>0&&i(0)}if(r===o){let t=0===o?1:Math.abs(.05*o);a(o+t),e||i(r-t)}this.min=r,this.max=o}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:n,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=bf({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&$l(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return vc(e,this.chart.options.locale,this.options.ticks.format)}}class wf extends xf{static id="linear";static defaults={ticks:{callback:bc.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=al(e)?e:0,this.max=al(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=Fl(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Sf=e=>Math.floor(Al(e)),kf=(e,t)=>Math.pow(10,Sf(e)+t);function Cf(e){return 1===e/Math.pow(10,Sf(e))}function Ef(e,t,n){const r=Math.pow(10,n),o=Math.floor(e/r);return Math.ceil(t/r)-o}function Mf(e,{min:t,max:n}){t=sl(e.min,t);const r=[],o=Sf(t);let i=function(e,t){let n=Sf(t-e);for(;Ef(e,t,n)>10;)n++;for(;Ef(e,t,n)<10;)n--;return Math.min(n,Sf(e))}(t,n),a=i<0?Math.pow(10,Math.abs(i)):1;const s=Math.pow(10,i),l=o>i?Math.pow(10,o):0,c=Math.round((t-l)*a)/a,u=Math.floor((t-l)/s/10)*s*10;let d=Math.floor((c-u)/Math.pow(10,i)),h=sl(e.min,Math.round((l+u+d*Math.pow(10,i))*a)/a);for(;h<n;)r.push({value:h,major:Cf(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(i++,d=2,a=i>=0?1:a),h=Math.round((l+u+d*Math.pow(10,i))*a)/a;const p=sl(e.max,h);return r.push({value:p,major:Cf(p),significand:d}),r}class Pf extends gh{static id="logarithmic";static defaults={ticks:{callback:bc.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const n=xf.prototype.parse.apply(this,[e,t]);if(0!==n)return al(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=al(e)?Math.max(0,e):null,this.max=al(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!al(this._userMin)&&(this.min=e===kf(this.min,0)?kf(this.min,-1):kf(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let n=this.min,r=this.max;const o=t=>n=e?n:t,i=e=>r=t?r:e;n===r&&(n<=0?(o(1),i(10)):(o(kf(n,-1)),i(kf(r,1)))),n<=0&&o(kf(r,-1)),r<=0&&i(kf(n,1)),this.min=n,this.max=r}buildTicks(){const e=this.options,t=Mf({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&$l(t,this,"value"),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return void 0===e?"0":vc(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Al(e),this._valueRange=Al(this.max)-Al(e)}getPixelForValue(e){return void 0!==e&&0!==e||(e=this.min),null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Al(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function Of(e){const t=e.ticks;if(t.display&&e.display){const e=Uc(t.backdropPadding);return ll(t.font&&t.font.size,Cc.font.size)+e.height}return 0}function Tf(e,t,n,r,o){return e===r||e===o?{start:t-n/2,end:t+n/2}:e<r||e>o?{start:t-n,end:t}:{start:t,end:t+n}}function Nf(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],o=[],i=e._pointLabels.length,a=e.options.pointLabels,s=a.centerPointLabels?Cl/i:0;for(let d=0;d<i;d++){const i=a.setContext(e.getPointLabelContext(d));o[d]=i.padding;const h=e.getPointPosition(d,e.drawingArea+o[d],s),p=Zc(i.font),f=(l=e.ctx,c=p,u=ol(u=e._pointLabels[d])?u:[u],{w:Mc(l,c.string,u),h:u.length*c.lineHeight});r[d]=f;const m=Yl(e.getIndexAngle(d)+s),g=Math.round(jl(m));Df(n,t,m,Tf(g,h.x,f.w,0,180),Tf(g,h.y,f.h,90,270))}var l,c,u;e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=function(e,t,n){const r=[],o=e._pointLabels.length,i=e.options,{centerPointLabels:a,display:s}=i.pointLabels,l={extra:Of(i)/2,additionalAngle:a?Cl/o:0};let c;for(let i=0;i<o;i++){l.padding=n[i],l.size=t[i];const o=Af(e,i,l);r.push(o),"auto"===s&&(o.visible=Lf(o,c),o.visible&&(c=o))}return r}(e,r,o)}function Df(e,t,n,r,o){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let s=0,l=0;r.start<t.l?(s=(t.l-r.start)/i,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/i,e.r=Math.max(e.r,t.r+s)),o.start<t.t?(l=(t.t-o.start)/a,e.t=Math.min(e.t,t.t-l)):o.end>t.b&&(l=(o.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function Af(e,t,n){const r=e.drawingArea,{extra:o,additionalAngle:i,padding:a,size:s}=n,l=e.getPointPosition(t,r+o+a,i),c=Math.round(jl(Yl(l.angle+Tl))),u=function(e,t,n){90===n||270===n?e-=t/2:(n>270||n<90)&&(e-=t);return e}(l.y,s.h,c),d=function(e){if(0===e||180===e)return"center";if(e<180)return"left";return"right"}(c),h=function(e,t,n){"right"===n?e-=t:"center"===n&&(e-=t/2);return e}(l.x,s.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+s.w,bottom:u+s.h}}function Lf(e,t){if(!t)return!0;const{left:n,top:r,right:o,bottom:i}=e;return!(Dc({x:n,y:r},t)||Dc({x:n,y:i},t)||Dc({x:o,y:r},t)||Dc({x:o,y:i},t))}function If(e,t,n){const{left:r,top:o,right:i,bottom:a}=n,{backdropColor:s}=t;if(!rl(s)){const n=qc(t.borderRadius),l=Uc(t.backdropPadding);e.fillStyle=s;const c=r-l.left,u=o-l.top,d=i-r+l.width,h=a-o+l.height;Object.values(n).some((e=>0!==e))?(e.beginPath(),jc(e,{x:c,y:u,w:d,h:h,radius:n}),e.fill()):e.fillRect(c,u,d,h)}}function zf(e,t,n,r){const{ctx:o}=e;if(n)o.arc(e.xCenter,e.yCenter,t,0,El);else{let n=e.getPointPosition(0,t);o.moveTo(n.x,n.y);for(let i=1;i<r;i++)n=e.getPointPosition(i,t),o.lineTo(n.x,n.y)}}class Rf extends xf{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:bc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:e=>e,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Uc(Of(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=al(e)&&!isNaN(e)?e:0,this.max=al(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Of(this.options))}generateTickLabels(e){xf.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map(((e,t)=>{const n=ul(this.options.pointLabels.callback,[e,t],this);return n||0===n?n:""})).filter(((e,t)=>this.chart.getDataVisibility(t)))}fit(){const e=this.options;e.display&&e.pointLabels.display?Nf(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){return Yl(e*(El/(this._pointLabels.length||1))+Fl(this.options.startAngle||0))}getDistanceFromCenterForValue(e){if(rl(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(rl(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const n=t[e];return function(e,t,n){return Kc(e,{label:n,index:t,type:"pointLabel"})}(this.getContext(),e,n)}}getPointPosition(e,t,n=0){const r=this.getIndexAngle(e)-Tl+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:n,right:r,bottom:o}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const n=this.ctx;n.save(),n.beginPath(),zf(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:n,grid:r,border:o}=t,i=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&function(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let o=t-1;o>=0;o--){const t=e._pointLabelItems[o];if(!t.visible)continue;const i=r.setContext(e.getPointLabelContext(o));If(n,i,t);const a=Zc(i.font),{x:s,y:l,textAlign:c}=t;Fc(n,e._pointLabels[o],s,l+a.lineHeight/2,a,{color:i.color,textAlign:c,textBaseline:"middle"})}}(this,i),r.display&&this.ticks.forEach(((e,t)=>{if(0!==t||0===t&&this.min<0){s=this.getDistanceFromCenterForValue(e.value);const n=this.getContext(t),a=r.setContext(n),l=o.setContext(n);!function(e,t,n,r,o){const i=e.ctx,a=t.circular,{color:s,lineWidth:l}=t;!a&&!r||!s||!l||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=l,i.setLineDash(o.dash||[]),i.lineDashOffset=o.dashOffset,i.beginPath(),zf(e,n,a,r),i.closePath(),i.stroke(),i.restore())}(this,a,s,i,l)}})),n.display){for(e.save(),a=i-1;a>=0;a--){const r=n.setContext(this.getPointLabelContext(a)),{color:o,lineWidth:i}=r;i&&o&&(e.lineWidth=i,e.strokeStyle=o,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),l=this.getPointPosition(a,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let o,i;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach(((r,a)=>{if(0===a&&this.min>=0&&!t.reverse)return;const s=n.setContext(this.getContext(a)),l=Zc(s.font);if(o=this.getDistanceFromCenterForValue(this.ticks[a].value),s.showLabelBackdrop){e.font=l.string,i=e.measureText(r.label).width,e.fillStyle=s.backdropColor;const t=Uc(s.backdropPadding);e.fillRect(-i/2-t.left,-o-l.size/2-t.top,i+t.width,l.size+t.height)}Fc(e,r.label,0,-o,l,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})})),e.restore()}drawTitle(){}}const $f={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ff=Object.keys($f);function jf(e,t){return e-t}function Bf(e,t){if(rl(t))return null;const n=e._adapter,{parser:r,round:o,isoWeekday:i}=e._parseOpts;let a=t;return"function"==typeof r&&(a=r(a)),al(a)||(a="string"==typeof r?n.parse(a,r):n.parse(a)),null===a?null:(o&&(a="week"!==o||!Rl(i)&&!0!==i?n.startOf(a,o):n.startOf(a,"isoWeek",i)),+a)}function Hf(e,t,n,r){const o=Ff.length;for(let i=Ff.indexOf(e);i<o-1;++i){const e=$f[Ff[i]],o=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((n-t)/(o*e.size))<=r)return Ff[i]}return Ff[o-1]}function Wf(e,t,n){if(n){if(n.length){const{lo:r,hi:o}=Zl(n,t);e[n[r]>=t?n[r]:n[o]]=!0}}else e[t]=!0}function Vf(e,t,n){const r=[],o={},i=t.length;let a,s;for(a=0;a<i;++a)s=t[a],o[s]=a,r.push({value:s,major:!1});return 0!==i&&n?function(e,t,n,r){const o=e._adapter,i=+o.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=i;s<=a;s=+o.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}(e,r,o,n):r}class Yf extends gh{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const n=e.time||(e.time={}),r=this._adapter=new wd._date(e.adapters.date);r.init(t),vl(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:Bf(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,n=e.time.unit||"day";let{min:r,max:o,minDefined:i,maxDefined:a}=this.getUserBounds();function s(e){i||isNaN(e.min)||(r=Math.min(r,e.min)),a||isNaN(e.max)||(o=Math.max(o,e.max))}i&&a||(s(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||s(this.getMinMax(!1))),r=al(r)&&!isNaN(r)?r:+t.startOf(Date.now(),n),o=al(o)&&!isNaN(o)?o:+t.endOf(Date.now(),n)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){const e=this.options,t=e.time,n=e.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,i=function(e,t,n){let r=0,o=e.length;for(;r<o&&e[r]<t;)r++;for(;o>r&&e[o-1]>n;)o--;return r>0||o<e.length?e.slice(r,o):e}(r,o,this.max);return this._unit=t.unit||(n.autoSkip?Hf(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(e,t,n,r,o){for(let i=Ff.length-1;i>=Ff.indexOf(n);i--){const n=Ff[i];if($f[n].common&&e._adapter.diff(o,r,n)>=t-1)return n}return Ff[n?Ff.indexOf(n):0]}(this,i.length,t.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(e){for(let t=Ff.indexOf(e)+1,n=Ff.length;t<n;++t)if($f[Ff[t]].common)return Ff[t]}(this._unit):void 0,this.initOffsets(r),e.reverse&&i.reverse(),Vf(this,i,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((e=>+e.value)))}initOffsets(e=[]){let t,n,r=0,o=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),r=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,n=this.getDecimalForValue(e[e.length-1]),o=1===e.length?n:(n-this.getDecimalForValue(e[e.length-2]))/2);const i=e.length<3?.5:.25;r=ql(r,0,i),o=ql(o,0,i),this._offsets={start:r,end:o,factor:1/(r+1+o)}}_generate(){const e=this._adapter,t=this.min,n=this.max,r=this.options,o=r.time,i=o.unit||Hf(o.minUnit,t,n,this._getLabelCapacity(t)),a=ll(r.ticks.stepSize,1),s="week"===i&&o.isoWeekday,l=Rl(s)||!0===s,c={};let u,d,h=t;if(l&&(h=+e.startOf(h,"isoWeek",s)),h=+e.startOf(h,l?"day":i),e.diff(n,t,i)>1e5*a)throw new Error(t+" and "+n+" are too far apart with stepSize of "+a+" "+i);const p="data"===r.ticks.source&&this.getDataTimestamps();for(u=h,d=0;u<n;u=+e.add(u,a,i),d++)Wf(c,u,p);return u!==n&&"ticks"!==r.bounds&&1!==d||Wf(c,u,p),Object.keys(c).sort(jf).map((e=>+e))}getLabelForValue(e){const t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){const n=this.options.time.displayFormats,r=this._unit,o=t||n[r];return this._adapter.format(e,o)}_tickFormatFunction(e,t,n,r){const o=this.options,i=o.ticks.callback;if(i)return ul(i,[e,t,n],this);const a=o.time.displayFormats,s=this._unit,l=this._majorUnit,c=s&&a[s],u=l&&a[l],d=n[t],h=l&&u&&d&&d.major;return this._adapter.format(e,r||(h?u:c))}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t<n;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,n=this.ctx.measureText(e).width,r=Fl(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(r),i=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*i,h:n*i+a*o}}_getLabelCapacity(e){const t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,o=this._tickFormatFunction(e,0,Vf(this,[e],this._majorUnit),r),i=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return a>0?a:1}getDataTimestamps(){let e,t,n=this._cache.data||[];if(n.length)return n;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,t=r.length;e<t;++e)n=n.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const e=this._cache.labels||[];let t,n;if(e.length)return e;const r=this.getLabels();for(t=0,n=r.length;t<n;++t)e.push(Bf(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return ec(e.sort(jf))}}function Xf(e,t,n){let r,o,i,a,s=0,l=e.length-1;n?(t>=e[s].pos&&t<=e[l].pos&&({lo:s,hi:l}=Gl(e,"pos",t)),({pos:r,time:i}=e[s]),({pos:o,time:a}=e[l])):(t>=e[s].time&&t<=e[l].time&&({lo:s,hi:l}=Gl(e,"time",t)),({time:r,pos:i}=e[s]),({time:o,pos:a}=e[l]));const c=o-r;return c?i+(a-i)*(t-r)/c:i}var qf=Object.freeze({__proto__:null,CategoryScale:yf,LinearScale:wf,LogarithmicScale:Pf,RadialLinearScale:Rf,TimeScale:Yf,TimeSeriesScale:class extends Yf{static id="timeseries";static defaults=Yf.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Xf(t,this.min),this._tableRange=Xf(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:n}=this,r=[],o=[];let i,a,s,l,c;for(i=0,a=e.length;i<a;++i)l=e[i],l>=t&&l<=n&&r.push(l);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(i=0,a=r.length;i<a;++i)c=r[i+1],s=r[i-1],l=r[i],Math.round((c+s)/2)!==l&&o.push({time:l,pos:i/(a-1)});return o}_generate(){const e=this.min,t=this.max;let n=super.getDataTimestamps();return n.includes(e)&&n.length||n.splice(0,0,e),n.includes(t)&&1!==n.length||n.push(t),n.sort(((e,t)=>e-t))}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(Xf(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return Xf(this._table,n*this._tableRange+this._minPos,!0)}}});const Uf=[bd,vp,mf,qf];Uh.register(...Uf);const Zf=({type:t,data:n,options:r,className:o,style:i,plugins:a})=>{const c=s(null),u=s(null);return l((()=>{if(!c.current)return;const e=c.current.getContext("2d");return e?(u.current&&u.current.destroy(),u.current=new Uh(e,{type:t,data:n,options:r||{},plugins:a||[]}),()=>{u.current&&(u.current.destroy(),u.current=null)}):void 0}),[t,n,r,a]),e("canvas",{ref:c,className:o,style:i})};var Gf="Checkbox-module_container__v4ouY",Kf="Checkbox-module_disabled__PAavY",Jf="Checkbox-module_checkbox__tiPi8",Qf="Checkbox-module_indeterminate__GxPm3";var em=a((({checked:n=!1,disabled:r=!1,label:o,indeterminate:i=!1,labelProps:a,onChange:c,id:u,checkBoxClassName:d,...h})=>{const p=s(null),m=s(null),g=f();l((()=>{p.current&&(p.current.indeterminate=i)}),[i]),l((()=>{if(!n||i)return;const e=m.current;if(!e)return;e.style.transform="translateZ(0)";const t=requestAnimationFrame((()=>{e.style.transform=""}));return()=>{cancelAnimationFrame(t),e&&(e.style.transform="")}}),[n,i]);return e(H,{...h,onClick:e=>{r||c?.(e)},dimensionY:36,className:`${h.className} ${Gf} ${r&&Kf}`,prefix:{children:t("div",{className:`${Jf} ${i&&Qf} ${d}`,children:[e("input",{id:u??g,ref:p,type:"checkbox",checked:n,disabled:r,"aria-checked":i?"mixed":n,readOnly:!0}),e("label",{ref:m,htmlFor:u??g,onClick:e=>e.stopPropagation()})]}),...h.prefix},root:{children:e(V,{...a,children:o}),...h.root}})})),tm={chip:"Chip-module_chip__DLgqh",outlined:"Chip-module_outlined__1seXI",filled:"Chip-module_filled__iKdFt",noButton:"Chip-module_noButton__nEh--",closeButton:"Chip-module_closeButton__83TVb"};var nm=a((({label:t,variant:n="filled",icon:r,onDelete:o,suffixIcon:i,suffixOnClick:a,...s})=>e(H,{dimensionX:"hug",gap:8,prefix:{dimensionX:"hug",children:r?e(Ga,{name:r}):void 0,...s.prefix},root:{children:t,...s.root},suffix:(i||o)&&{dimensionX:"hug",alignment:"center",children:e(xs,{className:tm.closeButton,shape:"circle",color:"transparent",onClick:i?a:o,children:e(Ga,{name:i||"close"})}),...s.suffix},...s,className:`${s.className} ${tm.chip} ${tm[n]} ${o||i?"":tm.noButton}`}))),rm="Color-module_color__icl6l";var om=a((({value:t="#000000",prefixProps:n,rootProps:r,onChange:o,...i})=>e(H,{dimensionY:36,prefix:{children:e("input",{type:"color",value:t,onChange:e=>{o?.(e.target.value)}}),...n},root:{children:t&&e(V,{children:t}),...r},...i,className:`${i?.className} ${rm}`})));const im=(e,t,n)=>Math.min(Math.max(e,t),n),am=(e,t=0)=>{const n=Math.pow(10,t);return Math.round(e*n)/n},sm=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=Math.min(e,t,n),i=r-o,a=r+o,s=a/2;if(0===i)return{h:0,s:0,l:am(100*s,1)};const l=s>.5?i/(2-a):i/a;let c;switch(r){case e:c=(t-n)/i+(t<n?6:0);break;case t:c=(n-e)/i+2;break;case n:c=(e-t)/i+4;break;default:c=0}return{h:am(60*c,1),s:am(100*l,1),l:am(100*s,1)}},lm=(e,t,n)=>{if(e/=360,n/=100,0===(t/=100)){const e=Math.round(255*n);return{r:e,g:e,b:e}}const r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),o=n<.5?n*(1+t):n+t-n*t,i=2*n-o;return{r:Math.round(255*r(i,o,e+1/3)),g:Math.round(255*r(i,o,e)),b:Math.round(255*r(i,o,e-1/3))}},cm=(e,t,n)=>{e/=360;const r=(n/=100)*(t/=100),o=r*(1-Math.abs(6*e%2-1)),i=n-r;let a,s,l;return[a,s,l]=e<1/6?[r,o,0]:e<2/6?[o,r,0]:e<.5?[0,r,o]:e<4/6?[0,o,r]:e<5/6?[o,0,r]:[r,0,o],{r:Math.round(255*(a+i)),g:Math.round(255*(s+i)),b:Math.round(255*(l+i))}},um=({r:e,g:t,b:n,a:r})=>{const o=e=>{const t=Math.round(im(e,0,255)).toString(16);return 1===t.length?"0"+t:t},i=`#${o(e)}${o(t)}${o(n)}`.toUpperCase();if(r<1){return`${i}${o(255*r)}`}return i},dm=e=>{if(3===(e=e.replace("#","")).length&&(e=e.split("").map((e=>e+e)).join("")),6===e.length){return{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}}if(8===e.length){return{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:parseInt(e.substr(6,2),16)/255}}return null},hm=e=>{const t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3]),a:t[4]?parseFloat(t[4]):1}:null},pm=e=>{const t=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+))?\s*\)/);return t?{h:parseFloat(t[1]),s:parseFloat(t[2]),l:parseFloat(t[3]),a:t[4]?parseFloat(t[4]):1}:null},fm=e=>{const t=e.trim().toLowerCase();if(t.startsWith("#")){const e=dm(t);if(e){const t=sm(e.r,e.g,e.b);return{hex:um(e),rgb:e,hsl:{...t,a:e.a}}}}if(t.startsWith("rgb")){const e=hm(t);if(e){const t=sm(e.r,e.g,e.b);return{hex:um(e),rgb:e,hsl:{...t,a:e.a}}}}if(t.startsWith("hsl")){const e=pm(t);if(e){const t=lm(e.h,e.s,e.l);return{hex:um({...t,a:e.a}),rgb:{...t,a:e.a},hsl:e}}}return{hex:"#1677FF",rgb:{r:22,g:119,b:255,a:1},hsl:{h:220,s:100,l:54,a:1}}},mm=e=>{const t=((e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=r-Math.min(e,t,n),i=r,a=0===r?0:o/r;let s;if(0===o)s=0;else{switch(r){case e:s=(t-n)/o+(t<n?6:0);break;case t:s=(n-e)/o+2;break;case n:s=(e-t)/o+4;break;default:s=0}s/=6}return{h:am(360*s,1),s:am(100*a,1),v:am(100*i,1)}})(e.rgb.r,e.rgb.g,e.rgb.b);return{...t,a:e.rgb.a}},gm=e=>{const t=cm(e.h,e.s,e.v),n=sm(t.r,t.g,t.b);return{hex:um({...t,a:e.a}),rgb:{...t,a:e.a},hsl:{...n,a:e.a}}},vm=(e={})=>{const{onDragStart:t,onDrag:n,onDragEnd:r,onKeyDown:o,preventSelection:i=!0}=e,[a,d]=u({isDragging:!1,startX:0,startY:0,currentX:0,currentY:0}),h=s(null),p=s({left:0,top:0,width:0,height:0}),f=s(void 0),m=s(0),g=c((()=>{if(h.current){const e=h.current.getBoundingClientRect();p.current={left:e.left,top:e.top,width:e.width,height:e.height}}}),[]),v=c((e=>{if("touches"in e){const t=e.touches[0]||e.changedTouches[0];return{x:t.clientX,y:t.clientY}}return{x:e.clientX,y:e.clientY}}),[]),y=c(((e,t)=>{const n=p.current,r=(e-n.left)/n.width,o=(t-n.top)/n.height;return{x:Math.max(0,Math.min(1,r)),y:Math.max(0,Math.min(1,o))}}),[]),b=c(((e,t)=>{const r=performance.now();f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame((()=>{if(r-m.current>=16){const{x:o,y:i}=y(e,t);n?.(o,i,p.current),m.current=r}}))}),[y,n]),_=c((e=>{e.preventDefault(),g();const{x:n,y:r}=v(e);d({isDragging:!0,startX:n,startY:r,currentX:n,currentY:r}),t?.(e),b(n,r),i&&(document.body.style.userSelect="none",document.body.style.webkitUserSelect="none")}),[v,b,t,i,g]),x=c((e=>{if(!a.isDragging)return;e.preventDefault();const{x:t,y:n}=v(e);d((e=>({...e,currentX:t,currentY:n}))),b(t,n)}),[a.isDragging,v,b]),w=c((()=>{a.isDragging&&(d((e=>({...e,isDragging:!1}))),r?.(),i&&(document.body.style.userSelect="",document.body.style.webkitUserSelect=""),f.current&&cancelAnimationFrame(f.current))}),[a.isDragging,r,i]),S=c((e=>{e.preventDefault(),g();const{x:n,y:r}=v(e);d({isDragging:!0,startX:n,startY:r,currentX:n,currentY:r}),t?.(e),b(n,r)}),[v,b,t,g]),k=c((e=>{if(!a.isDragging)return;e.preventDefault();const{x:t,y:n}=v(e);d((e=>({...e,currentX:t,currentY:n}))),b(t,n)}),[a.isDragging,v,b]),C=c((()=>{a.isDragging&&(d((e=>({...e,isDragging:!1}))),r?.(),f.current&&cancelAnimationFrame(f.current))}),[a.isDragging,r]),E=c((e=>{o?.(e)}),[o]),M=c((()=>{g()}),[g]);return l((()=>{const e=h.current;if(e)return e.addEventListener("mousedown",_),e.addEventListener("touchstart",S,{passive:!1}),e.addEventListener("keydown",E),()=>{e.removeEventListener("mousedown",_),e.removeEventListener("touchstart",S),e.removeEventListener("keydown",E)}}),[_,S,E]),l((()=>{if(a.isDragging)return document.addEventListener("mousemove",x),document.addEventListener("mouseup",w),document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",C),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",w),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",C)}}),[a.isDragging,x,w,k,C]),l((()=>(window.addEventListener("resize",M),()=>window.removeEventListener("resize",M))),[M]),l((()=>()=>{f.current&&cancelAnimationFrame(f.current)}),[]),{elementRef:h,dragState:a,updateBounds:g}};var ym="ColorPicker-module_trigger__5Ukgm",bm="ColorPicker-module_triggerLabel__1qiCq",_m="ColorPicker-module_swatch__t-pF4",xm="ColorPicker-module_swatchColor__A-5J8",wm="ColorPicker-module_svPanel__Cr8Xb",Sm="ColorPicker-module_svBackground__VgABR",km="ColorPicker-module_svHandle__gPxoY",Cm="ColorPicker-module_slidersContainer__etZz6",Em="ColorPicker-module_sliders__Xpo3f",Mm="ColorPicker-module_slider__HmNSH",Pm="ColorPicker-module_hueSlider__smchE",Om="ColorPicker-module_alphaSlider__7bImL",Tm="ColorPicker-module_alphaGradient__pIdQ6",Nm="ColorPicker-module_sliderHandle__S-ghs",Dm="ColorPicker-module_formatSelect__5tLPh",Am="ColorPicker-module_colorInput__6ajlG",Lm="ColorPicker-module_error__tj3WS",Im="ColorPicker-module_alphaInputContainer__-RszK",zm="ColorPicker-module_alphaInput__IcWZ-",Rm="ColorPicker-module_preview__2wBPl",$m="ColorPicker-module_previewColor__7da0X",Fm="Select-module_container__txDHr",jm="Select-module_disabled__RJ71M",Bm="Select-module_displayer__gzmxI",Hm="Select-module_selectDropdown__HBmga",Wm="Portal-module_container__QcS9f";const Vm=m(null);function Ym(){let e=0;const t=[],n=e=>{if(!e.target)return;const n=e.target;for(let r=t.length-1;r>=0;r--){const o=t[r];if(o.refs.some((e=>e.current?.contains(n))))return;return void o.onClickOutside(e)}};return{register(e){t.push(e)},unregister(e){const n=t.findIndex((t=>t.id===e));-1!==n&&t.splice(n,1)},nextId:()=>++e,attach(){document.addEventListener("mousedown",n)},detach(){document.removeEventListener("mousedown",n)}}}let Xm=null;const qm=({children:t})=>{const n=s(null);n.current||(n.current=Ym());const r=n.current;l((()=>(r.attach(),()=>r.detach())),[r]);const o={register:r.register,unregister:r.unregister,nextId:r.nextId};return e(Vm.Provider,{value:o,children:t})};function Um(){const e=p(Vm);return e||(Xm||(Xm=Ym(),Xm.attach()),Xm)}function Zm(e,t,n=!0){const r=Um(),o=s(null),i=s(t);i.current=t;const a=c((e=>{i.current?.(e)}),[]);l((()=>{if(!n||!t)return void(null!==o.current&&(r.unregister(o.current),o.current=null));const i=r.nextId();return o.current=i,r.register({id:i,refs:e,onClickOutside:a}),()=>{r.unregister(i),o.current=null}}),[n,r,a,...e])}const Gm=({children:t,className:n,onClickOutside:r,additionalRefs:o=[]})=>{const i=s(null);return Zm(o,r,!!r),l((()=>{const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[]),M.createPortal(e("div",{ref:i,className:`${Wm} ${n||""}`,children:t}),document.body)};var Km="SelectOption-module_option__wQb8V",Jm="SelectOption-module_disabled__m5fGS",Qm="SelectOption-module_selected__A6Rky",eg="SelectOption-module_displayer__lEn8X";var tg=a((({option:t,selected:n,multiple:r,disabled:o,onSelect:i,onClick:a,...s})=>{const{value:l,label:c}="object"==typeof t?{value:t.value,label:t.label}:{value:t,label:t};return e(H,{dimensionX:"fill",dimensionY:36,alignment:"leftCenter",onClick:a,root:{children:e(em,{disabled:o,dimensionX:"fill",checked:n,label:c,alignment:"leftCenter",prefix:r?void 0:{children:null},root:{className:`${s.root?.className} ${eg}`},labelProps:{className:eg}}),dimensionX:"fill"},...s,className:`${Km} ${n&&Qm} ${o&&Jm} ${s.className||""}`})}));var ng=a((({value:r,options:o,placeholder:i="Select an option",placement:a="bottom",multiple:c=!1,disabled:h=!1,maxCount:p,popupClassName:f="",optionProps:m,selectRef:v,disableClick:y,onChange:b,externalDropdownRef:_,...x})=>{const[w,S]=u(!1),[k,C]=u(r||(c?[]:null));l((()=>{(r||0===r||""===r)&&C(r)}),[r]);const E=s(null),M=s(null);g(_??{current:null},(()=>M.current));const{targetPosition:P,calculatePosition:O}=ee({containerRef:E,targetRef:M,initialPlacement:a});d((()=>{w&&E.current&&M.current&&O()}),[w,o,O]);g(v,(()=>({toggleDropdown:N,clear:T})));const T=()=>{C([]),b?.([]),S(!1)},N=e=>{S(void 0===e?e=>!e:e)},D=e=>"object"!=typeof o[0]?String(e):L(e),A=e=>e.length?"object"==typeof o[0]?e.map((e=>L(e))).join(", "):e.join(", "):i,L=e=>o.find((t=>t.value===e))?.label;return t(n,{children:[e(H,{ref:E,onClick:()=>{h||y||N()},dimensionX:"fill",dimensionY:36,...x,root:{children:e(V,{style:x.root?.style,className:`${x.root?.className} ${Bm}`,children:k?c?A(k):D(k):i}),dimensionX:"fill",alignment:"leftCenter"},suffix:{children:e(Ga,{name:"chevronDown"})},className:`${x.className} ${Fm} ${h&&jm}`}),w&&e(Gm,{onClickOutside:()=>{y||S(!1)},additionalRefs:[E,M],children:e(B,{ref:M,style:{...P},className:`${f} ${Hm}`,direction:"vertical",alignment:"leftTop",gap:0,children:o.map((t=>{const n="object"==typeof t?t.value:t,r=c?Array.isArray(k)&&k.includes(n):k===n,o=c&&!!p&&Array.isArray(k)&&k.length>=p&&!r;return e(tg,{disabled:o,dimensionX:E.current?.offsetWidth,multiple:c,option:t,selected:r,onClick:()=>(e=>{c?(()=>{if(!Array.isArray(k))return;const t=k.includes(e)?k.filter((t=>t!==e)):[...k,e];C(t),b?.(t)})():(C(e),b?.(e),S(!1))})(n),...m},n.toString())}))})})]})}));const rg=(e,t)=>{switch(t){case"hex":default:return e.hex;case"rgb":return((e,t,n,r)=>1===r?`rgb(${Math.round(e)}, ${Math.round(t)}, ${Math.round(n)})`:`rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(n)}, ${am(r,2)})`)(e.rgb.r,e.rgb.g,e.rgb.b,e.rgb.a);case"hsl":return((e,t,n,r)=>1===r?`hsl(${Math.round(e)}, ${Math.round(t)}%, ${Math.round(n)}%)`:`hsla(${Math.round(e)}, ${Math.round(t)}%, ${Math.round(n)}%, ${am(r,2)})`)(e.hsl.h,e.hsl.s,e.hsl.l,e.hsl.a)}},og=({value:n,defaultValue:r="#1677FF",onChange:o,format:a="hex",placement:d="bottomStart",disabled:h=!1,id:p,triggerDisplay:f="complete",containerProps:m,contentProps:g,...v})=>{const[y,b]=u(!1),[_,x]=u(a),[w,S]=u(""),[k,C]=u(!1),[E,M]=u("100"),P=i((()=>fm(n??r)),[n,r]),[O,T]=u(P),[N,D]=u((()=>mm(P))),A=s(null),L=s(null),I=s(null),z=s(null);l((()=>{if(void 0!==n){const e=fm(n);T(e),D(mm(e))}}),[n]),l((()=>{S(rg(O,_)),M(Math.round(100*O.rgb.a).toString())}),[O,_]);const R=c((e=>{T(e),D(mm(e)),o?.(e)}),[o]),$=vm({onDrag:(e,t)=>{const n={...N,s:100*e,v:100*(1-t)};D(n),R(gm(n))},onKeyDown:e=>{const t=e.shiftKey?10:1;let n=N.s,r=N.v;switch(e.key){case"ArrowLeft":e.preventDefault(),n=im(N.s-t,0,100);break;case"ArrowRight":e.preventDefault(),n=im(N.s+t,0,100);break;case"ArrowUp":e.preventDefault(),r=im(N.v+t,0,100);break;case"ArrowDown":e.preventDefault(),r=im(N.v-t,0,100)}if(n!==N.s||r!==N.v){const e={...N,s:n,v:r};D(e),R(gm(e))}}}),F=vm({onDrag:e=>{const t={...N,h:360*e};D(t),R(gm(t))},onKeyDown:e=>{const t=e.shiftKey?10:1;let n=N.h;switch(e.key){case"ArrowLeft":e.preventDefault(),n=(N.h-t+360)%360;break;case"ArrowRight":e.preventDefault(),n=(N.h+t)%360}if(n!==N.h){const e={...N,h:n};D(e),R(gm(e))}}}),j=vm({onDrag:e=>{const t={...N,a:e};D(t),R(gm(t))},onKeyDown:e=>{const t=e.shiftKey?.1:.01;let n=N.a;switch(e.key){case"ArrowLeft":e.preventDefault(),n=im(N.a-t,0,1);break;case"ArrowRight":e.preventDefault(),n=im(N.a+t,0,1)}if(n!==N.a){const e={...N,a:n};D(e),R(gm(e))}}}),H=e=>{if(S(e),e.trim()){const t=(e=>{const t=e.trim().toLowerCase();if(t.startsWith("#")){const e=dm(t);if(e){const t=sm(e.r,e.g,e.b);return{hex:um(e),rgb:e,hsl:{...t,a:e.a}}}return null}if(t.startsWith("rgb")){const e=hm(t);if(e){const t=sm(e.r,e.g,e.b);return{hex:um(e),rgb:e,hsl:{...t,a:e.a}}}return null}if(t.startsWith("hsl")){const e=pm(t);if(e){const t=lm(e.h,e.s,e.l);return{hex:um({...t,a:e.a}),rgb:{...t,a:e.a},hsl:e}}return null}return null})(e);t?(T(t),D(mm(t)),o?.(t),C(!1)):C(!0)}else C(!1)},W=i((()=>{const e=cm(N.h,100,100);return{backgroundColor:`rgb(${e.r}, ${e.g}, ${e.b})`}}),[N.h]),V=i((()=>({left:`${N.s}%`,top:100-N.v+"%"})),[N.s,N.v]),Y=i((()=>({left:N.h/360*100+"%"})),[N.h]),X=i((()=>{const e=cm(N.h,N.s,N.v);return{background:`linear-gradient(to right, rgba(${e.r}, ${e.g}, ${e.b}, 0), rgba(${e.r}, ${e.g}, ${e.b}, 1))`}}),[N.h,N.s,N.v]),q=i((()=>({left:100*N.a+"%"})),[N.a]),U=i((()=>({backgroundColor:um(O.rgb)})),[O.rgb]),Z=()=>{h||b(!y)};l((()=>{const e=e=>{"Escape"===e.key&&y&&(b(!1),A.current?.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[y]);const K="hex"===_?O.hex:w,J="only-code"!==f,Q="only-color"!==f;return e(jA,{content:t(B,{gap:5,direction:"vertical",children:[t("div",{ref:e=>{L.current=e,$.elementRef&&e&&($.elementRef.current=e)},className:wm,style:W,tabIndex:0,role:"application","aria-label":"Saturation and brightness color picker",children:[e("div",{className:Sm}),e("div",{className:km,style:V})]}),t("div",{className:Cm,children:[t("div",{className:Em,children:[e("div",{ref:e=>{I.current=e,F.elementRef&&e&&(F.elementRef.current=e)},className:`${Mm} ${Pm}`,tabIndex:0,role:"slider","aria-label":"Hue","aria-valuenow":Math.round(N.h),"aria-valuemin":0,"aria-valuemax":360,"aria-valuetext":`Hue ${Math.round(N.h)} degrees`,children:e("div",{className:Nm,style:Y})}),t("div",{ref:e=>{z.current=e,j.elementRef&&e&&(j.elementRef.current=e)},className:`${Mm} ${Om}`,tabIndex:0,role:"slider","aria-label":"Alpha","aria-valuenow":Math.round(100*N.a),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`Alpha ${Math.round(100*N.a)}%`,children:[e("div",{className:Tm,style:X}),e("div",{className:Nm,style:q})]})]}),e("div",{className:Rm,children:e("div",{className:$m,style:U})})]}),t(B,{gap:5,direction:"horizontal",children:[e(ng,{className:Dm,value:_,options:[{value:"hex",label:"HEX"},{value:"rgb",label:"RGB"},{value:"hsl",label:"HSL"}],onChange:e=>x(e),dimensionY:32}),e(G,{type:"text",className:`${Am} ${k?Lm:""}`,value:w,onChange:e=>H(e.target.value),onBlur:()=>{if(k||!w.trim())S(rg(O,_)),C(!1);else try{const e=fm(w);R(e),C(!1)}catch{C(!0),S(rg(O,_))}},"aria-label":"Color value","aria-invalid":k,dimensionY:32}),t(B,{className:Im,children:[e(G,{type:"text",className:zm,value:E,onChange:e=>(e=>{M(e);const t=Number.parseFloat(e);if(!Number.isNaN(t)&&t>=0&&t<=100){const e={...N,a:t/100};D(e),R(gm(e))}})(e.target.value),"aria-label":"Alpha percentage",dimensionY:32,dimensionX:30}),e("span",{children:"%"})]})]})]}),open:y,onClose:()=>b(!1),arrow:!0,placement:"bottom",containerProps:{alignment:"leftCenter",...m},contentProps:g,children:t(xs,{variant:"text",className:ym,onClick:Z,onKeyDown:e=>{"Enter"===e.key||" "===e.key?(e.preventDefault(),Z()):"Escape"===e.key&&y&&b(!1)},disabled:h,"aria-label":"Open color picker","aria-expanded":y,"aria-haspopup":"dialog",id:p,"data-display":f,fullWidth:!0,containerProps:{dimensionX:"fill"},children:[J&&e("div",{className:_m,children:e("div",{className:xm,style:U})}),Q&&e("span",{className:bm,children:K})]})})};var ig={container:"DashboardItem-module_container__Cu2fp",settingButton:"DashboardItem-module_settingButton__EVb24",header:"DashboardItem-module_header__1Ltls",chartContainer:"DashboardItem-module_chartContainer__xibFh",chart:"DashboardItem-module_chart__a5kGE"},ag="Section-module_sectionContainer__qECl2",sg="Section-module_header__1oDhY",lg="Section-module_content__3PfOv",cg="Section-module_footer__KPdum";const ug=a((({children:t,...n})=>e(B,{dimensionX:"fill",alignment:"leftTop",...n,className:`${sg} ${n.className}`,children:t}))),dg=a((({children:t,...n})=>e(B,{dimensionX:"fill",alignment:"leftTop",...n,className:`${lg} ${n.className}`,children:t}))),hg=a((({children:t,...n})=>e(B,{dimensionX:"fill",alignment:"leftTop",...n,className:`${cg} ${n.className}`,children:t}))),pg=a((({children:t,...n})=>e(B,{dimensionX:"fill",dimensionY:"fill",direction:"vertical",gap:0,...n,className:`${n.className} ${ag}`,children:t})));pg.Header=ug,pg.Content=dg,pg.Footer=hg;const fg=({headerProps:n,chartProps:r})=>t(pg,{className:ig.dashboardItem,children:[t(pg.Header,{children:[e(V,{children:n?.content}),n?.suffix||e(xs,{color:"transparent",shape:"circle",className:ig.settingButton,children:e(Ga,{name:"cog",className:ig.settingIcon,size:"xs"})})]}),e(pg.Content,{children:e(Zf,{type:r?.type,data:r?.data,options:r?.options,className:ig.chart})})]});var mg,gg={exports:{}};
50
50
  /*!
51
51
  Copyright (c) 2018 Jed Watson.
52
52
  Licensed under the MIT License (MIT), see
@@ -88,7 +88,7 @@ const lF=e=>e&&e.enabled&&e.modifierKey,cF=(e,t)=>e&&t[e+"Key"],uF=(e,t)=>e&&!t[
88
88
  * https://www.chartjs.org
89
89
  * (c) 2022 chartjs-adapter-date-fns Contributors
90
90
  * Released under the MIT license
91
- */(0,o))return NaN;return n*(r*cH+o*lH)}(o.timezone),isNaN(s)?n():hH(a+l+s,t?.in)}const yV={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bV=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,_V=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,xV=/^([+-])(\d{2})(?::?(\d{2}))?$/;function wV(e){return e?parseInt(e):1}function SV(e){return e&&parseFloat(e.replace(",","."))||0}const kV=[31,null,31,30,31,30,31,31,30,31,30,31];function CV(e){return e%400==0||e%4==0&&e%100!=0}const EV={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};var MV;wd._date.override({_id:"date-fns",formats:function(){return EV},parse:function(e,t){if(null==e)return null;const n=typeof e;return"number"===n||e instanceof Date?e=hH(e):"string"===n&&(e="string"==typeof t?gV(e,t,new Date,this.options):vV(e,this.options)),EH(e)?e.getTime():null},format:function(e,t){return function(e,t,n){const r=vH(),o=n?.locale??r.locale??YH,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=hH(e,n?.in);if(!EH(s))throw new RangeError("Invalid time value");let l=t.match(vW).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,cW[t])(e,o.formatLong):e})).join("").match(gW).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:xW(e)};if(rW[t])return{isToken:!0,value:e};if(t.match(_W))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&fW(i)||!n?.useAdditionalDayOfYearTokens&&pW(i))&&mW(i,t,String(e)),(0,rW[i[0]])(s,i,o.localize,c)})).join("")}(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return mH(e,t);case"second":return function(e,t,n){return mH(e,1e3*t,n)}(e,t);case"minute":return function(e,t,n){const r=hH(e,n?.in);return r.setTime(r.getTime()+t*lH),r}(e,t);case"hour":return function(e,t,n){return mH(e,t*cH,n)}(e,t);case"day":return pH(e,t);case"week":return function(e,t,n){return pH(e,7*t,n)}(e,t);case"month":return fH(e,t);case"quarter":return function(e,t,n){return fH(e,3*t,n)}(e,t);case"year":return function(e,t,n){return fH(e,12*t,n)}(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return TH(e,t);case"second":return function(e,t,n){const r=TH(e,t)/1e3;return OH(n?.roundingMethod)(r)}(e,t);case"minute":return function(e,t,n){const r=TH(e,t)/lH;return OH(n?.roundingMethod)(r)}(e,t);case"hour":return function(e,t,n){const[r,o]=wH(n?.in,e,t),i=(+r-+o)/cH;return OH(n?.roundingMethod)(i)}(e,t);case"day":return MH(e,t);case"week":return function(e,t,n){const r=MH(e,t,n)/7;return OH(n?.roundingMethod)(r)}(e,t);case"month":return AH(e,t);case"quarter":return function(e,t,n){const r=AH(e,t,n)/3;return OH(n?.roundingMethod)(r)}(e,t);case"year":return LH(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return function(e,t){const n=hH(e,t?.in);return n.setMilliseconds(0),n}(e);case"minute":return function(e,t){const n=hH(e,t?.in);return n.setSeconds(0,0),n}(e);case"hour":return function(e,t){const n=hH(e,t?.in);return n.setMinutes(0,0,0),n}(e);case"day":return SH(e);case"week":return yH(e);case"isoWeek":return yH(e,{weekStartsOn:+n});case"month":return function(e,t){const n=hH(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e);case"quarter":return function(e,t){const n=hH(e,t?.in),r=n.getMonth(),o=r-r%3;return n.setMonth(o,1),n.setHours(0,0,0,0),n}(e);case"year":return IH(e);default:return e}},endOf:function(e,t){switch(t){case"second":return function(e,t){const n=hH(e,t?.in);return n.setMilliseconds(999),n}(e);case"minute":return function(e,t){const n=hH(e,t?.in);return n.setSeconds(59,999),n}(e);case"hour":return function(e,t){const n=hH(e,t?.in);return n.setMinutes(59,59,999),n}(e);case"day":return NH(e);case"week":return function(e,t){const n=vH(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=hH(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}(e);case"month":return DH(e);case"quarter":return function(e,t){const n=hH(e,t?.in),r=n.getMonth(),o=r-r%3+3;return n.setMonth(o,0),n.setHours(23,59,59,999),n}(e);case"year":return function(e,t){const n=hH(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e);default:return e}}}),function(e){!function(e){e.isTypeLocation=e=>"object"==typeof e&&null!==e&&"string"==typeof e.type&&Array.isArray(e.coordinates)&&2===e.coordinates.length&&e.coordinates.every((e=>"number"==typeof e))}(e.api||(e.api={})),function(e){e.timeUnitsInSeconds={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3},e.unitMapper=e=>e<=10?"second":e<=120?"minute":e<=2160?"hour":e<=43200?"day":e<=50400?"week":e<=1296e3?"month":e<=9331200?"quarter":"year",e.getDiffInMinutes=(e,t)=>Math.abs(t.getTime()-e.getTime())/6e4,e.formatDateToEnUs=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(e)}(e.time||(e.time={})),function(e){e.hexToHSL=e=>{let t=0,n=0,r=0;if(4===e.length)t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16);else{if(7!==e.length)throw new Error("Invalid HEX format");t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)}t/=255,n/=255,r/=255;const o=Math.max(t,n,r),i=Math.min(t,n,r);let a=0,s=0,l=(o+i)/2;if(o!==i){const e=o-i;switch(s=l>.5?e/(2-o-i):e/(o+i),o){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return{h:a,s:s,l:l}},e.hslToHex=(e,t,n)=>{const r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e);let o,i,a;if(0===t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=r(l,s,e+1/3),i=r(l,s,e),a=r(l,s,e-1/3)}return`#${Math.round(255*o).toString(16).padStart(2,"0")}${Math.round(255*i).toString(16).padStart(2,"0")}${Math.round(255*a).toString(16).padStart(2,"0")}`},e.hexToRgb=e=>{let t=0,n=0,r=0;return 7===e.length&&(t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),`${t}, ${n}, ${r}`}}(e.color||(e.color={}))}(MV||(MV={}));var PV="DraggableBar-module_bar__TpW1R";const OV=({x:t,y:n,maxX:r,minX:o,maxY:i,minY:a,height:l,style:c,onChange:u,onDown:d,onUp:h})=>{const p=s(null),f=s(!1),m=s(0),g=s(0),v=e=>{if(!f.current)return;const t=e.clientX-m.current,i=g.current+t;(!o||i>=o)&&(!r||i<=r)&&u?.({x:i,y:n})},y=()=>{f.current=!1,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y),h?.()};return e("div",{ref:p,onMouseDown:e=>{f.current=!0,m.current=e.clientX,g.current=t,document.addEventListener("mousemove",v),document.addEventListener("mouseup",y),d?.()},className:PV,style:{...c,left:`${t}px`,bottom:`${n}px`,height:`${l}px`}})};Uh.register(yf,wf,gp,Yf,Gp,ff,Up,sj,oH);var TV=a((({dateRange:n,annotationRange:r,data:o,showArrows:i=!0,onPan:a,onClickBar:c,onChangeDateRange:d,...h})=>{const p=s(null),[f,m]=u(null),[g,v]=u(null),y=()=>{const e=MV.time.getDiffInMinutes(n.from,n.to);return MV.time.unitMapper(e)},b=e=>{const t=p?.current?.scales.x.ticks;if(!t)return;const n=.1*t.length,r=y(),o=n*MV.time.timeUnitsInSeconds[r];a?.(e,o)},_={responsive:!0,onClick:e=>{const t=p.current;if(!t)return;const n=t.getElementsAtEventForMode(e,"nearest",{intersect:!0},!1);if(!n.length)return;const r=n[0],o=t.data?.labels?.[r.index];o&&c?.(new Date(o))},scales:{x:{type:"time",time:{unit:y(),displayFormats:{[y()]:"p"}},title:{display:!1},grid:{display:!1},border:{width:3,color:"#d5e3fa"}},y:{title:{display:!1},grid:{display:!1},border:{width:0},ticks:{padding:10},offset:!0,beginAtZero:!0}},plugins:{legend:{display:!1},annotation:{annotations:r?{selectedBox:{type:"box",drawTime:"beforeDraw",xMin:r?.from.toISOString(),xMax:r?.to.toISOString(),backgroundColor:"#eaf0fd",borderWidth:0}}:{}}}};l((()=>{p.current?.scales.y.right&&(m({x:p.current?.scales.y.right,y:30}),v({x:p.current?.width,y:30}))}),[]);const x=(e,t)=>{const r=p?.current?.scales?.x,o=r?.getValueForPixel(e?.x||0);o&&d?.({...n,[t]:new Date(o)})};return e(H,{dimensionX:"fill",alignment:"top",gap:0,prefix:{children:i&&e(xs,{variant:"filled",color:"transparent",className:V$,onClick:()=>b("left"),children:e(Ga,{name:"chevronLeft",size:32})})},root:{dimensionX:"fill",dimensionY:"fill",children:t(B,{className:Y$,dimensionX:"fill",dimensionY:"fill",children:[e(V,{className:`${X$} ${q$}`,children:MV.time.formatDateToEnUs(n.from)}),f&&e(OV,{x:f.x,y:f.y,minX:p.current?.scales.y.right,maxX:g?.x,height:p.current?.scales.y.height,onChange:m,onUp:()=>x(f,"from")}),e(rF,{ref:p,options:_,data:o}),g&&e(OV,{x:g.x,y:g.y,minX:f?.x,maxX:p.current?.width,height:p.current?.scales.y.height,onChange:v,onUp:()=>x(g,"to")}),e(V,{className:`${X$} ${U$}`,children:MV.time.formatDateToEnUs(n.to)})]})},suffix:{children:i&&e(xs,{variant:"filled",color:"transparent",className:V$,onClick:()=>b("right"),children:e(Ga,{name:"chevronRight",size:32})})},...h})})),NV={exports:{}},DV={};function AV(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function LV(e){return function(t,n,r,o){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r,o);var i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var s=e(t,n,r,o);return o.delete(t),o.delete(n),s}}function IV(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function zV(e){return e.constructor===Object||null==e.constructor}function RV(e){return"function"==typeof e.then}function $V(e,t){return e===t||e!=e&&t!=t}var FV=Object.prototype.toString;function jV(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.areRegExpsEqual,a=e.areSetsEqual,s=(0,e.createIsNestedEqual)(l);function l(e,l,c){if(e===l)return!0;if(!e||!l||"object"!=typeof e||"object"!=typeof l)return e!=e&&l!=l;if(zV(e)&&zV(l))return o(e,l,s,c);var u=Array.isArray(e),d=Array.isArray(l);if(u||d)return u===d&&t(e,l,s,c);var h=FV.call(e);return h===FV.call(l)&&("[object Date]"===h?n(e,l,s,c):"[object RegExp]"===h?i(e,l,s,c):"[object Map]"===h?r(e,l,s,c):"[object Set]"===h?a(e,l,s,c):"[object Object]"===h||"[object Arguments]"===h?!RV(e)&&!RV(l)&&o(e,l,s,c):("[object Boolean]"===h||"[object Number]"===h||"[object String]"===h)&&$V(e.valueOf(),l.valueOf()))}return l}function BV(e,t,n,r){var o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n(e[o],t[o],o,o,e,t,r))return!1;return!0}var HV=LV(BV);function WV(e,t){return $V(e.valueOf(),t.valueOf())}function VV(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={},a=0;return e.forEach((function(s,l){if(o){var c=!1,u=0;t.forEach((function(o,d){c||i[u]||!(c=n(l,d,a,u,e,t,r)&&n(s,o,l,d,e,t,r))||(i[u]=!0),u++})),a++,o=c}})),o}var YV=LV(VV),XV=Object.prototype.hasOwnProperty;function qV(e,t,n,r){var o,i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(;a-- >0;){if("_owner"===(o=i[a])){var s=!!e.$$typeof,l=!!t.$$typeof;if((s||l)&&s!==l)return!1}if(!XV.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var UV=LV(qV);function ZV(e,t){return e.source===t.source&&e.flags===t.flags}function GV(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={};return e.forEach((function(a,s){if(o){var l=!1,c=0;t.forEach((function(o,u){l||i[c]||!(l=n(a,o,s,u,e,t,r))||(i[c]=!0),c++})),o=l}})),o}var KV=LV(GV),JV=Object.freeze({areArraysEqual:BV,areDatesEqual:WV,areMapsEqual:VV,areObjectsEqual:qV,areRegExpsEqual:ZV,areSetsEqual:GV,createIsNestedEqual:AV}),QV=Object.freeze({areArraysEqual:HV,areDatesEqual:WV,areMapsEqual:YV,areObjectsEqual:UV,areRegExpsEqual:ZV,areSetsEqual:KV,createIsNestedEqual:AV}),eY=jV(JV);var tY=jV(IV(JV,{createIsNestedEqual:function(){return $V}}));var nY=jV(QV);var rY=jV(IV(QV,{createIsNestedEqual:function(){return $V}}));var oY,iY=Object.freeze({__proto__:null,circularDeepEqual:function(e,t){return nY(e,t,new WeakMap)},circularShallowEqual:function(e,t){return rY(e,t,new WeakMap)},createCustomCircularEqual:function(e){var t=jV(IV(QV,e(QV)));return function(e,n,r){return void 0===r&&(r=new WeakMap),t(e,n,r)}},createCustomEqual:function(e){return jV(IV(JV,e(JV)))},deepEqual:function(e,t){return eY(e,t,void 0)},sameValueZeroEqual:$V,shallowEqual:function(e,t){return tY(e,t,void 0)}}),aY=_e(iY),sY={exports:{}};function lY(){if(oY)return sY.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return oY=1,sY.exports=t,sY.exports.clsx=t,sY.exports}var cY,uY,dY,hY={};function pY(){if(dY)return hY;dY=1,Object.defineProperty(hY,"__esModule",{value:!0}),hY.bottom=i,hY.childrenEqual=function(e,r){return(0,t.deepEqual)(n.default.Children.map(e,(e=>e?.key)),n.default.Children.map(r,(e=>e?.key)))&&(0,t.deepEqual)(n.default.Children.map(e,(e=>e?.props["data-grid"])),n.default.Children.map(r,(e=>e?.props["data-grid"])))},hY.cloneLayout=a,hY.cloneLayoutItem=l,hY.collides=c,hY.compact=u,hY.compactItem=p,hY.compactType=function(e){const{verticalCompact:t,compactType:n}=e||{};return!1===t?null:n},hY.correctBounds=f,hY.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},hY.fastRGLPropsEqual=void 0,hY.getAllCollisions=v,hY.getFirstCollision=g,hY.getLayoutItem=m,hY.getStatics=y,hY.modifyLayout=s,hY.moveElement=b,hY.moveElementAwayFromCollision=_,hY.noop=void 0,hY.perc=function(e){return 100*e+"%"},hY.resizeItemInDirection=function(e,t,n,r){const o=O[e];return o?o(t,{...t,...n},r):n},hY.setTopLeft=function(e){let{top:t,left:n,width:r,height:o}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${o}px`,position:"absolute"}},hY.setTransform=function(e){let{top:t,left:n,width:r,height:o}=e;const i=`translate(${n}px,${t}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${r}px`,height:`${o}px`,position:"absolute"}},hY.sortLayoutItems=T,hY.sortLayoutItemsByColRow=D,hY.sortLayoutItemsByRowCol=N,hY.synchronizeLayoutWithChildren=function(e,t,o,a,s){e=e||[];const c=[];n.default.Children.forEach(t,(t=>{if(null==t?.key)return;const n=m(e,String(t.key)),o=t.props["data-grid"];n&&null==o?c.push(l(n)):o?(r||A([o],"ReactGridLayout.children"),c.push(l({...o,i:t.key}))):c.push(l({w:1,h:1,x:0,y:i(c),i:String(t.key)}))}));const d=f(c,{cols:o});return s?d:u(d,a,o)},hY.validateLayout=A,hY.withLayoutItem=function(e,t,n){let r=m(e,t);return r?(r=n(l(r)),[e=s(e,r),r]):[e,null]};var e,t=aY,n=(e=o)&&e.__esModule?e:{default:e};const r="production"===process.env.NODE_ENV;function i(e){let t,n=0;for(let r=0,o=e.length;r<o;r++)t=e[r].y+e[r].h,t>n&&(n=t);return n}function a(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=l(e[n]);return t}function s(e,t){const n=Array(e.length);for(let r=0,o=e.length;r<o;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function l(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function c(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function u(e,t,n,r){const o=y(e),i=T(e,t),a=Array(e.length);for(let s=0,c=i.length;s<c;s++){let c=l(i[s]);c.static||(c=p(o,c,t,n,i,r),o.push(c)),a[e.indexOf(i[s])]=c,c.moved=!1}return a}hY.fastRGLPropsEqual=(uY||(uY=1,cY=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}),cY);const d={x:"w",y:"h"};function h(e,t,n,r){const o=d[r];t[r]+=1;for(let i=e.map((e=>e.i)).indexOf(t.i)+1;i<e.length;i++){const a=e[i];if(!a.static){if(a.y>t.y+t.h)break;c(t,a)&&h(e,a,n+t[o],r)}}t[r]=n}function p(e,t,n,r,o,a){const s="horizontal"===n;if("vertical"===n)for(t.y=Math.min(i(e),t.y);t.y>0&&!g(e,t);)t.y--;else if(s)for(;t.x>0&&!g(e,t);)t.x--;let l;for(;(l=g(e,t))&&(null!==n||!a);)if(s?h(o,t,l.x+l.w,"x"):h(o,t,l.y+l.h,"y"),s&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!g(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function f(e,t){const n=y(e);for(let r=0,o=e.length;r<o;r++){const o=e[r];if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),o.static)for(;g(n,o);)o.y++;else n.push(o)}return e}function m(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function g(e,t){for(let n=0,r=e.length;n<r;n++)if(c(e[n],t))return e[n]}function v(e,t){return e.filter((e=>c(e,t)))}function y(e){return e.filter((e=>e.static))}function b(e,t,n,r,o,i,s,l,c){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;t.i,String(n),String(r),t.x,t.y;const u=t.x,d=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;let h=T(e,s);("vertical"===s&&"number"==typeof r?d>=r:"horizontal"===s&&"number"==typeof n&&u>=n)&&(h=h.reverse());const p=v(h,t),f=p.length>0;if(f&&c)return a(e);if(f&&i)return t.i,t.x=u,t.y=d,t.moved=!1,e;for(let n=0,r=p.length;n<r;n++){const r=p[n];t.i,t.x,t.y,r.i,r.x,r.y,r.moved||(e=r.static?_(e,r,t,o,s):_(e,t,r,o,s))}return e}function _(e,t,n,r,o,i){const a="horizontal"===o,s="vertical"===o,l=t.static;if(r){r=!1;const i={x:a?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},c=g(e,i),u=c&&c.y+c.h>t.y,d=c&&t.x+t.w>c.x;if(!c)return n.i,i.x,i.y,b(e,n,a?i.x:void 0,s?i.y:void 0,r,l,o);if(u&&s)return b(e,n,void 0,t.y+1,r,l,o);if(u&&null==o)return t.y=n.y,n.y=n.y+n.h,e;if(d&&a)return b(e,t,n.x,void 0,r,l,o)}const c=a?n.x+1:void 0,u=s?n.y+1:void 0;return null==c&&null==u?e:b(e,n,a?n.x+1:void 0,s?n.y+1:void 0,r,l,o)}const x=(e,t,n,r)=>e+n>r?t:n,w=(e,t,n)=>e<0?t:n,S=e=>Math.max(0,e),k=e=>Math.max(0,e),C=(e,t,n)=>{let{left:r,height:o,width:i}=t;const a=e.top-(o-e.height);return{left:r,width:i,height:w(a,e.height,o),top:k(a)}},E=(e,t,n)=>{let{top:r,left:o,height:i,width:a}=t;return{top:r,height:i,width:x(e.left,e.width,a,n),left:S(o)}},M=(e,t,n)=>{let{top:r,height:o,width:i}=t;const a=e.left-(i-e.width);return{height:o,width:a<0?e.width:x(e.left,e.width,i,n),top:k(r),left:S(a)}},P=(e,t,n)=>{let{top:r,left:o,height:i,width:a}=t;return{width:a,left:o,height:w(r,e.height,i),top:k(r)}},O={n:C,ne:function(){return C(arguments.length<=0?void 0:arguments[0],E(...arguments))},e:E,se:function(){return P(arguments.length<=0?void 0:arguments[0],E(...arguments))},s:P,sw:function(){return P(arguments.length<=0?void 0:arguments[0],M(...arguments))},w:M,nw:function(){return C(arguments.length<=0?void 0:arguments[0],M(...arguments))}};function T(e,t){return"horizontal"===t?D(e):"vertical"===t?N(e):e}function N(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function D(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let r=0,o=e.length;r<o;r++){const o=e[r];for(let e=0;e<n.length;e++)if("number"!=typeof o[n[e]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[e]+" must be a number!")}}return hY.noop=()=>{},hY}var fY,mY={};function gY(){if(fY)return mY;function e(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-2*n[0])/o}function t(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function n(e,t,n){return Math.max(Math.min(e,n),t)}return fY=1,Object.defineProperty(mY,"__esModule",{value:!0}),mY.calcGridColWidth=e,mY.calcGridItemPosition=function(n,r,o,i,a,s){const{margin:l,containerPadding:c,rowHeight:u}=n,d=e(n),h={};s&&s.resizing?(h.width=Math.round(s.resizing.width),h.height=Math.round(s.resizing.height)):(h.width=t(i,d,l[0]),h.height=t(a,u,l[1]));s&&s.dragging?(h.top=Math.round(s.dragging.top),h.left=Math.round(s.dragging.left)):s&&s.resizing&&"number"==typeof s.resizing.top&&"number"==typeof s.resizing.left?(h.top=Math.round(s.resizing.top),h.left=Math.round(s.resizing.left)):(h.top=Math.round((u+l[1])*o+c[1]),h.left=Math.round((d+l[0])*r+c[0]));return h},mY.calcGridItemWHPx=t,mY.calcWH=function(t,r,o,i,a,s){const{margin:l,maxRows:c,cols:u,rowHeight:d}=t,h=e(t);let p=Math.round((r+l[0])/(h+l[0])),f=Math.round((o+l[1])/(d+l[1])),m=n(p,0,u-i),g=n(f,0,c-a);-1!==["sw","w","nw"].indexOf(s)&&(m=n(p,0,u));-1!==["nw","n","ne"].indexOf(s)&&(g=n(f,0,c));return{w:m,h:g}},mY.calcXY=function(t,r,o,i,a){const{margin:s,cols:l,rowHeight:c,maxRows:u}=t,d=e(t);let h=Math.round((o-s[0])/(d+s[0])),p=Math.round((r-s[1])/(c+s[1]));return h=n(h,0,l-i),p=n(p,0,u-a),{x:h,y:p}},mY.clamp=n,mY}var vY={},yY={exports:{}},bY={};function _Y(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=_Y(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xY(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=_Y(e))&&(r&&(r+=" "),r+=t);return r}var wY,SY=_e(Object.freeze({__proto__:null,clsx:xY,default:xY})),kY={},CY={};function EY(){if(wY)return CY;return wY=1,Object.defineProperty(CY,"__esModule",{value:!0}),CY.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},CY.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},CY.int=function(e){return parseInt(e,10)},CY.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},CY.isNum=function(e){return"number"==typeof e&&!isNaN(e)},CY}var MY,PY,OY={};function TY(){if(PY)return kY;PY=1,Object.defineProperty(kY,"__esModule",{value:!0}),kY.addClassName=a,kY.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},kY.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&a(e.body,"react-draggable-transparent-selection")},kY.createCSSTransform=function(e,n){const r=i(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},kY.createSVGTransform=function(e,t){return i(e,t,"")},kY.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},kY.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},kY.getTranslation=i,kY.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},kY.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},kY.matchesSelector=o,kY.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(o(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},kY.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},kY.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},kY.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},kY.removeClassName=s,kY.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},kY.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&s(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var e=EY(),t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(function(){if(MY)return OY;MY=1,Object.defineProperty(OY,"__esModule",{value:!0}),OY.browserPrefixToKey=n,OY.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},OY.default=void 0,OY.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const o=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(r in o)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in o)return e[t];return""}function n(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}return OY.default=t(),OY}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function o(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[r])&&t[r](n)}function i(e,t,n){let{x:r,y:o}=e,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(e,", ").concat(r,")")+i}return i}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function s(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return kY}var NY,DY={};function AY(){if(NY)return DY;NY=1,Object.defineProperty(DY,"__esModule",{value:!0}),DY.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},DY.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},DY.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},DY.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},DY.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=n(r);if("string"==typeof a){const{ownerDocument:n}=s,r=n.defaultView;let o;if(o="parent"===a?s.parentNode:n.querySelector(a),!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,l=r.getComputedStyle(s),c=r.getComputedStyle(i);a={left:-s.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-s.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},DY.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),s=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,s,o.props.scale)},DY.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=EY(),t=TY();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return DY}var LY,IY,zY,RY,$Y={},FY={};function jY(){if(LY)return FY;return LY=1,Object.defineProperty(FY,"__esModule",{value:!0}),FY.default=function(){},FY}function BY(){if(IY)return $Y;IY=1,Object.defineProperty($Y,"__esModule",{value:!0}),$Y.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=l(Ue()),n=l(M),r=TY(),i=AY(),a=EY(),s=l(jY());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h;class f extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const o=(0,r.getTouchIdentifier)(e);this.touchIdentifier=o;const a=(0,i.getControlPosition)(e,o,this);if(null==a)return;const{x:l,y:c}=a,u=(0,i.createCoreData)(this,l,c);(0,s.default)("DraggableCore: handleDragStart: %j",u),(0,s.default)("calling",this.props.onStart);!1!==this.props.onStart(e,u)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=c,(0,r.addEvent)(n,p.move,this.handleDrag),(0,r.addEvent)(n,p.stop,this.handleDragStop))})),u(this,"handleDrag",(e=>{const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,i.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,i.createCoreData)(this,n,r);(0,s.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),u(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:o}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=o-this.lastY||0;[e,t]=(0,i.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,o=this.lastY+t}const a=(0,i.createCoreData)(this,n,o);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(l.ownerDocument),(0,s.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,s.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(l.ownerDocument,p.move,this.handleDrag),(0,r.removeEvent)(l.ownerDocument,p.stop,this.handleDragStop))})),u(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),u(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),u(this,"onTouchStart",(e=>(p=d,this.handleDragStart(e)))),u(this,"onTouchEnd",(e=>(p=d,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,d.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,h.move,this.handleDrag),(0,r.removeEvent)(t,d.move,this.handleDrag),(0,r.removeEvent)(t,h.stop,this.handleDragStop),(0,r.removeEvent)(t,d.stop,this.handleDragStop),(0,r.removeEvent)(e,d.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}return $Y.default=f,u(f,"displayName","DraggableCore"),u(f,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),u(f,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),$Y}function HY(){return zY||(zY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),n=d(Ue()),r=d(M),i=d(SY),a=TY(),s=AY(),l=EY(),c=d(BY()),u=d(jY());function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function f(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,s.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:u,defaultClassNameDragged:d,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},y=null;const b=!Boolean(h)||this.state.dragging,_=h||o,x={x:(0,s.canDragX)(this)&&b?this.state.x:_.x,y:(0,s.canDragY)(this)&&b?this.state.y:_.y};this.state.isElementSVG?y=(0,a.createSVGTransform)(x,f):v=(0,a.createCSSTransform)(x,f);const w=(0,i.default)(r.props.className||"",l,{[u]:this.state.dragging,[d]:this.state.dragged});return t.createElement(c.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:w,style:{...r.props.style,...v},transform:y}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(m,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(bY)),bY}function WY(){if(RY)return yY.exports;RY=1;const{default:e,DraggableCore:t}=HY();return yY.exports=e,yY.exports.default=e,yY.exports.DraggableCore=t,yY.exports}var VY,YY={exports:{}},XY={},qY={};function UY(){if(VY)return qY;VY=1,qY.__esModule=!0,qY.cloneElement=function(e,n){n.style&&e.props.style&&(n.style=r(r({},e.props.style),n.style));n.className&&e.props.className&&(n.className=e.props.className+" "+n.className);return t.default.cloneElement(e,n)};var e,t=(e=o)&&e.__esModule?e:{default:e};function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return qY}var ZY,GY,KY={};function JY(){if(ZY)return KY;ZY=1,KY.__esModule=!0,KY.resizableProps=void 0;var e,t=(e=Ue())&&e.__esModule?e:{default:e};WY();var n={axis:t.default.oneOf(["both","x","y","none"]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o,i=n[0];return"both"===i.axis||"y"===i.axis?(o=t.default.number).isRequired.apply(o,n):t.default.number.apply(t.default,n)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:t.default.number,width:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o,i=n[0];return"both"===i.axis||"x"===i.axis?(o=t.default.number).isRequired.apply(o,n):t.default.number.apply(t.default,n)}};return KY.resizableProps=n,KY}function QY(){if(GY)return XY;GY=1,XY.__esModule=!0,XY.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=WY(),n=UY(),r=JY(),i=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var h=function(r){var o,a;function l(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=r.call.apply(r,[this].concat(n))||this).handleRefs={},e.lastHandleRect=null,e.slack=null,e}a=r,(o=l).prototype=Object.create(a.prototype),o.prototype.constructor=o,d(o,a);var u=l.prototype;return u.componentWillUnmount=function(){this.resetData()},u.resetData=function(){this.lastHandleRect=this.slack=null},u.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,o=n.maxConstraints,i=n.lockAspectRatio;if(!r&&!o&&!i)return[e,t];if(i){var a=this.props.width/this.props.height,s=e-this.props.width,l=t-this.props.height;Math.abs(s)>Math.abs(l*a)?t=e/a:e=t*a}var c=e,u=t,d=this.slack||[0,0],h=d[0],p=d[1];return e+=h,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),o&&(e=Math.min(o[0],e),t=Math.min(o[1],t)),this.slack=[h+(c-e),p+(u-t)],[e,t]},u.resizeHandler=function(e,t){var n=this;return function(r,o){var i=o.node,a=o.deltaX,s=o.deltaY;"onResizeStart"===e&&n.resetData();var l=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,c=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(l||c){var u=t[0],d=t[t.length-1],h=i.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===d)a+=h.left-n.lastHandleRect.left;if("n"===u)s+=h.top-n.lastHandleRect.top}n.lastHandleRect=h,"w"===d&&(a=-a),"n"===u&&(s=-s);var p=n.props.width+(l?a/n.props.transformScale:0),f=n.props.height+(c?s/n.props.transformScale:0),m=n.runConstraints(p,f);p=m[0],f=m[1];var g=p!==n.props.width||f!==n.props.height,v="function"==typeof n.props[e]?n.props[e]:null;v&&!("onResize"===e&&!g)&&(null==r.persist||r.persist(),v(r,{node:i,size:{width:p,height:f},handle:t})),"onResizeStop"===e&&n.resetData()}}},u.renderResizeHandle=function(t,n){var r=this.props.handle;if(!r)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:n});if("function"==typeof r)return r(t,n);var o=c({ref:n},"string"==typeof r.type?{}:{handleAxis:t});return e.cloneElement(r,o)},u.render=function(){var r=this,o=this.props,a=o.children,l=o.className,u=o.draggableOpts;o.width,o.height,o.handle,o.handleSize,o.lockAspectRatio,o.axis,o.minConstraints,o.maxConstraints,o.onResize,o.onResizeStop,o.onResizeStart;var d=o.resizeHandles;o.transformScale;var h=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(o,i);return(0,n.cloneElement)(a,c(c({},h),{},{className:(l?l+" ":"")+"react-resizable",children:[].concat(a.props.children,d.map((function(n){var o,i=null!=(o=r.handleRefs[n])?o:r.handleRefs[n]=e.createRef();return e.createElement(t.DraggableCore,s({},u,{nodeRef:i,key:"resizableHandle-"+n,onStop:r.resizeHandler("onResizeStop",n),onStart:r.resizeHandler("onResizeStart",n),onDrag:r.resizeHandler("onResize",n)}),r.renderResizeHandle(n,i))})))}))},l}(e.Component);return XY.default=h,h.propTypes=r.resizableProps,h.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},XY}var eX,tX,nX={};function rX(){if(eX)return nX;eX=1,nX.__esModule=!0,nX.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=a(Ue()),n=a(QY()),r=JY(),i=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function a(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var p=function(t){var r,o;function a(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).state={width:e.props.width,height:e.props.height,propsWidth:e.props.width,propsHeight:e.props.height},e.onResize=function(t,n){var r=n.size;e.props.onResize?(null==t.persist||t.persist(),e.setState(r,(function(){return e.props.onResize&&e.props.onResize(t,n)}))):e.setState(r)},e}return o=t,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,h(r,o),a.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},a.prototype.render=function(){var t=this.props,r=t.handle,o=t.handleSize;t.onResize;var a=t.onResizeStart,s=t.onResizeStop,c=t.draggableOpts,d=t.minConstraints,h=t.maxConstraints,p=t.lockAspectRatio,f=t.axis;t.width,t.height;var m=t.resizeHandles,g=t.style,v=t.transformScale,y=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,i);return e.createElement(n.default,{axis:f,draggableOpts:c,handle:r,handleSize:o,height:this.state.height,lockAspectRatio:p,maxConstraints:h,minConstraints:d,onResizeStart:a,onResize:this.onResize,onResizeStop:s,resizeHandles:m,transformScale:v,width:this.state.width},e.createElement("div",l({},y,{style:u(u({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},a}(e.Component);return nX.default=p,p.propTypes=u(u({},r.resizableProps),{},{children:t.default.element}),nX}var oX,iX,aX,sX={};function lX(){if(oX)return sX;oX=1,Object.defineProperty(sX,"__esModule",{value:!0}),sX.resizeHandleType=sX.resizeHandleAxesType=sX.default=void 0;var e=n(Ue()),t=n(o);function n(e){return e&&e.__esModule?e:{default:e}}const r=sX.resizeHandleAxesType=e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),i=sX.resizeHandleType=e.default.oneOfType([e.default.node,e.default.func]);return sX.default={className:e.default.string,style:e.default.object,width:e.default.number,autoSize:e.default.bool,cols:e.default.number,draggableCancel:e.default.string,draggableHandle:e.default.string,verticalCompact:function(e){!1===e.verticalCompact&&"production"!==process.env.NODE_ENV&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:e.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&pY().validateLayout(t,"layout")},margin:e.default.arrayOf(e.default.number),containerPadding:e.default.arrayOf(e.default.number),rowHeight:e.default.number,maxRows:e.default.number,isBounded:e.default.bool,isDraggable:e.default.bool,isResizable:e.default.bool,allowOverlap:e.default.bool,preventCollision:e.default.bool,useCSSTransforms:e.default.bool,transformScale:e.default.number,isDroppable:e.default.bool,resizeHandles:r,resizeHandle:i,onLayoutChange:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onDragStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,onResizeStop:e.default.func,onDrop:e.default.func,droppingItem:e.default.shape({i:e.default.string.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired}),children:function(e,n){const r=e[n],o={};t.default.Children.forEach(r,(function(e){if(null!=e?.key){if(o[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');o[e.key]=!0}}))},innerRef:e.default.any},sX}function cX(){if(iX)return vY;iX=1,Object.defineProperty(vY,"__esModule",{value:!0}),vY.default=void 0;var e=c(o),t=c(Ue()),n=WY(),r=(tX||(tX=1,YY.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},YY.exports.Resizable=QY().default,YY.exports.ResizableBox=rX().default),YY.exports),i=pY(),a=gY(),s=lX(),l=c(lY());function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends e.default.Component{constructor(){super(...arguments),u(this,"state",{resizing:null,dragging:null,className:""}),u(this,"elementRef",e.default.createRef()),u(this,"onDragStart",((e,t)=>{let{node:n}=t;const{onDragStart:r,transformScale:o}=this.props;if(!r)return;const i={top:0,left:0},{offsetParent:s}=n;if(!s)return;const l=s.getBoundingClientRect(),c=n.getBoundingClientRect(),u=c.left/o,d=l.left/o,h=c.top/o,p=l.top/o;i.left=u-d+s.scrollLeft,i.top=h-p+s.scrollTop,this.setState({dragging:i});const{x:f,y:m}=(0,a.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return r.call(this,this.props.i,f,m,{e:e,node:n,newPosition:i})})),u(this,"onDrag",((e,t)=>{let{node:n,deltaX:r,deltaY:o}=t;const{onDrag:i}=this.props;if(!i)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let s=this.state.dragging.top+o,l=this.state.dragging.left+r;const{isBounded:c,i:u,w:d,h:h,containerWidth:p}=this.props,f=this.getPositionParams();if(c){const{offsetParent:e}=n;if(e){const{margin:t,rowHeight:n,containerPadding:r}=this.props,o=e.clientHeight-(0,a.calcGridItemWHPx)(h,n,t[1]);s=(0,a.clamp)(s-r[1],0,o);const i=(0,a.calcGridColWidth)(f),c=p-(0,a.calcGridItemWHPx)(d,i,t[0]);l=(0,a.clamp)(l-r[0],0,c)}}const m={top:s,left:l};this.setState({dragging:m});const{containerPadding:g}=this.props,{x:v,y:y}=(0,a.calcXY)(f,s-g[1],l-g[0],d,h);return i.call(this,u,v,y,{e:e,node:n,newPosition:m})})),u(this,"onDragStop",((e,t)=>{let{node:n}=t;const{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:o,h:i,i:s,containerPadding:l}=this.props,{left:c,top:u}=this.state.dragging,d={top:u,left:c};this.setState({dragging:null});const{x:h,y:p}=(0,a.calcXY)(this.getPositionParams(),u-l[1],c-l[0],o,i);return r.call(this,s,h,p,{e:e,node:n,newPosition:d})})),u(this,"onResizeStop",((e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStop"))),u(this,"onResizeStart",((e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStart"))),u(this,"onResize",((e,t,n)=>this.onResizeHandler(e,t,n,"onResize")))}shouldComponentUpdate(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;const n=(0,a.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,a.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,i.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const n=this.elementRef.current;if(!n)return;const r=e.droppingPosition||{left:0,top:0},{dragging:o}=this.state,i=o&&t.left!==r.left||t.top!==r.top;if(o){if(i){const e=t.left-o.left,r=t.top-o.top;this.onDrag(t.e,{node:n,deltaX:e,deltaY:r})}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}getPositionParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:n,useCSSTransforms:r}=this.props;let o;return r?o=(0,i.setTransform)(e):(o=(0,i.setTopLeft)(e),t&&(o.left=(0,i.perc)(e.left/n),o.width=(0,i.perc)(e.width/n))),o}mixinDraggable(t,r){return e.default.createElement(n.DraggableCore,{disabled:!r,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},t)}curryResizeHandler(e,t){return(n,r)=>t(n,r,e)}mixinResizable(t,n,o){const{cols:i,minW:s,minH:l,maxW:c,maxH:u,transformScale:d,resizeHandles:h,resizeHandle:p}=this.props,f=this.getPositionParams(),m=(0,a.calcGridItemPosition)(f,0,0,i,0).width,g=(0,a.calcGridItemPosition)(f,0,0,s,l),v=(0,a.calcGridItemPosition)(f,0,0,c,u),y=[g.width,g.height],b=[Math.min(v.width,m),Math.min(v.height,1/0)];return e.default.createElement(r.Resizable,{draggableOpts:{disabled:!o},className:o?void 0:"react-resizable-hide",width:n.width,height:n.height,minConstraints:y,maxConstraints:b,onResizeStop:this.curryResizeHandler(n,this.onResizeStop),onResizeStart:this.curryResizeHandler(n,this.onResizeStart),onResize:this.curryResizeHandler(n,this.onResize),transformScale:d,resizeHandles:h,handle:p},t)}onResizeHandler(e,t,n,r){let{node:o,size:s,handle:l}=t;const c=this.props[r];if(!c)return;const{x:u,y:d,i:h,maxH:p,minH:f,containerWidth:m}=this.props,{minW:g,maxW:v}=this.props;let y=s;o&&(y=(0,i.resizeItemInDirection)(l,n,s,m),this.setState({resizing:"onResizeStop"===r?null:y}));let{w:b,h:_}=(0,a.calcWH)(this.getPositionParams(),y.width,y.height,u,d,l);b=(0,a.clamp)(b,Math.max(g,1),v),_=(0,a.clamp)(_,f,p),c.call(this,h,b,_,{e:e,node:o,size:y,handle:l})}render(){const{x:t,y:n,w:r,h:o,isDraggable:i,isResizable:s,droppingPosition:c,useCSSTransforms:u}=this.props,d=(0,a.calcGridItemPosition)(this.getPositionParams(),t,n,r,o,this.state),h=e.default.Children.only(this.props.children);let p=e.default.cloneElement(h,{ref:this.elementRef,className:(0,l.default)("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":i,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(c),cssTransforms:u}),style:{...this.props.style,...h.props.style,...this.createStyle(d)}});return p=this.mixinResizable(p,d,s),p=this.mixinDraggable(p,i),p}}return vY.default=d,u(d,"propTypes",{children:t.default.element,cols:t.default.number.isRequired,containerWidth:t.default.number.isRequired,rowHeight:t.default.number.isRequired,margin:t.default.array.isRequired,maxRows:t.default.number.isRequired,containerPadding:t.default.array.isRequired,x:t.default.number.isRequired,y:t.default.number.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired,minW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:t.default.string.isRequired,resizeHandles:s.resizeHandleAxesType,resizeHandle:s.resizeHandleType,onDragStop:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,isDraggable:t.default.bool.isRequired,isResizable:t.default.bool.isRequired,isBounded:t.default.bool.isRequired,static:t.default.bool,useCSSTransforms:t.default.bool.isRequired,transformScale:t.default.number,className:t.default.string,handle:t.default.string,cancel:t.default.string,droppingPosition:t.default.shape({e:t.default.object.isRequired,left:t.default.number.isRequired,top:t.default.number.isRequired})}),u(d,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),vY}function uX(){if(aX)return DV;aX=1,Object.defineProperty(DV,"__esModule",{value:!0}),DV.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=aY,n=l(lY()),r=pY(),i=gY(),a=l(cX()),s=l(lX());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d="react-grid-layout";let h=!1;try{h=/firefox/i.test(navigator.userAgent)}catch(e){}class p extends e.Component{constructor(){super(...arguments),u(this,"state",{activeDrag:null,layout:(0,r.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,r.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),u(this,"dragEnterCounter",0),u(this,"onDragStart",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s}=this.state,l=(0,r.getLayoutItem)(s,e);if(!l)return;const c={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,r.cloneLayoutItem)(l),oldLayout:s,activeDrag:c}),this.props.onDragStart(s,l,l,null,i,a)})),u(this,"onDrag",((e,t,n,o)=>{let{e:i,node:a}=o;const{oldDragItem:s}=this.state;let{layout:l}=this.state;const{cols:c,allowOverlap:u,preventCollision:d}=this.props,h=(0,r.getLayoutItem)(l,e);if(!h)return;const p={w:h.w,h:h.h,x:h.x,y:h.y,placeholder:!0,i:e};l=(0,r.moveElement)(l,h,t,n,!0,d,(0,r.compactType)(this.props),c,u),this.props.onDrag(l,s,h,p,i,a),this.setState({layout:u?l:(0,r.compact)(l,(0,r.compactType)(this.props),c),activeDrag:p})})),u(this,"onDragStop",((e,t,n,o)=>{let{e:i,node:a}=o;if(!this.state.activeDrag)return;const{oldDragItem:s}=this.state;let{layout:l}=this.state;const{cols:c,preventCollision:u,allowOverlap:d}=this.props,h=(0,r.getLayoutItem)(l,e);if(!h)return;l=(0,r.moveElement)(l,h,t,n,!0,u,(0,r.compactType)(this.props),c,d);const p=d?l:(0,r.compact)(l,(0,r.compactType)(this.props),c);this.props.onDragStop(p,s,h,null,i,a);const{oldLayout:f}=this.state;this.setState({activeDrag:null,layout:p,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(p,f)})),u(this,"onResizeStart",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s}=this.state,l=(0,r.getLayoutItem)(s,e);l&&(this.setState({oldResizeItem:(0,r.cloneLayoutItem)(l),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,l,l,null,i,a))})),u(this,"onResize",((e,t,n,o)=>{let{e:i,node:a,size:s,handle:l}=o;const{oldResizeItem:c}=this.state,{layout:u}=this.state,{cols:d,preventCollision:h,allowOverlap:p}=this.props;let f,m,g,v=!1;const[y,b]=(0,r.withLayoutItem)(u,e,(e=>{let o;if(m=e.x,g=e.y,-1!==["sw","w","nw","n","ne"].indexOf(l)&&(-1!==["sw","nw","w"].indexOf(l)&&(m=e.x+(e.w-t),t=e.x!==m&&m<0?e.w:t,m=m<0?0:m),-1!==["ne","n","nw"].indexOf(l)&&(g=e.y+(e.h-n),n=e.y!==g&&g<0?e.h:n,g=g<0?0:g),v=!0),h&&!p){o=(0,r.getAllCollisions)(u,{...e,w:t,h:n,x:m,y:g}).filter((t=>t.i!==e.i)).length>0,o&&(g=e.y,n=e.h,m=e.x,t=e.w,v=!1)}return e.w=t,e.h=n,e}));if(!b)return;if(f=y,v){const e=!0;f=(0,r.moveElement)(y,b,m,g,e,this.props.preventCollision,(0,r.compactType)(this.props),d,p)}const _={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(f,c,b,_,i,a),this.setState({layout:p?f:(0,r.compact)(f,(0,r.compactType)(this.props),d),activeDrag:_})})),u(this,"onResizeStop",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s,oldResizeItem:l}=this.state,{cols:c,allowOverlap:u}=this.props,d=(0,r.getLayoutItem)(s,e),h=u?s:(0,r.compact)(s,(0,r.compactType)(this.props),c);this.props.onResizeStop(h,l,d,null,i,a);const{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(h,p)})),u(this,"onDragOver",(t=>{if(t.preventDefault(),t.stopPropagation(),h&&!t.nativeEvent.target?.classList.contains(d))return!1;const{droppingItem:n,onDropDragOver:r,margin:o,cols:a,rowHeight:s,maxRows:l,width:c,containerPadding:u,transformScale:p}=this.props,f=r?.(t);if(!1===f)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const m={...n,...f},{layout:g}=this.state,v=t.currentTarget.getBoundingClientRect(),y=t.clientX-v.left,b=t.clientY-v.top,_={left:y/p,top:b/p,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:e,top:t}=this.state.droppingPosition;(e!=y||t!=b)&&this.setState({droppingPosition:_})}}else{const t={cols:a,margin:o,maxRows:l,rowHeight:s,containerWidth:c,containerPadding:u||o},n=(0,i.calcXY)(t,b,y,m.w,m.h);this.setState({droppingDOMNode:e.createElement("div",{key:m.i}),droppingPosition:_,layout:[...g,{...m,x:n.x,y:n.y,static:!1,isDraggable:!0}]})}})),u(this,"removeDroppingPlaceholder",(()=>{const{droppingItem:e,cols:t}=this.props,{layout:n}=this.state,o=(0,r.compact)(n.filter((t=>t.i!==e.i)),(0,r.compactType)(this.props),t,this.props.allowOverlap);this.setState({layout:o,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),u(this,"onDragLeave",(e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,0===this.dragEnterCounter&&this.removeDroppingPlaceholder()})),u(this,"onDragEnter",(e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++})),u(this,"onDrop",(e=>{e.preventDefault(),e.stopPropagation();const{droppingItem:t}=this.props,{layout:n}=this.state,r=n.find((e=>e.i===t.i));this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,e)}))}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,n){let o;if(n.activeDrag)return null;if((0,t.deepEqual)(e.layout,n.propsLayout)&&e.compactType===n.compactType?(0,r.childrenEqual)(e.children,n.children)||(o=n.layout):o=e.layout,o){return{layout:(0,r.synchronizeLayoutWithChildren)(o,e.children,e.cols,(0,r.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}}return null}shouldComponentUpdate(e,n){return this.props.children!==e.children||!(0,r.fastRGLPropsEqual)(this.props,e,t.deepEqual)||this.state.activeDrag!==n.activeDrag||this.state.mounted!==n.mounted||this.state.droppingPosition!==n.droppingPosition}componentDidUpdate(e,t){if(!this.state.activeDrag){const e=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(e,n)}}containerHeight(){if(!this.props.autoSize)return;const e=(0,r.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}onLayoutMaybeChanged(e,n){n||(n=this.state.layout),(0,t.deepEqual)(n,e)||this.props.onLayoutChange(e)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:n,cols:r,margin:o,containerPadding:i,rowHeight:s,maxRows:l,useCSSTransforms:c,transformScale:u}=this.props;return e.createElement(a.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder "+(this.state.resizing?"placeholder-resizing":""),containerWidth:n,cols:r,margin:o,containerPadding:i||o,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:u},e.createElement("div",null))}processGridItem(t,n){if(!t||!t.key)return;const o=(0,r.getLayoutItem)(this.state.layout,String(t.key));if(!o)return null;const{width:i,cols:s,margin:l,containerPadding:c,rowHeight:u,maxRows:d,isDraggable:h,isResizable:p,isBounded:f,useCSSTransforms:m,transformScale:g,draggableCancel:v,draggableHandle:y,resizeHandles:b,resizeHandle:_}=this.props,{mounted:x,droppingPosition:w}=this.state,S="boolean"==typeof o.isDraggable?o.isDraggable:!o.static&&h,k="boolean"==typeof o.isResizable?o.isResizable:!o.static&&p,C=o.resizeHandles||b,E=S&&f&&!1!==o.isBounded;return e.createElement(a.default,{containerWidth:i,cols:s,margin:l,containerPadding:c||l,maxRows:d,rowHeight:u,cancel:v,handle:y,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:S,isResizable:k,isBounded:E,useCSSTransforms:m&&x,usePercentages:!x,transformScale:g,w:o.w,h:o.h,x:o.x,y:o.y,i:o.i,minH:o.minH,minW:o.minW,maxH:o.maxH,maxW:o.maxW,static:o.static,droppingPosition:n?w:void 0,resizeHandles:C,resizeHandle:_},t)}render(){const{className:t,style:o,isDroppable:i,innerRef:a}=this.props,s=(0,n.default)(d,t),l={height:this.containerHeight(),...o};return e.createElement("div",{ref:a,className:s,style:l,onDrop:i?this.onDrop:r.noop,onDragLeave:i?this.onDragLeave:r.noop,onDragEnter:i?this.onDragEnter:r.noop,onDragOver:i?this.onDragOver:r.noop},e.Children.map(this.props.children,(e=>this.processGridItem(e))),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}return DV.default=p,u(p,"displayName","ReactGridLayout"),u(p,"propTypes",s.default),u(p,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:r.noop,onDragStart:r.noop,onDrag:r.noop,onDragStop:r.noop,onResizeStart:r.noop,onResize:r.noop,onResizeStop:r.noop,onDrop:r.noop,onDropDragOver:r.noop}),DV}var dX,hX,pX={},fX={};function mX(){if(dX)return fX;dX=1,Object.defineProperty(fX,"__esModule",{value:!0}),fX.findOrGenerateResponsiveLayout=function(n,r,o,i,a,s){if(n[o])return(0,e.cloneLayout)(n[o]);let l=n[i];const c=t(r),u=c.slice(c.indexOf(o));for(let e=0,t=u.length;e<t;e++){const t=u[e];if(n[t]){l=n[t];break}}return l=(0,e.cloneLayout)(l||[]),(0,e.compact)((0,e.correctBounds)(l,{cols:a}),s,a)},fX.getBreakpointFromWidth=function(e,n){const r=t(e);let o=r[0];for(let t=1,i=r.length;t<i;t++){const i=r[t];n>e[i]&&(o=i)}return o},fX.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},fX.sortBreakpoints=t;var e=pY();function t(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}return fX}function gX(){if(hX)return pX;hX=1,Object.defineProperty(pX,"__esModule",{value:!0}),pX.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=s(Ue()),n=aY,r=pY(),i=mX(),a=s(uX());function s(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=e=>Object.prototype.toString.call(e);function h(e,t){return null==e?null:Array.isArray(e)?e:e[t]}class p extends e.Component{constructor(){super(...arguments),u(this,"state",this.generateInitialState()),u(this,"onLayoutChange",(e=>{this.props.onLayoutChange(e,{...this.props.layouts,[this.state.breakpoint]:e})}))}generateInitialState(){const{width:e,breakpoints:t,layouts:n,cols:r}=this.props,o=(0,i.getBreakpointFromWidth)(t,e),a=(0,i.getColsFromBreakpoint)(o,r),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,i.findOrGenerateResponsiveLayout)(n,t,o,o,a,s),breakpoint:o,cols:a}}static getDerivedStateFromProps(e,t){if(!(0,n.deepEqual)(e.layouts,t.layouts)){const{breakpoint:n,cols:r}=t;return{layout:(0,i.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,n.deepEqual)(this.props.breakpoints,e.breakpoints)&&(0,n.deepEqual)(this.props.cols,e.cols)||this.onWidthChange(e)}onWidthChange(e){const{breakpoints:t,cols:n,layouts:o,compactType:a}=this.props,s=this.props.breakpoint||(0,i.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),l=this.state.breakpoint,c=(0,i.getColsFromBreakpoint)(s,n),u={...o};if(l!==s||e.breakpoints!==t||e.cols!==n){l in u||(u[l]=(0,r.cloneLayout)(this.state.layout));let e=(0,i.findOrGenerateResponsiveLayout)(u,t,s,l,c,a);e=(0,r.synchronizeLayoutWithChildren)(e,this.props.children,c,a,this.props.allowOverlap),u[s]=e,this.props.onLayoutChange(e,u),this.props.onBreakpointChange(s,c),this.setState({breakpoint:s,layout:e,cols:c})}const d=h(this.props.margin,s),p=h(this.props.containerPadding,s);this.props.onWidthChange(this.props.width,d,c,p)}render(){const{breakpoint:t,breakpoints:n,cols:r,layouts:o,margin:i,containerPadding:s,onBreakpointChange:l,onLayoutChange:u,onWidthChange:d,...p}=this.props;return e.createElement(a.default,c({},p,{margin:h(i,this.state.breakpoint),containerPadding:h(s,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}return pX.default=p,u(p,"propTypes",{breakpoint:t.default.string,breakpoints:t.default.object,allowOverlap:t.default.bool,cols:t.default.object,margin:t.default.oneOfType([t.default.array,t.default.object]),containerPadding:t.default.oneOfType([t.default.array,t.default.object]),layouts(e,t){if("[object Object]"!==d(e[t]))throw new Error("Layout property must be an object. Received: "+d(e[t]));Object.keys(e[t]).forEach((t=>{if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,r.validateLayout)(e.layouts[t],"layouts."+t)}))},width:t.default.number.isRequired,onBreakpointChange:t.default.func,onLayoutChange:t.default.func,onWidthChange:t.default.func}),u(p,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:r.noop,onLayoutChange:r.noop,onWidthChange:r.noop}),pX}var vX,yX,bX={},_X=_e(kv);function xX(){if(vX)return bX;vX=1,Object.defineProperty(bX,"__esModule",{value:!0}),bX.default=function(o){var i;return i=class extends e.Component{constructor(){super(...arguments),l(this,"state",{width:1280}),l(this,"elementRef",e.createRef()),l(this,"mounted",!1),l(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new n.default((e=>{if(this.elementRef.current instanceof HTMLElement){const t=e[0].contentRect.width;this.setState({width:t})}}));const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.observe(e)}componentWillUnmount(){this.mounted=!1;const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.unobserve(e),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:t,...n}=this.props;return t&&!this.mounted?e.createElement("div",{className:(0,r.default)(this.props.className,c),style:this.props.style,ref:this.elementRef}):e.createElement(o,s({innerRef:this.elementRef},n,this.state))}},l(i,"defaultProps",{measureBeforeMount:!1}),l(i,"propTypes",{measureBeforeMount:t.default.bool}),i};var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=i(Ue()),n=i(_X),r=i(lY());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c="react-grid-layout";return bX}var wX=be((yX||(yX=1,function(e){e.exports=uX().default,e.exports.utils=pY(),e.exports.calculateUtils=gY(),e.exports.Responsive=gX().default,e.exports.Responsive.utils=mX(),e.exports.WidthProvider=xX().default}(NV)),NV.exports)),SX={layoutContainer:"DashboardLayout-module_layoutContainer__wOGEu",addNewComponent:"DashboardLayout-module_addNewComponent__Gan9z",plusIcon:"DashboardLayout-module_plusIcon__yQQHP",gridItem:"DashboardLayout-module_gridItem__NtXI-"};const kX=({dashboards:n})=>{const[r,i]=o.useState(window.innerWidth),[a,s]=o.useState([]),[c,u]=o.useState(n||[]);l((()=>{const e=()=>i(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),l((()=>{const e=JSON.parse(localStorage.getItem("dashboardLayout")||"[]"),t=c.map((e=>e.id)),n=e.filter((e=>t.includes(e.i)));if(console.log("existDashboardItems",n),n.length>0)return s(n)}),[c]);const d=e=>{localStorage.setItem("dashboardLayout",JSON.stringify(e))};return e("div",{className:SX.layoutContainer,children:e(wX,{className:SX.gridLayout,layout:a,width:r,cols:8,onLayoutChange:e=>{d(e)},draggableHandle:".dragHandle",children:a.map((n=>e("div",{className:SX.gridItem,onClick:()=>{console.log(n)},children:"addNewComponent"!==n.i?e(fg,{chartProps:{type:"bar",data:c.find((e=>e.id===n.i))?.data,options:c.find((e=>e.id===n.i))?.options},headerProps:{content:"Title",suffix:e(Ga,{name:"cog",className:SX.dragHandle})}}):t(B,{className:SX.addNewComponent,direction:"vertical",alignment:"center",dimensionX:"fill",gap:15,dimensionY:"fill",children:[e(Ga,{name:"plus",className:SX.plusIcon}),e(V,{size:"xlarge",children:" New Component"})]})},n.i)))})})};var CX="MenuGroup-module_container__VQaFb",EX="MenuGroup-module_menuSection__Nfvar",MX="MenuGroup-module_label__5skIC",PX="MenuGroup-module_noDivider__7fIo3";var OX=a((({options:n={},showDivider:r=!0,className:o,...i})=>e(B,{dimensionX:160,direction:"vertical",gap:0,alignment:"leftCenter",className:`${CX} ${o||""}`,...i,children:Object.entries(n).map((([n,o],i,a)=>{const{label:s,value:l,className:c,...u}=o;return t(B,{dimensionX:"fill",direction:"vertical",gap:10,alignment:"leftCenter",...u,className:`${EX} ${r&&i!==a.length-1?"":PX} ${o.className||""}`,children:[s&&e(V,{className:MX,children:s}),l]},n)}))}))),TX="Table-module_table__7BBwk",NX="Table-module_fixedColumns__fjVOb",DX="Table-module_scrollableColumns__PzDZ9",AX="Table-module_column__daVNe",LX="Table-module_header__w6wP3",IX="Table-module_border__ise22",zX="Table-module_cell__K--55",RX="Table-module_resizer__PTgL3",$X="Table-module_focusedCell__-1YzJ",FX="Table-module_skeletonCell__N0HnJ";const jX=a((({columns:n,data:r,loading:o=!1,skeletonRowCount:i=5,renderSkeletonCell:a,saveToLocalStorage:s={id:"table",save:!1},fixedColumns:c=[],noResizeableColumns:d=[],onCellKeyDown:h,tableClassName:p="",columnClassName:f="",headerClassName:m="",cellClassName:g=""})=>{const v=e=>(s?.save?localStorage.getItem(`${s?.id}-${e.key}`):null)||e.width||"300px",[y,b]=u((()=>n.map((e=>({...e,width:v(e)}))))),[_,x]=u(null);l((()=>{b((e=>{const t=new Map(e.map((e=>[e.key,e.width])));return n.map((e=>({...e,width:t.get(e.key)||v(e)})))}))}),[n,s?.save,s?.id]);const w=(e,t)=>{b((n=>n.map((n=>n.key===e?{...n,width:t}:n))))};l((()=>{s?.save&&y.forEach((e=>{localStorage.setItem(`${s.id}-${e.key}`,e.width||"")}))}),[y,s?.save,s?.id]);return l((()=>{if(!_||o)return;const e=["ArrowRight","ArrowLeft","ArrowDown","ArrowUp"],t=(e,t)=>{const o=n.findIndex((e=>e.key===t.column)),i=t.row;switch(e.key){case"ArrowRight":((e,t)=>{e<n.length-1&&x({column:n[e+1].key,row:t})})(o,i);break;case"ArrowLeft":((e,t)=>{e>0&&x({column:n[e-1].key,row:t})})(o,i);break;case"ArrowDown":((e,t)=>{t<r.length-1&&x({column:e,row:t+1})})(t.column,i);break;case"ArrowUp":((e,t)=>{t>0&&x({column:e,row:t-1})})(t.column,i)}},i=n=>{var r;(e=>{if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase();return"input"===t||"textarea"===t||!!e.isContentEditable})(n.target)||(r=n.key,e.includes(r)?(n.preventDefault(),t(n,_)):h?.({columnKey:_.column,rowIndex:_.row,event:n}))};return globalThis.addEventListener("keydown",i),()=>{globalThis.removeEventListener("keydown",i)}}),[_,n,r,h,o]),e("div",{className:`${TX} ${p}`,children:y.map(((n,s)=>{const l=c.includes(n.key),u=l?c.slice(0,c.indexOf(n.key)).reduce(((e,t)=>e+Number.parseInt(y.find((e=>e.key===t))?.width||"300px")),0)+"px":"unset";return t(WX,{columnKey:n.key,className:`${AX} ${l?NX:DX} ${f}`,style:{left:u},width:n.width,minWidth:n.minWidth,updateColumnWidth:w,noResizeable:d.includes(n.key),children:[e(WX.Header,{className:m,children:n.header}),o?Array.from({length:i}).map(((t,r)=>{const o=`skeleton-${n.key}-${r}`;return e(WX.Cell,{className:g,"data-skeleton-cell":!0,children:a?a({column:n,rowIndex:r}):e(HX,{})},o)})):r.map(((t,r)=>{const i=_?.column===n.key&&_?.row===r,a=`${n.key}-${r}`;return e(WX.Cell,{focused:i,onClick:()=>((e,t)=>{o||x({column:e,row:t})})(n.key,r),"data-cell-key":a,className:g,children:n.renderCell({row:t,rowIndex:r,isFocused:i,columnKey:n.key})},a)}))]},n.key)}))})})),BX=e=>e&&Number.parseInt(e,10)||0,HX=()=>e("div",{className:FX}),WX=a((({columnKey:n,children:r,className:o,width:i,minWidth:a,updateColumnWidth:c,noResizeable:d,style:h})=>{const[p,f]=u(i),[m,g]=u(!1),v=s(null);l((()=>{f(i)}),[i]),l((()=>{const e=BX(a),t=t=>{if(m&&v.current){let n=t.clientX-v.current.getBoundingClientRect().left;e>0&&n<e&&(n=e),f(`${n}px`)}},r=()=>{if(g(!1),v.current){let t=BX(v.current.style.minWidth);e>0&&t<e&&(t=e),c?.(n,`${t}px`)}};return m&&(globalThis.addEventListener("mousemove",t),globalThis.addEventListener("mouseup",r)),()=>{globalThis.removeEventListener("mousemove",t),globalThis.removeEventListener("mouseup",r)}}),[m,n,c,a]);return t("div",{ref:v,className:o,style:{...h,minWidth:p},children:[r,!d&&e("button",{type:"button",className:RX,"aria-label":"Resize column",onMouseDown:e=>{e.preventDefault(),g(!0)},onClick:e=>{e.preventDefault()}})]})}));WX.Header=({border:t=!0,headerAlign:n="center",children:r,...o})=>e(B,{dimensionX:"fill",alignment:{left:"leftTop",center:"center",right:"rightTop"}[n],...o,className:`${LX} ${t?IX:""} ${o.className||""}`,children:r}),WX.Cell=({children:t,focused:n,...r})=>e("div",{...r,className:`${zX} ${n?$X:""} ${r.className||""}`,children:t});var VX={notificationContainer:"Notification-module_notificationContainer__AQGHi",notificationItem:"Notification-module_notificationItem__a97Y1",enter:"Notification-module_enter__QJYI5",exit:"Notification-module_exit__7-eTw",notificationIcon:"Notification-module_notificationIcon__GfxMq",spin:"Notification-module_spin__NnI0P",notificationContent:"Notification-module_notificationContent__dL0yz",notificationMessage:"Notification-module_notificationMessage__9YbKE",notificationDescription:"Notification-module_notificationDescription__1r9AU",notificationAction:"Notification-module_notificationAction__SrLVH",notificationClose:"Notification-module_notificationClose__1xqz9",notificationProgressContainer:"Notification-module_notificationProgressContainer__FXOGc",notificationProgress:"Notification-module_notificationProgress__lWMoZ",notificationPortal:"Notification-module_notificationPortal__hmII4"};function YX({notification:n,onClose:r,stackGap:i,rtl:a,duration:d,style:h,animationDuration:p=300}){const[f,m]=u(!1),[g,v]=u(!1),[y,b]=u(!1),[_,x]=u(0),w=s(null),S=s(null),k=s(null),C=s(0),E=s(!1),M=s(null),{config:P}=n,O=void 0!==P.duration?P.duration:d,T=c((()=>{g||(v(!0),P.onClose?.(),r(n.id),setTimeout((()=>{}),p))}),[P,n.id,r,p]),N=c(((e=!1)=>{if(null===O||O<=0||g)return;const t=e?Math.max(0,O-C.current):O;if(t<=0)return void T();k.current=Date.now()-(e?C.current:0),e||(x(0),C.current=0),w.current=setTimeout((()=>{T()}),t);const n=()=>{if(null===k.current||g)return;const e=Date.now()-k.current,t=Math.min(e/O*100,100);x(t),t<100&&!g&&(S.current=setTimeout(n,16))};S.current=setTimeout(n,16)}),[O,T,g]),D=c(((e=!1)=>{e&&null!==k.current&&(C.current=Date.now()-k.current),w.current&&(clearTimeout(w.current),w.current=null),S.current&&(clearTimeout(S.current),S.current=null),e||(k.current=null,C.current=0,E.current=!1)}),[]),A=c((()=>{P.onClick?.()}),[P]),L=c((()=>{b(!0),D(!0)}),[D]),I=c((()=>{b(!1),!g&&null!==O&&O>0&&N(!0)}),[N,g,O]),z=c((e=>{"Escape"===e.key&&!1!==P.closable&&(e.preventDefault(),T())}),[P.closable,T]);l((()=>{const e=setTimeout((()=>{m(!0)}),10);return()=>clearTimeout(e)}),[]),l((()=>(!f||y||g||E.current||(E.current=!0,N(!1)),()=>D(!1))),[f,y,g]),l((()=>()=>{D(!1)}),[D]);const R=!1!==P.closable,$=`\n ${VX.notificationItem}\n ${f?VX.enter:""}\n ${g?VX.exit:""}\n ${P.className||""}\n `.trim();return t("div",{ref:M,className:$,style:{pointerEvents:"auto",...P.style,...h},onMouseEnter:L,onMouseLeave:I,onClick:A,onKeyDown:z,tabIndex:P.btn?0:-1,role:o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className&&P.icon.props.className.includes("error")?"alert":"status","aria-live":o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className&&P.icon.props.className.includes("error")?"assertive":"polite","data-placement":n.placement,"data-type":(()=>{if(o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className){const e=P.icon.props.className;if(e.includes("success"))return"success";if(e.includes("error"))return"error";if(e.includes("warning"))return"warning";if(e.includes("info"))return"info";if(e.includes("loading"))return"loading"}return"default"})(),"data-rtl":a,children:[P.icon&&e("div",{className:VX.notificationIcon,children:P.icon}),t("div",{className:VX.notificationContent,children:[e("div",{className:VX.notificationMessage,children:P.message}),P.description&&e("div",{className:VX.notificationDescription,children:P.description}),P.btn&&e("div",{className:VX.notificationAction,children:P.btn})]}),R&&e("button",{className:VX.notificationClose,onClick:e=>{e.stopPropagation(),T()},"aria-label":"Close notification",tabIndex:0,children:P.closeIcon||e(Ga,{name:"close",size:"sm"})}),null!==O&&O>0&&e("div",{className:VX.notificationProgressContainer,children:e("div",{className:VX.notificationProgress,style:{width:`${_}%`,opacity:y?.3:1}})})]})}const XX=({placement:t,notifications:n,onRemove:r,stackGap:o,rtl:i,duration:a,zIndex:s,top:l,bottom:c,animationDuration:u=300})=>{if(0===n.length)return null;const d=e=>{switch(e){case"topLeft":return"topRight";case"topRight":return"topLeft";case"bottomLeft":return"bottomRight";case"bottomRight":return"bottomLeft";default:return e}};return e("div",{className:`${VX.notificationContainer} ${VX[t]}`,style:(()=>{const e={position:"fixed",zIndex:s,display:"flex",flexDirection:"column",gap:o,pointerEvents:"none"};switch(i?d(t):t){case"topLeft":return{...e,top:l,left:24,alignItems:"flex-start"};case"topRight":return{...e,top:l,right:24,alignItems:"flex-end"};case"bottomLeft":return{...e,bottom:c,left:24,alignItems:"flex-start",flexDirection:"column-reverse"};case"bottomRight":return{...e,bottom:c,right:24,alignItems:"flex-end",flexDirection:"column-reverse"};default:return e}})(),children:n.sort(((e,t)=>e.createdAt-t.createdAt)).map(((t,n)=>e(YX,{notification:t,onClose:r,stackGap:o,rtl:i,duration:a,animationDuration:u,style:{zIndex:s+n}},t.id)))})},qX=m(null),UX=({children:n,maxCount:r=5,top:o=24,bottom:a=24,rtl:s=!1,zIndexBase:l=1e3,duration:d=4500,stackGap:h=12,placementDefaults:p={},concurrent:f=!0,animationDuration:m=300})=>{const[g,v]=u([]),y=c(((e,t)=>{const n=e.placement||"topRight",o={id:e.key||`notification-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,config:{...p[n],...e,placement:n},placement:n,instanceId:t,createdAt:Date.now()};v((i=>{if(e.key){const n=i.findIndex((n=>n.config.key===e.key&&n.instanceId===t));if(-1!==n){const e=[...i];return e[n]={...e[n],config:o.config,createdAt:Date.now()},e}}const a=[...i,o],s=a.filter((e=>e.placement===n&&e.instanceId===t));if(s.length>r){const e=s.sort(((e,t)=>e.createdAt-t.createdAt)),t=e.slice(0,s.length-r);return t.forEach((e=>{setTimeout((()=>e.config.onClose?.()),0)})),a.filter((e=>!t.some((t=>t.id===e.id))))}return a}))}),[r,p]),b=c(((e,t)=>{v((n=>n.filter((n=>!(n.id===e&&n.instanceId===t)))))}),[]),_=c(((e,t,n)=>{v((r=>r.map((r=>r.config.key===e&&r.instanceId===n?{...r,config:{...r.config,...t}}:r))))}),[]),x=c(((e,t)=>{v((n=>{if(!e&&!t)return n.forEach((e=>e.config.onClose?.())),[];if(e&&t){const r=n.filter((n=>n.config.key===e&&n.instanceId===t));return r.forEach((e=>e.config.onClose?.())),n.filter((n=>!(n.config.key===e&&n.instanceId===t)))}if(t){const e=n.filter((e=>e.instanceId===t));return e.forEach((e=>e.config.onClose?.())),n.filter((e=>e.instanceId!==t))}if(e){const t=n.filter((t=>t.config.key===e));return t.forEach((e=>e.config.onClose?.())),n.filter((t=>t.config.key!==e))}return n}))}),[]),w=i((()=>({addNotification:y,removeNotification:b,updateNotification:_,destroyNotifications:x})),[y,b,_,x]),S=i((()=>{const e={};return g.forEach((t=>{const n=t.placement;e[n]||(e[n]=[]),e[n].push(t)})),e}),[g]);return t(qX.Provider,{value:w,children:[n,["topLeft","topRight","bottomLeft","bottomRight"].map((t=>{const n=S[t]||[];return 0===n.length?null:e(Gm,{className:VX.notificationPortal,children:e(XX,{placement:t,notifications:n,onRemove:e=>{const t=n.find((t=>t.id===e));t&&b(e,t.instanceId)},stackGap:h,rtl:s,duration:d,zIndex:l,top:o,bottom:a,animationDuration:m})},t)}))]})},ZX=()=>{const t=f(),n=(()=>{const e=p(qX);if(!e)throw new Error("useNotificationContext must be used within NotificationProvider");return e})();return[i((()=>{const r=e=>{n.addNotification(e,t)};return{open:r,info:t=>{r({...t,icon:e(Ga,{name:"help",className:"notification-icon-info"})})},success:t=>{r({...t,icon:e(Ga,{name:"check",className:"notification-icon-success"})})},error:t=>{r({...t,icon:e(Ga,{name:"close",className:"notification-icon-error"})})},warning:t=>{r({...t,icon:e(Ga,{name:"notificationClearAll",className:"notification-icon-warning"})})},loading:t=>{r({...t,icon:e(Ga,{name:"refresh",className:"notification-icon-loading"}),duration:null})},destroy:e=>{n.destroyNotifications(e,t)}}}),[n,t]),c((()=>null),[])]};var GX={inputMinimized:"Array-module_inputMinimized__N3CzD",contentContainer:"Array-module_contentContainer__Nf98X",value:"Array-module_value__X6PGp",buttonsContainer:"Array-module_buttonsContainer__mOaLI",itemButtonWrapper:"Array-module_itemButtonWrapper__zYbaj",itemButton:"Array-module_itemButton__IvXJ4",removeButton:"Array-module_removeButton__nj38e"},KX="String-module_icon__pKB1k",JX="String-module_text__-rE-j",QX="String-module_select__G6d9c",eq="String-module_baseInput__ieBad",tq="String-module_input__sXbRz";var nq=a((({label:t,description:n,value:r,options:o,onChange:i,selectProps:a,inputProps:l,inputContainerClassName:c,iconName:d="formatQuoteClose",...h})=>{const p=s(null),f=s(null),m=s(null),[g,v]=u(!1);return e(pe,{dimensionX:"fill",description:n,forceFocus:g,dropDownRef:m,onFocusChange:e=>(e=>{p?.current?.toggleDropdown(e),v(e),e&&!o&&f.current?.focus()})(e),labelProps:{dimensionX:"hug",divider:!!t?.trim(),prefix:{children:e(Ga,{className:KX,name:d})},root:t?{dimensionX:"hug",children:e(V,{className:JX,size:"medium",children:t})}:void 0},inputContainerProps:{className:`${eq} ${c}`},...h,children:o?e(ng,{selectRef:p,externalDropdownRef:m,disableClick:!0,options:o,value:r,placeholder:"",onChange:e=>{i?.(e),v(!1)},...a,className:`${QX} ${a?.className}`}):e(G,{ref:f,value:r,onChange:e=>i?.(e.target.value),...l,className:`${tq} ${l?.className}`})})})),rq="Number-module_icon__o1inF",oq="Number-module_text__S4l2F",iq="Number-module_select__NRfCp",aq="Number-module_baseInput__uueTo",sq="Number-module_input__m1vMZ";var lq=a((({label:t,description:n,value:r,options:o,onChange:i,selectProps:a,inputProps:l,inputContainerClassName:c,iconName:d="numericBox",...h})=>{const p=s(null),f=s(null),[m,g]=u(!1),v=s(null);return e(pe,{dimensionX:"fill",description:n,forceFocus:m,dropDownRef:v,onFocusChange:e=>(e=>{p?.current?.toggleDropdown(e),g(e),e&&!o&&f.current?.focus()})(e),labelProps:{dimensionX:"hug",divider:!!t?.trim(),prefix:{children:e(Ga,{className:rq,name:d})},root:t?{dimensionX:"hug",children:e(V,{className:oq,size:"medium",children:t})}:void 0},inputContainerProps:{className:`${aq} ${c}`},...h,children:o?e(ng,{selectRef:p,externalDropdownRef:v,disableClick:!0,options:o,value:r,placeholder:"",onChange:e=>{i?.(e),g(!1)},...a,className:`${iq} ${a?.className}`}):e(G,{ref:f,value:r,type:"number",onChange:e=>{const t=e.target.value,n=""===t;i?.(n?void 0:Number(t))},...l,className:`${sq} ${l?.className}`})})})),cq="TextArea-module_container__VXi9C",uq="TextArea-module_titleContainer__l1CD0",dq="TextArea-module_textAreaInput__iYLK4",hq="TextArea-module_description__VEpUG",pq="TextArea-module_icon__iVGeQ";var fq=a((({value:r,title:o="",icon:i,textAreaProps:a,textAreaContainerProps:l,titleContainerProps:c,titlePrefixProps:u,titleRootProps:d,titleSuffixProps:h,containerProps:p,description:f,placeholder:m,onChange:v})=>{const y=s(null);return g(a?.ref??{current:null},(()=>y.current)),t(B,{dimensionX:"fill",alignment:"leftCenter",direction:"vertical",...p,className:`${cq} ${p?.className||""}`,children:[t(n,{children:[(o||i||u||h)&&e(KA,{dimensionX:"fill",dimensionY:36,alignment:"leftCenter",...c,className:`${uq} ${c?.className||""}`,prefix:{children:i?e(Ga,{name:i,className:pq}):null,dimensionX:"hug",alignment:"leftCenter",...u},root:{children:o,dimensionX:"fill",alignment:"leftCenter",...d},suffix:{children:h?.children,dimensionX:"hug",alignment:"rightCenter",...h},onClick:e=>{y.current?.focus();try{c?.onClick?.(e)}catch(e){console.error("Error in titleContainerProps.onClick:",e)}}}),e(B,{dimensionX:"fill",alignment:"leftCenter",...l,className:`${l?.className||""}`,children:e("textarea",{className:dq,value:r,onChange:v,placeholder:m||"",ref:y,...a})})]}),e(V,{size:"xsmall",className:`${hq}`,children:f})]})})),mq="Date-module_text__eXWDJ",gq="Date-module_dateInput__hx3cC",vq="Date-module_stringValueWrapper__XM06v",yq="Date-module_iconGroup__W1sPW",bq="Date-module_clearIcon__rTC7y",_q="Date-module_stringValue__eJN9C";var xq=a((({label:n,description:r,onChange:o,value:i,placeholder:a="",inputContainerClassName:s,datePickerProps:l})=>{const c=e=>{o?.(new Date(e))};return e(pe,{dimensionX:"fill",alignment:"leftCenter",description:r,labelProps:{prefix:{children:e(Ga,{name:"calendarBlank"})},root:{children:e(V,{className:mq,children:n})}},inputContainerProps:{dimensionX:"fill",alignment:"leftCenter",className:`${s} ${gq}`},children:e(TA,{placeholder:a,suffixIcon:null,onChange:c,value:i,renderLabel:n=>t("div",{className:vq,children:[e(CA,{color:"default",className:_q,children:n}),e("div",{className:yq,children:e(qS,{className:bq,onClick:()=>c("")})})]}),...l})})})),wq="Boolean-module_container__RN4yt",Sq="Boolean-module_description__v3iuY";var kq=a((({checked:n=!1,disabled:r=!1,label:o,containerProps:i,switchContainerProps:a,suffixProps:s,rootProps:l,labelProps:c,description:u,onChange:d,size:h,className:p})=>t(B,{dimensionX:"fill",alignment:"leftCenter",direction:"vertical",className:p||"",children:[e(H,{dimensionY:36,dimensionX:"fill",root:{children:e(FL,{checked:n,disabled:r,...a,onChange:d,size:h}),...l},suffix:{children:o&&e(V,{...c,children:o}),...s},className:`${i?.className} ${wq}`,...i}),u&&e(V,{size:"xsmall",className:`${Sq}`,children:u})]}))),Cq={baseInput:"Color-module_baseInput__gWvlQ"};var Eq=a((({label:t,description:n,value:r="#000000",labelProps:o,colorContainerProps:i,inputContainerClassName:a,onChange:s,...l})=>e(pe,{dimensionX:"fill",description:n,labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Ga,{className:Cq.icon,name:"invertColors"})},root:{dimensionX:"hug",children:e(V,{className:Cq.text,size:"medium",children:t})},...o},inputContainerProps:{className:`${Cq.baseInput} ${a}`},...l,children:e(om,{dimensionX:"fill",value:r,onChange:e=>{s?.(e)},...i})}))),Mq={container:"Storage-module_container__jdMaj",top:"Storage-module_top__vhJmX",storage:"Storage-module_storage__aXBhd",previewIcon:"Storage-module_previewIcon__zNCCM",text:"Storage-module_text__8eR8V"};function Pq(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const Oq=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Tq(e,t,n){const r=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const n=t.split(".").pop().toLowerCase(),r=Oq.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:o}=e,i="string"==typeof t?t:"string"==typeof o&&o.length>0?o:`./${e.name}`;return"string"!=typeof r.path&&Nq(r,"path",i),void 0!==n&&Object.defineProperty(r,"handle",{value:n,writable:!1,configurable:!1,enumerable:!0}),Nq(r,"relativePath",i),r}function Nq(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Dq=[".DS_Store","Thumbs.db"];function Aq(e){return"object"==typeof e&&null!==e}function Lq(e){return e.filter((e=>-1===Dq.indexOf(e.name)))}function Iq(e){if(null===e)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function zq(e){if("function"!=typeof e.webkitGetAsEntry)return $q(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?jq(t):$q(e,t)}function Rq(e){return e.reduce(((e,t)=>[...e,...Array.isArray(t)?Rq(t):[t]]),[])}function $q(e,t){return Pq(this,void 0,void 0,(function*(){var n;if(globalThis.isSecureContext&&"function"==typeof e.getAsFileSystemHandle){const t=yield e.getAsFileSystemHandle();if(null===t)throw new Error(`${e} is not a File`);if(void 0!==t){const e=yield t.getFile();return e.handle=t,Tq(e)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Tq(r,null!==(n=null==t?void 0:t.fullPath)&&void 0!==n?n:void 0)}))}function Fq(e){return Pq(this,void 0,void 0,(function*(){return e.isDirectory?jq(e):function(e){return Pq(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{e.file((n=>{const r=Tq(n,e.fullPath);t(r)}),(e=>{n(e)}))}))}))}(e)}))}function jq(e){const t=e.createReader();return new Promise(((e,n)=>{const r=[];!function o(){t.readEntries((t=>Pq(this,void 0,void 0,(function*(){if(t.length){const e=Promise.all(t.map(Fq));r.push(e),o()}else try{const t=yield Promise.all(r);e(t)}catch(e){n(e)}}))),(e=>{n(e)}))}()}))}var Bq,Hq={};var Wq=(Bq||(Bq=1,Hq.__esModule=!0,Hq.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(0===n.length)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}),Hq),Vq=be(Wq);function Yq(e){return function(e){if(Array.isArray(e))return Kq(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Gq(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xq(Object(n),!0).forEach((function(t){Uq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Uq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||Gq(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gq(e,t){if(e){if("string"==typeof e)return Kq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kq(e,t):void 0}}function Kq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Jq="function"==typeof Vq?Vq:Vq.default,Qq=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:"file-invalid-type",message:"File type must be ".concat(t)}},eU=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},tU=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},nU={code:"too-many-files",message:"Too many files"};function rU(e,t){var n="application/x-moz-file"===e.type||Jq(e,t);return[n,n?null:Qq(t)]}function oU(e,t,n){if(iU(e.size))if(iU(t)&&iU(n)){if(e.size>n)return[!1,eU(n)];if(e.size<t)return[!1,tU(t)]}else{if(iU(t)&&e.size<t)return[!1,tU(t)];if(iU(n)&&e.size>n)return[!1,eU(n)]}return[!0,null]}function iU(e){return null!=e}function aU(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function sU(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function lU(e){e.preventDefault()}function cU(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!aU(e)&&t&&t.apply(void 0,[e].concat(r)),aU(e)}))}}function uU(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function dU(e){return/^.*\.[\w]+$/.test(e)}var hU=["children"],pU=["open"],fU=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],mU=["refKey","onChange","onClick"];function gU(e){return function(e){if(Array.isArray(e))return bU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||yU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||yU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yU(e,t){if(e){if("string"==typeof e)return bU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bU(e,t):void 0}}function bU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_U(Object(n),!0).forEach((function(t){wU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kU=h((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=xU(xU({},CU),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,u=t.minSize,d=t.multiple,h=t.maxFiles,p=t.onDragEnter,f=t.onDragLeave,m=t.onDragOver,g=t.onDrop,v=t.onDropAccepted,y=t.onDropRejected,b=t.onFileDialogCancel,_=t.onFileDialogOpen,x=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,C=t.noClick,E=t.noKeyboard,M=t.noDrag,P=t.noDragEventsBubbling,O=t.onError,T=t.validator,N=i((function(){return function(e){if(iU(e))return Object.entries(e).reduce((function(e,t){var n=Zq(t,2),r=n[0],o=n[1];return[].concat(Yq(e),[r],Yq(o))}),[]).filter((function(e){return uU(e)||dU(e)})).join(",")}(n)}),[n]),D=i((function(){return function(e){return iU(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=Zq(e,2),n=t[0],r=t[1],o=!0;return uU(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(dU)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=Zq(t,2),r=n[0],o=n[1];return qq(qq({},e),{},Uq({},r,o))}),{})}]:e}(n)}),[n]),A=i((function(){return"function"==typeof _?_:OU}),[_]),L=i((function(){return"function"==typeof b?b:OU}),[b]),I=s(null),z=s(null),R=vU(k(PU,MU),2),$=R[0],F=R[1],j=$.isFocused,B=$.isFileDialogActive,H=s("undefined"!=typeof window&&window.isSecureContext&&x&&"showOpenFilePicker"in window),W=function(){!H.current&&B&&setTimeout((function(){z.current&&(z.current.files.length||(F({type:"closeDialog"}),L()))}),300)};l((function(){return window.addEventListener("focus",W,!1),function(){window.removeEventListener("focus",W,!1)}}),[z,B,L,H]);var V=s([]),Y=function(e){I.current&&I.current.contains(e.target)||(e.preventDefault(),V.current=[])};l((function(){return S&&(document.addEventListener("dragover",lU,!1),document.addEventListener("drop",Y,!1)),function(){S&&(document.removeEventListener("dragover",lU),document.removeEventListener("drop",Y))}}),[I,S]),l((function(){return!r&&w&&I.current&&I.current.focus(),function(){}}),[I,w,r]);var X=c((function(e){O?O(e):console.error(e)}),[O]),q=c((function(e){e.preventDefault(),e.persist(),ae(e),V.current=[].concat(gU(V.current),[e.target]),sU(e)&&Promise.resolve(o(e)).then((function(t){if(!aU(e)||P){var n=t.length,r=n>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=Zq(rU(e,n),1)[0],i=Zq(oU(e,r,o),1)[0],a=s?s(e):null;return t&&i&&!a}))}({files:t,accept:N,minSize:u,maxSize:a,multiple:d,maxFiles:h,validator:T});F({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),p&&p(e)}})).catch((function(e){return X(e)}))}),[o,p,X,P,N,u,a,d,h,T]),U=c((function(e){e.preventDefault(),e.persist(),ae(e);var t=sU(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&m&&m(e),!1}),[m,P]),Z=c((function(e){e.preventDefault(),e.persist(),ae(e);var t=V.current.filter((function(e){return I.current&&I.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),V.current=t,t.length>0||(F({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),sU(e)&&f&&f(e))}),[I,f,P]),G=c((function(e,t){var n=[],r=[];e.forEach((function(e){var t=vU(rU(e,N),2),o=t[0],i=t[1],s=vU(oU(e,u,a),2),l=s[0],c=s[1],d=T?T(e):null;if(o&&l&&!d)n.push(e);else{var h=[i,c];d&&(h=h.concat(d)),r.push({file:e,errors:h.filter((function(e){return e}))})}})),(!d&&n.length>1||d&&h>=1&&n.length>h)&&(n.forEach((function(e){r.push({file:e,errors:[nU]})})),n.splice(0)),F({acceptedFiles:n,fileRejections:r,isDragReject:r.length>0,type:"setFiles"}),g&&g(n,r,t),r.length>0&&y&&y(r,t),n.length>0&&v&&v(n,t)}),[F,d,N,u,a,h,g,v,y,T]),K=c((function(e){e.preventDefault(),e.persist(),ae(e),V.current=[],sU(e)&&Promise.resolve(o(e)).then((function(t){aU(e)&&!P||G(t,e)})).catch((function(e){return X(e)})),F({type:"reset"})}),[o,G,X,P]),J=c((function(){if(H.current){F({type:"openDialog"}),A();var e={multiple:d,types:D};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){G(e,null),F({type:"closeDialog"})})).catch((function(e){!function(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}(e)?!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?X(e):(H.current=!1,z.current?(z.current.value=null,z.current.click()):X(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):(L(e),F({type:"closeDialog"}))}))}else z.current&&(F({type:"openDialog"}),A(),z.current.value=null,z.current.click())}),[F,A,L,x,G,X,D,d]),Q=c((function(e){I.current&&I.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),J()))}),[I,J]),ee=c((function(){F({type:"focus"})}),[]),te=c((function(){F({type:"blur"})}),[]),ne=c((function(){C||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?J():setTimeout(J,0))}),[C,J]),re=function(e){return r?null:e},oe=function(e){return E?null:re(e)},ie=function(e){return M?null:re(e)},ae=function(e){P&&e.stopPropagation()},se=i((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,h=e.onDrop,p=SU(e,fU);return xU(xU(wU({onKeyDown:oe(cU(i,Q)),onFocus:oe(cU(a,ee)),onBlur:oe(cU(s,te)),onClick:re(cU(l,ne)),onDragEnter:ie(cU(c,q)),onDragOver:ie(cU(u,U)),onDragLeave:ie(cU(d,Z)),onDrop:ie(cU(h,K)),role:"string"==typeof o&&""!==o?o:"presentation"},n,I),r||E?{}:{tabIndex:0}),p)}}),[I,Q,ee,te,ne,q,U,Z,K,E,M,r]),le=c((function(e){e.stopPropagation()}),[]),ce=i((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=SU(e,mU);return xU(xU({},wU({accept:N,multiple:d,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:re(cU(r,K)),onClick:re(cU(o,le)),tabIndex:-1},n,z)),i)}}),[z,n,d,K,r]);return xU(xU({},$),{},{isFocused:j&&!r,getRootProps:se,getInputProps:ce,rootRef:I,inputRef:z,open:re(J)})}(SU(e,hU)),a=r.open,u=SU(r,pU);return g(t,(function(){return{open:a}}),[a]),o.createElement(_,null,n(xU(xU({},u),{},{open:a})))}));kU.displayName="Dropzone";var CU={disabled:!1,getFilesFromEvent:function(e){return Pq(this,void 0,void 0,(function*(){return Aq(e)&&Aq(e.dataTransfer)?function(e,t){return Pq(this,void 0,void 0,(function*(){if(e.items){const n=Iq(e.items).filter((e=>"file"===e.kind));if("drop"!==t)return n;return Lq(Rq(yield Promise.all(n.map(zq))))}return Lq(Iq(e.files).map((e=>Tq(e))))}))}(e.dataTransfer,e.type):function(e){return Aq(e)&&Aq(e.target)}(e)?function(e){return Iq(e.target.files).map((e=>Tq(e)))}(e):Array.isArray(e)&&e.every((e=>"getFile"in e&&"function"==typeof e.getFile))?function(e){return Pq(this,void 0,void 0,(function*(){const t=yield Promise.all(e.map((e=>e.getFile())));return t.map((e=>Tq(e)))}))}(e):[]}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};kU.defaultProps=CU,kU.propTypes={children:Ze.func,accept:Ze.objectOf(Ze.arrayOf(Ze.string)),multiple:Ze.bool,preventDropOnDocument:Ze.bool,noClick:Ze.bool,noKeyboard:Ze.bool,noDrag:Ze.bool,noDragEventsBubbling:Ze.bool,minSize:Ze.number,maxSize:Ze.number,maxFiles:Ze.number,disabled:Ze.bool,getFilesFromEvent:Ze.func,onFileDialogCancel:Ze.func,onFileDialogOpen:Ze.func,useFsAccessApi:Ze.bool,autoFocus:Ze.bool,onDragEnter:Ze.func,onDragLeave:Ze.func,onDragOver:Ze.func,onDrop:Ze.func,onDropAccepted:Ze.func,onDropRejected:Ze.func,onError:Ze.func,validator:Ze.func};var EU=kU,MU={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function PU(e,t){switch(t.type){case"focus":return xU(xU({},e),{},{isFocused:!0});case"blur":return xU(xU({},e),{},{isFocused:!1});case"openDialog":return xU(xU({},MU),{},{isFileDialogActive:!0});case"closeDialog":return xU(xU({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return xU(xU({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return xU(xU({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return xU({},MU);default:return e}}function OU(){}var TU=a((({file:r,label:o,containerProps:i,topContainerProps:a,dropzoneContainerProps:s,description:l,errorMessage:c,helperTextContainerProps:u,helperTextProps:d,onClickShowFileSelect:h,onUpload:p,onDelete:f,onPreview:m})=>{const g={position:"absolute",height:"100%",width:"100%",objectFit:"contain"},v=AL({file:r,styles:{img:g,embed:g}});return t(B,{direction:"vertical",dimensionX:"fill",dimensionY:472,alignment:"top",gap:10,className:`${i?.className}`,children:[t(B,{direction:"vertical",dimensionX:"fill",gap:10,className:`${i?.className} ${Mq.container}`,children:[e(KA,{prefix:{children:e(Ga,{name:"storage",className:Mq.icon})},root:{children:e(V,{variant:"secondary",children:o})},suffix:{children:a?.hideActions?null:t(n,{children:[e(xs,{variant:"icon",onClick:h,disabled:a?.disableEditIcon,children:a?.editIcon||e(Ga,{name:"pencil"})}),e(xs,{variant:"icon",color:"danger",onClick:e=>{f?.(e)},disabled:a?.disableDeleteIcon,children:a?.deleteIcon||e(Ga,{name:"delete"})})]}),gap:0,...a?.suffix},...a?.container}),e(EU,{multiple:!1,onDrop:e=>{e.length&&p?.(e[0])},children:({getRootProps:o,getInputProps:i})=>e(B,{className:`${s?.container?.className} ${Mq.storage}`,alignment:"center",dimensionX:"fill",dimensionY:407,direction:"vertical",gap:10,...o(),...s?.container,onClick:e=>{r?.url?m?.():h?.()},children:t(n,{children:[t(n,r?{children:[v,e(Ga,{name:s?.previewIcon||"filterCenterFocus",size:32,className:Mq.previewIcon})]}:{children:[e(Ga,{name:s?.uploadIcon||"storage",size:80}),e(V,{className:Mq.text,children:s?.description||t("span",{children:["Upload your file or ",e("br",{})," pick an file from storage"]})})]}),e("input",{...i()})]})})})]}),(c||l)&&e(se.HelperText,{alignment:"leftCenter",dimensionX:"fill",...u,className:`${Mq.helperText} ${u?.className}`,children:e(V,{...d,size:"small",variant:c?"danger":"secondary",className:`${d?.className}`,children:c||l})})]})})),NU="MultipleSelection-module_icon__ewhbs",DU="MultipleSelection-module_text__G5mEr",AU="MultipleSelection-module_select__YXbPL",LU="MultipleSelection-module_baseInput__eUWHB";var IU=a((({label:t,description:n,value:r=[],options:o,onChange:i,selectProps:a,inputContainerClassName:l,...c})=>{const d=s(null),[h,p]=u(!1),f=s(null);return e(pe,{dimensionX:"fill",description:n,dropDownRef:f,forceFocus:h,onFocusChange:e=>(e=>{d?.current?.toggleDropdown(e),p(e)})(e),labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Ga,{className:NU,name:"formatListChecks"})},root:{dimensionX:"hug",children:e(V,{className:DU,size:"medium",children:t})}},inputContainerProps:{className:`${LU} ${l}`},...c,children:e(ng,{selectRef:d,externalDropdownRef:f,disableClick:!0,options:o||[],value:r,placeholder:"",multiple:!0,onChange:e=>{i?.(e)},...a,className:`${AU} ${a?.className}`})})})),zU="Location-module_location__ix8Fi",RU="Location-module_icon__a3NfC",$U="Location-module_mapMarker__J3aE2",FU="Location-module_description__mG0kX";var jU=a((({coordinates:n,title:r,onChange:o,description:i,...a})=>t(B,{dimensionX:500,dimensionY:500,gap:10,direction:"vertical",alignment:"leftCenter",...a,className:`${a.className} ${zU}`,children:[e(KA,{prefix:{children:e(Ga,{name:"mapMarker",className:RU})},root:{children:e(V,{variant:"secondary",children:r})}}),e(_L,{coordinates:n,markerIcon:{icon:e(Ga,{name:"mapMarker",size:"lg",className:$U})},onChange:o}),e(V,{size:"xsmall",className:`${FU}`,children:i})]}))),BU="RichText-module_container__MIFsF",HU="RichText-module_description__-uZpI";const WU={},VU={},YU={},XU={},qU={},UU={},ZU={},GU={},KU={},JU={},QU={},eZ={},tZ={},nZ={},rZ={},oZ={},iZ={},aZ={},sZ={},lZ={},cZ={},uZ={},dZ={},hZ={},pZ={},fZ={},mZ={},gZ={},vZ={},yZ={},bZ={},_Z={},xZ={},wZ={},SZ={},kZ={},CZ={},EZ={},MZ={},PZ={},OZ={},TZ={},NZ={},DZ={},AZ={},LZ="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,IZ=LZ&&"documentMode"in document?document.documentMode:null,zZ=LZ&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),RZ=LZ&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),$Z=!(!LZ||!("InputEvent"in window)||IZ)&&"getTargetRanges"in new window.InputEvent("input"),FZ=LZ&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),jZ=LZ&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,BZ=LZ&&/Android/.test(navigator.userAgent),HZ=LZ&&/^(?=.*Chrome).*/i.test(navigator.userAgent),WZ=LZ&&BZ&&HZ,VZ=LZ&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!HZ,YZ=0,XZ=1,qZ=2,UZ=1,ZZ=2,GZ=3,KZ=4,JZ=5,QZ=6,eG=FZ||jZ||VZ?" ":"​",tG="\n\n",nG=RZ?" ":eG,rG="֑-߿יִ-﷽ﹰ-ﻼ",oG="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",iG=new RegExp("^[^"+oG+"]*["+rG+"]"),aG=new RegExp("^[^"+rG+"]*["+oG+"]"),sG={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},lG={directionless:1,unmergeable:2},cG={center:2,end:6,justify:4,left:1,right:3,start:5},uG={[ZZ]:"center",[QZ]:"end",[KZ]:"justify",[UZ]:"left",[GZ]:"right",[JZ]:"start"},dG={normal:0,segmented:2,token:1},hG={[YZ]:"normal",[qZ]:"segmented",[XZ]:"token"};var pG=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function fG(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let mG=!1,gG=0;function vG(e){gG=e.timeStamp}function yG(e,t,n){const r="BR"===e.nodeName,o=t.__lexicalLineBreak;return o&&(e===o||r&&e.previousSibling===o)||r&&void 0!==qG(e,n)}function bG(e,t,n){const r=AK(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&sK(t,a,o,i,!1)}function _G(e,t,n){if(NQ(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return $G(t)&&n.isAttached()}function xG(e,t,n,r){for(let o=e;o&&!qK(o);o=SK(o)){const e=qG(o,t);if(void 0!==e){const t=YG(e,n);if(t)return O0(t)||!IK(o)?void 0:[o,t]}else if(o===r)return[r,JG(n)]}}function wG(e,t,n){mG=!0;const r=performance.now()-gG>100;try{w0(e,(()=>{const o=YQ()||function(e){return e.getEditorState().read((()=>{const e=YQ();return null!==e?e.clone():null}))}(e),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],h=d.type,p=d.target,f=xG(p,e,s,a);if(!f)continue;const[m,g]=f;if("characterData"===h)r&&_Q(g)&&$G(p)&&_G(o,p,g)&&bG(p,g,e);else if("childList"===h){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=XG(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&!yG(r,i,e)){if(RZ){const e=(IK(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];(yG(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&i.set(m,g)}}}if(i.size>0)for(const[t,n]of i)n.reconcileObservedMutation(t,e);const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||yG(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,QG(o)),RZ&&bK(e)&&o.insertRawText(u))}))}finally{mG=!1}}function SG(e){const t=e._observer;null!==t&&wG(e,t.takeRecords(),t)}function kG(e){!function(e){0===gG&&MK(e).addEventListener("textInput",vG,!0)}(e),e._observer=new MutationObserver(((t,n)=>{wG(e,t,n)}))}function CG(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function EG(e,t){const n=e.mergeWithSibling(t),r=c0()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function MG(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&_Q(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(CG(t,r)){r=EG(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&_Q(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(CG(r,n)){r=EG(r,n);break}break}n.remove()}}else r.remove()}function PG(e){return OG(e.anchor),OG(e.focus),e}function OG(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),_Q(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!E0(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let TG=1;const NG="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function DG(e){const t=document.activeElement;if(!IK(t))return!1;const n=t.nodeName;return O0(UG(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==zG(t))}function AG(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!DG(t)&&IG(t)===e}catch(e){return!1}}function LG(e){return e instanceof W0}function IG(e){let t=e;for(;null!=t;){const e=zG(t);if(LG(e))return e;t=SK(t)}return null}function zG(e){return e?e.__lexicalEditor:null}function RG(e){return e.isToken()||e.isSegmented()}function $G(e){return zK(e)&&3===e.nodeType}function FG(e){let t=e;for(;null!=t;){if($G(t))return t;t=t.firstChild}return null}function jG(e,t,n){const r=sG[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~sG.superscript:"superscript"===t?o&=~sG.subscript:"lowercase"===t?(o&=~sG.uppercase,o&=~sG.capitalize):"uppercase"===t?(o&=~sG.lowercase,o&=~sG.capitalize):"capitalize"===t&&(o&=~sG.lowercase,o&=~sG.uppercase),o}function BG(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function HG(e){s0();const t=e.getLatest(),n=t.__parent,r=l0(),o=c0(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,E0(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function WG(e){a0();const t=c0(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=YG(n);null!==e&&e.getWritable()}if(null!==e){const t=YG(e);null!==t&&t.getWritable()}}}function VG(){return i0()?null:c0()._compositionKey}function YG(e,t){const n=(t||l0())._nodeMap.get(e);return void 0===n?null:n}function XG(e,t){const n=qG(e,c0());return void 0!==n?YG(n,t):null}function qG(e,t){return e[`__lexicalKey_${t._key}`]}function UG(e,t){let n=e;for(;null!=n;){const e=XG(n,t);if(null!==e)return e;n=SK(n)}return null}function ZG(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function GG(e){return e.read((()=>KG().getTextContent()))}function KG(){return JG(l0())}function JG(e){return e._nodeMap.get("root")}function QG(e){a0();const t=l0();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function eK(e){const t=c0(),n=function(e,t){let n=e;for(;null!=n;){const e=qG(n,t);if(void 0!==e)return e;n=SK(n)}return null}(e,t);return null===n?e===t.getRootElement()?YG("root"):null:YG(n)}function tK(e,t){return t?e.getTextContentSize():0}function nK(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function rK(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function oK(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function iK(e){return $G(e)?e.nodeValue:null}function aK(e,t,n){const r=AK(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=iK(o);const r=UG(o);if(null!==t&&_Q(r)){if(t===eG&&n){const e=n.length;t=n,i=e,a=e}null!==t&&sK(r,t,i,a,e)}}}function sK(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===eG&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(WG(null),FZ||jZ||VZ)i.remove();else{const e=c0();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const t=i.getParent(),o=XQ(),l=i.getTextContentSize(),c=VG(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||NQ(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const d=YQ();if(!NQ(d)||null===n||null===r)return void i.setTextContent(s);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=bQ(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function lK(e){return"ArrowLeft"===e}function cK(e){return"ArrowRight"===e}function uK(e,t){return zZ?e:t}function dK(e){return"Enter"===e}function hK(e){return"Backspace"===e}function pK(e){return"Delete"===e}function fK(e,t,n){return"a"===e.toLowerCase()&&uK(t,n)}function mK(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=fG(o);return n[t]=e,e}return o}function gK(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&pG(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(a,d?"updated":o)}function vK(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function yK(e,t){const n=e.offset;if("element"===e.type)return vK(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?vK(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function bK(e){const t=MK(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function _K(e,t,n){return b0(e,t,n)}function xK(e){return!N0(e)&&!e.isLastChild()&&!e.isInline()}function wK(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&pG(75,t),n}function SK(e){const t=e.assignedSlot||e.parentElement;return RK(t)?t.host:t}function kK(e){return function(e){return zK(e)&&9===e.nodeType}(e)?e:IK(e)?e.ownerDocument:null}function CK(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function EK(e){const t=kK(e);return t?t.defaultView:null}function MK(e){const t=e._window;return null===t&&pG(78),t}function PK(e){return N0(e)||E0(e)&&e.isShadowRoot()}function OK(e){const t=c0(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&pG(200,e.constructor.name,n);const{replace:o,replaceWithKlass:i}=r;if(null!==o){const t=o(e),r=t.constructor;return null!==i?t instanceof i||pG(201,i.name,i.getType(),r.name,r.getType(),e.constructor.name,n):t instanceof e.constructor&&r!==e.constructor||pG(202,r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&pG(203,e.constructor.name,n,r.name,r.getType()),t}return e}function TK(e,t){!N0(e.getParent())||E0(t)||O0(t)||pG(99)}function NK(e){return(O0(e)||E0(e)&&!e.canBeEmpty())&&!e.isInline()}function DK(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function AK(e){return LZ?(e||window).getSelection():null}function LK(e){return IK(e)&&"A"===e.tagName}function IK(e){return zK(e)&&1===e.nodeType}function zK(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function RK(e){return zK(e)&&11===e.nodeType}function $K(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function FK(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function jK(e){if(O0(e)&&!e.isInline())return!0;if(!E0(e)||PK(e))return!1;const t=e.getFirstChild(),n=null===t||nQ(t)||_Q(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function BK(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const HK=new WeakMap,WK=new Map;function VK(e){if(!e._readOnly&&e.isEmpty())return WK;e._readOnly||pG(192);let t=HK.get(e);return t||(t=function(e){const t=new Map;for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}return t}(e),HK.set(e,t)),t}function YK(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function XK(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function qK(e){return!0===e.__lexicalUnmanaged}function UK(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(E0(a)&&UK(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let ZK,GK,KK,JK,QK,eJ,tJ,nJ,rJ,oJ,iJ="",aJ="",sJ=null,lJ="",cJ="",uJ=!1,dJ=!1,hJ=null;function pJ(e,t){const n=tJ.get(e);if(null!==t){const n=PJ(e);n.parentNode===t&&t.removeChild(n)}if(nJ.has(e)||GK._keyToDOMMap.delete(e),E0(n)){const e=kJ(n,tJ);fJ(e,0,e.length-1,null)}void 0!==n&&gK(oJ,KK,JK,n,"destroyed")}function fJ(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&pJ(t,r)}}function mJ(e,t){e.setProperty("text-align",t)}const gJ="40px";function vJ(e,t){const n=ZK.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||gJ;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function yJ(e,t){const n=e.style;0===t?mJ(n,""):1===t?mJ(n,"left"):2===t?mJ(n,"center"):3===t?mJ(n,"right"):4===t?mJ(n,"justify"):5===t?mJ(n,"start"):6===t&&mJ(n,"end")}function bJ(e,t){const n=nJ.get(e);void 0===n&&pG(60);const r=n.createDOM(ZK,GK);if(function(e,t,n){const r=n._keyToDOMMap;(function(e,t,n){e[`__lexicalKey_${t._key}`]=n})(t,n,e),r.set(e,t)}(e,r,GK),_Q(n)?r.setAttribute("data-lexical-text","true"):O0(n)&&r.setAttribute("data-lexical-decorator","true"),E0(n)){const e=n.__indent,t=n.__size;if(0!==e&&vJ(r,e),0!==t){const e=t-1;!function(e,t,n,r){const o=aJ;aJ="",_J(e,n,0,t,n.getDOMSlot(r)),SJ(n,r),aJ=o}(kJ(n,nJ),e,n,r)}const o=n.__format;0!==o&&yJ(r,o),n.isInline()||wJ(null,n,r),xK(n)&&(iJ+=tG,cJ+=tG)}else{const t=n.getTextContent();if(O0(n)){const t=n.decorate(GK,ZK);null!==t&&EJ(e,t),r.contentEditable="false"}else _Q(n)&&(n.isDirectionless()||(aJ+=t));iJ+=t,cJ+=t}return null!==t&&t.insertChild(r),gK(oJ,KK,JK,n,"created"),r}function _J(e,t,n,r,o){const i=iJ;iJ="";let a=n;for(;a<=r;++a){bJ(e[a],o);const t=nJ.get(e[a]);null!==t&&_Q(t)&&(null===sJ&&(sJ=t.getFormat()),""===lJ&&(lJ=t.getStyle()))}xK(t)&&(iJ+=tG),o.element.__lexicalTextContent=iJ,iJ=i+iJ}function xJ(e,t){if(e){const n=e.__last;if(n){const e=t.get(n);if(e)return nQ(e)?"line-break":O0(e)&&e.isInline()?"decorator":null}return"empty"}return null}function wJ(e,t,n){const r=xJ(e,tJ),o=xJ(t,nJ);r!==o&&t.getDOMSlot(n).setManagedLineBreak(o)}function SJ(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==aJ||r!==hJ){const n=""===aJ,i=n?hJ:(o=aJ,iG.test(o)?"rtl":aG.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=ZK.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=fG(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=fG(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}dJ||(e.getWritable().__dir=i)}hJ=i,t.__lexicalDirTextContent=aJ,t.__lexicalDir=i}var o}function kJ(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&pG(101),n.push(r),r=e.__next}return n}function CJ(e,t){const n=tJ.get(e);let r=nJ.get(e);void 0!==n&&void 0!==r||pG(61);const o=uJ||eJ.has(e)||QK.has(e),i=wK(GK,e);if(n===r&&!o){if(E0(n)){const e=i.__lexicalTextContent;void 0!==e&&(iJ+=e,cJ+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(aJ+=t)}else{const e=n.getTextContent();_Q(n)&&!n.isDirectionless()&&(aJ+=e),cJ+=e,iJ+=e}return i}if(n!==r&&o&&gK(oJ,KK,JK,r,"updated"),r.updateDOM(n,i,ZK)){const n=bJ(e,null);return null===t&&pG(62),t.replaceChild(n,i),pJ(e,null),n}if(E0(n)&&E0(r)){const e=r.__indent;e!==n.__indent&&vJ(i,e);const t=r.__format;t!==n.__format&&yJ(i,t),o&&(function(e,t,n){const r=aJ;var o;aJ="",sJ=null,lJ="",function(e,t,n){const r=iJ,o=e.__size,i=t.__size;iJ="";const a=n.element;if(1===o&&1===i){const n=e.__first,r=t.__first;if(n===r)CJ(n,a);else{const e=PJ(n),t=bJ(r,null);try{a.replaceChild(t,e)}catch(o){if("object"==typeof o&&null!=o){const i=`${o.toString()} Parent: ${a.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw new Error(i)}throw o}pJ(n,null)}const i=nJ.get(r);_Q(i)&&(null===sJ&&(sJ=i.getFormat()),""===lJ&&(lJ=i.getStyle()))}else{const r=kJ(e,tJ),s=kJ(t,nJ);if(r.length!==o&&pG(227),s.length!==i&&pG(228),0===o)0!==i&&_J(s,t,0,i-1,n);else if(0===i){if(0!==o){const e=null==n.after&&null==n.before&&null==n.element.__lexicalLineBreak;fJ(r,0,o-1,e?null:a),e&&(a.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.getFirstChild(),d=0,h=0;for(;d<=a&&h<=s;){const e=t[d],r=n[h];if(e===r)u=MJ(CJ(r,i.element)),d++,h++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=wK(GK,r);e===u?u=MJ(CJ(r,i.element)):(i.withBefore(u).insertChild(e),CJ(r,i.element)),d++,h++}else bJ(r,i.withBefore(u)),h++;else u=MJ(PJ(e)),pJ(e,i.element),d++}const o=nJ.get(r);null!==o&&_Q(o)&&(null===sJ&&(sJ=o.getFormat()),""===lJ&&(lJ=o.getStyle()))}const p=d>a,f=h>s;if(p&&!f){const t=n[s+1],r=void 0===t?null:GK.getElementByKey(t);_J(n,e,h,s,i.withBefore(r))}else f&&!p&&fJ(t,d,a,i.element)}(t,r,s,o,i,n)}xK(t)&&(iJ+=tG),a.__lexicalTextContent=iJ,iJ=r+iJ}(e,t,t.getDOMSlot(n)),SJ(t,n),o=t,null==sJ||sJ===o.__textFormat||dJ||(o.setTextFormat(sJ),o.setTextStyle(lJ)),function(e){""===lJ||lJ===e.__textStyle||dJ||e.setTextStyle(lJ)}(t),aJ=r}(n,r,i),N0(r)||r.isInline()||wJ(n,r,i)),xK(r)&&(iJ+=tG,cJ+=tG)}else{const t=r.getTextContent();if(O0(r)){const t=r.decorate(GK,ZK);null!==t&&EJ(e,t)}else _Q(r)&&!r.isDirectionless()&&(aJ+=t);iJ+=t,cJ+=t}if(!dJ&&N0(r)&&r.__cachedText!==cJ){const e=r.getWritable();e.__cachedText=cJ,r=e}return i}function EJ(e,t){let n=GK._pendingDecorators;const r=GK._decorators;if(null===n){if(r[e]===t)return;n=ZG(GK)}n[e]=t}function MJ(e){let t=e.nextSibling;return null!==t&&t===GK._blockCursorElement&&(t=t.nextSibling),t}function PJ(e){const t=rJ.get(e);return void 0===t&&pG(75,e),t}const OJ=Object.freeze({}),TJ=[["keydown",function(e,t){if(NJ=e.timeStamp,DJ=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;if(!_K(t,rZ,e)&&null!=n){if(function(e,t,n,r){return cK(e)&&!t&&!r&&!n}(n,o,a,i))_K(t,oZ,e);else if(function(e,t,n,r,o){return cK(e)&&!r&&!n&&(t||o)}(n,o,r,a,i))_K(t,iZ,e);else if(function(e,t,n,r){return lK(e)&&!t&&!r&&!n}(n,o,a,i))_K(t,aZ,e);else if(function(e,t,n,r,o){return lK(e)&&!r&&!n&&(t||o)}(n,o,r,a,i))_K(t,sZ,e);else if(function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i))_K(t,lZ,e);else if(function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i))_K(t,cZ,e);else if(function(e,t){return dK(e)&&t}(n,r))$J=!0,_K(t,uZ,e);else if(function(e){return" "===e}(n))_K(t,dZ,e);else if(function(e,t){return zZ&&t&&"o"===e.toLowerCase()}(n,o))e.preventDefault(),$J=!0,_K(t,qU,!0);else if(function(e,t){return dK(e)&&!t}(n,r))$J=!1,_K(t,uZ,e);else if(function(e,t,n,r){return zZ?!t&&!n&&(hK(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&hK(e)}(n,a,i,o))hK(n)?_K(t,hZ,e):(e.preventDefault(),_K(t,XU,!0));else if(function(e){return"Escape"===e}(n))_K(t,pZ,e);else if(function(e,t,n,r,o){return zZ?!(n||r||o)&&(pK(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&pK(e)}(n,o,r,a,i))pK(n)?_K(t,fZ,e):(e.preventDefault(),_K(t,XU,!1));else if(function(e,t,n){return hK(e)&&(zZ?t:n)}(n,a,o))e.preventDefault(),_K(t,JU,!0);else if(function(e,t,n){return pK(e)&&(zZ?t:n)}(n,a,o))e.preventDefault(),_K(t,JU,!1);else if(function(e,t){return zZ&&t&&hK(e)}(n,i))e.preventDefault(),_K(t,QU,!0);else if(function(e,t){return zZ&&t&&pK(e)}(n,i))e.preventDefault(),_K(t,QU,!1);else if(function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&uK(n,r)}(n,a,i,o))e.preventDefault(),_K(t,eZ,"bold");else if(function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&uK(n,r)}(n,a,i,o))e.preventDefault(),_K(t,eZ,"underline");else if(function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&uK(n,r)}(n,a,i,o))e.preventDefault(),_K(t,eZ,"italic");else if(function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i))_K(t,mZ,e);else if(function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&uK(n,r)}(n,r,i,o))e.preventDefault(),_K(t,tZ,void 0);else if(function(e,t,n,r){return zZ?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o))e.preventDefault(),_K(t,nZ,void 0);else{const a=t._editorState._selection;null===a||NQ(a)?!RZ&&fK(n,i,o)&&(e.preventDefault(),_K(t,EZ,e)):function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(zZ?n:r)}(n,r,i,o)?(e.preventDefault(),_K(t,kZ,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(zZ?n:r)}(n,r,i,o)?(e.preventDefault(),_K(t,CZ,e)):fK(n,i,o)&&(e.preventDefault(),_K(t,EZ,e))}(function(e,t,n,r){return e||t||n||r})(o,r,a,i)&&_K(t,AZ,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;zK(n)&&"touch"!==r&&0===e.button&&w0(t,(()=>{O0(UG(n))||(RJ=!0)}))}],["compositionstart",function(e,t){w0(t,(()=>{const n=YQ();if(NQ(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();WG(r.key),(e.timeStamp<NJ+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||_Q(o)&&o.getStyle()!==n.style)&&_K(t,ZU,nG)}}))}],["compositionend",function(e,t){RZ?FJ=!0:w0(t,(()=>{YJ(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),w0(t,(()=>{const n=YQ(),r=e.data,o=VJ(e);if(null!=r&&NQ(n)&&BJ(n,o,r,e.timeStamp,!1)){FJ&&(YJ(t,r),FJ=!1);const o=n.anchor.getNode(),i=AK(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;$Z&&!n.isCollapsed()&&_Q(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===iK(i.anchorNode)||_K(t,ZU,r);const c=r.length;RZ&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),FZ||jZ||VZ||!t.isComposing()||(NJ=0,WG(null))}else aK(!1,t,null!==r?r:void 0),FJ&&(YJ(t,r||void 0),FJ=!1);a0(),SG(c0())})),LJ=null}],["click",function(e,t){w0(t,(()=>{const n=YQ(),r=AK(t._window),o=XQ();if(r)if(NQ(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!N0(i)&&1===KG().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3!==e.detail||n.isCollapsed()||i!==n.focus.getNode()&&(E0(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;(IK(n)||$G(n))&&QG(VQ(o,r,t,e))}_K(t,YU,e)}))}],["cut",OJ],["copy",OJ],["dragstart",OJ],["dragover",OJ],["dragend",OJ],["paste",OJ],["focus",OJ],["blur",OJ],["drop",OJ]];$Z&&TJ.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=VJ(e);"deleteCompositionText"===n||RZ&&bK(t)||"insertCompositionText"!==n&&w0(t,(()=>{const o=YQ();if("deleteContentBackward"===n){if(null===o){const e=XQ();if(!NQ(e))return;QG(e.clone())}if(NQ(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===DJ&&i<NJ+30&&t.isComposing()&&n){if(WG(null),NJ=0,setTimeout((()=>{w0(t,(()=>{WG(null)}))}),30),NQ(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),_Q(e)||pG(142),o.style=e.getStyle()}}else{WG(null),e.preventDefault();const r=o.anchor.getNode(),i=r.getTextContent(),a=r.canInsertTextAfter(),s=0===o.anchor.offset&&o.focus.offset===i.length;WZ&&n&&!s&&a||_K(t,XU,!0)}return}}var i;if(!NQ(o))return;const a=e.data;null!==LJ&&aK(!1,t,LJ),o.dirty&&null===LJ||!o.isCollapsed()||N0(o.anchor.getNode())||null===r||o.applyDOMRange(r),LJ=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":_K(t,ZU,e);break;case"insertFromComposition":WG(null),_K(t,ZU,e);break;case"insertLineBreak":WG(null),_K(t,qU,!1);break;case"insertParagraph":WG(null),$J&&!jZ?($J=!1,_K(t,qU,!1)):_K(t,UU,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":_K(t,GU,e);break;case"deleteByComposition":(function(e,t){return e!==t||E0(e)||E0(t)||!e.isToken()||!t.isToken()})(c,u)&&_K(t,KU,e);break;case"deleteByDrag":case"deleteByCut":_K(t,KU,e);break;case"deleteContent":_K(t,XU,!1);break;case"deleteWordBackward":_K(t,JU,!0);break;case"deleteWordForward":_K(t,JU,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":_K(t,QU,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":_K(t,QU,!1);break;case"formatStrikeThrough":_K(t,eZ,"strikethrough");break;case"formatBold":_K(t,eZ,"bold");break;case"formatItalic":_K(t,eZ,"italic");break;case"formatUnderline":_K(t,eZ,"underline");break;case"historyUndo":_K(t,tZ,void 0);break;case"historyRedo":_K(t,nZ,void 0)}else{if("\n"===a)e.preventDefault(),_K(t,qU,!1);else if(a===tG)e.preventDefault(),_K(t,UU,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&BJ(o,r,a,e.timeStamp,!0)?(e.preventDefault(),_K(t,ZU,a)):LJ=a;AJ=e.timeStamp}}))}(e,t)]);let NJ=0,DJ=null,AJ=0,LJ=null;const IJ=new WeakMap;let zJ=!1,RJ=!1,$J=!1,FJ=!1,jJ=[0,"",0,"root",0];function BJ(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=c0(),c=AK(l._window),u=null!==c?c.anchorNode:null,d=i.key,h=l.getElementByKey(d),p=n.length;return d!==a.key||!_Q(s)||(!o&&(!$Z||AJ<r+50)||s.isDirty()&&p<2||nK(n))&&i.offset!==a.offset&&!s.isComposing()||RG(s)||s.isDirty()&&p>1||(o||!$Z)&&null!==h&&!s.isComposing()&&u!==FG(h)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(_Q(t)||E0(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function HJ(e,t){return $G(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function WJ(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;zJ&&(zJ=!1,HJ(r,o)&&HJ(i,a))||w0(t,(()=>{if(!n)return void QG(null);if(!AG(t,r,i))return;const s=YQ();if(NQ(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=MK(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=jJ,h=KG(),p=!1===t.isComposing()&&""===h.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)_Q(r)||pG(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!p){E0(r)||pG(259);const e=n.getNode();s.style="",e.isEmpty()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,d=l?t:e,h=l?e:t;let p=2047,f=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(_Q(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===h&&0===u)&&(f=!0,p&=t.getFormat(),0===p))break}s.format=f?p:0}}_K(t,WU,void 0)}))}function VJ(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function YJ(e,t){const n=e._compositionKey;if(WG(null),null!==n&&null!=t){if(""===t){const t=YG(n),r=FG(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&_Q(t)&&sK(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=YQ();if(NQ(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void _K(e,uZ,null)}}}aK(!0,e,t)}function XJ(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const qJ=new Map;function UJ(e){const t=function(e){const t=EK(e);return t?t.getSelection():null}(e.target);if(null===t)return;const n=IG(t.anchorNode);if(null===n)return;RJ&&(RJ=!1,w0(n,(()=>{const r=XQ(),o=t.anchorNode;(IK(o)||$G(o))&&QG(VQ(r,t,n,e))})));const r=rK(n),o=r[r.length-1],i=o._key,a=qJ.get(i),s=a||o;s!==n&&WJ(t,s,!1),WJ(t,n,!0),n!==o?qJ.set(i,n):a&&qJ.delete(i)}function ZJ(e){e._lexicalHandled=!0}function GJ(e){return!0===e._lexicalHandled}function KJ(e,t,n){a0();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=YQ();if(!NQ(t)||!E0(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return CK(o,e)&&n.set(e.__key,0,"element"),CK(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(NQ(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(ZQ(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(ZQ(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else AQ(i)&&t&&e.isSelected()&&e.selectPrevious();if(NQ(i)&&t&&!a){const t=e.getIndexWithinParent();BG(e),qQ(i,o,t,-1)}else BG(e);n||PK(o)||o.canBeEmpty()||!o.isEmpty()||KJ(o,t),t&&N0(o)&&o.isEmpty()&&o.selectEnd()}class JJ{static getType(){pG(64,this.name)}static clone(e){pG(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);a0(),s0();const n=c0(),r=l0(),o=""+TG++;r._nodeMap.set(o,e),E0(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){pG(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=YG(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||YQ();if(null==t)return!1;const n=t.getNodes().some((e=>e.__key===this.__key));if(_Q(this))return n;if(NQ(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(O0(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:YG(e)}getParentOrThrow(){const e=this.getParent();return null===e&&pG(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(PK(t))return E0(e)||e===this&&O0(e)||pG(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&pG(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:YG(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:YG(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();E0(this)&&t.unshift(this),E0(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=E0(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&pG(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=c0()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=YG(this.__key);return null===e&&pG(113),e}getWritable(){a0();const e=l0(),t=c0(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=YQ();if(null!==a&&a.setCachedNodes(null),i.has(r))return HG(o),o;const s=YK(o);return i.add(r),HG(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){pG(70)}updateDOM(e,t,n){pG(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){return{type:this.__type,version:1}}static importJSON(e){pG(18,this.name)}updateFromJSON(e){return this}static transform(){return null}remove(e){KJ(this,!0,e)}replace(e,t){a0();let n=YQ();null!==n&&(n=n.clone()),TK(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;BG(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,h=r.__next,p=r.__parent;if(KJ(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=d,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=h,a.__parent=p,s.__size=l,t&&(E0(this)&&E0(a)||pG(139),this.getChildren().forEach((e=>{a.append(e)}))),NQ(n)){QG(n);const e=n.anchor,t=n.focus;e.key===o&&PQ(e,a),t.key===o&&PQ(t,a)}return VG()===o&&WG(i),a}insertAfter(e,t=!0){a0(),TK(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=YQ();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if(BG(r),NQ(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&NQ(i)){const e=this.getIndexWithinParent();qQ(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){a0(),TK(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;BG(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=YQ();return t&&NQ(c)&&qQ(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return F0()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){a0();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(E0(n))return n.select();if(!_Q(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){a0();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(E0(n))return n.select(0,0);if(!_Q(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}class QJ extends JJ{static getType(){return"linebreak"}static clone(e){return new QJ(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&FK(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&rQ(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&rQ(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&FK(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&rQ(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&rQ(r))return!0}return!1}(e)?null:{conversion:eQ,priority:0}}}static importJSON(e){return tQ().updateFromJSON(e)}}function eQ(e){return{node:tQ()}}function tQ(){return OK(new QJ)}function nQ(e){return e instanceof QJ}function rQ(e){return $G(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function oQ(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function iQ(e,t){return 1&t?"strong":2&t?"em":"span"}function aQ(e,t,n,r,o){const i=r.classList;let a=mK(o,"base");void 0!==a&&i.add(...a),a=mK(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in sG){const r=sG[e];if(a=mK(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function sQ(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?eG:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||RZ){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function lQ(e,t,n,r,o,i){sQ(o,e,t);const a=i.theme.text;void 0!==a&&aQ(0,0,r,e,a)}function cQ(e,t){const n=document.createElement(t);return n.appendChild(e),n}class uQ extends JJ{static getType(){return"text"}static clone(e){return new uQ(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return hG[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===VG()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=sG[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return jG(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=oQ(0,n),o=iQ(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),lQ(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=oQ(0,o),s=oQ(0,i),l=iQ(0,o),c=iQ(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&pG(48);const o=document.createElement(c);return lQ(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&pG(49)),sQ(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&aQ(0,o,i,u,d);const h=e.__style,p=this.__style;return h!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:mQ,priority:0}),b:()=>({conversion:hQ,priority:0}),code:()=>({conversion:yQ,priority:0}),em:()=>({conversion:yQ,priority:0}),i:()=>({conversion:yQ,priority:0}),s:()=>({conversion:yQ,priority:0}),span:()=>({conversion:dQ,priority:0}),strong:()=>({conversion:yQ,priority:0}),sub:()=>({conversion:yQ,priority:0}),sup:()=>({conversion:yQ,priority:0}),u:()=>({conversion:yQ,priority:0})}}static importJSON(e){return bQ().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return IK(t)||pG(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=cQ(t,"b")),this.hasFormat("italic")&&(t=cQ(t,"i")),this.hasFormat("strikethrough")&&(t=cQ(t,"s")),this.hasFormat("underline")&&(t=cQ(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?sG[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?lG[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=jG(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=dG[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){a0();let n=e,r=t;const o=YQ(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!NQ(o))return HQ(a,n,a,r,"text","text");{const e=VG();e!==o.anchor.key&&e!==o.focus.key||WG(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=YQ();if(r&&NQ(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){a0();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=VG(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],d=t.getParent();let h;const p=t.getFormat(),f=t.getStyle(),m=t.__detail;let g=!1;t.isSegmented()?(h=bQ(u),h.__format=p,h.__style=f,h.__detail=m,g=!0):(h=t.getWritable(),h.__text=u);const v=YQ(),y=[h];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=bQ(t).getWritable();i.__format=p,i.__style=f,i.__detail=m;const s=i.__key,l=b+n;if(NQ(v)){const e=v.anchor,t=v.focus;e.key===r&&"text"===e.type&&e.offset>b&&e.offset<=l&&(e.key=s,e.offset-=b,v.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,v.dirty=!0)}o===r&&WG(s),b=l,y.push(i)}if(null!==d){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&HG(t),null!==n&&HG(n)}(this);const e=d.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),NQ(v)&&qQ(v,d,t,c-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||pG(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;VG()===r&&WG(n);const a=YQ();if(NQ(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(GQ(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(GQ(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function dQ(e){return{forChild:xQ(e.style),node:null}}function hQ(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:xQ(t.style,n?void 0:"bold"),node:null}}const pQ=new WeakMap;function fQ(e){if(!IK(e))return!1;if("PRE"===e.nodeName)return!0;const t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}function mQ(e){const t=e;null===e.parentElement&&pG(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=pQ.get(n))&&!fQ(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)pQ.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(tQ()):"\t"===r?t.push(SQ()):""!==r&&t.push(bQ(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=gQ(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=gQ(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:bQ(n)}}function gQ(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,IK(n)){const e=n.style.display;if(""===e&&!$K(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if($G(n))return n;if("BR"===n.nodeName)return null}}const vQ={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function yQ(e){const t=vQ[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:xQ(e.style,t),node:null}}function bQ(e=""){return OK(new uQ(e))}function _Q(e){return e instanceof uQ}function xQ(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>_Q(e)?(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}class wQ extends uQ{static getType(){return"tab"}static clone(e){return new wQ(e.__key)}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),n=mK(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}static importJSON(e){return SQ().updateFromJSON(e)}setTextContent(e){return"\t"!==e&&""!==e&&pG(126),super.setTextContent(e)}setDetail(e){return 2!==e&&pG(127),this}setMode(e){return"normal"!==e&&pG(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function SQ(){return OK(new wQ)}function kQ(e){return e instanceof wQ}class CQ{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(E0(t)){const e=t.getDescendantByIndex(r);t=null!=e?e:t}if(E0(n)){const e=n.getDescendantByIndex(o);n=null!=e?e:n}return t===n?r<o:t.isBefore(n)}getNode(){const e=YG(this.key);return null===e&&pG(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,i0()||(VG()===o&&WG(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function EQ(e,t,n){return new CQ(e,t,n)}function MQ(e,t){let n=t.__key,r=e.offset,o="element";if(_Q(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!E0(t)){const e=t.getNextSibling();if(_Q(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function PQ(e,t){if(E0(t)){const n=t.getLastDescendant();E0(n)||_Q(n)?MQ(e,n):MQ(e,t)}else MQ(e,t)}function OQ(e,t,n,r){e.key=t,e.offset=n,e.type=r}class TQ{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!AQ(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new TQ(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(_Q(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=YG(e);null!==t&&n.push(t)}return i0()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function NQ(e){return e instanceof DQ}class DQ{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!NQ(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=E0(a)&&o.offset>0&&o.offset>=a.getChildrenSize(),c=o.offset,u=i.offset;if(E0(a)){const e=a.getDescendantByIndex(c);a=null!=e?e:a}if(E0(s)){let e=s.getDescendantByIndex(u);null!==e&&e!==a&&s.getChildAtIndex(u)===e&&(e=e.getPreviousSibling()),s=null!=e?e:s}let d;if(a.is(s))d=E0(a)&&a.getChildrenSize()>0?[]:[a];else if(d=a.getNodesBetween(s),l){const e=d.findIndex((e=>!e.is(a)&&!e.isBefore(a)));d.splice(0,e)}return i0()||(this._cachedNodes=d),d}setTextNodeRange(e,t,n,r){OQ(this.anchor,e.__key,t,"text"),OQ(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=IQ(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(E0(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,_Q(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):d===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!O0(d)&&!nQ(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=c0(),n=t.getEditorState()._selection,r=jQ(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;OQ(this.anchor,o.key,o.offset,o.type),OQ(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new DQ(EQ(e.key,e.offset,e.type),EQ(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=jG(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=sG[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(tQ()):"\t"===r?n.push(SQ()):n.push(bQ(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=bQ(),s=N0(o)?F0().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let d=c[0];_Q(d)||pG(26);const h=d.getTextContent().length,p=d.getParentOrThrow();let f=c[u-1];if(1===u&&"element"===a.type&&(l=h,a.set(i.key,l,"text")),this.isCollapsed()&&s===h&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(_Q(t)&&t.canInsertTextBefore()&&!RG(t)||(t=bQ(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(_Q(t)&&!RG(t)||(t=bQ(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&s!==h){const e=bQ(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=f.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||E0(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),FQ(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(d.isToken()){const t=bQ(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(s!==l||t===r&&n===o){if(kQ(d)){const t=bQ(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=bQ(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)d.insertBefore(t,!1);else{const[e]=d.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-s;d=d.spliceText(s,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...f.getParentKeys()]),n=E0(d)?d:d.getParentOrThrow();let r=E0(f)?f:f.getParentOrThrow(),o=f;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===f.getTextContent())||"element"===a.type&&f.getIndexWithinParent()<l)if(_Q(f)&&!f.isToken()&&l!==f.getTextContentSize()){if(f.isSegmented()){const e=bQ(f.getTextContent());f.replace(e),f=e}N0(a.getNode())||"text"!==a.type||(f=f.spliceText(0,l,"")),t.add(f.__key)}else{const e=f.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?f.remove():e.remove()}else t.add(f.__key);const i=r.getChildren(),p=new Set(c),m=n.is(r),g=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||E0(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(o)?m||g.insertAfter(t,!1):t.remove())}if(!m){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(d.isToken())if(s===h)d.select();else{const t=bQ(e);t.select(),d.replace(t)}else d=d.spliceText(s,h-s,e,!0),""===d.getTextContent()?d.remove():d.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){if(this.isCollapsed())return;const{anchor:e,focus:t}=this,n=this.getNodes(),r=this.isBackward()?t:e,o=this.isBackward()?e:t;let i=r.getNode(),a=o.getNode();const s=BK(i,jK),l=BK(a,jK);_Q(i)&&i.isToken()&&r.offset<i.getTextContentSize()&&(r.offset=0),o.offset>0&&_Q(a)&&a.isToken()&&(o.offset=a.getTextContentSize());for(const e of n)CK(i,e)||CK(a,e)||e.getKey()===i.getKey()||e.getKey()===a.getKey()||e.remove();const c=(e,t)=>{if(""===e.getTextContent())e.remove();else if(0!==t&&RG(e)){const t=bQ(e.getTextContent());return t.setFormat(e.getFormat()),t.setStyle(e.getStyle()),e.replace(t)}};if(i===a&&_Q(i)){const n=Math.abs(t.offset-e.offset);return i.spliceText(r.offset,n,"",!0),void c(i,n)}if(_Q(i)){const e=i.getTextContentSize()-r.offset;i.spliceText(r.offset,e,""),i=c(i,e)||i}_Q(a)&&(a.spliceText(0,o.offset,""),a=c(a,o.offset)||a),i.isAttached()&&_Q(i)?i.selectEnd():a.isAttached()&&_Q(a)&&a.selectStart(),E0(s)&&E0(l)&&s!==l&&(s.append(...l.getChildren()),l.remove(),o.set(r.key,r.offset,r.type))}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void WG(null);const n=this.getNodes(),r=[];for(const e of n)_Q(e)&&r.push(e);const o=t=>{n.forEach((n=>{if(E0(n)){const r=n.getFormatFlags(e,t);n.setTextFormat(r)}}))},i=r.length;if(0===i)return this.toggleFormat(e),WG(null),void o(t);const a=this.anchor,s=this.focus,l=this.isBackward(),c=l?s:a,u=l?a:s;let d=0,h=r[0],p="element"===c.type?0:c.offset;if("text"===c.type&&p===h.getTextContentSize()&&(d=1,h=r[1],p=0),null==h)return;const f=h.getFormatFlags(e,t);o(f);const m=i-1;let g=r[m];const v="text"===u.type?u.offset:g.getTextContentSize();if(h.is(g)){if(p===v)return;if(RG(h)||0===p&&v===h.getTextContentSize())h.setFormat(f);else{const e=h.splitText(p,v),t=0===p?e[0]:e[1];t.setFormat(f),"text"===c.type&&c.set(t.__key,0,"text"),"text"===u.type&&u.set(t.__key,v-p,"text")}return void(this.format=f)}0===p||RG(h)||([,h]=h.splitText(p),p=0),h.setFormat(f);const y=g.getFormatFlags(e,f);v>0&&(v===g.getTextContentSize()||RG(g)||([g]=g.splitText(v)),g.setFormat(y));for(let t=d+1;t<m;t++){const n=r[t],o=n.getFormatFlags(e,y);n.setFormat(o)}"text"===c.type&&c.set(h.__key,p,"text"),"text"===u.type&&u.set(g.__key,v,"text"),this.format=f|y}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=YQ();return NQ(t)||pG(134),t.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),n=BK(t,jK),r=e[e.length-1];if(E0(n)&&"__language"in n){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const t=KQ(this);n.splice(t,0,e),r.selectEnd()}return}if(!e.some((e=>(E0(e)||O0(e))&&!e.isInline()))){E0(n)||pG(211,t.constructor.name,t.getType());const o=KQ(this);return n.splice(o,0,e),void r.selectEnd()}const o=function(e){const t=F0();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=nQ(o);if(i||O0(o)&&o.isInline()||E0(o)&&o.isInline()||_Q(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),i=o.getLastDescendant(),a=o.getChildren(),s=E0(n)&&n.isEmpty()?null:this.insertParagraph(),l=a[a.length-1];let c=a[0];var u;E0(u=c)&&jK(u)&&!u.isEmpty()&&E0(n)&&(!n.isEmpty()||n.canMergeWhenEmpty())&&(E0(n)||pG(211,t.constructor.name,t.getType()),n.append(...c.getChildren()),c=a[1]),c&&(null===n&&pG(212,t.constructor.name,t.getType()),function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||pG(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(n,c));const d=BK(i,jK);s&&E0(d)&&(s.canMergeWhenEmpty()||jK(l))&&(d.append(...s.getChildren()),s.remove()),E0(n)&&n.isEmpty()&&n.remove(),i.selectEnd();const h=E0(n)?n.getLastChild():null;nQ(h)&&d!==n&&h.remove()}insertParagraph(){if("root"===this.anchor.key){const e=F0();return KG().splice(this.anchor.offset,0,[e]),e.select(),e}const e=KQ(this),t=BK(this.anchor.getNode(),jK);E0(t)||pG(213);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=tQ();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=IQ(this);if(0===t)return[];if(1===t){if(_Q(i)&&!this.isCollapsed()){const e=s>l?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(_Q(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(_Q(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=yK(r,t);if(O0(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=WQ();return e.add(a.__key),void QG(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(_Q(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return E0(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=c0(),l=AK(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!E0(a)||a.isInline()||a.canBeEmpty()||DK(c,s,u),function(e,t,n,r){e.modify(t,n,r)}(l,e,t?"backward":"forward",n),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=N0(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(PK(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e<n.length;e++){const t=n[e];CK(t,r)?o.push(t):i=!0}if(i&&o.length>0)if(t){const e=o[0];E0(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];E0(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;OQ(n,t.key,t.offset,t.type),OQ(t,r,o,i),e._cachedNodes=null}(this)}}}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&E0(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(E0(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=yK(r,e);if(O0(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&E0(n)&&0===n.getChildrenSize()){n.remove();const e=WQ();e.add(o.__key),QG(e)}else o.remove(),c0().dispatchCommand(WU,void 0);return}if(!e&&E0(o)&&E0(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void zQ(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void zQ(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(nK(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&N0(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),this.isCollapsed()&&0===this.anchor.offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function AQ(e){return e instanceof TQ}function LQ(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function IQ(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[LQ(n),LQ(r)]}function zQ(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function RQ(e,t,n,r){let o,i=t;if(IK(e)){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],d=!1;if(u===c)u=s[i+1],d=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=eK(u),_Q(o))i=tK(o,a);else{let s=eK(e);if(null===s)return null;if(E0(s)){const l=r.getElementByKey(s.getKey());null===l&&pG(214);const c=s.getDOMSlot(l);[s,i]=c.resolveChildIndex(s,l,e,t),E0(s)||pG(215),a&&i>=s.getChildrenSize()&&(i=Math.max(0,s.getChildrenSize()-1));let u=s.getChildAtIndex(i);if(E0(u)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){const e=a?u.getLastDescendant():u.getFirstDescendant();null===e?s=u:(u=e,s=E0(u)?u:u.getParentOrThrow()),i=0}_Q(u)?(o=u,s=null,i=tK(u,a)):u!==s&&a&&!d&&(E0(s)||pG(216),i=Math.min(s.getChildrenSize(),i+1))}else{const n=s.getIndexWithinParent();i=0===t&&O0(s)&&eK(e)===s?n:n+1,s=s.getParentOrThrow()}if(E0(s))return EQ(s.__key,i,"element")}}else o=eK(e);return _Q(o)?EQ(o.__key,i,"text"):null}function $Q(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&E0(i)&&i.isInline()){const t=i.getPreviousSibling();_Q(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else E0(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):_Q(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&E0(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&E0(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();_Q(t)&&(e.key=t.__key,e.offset=0)}}}function FQ(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);$Q(e,r,o),$Q(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=c0();if(i.isComposing()&&i._compositionKey!==e.key&&NQ(n)){const r=n.anchor,o=n.focus;OQ(e,r.key,r.offset,r.type),OQ(t,o.key,o.offset,o.type)}}}function jQ(e,t,n,r,o,i){if(null===e||null===n||!AG(o,e,n))return null;const a=RQ(e,t,NQ(i)?i.anchor:null,o);if(null===a)return null;const s=RQ(n,r,NQ(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=eK(e),r=eK(n);if(O0(t)&&O0(r))return null}return FQ(a,s,i),[a,s]}function BQ(e){return E0(e)&&!e.isInline()}function HQ(e,t,n,r,o,i){const a=l0(),s=new DQ(EQ(e,t,o),EQ(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function WQ(){return new TQ(new Set)}function VQ(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!mG&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,d,h;if(NQ(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,h=t.focusOffset,s&&NQ(e)&&!AG(n,c,u))return e.clone();const p=jQ(c,d,u,h,n,e);if(null===p)return null;const[f,m]=p;return new DQ(f,m,NQ(e)?e.format:0,NQ(e)?e.style:"")}function YQ(){return l0()._selection}function XQ(){return c0()._editorState._selection}function qQ(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),UQ(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,d=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}UQ(e)}function UQ(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!E0(i))return;const e=i.getChildrenSize(),o=n>=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(_Q(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(E0(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(_Q(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(E0(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(_Q(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function ZQ(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,_Q(r)?(a=r.getTextContentSize(),s="text"):E0(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,_Q(o)?s="text":E0(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function GQ(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function KQ(e){let t=e;e.isCollapsed()||t.removeText();const n=YQ();NQ(n)&&(t=n),NQ(t)||pG(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!jK(o);)[o,i]=JQ(o,i);return i}function JQ(e,t){const n=e.getParent();if(!n){const e=F0();return KG().append(e),e.select(),[KG(),0]}if(_Q(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!E0(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new DQ(EQ(e.__key,t,"element"),EQ(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let QQ=null,e0=null,t0=!1,n0=!1,r0=0;const o0={characterData:!0,childList:!0,subtree:!0};function i0(){return t0||null!==QQ&&QQ._readOnly}function a0(){t0&&pG(13)}function s0(){r0>99&&pG(14)}function l0(){return null===QQ&&pG(195,u0()),QQ}function c0(){return null===e0&&pG(196,u0()),e0}function u0(){let e=0;const t=new Set,n=W0.version;if("undefined"!=typeof window)for(const r of document.querySelectorAll("[contenteditable]")){const o=zG(r);if(LG(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function d0(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&pG(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e<a&&(i[e](t),t.isAttached());e++);}function h0(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function p0(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const e of r)n.add(e)}function f0(e){return m0(e,c0()._nodes)}function m0(e,t){const n=e.type,r=t.get(n);void 0===r&&pG(17,n);const o=r.klass;e.type!==o.getType()&&pG(18,o.name);const i=o.importJSON(e),a=e.children;if(E0(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=m0(a[e],t);i.append(n)}return i}function g0(e,t,n){const r=QQ,o=t0,i=e0;QQ=t,t0=!0,e0=e;try{return n()}finally{QQ=r,t0=o,e0=i}}function v0(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=QQ,u=t0,d=e0,h=e._updating,p=e._observer;let f=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){e0=e,QQ=n,t0=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),f=function(e,t,n,r,o,i){iJ="",cJ="",aJ="",uJ=2===r,hJ=null,GK=n,ZK=n._config,KK=n._nodes,JK=GK._listeners.mutation,QK=o,eJ=i,tJ=e._nodeMap,nJ=t._nodeMap,dJ=t._readOnly,rJ=new Map(n._keyToDOMMap);const a=new Map;return oJ=a,CJ("root",null),GK=void 0,KK=void 0,QK=void 0,eJ=void 0,tJ=void 0,nJ=void 0,ZK=void 0,rJ=void 0,oJ=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),n0)throw t;return B0(e,null,r,n),kG(e),e._dirtyType=2,n0=!0,v0(e,i),void(n0=!1)}finally{p.observe(r,o0),e._updating=h,QQ=c,t0=u,e0=d}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,g=e._dirtyElements,v=e._normalizedNodes,y=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=ZG(e)),delete r[i])}(e,n);const _=o?null:AK(e._window);if(e._editable&&null!==_&&(l||null===s||s.dirty)&&null!==r&&!y.has("skip-dom-selection")){e0=e,QQ=n;try{if(null!==p&&p.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&DK(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&DG(u))return;if(!NQ(t))return void(null!==e&&AG(n,a,s)&&r.removeAllRanges());const d=t.anchor,h=t.focus,p=d.key,f=h.key,m=wK(n,p),g=wK(n,f),v=d.offset,y=h.offset,b=t.format,_=t.style,x=t.isCollapsed();let w=m,S=g,k=!1;if("text"===d.type){w=FG(m);const e=d.getNode();k=e.getFormat()!==b||e.getStyle()!==_}else NQ(e)&&"text"===e.anchor.type&&(k=!0);var C,E,M,P,O;if("text"===h.type&&(S=FG(g)),null!==w&&null!==S&&(x&&(null===e||k||NQ(e)&&(e.format!==b||e.style!==_))&&(C=b,E=_,M=v,P=p,O=performance.now(),jJ=[C,E,M,P,O]),l!==v||c!==y||a!==w||s!==S||"Range"===r.type&&x||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===d.type))){try{r.setBaseAndExtent(w,v,S,y)}catch(e){}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=NQ(t)&&"element"===t.anchor.type?w.childNodes[v]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=kK(n),o=EK(r);if(null===r||null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=MK(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=SK(c)}}(n,t,i)}}zJ=!0}}(a,s,e,_,y,r)}(function(e,t,n){let r=e._blockCursorElement;if(NQ(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())NK(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(null!==t&&NK(t)){const n=t.getPreviousSibling();(null===n||NK(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=fG(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&DK(r,e,t)})(e,r,s),null!==p&&p.observe(r,o0)}finally{e0=d,QQ=c}}null!==f&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,f,y,m,i),NQ(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(WU,void 0);const x=e._pendingDecorators;null!==x&&(e._decorators=x,e._pendingDecorators=null,y0("decorator",e,!0,x)),function(e,t,n){const r=GG(t),o=GG(n);r!==o&&y0("textcontent",e,!0,o)}(e,t||i,n),y0("update",e,!0,{dirtyElements:g,dirtyLeaves:m,editorState:n,normalizedNodes:v,prevEditorState:t||i,tags:y}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;x0(e,t,r)}}}(e)}function y0(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function b0(e,t,n){if(!1===e._updating||e0!==e){let r=!1;return e.update((()=>{r=b0(e,t,n)})),r}const r=rK(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function _0(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i;if(void 0!==o){if(i=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&pG(191),t._flushSync=!0}i&&e._deferred.push(i),p0(e,o.tag)}n()}}return r}function x0(e,t,n){const r=e._updateTags;let o,i=!1,a=!1;void 0!==n&&(o=n.onUpdate,p0(e,n.tag),i=n.skipTransforms||!1,a=n.discrete||!1),o&&e._deferred.push(o);const s=e._editorState;let l=e._pendingEditorState,c=!1;(null===l||l._readOnly)&&(l=e._pendingEditorState=D0(l||s),c=!0),l._flushSync=a;const u=QQ,d=t0,h=e0,p=e._updating;QQ=l,t0=!1,e._updating=!0,e0=e;try{c&&(e._headless?null!==s._selection&&(l._selection=s._selection.clone()):l._selection=function(e){const t=e.getEditorState()._selection,n=AK(e._window);return NQ(t)||null==t?VQ(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),i=_0(e,i),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(NQ(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(l,e),0!==e._dirtyType&&(i?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);_Q(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&MG(t)}}(l,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=VG(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);_Q(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&MG(r),void 0!==r&&h0(r,i)&&d0(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){r0++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&h0(l,i)&&d0(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,r0++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),_0(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(E0(t)&&UK(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(s,l,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(l._flushSync=!0);const r=l._selection;if(NQ(r)){const e=l._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||pG(19)}else AQ(r)&&0===r._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void v0(e)}finally{QQ=u,t0=d,e0=h,e._updating=p,r0=0}const f=0!==e._dirtyType||e._deferred.length>0||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(l,e);f?l._flushSync?(l._flushSync=!1,v0(e)):c&&NG((()=>{v0(e)})):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function w0(e,t,n){e._updating?e._updates.push([t,n]):x0(e,t,n)}class S0{constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new S0(this.element,e,this.after)}withAfter(e){return new S0(this.element,this.before,e)}withElement(e){return new S0(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&pG(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&pG(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&pG(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(null===e)this.removeManagedLineBreak();else{const t="decorator"===e&&(jZ||FZ);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}const n=this.element,r=this.before,o=document.createElement("br");if(n.insertBefore(o,r),e){const e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",n.insertBefore(e,o),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){const t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}const o=k0(t,n);o.push(r);const i=k0(t,this.element);let a=e.getIndexWithinParent();for(let e=0;e<i.length;e++){const t=o[e],n=i[e];if(void 0===t||t<n)break;if(t>n){a+=1;break}}return[e.getParentOrThrow(),a]}}function k0(e,t){const n=[];let r=t;for(;r!==e&&null!==r;r=t.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=r.previousSibling)e++;n.push(e)}return r!==e&&pG(225),n.reverse()}class C0 extends JJ{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return uG[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=c0()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(_Q(t)&&e.push(t),E0(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;E0(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;E0(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return E0(e)&&e.getLastDescendant()||e||null}const r=t[e];return E0(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:YG(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&pG(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:YG(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&pG(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),E0(o)&&r!==n-1&&!o.isInline()&&(e+=tG)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),E0(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){const t=cG[e];return!!(this.getFormat()&t)}return!1}hasTextFormat(e){const t=sG[e];return!!(this.getTextFormat()&t)}getFormatFlags(e,t){return jG(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){a0();const n=YQ();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(_Q(e)||E0(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(_Q(e)||E0(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return NQ(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):HQ(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?cG[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable();e+t<=o||pG(226,String(e),String(t),String(o));const a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,d=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n<t;n++){null===e&&pG(100);const t=e.getNextSibling(),n=e.__key;BG(e.getWritable()),l.push(n),e=t}}let h=u;for(let e=0;e<r;e++){const t=n[e];null!==h&&t.is(h)&&(u=h=h.getPreviousSibling());const r=t.getWritable();r.__parent===a&&d--,BG(r);const o=t.__key;if(null===h)i.__first=o,r.__prev=null;else{const e=h.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&pG(76),r.__parent=a,s.push(o),h=t}if(e+t===o)null!==h&&(h.getWritable().__next=null,i.__last=h.__key);else if(null!==c){const e=c.getWritable();if(null!==h){const t=h.getWritable();e.__prev=h.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=d,l.length){const e=YQ();if(NQ(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;M0(r,t,n)&&ZQ(r,r.getNode(),this,u,c),M0(o,t,n)&&ZQ(o,o.getNode(),this,u,c),0!==d||this.canBeEmpty()||PK(this)||this.remove()}}return i}getDOMSlot(e){return new S0(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(IK(t)){const e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px")}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0!==t&&(e.textFormat=t),""!==n&&(e.textStyle=n),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const n=this.getDOMSlot(e);let r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){const o=t.getElementByKey(e.getKey());null!==o&&(null==r?(n.insertChild(o),r=o):r!==o&&n.replaceChild(o,r),r=r.nextSibling)}}}function E0(e){return e instanceof C0}function M0(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class P0 extends JJ{decorate(e,t){pG(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function O0(e){return e instanceof P0}class T0 extends C0{static getType(){return"root"}static clone(){return new T0}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){pG(51)}getTextContent(){const e=this.__cachedText;return!i0()&&0!==c0()._dirtyType||null===e?super.getTextContent():e}remove(){pG(52)}replace(e){pG(53)}insertBefore(e){pG(54)}insertAfter(e){pG(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];E0(n)||O0(n)||pG(56)}return super.append(...e)}static importJSON(e){return KG().updateFromJSON(e)}collapseAtStart(){return!0}}function N0(e){return e instanceof T0}function D0(e){return new I0(new Map(e._nodeMap))}function A0(){return new I0(new Map([["root",new T0]]))}function L0(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&pG(130,n.name),E0(e)){const r=t.children;Array.isArray(r)||pG(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=L0(o[e]);r.push(t)}}return t}class I0{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return g0(t&&t.editor||null,this,e)}clone(e){const t=new I0(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return g0(null,this,(()=>({root:L0(KG())})))}}class z0 extends C0{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class R0 extends C0{static getType(){return"paragraph"}static clone(e){return new R0(e.__key)}createDOM(e){const t=document.createElement("p"),n=mK(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:$0,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(IK(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return F0().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){const n=F0();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||_Q(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function $0(e){const t=F0();return e.style&&(t.setFormat(e.style.textAlign),XK(e,t)),{node:t}}function F0(){return OK(new R0)}function j0(e){return e instanceof R0}function B0(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=A0(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}function H0(e){const t=e||{},n=e0,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=A0(),s=t.namespace||(null!==o?o._config.namespace:oK()),l=t.editorState,c=[T0,uQ,QJ,wQ,R0,z0,...t.nodes||[]],{onError:u,html:d}=t,h=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),p.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const f=new W0(a,o,p,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)})),t&&o(t),n}(p,d?d.import:void 0),h);return void 0!==l&&(f._pendingEditorState=l,f._dirtyType=2),f}class W0{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=oK(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&pG(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&pG(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0!==i&&i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&pG(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=VK(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}return function(e,t){const n=VK(e.getEditorState()),r=[];for(const e of t){const t=n.get(e);t&&r.push(t)}0!==r.length&&e.update((()=>{for(const e of r)for(const t of e.keys()){const e=YG(t);e&&e.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,r.map((e=>e.klass.getType()))),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return _K(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=mK(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,B0(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=IJ.get(t);void 0===n&&pG(162);const r=n-1;r>=0||pG(164),IJ.set(t,r),0===r&&t.removeEventListener("selectionchange",UJ);const o=zG(e);LG(o)?(function(e){if(null!==e._parentEditor){const t=rK(e),n=t[t.length-1]._key;qJ.get(n)===e&&qJ.delete(n)}else qJ.delete(e._key)}(o),e.__lexicalEditor=null):o&&pG(198);const i=XJ(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=EK(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,kG(this),this._updateTags.add("history-merge"),v0(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=IJ.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",UJ),IJ.set(n,(r||0)+1),e.__lexicalEditor=t;const o=XJ(e);for(let n=0;n<TJ.length;n++){const[r,i]=TJ[n],a="function"==typeof i?e=>{GJ(e)||(ZJ(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(GJ(e))return;ZJ(e);const n=t.isEditable();switch(r){case"cut":return n&&_K(t,CZ,e);case"copy":return _K(t,kZ,e);case"paste":return n&&_K(t,GU,e);case"dragstart":return n&&_K(t,xZ,e);case"dragover":return n&&_K(t,wZ,e);case"dragend":return n&&_K(t,SZ,e);case"focus":return n&&_K(t,NZ,e);case"blur":return n&&_K(t,DZ,e);case"drop":return n&&_K(t,bZ,e)}};e.addEventListener(r,a),o.push((()=>{e.removeEventListener(r,a)}))}}(e,this),null!=n&&e.classList.add(...n)}else this._window=null,this._updateTags.add("history-merge"),v0(this);y0("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&pG(38);let n=e;n._readOnly&&(n=D0(e),n._selection=e._selection?e._selection.clone():null),SG(this);const r=this._pendingEditorState,o=this._updateTags,i=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=i&&o.add(i),v0(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=i&&o.add(i),this._updating||v0(this)}parseEditorState(e,t){return function(e,t,n){const r=A0(),o=QQ,i=t0,a=e0,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,QQ=r,t0=!1,e0=t;try{const o=t._nodes;m0(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,QQ=o,t0=i,e0=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return v0(this),this.getEditorState().read(e,{editor:this})}update(e,t){w0(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),w0(this,(()=>{const e=YQ(),n=KG();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=AK(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,y0("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}W0.version="0.23.1+prod.esm";class V0 extends uQ{constructor(e,t){super(e,t)}static getType(){return"extended-text"}static clone(e){return new V0(e.__text,e.__key)}static importDOM(){const e=uQ.importDOM();return{...e,code:()=>({conversion:Y0(e?.code),priority:1}),em:()=>({conversion:Y0(e?.em),priority:1}),span:()=>({conversion:Y0(e?.span),priority:1}),strong:()=>({conversion:Y0(e?.strong),priority:1}),sub:()=>({conversion:Y0(e?.sub),priority:1}),sup:()=>({conversion:Y0(e?.sup),priority:1})}}static importJSON(e){return uQ.importJSON(e)}isSimpleText(){return("text"===this.__type||"extended-text"===this.__type)&&0===this.__mode}exportJSON(){return{...super.exportJSON(),type:"extended-text",version:1}}}function Y0(e){return t=>{const n=e?.(t);if(!n)return null;const r=n.conversion(t);if(!r)return r;const o=t.style.backgroundColor,i=t.style.color,a=t.style.fontFamily,s=t.style.fontWeight,l=t.style.fontSize,c=t.style.textDecoration;return{...r,forChild:(e,t)=>{const n=r?.forChild??(e=>e),u=n(e,t);if(_Q(u)){const e=[o?`background-color: ${o}`:null,i?`color: ${i}`:null,a?`font-family: ${a}`:null,s?`font-weight: ${s}`:null,l?`font-size: ${l}`:null,c?`text-decoration: ${c}`:null].filter((e=>null!=e)).join("; ");if(e.length)return u.setStyle(e)}return u}}}}var X0=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const q0=new Map;function U0(e){const t={};if(!e)return t;const n=e.split(";");for(const e of n)if(""!==e){const[n,r]=e.split(/:([^]+)/);n&&r&&(t[n.trim()]=r.trim())}return t}function Z0(e){let t=q0.get(e);return void 0===t&&(t=U0(e),q0.set(e,t)),t}function G0(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=IQ(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,d=0;return o?(d=n>r?r:n,u=n>r?n:r):l?(d=i?r:n,u=void 0):c&&(d=0,u=i?n:r),t.__text=t.__text.slice(d,u),t}}return t}function K0(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return E0(t)||X0(177),e.offset===t.getChildrenSize()}function J0(e){const t=e.getStyle(),n=U0(t);q0.set(t,n)}function Q0(e,t){const n=Z0("getStyle"in e?e.getStyle():e.style),r=Object.entries(t).reduce(((t,[r,o])=>("function"==typeof o?t[r]=o(n[r],e):null===o?delete t[r]:t[r]=o,t)),{...n}||{}),o=function(e){let t="";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}(r);e.setStyle(o),q0.set(o,r)}function e1(e,t){e.isCollapsed()&&NQ(e)?Q0(e,t):function(e){const t=YQ();if(!NQ(t))return;const n=t.getNodes(),r=n.length,{anchor:o,focus:i}=t,a=r-1;let s=n[0],l=n[a];const c=s.getTextContent().length,u=i.offset;let d=o.offset;const h=o.isBefore(i);let p=h?d:u,f=h?u:d;const m=h?o.type:i.type,g=h?i.type:o.type,v=h?i.key:o.key;if(_Q(s)&&p===c){const e=s.getNextSibling();_Q(e)&&(d=0,p=0,s=e)}if(1===n.length){if(_Q(s)&&s.canHaveFormat()){if(p="element"===m?0:d>u?u:d,f="element"===g?c:d>u?d:u,p===f)return;if(RG(s)||0===p&&f===c)e(s),s.select(p,f);else{const t=s.splitText(p,f),n=0===p?t[0]:t[1];e(n),n.select(0,f-p)}}}else{if(_Q(s)&&p<s.getTextContentSize()&&s.canHaveFormat()&&(0===p||RG(s)||(s=s.splitText(p)[1],p=0,h?o.set(s.getKey(),p,"text"):i.set(s.getKey(),p,"text")),e(s)),_Q(l)&&l.canHaveFormat()){const t=l.getTextContent().length;l.__key!==v&&0!==f&&(f=t),f===t||RG(l)||([l]=l.splitText(f)),0===f&&"element"!==g||e(l)}for(let t=1;t<a;t++){const r=n[t],o=r.getKey();_Q(r)&&r.canHaveFormat()&&o!==s.getKey()&&o!==l.getKey()&&!r.isToken()&&e(r)}}}((e=>{Q0(e,t)}))}function t1(e,t){if(null===e)return;const n=e.getStartEndPoints(),r=n?n[0]:null;if(null!==r&&"root"===r.key){const e=t(),n=KG(),r=n.getFirstChild();return void(r?r.replace(e,!0):n.append(e))}const o=e.getNodes(),i=null!==r&&function(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}(r.getNode(),a1);i&&-1===o.indexOf(i)&&o.push(i);for(let e=0;e<o.length;e++){const n=o[e];if(!a1(n))continue;E0(n)||X0(178);const r=t();r.setFormat(n.getFormatType()),r.setIndent(n.getIndent()),n.replace(r,!0)}}function n1(e,t){const n=yK(e.focus,t);return O0(n)&&!n.isIsolated()||E0(n)&&!n.isInline()&&!n.canBeEmpty()}function r1(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(N0(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n,r){e.modify(t?"extend":"move",n,r)}(e,t,n?!r:r,"character")}function o1(e,t,n){const r=Z0(e.getStyle());return null!==r&&r[t]||n}function i1(e,t,n=""){let r=null;const o=e.getNodes(),i=e.anchor,a=e.focus,s=e.isBackward(),l=s?a.offset:i.offset,c=s?a.getNode():i.getNode();if(NQ(e)&&e.isCollapsed()&&""!==e.style){const n=Z0(e.style);if(null!==n&&t in n)return n[t]}for(let e=0;e<o.length;e++){const i=o[e];if((0===e||0!==l||!i.is(c))&&_Q(i)){const e=o1(i,t,n);if(null===r)r=e;else if(r!==e){r="";break}}}return null===r?n:r}function a1(e){if(O0(e))return!1;if(!E0(e)||PK(e))return!1;const t=e.getFirstChild(),n=null===t||nQ(t)||_Q(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}var s1=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const l1="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,c1=l1&&"documentMode"in document?document.documentMode:null;l1&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);const u1=l1&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);l1&&"InputEvent"in window&&!c1&&new window.InputEvent("input"),l1&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),l1&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,l1&&/Android/.test(navigator.userAgent);l1&&/^(?=.*Chrome).*/i.test(navigator.userAgent);function d1(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}function h1(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}l1&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);function p1(e,...t){const n=d1(...t);n.length>0&&e.classList.add(...n)}function f1(e,...t){const n=d1(...t);n.length>0&&e.classList.remove(...n)}const m1=(e,t)=>{let n=e;for(;n!==KG()&&null!=n;){if(t(n))return n;n=n.getParent()}return null};function g1(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}let v1=!(u1||!l1)&&void 0;var y1,b1={exports:{}};y1||(y1=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(s)||(a[s]=i[s])}var c=r[e];return r[e]=a,o.languages.DFS(o.languages,(function(t,n){n===c&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=o.util.type(l);"Object"!==c||i[a(l)]?"Array"!==c||i[a(l)]||(i[a(l)]=!0,e(l,n,s,i)):(i[a(l)]=!0,e(l,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var l={element:t,language:i,grammar:a,code:t.textContent};function c(e){l.highlightedCode=e,o.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o.hooks.run("after-highlight",l),o.hooks.run("complete",l),r&&r.call(l.element)}if(o.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return o.hooks.run("complete",l),void(r&&r.call(l.element));if(o.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(o.highlight(l.code,l.grammar,l.language));else c(o.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new l;return c(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,l,d){for(var h in n)if(n.hasOwnProperty(h)&&n[h]){var p=n[h];p=Array.isArray(p)?p:[p];for(var f=0;f<p.length;++f){if(d&&d.cause==h+","+f)return;var m=p[f],g=m.inside,v=!!m.lookbehind,y=!!m.greedy,b=m.alias;if(y&&!m.pattern.global){var _=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,_+"g")}for(var x=m.pattern||m,w=r.next,S=l;w!==t.tail&&!(d&&S>=d.reach);S+=w.value.length,w=w.next){var k=w.value;if(t.length>e.length)return;if(!(k instanceof i)){var C,E=1;if(y){if(!(C=a(x,S,e,v))||C.index>=e.length)break;var M=C.index,P=C.index+C[0].length,O=S;for(O+=w.value.length;M>=O;)O+=(w=w.next).value.length;if(S=O-=w.value.length,w.value instanceof i)continue;for(var T=w;T!==t.tail&&(O<P||"string"==typeof T.value);T=T.next)E++,O+=T.value.length;E--,k=e.slice(S,O),C.index-=S}else if(!(C=a(x,0,k,v)))continue;M=C.index;var N=C[0],D=k.slice(0,M),A=k.slice(M+N.length),L=S+k.length;d&&L>d.reach&&(d.reach=L);var I=w.prev;if(D&&(I=c(t,I,D),S+=D.length),u(t,I,E),w=c(t,I,new i(h,g?o.tokenize(N,g):N,b,N)),A&&c(t,w,A),E>1){var z={cause:h+","+f,reach:L};s(e,t,n,w.prev,S,z),d&&z.reach>d.reach&&(d.reach=z.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var l in i.attributes)s+=" "+l+'="'+(i.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()}),!1),o):o;var d=o.util.currentScript();function h(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
91
+ */(0,o))return NaN;return n*(r*cH+o*lH)}(o.timezone),isNaN(s)?n():hH(a+l+s,t?.in)}const yV={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bV=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,_V=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,xV=/^([+-])(\d{2})(?::?(\d{2}))?$/;function wV(e){return e?parseInt(e):1}function SV(e){return e&&parseFloat(e.replace(",","."))||0}const kV=[31,null,31,30,31,30,31,31,30,31,30,31];function CV(e){return e%400==0||e%4==0&&e%100!=0}const EV={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};var MV;wd._date.override({_id:"date-fns",formats:function(){return EV},parse:function(e,t){if(null==e)return null;const n=typeof e;return"number"===n||e instanceof Date?e=hH(e):"string"===n&&(e="string"==typeof t?gV(e,t,new Date,this.options):vV(e,this.options)),EH(e)?e.getTime():null},format:function(e,t){return function(e,t,n){const r=vH(),o=n?.locale??r.locale??YH,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=hH(e,n?.in);if(!EH(s))throw new RangeError("Invalid time value");let l=t.match(vW).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,cW[t])(e,o.formatLong):e})).join("").match(gW).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:xW(e)};if(rW[t])return{isToken:!0,value:e};if(t.match(_W))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&fW(i)||!n?.useAdditionalDayOfYearTokens&&pW(i))&&mW(i,t,String(e)),(0,rW[i[0]])(s,i,o.localize,c)})).join("")}(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return mH(e,t);case"second":return function(e,t,n){return mH(e,1e3*t,n)}(e,t);case"minute":return function(e,t,n){const r=hH(e,n?.in);return r.setTime(r.getTime()+t*lH),r}(e,t);case"hour":return function(e,t,n){return mH(e,t*cH,n)}(e,t);case"day":return pH(e,t);case"week":return function(e,t,n){return pH(e,7*t,n)}(e,t);case"month":return fH(e,t);case"quarter":return function(e,t,n){return fH(e,3*t,n)}(e,t);case"year":return function(e,t,n){return fH(e,12*t,n)}(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return TH(e,t);case"second":return function(e,t,n){const r=TH(e,t)/1e3;return OH(n?.roundingMethod)(r)}(e,t);case"minute":return function(e,t,n){const r=TH(e,t)/lH;return OH(n?.roundingMethod)(r)}(e,t);case"hour":return function(e,t,n){const[r,o]=wH(n?.in,e,t),i=(+r-+o)/cH;return OH(n?.roundingMethod)(i)}(e,t);case"day":return MH(e,t);case"week":return function(e,t,n){const r=MH(e,t,n)/7;return OH(n?.roundingMethod)(r)}(e,t);case"month":return AH(e,t);case"quarter":return function(e,t,n){const r=AH(e,t,n)/3;return OH(n?.roundingMethod)(r)}(e,t);case"year":return LH(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return function(e,t){const n=hH(e,t?.in);return n.setMilliseconds(0),n}(e);case"minute":return function(e,t){const n=hH(e,t?.in);return n.setSeconds(0,0),n}(e);case"hour":return function(e,t){const n=hH(e,t?.in);return n.setMinutes(0,0,0),n}(e);case"day":return SH(e);case"week":return yH(e);case"isoWeek":return yH(e,{weekStartsOn:+n});case"month":return function(e,t){const n=hH(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e);case"quarter":return function(e,t){const n=hH(e,t?.in),r=n.getMonth(),o=r-r%3;return n.setMonth(o,1),n.setHours(0,0,0,0),n}(e);case"year":return IH(e);default:return e}},endOf:function(e,t){switch(t){case"second":return function(e,t){const n=hH(e,t?.in);return n.setMilliseconds(999),n}(e);case"minute":return function(e,t){const n=hH(e,t?.in);return n.setSeconds(59,999),n}(e);case"hour":return function(e,t){const n=hH(e,t?.in);return n.setMinutes(59,59,999),n}(e);case"day":return NH(e);case"week":return function(e,t){const n=vH(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=hH(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}(e);case"month":return DH(e);case"quarter":return function(e,t){const n=hH(e,t?.in),r=n.getMonth(),o=r-r%3+3;return n.setMonth(o,0),n.setHours(23,59,59,999),n}(e);case"year":return function(e,t){const n=hH(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e);default:return e}}}),function(e){!function(e){e.isTypeLocation=e=>"object"==typeof e&&null!==e&&"string"==typeof e.type&&Array.isArray(e.coordinates)&&2===e.coordinates.length&&e.coordinates.every((e=>"number"==typeof e))}(e.api||(e.api={})),function(e){e.timeUnitsInSeconds={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3},e.unitMapper=e=>e<=10?"second":e<=120?"minute":e<=2160?"hour":e<=43200?"day":e<=50400?"week":e<=1296e3?"month":e<=9331200?"quarter":"year",e.getDiffInMinutes=(e,t)=>Math.abs(t.getTime()-e.getTime())/6e4,e.formatDateToEnUs=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(e)}(e.time||(e.time={})),function(e){e.hexToHSL=e=>{let t=0,n=0,r=0;if(4===e.length)t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16);else{if(7!==e.length)throw new Error("Invalid HEX format");t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)}t/=255,n/=255,r/=255;const o=Math.max(t,n,r),i=Math.min(t,n,r);let a=0,s=0,l=(o+i)/2;if(o!==i){const e=o-i;switch(s=l>.5?e/(2-o-i):e/(o+i),o){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return{h:a,s:s,l:l}},e.hslToHex=(e,t,n)=>{const r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e);let o,i,a;if(0===t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=r(l,s,e+1/3),i=r(l,s,e),a=r(l,s,e-1/3)}return`#${Math.round(255*o).toString(16).padStart(2,"0")}${Math.round(255*i).toString(16).padStart(2,"0")}${Math.round(255*a).toString(16).padStart(2,"0")}`},e.hexToRgb=e=>{let t=0,n=0,r=0;return 7===e.length&&(t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),`${t}, ${n}, ${r}`}}(e.color||(e.color={}))}(MV||(MV={}));var PV="DraggableBar-module_bar__TpW1R";const OV=({x:t,y:n,maxX:r,minX:o,maxY:i,minY:a,height:l,style:c,onChange:u,onDown:d,onUp:h})=>{const p=s(null),f=s(!1),m=s(0),g=s(0),v=e=>{if(!f.current)return;const t=e.clientX-m.current,i=g.current+t;(!o||i>=o)&&(!r||i<=r)&&u?.({x:i,y:n})},y=()=>{f.current=!1,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y),h?.()};return e("div",{ref:p,onMouseDown:e=>{f.current=!0,m.current=e.clientX,g.current=t,document.addEventListener("mousemove",v),document.addEventListener("mouseup",y),d?.()},className:PV,style:{...c,left:`${t}px`,bottom:`${n}px`,height:`${l}px`}})};Uh.register(yf,wf,gp,Yf,Gp,ff,Up,sj,oH);var TV=a((({dateRange:n,annotationRange:r,data:o,showArrows:i=!0,onPan:a,onClickBar:c,onChangeDateRange:d,...h})=>{const p=s(null),[f,m]=u(null),[g,v]=u(null),y=()=>{const e=MV.time.getDiffInMinutes(n.from,n.to);return MV.time.unitMapper(e)},b=e=>{const t=p?.current?.scales.x.ticks;if(!t)return;const n=.1*t.length,r=y(),o=n*MV.time.timeUnitsInSeconds[r];a?.(e,o)},_={responsive:!0,onClick:e=>{const t=p.current;if(!t)return;const n=t.getElementsAtEventForMode(e,"nearest",{intersect:!0},!1);if(!n.length)return;const r=n[0],o=t.data?.labels?.[r.index];o&&c?.(new Date(o))},scales:{x:{type:"time",time:{unit:y(),displayFormats:{[y()]:"p"}},title:{display:!1},grid:{display:!1},border:{width:3,color:"#d5e3fa"}},y:{title:{display:!1},grid:{display:!1},border:{width:0},ticks:{padding:10},offset:!0,beginAtZero:!0}},plugins:{legend:{display:!1},annotation:{annotations:r?{selectedBox:{type:"box",drawTime:"beforeDraw",xMin:r?.from.toISOString(),xMax:r?.to.toISOString(),backgroundColor:"#eaf0fd",borderWidth:0}}:{}}}};l((()=>{p.current?.scales.y.right&&(m({x:p.current?.scales.y.right,y:30}),v({x:p.current?.width,y:30}))}),[]);const x=(e,t)=>{const r=p?.current?.scales?.x,o=r?.getValueForPixel(e?.x||0);o&&d?.({...n,[t]:new Date(o)})};return e(H,{dimensionX:"fill",alignment:"top",gap:0,prefix:{children:i&&e(xs,{variant:"filled",color:"transparent",className:V$,onClick:()=>b("left"),children:e(Ga,{name:"chevronLeft",size:32})})},root:{dimensionX:"fill",dimensionY:"fill",children:t(B,{className:Y$,dimensionX:"fill",dimensionY:"fill",children:[e(V,{className:`${X$} ${q$}`,children:MV.time.formatDateToEnUs(n.from)}),f&&e(OV,{x:f.x,y:f.y,minX:p.current?.scales.y.right,maxX:g?.x,height:p.current?.scales.y.height,onChange:m,onUp:()=>x(f,"from")}),e(rF,{ref:p,options:_,data:o}),g&&e(OV,{x:g.x,y:g.y,minX:f?.x,maxX:p.current?.width,height:p.current?.scales.y.height,onChange:v,onUp:()=>x(g,"to")}),e(V,{className:`${X$} ${U$}`,children:MV.time.formatDateToEnUs(n.to)})]})},suffix:{children:i&&e(xs,{variant:"filled",color:"transparent",className:V$,onClick:()=>b("right"),children:e(Ga,{name:"chevronRight",size:32})})},...h})})),NV={exports:{}},DV={};function AV(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function LV(e){return function(t,n,r,o){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r,o);var i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var s=e(t,n,r,o);return o.delete(t),o.delete(n),s}}function IV(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function zV(e){return e.constructor===Object||null==e.constructor}function RV(e){return"function"==typeof e.then}function $V(e,t){return e===t||e!=e&&t!=t}var FV=Object.prototype.toString;function jV(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.areRegExpsEqual,a=e.areSetsEqual,s=(0,e.createIsNestedEqual)(l);function l(e,l,c){if(e===l)return!0;if(!e||!l||"object"!=typeof e||"object"!=typeof l)return e!=e&&l!=l;if(zV(e)&&zV(l))return o(e,l,s,c);var u=Array.isArray(e),d=Array.isArray(l);if(u||d)return u===d&&t(e,l,s,c);var h=FV.call(e);return h===FV.call(l)&&("[object Date]"===h?n(e,l,s,c):"[object RegExp]"===h?i(e,l,s,c):"[object Map]"===h?r(e,l,s,c):"[object Set]"===h?a(e,l,s,c):"[object Object]"===h||"[object Arguments]"===h?!RV(e)&&!RV(l)&&o(e,l,s,c):("[object Boolean]"===h||"[object Number]"===h||"[object String]"===h)&&$V(e.valueOf(),l.valueOf()))}return l}function BV(e,t,n,r){var o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n(e[o],t[o],o,o,e,t,r))return!1;return!0}var HV=LV(BV);function WV(e,t){return $V(e.valueOf(),t.valueOf())}function VV(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={},a=0;return e.forEach((function(s,l){if(o){var c=!1,u=0;t.forEach((function(o,d){c||i[u]||!(c=n(l,d,a,u,e,t,r)&&n(s,o,l,d,e,t,r))||(i[u]=!0),u++})),a++,o=c}})),o}var YV=LV(VV),XV=Object.prototype.hasOwnProperty;function qV(e,t,n,r){var o,i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(;a-- >0;){if("_owner"===(o=i[a])){var s=!!e.$$typeof,l=!!t.$$typeof;if((s||l)&&s!==l)return!1}if(!XV.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var UV=LV(qV);function ZV(e,t){return e.source===t.source&&e.flags===t.flags}function GV(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={};return e.forEach((function(a,s){if(o){var l=!1,c=0;t.forEach((function(o,u){l||i[c]||!(l=n(a,o,s,u,e,t,r))||(i[c]=!0),c++})),o=l}})),o}var KV=LV(GV),JV=Object.freeze({areArraysEqual:BV,areDatesEqual:WV,areMapsEqual:VV,areObjectsEqual:qV,areRegExpsEqual:ZV,areSetsEqual:GV,createIsNestedEqual:AV}),QV=Object.freeze({areArraysEqual:HV,areDatesEqual:WV,areMapsEqual:YV,areObjectsEqual:UV,areRegExpsEqual:ZV,areSetsEqual:KV,createIsNestedEqual:AV}),eY=jV(JV);var tY=jV(IV(JV,{createIsNestedEqual:function(){return $V}}));var nY=jV(QV);var rY=jV(IV(QV,{createIsNestedEqual:function(){return $V}}));var oY,iY=Object.freeze({__proto__:null,circularDeepEqual:function(e,t){return nY(e,t,new WeakMap)},circularShallowEqual:function(e,t){return rY(e,t,new WeakMap)},createCustomCircularEqual:function(e){var t=jV(IV(QV,e(QV)));return function(e,n,r){return void 0===r&&(r=new WeakMap),t(e,n,r)}},createCustomEqual:function(e){return jV(IV(JV,e(JV)))},deepEqual:function(e,t){return eY(e,t,void 0)},sameValueZeroEqual:$V,shallowEqual:function(e,t){return tY(e,t,void 0)}}),aY=_e(iY),sY={exports:{}};function lY(){if(oY)return sY.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return oY=1,sY.exports=t,sY.exports.clsx=t,sY.exports}var cY,uY,dY,hY={};function pY(){if(dY)return hY;dY=1,Object.defineProperty(hY,"__esModule",{value:!0}),hY.bottom=i,hY.childrenEqual=function(e,r){return(0,t.deepEqual)(n.default.Children.map(e,(e=>e?.key)),n.default.Children.map(r,(e=>e?.key)))&&(0,t.deepEqual)(n.default.Children.map(e,(e=>e?.props["data-grid"])),n.default.Children.map(r,(e=>e?.props["data-grid"])))},hY.cloneLayout=a,hY.cloneLayoutItem=l,hY.collides=c,hY.compact=u,hY.compactItem=p,hY.compactType=function(e){const{verticalCompact:t,compactType:n}=e||{};return!1===t?null:n},hY.correctBounds=f,hY.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},hY.fastRGLPropsEqual=void 0,hY.getAllCollisions=v,hY.getFirstCollision=g,hY.getLayoutItem=m,hY.getStatics=y,hY.modifyLayout=s,hY.moveElement=b,hY.moveElementAwayFromCollision=_,hY.noop=void 0,hY.perc=function(e){return 100*e+"%"},hY.resizeItemInDirection=function(e,t,n,r){const o=O[e];return o?o(t,{...t,...n},r):n},hY.setTopLeft=function(e){let{top:t,left:n,width:r,height:o}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${o}px`,position:"absolute"}},hY.setTransform=function(e){let{top:t,left:n,width:r,height:o}=e;const i=`translate(${n}px,${t}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${r}px`,height:`${o}px`,position:"absolute"}},hY.sortLayoutItems=T,hY.sortLayoutItemsByColRow=D,hY.sortLayoutItemsByRowCol=N,hY.synchronizeLayoutWithChildren=function(e,t,o,a,s){e=e||[];const c=[];n.default.Children.forEach(t,(t=>{if(null==t?.key)return;const n=m(e,String(t.key)),o=t.props["data-grid"];n&&null==o?c.push(l(n)):o?(r||A([o],"ReactGridLayout.children"),c.push(l({...o,i:t.key}))):c.push(l({w:1,h:1,x:0,y:i(c),i:String(t.key)}))}));const d=f(c,{cols:o});return s?d:u(d,a,o)},hY.validateLayout=A,hY.withLayoutItem=function(e,t,n){let r=m(e,t);return r?(r=n(l(r)),[e=s(e,r),r]):[e,null]};var e,t=aY,n=(e=o)&&e.__esModule?e:{default:e};const r="production"===process.env.NODE_ENV;function i(e){let t,n=0;for(let r=0,o=e.length;r<o;r++)t=e[r].y+e[r].h,t>n&&(n=t);return n}function a(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=l(e[n]);return t}function s(e,t){const n=Array(e.length);for(let r=0,o=e.length;r<o;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function l(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function c(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function u(e,t,n,r){const o=y(e),i=T(e,t),a=Array(e.length);for(let s=0,c=i.length;s<c;s++){let c=l(i[s]);c.static||(c=p(o,c,t,n,i,r),o.push(c)),a[e.indexOf(i[s])]=c,c.moved=!1}return a}hY.fastRGLPropsEqual=(uY||(uY=1,cY=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}),cY);const d={x:"w",y:"h"};function h(e,t,n,r){const o=d[r];t[r]+=1;for(let i=e.map((e=>e.i)).indexOf(t.i)+1;i<e.length;i++){const a=e[i];if(!a.static){if(a.y>t.y+t.h)break;c(t,a)&&h(e,a,n+t[o],r)}}t[r]=n}function p(e,t,n,r,o,a){const s="horizontal"===n;if("vertical"===n)for(t.y=Math.min(i(e),t.y);t.y>0&&!g(e,t);)t.y--;else if(s)for(;t.x>0&&!g(e,t);)t.x--;let l;for(;(l=g(e,t))&&(null!==n||!a);)if(s?h(o,t,l.x+l.w,"x"):h(o,t,l.y+l.h,"y"),s&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!g(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function f(e,t){const n=y(e);for(let r=0,o=e.length;r<o;r++){const o=e[r];if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),o.static)for(;g(n,o);)o.y++;else n.push(o)}return e}function m(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function g(e,t){for(let n=0,r=e.length;n<r;n++)if(c(e[n],t))return e[n]}function v(e,t){return e.filter((e=>c(e,t)))}function y(e){return e.filter((e=>e.static))}function b(e,t,n,r,o,i,s,l,c){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;t.i,String(n),String(r),t.x,t.y;const u=t.x,d=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;let h=T(e,s);("vertical"===s&&"number"==typeof r?d>=r:"horizontal"===s&&"number"==typeof n&&u>=n)&&(h=h.reverse());const p=v(h,t),f=p.length>0;if(f&&c)return a(e);if(f&&i)return t.i,t.x=u,t.y=d,t.moved=!1,e;for(let n=0,r=p.length;n<r;n++){const r=p[n];t.i,t.x,t.y,r.i,r.x,r.y,r.moved||(e=r.static?_(e,r,t,o,s):_(e,t,r,o,s))}return e}function _(e,t,n,r,o,i){const a="horizontal"===o,s="vertical"===o,l=t.static;if(r){r=!1;const i={x:a?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},c=g(e,i),u=c&&c.y+c.h>t.y,d=c&&t.x+t.w>c.x;if(!c)return n.i,i.x,i.y,b(e,n,a?i.x:void 0,s?i.y:void 0,r,l,o);if(u&&s)return b(e,n,void 0,t.y+1,r,l,o);if(u&&null==o)return t.y=n.y,n.y=n.y+n.h,e;if(d&&a)return b(e,t,n.x,void 0,r,l,o)}const c=a?n.x+1:void 0,u=s?n.y+1:void 0;return null==c&&null==u?e:b(e,n,a?n.x+1:void 0,s?n.y+1:void 0,r,l,o)}const x=(e,t,n,r)=>e+n>r?t:n,w=(e,t,n)=>e<0?t:n,S=e=>Math.max(0,e),k=e=>Math.max(0,e),C=(e,t,n)=>{let{left:r,height:o,width:i}=t;const a=e.top-(o-e.height);return{left:r,width:i,height:w(a,e.height,o),top:k(a)}},E=(e,t,n)=>{let{top:r,left:o,height:i,width:a}=t;return{top:r,height:i,width:x(e.left,e.width,a,n),left:S(o)}},M=(e,t,n)=>{let{top:r,height:o,width:i}=t;const a=e.left-(i-e.width);return{height:o,width:a<0?e.width:x(e.left,e.width,i,n),top:k(r),left:S(a)}},P=(e,t,n)=>{let{top:r,left:o,height:i,width:a}=t;return{width:a,left:o,height:w(r,e.height,i),top:k(r)}},O={n:C,ne:function(){return C(arguments.length<=0?void 0:arguments[0],E(...arguments))},e:E,se:function(){return P(arguments.length<=0?void 0:arguments[0],E(...arguments))},s:P,sw:function(){return P(arguments.length<=0?void 0:arguments[0],M(...arguments))},w:M,nw:function(){return C(arguments.length<=0?void 0:arguments[0],M(...arguments))}};function T(e,t){return"horizontal"===t?D(e):"vertical"===t?N(e):e}function N(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function D(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let r=0,o=e.length;r<o;r++){const o=e[r];for(let e=0;e<n.length;e++)if("number"!=typeof o[n[e]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[e]+" must be a number!")}}return hY.noop=()=>{},hY}var fY,mY={};function gY(){if(fY)return mY;function e(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-2*n[0])/o}function t(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function n(e,t,n){return Math.max(Math.min(e,n),t)}return fY=1,Object.defineProperty(mY,"__esModule",{value:!0}),mY.calcGridColWidth=e,mY.calcGridItemPosition=function(n,r,o,i,a,s){const{margin:l,containerPadding:c,rowHeight:u}=n,d=e(n),h={};s&&s.resizing?(h.width=Math.round(s.resizing.width),h.height=Math.round(s.resizing.height)):(h.width=t(i,d,l[0]),h.height=t(a,u,l[1]));s&&s.dragging?(h.top=Math.round(s.dragging.top),h.left=Math.round(s.dragging.left)):s&&s.resizing&&"number"==typeof s.resizing.top&&"number"==typeof s.resizing.left?(h.top=Math.round(s.resizing.top),h.left=Math.round(s.resizing.left)):(h.top=Math.round((u+l[1])*o+c[1]),h.left=Math.round((d+l[0])*r+c[0]));return h},mY.calcGridItemWHPx=t,mY.calcWH=function(t,r,o,i,a,s){const{margin:l,maxRows:c,cols:u,rowHeight:d}=t,h=e(t);let p=Math.round((r+l[0])/(h+l[0])),f=Math.round((o+l[1])/(d+l[1])),m=n(p,0,u-i),g=n(f,0,c-a);-1!==["sw","w","nw"].indexOf(s)&&(m=n(p,0,u));-1!==["nw","n","ne"].indexOf(s)&&(g=n(f,0,c));return{w:m,h:g}},mY.calcXY=function(t,r,o,i,a){const{margin:s,cols:l,rowHeight:c,maxRows:u}=t,d=e(t);let h=Math.round((o-s[0])/(d+s[0])),p=Math.round((r-s[1])/(c+s[1]));return h=n(h,0,l-i),p=n(p,0,u-a),{x:h,y:p}},mY.clamp=n,mY}var vY={},yY={exports:{}},bY={};function _Y(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=_Y(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xY(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=_Y(e))&&(r&&(r+=" "),r+=t);return r}var wY,SY=_e(Object.freeze({__proto__:null,clsx:xY,default:xY})),kY={},CY={};function EY(){if(wY)return CY;return wY=1,Object.defineProperty(CY,"__esModule",{value:!0}),CY.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},CY.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},CY.int=function(e){return parseInt(e,10)},CY.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},CY.isNum=function(e){return"number"==typeof e&&!isNaN(e)},CY}var MY,PY,OY={};function TY(){if(PY)return kY;PY=1,Object.defineProperty(kY,"__esModule",{value:!0}),kY.addClassName=a,kY.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},kY.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&a(e.body,"react-draggable-transparent-selection")},kY.createCSSTransform=function(e,n){const r=i(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},kY.createSVGTransform=function(e,t){return i(e,t,"")},kY.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},kY.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},kY.getTranslation=i,kY.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},kY.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},kY.matchesSelector=o,kY.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(o(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},kY.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},kY.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},kY.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},kY.removeClassName=s,kY.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},kY.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&s(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var e=EY(),t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(function(){if(MY)return OY;MY=1,Object.defineProperty(OY,"__esModule",{value:!0}),OY.browserPrefixToKey=n,OY.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},OY.default=void 0,OY.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const o=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(r in o)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in o)return e[t];return""}function n(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}return OY.default=t(),OY}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function o(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[r])&&t[r](n)}function i(e,t,n){let{x:r,y:o}=e,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(e,", ").concat(r,")")+i}return i}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function s(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return kY}var NY,DY={};function AY(){if(NY)return DY;NY=1,Object.defineProperty(DY,"__esModule",{value:!0}),DY.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},DY.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},DY.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},DY.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},DY.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=n(r);if("string"==typeof a){const{ownerDocument:n}=s,r=n.defaultView;let o;if(o="parent"===a?s.parentNode:n.querySelector(a),!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,l=r.getComputedStyle(s),c=r.getComputedStyle(i);a={left:-s.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-s.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},DY.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),s=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,s,o.props.scale)},DY.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=EY(),t=TY();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return DY}var LY,IY,zY,RY,$Y={},FY={};function jY(){if(LY)return FY;return LY=1,Object.defineProperty(FY,"__esModule",{value:!0}),FY.default=function(){},FY}function BY(){if(IY)return $Y;IY=1,Object.defineProperty($Y,"__esModule",{value:!0}),$Y.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=l(Ue()),n=l(M),r=TY(),i=AY(),a=EY(),s=l(jY());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h;class f extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const o=(0,r.getTouchIdentifier)(e);this.touchIdentifier=o;const a=(0,i.getControlPosition)(e,o,this);if(null==a)return;const{x:l,y:c}=a,u=(0,i.createCoreData)(this,l,c);(0,s.default)("DraggableCore: handleDragStart: %j",u),(0,s.default)("calling",this.props.onStart);!1!==this.props.onStart(e,u)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=c,(0,r.addEvent)(n,p.move,this.handleDrag),(0,r.addEvent)(n,p.stop,this.handleDragStop))})),u(this,"handleDrag",(e=>{const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,i.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,i.createCoreData)(this,n,r);(0,s.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),u(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:o}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=o-this.lastY||0;[e,t]=(0,i.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,o=this.lastY+t}const a=(0,i.createCoreData)(this,n,o);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(l.ownerDocument),(0,s.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,s.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(l.ownerDocument,p.move,this.handleDrag),(0,r.removeEvent)(l.ownerDocument,p.stop,this.handleDragStop))})),u(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),u(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),u(this,"onTouchStart",(e=>(p=d,this.handleDragStart(e)))),u(this,"onTouchEnd",(e=>(p=d,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,d.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,h.move,this.handleDrag),(0,r.removeEvent)(t,d.move,this.handleDrag),(0,r.removeEvent)(t,h.stop,this.handleDragStop),(0,r.removeEvent)(t,d.stop,this.handleDragStop),(0,r.removeEvent)(e,d.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}return $Y.default=f,u(f,"displayName","DraggableCore"),u(f,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),u(f,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),$Y}function HY(){return zY||(zY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),n=d(Ue()),r=d(M),i=d(SY),a=TY(),s=AY(),l=EY(),c=d(BY()),u=d(jY());function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function f(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,s.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:u,defaultClassNameDragged:d,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},y=null;const b=!Boolean(h)||this.state.dragging,_=h||o,x={x:(0,s.canDragX)(this)&&b?this.state.x:_.x,y:(0,s.canDragY)(this)&&b?this.state.y:_.y};this.state.isElementSVG?y=(0,a.createSVGTransform)(x,f):v=(0,a.createCSSTransform)(x,f);const w=(0,i.default)(r.props.className||"",l,{[u]:this.state.dragging,[d]:this.state.dragged});return t.createElement(c.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:w,style:{...r.props.style,...v},transform:y}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(m,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(bY)),bY}function WY(){if(RY)return yY.exports;RY=1;const{default:e,DraggableCore:t}=HY();return yY.exports=e,yY.exports.default=e,yY.exports.DraggableCore=t,yY.exports}var VY,YY={exports:{}},XY={},qY={};function UY(){if(VY)return qY;VY=1,qY.__esModule=!0,qY.cloneElement=function(e,n){n.style&&e.props.style&&(n.style=r(r({},e.props.style),n.style));n.className&&e.props.className&&(n.className=e.props.className+" "+n.className);return t.default.cloneElement(e,n)};var e,t=(e=o)&&e.__esModule?e:{default:e};function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return qY}var ZY,GY,KY={};function JY(){if(ZY)return KY;ZY=1,KY.__esModule=!0,KY.resizableProps=void 0;var e,t=(e=Ue())&&e.__esModule?e:{default:e};WY();var n={axis:t.default.oneOf(["both","x","y","none"]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o,i=n[0];return"both"===i.axis||"y"===i.axis?(o=t.default.number).isRequired.apply(o,n):t.default.number.apply(t.default,n)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:t.default.number,width:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o,i=n[0];return"both"===i.axis||"x"===i.axis?(o=t.default.number).isRequired.apply(o,n):t.default.number.apply(t.default,n)}};return KY.resizableProps=n,KY}function QY(){if(GY)return XY;GY=1,XY.__esModule=!0,XY.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=WY(),n=UY(),r=JY(),i=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var h=function(r){var o,a;function l(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=r.call.apply(r,[this].concat(n))||this).handleRefs={},e.lastHandleRect=null,e.slack=null,e}a=r,(o=l).prototype=Object.create(a.prototype),o.prototype.constructor=o,d(o,a);var u=l.prototype;return u.componentWillUnmount=function(){this.resetData()},u.resetData=function(){this.lastHandleRect=this.slack=null},u.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,o=n.maxConstraints,i=n.lockAspectRatio;if(!r&&!o&&!i)return[e,t];if(i){var a=this.props.width/this.props.height,s=e-this.props.width,l=t-this.props.height;Math.abs(s)>Math.abs(l*a)?t=e/a:e=t*a}var c=e,u=t,d=this.slack||[0,0],h=d[0],p=d[1];return e+=h,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),o&&(e=Math.min(o[0],e),t=Math.min(o[1],t)),this.slack=[h+(c-e),p+(u-t)],[e,t]},u.resizeHandler=function(e,t){var n=this;return function(r,o){var i=o.node,a=o.deltaX,s=o.deltaY;"onResizeStart"===e&&n.resetData();var l=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,c=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(l||c){var u=t[0],d=t[t.length-1],h=i.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===d)a+=h.left-n.lastHandleRect.left;if("n"===u)s+=h.top-n.lastHandleRect.top}n.lastHandleRect=h,"w"===d&&(a=-a),"n"===u&&(s=-s);var p=n.props.width+(l?a/n.props.transformScale:0),f=n.props.height+(c?s/n.props.transformScale:0),m=n.runConstraints(p,f);p=m[0],f=m[1];var g=p!==n.props.width||f!==n.props.height,v="function"==typeof n.props[e]?n.props[e]:null;v&&!("onResize"===e&&!g)&&(null==r.persist||r.persist(),v(r,{node:i,size:{width:p,height:f},handle:t})),"onResizeStop"===e&&n.resetData()}}},u.renderResizeHandle=function(t,n){var r=this.props.handle;if(!r)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:n});if("function"==typeof r)return r(t,n);var o=c({ref:n},"string"==typeof r.type?{}:{handleAxis:t});return e.cloneElement(r,o)},u.render=function(){var r=this,o=this.props,a=o.children,l=o.className,u=o.draggableOpts;o.width,o.height,o.handle,o.handleSize,o.lockAspectRatio,o.axis,o.minConstraints,o.maxConstraints,o.onResize,o.onResizeStop,o.onResizeStart;var d=o.resizeHandles;o.transformScale;var h=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(o,i);return(0,n.cloneElement)(a,c(c({},h),{},{className:(l?l+" ":"")+"react-resizable",children:[].concat(a.props.children,d.map((function(n){var o,i=null!=(o=r.handleRefs[n])?o:r.handleRefs[n]=e.createRef();return e.createElement(t.DraggableCore,s({},u,{nodeRef:i,key:"resizableHandle-"+n,onStop:r.resizeHandler("onResizeStop",n),onStart:r.resizeHandler("onResizeStart",n),onDrag:r.resizeHandler("onResize",n)}),r.renderResizeHandle(n,i))})))}))},l}(e.Component);return XY.default=h,h.propTypes=r.resizableProps,h.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},XY}var eX,tX,nX={};function rX(){if(eX)return nX;eX=1,nX.__esModule=!0,nX.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=a(Ue()),n=a(QY()),r=JY(),i=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function a(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var p=function(t){var r,o;function a(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).state={width:e.props.width,height:e.props.height,propsWidth:e.props.width,propsHeight:e.props.height},e.onResize=function(t,n){var r=n.size;e.props.onResize?(null==t.persist||t.persist(),e.setState(r,(function(){return e.props.onResize&&e.props.onResize(t,n)}))):e.setState(r)},e}return o=t,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,h(r,o),a.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},a.prototype.render=function(){var t=this.props,r=t.handle,o=t.handleSize;t.onResize;var a=t.onResizeStart,s=t.onResizeStop,c=t.draggableOpts,d=t.minConstraints,h=t.maxConstraints,p=t.lockAspectRatio,f=t.axis;t.width,t.height;var m=t.resizeHandles,g=t.style,v=t.transformScale,y=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,i);return e.createElement(n.default,{axis:f,draggableOpts:c,handle:r,handleSize:o,height:this.state.height,lockAspectRatio:p,maxConstraints:h,minConstraints:d,onResizeStart:a,onResize:this.onResize,onResizeStop:s,resizeHandles:m,transformScale:v,width:this.state.width},e.createElement("div",l({},y,{style:u(u({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},a}(e.Component);return nX.default=p,p.propTypes=u(u({},r.resizableProps),{},{children:t.default.element}),nX}var oX,iX,aX,sX={};function lX(){if(oX)return sX;oX=1,Object.defineProperty(sX,"__esModule",{value:!0}),sX.resizeHandleType=sX.resizeHandleAxesType=sX.default=void 0;var e=n(Ue()),t=n(o);function n(e){return e&&e.__esModule?e:{default:e}}const r=sX.resizeHandleAxesType=e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),i=sX.resizeHandleType=e.default.oneOfType([e.default.node,e.default.func]);return sX.default={className:e.default.string,style:e.default.object,width:e.default.number,autoSize:e.default.bool,cols:e.default.number,draggableCancel:e.default.string,draggableHandle:e.default.string,verticalCompact:function(e){!1===e.verticalCompact&&"production"!==process.env.NODE_ENV&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:e.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&pY().validateLayout(t,"layout")},margin:e.default.arrayOf(e.default.number),containerPadding:e.default.arrayOf(e.default.number),rowHeight:e.default.number,maxRows:e.default.number,isBounded:e.default.bool,isDraggable:e.default.bool,isResizable:e.default.bool,allowOverlap:e.default.bool,preventCollision:e.default.bool,useCSSTransforms:e.default.bool,transformScale:e.default.number,isDroppable:e.default.bool,resizeHandles:r,resizeHandle:i,onLayoutChange:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onDragStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,onResizeStop:e.default.func,onDrop:e.default.func,droppingItem:e.default.shape({i:e.default.string.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired}),children:function(e,n){const r=e[n],o={};t.default.Children.forEach(r,(function(e){if(null!=e?.key){if(o[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');o[e.key]=!0}}))},innerRef:e.default.any},sX}function cX(){if(iX)return vY;iX=1,Object.defineProperty(vY,"__esModule",{value:!0}),vY.default=void 0;var e=c(o),t=c(Ue()),n=WY(),r=(tX||(tX=1,YY.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},YY.exports.Resizable=QY().default,YY.exports.ResizableBox=rX().default),YY.exports),i=pY(),a=gY(),s=lX(),l=c(lY());function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends e.default.Component{constructor(){super(...arguments),u(this,"state",{resizing:null,dragging:null,className:""}),u(this,"elementRef",e.default.createRef()),u(this,"onDragStart",((e,t)=>{let{node:n}=t;const{onDragStart:r,transformScale:o}=this.props;if(!r)return;const i={top:0,left:0},{offsetParent:s}=n;if(!s)return;const l=s.getBoundingClientRect(),c=n.getBoundingClientRect(),u=c.left/o,d=l.left/o,h=c.top/o,p=l.top/o;i.left=u-d+s.scrollLeft,i.top=h-p+s.scrollTop,this.setState({dragging:i});const{x:f,y:m}=(0,a.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return r.call(this,this.props.i,f,m,{e:e,node:n,newPosition:i})})),u(this,"onDrag",((e,t)=>{let{node:n,deltaX:r,deltaY:o}=t;const{onDrag:i}=this.props;if(!i)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let s=this.state.dragging.top+o,l=this.state.dragging.left+r;const{isBounded:c,i:u,w:d,h:h,containerWidth:p}=this.props,f=this.getPositionParams();if(c){const{offsetParent:e}=n;if(e){const{margin:t,rowHeight:n,containerPadding:r}=this.props,o=e.clientHeight-(0,a.calcGridItemWHPx)(h,n,t[1]);s=(0,a.clamp)(s-r[1],0,o);const i=(0,a.calcGridColWidth)(f),c=p-(0,a.calcGridItemWHPx)(d,i,t[0]);l=(0,a.clamp)(l-r[0],0,c)}}const m={top:s,left:l};this.setState({dragging:m});const{containerPadding:g}=this.props,{x:v,y:y}=(0,a.calcXY)(f,s-g[1],l-g[0],d,h);return i.call(this,u,v,y,{e:e,node:n,newPosition:m})})),u(this,"onDragStop",((e,t)=>{let{node:n}=t;const{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:o,h:i,i:s,containerPadding:l}=this.props,{left:c,top:u}=this.state.dragging,d={top:u,left:c};this.setState({dragging:null});const{x:h,y:p}=(0,a.calcXY)(this.getPositionParams(),u-l[1],c-l[0],o,i);return r.call(this,s,h,p,{e:e,node:n,newPosition:d})})),u(this,"onResizeStop",((e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStop"))),u(this,"onResizeStart",((e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStart"))),u(this,"onResize",((e,t,n)=>this.onResizeHandler(e,t,n,"onResize")))}shouldComponentUpdate(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;const n=(0,a.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,a.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,i.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const n=this.elementRef.current;if(!n)return;const r=e.droppingPosition||{left:0,top:0},{dragging:o}=this.state,i=o&&t.left!==r.left||t.top!==r.top;if(o){if(i){const e=t.left-o.left,r=t.top-o.top;this.onDrag(t.e,{node:n,deltaX:e,deltaY:r})}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}getPositionParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:n,useCSSTransforms:r}=this.props;let o;return r?o=(0,i.setTransform)(e):(o=(0,i.setTopLeft)(e),t&&(o.left=(0,i.perc)(e.left/n),o.width=(0,i.perc)(e.width/n))),o}mixinDraggable(t,r){return e.default.createElement(n.DraggableCore,{disabled:!r,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},t)}curryResizeHandler(e,t){return(n,r)=>t(n,r,e)}mixinResizable(t,n,o){const{cols:i,minW:s,minH:l,maxW:c,maxH:u,transformScale:d,resizeHandles:h,resizeHandle:p}=this.props,f=this.getPositionParams(),m=(0,a.calcGridItemPosition)(f,0,0,i,0).width,g=(0,a.calcGridItemPosition)(f,0,0,s,l),v=(0,a.calcGridItemPosition)(f,0,0,c,u),y=[g.width,g.height],b=[Math.min(v.width,m),Math.min(v.height,1/0)];return e.default.createElement(r.Resizable,{draggableOpts:{disabled:!o},className:o?void 0:"react-resizable-hide",width:n.width,height:n.height,minConstraints:y,maxConstraints:b,onResizeStop:this.curryResizeHandler(n,this.onResizeStop),onResizeStart:this.curryResizeHandler(n,this.onResizeStart),onResize:this.curryResizeHandler(n,this.onResize),transformScale:d,resizeHandles:h,handle:p},t)}onResizeHandler(e,t,n,r){let{node:o,size:s,handle:l}=t;const c=this.props[r];if(!c)return;const{x:u,y:d,i:h,maxH:p,minH:f,containerWidth:m}=this.props,{minW:g,maxW:v}=this.props;let y=s;o&&(y=(0,i.resizeItemInDirection)(l,n,s,m),this.setState({resizing:"onResizeStop"===r?null:y}));let{w:b,h:_}=(0,a.calcWH)(this.getPositionParams(),y.width,y.height,u,d,l);b=(0,a.clamp)(b,Math.max(g,1),v),_=(0,a.clamp)(_,f,p),c.call(this,h,b,_,{e:e,node:o,size:y,handle:l})}render(){const{x:t,y:n,w:r,h:o,isDraggable:i,isResizable:s,droppingPosition:c,useCSSTransforms:u}=this.props,d=(0,a.calcGridItemPosition)(this.getPositionParams(),t,n,r,o,this.state),h=e.default.Children.only(this.props.children);let p=e.default.cloneElement(h,{ref:this.elementRef,className:(0,l.default)("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":i,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(c),cssTransforms:u}),style:{...this.props.style,...h.props.style,...this.createStyle(d)}});return p=this.mixinResizable(p,d,s),p=this.mixinDraggable(p,i),p}}return vY.default=d,u(d,"propTypes",{children:t.default.element,cols:t.default.number.isRequired,containerWidth:t.default.number.isRequired,rowHeight:t.default.number.isRequired,margin:t.default.array.isRequired,maxRows:t.default.number.isRequired,containerPadding:t.default.array.isRequired,x:t.default.number.isRequired,y:t.default.number.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired,minW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:t.default.string.isRequired,resizeHandles:s.resizeHandleAxesType,resizeHandle:s.resizeHandleType,onDragStop:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,isDraggable:t.default.bool.isRequired,isResizable:t.default.bool.isRequired,isBounded:t.default.bool.isRequired,static:t.default.bool,useCSSTransforms:t.default.bool.isRequired,transformScale:t.default.number,className:t.default.string,handle:t.default.string,cancel:t.default.string,droppingPosition:t.default.shape({e:t.default.object.isRequired,left:t.default.number.isRequired,top:t.default.number.isRequired})}),u(d,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),vY}function uX(){if(aX)return DV;aX=1,Object.defineProperty(DV,"__esModule",{value:!0}),DV.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=aY,n=l(lY()),r=pY(),i=gY(),a=l(cX()),s=l(lX());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d="react-grid-layout";let h=!1;try{h=/firefox/i.test(navigator.userAgent)}catch(e){}class p extends e.Component{constructor(){super(...arguments),u(this,"state",{activeDrag:null,layout:(0,r.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,r.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),u(this,"dragEnterCounter",0),u(this,"onDragStart",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s}=this.state,l=(0,r.getLayoutItem)(s,e);if(!l)return;const c={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,r.cloneLayoutItem)(l),oldLayout:s,activeDrag:c}),this.props.onDragStart(s,l,l,null,i,a)})),u(this,"onDrag",((e,t,n,o)=>{let{e:i,node:a}=o;const{oldDragItem:s}=this.state;let{layout:l}=this.state;const{cols:c,allowOverlap:u,preventCollision:d}=this.props,h=(0,r.getLayoutItem)(l,e);if(!h)return;const p={w:h.w,h:h.h,x:h.x,y:h.y,placeholder:!0,i:e};l=(0,r.moveElement)(l,h,t,n,!0,d,(0,r.compactType)(this.props),c,u),this.props.onDrag(l,s,h,p,i,a),this.setState({layout:u?l:(0,r.compact)(l,(0,r.compactType)(this.props),c),activeDrag:p})})),u(this,"onDragStop",((e,t,n,o)=>{let{e:i,node:a}=o;if(!this.state.activeDrag)return;const{oldDragItem:s}=this.state;let{layout:l}=this.state;const{cols:c,preventCollision:u,allowOverlap:d}=this.props,h=(0,r.getLayoutItem)(l,e);if(!h)return;l=(0,r.moveElement)(l,h,t,n,!0,u,(0,r.compactType)(this.props),c,d);const p=d?l:(0,r.compact)(l,(0,r.compactType)(this.props),c);this.props.onDragStop(p,s,h,null,i,a);const{oldLayout:f}=this.state;this.setState({activeDrag:null,layout:p,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(p,f)})),u(this,"onResizeStart",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s}=this.state,l=(0,r.getLayoutItem)(s,e);l&&(this.setState({oldResizeItem:(0,r.cloneLayoutItem)(l),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,l,l,null,i,a))})),u(this,"onResize",((e,t,n,o)=>{let{e:i,node:a,size:s,handle:l}=o;const{oldResizeItem:c}=this.state,{layout:u}=this.state,{cols:d,preventCollision:h,allowOverlap:p}=this.props;let f,m,g,v=!1;const[y,b]=(0,r.withLayoutItem)(u,e,(e=>{let o;if(m=e.x,g=e.y,-1!==["sw","w","nw","n","ne"].indexOf(l)&&(-1!==["sw","nw","w"].indexOf(l)&&(m=e.x+(e.w-t),t=e.x!==m&&m<0?e.w:t,m=m<0?0:m),-1!==["ne","n","nw"].indexOf(l)&&(g=e.y+(e.h-n),n=e.y!==g&&g<0?e.h:n,g=g<0?0:g),v=!0),h&&!p){o=(0,r.getAllCollisions)(u,{...e,w:t,h:n,x:m,y:g}).filter((t=>t.i!==e.i)).length>0,o&&(g=e.y,n=e.h,m=e.x,t=e.w,v=!1)}return e.w=t,e.h=n,e}));if(!b)return;if(f=y,v){const e=!0;f=(0,r.moveElement)(y,b,m,g,e,this.props.preventCollision,(0,r.compactType)(this.props),d,p)}const _={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(f,c,b,_,i,a),this.setState({layout:p?f:(0,r.compact)(f,(0,r.compactType)(this.props),d),activeDrag:_})})),u(this,"onResizeStop",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s,oldResizeItem:l}=this.state,{cols:c,allowOverlap:u}=this.props,d=(0,r.getLayoutItem)(s,e),h=u?s:(0,r.compact)(s,(0,r.compactType)(this.props),c);this.props.onResizeStop(h,l,d,null,i,a);const{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(h,p)})),u(this,"onDragOver",(t=>{if(t.preventDefault(),t.stopPropagation(),h&&!t.nativeEvent.target?.classList.contains(d))return!1;const{droppingItem:n,onDropDragOver:r,margin:o,cols:a,rowHeight:s,maxRows:l,width:c,containerPadding:u,transformScale:p}=this.props,f=r?.(t);if(!1===f)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const m={...n,...f},{layout:g}=this.state,v=t.currentTarget.getBoundingClientRect(),y=t.clientX-v.left,b=t.clientY-v.top,_={left:y/p,top:b/p,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:e,top:t}=this.state.droppingPosition;(e!=y||t!=b)&&this.setState({droppingPosition:_})}}else{const t={cols:a,margin:o,maxRows:l,rowHeight:s,containerWidth:c,containerPadding:u||o},n=(0,i.calcXY)(t,b,y,m.w,m.h);this.setState({droppingDOMNode:e.createElement("div",{key:m.i}),droppingPosition:_,layout:[...g,{...m,x:n.x,y:n.y,static:!1,isDraggable:!0}]})}})),u(this,"removeDroppingPlaceholder",(()=>{const{droppingItem:e,cols:t}=this.props,{layout:n}=this.state,o=(0,r.compact)(n.filter((t=>t.i!==e.i)),(0,r.compactType)(this.props),t,this.props.allowOverlap);this.setState({layout:o,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),u(this,"onDragLeave",(e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,0===this.dragEnterCounter&&this.removeDroppingPlaceholder()})),u(this,"onDragEnter",(e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++})),u(this,"onDrop",(e=>{e.preventDefault(),e.stopPropagation();const{droppingItem:t}=this.props,{layout:n}=this.state,r=n.find((e=>e.i===t.i));this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,e)}))}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,n){let o;if(n.activeDrag)return null;if((0,t.deepEqual)(e.layout,n.propsLayout)&&e.compactType===n.compactType?(0,r.childrenEqual)(e.children,n.children)||(o=n.layout):o=e.layout,o){return{layout:(0,r.synchronizeLayoutWithChildren)(o,e.children,e.cols,(0,r.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}}return null}shouldComponentUpdate(e,n){return this.props.children!==e.children||!(0,r.fastRGLPropsEqual)(this.props,e,t.deepEqual)||this.state.activeDrag!==n.activeDrag||this.state.mounted!==n.mounted||this.state.droppingPosition!==n.droppingPosition}componentDidUpdate(e,t){if(!this.state.activeDrag){const e=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(e,n)}}containerHeight(){if(!this.props.autoSize)return;const e=(0,r.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}onLayoutMaybeChanged(e,n){n||(n=this.state.layout),(0,t.deepEqual)(n,e)||this.props.onLayoutChange(e)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:n,cols:r,margin:o,containerPadding:i,rowHeight:s,maxRows:l,useCSSTransforms:c,transformScale:u}=this.props;return e.createElement(a.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder "+(this.state.resizing?"placeholder-resizing":""),containerWidth:n,cols:r,margin:o,containerPadding:i||o,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:u},e.createElement("div",null))}processGridItem(t,n){if(!t||!t.key)return;const o=(0,r.getLayoutItem)(this.state.layout,String(t.key));if(!o)return null;const{width:i,cols:s,margin:l,containerPadding:c,rowHeight:u,maxRows:d,isDraggable:h,isResizable:p,isBounded:f,useCSSTransforms:m,transformScale:g,draggableCancel:v,draggableHandle:y,resizeHandles:b,resizeHandle:_}=this.props,{mounted:x,droppingPosition:w}=this.state,S="boolean"==typeof o.isDraggable?o.isDraggable:!o.static&&h,k="boolean"==typeof o.isResizable?o.isResizable:!o.static&&p,C=o.resizeHandles||b,E=S&&f&&!1!==o.isBounded;return e.createElement(a.default,{containerWidth:i,cols:s,margin:l,containerPadding:c||l,maxRows:d,rowHeight:u,cancel:v,handle:y,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:S,isResizable:k,isBounded:E,useCSSTransforms:m&&x,usePercentages:!x,transformScale:g,w:o.w,h:o.h,x:o.x,y:o.y,i:o.i,minH:o.minH,minW:o.minW,maxH:o.maxH,maxW:o.maxW,static:o.static,droppingPosition:n?w:void 0,resizeHandles:C,resizeHandle:_},t)}render(){const{className:t,style:o,isDroppable:i,innerRef:a}=this.props,s=(0,n.default)(d,t),l={height:this.containerHeight(),...o};return e.createElement("div",{ref:a,className:s,style:l,onDrop:i?this.onDrop:r.noop,onDragLeave:i?this.onDragLeave:r.noop,onDragEnter:i?this.onDragEnter:r.noop,onDragOver:i?this.onDragOver:r.noop},e.Children.map(this.props.children,(e=>this.processGridItem(e))),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}return DV.default=p,u(p,"displayName","ReactGridLayout"),u(p,"propTypes",s.default),u(p,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:r.noop,onDragStart:r.noop,onDrag:r.noop,onDragStop:r.noop,onResizeStart:r.noop,onResize:r.noop,onResizeStop:r.noop,onDrop:r.noop,onDropDragOver:r.noop}),DV}var dX,hX,pX={},fX={};function mX(){if(dX)return fX;dX=1,Object.defineProperty(fX,"__esModule",{value:!0}),fX.findOrGenerateResponsiveLayout=function(n,r,o,i,a,s){if(n[o])return(0,e.cloneLayout)(n[o]);let l=n[i];const c=t(r),u=c.slice(c.indexOf(o));for(let e=0,t=u.length;e<t;e++){const t=u[e];if(n[t]){l=n[t];break}}return l=(0,e.cloneLayout)(l||[]),(0,e.compact)((0,e.correctBounds)(l,{cols:a}),s,a)},fX.getBreakpointFromWidth=function(e,n){const r=t(e);let o=r[0];for(let t=1,i=r.length;t<i;t++){const i=r[t];n>e[i]&&(o=i)}return o},fX.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},fX.sortBreakpoints=t;var e=pY();function t(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}return fX}function gX(){if(hX)return pX;hX=1,Object.defineProperty(pX,"__esModule",{value:!0}),pX.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=s(Ue()),n=aY,r=pY(),i=mX(),a=s(uX());function s(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=e=>Object.prototype.toString.call(e);function h(e,t){return null==e?null:Array.isArray(e)?e:e[t]}class p extends e.Component{constructor(){super(...arguments),u(this,"state",this.generateInitialState()),u(this,"onLayoutChange",(e=>{this.props.onLayoutChange(e,{...this.props.layouts,[this.state.breakpoint]:e})}))}generateInitialState(){const{width:e,breakpoints:t,layouts:n,cols:r}=this.props,o=(0,i.getBreakpointFromWidth)(t,e),a=(0,i.getColsFromBreakpoint)(o,r),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,i.findOrGenerateResponsiveLayout)(n,t,o,o,a,s),breakpoint:o,cols:a}}static getDerivedStateFromProps(e,t){if(!(0,n.deepEqual)(e.layouts,t.layouts)){const{breakpoint:n,cols:r}=t;return{layout:(0,i.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,n.deepEqual)(this.props.breakpoints,e.breakpoints)&&(0,n.deepEqual)(this.props.cols,e.cols)||this.onWidthChange(e)}onWidthChange(e){const{breakpoints:t,cols:n,layouts:o,compactType:a}=this.props,s=this.props.breakpoint||(0,i.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),l=this.state.breakpoint,c=(0,i.getColsFromBreakpoint)(s,n),u={...o};if(l!==s||e.breakpoints!==t||e.cols!==n){l in u||(u[l]=(0,r.cloneLayout)(this.state.layout));let e=(0,i.findOrGenerateResponsiveLayout)(u,t,s,l,c,a);e=(0,r.synchronizeLayoutWithChildren)(e,this.props.children,c,a,this.props.allowOverlap),u[s]=e,this.props.onLayoutChange(e,u),this.props.onBreakpointChange(s,c),this.setState({breakpoint:s,layout:e,cols:c})}const d=h(this.props.margin,s),p=h(this.props.containerPadding,s);this.props.onWidthChange(this.props.width,d,c,p)}render(){const{breakpoint:t,breakpoints:n,cols:r,layouts:o,margin:i,containerPadding:s,onBreakpointChange:l,onLayoutChange:u,onWidthChange:d,...p}=this.props;return e.createElement(a.default,c({},p,{margin:h(i,this.state.breakpoint),containerPadding:h(s,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}return pX.default=p,u(p,"propTypes",{breakpoint:t.default.string,breakpoints:t.default.object,allowOverlap:t.default.bool,cols:t.default.object,margin:t.default.oneOfType([t.default.array,t.default.object]),containerPadding:t.default.oneOfType([t.default.array,t.default.object]),layouts(e,t){if("[object Object]"!==d(e[t]))throw new Error("Layout property must be an object. Received: "+d(e[t]));Object.keys(e[t]).forEach((t=>{if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,r.validateLayout)(e.layouts[t],"layouts."+t)}))},width:t.default.number.isRequired,onBreakpointChange:t.default.func,onLayoutChange:t.default.func,onWidthChange:t.default.func}),u(p,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:r.noop,onLayoutChange:r.noop,onWidthChange:r.noop}),pX}var vX,yX,bX={},_X=_e(kv);function xX(){if(vX)return bX;vX=1,Object.defineProperty(bX,"__esModule",{value:!0}),bX.default=function(o){var i;return i=class extends e.Component{constructor(){super(...arguments),l(this,"state",{width:1280}),l(this,"elementRef",e.createRef()),l(this,"mounted",!1),l(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new n.default((e=>{if(this.elementRef.current instanceof HTMLElement){const t=e[0].contentRect.width;this.setState({width:t})}}));const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.observe(e)}componentWillUnmount(){this.mounted=!1;const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.unobserve(e),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:t,...n}=this.props;return t&&!this.mounted?e.createElement("div",{className:(0,r.default)(this.props.className,c),style:this.props.style,ref:this.elementRef}):e.createElement(o,s({innerRef:this.elementRef},n,this.state))}},l(i,"defaultProps",{measureBeforeMount:!1}),l(i,"propTypes",{measureBeforeMount:t.default.bool}),i};var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=i(Ue()),n=i(_X),r=i(lY());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c="react-grid-layout";return bX}var wX=be((yX||(yX=1,function(e){e.exports=uX().default,e.exports.utils=pY(),e.exports.calculateUtils=gY(),e.exports.Responsive=gX().default,e.exports.Responsive.utils=mX(),e.exports.WidthProvider=xX().default}(NV)),NV.exports)),SX={layoutContainer:"DashboardLayout-module_layoutContainer__wOGEu",addNewComponent:"DashboardLayout-module_addNewComponent__Gan9z",plusIcon:"DashboardLayout-module_plusIcon__yQQHP",gridItem:"DashboardLayout-module_gridItem__NtXI-"};const kX=({dashboards:n})=>{const[r,i]=o.useState(window.innerWidth),[a,s]=o.useState([]),[c,u]=o.useState(n||[]);l((()=>{const e=()=>i(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),l((()=>{const e=JSON.parse(localStorage.getItem("dashboardLayout")||"[]"),t=c.map((e=>e.id)),n=e.filter((e=>t.includes(e.i)));if(console.log("existDashboardItems",n),n.length>0)return s(n)}),[c]);const d=e=>{localStorage.setItem("dashboardLayout",JSON.stringify(e))};return e("div",{className:SX.layoutContainer,children:e(wX,{className:SX.gridLayout,layout:a,width:r,cols:8,onLayoutChange:e=>{d(e)},draggableHandle:".dragHandle",children:a.map((n=>e("div",{className:SX.gridItem,onClick:()=>{console.log(n)},children:"addNewComponent"!==n.i?e(fg,{chartProps:{type:"bar",data:c.find((e=>e.id===n.i))?.data,options:c.find((e=>e.id===n.i))?.options},headerProps:{content:"Title",suffix:e(Ga,{name:"cog",className:SX.dragHandle})}}):t(B,{className:SX.addNewComponent,direction:"vertical",alignment:"center",dimensionX:"fill",gap:15,dimensionY:"fill",children:[e(Ga,{name:"plus",className:SX.plusIcon}),e(V,{size:"xlarge",children:" New Component"})]})},n.i)))})})};var CX="MenuGroup-module_container__VQaFb",EX="MenuGroup-module_menuSection__Nfvar",MX="MenuGroup-module_label__5skIC",PX="MenuGroup-module_noDivider__7fIo3";var OX=a((({options:n={},showDivider:r=!0,className:o,...i})=>e(B,{dimensionX:160,direction:"vertical",gap:0,alignment:"leftCenter",className:`${CX} ${o||""}`,...i,children:Object.entries(n).map((([n,o],i,a)=>{const{label:s,value:l,className:c,...u}=o;return t(B,{dimensionX:"fill",direction:"vertical",gap:10,alignment:"leftCenter",...u,className:`${EX} ${r&&i!==a.length-1?"":PX} ${o.className||""}`,children:[s&&e(V,{className:MX,children:s}),l]},n)}))}))),TX="Table-module_table__7BBwk",NX="Table-module_fixedColumns__fjVOb",DX="Table-module_scrollableColumns__PzDZ9",AX="Table-module_column__daVNe",LX="Table-module_header__w6wP3",IX="Table-module_border__ise22",zX="Table-module_cell__K--55",RX="Table-module_resizer__PTgL3",$X="Table-module_focusedCell__-1YzJ",FX="Table-module_skeletonCell__N0HnJ";const jX=e=>e&&Number.parseInt(e,10)||0,BX=()=>e("div",{className:FX}),HX=Object.assign(a((({columnKey:n,children:r,className:o,width:i,minWidth:a,updateColumnWidth:c,noResizeable:d,style:h})=>{const[p,f]=u(i),[m,g]=u(!1),v=s(null),y=s(jX(i));l((()=>{f(i),y.current=jX(i)}),[i]),l((()=>{if(!m)return;const e=jX(a),t=t=>{if(!v.current)return;let n=t.clientX-v.current.getBoundingClientRect().left;e>0&&n<e&&(n=e),y.current=n,f(`${n}px`)},r=()=>{g(!1);let t=y.current;e>0&&t<e&&(t=e),c?.(n,`${t}px`)};return globalThis.addEventListener("mousemove",t),globalThis.addEventListener("mouseup",r),()=>{globalThis.removeEventListener("mousemove",t),globalThis.removeEventListener("mouseup",r)}}),[m,n,c,a]);return t("div",{ref:v,className:o,style:{...h,minWidth:p},children:[r,!d&&e("button",{type:"button",className:RX,"aria-label":"Resize column",onMouseDown:e=>{e.preventDefault(),g(!0)},onClick:e=>{e.preventDefault()}})]})})),{Header:({border:t=!0,headerAlign:n="center",children:r,...o})=>e(B,{dimensionX:"fill",alignment:{left:"leftTop",center:"center",right:"rightTop"}[n],...o,className:`${LX} ${t?IX:""} ${o.className||""}`,children:r}),Cell:({children:t,focused:n,...r})=>e("div",{...r,className:`${zX} ${n?$X:""} ${r.className||""}`,children:t})});HX.displayName="TableColumn";const WX=["ArrowRight","ArrowLeft","ArrowDown","ArrowUp"],VX=["input","textarea","select","button","a[href]","[role='button']","[role='textbox']","[role='combobox']","[role='link']","[tabindex]:not([tabindex='-1'])"].join(", "),YX=(e,t)=>{if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.closest(VX);return!!n&&(!(t&&!t.contains(n))&&n!==t)},XX=(e,t,n,r,o)=>{switch(n){case"ArrowRight":return t<o-1?{row:e,column:t+1}:null;case"ArrowLeft":return t>0?{row:e,column:t-1}:null;case"ArrowDown":return e<r-1?{row:e+1,column:t}:null;case"ArrowUp":return e>0?{row:e-1,column:t}:null;default:return null}},qX=({columns:n,data:r,loading:o=!1,skeletonRowCount:a=5,renderSkeletonCell:d,saveToLocalStorage:h={id:"table",save:!1},fixedColumns:p=[],noResizeableColumns:f=[],isCellFocusable:m,onCellKeyDown:g,onRowClick:v,tableClassName:y="",columnClassName:b="",headerClassName:_="",cellClassName:x=""})=>{const w=s(null),[S,k]=u((()=>n.map((e=>({...e,width:h.save?localStorage.getItem(`${h.id}-${e.key}`)||e.width||"300px":e.width||"300px"}))))),[C,E]=u(null),M=c(((e,t)=>{const o=n.some((e=>e.key===t));if(e<0||e>=r.length||!o)return null;return{row:r[e],rowIndex:e,columnKey:t}}),[n,r]),P=c(((e,t)=>{const n=M(e,t);return!!n&&(!m||m(n))}),[M,m]),O=i((()=>!o&&r.some(((e,t)=>n.some((n=>{const r={row:e,rowIndex:t,columnKey:n.key};return!m||m(r)}))))),[n,r,m,o]);l((()=>{k((e=>{const t=new Map(e.map((e=>[e.key,e.width])));return n.map((e=>{const n=h.save?localStorage.getItem(`${h.id}-${e.key}`):null;return{...e,width:t.get(e.key)||n||e.width||"300px"}}))}))}),[n,h.save,h.id]);const T=c(((e,t)=>{k((n=>n.map((n=>n.key===e?{...n,width:t}:n))))}),[]);l((()=>{h.save&&S.forEach((e=>{localStorage.setItem(`${h.id}-${e.key}`,e.width||"")}))}),[S,h.save,h.id]);const N=i((()=>{const e={};let t=0;for(const n of p){e[n]=`${t}px`;const r=S.find((e=>e.key===n));t+=jX(r?.width)||300}return e}),[p,S]);l((()=>{C&&(O&&P(C.row,C.column)||E(null))}),[C,O,P]);const D=c(((e,t,o)=>{let i=XX(e,t,o,r.length,n.length);for(;i;){const e=n[i.column];if(e&&P(i.row,e.key))return{row:i.row,column:e.key};i=XX(i.row,i.column,o,r.length,n.length)}return null}),[n,r.length,P]),A=c((e=>{const t="ArrowUp"===e||"ArrowLeft"===e?r.length-1:0,o="ArrowUp"===e||"ArrowLeft"===e?-1:r.length,i="ArrowUp"===e||"ArrowLeft"===e?-1:1,a="ArrowUp"===e||"ArrowLeft"===e?n.length-1:0,s="ArrowUp"===e||"ArrowLeft"===e?-1:n.length,l="ArrowUp"===e||"ArrowLeft"===e?-1:1;for(let e=t;e!==o;e+=i)for(let t=a;t!==s;t+=l){const r=n[t];if(r&&P(e,r.key))return{row:e,column:r.key}}return null}),[n,r.length,P]),L=c(((e,t,n)=>{o||YX(n.target,n.currentTarget)||(O?P(t,e)&&(E({column:e,row:t}),w.current?.focus()):t>=0&&t<r.length&&v?.({row:r[t],rowIndex:t,event:n}))}),[r,O,P,o,v]),I=c((e=>{if(!YX(e.target,e.currentTarget)){if(t=e.key,WX.includes(t)){const t=C?(()=>{const t=n.findIndex((e=>e.key===C.column));return-1===t?(E(null),null):D(C.row,t,e.key)})():A(e.key);if(!t)return;return e.preventDefault(),void E(t)}var t;C&&g?.({columnKey:C.column,rowIndex:C.row,event:e.nativeEvent})}}),[n,A,D,C,g]),z=c((()=>E(null)),[]),R=c((e=>{const t=e.relatedTarget;t instanceof Node&&w.current?.contains(t)||z()}),[z]),$=i((()=>[w]),[]);return Q({targetElements:$,onClickOutside:z}),e("div",{"data-testid":"table-root",ref:w,tabIndex:O?0:-1,className:`${TX} ${y}`,onBlur:R,onKeyDown:I,children:S.map((n=>{const i=p.includes(n.key);return t(HX,{columnKey:n.key,className:`${AX} ${i?NX:DX} ${b}`,style:{left:i?N[n.key]:"unset"},width:n.width,minWidth:n.minWidth,updateColumnWidth:T,noResizeable:f.includes(n.key),children:[e(HX.Header,{className:_,children:n.header}),o?Array.from({length:a}).map(((t,r)=>{const o=`skeleton-${n.key}-${r}`;return e(HX.Cell,{className:x,"data-skeleton-cell":!0,children:d?d({column:n,rowIndex:r}):e(BX,{})},o)})):r.map(((t,r)=>{const o=C?.column===n.key&&C?.row===r,i=`${n.key}-${r}`;return e(HX.Cell,{focused:o,onClick:e=>L(n.key,r,e),"data-cell-key":i,className:x,children:n.renderCell({row:t,rowIndex:r,isFocused:o,columnKey:n.key})},i)}))]},n.key)}))})};qX.displayName="Table";const UX=a(qX);var ZX={notificationContainer:"Notification-module_notificationContainer__AQGHi",notificationItem:"Notification-module_notificationItem__a97Y1",enter:"Notification-module_enter__QJYI5",exit:"Notification-module_exit__7-eTw",notificationIcon:"Notification-module_notificationIcon__GfxMq",spin:"Notification-module_spin__NnI0P",notificationContent:"Notification-module_notificationContent__dL0yz",notificationMessage:"Notification-module_notificationMessage__9YbKE",notificationDescription:"Notification-module_notificationDescription__1r9AU",notificationAction:"Notification-module_notificationAction__SrLVH",notificationClose:"Notification-module_notificationClose__1xqz9",notificationProgressContainer:"Notification-module_notificationProgressContainer__FXOGc",notificationProgress:"Notification-module_notificationProgress__lWMoZ",notificationPortal:"Notification-module_notificationPortal__hmII4"};function GX({notification:n,onClose:r,stackGap:i,rtl:a,duration:d,style:h,animationDuration:p=300}){const[f,m]=u(!1),[g,v]=u(!1),[y,b]=u(!1),[_,x]=u(0),w=s(null),S=s(null),k=s(null),C=s(0),E=s(!1),M=s(null),{config:P}=n,O=void 0!==P.duration?P.duration:d,T=c((()=>{g||(v(!0),P.onClose?.(),r(n.id),setTimeout((()=>{}),p))}),[P,n.id,r,p]),N=c(((e=!1)=>{if(null===O||O<=0||g)return;const t=e?Math.max(0,O-C.current):O;if(t<=0)return void T();k.current=Date.now()-(e?C.current:0),e||(x(0),C.current=0),w.current=setTimeout((()=>{T()}),t);const n=()=>{if(null===k.current||g)return;const e=Date.now()-k.current,t=Math.min(e/O*100,100);x(t),t<100&&!g&&(S.current=setTimeout(n,16))};S.current=setTimeout(n,16)}),[O,T,g]),D=c(((e=!1)=>{e&&null!==k.current&&(C.current=Date.now()-k.current),w.current&&(clearTimeout(w.current),w.current=null),S.current&&(clearTimeout(S.current),S.current=null),e||(k.current=null,C.current=0,E.current=!1)}),[]),A=c((()=>{P.onClick?.()}),[P]),L=c((()=>{b(!0),D(!0)}),[D]),I=c((()=>{b(!1),!g&&null!==O&&O>0&&N(!0)}),[N,g,O]),z=c((e=>{"Escape"===e.key&&!1!==P.closable&&(e.preventDefault(),T())}),[P.closable,T]);l((()=>{const e=setTimeout((()=>{m(!0)}),10);return()=>clearTimeout(e)}),[]),l((()=>(!f||y||g||E.current||(E.current=!0,N(!1)),()=>D(!1))),[f,y,g]),l((()=>()=>{D(!1)}),[D]);const R=!1!==P.closable,$=`\n ${ZX.notificationItem}\n ${f?ZX.enter:""}\n ${g?ZX.exit:""}\n ${P.className||""}\n `.trim();return t("div",{ref:M,className:$,style:{pointerEvents:"auto",...P.style,...h},onMouseEnter:L,onMouseLeave:I,onClick:A,onKeyDown:z,tabIndex:P.btn?0:-1,role:o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className&&P.icon.props.className.includes("error")?"alert":"status","aria-live":o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className&&P.icon.props.className.includes("error")?"assertive":"polite","data-placement":n.placement,"data-type":(()=>{if(o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className){const e=P.icon.props.className;if(e.includes("success"))return"success";if(e.includes("error"))return"error";if(e.includes("warning"))return"warning";if(e.includes("info"))return"info";if(e.includes("loading"))return"loading"}return"default"})(),"data-rtl":a,children:[P.icon&&e("div",{className:ZX.notificationIcon,children:P.icon}),t("div",{className:ZX.notificationContent,children:[e("div",{className:ZX.notificationMessage,children:P.message}),P.description&&e("div",{className:ZX.notificationDescription,children:P.description}),P.btn&&e("div",{className:ZX.notificationAction,children:P.btn})]}),R&&e("button",{className:ZX.notificationClose,onClick:e=>{e.stopPropagation(),T()},"aria-label":"Close notification",tabIndex:0,children:P.closeIcon||e(Ga,{name:"close",size:"sm"})}),null!==O&&O>0&&e("div",{className:ZX.notificationProgressContainer,children:e("div",{className:ZX.notificationProgress,style:{width:`${_}%`,opacity:y?.3:1}})})]})}const KX=({placement:t,notifications:n,onRemove:r,stackGap:o,rtl:i,duration:a,zIndex:s,top:l,bottom:c,animationDuration:u=300})=>{if(0===n.length)return null;const d=e=>{switch(e){case"topLeft":return"topRight";case"topRight":return"topLeft";case"bottomLeft":return"bottomRight";case"bottomRight":return"bottomLeft";default:return e}};return e("div",{className:`${ZX.notificationContainer} ${ZX[t]}`,style:(()=>{const e={position:"fixed",zIndex:s,display:"flex",flexDirection:"column",gap:o,pointerEvents:"none"};switch(i?d(t):t){case"topLeft":return{...e,top:l,left:24,alignItems:"flex-start"};case"topRight":return{...e,top:l,right:24,alignItems:"flex-end"};case"bottomLeft":return{...e,bottom:c,left:24,alignItems:"flex-start",flexDirection:"column-reverse"};case"bottomRight":return{...e,bottom:c,right:24,alignItems:"flex-end",flexDirection:"column-reverse"};default:return e}})(),children:n.sort(((e,t)=>e.createdAt-t.createdAt)).map(((t,n)=>e(GX,{notification:t,onClose:r,stackGap:o,rtl:i,duration:a,animationDuration:u,style:{zIndex:s+n}},t.id)))})},JX=m(null),QX=({children:n,maxCount:r=5,top:o=24,bottom:a=24,rtl:s=!1,zIndexBase:l=1e3,duration:d=4500,stackGap:h=12,placementDefaults:p={},concurrent:f=!0,animationDuration:m=300})=>{const[g,v]=u([]),y=c(((e,t)=>{const n=e.placement||"topRight",o={id:e.key||`notification-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,config:{...p[n],...e,placement:n},placement:n,instanceId:t,createdAt:Date.now()};v((i=>{if(e.key){const n=i.findIndex((n=>n.config.key===e.key&&n.instanceId===t));if(-1!==n){const e=[...i];return e[n]={...e[n],config:o.config,createdAt:Date.now()},e}}const a=[...i,o],s=a.filter((e=>e.placement===n&&e.instanceId===t));if(s.length>r){const e=s.sort(((e,t)=>e.createdAt-t.createdAt)),t=e.slice(0,s.length-r);return t.forEach((e=>{setTimeout((()=>e.config.onClose?.()),0)})),a.filter((e=>!t.some((t=>t.id===e.id))))}return a}))}),[r,p]),b=c(((e,t)=>{v((n=>n.filter((n=>!(n.id===e&&n.instanceId===t)))))}),[]),_=c(((e,t,n)=>{v((r=>r.map((r=>r.config.key===e&&r.instanceId===n?{...r,config:{...r.config,...t}}:r))))}),[]),x=c(((e,t)=>{v((n=>{if(!e&&!t)return n.forEach((e=>e.config.onClose?.())),[];if(e&&t){const r=n.filter((n=>n.config.key===e&&n.instanceId===t));return r.forEach((e=>e.config.onClose?.())),n.filter((n=>!(n.config.key===e&&n.instanceId===t)))}if(t){const e=n.filter((e=>e.instanceId===t));return e.forEach((e=>e.config.onClose?.())),n.filter((e=>e.instanceId!==t))}if(e){const t=n.filter((t=>t.config.key===e));return t.forEach((e=>e.config.onClose?.())),n.filter((t=>t.config.key!==e))}return n}))}),[]),w=i((()=>({addNotification:y,removeNotification:b,updateNotification:_,destroyNotifications:x})),[y,b,_,x]),S=i((()=>{const e={};return g.forEach((t=>{const n=t.placement;e[n]||(e[n]=[]),e[n].push(t)})),e}),[g]);return t(JX.Provider,{value:w,children:[n,["topLeft","topRight","bottomLeft","bottomRight"].map((t=>{const n=S[t]||[];return 0===n.length?null:e(Gm,{className:ZX.notificationPortal,children:e(KX,{placement:t,notifications:n,onRemove:e=>{const t=n.find((t=>t.id===e));t&&b(e,t.instanceId)},stackGap:h,rtl:s,duration:d,zIndex:l,top:o,bottom:a,animationDuration:m})},t)}))]})},eq=()=>{const t=f(),n=(()=>{const e=p(JX);if(!e)throw new Error("useNotificationContext must be used within NotificationProvider");return e})();return[i((()=>{const r=e=>{n.addNotification(e,t)};return{open:r,info:t=>{r({...t,icon:e(Ga,{name:"help",className:"notification-icon-info"})})},success:t=>{r({...t,icon:e(Ga,{name:"check",className:"notification-icon-success"})})},error:t=>{r({...t,icon:e(Ga,{name:"close",className:"notification-icon-error"})})},warning:t=>{r({...t,icon:e(Ga,{name:"notificationClearAll",className:"notification-icon-warning"})})},loading:t=>{r({...t,icon:e(Ga,{name:"refresh",className:"notification-icon-loading"}),duration:null})},destroy:e=>{n.destroyNotifications(e,t)}}}),[n,t]),c((()=>null),[])]};var tq={inputMinimized:"Array-module_inputMinimized__N3CzD",contentContainer:"Array-module_contentContainer__Nf98X",value:"Array-module_value__X6PGp",buttonsContainer:"Array-module_buttonsContainer__mOaLI",itemButtonWrapper:"Array-module_itemButtonWrapper__zYbaj",itemButton:"Array-module_itemButton__IvXJ4",removeButton:"Array-module_removeButton__nj38e"},nq="String-module_icon__pKB1k",rq="String-module_text__-rE-j",oq="String-module_select__G6d9c",iq="String-module_baseInput__ieBad",aq="String-module_input__sXbRz";var sq=a((({label:t,description:n,value:r,options:o,onChange:i,selectProps:a,inputProps:l,inputContainerClassName:c,iconName:d="formatQuoteClose",...h})=>{const p=s(null),f=s(null),m=s(null),[g,v]=u(!1);return e(pe,{dimensionX:"fill",description:n,forceFocus:g,dropDownRef:m,onFocusChange:e=>(e=>{p?.current?.toggleDropdown(e),v(e),e&&!o&&f.current?.focus()})(e),labelProps:{dimensionX:"hug",divider:!!t?.trim(),prefix:{children:e(Ga,{className:nq,name:d})},root:t?{dimensionX:"hug",children:e(V,{className:rq,size:"medium",children:t})}:void 0},inputContainerProps:{className:`${iq} ${c}`},...h,children:o?e(ng,{selectRef:p,externalDropdownRef:m,disableClick:!0,options:o,value:r,placeholder:"",onChange:e=>{i?.(e),v(!1)},...a,className:`${oq} ${a?.className}`}):e(G,{ref:f,value:r,onChange:e=>i?.(e.target.value),...l,className:`${aq} ${l?.className}`})})})),lq="Number-module_icon__o1inF",cq="Number-module_text__S4l2F",uq="Number-module_select__NRfCp",dq="Number-module_baseInput__uueTo",hq="Number-module_input__m1vMZ";var pq=a((({label:t,description:n,value:r,options:o,onChange:i,selectProps:a,inputProps:l,inputContainerClassName:c,iconName:d="numericBox",...h})=>{const p=s(null),f=s(null),[m,g]=u(!1),v=s(null);return e(pe,{dimensionX:"fill",description:n,forceFocus:m,dropDownRef:v,onFocusChange:e=>(e=>{p?.current?.toggleDropdown(e),g(e),e&&!o&&f.current?.focus()})(e),labelProps:{dimensionX:"hug",divider:!!t?.trim(),prefix:{children:e(Ga,{className:lq,name:d})},root:t?{dimensionX:"hug",children:e(V,{className:cq,size:"medium",children:t})}:void 0},inputContainerProps:{className:`${dq} ${c}`},...h,children:o?e(ng,{selectRef:p,externalDropdownRef:v,disableClick:!0,options:o,value:r,placeholder:"",onChange:e=>{i?.(e),g(!1)},...a,className:`${uq} ${a?.className}`}):e(G,{ref:f,value:r,type:"number",onChange:e=>{const t=e.target.value,n=""===t;i?.(n?void 0:Number(t))},...l,className:`${hq} ${l?.className}`})})})),fq="TextArea-module_container__VXi9C",mq="TextArea-module_titleContainer__l1CD0",gq="TextArea-module_textAreaInput__iYLK4",vq="TextArea-module_description__VEpUG",yq="TextArea-module_icon__iVGeQ";var bq=a((({value:r,title:o="",icon:i,textAreaProps:a,textAreaContainerProps:l,titleContainerProps:c,titlePrefixProps:u,titleRootProps:d,titleSuffixProps:h,containerProps:p,description:f,placeholder:m,onChange:v})=>{const y=s(null);return g(a?.ref??{current:null},(()=>y.current)),t(B,{dimensionX:"fill",alignment:"leftCenter",direction:"vertical",...p,className:`${fq} ${p?.className||""}`,children:[t(n,{children:[(o||i||u||h)&&e(KA,{dimensionX:"fill",dimensionY:36,alignment:"leftCenter",...c,className:`${mq} ${c?.className||""}`,prefix:{children:i?e(Ga,{name:i,className:yq}):null,dimensionX:"hug",alignment:"leftCenter",...u},root:{children:o,dimensionX:"fill",alignment:"leftCenter",...d},suffix:{children:h?.children,dimensionX:"hug",alignment:"rightCenter",...h},onClick:e=>{y.current?.focus();try{c?.onClick?.(e)}catch(e){console.error("Error in titleContainerProps.onClick:",e)}}}),e(B,{dimensionX:"fill",alignment:"leftCenter",...l,className:`${l?.className||""}`,children:e("textarea",{className:gq,value:r,onChange:v,placeholder:m||"",ref:y,...a})})]}),e(V,{size:"xsmall",className:`${vq}`,children:f})]})})),_q="Date-module_text__eXWDJ",xq="Date-module_dateInput__hx3cC",wq="Date-module_stringValueWrapper__XM06v",Sq="Date-module_iconGroup__W1sPW",kq="Date-module_clearIcon__rTC7y",Cq="Date-module_stringValue__eJN9C";var Eq=a((({label:n,description:r,onChange:o,value:i,placeholder:a="",inputContainerClassName:s,datePickerProps:l})=>{const c=e=>{o?.(new Date(e))};return e(pe,{dimensionX:"fill",alignment:"leftCenter",description:r,labelProps:{prefix:{children:e(Ga,{name:"calendarBlank"})},root:{children:e(V,{className:_q,children:n})}},inputContainerProps:{dimensionX:"fill",alignment:"leftCenter",className:`${s} ${xq}`},children:e(TA,{placeholder:a,suffixIcon:null,onChange:c,value:i,renderLabel:n=>t("div",{className:wq,children:[e(CA,{color:"default",className:Cq,children:n}),e("div",{className:Sq,children:e(qS,{className:kq,onClick:()=>c("")})})]}),...l})})})),Mq="Boolean-module_container__RN4yt",Pq="Boolean-module_description__v3iuY";var Oq=a((({checked:n=!1,disabled:r=!1,label:o,containerProps:i,switchContainerProps:a,suffixProps:s,rootProps:l,labelProps:c,description:u,onChange:d,size:h,className:p})=>t(B,{dimensionX:"fill",alignment:"leftCenter",direction:"vertical",className:p||"",children:[e(H,{dimensionY:36,dimensionX:"fill",root:{children:e(FL,{checked:n,disabled:r,...a,onChange:d,size:h}),...l},suffix:{children:o&&e(V,{...c,children:o}),...s},className:`${i?.className} ${Mq}`,...i}),u&&e(V,{size:"xsmall",className:`${Pq}`,children:u})]}))),Tq={baseInput:"Color-module_baseInput__gWvlQ"};var Nq=a((({label:t,description:n,value:r="#000000",labelProps:o,colorContainerProps:i,inputContainerClassName:a,onChange:s,...l})=>e(pe,{dimensionX:"fill",description:n,labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Ga,{className:Tq.icon,name:"invertColors"})},root:{dimensionX:"hug",children:e(V,{className:Tq.text,size:"medium",children:t})},...o},inputContainerProps:{className:`${Tq.baseInput} ${a}`},...l,children:e(om,{dimensionX:"fill",value:r,onChange:e=>{s?.(e)},...i})}))),Dq={container:"Storage-module_container__jdMaj",top:"Storage-module_top__vhJmX",storage:"Storage-module_storage__aXBhd",previewIcon:"Storage-module_previewIcon__zNCCM",text:"Storage-module_text__8eR8V"};function Aq(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const Lq=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Iq(e,t,n){const r=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const n=t.split(".").pop().toLowerCase(),r=Lq.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:o}=e,i="string"==typeof t?t:"string"==typeof o&&o.length>0?o:`./${e.name}`;return"string"!=typeof r.path&&zq(r,"path",i),void 0!==n&&Object.defineProperty(r,"handle",{value:n,writable:!1,configurable:!1,enumerable:!0}),zq(r,"relativePath",i),r}function zq(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Rq=[".DS_Store","Thumbs.db"];function $q(e){return"object"==typeof e&&null!==e}function Fq(e){return e.filter((e=>-1===Rq.indexOf(e.name)))}function jq(e){if(null===e)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Bq(e){if("function"!=typeof e.webkitGetAsEntry)return Wq(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Yq(t):Wq(e,t)}function Hq(e){return e.reduce(((e,t)=>[...e,...Array.isArray(t)?Hq(t):[t]]),[])}function Wq(e,t){return Aq(this,void 0,void 0,(function*(){var n;if(globalThis.isSecureContext&&"function"==typeof e.getAsFileSystemHandle){const t=yield e.getAsFileSystemHandle();if(null===t)throw new Error(`${e} is not a File`);if(void 0!==t){const e=yield t.getFile();return e.handle=t,Iq(e)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Iq(r,null!==(n=null==t?void 0:t.fullPath)&&void 0!==n?n:void 0)}))}function Vq(e){return Aq(this,void 0,void 0,(function*(){return e.isDirectory?Yq(e):function(e){return Aq(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{e.file((n=>{const r=Iq(n,e.fullPath);t(r)}),(e=>{n(e)}))}))}))}(e)}))}function Yq(e){const t=e.createReader();return new Promise(((e,n)=>{const r=[];!function o(){t.readEntries((t=>Aq(this,void 0,void 0,(function*(){if(t.length){const e=Promise.all(t.map(Vq));r.push(e),o()}else try{const t=yield Promise.all(r);e(t)}catch(e){n(e)}}))),(e=>{n(e)}))}()}))}var Xq,qq={};var Uq=(Xq||(Xq=1,qq.__esModule=!0,qq.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(0===n.length)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}),qq),Zq=be(Uq);function Gq(e){return function(e){if(Array.isArray(e))return nU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kq(Object(n),!0).forEach((function(t){Qq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||tU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tU(e,t){if(e){if("string"==typeof e)return nU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nU(e,t):void 0}}function nU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rU="function"==typeof Zq?Zq:Zq.default,oU=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:"file-invalid-type",message:"File type must be ".concat(t)}},iU=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},aU=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},sU={code:"too-many-files",message:"Too many files"};function lU(e,t){var n="application/x-moz-file"===e.type||rU(e,t);return[n,n?null:oU(t)]}function cU(e,t,n){if(uU(e.size))if(uU(t)&&uU(n)){if(e.size>n)return[!1,iU(n)];if(e.size<t)return[!1,aU(t)]}else{if(uU(t)&&e.size<t)return[!1,aU(t)];if(uU(n)&&e.size>n)return[!1,iU(n)]}return[!0,null]}function uU(e){return null!=e}function dU(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function hU(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function pU(e){e.preventDefault()}function fU(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!dU(e)&&t&&t.apply(void 0,[e].concat(r)),dU(e)}))}}function mU(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function gU(e){return/^.*\.[\w]+$/.test(e)}var vU=["children"],yU=["open"],bU=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],_U=["refKey","onChange","onClick"];function xU(e){return function(e){if(Array.isArray(e))return kU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||SU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||SU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SU(e,t){if(e){if("string"==typeof e)return kU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kU(e,t):void 0}}function kU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function CU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function EU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CU(Object(n),!0).forEach((function(t){MU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function MU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var OU=h((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=EU(EU({},TU),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,u=t.minSize,d=t.multiple,h=t.maxFiles,p=t.onDragEnter,f=t.onDragLeave,m=t.onDragOver,g=t.onDrop,v=t.onDropAccepted,y=t.onDropRejected,b=t.onFileDialogCancel,_=t.onFileDialogOpen,x=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,C=t.noClick,E=t.noKeyboard,M=t.noDrag,P=t.noDragEventsBubbling,O=t.onError,T=t.validator,N=i((function(){return function(e){if(uU(e))return Object.entries(e).reduce((function(e,t){var n=eU(t,2),r=n[0],o=n[1];return[].concat(Gq(e),[r],Gq(o))}),[]).filter((function(e){return mU(e)||gU(e)})).join(",")}(n)}),[n]),D=i((function(){return function(e){return uU(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=eU(e,2),n=t[0],r=t[1],o=!0;return mU(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(gU)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=eU(t,2),r=n[0],o=n[1];return Jq(Jq({},e),{},Qq({},r,o))}),{})}]:e}(n)}),[n]),A=i((function(){return"function"==typeof _?_:LU}),[_]),L=i((function(){return"function"==typeof b?b:LU}),[b]),I=s(null),z=s(null),R=wU(k(AU,DU),2),$=R[0],F=R[1],j=$.isFocused,B=$.isFileDialogActive,H=s("undefined"!=typeof window&&window.isSecureContext&&x&&"showOpenFilePicker"in window),W=function(){!H.current&&B&&setTimeout((function(){z.current&&(z.current.files.length||(F({type:"closeDialog"}),L()))}),300)};l((function(){return window.addEventListener("focus",W,!1),function(){window.removeEventListener("focus",W,!1)}}),[z,B,L,H]);var V=s([]),Y=function(e){I.current&&I.current.contains(e.target)||(e.preventDefault(),V.current=[])};l((function(){return S&&(document.addEventListener("dragover",pU,!1),document.addEventListener("drop",Y,!1)),function(){S&&(document.removeEventListener("dragover",pU),document.removeEventListener("drop",Y))}}),[I,S]),l((function(){return!r&&w&&I.current&&I.current.focus(),function(){}}),[I,w,r]);var X=c((function(e){O?O(e):console.error(e)}),[O]),q=c((function(e){e.preventDefault(),e.persist(),ae(e),V.current=[].concat(xU(V.current),[e.target]),hU(e)&&Promise.resolve(o(e)).then((function(t){if(!dU(e)||P){var n=t.length,r=n>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=eU(lU(e,n),1)[0],i=eU(cU(e,r,o),1)[0],a=s?s(e):null;return t&&i&&!a}))}({files:t,accept:N,minSize:u,maxSize:a,multiple:d,maxFiles:h,validator:T});F({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),p&&p(e)}})).catch((function(e){return X(e)}))}),[o,p,X,P,N,u,a,d,h,T]),U=c((function(e){e.preventDefault(),e.persist(),ae(e);var t=hU(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&m&&m(e),!1}),[m,P]),Z=c((function(e){e.preventDefault(),e.persist(),ae(e);var t=V.current.filter((function(e){return I.current&&I.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),V.current=t,t.length>0||(F({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),hU(e)&&f&&f(e))}),[I,f,P]),G=c((function(e,t){var n=[],r=[];e.forEach((function(e){var t=wU(lU(e,N),2),o=t[0],i=t[1],s=wU(cU(e,u,a),2),l=s[0],c=s[1],d=T?T(e):null;if(o&&l&&!d)n.push(e);else{var h=[i,c];d&&(h=h.concat(d)),r.push({file:e,errors:h.filter((function(e){return e}))})}})),(!d&&n.length>1||d&&h>=1&&n.length>h)&&(n.forEach((function(e){r.push({file:e,errors:[sU]})})),n.splice(0)),F({acceptedFiles:n,fileRejections:r,isDragReject:r.length>0,type:"setFiles"}),g&&g(n,r,t),r.length>0&&y&&y(r,t),n.length>0&&v&&v(n,t)}),[F,d,N,u,a,h,g,v,y,T]),K=c((function(e){e.preventDefault(),e.persist(),ae(e),V.current=[],hU(e)&&Promise.resolve(o(e)).then((function(t){dU(e)&&!P||G(t,e)})).catch((function(e){return X(e)})),F({type:"reset"})}),[o,G,X,P]),J=c((function(){if(H.current){F({type:"openDialog"}),A();var e={multiple:d,types:D};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){G(e,null),F({type:"closeDialog"})})).catch((function(e){!function(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}(e)?!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?X(e):(H.current=!1,z.current?(z.current.value=null,z.current.click()):X(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):(L(e),F({type:"closeDialog"}))}))}else z.current&&(F({type:"openDialog"}),A(),z.current.value=null,z.current.click())}),[F,A,L,x,G,X,D,d]),Q=c((function(e){I.current&&I.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),J()))}),[I,J]),ee=c((function(){F({type:"focus"})}),[]),te=c((function(){F({type:"blur"})}),[]),ne=c((function(){C||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?J():setTimeout(J,0))}),[C,J]),re=function(e){return r?null:e},oe=function(e){return E?null:re(e)},ie=function(e){return M?null:re(e)},ae=function(e){P&&e.stopPropagation()},se=i((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,h=e.onDrop,p=PU(e,bU);return EU(EU(MU({onKeyDown:oe(fU(i,Q)),onFocus:oe(fU(a,ee)),onBlur:oe(fU(s,te)),onClick:re(fU(l,ne)),onDragEnter:ie(fU(c,q)),onDragOver:ie(fU(u,U)),onDragLeave:ie(fU(d,Z)),onDrop:ie(fU(h,K)),role:"string"==typeof o&&""!==o?o:"presentation"},n,I),r||E?{}:{tabIndex:0}),p)}}),[I,Q,ee,te,ne,q,U,Z,K,E,M,r]),le=c((function(e){e.stopPropagation()}),[]),ce=i((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=PU(e,_U);return EU(EU({},MU({accept:N,multiple:d,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:re(fU(r,K)),onClick:re(fU(o,le)),tabIndex:-1},n,z)),i)}}),[z,n,d,K,r]);return EU(EU({},$),{},{isFocused:j&&!r,getRootProps:se,getInputProps:ce,rootRef:I,inputRef:z,open:re(J)})}(PU(e,vU)),a=r.open,u=PU(r,yU);return g(t,(function(){return{open:a}}),[a]),o.createElement(_,null,n(EU(EU({},u),{},{open:a})))}));OU.displayName="Dropzone";var TU={disabled:!1,getFilesFromEvent:function(e){return Aq(this,void 0,void 0,(function*(){return $q(e)&&$q(e.dataTransfer)?function(e,t){return Aq(this,void 0,void 0,(function*(){if(e.items){const n=jq(e.items).filter((e=>"file"===e.kind));if("drop"!==t)return n;return Fq(Hq(yield Promise.all(n.map(Bq))))}return Fq(jq(e.files).map((e=>Iq(e))))}))}(e.dataTransfer,e.type):function(e){return $q(e)&&$q(e.target)}(e)?function(e){return jq(e.target.files).map((e=>Iq(e)))}(e):Array.isArray(e)&&e.every((e=>"getFile"in e&&"function"==typeof e.getFile))?function(e){return Aq(this,void 0,void 0,(function*(){const t=yield Promise.all(e.map((e=>e.getFile())));return t.map((e=>Iq(e)))}))}(e):[]}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};OU.defaultProps=TU,OU.propTypes={children:Ze.func,accept:Ze.objectOf(Ze.arrayOf(Ze.string)),multiple:Ze.bool,preventDropOnDocument:Ze.bool,noClick:Ze.bool,noKeyboard:Ze.bool,noDrag:Ze.bool,noDragEventsBubbling:Ze.bool,minSize:Ze.number,maxSize:Ze.number,maxFiles:Ze.number,disabled:Ze.bool,getFilesFromEvent:Ze.func,onFileDialogCancel:Ze.func,onFileDialogOpen:Ze.func,useFsAccessApi:Ze.bool,autoFocus:Ze.bool,onDragEnter:Ze.func,onDragLeave:Ze.func,onDragOver:Ze.func,onDrop:Ze.func,onDropAccepted:Ze.func,onDropRejected:Ze.func,onError:Ze.func,validator:Ze.func};var NU=OU,DU={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function AU(e,t){switch(t.type){case"focus":return EU(EU({},e),{},{isFocused:!0});case"blur":return EU(EU({},e),{},{isFocused:!1});case"openDialog":return EU(EU({},DU),{},{isFileDialogActive:!0});case"closeDialog":return EU(EU({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return EU(EU({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return EU(EU({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return EU({},DU);default:return e}}function LU(){}var IU=a((({file:r,label:o,containerProps:i,topContainerProps:a,dropzoneContainerProps:s,description:l,errorMessage:c,helperTextContainerProps:u,helperTextProps:d,onClickShowFileSelect:h,onUpload:p,onDelete:f,onPreview:m})=>{const g={position:"absolute",height:"100%",width:"100%",objectFit:"contain"},v=AL({file:r,styles:{img:g,embed:g}});return t(B,{direction:"vertical",dimensionX:"fill",dimensionY:472,alignment:"top",gap:10,className:`${i?.className}`,children:[t(B,{direction:"vertical",dimensionX:"fill",gap:10,className:`${i?.className} ${Dq.container}`,children:[e(KA,{prefix:{children:e(Ga,{name:"storage",className:Dq.icon})},root:{children:e(V,{variant:"secondary",children:o})},suffix:{children:a?.hideActions?null:t(n,{children:[e(xs,{variant:"icon",onClick:h,disabled:a?.disableEditIcon,children:a?.editIcon||e(Ga,{name:"pencil"})}),e(xs,{variant:"icon",color:"danger",onClick:e=>{f?.(e)},disabled:a?.disableDeleteIcon,children:a?.deleteIcon||e(Ga,{name:"delete"})})]}),gap:0,...a?.suffix},...a?.container}),e(NU,{multiple:!1,onDrop:e=>{e.length&&p?.(e[0])},children:({getRootProps:o,getInputProps:i})=>e(B,{className:`${s?.container?.className} ${Dq.storage}`,alignment:"center",dimensionX:"fill",dimensionY:407,direction:"vertical",gap:10,...o(),...s?.container,onClick:e=>{r?.url?m?.():h?.()},children:t(n,{children:[t(n,r?{children:[v,e(Ga,{name:s?.previewIcon||"filterCenterFocus",size:32,className:Dq.previewIcon})]}:{children:[e(Ga,{name:s?.uploadIcon||"storage",size:80}),e(V,{className:Dq.text,children:s?.description||t("span",{children:["Upload your file or ",e("br",{})," pick an file from storage"]})})]}),e("input",{...i()})]})})})]}),(c||l)&&e(se.HelperText,{alignment:"leftCenter",dimensionX:"fill",...u,className:`${Dq.helperText} ${u?.className}`,children:e(V,{...d,size:"small",variant:c?"danger":"secondary",className:`${d?.className}`,children:c||l})})]})})),zU="MultipleSelection-module_icon__ewhbs",RU="MultipleSelection-module_text__G5mEr",$U="MultipleSelection-module_select__YXbPL",FU="MultipleSelection-module_baseInput__eUWHB";var jU=a((({label:t,description:n,value:r=[],options:o,onChange:i,selectProps:a,inputContainerClassName:l,...c})=>{const d=s(null),[h,p]=u(!1),f=s(null);return e(pe,{dimensionX:"fill",description:n,dropDownRef:f,forceFocus:h,onFocusChange:e=>(e=>{d?.current?.toggleDropdown(e),p(e)})(e),labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Ga,{className:zU,name:"formatListChecks"})},root:{dimensionX:"hug",children:e(V,{className:RU,size:"medium",children:t})}},inputContainerProps:{className:`${FU} ${l}`},...c,children:e(ng,{selectRef:d,externalDropdownRef:f,disableClick:!0,options:o||[],value:r,placeholder:"",multiple:!0,onChange:e=>{i?.(e)},...a,className:`${$U} ${a?.className}`})})})),BU="Location-module_location__ix8Fi",HU="Location-module_icon__a3NfC",WU="Location-module_mapMarker__J3aE2",VU="Location-module_description__mG0kX";var YU=a((({coordinates:n,title:r,onChange:o,description:i,...a})=>t(B,{dimensionX:500,dimensionY:500,gap:10,direction:"vertical",alignment:"leftCenter",...a,className:`${a.className} ${BU}`,children:[e(KA,{prefix:{children:e(Ga,{name:"mapMarker",className:HU})},root:{children:e(V,{variant:"secondary",children:r})}}),e(_L,{coordinates:n,markerIcon:{icon:e(Ga,{name:"mapMarker",size:"lg",className:WU})},onChange:o}),e(V,{size:"xsmall",className:`${VU}`,children:i})]}))),XU="RichText-module_container__MIFsF",qU="RichText-module_description__-uZpI";const UU={},ZU={},GU={},KU={},JU={},QU={},eZ={},tZ={},nZ={},rZ={},oZ={},iZ={},aZ={},sZ={},lZ={},cZ={},uZ={},dZ={},hZ={},pZ={},fZ={},mZ={},gZ={},vZ={},yZ={},bZ={},_Z={},xZ={},wZ={},SZ={},kZ={},CZ={},EZ={},MZ={},PZ={},OZ={},TZ={},NZ={},DZ={},AZ={},LZ={},IZ={},zZ={},RZ={},$Z={},FZ="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,jZ=FZ&&"documentMode"in document?document.documentMode:null,BZ=FZ&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),HZ=FZ&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),WZ=!(!FZ||!("InputEvent"in window)||jZ)&&"getTargetRanges"in new window.InputEvent("input"),VZ=FZ&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),YZ=FZ&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,XZ=FZ&&/Android/.test(navigator.userAgent),qZ=FZ&&/^(?=.*Chrome).*/i.test(navigator.userAgent),UZ=FZ&&XZ&&qZ,ZZ=FZ&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!qZ,GZ=0,KZ=1,JZ=2,QZ=1,eG=2,tG=3,nG=4,rG=5,oG=6,iG=VZ||YZ||ZZ?" ":"​",aG="\n\n",sG=HZ?" ":iG,lG="֑-߿יִ-﷽ﹰ-ﻼ",cG="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",uG=new RegExp("^[^"+cG+"]*["+lG+"]"),dG=new RegExp("^[^"+lG+"]*["+cG+"]"),hG={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},pG={directionless:1,unmergeable:2},fG={center:2,end:6,justify:4,left:1,right:3,start:5},mG={[eG]:"center",[oG]:"end",[nG]:"justify",[QZ]:"left",[tG]:"right",[rG]:"start"},gG={normal:0,segmented:2,token:1},vG={[GZ]:"normal",[JZ]:"segmented",[KZ]:"token"};var yG=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function bG(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let _G=!1,xG=0;function wG(e){xG=e.timeStamp}function SG(e,t,n){const r="BR"===e.nodeName,o=t.__lexicalLineBreak;return o&&(e===o||r&&e.previousSibling===o)||r&&void 0!==JG(e,n)}function kG(e,t,n){const r=$K(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&hK(t,a,o,i,!1)}function CG(e,t,n){if(zQ(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return WG(t)&&n.isAttached()}function EG(e,t,n,r){for(let o=e;o&&!JK(o);o=PK(o)){const e=JG(o,t);if(void 0!==e){const t=GG(e,n);if(t)return L0(t)||!jK(o)?void 0:[o,t]}else if(o===r)return[r,rK(n)]}}function MG(e,t,n){_G=!0;const r=performance.now()-xG>100;try{M0(e,(()=>{const o=GQ()||function(e){return e.getEditorState().read((()=>{const e=GQ();return null!==e?e.clone():null}))}(e),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],h=d.type,p=d.target,f=EG(p,e,s,a);if(!f)continue;const[m,g]=f;if("characterData"===h)r&&CQ(g)&&WG(p)&&CG(o,p,g)&&kG(p,g,e);else if("childList"===h){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=KG(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&!SG(r,i,e)){if(HZ){const e=(jK(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];(SG(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&i.set(m,g)}}}if(i.size>0)for(const[t,n]of i)n.reconcileObservedMutation(t,e);const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||SG(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,oK(o)),HZ&&kK(e)&&o.insertRawText(u))}))}finally{_G=!1}}function PG(e){const t=e._observer;null!==t&&MG(e,t.takeRecords(),t)}function OG(e){!function(e){0===xG&&DK(e).addEventListener("textInput",wG,!0)}(e),e._observer=new MutationObserver(((t,n)=>{MG(e,t,n)}))}function TG(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function NG(e,t){const n=e.mergeWithSibling(t),r=f0()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function DG(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&CQ(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(TG(t,r)){r=NG(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&CQ(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(TG(r,n)){r=NG(r,n);break}break}n.remove()}}else r.remove()}function AG(e){return LG(e.anchor),LG(e.focus),e}function LG(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),CQ(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!N0(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let IG=1;const zG="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function RG(e){const t=document.activeElement;if(!jK(t))return!1;const n=t.nodeName;return L0(QG(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==BG(t))}function $G(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!RG(t)&&jG(t)===e}catch(e){return!1}}function FG(e){return e instanceof U0}function jG(e){let t=e;for(;null!=t;){const e=BG(t);if(FG(e))return e;t=PK(t)}return null}function BG(e){return e?e.__lexicalEditor:null}function HG(e){return e.isToken()||e.isSegmented()}function WG(e){return BK(e)&&3===e.nodeType}function VG(e){let t=e;for(;null!=t;){if(WG(t))return t;t=t.firstChild}return null}function YG(e,t,n){const r=hG[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~hG.superscript:"superscript"===t?o&=~hG.subscript:"lowercase"===t?(o&=~hG.uppercase,o&=~hG.capitalize):"uppercase"===t?(o&=~hG.lowercase,o&=~hG.capitalize):"capitalize"===t&&(o&=~hG.lowercase,o&=~hG.uppercase),o}function XG(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function qG(e){h0();const t=e.getLatest(),n=t.__parent,r=p0(),o=f0(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,N0(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function UG(e){d0();const t=f0(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=GG(n);null!==e&&e.getWritable()}if(null!==e){const t=GG(e);null!==t&&t.getWritable()}}}function ZG(){return u0()?null:f0()._compositionKey}function GG(e,t){const n=(t||p0())._nodeMap.get(e);return void 0===n?null:n}function KG(e,t){const n=JG(e,f0());return void 0!==n?GG(n,t):null}function JG(e,t){return e[`__lexicalKey_${t._key}`]}function QG(e,t){let n=e;for(;null!=n;){const e=KG(n,t);if(null!==e)return e;n=PK(n)}return null}function eK(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function tK(e){return e.read((()=>nK().getTextContent()))}function nK(){return rK(p0())}function rK(e){return e._nodeMap.get("root")}function oK(e){d0();const t=p0();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function iK(e){const t=f0(),n=function(e,t){let n=e;for(;null!=n;){const e=JG(n,t);if(void 0!==e)return e;n=PK(n)}return null}(e,t);return null===n?e===t.getRootElement()?GG("root"):null:GG(n)}function aK(e,t){return t?e.getTextContentSize():0}function sK(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function lK(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function cK(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function uK(e){return WG(e)?e.nodeValue:null}function dK(e,t,n){const r=$K(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=uK(o);const r=QG(o);if(null!==t&&CQ(r)){if(t===iG&&n){const e=n.length;t=n,i=e,a=e}null!==t&&hK(r,t,i,a,e)}}}function hK(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===iG&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(UG(null),VZ||YZ||ZZ)i.remove();else{const e=f0();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const t=i.getParent(),o=KQ(),l=i.getTextContentSize(),c=ZG(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||zQ(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const d=GQ();if(!zQ(d)||null===n||null===r)return void i.setTextContent(s);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=kQ(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function pK(e){return"ArrowLeft"===e}function fK(e){return"ArrowRight"===e}function mK(e,t){return BZ?e:t}function gK(e){return"Enter"===e}function vK(e){return"Backspace"===e}function yK(e){return"Delete"===e}function bK(e,t,n){return"a"===e.toLowerCase()&&mK(t,n)}function _K(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=bG(o);return n[t]=e,e}return o}function xK(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&yG(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(a,d?"updated":o)}function wK(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function SK(e,t){const n=e.offset;if("element"===e.type)return wK(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?wK(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function kK(e){const t=DK(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function CK(e,t,n){return k0(e,t,n)}function EK(e){return!z0(e)&&!e.isLastChild()&&!e.isInline()}function MK(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&yG(75,t),n}function PK(e){const t=e.assignedSlot||e.parentElement;return HK(t)?t.host:t}function OK(e){return function(e){return BK(e)&&9===e.nodeType}(e)?e:jK(e)?e.ownerDocument:null}function TK(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function NK(e){const t=OK(e);return t?t.defaultView:null}function DK(e){const t=e._window;return null===t&&yG(78),t}function AK(e){return z0(e)||N0(e)&&e.isShadowRoot()}function LK(e){const t=f0(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&yG(200,e.constructor.name,n);const{replace:o,replaceWithKlass:i}=r;if(null!==o){const t=o(e),r=t.constructor;return null!==i?t instanceof i||yG(201,i.name,i.getType(),r.name,r.getType(),e.constructor.name,n):t instanceof e.constructor&&r!==e.constructor||yG(202,r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&yG(203,e.constructor.name,n,r.name,r.getType()),t}return e}function IK(e,t){!z0(e.getParent())||N0(t)||L0(t)||yG(99)}function zK(e){return(L0(e)||N0(e)&&!e.canBeEmpty())&&!e.isInline()}function RK(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function $K(e){return FZ?(e||window).getSelection():null}function FK(e){return jK(e)&&"A"===e.tagName}function jK(e){return BK(e)&&1===e.nodeType}function BK(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function HK(e){return BK(e)&&11===e.nodeType}function WK(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function VK(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function YK(e){if(L0(e)&&!e.isInline())return!0;if(!N0(e)||AK(e))return!1;const t=e.getFirstChild(),n=null===t||sQ(t)||CQ(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function XK(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const qK=new WeakMap,UK=new Map;function ZK(e){if(!e._readOnly&&e.isEmpty())return UK;e._readOnly||yG(192);let t=qK.get(e);return t||(t=function(e){const t=new Map;for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}return t}(e),qK.set(e,t)),t}function GK(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function KK(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function JK(e){return!0===e.__lexicalUnmanaged}function QK(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(N0(a)&&QK(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let eJ,tJ,nJ,rJ,oJ,iJ,aJ,sJ,lJ,cJ,uJ="",dJ="",hJ=null,pJ="",fJ="",mJ=!1,gJ=!1,vJ=null;function yJ(e,t){const n=aJ.get(e);if(null!==t){const n=AJ(e);n.parentNode===t&&t.removeChild(n)}if(sJ.has(e)||tJ._keyToDOMMap.delete(e),N0(n)){const e=OJ(n,aJ);bJ(e,0,e.length-1,null)}void 0!==n&&xK(cJ,nJ,rJ,n,"destroyed")}function bJ(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&yJ(t,r)}}function _J(e,t){e.setProperty("text-align",t)}const xJ="40px";function wJ(e,t){const n=eJ.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||xJ;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function SJ(e,t){const n=e.style;0===t?_J(n,""):1===t?_J(n,"left"):2===t?_J(n,"center"):3===t?_J(n,"right"):4===t?_J(n,"justify"):5===t?_J(n,"start"):6===t&&_J(n,"end")}function kJ(e,t){const n=sJ.get(e);void 0===n&&yG(60);const r=n.createDOM(eJ,tJ);if(function(e,t,n){const r=n._keyToDOMMap;(function(e,t,n){e[`__lexicalKey_${t._key}`]=n})(t,n,e),r.set(e,t)}(e,r,tJ),CQ(n)?r.setAttribute("data-lexical-text","true"):L0(n)&&r.setAttribute("data-lexical-decorator","true"),N0(n)){const e=n.__indent,t=n.__size;if(0!==e&&wJ(r,e),0!==t){const e=t-1;!function(e,t,n,r){const o=dJ;dJ="",CJ(e,n,0,t,n.getDOMSlot(r)),PJ(n,r),dJ=o}(OJ(n,sJ),e,n,r)}const o=n.__format;0!==o&&SJ(r,o),n.isInline()||MJ(null,n,r),EK(n)&&(uJ+=aG,fJ+=aG)}else{const t=n.getTextContent();if(L0(n)){const t=n.decorate(tJ,eJ);null!==t&&NJ(e,t),r.contentEditable="false"}else CQ(n)&&(n.isDirectionless()||(dJ+=t));uJ+=t,fJ+=t}return null!==t&&t.insertChild(r),xK(cJ,nJ,rJ,n,"created"),r}function CJ(e,t,n,r,o){const i=uJ;uJ="";let a=n;for(;a<=r;++a){kJ(e[a],o);const t=sJ.get(e[a]);null!==t&&CQ(t)&&(null===hJ&&(hJ=t.getFormat()),""===pJ&&(pJ=t.getStyle()))}EK(t)&&(uJ+=aG),o.element.__lexicalTextContent=uJ,uJ=i+uJ}function EJ(e,t){if(e){const n=e.__last;if(n){const e=t.get(n);if(e)return sQ(e)?"line-break":L0(e)&&e.isInline()?"decorator":null}return"empty"}return null}function MJ(e,t,n){const r=EJ(e,aJ),o=EJ(t,sJ);r!==o&&t.getDOMSlot(n).setManagedLineBreak(o)}function PJ(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==dJ||r!==vJ){const n=""===dJ,i=n?vJ:(o=dJ,uG.test(o)?"rtl":dG.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=eJ.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=bG(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=bG(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}gJ||(e.getWritable().__dir=i)}vJ=i,t.__lexicalDirTextContent=dJ,t.__lexicalDir=i}var o}function OJ(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&yG(101),n.push(r),r=e.__next}return n}function TJ(e,t){const n=aJ.get(e);let r=sJ.get(e);void 0!==n&&void 0!==r||yG(61);const o=mJ||iJ.has(e)||oJ.has(e),i=MK(tJ,e);if(n===r&&!o){if(N0(n)){const e=i.__lexicalTextContent;void 0!==e&&(uJ+=e,fJ+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(dJ+=t)}else{const e=n.getTextContent();CQ(n)&&!n.isDirectionless()&&(dJ+=e),fJ+=e,uJ+=e}return i}if(n!==r&&o&&xK(cJ,nJ,rJ,r,"updated"),r.updateDOM(n,i,eJ)){const n=kJ(e,null);return null===t&&yG(62),t.replaceChild(n,i),yJ(e,null),n}if(N0(n)&&N0(r)){const e=r.__indent;e!==n.__indent&&wJ(i,e);const t=r.__format;t!==n.__format&&SJ(i,t),o&&(function(e,t,n){const r=dJ;var o;dJ="",hJ=null,pJ="",function(e,t,n){const r=uJ,o=e.__size,i=t.__size;uJ="";const a=n.element;if(1===o&&1===i){const n=e.__first,r=t.__first;if(n===r)TJ(n,a);else{const e=AJ(n),t=kJ(r,null);try{a.replaceChild(t,e)}catch(o){if("object"==typeof o&&null!=o){const i=`${o.toString()} Parent: ${a.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw new Error(i)}throw o}yJ(n,null)}const i=sJ.get(r);CQ(i)&&(null===hJ&&(hJ=i.getFormat()),""===pJ&&(pJ=i.getStyle()))}else{const r=OJ(e,aJ),s=OJ(t,sJ);if(r.length!==o&&yG(227),s.length!==i&&yG(228),0===o)0!==i&&CJ(s,t,0,i-1,n);else if(0===i){if(0!==o){const e=null==n.after&&null==n.before&&null==n.element.__lexicalLineBreak;bJ(r,0,o-1,e?null:a),e&&(a.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.getFirstChild(),d=0,h=0;for(;d<=a&&h<=s;){const e=t[d],r=n[h];if(e===r)u=DJ(TJ(r,i.element)),d++,h++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=MK(tJ,r);e===u?u=DJ(TJ(r,i.element)):(i.withBefore(u).insertChild(e),TJ(r,i.element)),d++,h++}else kJ(r,i.withBefore(u)),h++;else u=DJ(AJ(e)),yJ(e,i.element),d++}const o=sJ.get(r);null!==o&&CQ(o)&&(null===hJ&&(hJ=o.getFormat()),""===pJ&&(pJ=o.getStyle()))}const p=d>a,f=h>s;if(p&&!f){const t=n[s+1],r=void 0===t?null:tJ.getElementByKey(t);CJ(n,e,h,s,i.withBefore(r))}else f&&!p&&bJ(t,d,a,i.element)}(t,r,s,o,i,n)}EK(t)&&(uJ+=aG),a.__lexicalTextContent=uJ,uJ=r+uJ}(e,t,t.getDOMSlot(n)),PJ(t,n),o=t,null==hJ||hJ===o.__textFormat||gJ||(o.setTextFormat(hJ),o.setTextStyle(pJ)),function(e){""===pJ||pJ===e.__textStyle||gJ||e.setTextStyle(pJ)}(t),dJ=r}(n,r,i),z0(r)||r.isInline()||MJ(n,r,i)),EK(r)&&(uJ+=aG,fJ+=aG)}else{const t=r.getTextContent();if(L0(r)){const t=r.decorate(tJ,eJ);null!==t&&NJ(e,t)}else CQ(r)&&!r.isDirectionless()&&(dJ+=t);uJ+=t,fJ+=t}if(!gJ&&z0(r)&&r.__cachedText!==fJ){const e=r.getWritable();e.__cachedText=fJ,r=e}return i}function NJ(e,t){let n=tJ._pendingDecorators;const r=tJ._decorators;if(null===n){if(r[e]===t)return;n=eK(tJ)}n[e]=t}function DJ(e){let t=e.nextSibling;return null!==t&&t===tJ._blockCursorElement&&(t=t.nextSibling),t}function AJ(e){const t=lJ.get(e);return void 0===t&&yG(75,e),t}const LJ=Object.freeze({}),IJ=[["keydown",function(e,t){if(zJ=e.timeStamp,RJ=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;if(!CK(t,lZ,e)&&null!=n){if(function(e,t,n,r){return fK(e)&&!t&&!r&&!n}(n,o,a,i))CK(t,cZ,e);else if(function(e,t,n,r,o){return fK(e)&&!r&&!n&&(t||o)}(n,o,r,a,i))CK(t,uZ,e);else if(function(e,t,n,r){return pK(e)&&!t&&!r&&!n}(n,o,a,i))CK(t,dZ,e);else if(function(e,t,n,r,o){return pK(e)&&!r&&!n&&(t||o)}(n,o,r,a,i))CK(t,hZ,e);else if(function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i))CK(t,pZ,e);else if(function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i))CK(t,fZ,e);else if(function(e,t){return gK(e)&&t}(n,r))WJ=!0,CK(t,mZ,e);else if(function(e){return" "===e}(n))CK(t,gZ,e);else if(function(e,t){return BZ&&t&&"o"===e.toLowerCase()}(n,o))e.preventDefault(),WJ=!0,CK(t,JU,!0);else if(function(e,t){return gK(e)&&!t}(n,r))WJ=!1,CK(t,mZ,e);else if(function(e,t,n,r){return BZ?!t&&!n&&(vK(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&vK(e)}(n,a,i,o))vK(n)?CK(t,vZ,e):(e.preventDefault(),CK(t,KU,!0));else if(function(e){return"Escape"===e}(n))CK(t,yZ,e);else if(function(e,t,n,r,o){return BZ?!(n||r||o)&&(yK(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&yK(e)}(n,o,r,a,i))yK(n)?CK(t,bZ,e):(e.preventDefault(),CK(t,KU,!1));else if(function(e,t,n){return vK(e)&&(BZ?t:n)}(n,a,o))e.preventDefault(),CK(t,rZ,!0);else if(function(e,t,n){return yK(e)&&(BZ?t:n)}(n,a,o))e.preventDefault(),CK(t,rZ,!1);else if(function(e,t){return BZ&&t&&vK(e)}(n,i))e.preventDefault(),CK(t,oZ,!0);else if(function(e,t){return BZ&&t&&yK(e)}(n,i))e.preventDefault(),CK(t,oZ,!1);else if(function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&mK(n,r)}(n,a,i,o))e.preventDefault(),CK(t,iZ,"bold");else if(function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&mK(n,r)}(n,a,i,o))e.preventDefault(),CK(t,iZ,"underline");else if(function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&mK(n,r)}(n,a,i,o))e.preventDefault(),CK(t,iZ,"italic");else if(function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i))CK(t,_Z,e);else if(function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&mK(n,r)}(n,r,i,o))e.preventDefault(),CK(t,aZ,void 0);else if(function(e,t,n,r){return BZ?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o))e.preventDefault(),CK(t,sZ,void 0);else{const a=t._editorState._selection;null===a||zQ(a)?!HZ&&bK(n,i,o)&&(e.preventDefault(),CK(t,NZ,e)):function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(BZ?n:r)}(n,r,i,o)?(e.preventDefault(),CK(t,OZ,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(BZ?n:r)}(n,r,i,o)?(e.preventDefault(),CK(t,TZ,e)):bK(n,i,o)&&(e.preventDefault(),CK(t,NZ,e))}(function(e,t,n,r){return e||t||n||r})(o,r,a,i)&&CK(t,$Z,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;BK(n)&&"touch"!==r&&0===e.button&&M0(t,(()=>{L0(QG(n))||(HJ=!0)}))}],["compositionstart",function(e,t){M0(t,(()=>{const n=GQ();if(zQ(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();UG(r.key),(e.timeStamp<zJ+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||CQ(o)&&o.getStyle()!==n.style)&&CK(t,eZ,sG)}}))}],["compositionend",function(e,t){HZ?VJ=!0:M0(t,(()=>{GJ(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),M0(t,(()=>{const n=GQ(),r=e.data,o=ZJ(e);if(null!=r&&zQ(n)&&XJ(n,o,r,e.timeStamp,!1)){VJ&&(GJ(t,r),VJ=!1);const o=n.anchor.getNode(),i=$K(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;WZ&&!n.isCollapsed()&&CQ(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===uK(i.anchorNode)||CK(t,eZ,r);const c=r.length;HZ&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),VZ||YZ||ZZ||!t.isComposing()||(zJ=0,UG(null))}else dK(!1,t,null!==r?r:void 0),VJ&&(GJ(t,r||void 0),VJ=!1);d0(),PG(f0())})),FJ=null}],["click",function(e,t){M0(t,(()=>{const n=GQ(),r=$K(t._window),o=KQ();if(r)if(zQ(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!z0(i)&&1===nK().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3!==e.detail||n.isCollapsed()||i!==n.focus.getNode()&&(N0(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;(jK(n)||WG(n))&&oK(ZQ(o,r,t,e))}CK(t,GU,e)}))}],["cut",LJ],["copy",LJ],["dragstart",LJ],["dragover",LJ],["dragend",LJ],["paste",LJ],["focus",LJ],["blur",LJ],["drop",LJ]];WZ&&IJ.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=ZJ(e);"deleteCompositionText"===n||HZ&&kK(t)||"insertCompositionText"!==n&&M0(t,(()=>{const o=GQ();if("deleteContentBackward"===n){if(null===o){const e=KQ();if(!zQ(e))return;oK(e.clone())}if(zQ(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===RJ&&i<zJ+30&&t.isComposing()&&n){if(UG(null),zJ=0,setTimeout((()=>{M0(t,(()=>{UG(null)}))}),30),zQ(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),CQ(e)||yG(142),o.style=e.getStyle()}}else{UG(null),e.preventDefault();const r=o.anchor.getNode(),i=r.getTextContent(),a=r.canInsertTextAfter(),s=0===o.anchor.offset&&o.focus.offset===i.length;UZ&&n&&!s&&a||CK(t,KU,!0)}return}}var i;if(!zQ(o))return;const a=e.data;null!==FJ&&dK(!1,t,FJ),o.dirty&&null===FJ||!o.isCollapsed()||z0(o.anchor.getNode())||null===r||o.applyDOMRange(r),FJ=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":CK(t,eZ,e);break;case"insertFromComposition":UG(null),CK(t,eZ,e);break;case"insertLineBreak":UG(null),CK(t,JU,!1);break;case"insertParagraph":UG(null),WJ&&!YZ?(WJ=!1,CK(t,JU,!1)):CK(t,QU,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":CK(t,tZ,e);break;case"deleteByComposition":(function(e,t){return e!==t||N0(e)||N0(t)||!e.isToken()||!t.isToken()})(c,u)&&CK(t,nZ,e);break;case"deleteByDrag":case"deleteByCut":CK(t,nZ,e);break;case"deleteContent":CK(t,KU,!1);break;case"deleteWordBackward":CK(t,rZ,!0);break;case"deleteWordForward":CK(t,rZ,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":CK(t,oZ,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":CK(t,oZ,!1);break;case"formatStrikeThrough":CK(t,iZ,"strikethrough");break;case"formatBold":CK(t,iZ,"bold");break;case"formatItalic":CK(t,iZ,"italic");break;case"formatUnderline":CK(t,iZ,"underline");break;case"historyUndo":CK(t,aZ,void 0);break;case"historyRedo":CK(t,sZ,void 0)}else{if("\n"===a)e.preventDefault(),CK(t,JU,!1);else if(a===aG)e.preventDefault(),CK(t,QU,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&XJ(o,r,a,e.timeStamp,!0)?(e.preventDefault(),CK(t,eZ,a)):FJ=a;$J=e.timeStamp}}))}(e,t)]);let zJ=0,RJ=null,$J=0,FJ=null;const jJ=new WeakMap;let BJ=!1,HJ=!1,WJ=!1,VJ=!1,YJ=[0,"",0,"root",0];function XJ(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=f0(),c=$K(l._window),u=null!==c?c.anchorNode:null,d=i.key,h=l.getElementByKey(d),p=n.length;return d!==a.key||!CQ(s)||(!o&&(!WZ||$J<r+50)||s.isDirty()&&p<2||sK(n))&&i.offset!==a.offset&&!s.isComposing()||HG(s)||s.isDirty()&&p>1||(o||!WZ)&&null!==h&&!s.isComposing()&&u!==VG(h)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(CQ(t)||N0(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function qJ(e,t){return WG(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function UJ(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;BJ&&(BJ=!1,qJ(r,o)&&qJ(i,a))||M0(t,(()=>{if(!n)return void oK(null);if(!$G(t,r,i))return;const s=GQ();if(zQ(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=DK(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=YJ,h=nK(),p=!1===t.isComposing()&&""===h.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)CQ(r)||yG(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!p){N0(r)||yG(259);const e=n.getNode();s.style="",e.isEmpty()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,d=l?t:e,h=l?e:t;let p=2047,f=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(CQ(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===h&&0===u)&&(f=!0,p&=t.getFormat(),0===p))break}s.format=f?p:0}}CK(t,UU,void 0)}))}function ZJ(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function GJ(e,t){const n=e._compositionKey;if(UG(null),null!==n&&null!=t){if(""===t){const t=GG(n),r=VG(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&CQ(t)&&hK(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=GQ();if(zQ(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void CK(e,mZ,null)}}}dK(!0,e,t)}function KJ(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const JJ=new Map;function QJ(e){const t=function(e){const t=NK(e);return t?t.getSelection():null}(e.target);if(null===t)return;const n=jG(t.anchorNode);if(null===n)return;HJ&&(HJ=!1,M0(n,(()=>{const r=KQ(),o=t.anchorNode;(jK(o)||WG(o))&&oK(ZQ(r,t,n,e))})));const r=lK(n),o=r[r.length-1],i=o._key,a=JJ.get(i),s=a||o;s!==n&&UJ(t,s,!1),UJ(t,n,!0),n!==o?JJ.set(i,n):a&&JJ.delete(i)}function eQ(e){e._lexicalHandled=!0}function tQ(e){return!0===e._lexicalHandled}function nQ(e,t,n){d0();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=GQ();if(!zQ(t)||!N0(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return TK(o,e)&&n.set(e.__key,0,"element"),TK(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(zQ(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(e0(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(e0(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else $Q(i)&&t&&e.isSelected()&&e.selectPrevious();if(zQ(i)&&t&&!a){const t=e.getIndexWithinParent();XG(e),JQ(i,o,t,-1)}else XG(e);n||AK(o)||o.canBeEmpty()||!o.isEmpty()||nQ(o,t),t&&z0(o)&&o.isEmpty()&&o.selectEnd()}class rQ{static getType(){yG(64,this.name)}static clone(e){yG(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);d0(),h0();const n=f0(),r=p0(),o=""+IG++;r._nodeMap.set(o,e),N0(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){yG(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=GG(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||GQ();if(null==t)return!1;const n=t.getNodes().some((e=>e.__key===this.__key));if(CQ(this))return n;if(zQ(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(L0(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:GG(e)}getParentOrThrow(){const e=this.getParent();return null===e&&yG(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(AK(t))return N0(e)||e===this&&L0(e)||yG(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&yG(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:GG(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:GG(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();N0(this)&&t.unshift(this),N0(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=N0(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&yG(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=f0()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=GG(this.__key);return null===e&&yG(113),e}getWritable(){d0();const e=p0(),t=f0(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=GQ();if(null!==a&&a.setCachedNodes(null),i.has(r))return qG(o),o;const s=GK(o);return i.add(r),qG(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){yG(70)}updateDOM(e,t,n){yG(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){return{type:this.__type,version:1}}static importJSON(e){yG(18,this.name)}updateFromJSON(e){return this}static transform(){return null}remove(e){nQ(this,!0,e)}replace(e,t){d0();let n=GQ();null!==n&&(n=n.clone()),IK(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;XG(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,h=r.__next,p=r.__parent;if(nQ(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=d,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=h,a.__parent=p,s.__size=l,t&&(N0(this)&&N0(a)||yG(139),this.getChildren().forEach((e=>{a.append(e)}))),zQ(n)){oK(n);const e=n.anchor,t=n.focus;e.key===o&&AQ(e,a),t.key===o&&AQ(t,a)}return ZG()===o&&UG(i),a}insertAfter(e,t=!0){d0(),IK(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=GQ();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if(XG(r),zQ(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&zQ(i)){const e=this.getIndexWithinParent();JQ(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){d0(),IK(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;XG(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=GQ();return t&&zQ(c)&&JQ(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return V0()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){d0();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(N0(n))return n.select();if(!CQ(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){d0();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(N0(n))return n.select(0,0);if(!CQ(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}class oQ extends rQ{static getType(){return"linebreak"}static clone(e){return new oQ(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&VK(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&lQ(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&lQ(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&VK(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&lQ(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&lQ(r))return!0}return!1}(e)?null:{conversion:iQ,priority:0}}}static importJSON(e){return aQ().updateFromJSON(e)}}function iQ(e){return{node:aQ()}}function aQ(){return LK(new oQ)}function sQ(e){return e instanceof oQ}function lQ(e){return WG(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function cQ(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function uQ(e,t){return 1&t?"strong":2&t?"em":"span"}function dQ(e,t,n,r,o){const i=r.classList;let a=_K(o,"base");void 0!==a&&i.add(...a),a=_K(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in hG){const r=hG[e];if(a=_K(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function hQ(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?iG:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||HZ){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function pQ(e,t,n,r,o,i){hQ(o,e,t);const a=i.theme.text;void 0!==a&&dQ(0,0,r,e,a)}function fQ(e,t){const n=document.createElement(t);return n.appendChild(e),n}class mQ extends rQ{static getType(){return"text"}static clone(e){return new mQ(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return vG[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===ZG()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=hG[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return YG(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=cQ(0,n),o=uQ(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),pQ(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=cQ(0,o),s=cQ(0,i),l=uQ(0,o),c=uQ(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&yG(48);const o=document.createElement(c);return pQ(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&yG(49)),hQ(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&dQ(0,o,i,u,d);const h=e.__style,p=this.__style;return h!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:_Q,priority:0}),b:()=>({conversion:vQ,priority:0}),code:()=>({conversion:SQ,priority:0}),em:()=>({conversion:SQ,priority:0}),i:()=>({conversion:SQ,priority:0}),s:()=>({conversion:SQ,priority:0}),span:()=>({conversion:gQ,priority:0}),strong:()=>({conversion:SQ,priority:0}),sub:()=>({conversion:SQ,priority:0}),sup:()=>({conversion:SQ,priority:0}),u:()=>({conversion:SQ,priority:0})}}static importJSON(e){return kQ().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return jK(t)||yG(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=fQ(t,"b")),this.hasFormat("italic")&&(t=fQ(t,"i")),this.hasFormat("strikethrough")&&(t=fQ(t,"s")),this.hasFormat("underline")&&(t=fQ(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?hG[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?pG[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=YG(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=gG[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){d0();let n=e,r=t;const o=GQ(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!zQ(o))return qQ(a,n,a,r,"text","text");{const e=ZG();e!==o.anchor.key&&e!==o.focus.key||UG(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=GQ();if(r&&zQ(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){d0();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=ZG(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],d=t.getParent();let h;const p=t.getFormat(),f=t.getStyle(),m=t.__detail;let g=!1;t.isSegmented()?(h=kQ(u),h.__format=p,h.__style=f,h.__detail=m,g=!0):(h=t.getWritable(),h.__text=u);const v=GQ(),y=[h];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=kQ(t).getWritable();i.__format=p,i.__style=f,i.__detail=m;const s=i.__key,l=b+n;if(zQ(v)){const e=v.anchor,t=v.focus;e.key===r&&"text"===e.type&&e.offset>b&&e.offset<=l&&(e.key=s,e.offset-=b,v.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,v.dirty=!0)}o===r&&UG(s),b=l,y.push(i)}if(null!==d){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&qG(t),null!==n&&qG(n)}(this);const e=d.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),zQ(v)&&JQ(v,d,t,c-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||yG(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;ZG()===r&&UG(n);const a=GQ();if(zQ(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(t0(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(t0(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function gQ(e){return{forChild:EQ(e.style),node:null}}function vQ(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:EQ(t.style,n?void 0:"bold"),node:null}}const yQ=new WeakMap;function bQ(e){if(!jK(e))return!1;if("PRE"===e.nodeName)return!0;const t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}function _Q(e){const t=e;null===e.parentElement&&yG(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=yQ.get(n))&&!bQ(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)yQ.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(aQ()):"\t"===r?t.push(PQ()):""!==r&&t.push(kQ(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=xQ(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=xQ(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:kQ(n)}}function xQ(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,jK(n)){const e=n.style.display;if(""===e&&!WK(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(WG(n))return n;if("BR"===n.nodeName)return null}}const wQ={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function SQ(e){const t=wQ[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:EQ(e.style,t),node:null}}function kQ(e=""){return LK(new mQ(e))}function CQ(e){return e instanceof mQ}function EQ(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>CQ(e)?(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}class MQ extends mQ{static getType(){return"tab"}static clone(e){return new MQ(e.__key)}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),n=_K(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}static importJSON(e){return PQ().updateFromJSON(e)}setTextContent(e){return"\t"!==e&&""!==e&&yG(126),super.setTextContent(e)}setDetail(e){return 2!==e&&yG(127),this}setMode(e){return"normal"!==e&&yG(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function PQ(){return LK(new MQ)}function OQ(e){return e instanceof MQ}class TQ{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(N0(t)){const e=t.getDescendantByIndex(r);t=null!=e?e:t}if(N0(n)){const e=n.getDescendantByIndex(o);n=null!=e?e:n}return t===n?r<o:t.isBefore(n)}getNode(){const e=GG(this.key);return null===e&&yG(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,u0()||(ZG()===o&&UG(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function NQ(e,t,n){return new TQ(e,t,n)}function DQ(e,t){let n=t.__key,r=e.offset,o="element";if(CQ(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!N0(t)){const e=t.getNextSibling();if(CQ(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function AQ(e,t){if(N0(t)){const n=t.getLastDescendant();N0(n)||CQ(n)?DQ(e,n):DQ(e,t)}else DQ(e,t)}function LQ(e,t,n,r){e.key=t,e.offset=n,e.type=r}class IQ{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!$Q(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new IQ(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(CQ(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=GG(e);null!==t&&n.push(t)}return u0()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function zQ(e){return e instanceof RQ}class RQ{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!zQ(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=N0(a)&&o.offset>0&&o.offset>=a.getChildrenSize(),c=o.offset,u=i.offset;if(N0(a)){const e=a.getDescendantByIndex(c);a=null!=e?e:a}if(N0(s)){let e=s.getDescendantByIndex(u);null!==e&&e!==a&&s.getChildAtIndex(u)===e&&(e=e.getPreviousSibling()),s=null!=e?e:s}let d;if(a.is(s))d=N0(a)&&a.getChildrenSize()>0?[]:[a];else if(d=a.getNodesBetween(s),l){const e=d.findIndex((e=>!e.is(a)&&!e.isBefore(a)));d.splice(0,e)}return u0()||(this._cachedNodes=d),d}setTextNodeRange(e,t,n,r){LQ(this.anchor,e.__key,t,"text"),LQ(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=jQ(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(N0(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,CQ(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):d===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!L0(d)&&!sQ(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=f0(),n=t.getEditorState()._selection,r=YQ(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;LQ(this.anchor,o.key,o.offset,o.type),LQ(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new RQ(NQ(e.key,e.offset,e.type),NQ(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=YG(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=hG[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(aQ()):"\t"===r?n.push(PQ()):n.push(kQ(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=kQ(),s=z0(o)?V0().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let d=c[0];CQ(d)||yG(26);const h=d.getTextContent().length,p=d.getParentOrThrow();let f=c[u-1];if(1===u&&"element"===a.type&&(l=h,a.set(i.key,l,"text")),this.isCollapsed()&&s===h&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(CQ(t)&&t.canInsertTextBefore()&&!HG(t)||(t=kQ(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(CQ(t)&&!HG(t)||(t=kQ(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&s!==h){const e=kQ(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=f.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||N0(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),VQ(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(d.isToken()){const t=kQ(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(s!==l||t===r&&n===o){if(OQ(d)){const t=kQ(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=kQ(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)d.insertBefore(t,!1);else{const[e]=d.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-s;d=d.spliceText(s,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...f.getParentKeys()]),n=N0(d)?d:d.getParentOrThrow();let r=N0(f)?f:f.getParentOrThrow(),o=f;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===f.getTextContent())||"element"===a.type&&f.getIndexWithinParent()<l)if(CQ(f)&&!f.isToken()&&l!==f.getTextContentSize()){if(f.isSegmented()){const e=kQ(f.getTextContent());f.replace(e),f=e}z0(a.getNode())||"text"!==a.type||(f=f.spliceText(0,l,"")),t.add(f.__key)}else{const e=f.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?f.remove():e.remove()}else t.add(f.__key);const i=r.getChildren(),p=new Set(c),m=n.is(r),g=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||N0(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(o)?m||g.insertAfter(t,!1):t.remove())}if(!m){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(d.isToken())if(s===h)d.select();else{const t=kQ(e);t.select(),d.replace(t)}else d=d.spliceText(s,h-s,e,!0),""===d.getTextContent()?d.remove():d.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){if(this.isCollapsed())return;const{anchor:e,focus:t}=this,n=this.getNodes(),r=this.isBackward()?t:e,o=this.isBackward()?e:t;let i=r.getNode(),a=o.getNode();const s=XK(i,YK),l=XK(a,YK);CQ(i)&&i.isToken()&&r.offset<i.getTextContentSize()&&(r.offset=0),o.offset>0&&CQ(a)&&a.isToken()&&(o.offset=a.getTextContentSize());for(const e of n)TK(i,e)||TK(a,e)||e.getKey()===i.getKey()||e.getKey()===a.getKey()||e.remove();const c=(e,t)=>{if(""===e.getTextContent())e.remove();else if(0!==t&&HG(e)){const t=kQ(e.getTextContent());return t.setFormat(e.getFormat()),t.setStyle(e.getStyle()),e.replace(t)}};if(i===a&&CQ(i)){const n=Math.abs(t.offset-e.offset);return i.spliceText(r.offset,n,"",!0),void c(i,n)}if(CQ(i)){const e=i.getTextContentSize()-r.offset;i.spliceText(r.offset,e,""),i=c(i,e)||i}CQ(a)&&(a.spliceText(0,o.offset,""),a=c(a,o.offset)||a),i.isAttached()&&CQ(i)?i.selectEnd():a.isAttached()&&CQ(a)&&a.selectStart(),N0(s)&&N0(l)&&s!==l&&(s.append(...l.getChildren()),l.remove(),o.set(r.key,r.offset,r.type))}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void UG(null);const n=this.getNodes(),r=[];for(const e of n)CQ(e)&&r.push(e);const o=t=>{n.forEach((n=>{if(N0(n)){const r=n.getFormatFlags(e,t);n.setTextFormat(r)}}))},i=r.length;if(0===i)return this.toggleFormat(e),UG(null),void o(t);const a=this.anchor,s=this.focus,l=this.isBackward(),c=l?s:a,u=l?a:s;let d=0,h=r[0],p="element"===c.type?0:c.offset;if("text"===c.type&&p===h.getTextContentSize()&&(d=1,h=r[1],p=0),null==h)return;const f=h.getFormatFlags(e,t);o(f);const m=i-1;let g=r[m];const v="text"===u.type?u.offset:g.getTextContentSize();if(h.is(g)){if(p===v)return;if(HG(h)||0===p&&v===h.getTextContentSize())h.setFormat(f);else{const e=h.splitText(p,v),t=0===p?e[0]:e[1];t.setFormat(f),"text"===c.type&&c.set(t.__key,0,"text"),"text"===u.type&&u.set(t.__key,v-p,"text")}return void(this.format=f)}0===p||HG(h)||([,h]=h.splitText(p),p=0),h.setFormat(f);const y=g.getFormatFlags(e,f);v>0&&(v===g.getTextContentSize()||HG(g)||([g]=g.splitText(v)),g.setFormat(y));for(let t=d+1;t<m;t++){const n=r[t],o=n.getFormatFlags(e,y);n.setFormat(o)}"text"===c.type&&c.set(h.__key,p,"text"),"text"===u.type&&u.set(g.__key,v,"text"),this.format=f|y}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=GQ();return zQ(t)||yG(134),t.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),n=XK(t,YK),r=e[e.length-1];if(N0(n)&&"__language"in n){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const t=n0(this);n.splice(t,0,e),r.selectEnd()}return}if(!e.some((e=>(N0(e)||L0(e))&&!e.isInline()))){N0(n)||yG(211,t.constructor.name,t.getType());const o=n0(this);return n.splice(o,0,e),void r.selectEnd()}const o=function(e){const t=V0();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=sQ(o);if(i||L0(o)&&o.isInline()||N0(o)&&o.isInline()||CQ(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),i=o.getLastDescendant(),a=o.getChildren(),s=N0(n)&&n.isEmpty()?null:this.insertParagraph(),l=a[a.length-1];let c=a[0];var u;N0(u=c)&&YK(u)&&!u.isEmpty()&&N0(n)&&(!n.isEmpty()||n.canMergeWhenEmpty())&&(N0(n)||yG(211,t.constructor.name,t.getType()),n.append(...c.getChildren()),c=a[1]),c&&(null===n&&yG(212,t.constructor.name,t.getType()),function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||yG(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(n,c));const d=XK(i,YK);s&&N0(d)&&(s.canMergeWhenEmpty()||YK(l))&&(d.append(...s.getChildren()),s.remove()),N0(n)&&n.isEmpty()&&n.remove(),i.selectEnd();const h=N0(n)?n.getLastChild():null;sQ(h)&&d!==n&&h.remove()}insertParagraph(){if("root"===this.anchor.key){const e=V0();return nK().splice(this.anchor.offset,0,[e]),e.select(),e}const e=n0(this),t=XK(this.anchor.getNode(),YK);N0(t)||yG(213);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=aQ();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=jQ(this);if(0===t)return[];if(1===t){if(CQ(i)&&!this.isCollapsed()){const e=s>l?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(CQ(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(CQ(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=SK(r,t);if(L0(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=UQ();return e.add(a.__key),void oK(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(CQ(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return N0(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=f0(),l=$K(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!N0(a)||a.isInline()||a.canBeEmpty()||RK(c,s,u),function(e,t,n,r){e.modify(t,n,r)}(l,e,t?"backward":"forward",n),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=z0(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(AK(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e<n.length;e++){const t=n[e];TK(t,r)?o.push(t):i=!0}if(i&&o.length>0)if(t){const e=o[0];N0(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];N0(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;LQ(n,t.key,t.offset,t.type),LQ(t,r,o,i),e._cachedNodes=null}(this)}}}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&N0(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(N0(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=SK(r,e);if(L0(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&N0(n)&&0===n.getChildrenSize()){n.remove();const e=UQ();e.add(o.__key),oK(e)}else o.remove(),f0().dispatchCommand(UU,void 0);return}if(!e&&N0(o)&&N0(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void BQ(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void BQ(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(sK(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&z0(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),this.isCollapsed()&&0===this.anchor.offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function $Q(e){return e instanceof IQ}function FQ(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function jQ(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[FQ(n),FQ(r)]}function BQ(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function HQ(e,t,n,r){let o,i=t;if(jK(e)){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],d=!1;if(u===c)u=s[i+1],d=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=iK(u),CQ(o))i=aK(o,a);else{let s=iK(e);if(null===s)return null;if(N0(s)){const l=r.getElementByKey(s.getKey());null===l&&yG(214);const c=s.getDOMSlot(l);[s,i]=c.resolveChildIndex(s,l,e,t),N0(s)||yG(215),a&&i>=s.getChildrenSize()&&(i=Math.max(0,s.getChildrenSize()-1));let u=s.getChildAtIndex(i);if(N0(u)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){const e=a?u.getLastDescendant():u.getFirstDescendant();null===e?s=u:(u=e,s=N0(u)?u:u.getParentOrThrow()),i=0}CQ(u)?(o=u,s=null,i=aK(u,a)):u!==s&&a&&!d&&(N0(s)||yG(216),i=Math.min(s.getChildrenSize(),i+1))}else{const n=s.getIndexWithinParent();i=0===t&&L0(s)&&iK(e)===s?n:n+1,s=s.getParentOrThrow()}if(N0(s))return NQ(s.__key,i,"element")}}else o=iK(e);return CQ(o)?NQ(o.__key,i,"text"):null}function WQ(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&N0(i)&&i.isInline()){const t=i.getPreviousSibling();CQ(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else N0(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):CQ(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&N0(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&N0(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();CQ(t)&&(e.key=t.__key,e.offset=0)}}}function VQ(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);WQ(e,r,o),WQ(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=f0();if(i.isComposing()&&i._compositionKey!==e.key&&zQ(n)){const r=n.anchor,o=n.focus;LQ(e,r.key,r.offset,r.type),LQ(t,o.key,o.offset,o.type)}}}function YQ(e,t,n,r,o,i){if(null===e||null===n||!$G(o,e,n))return null;const a=HQ(e,t,zQ(i)?i.anchor:null,o);if(null===a)return null;const s=HQ(n,r,zQ(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=iK(e),r=iK(n);if(L0(t)&&L0(r))return null}return VQ(a,s,i),[a,s]}function XQ(e){return N0(e)&&!e.isInline()}function qQ(e,t,n,r,o,i){const a=p0(),s=new RQ(NQ(e,t,o),NQ(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function UQ(){return new IQ(new Set)}function ZQ(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!_G&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,d,h;if(zQ(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,h=t.focusOffset,s&&zQ(e)&&!$G(n,c,u))return e.clone();const p=YQ(c,d,u,h,n,e);if(null===p)return null;const[f,m]=p;return new RQ(f,m,zQ(e)?e.format:0,zQ(e)?e.style:"")}function GQ(){return p0()._selection}function KQ(){return f0()._editorState._selection}function JQ(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),QQ(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,d=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}QQ(e)}function QQ(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!N0(i))return;const e=i.getChildrenSize(),o=n>=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(CQ(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(N0(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(CQ(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(N0(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(CQ(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function e0(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,CQ(r)?(a=r.getTextContentSize(),s="text"):N0(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,CQ(o)?s="text":N0(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function t0(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function n0(e){let t=e;e.isCollapsed()||t.removeText();const n=GQ();zQ(n)&&(t=n),zQ(t)||yG(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!YK(o);)[o,i]=r0(o,i);return i}function r0(e,t){const n=e.getParent();if(!n){const e=V0();return nK().append(e),e.select(),[nK(),0]}if(CQ(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!N0(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new RQ(NQ(e.__key,t,"element"),NQ(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let o0=null,i0=null,a0=!1,s0=!1,l0=0;const c0={characterData:!0,childList:!0,subtree:!0};function u0(){return a0||null!==o0&&o0._readOnly}function d0(){a0&&yG(13)}function h0(){l0>99&&yG(14)}function p0(){return null===o0&&yG(195,m0()),o0}function f0(){return null===i0&&yG(196,m0()),i0}function m0(){let e=0;const t=new Set,n=U0.version;if("undefined"!=typeof window)for(const r of document.querySelectorAll("[contenteditable]")){const o=BG(r);if(FG(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function g0(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&yG(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e<a&&(i[e](t),t.isAttached());e++);}function v0(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function y0(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const e of r)n.add(e)}function b0(e){return _0(e,f0()._nodes)}function _0(e,t){const n=e.type,r=t.get(n);void 0===r&&yG(17,n);const o=r.klass;e.type!==o.getType()&&yG(18,o.name);const i=o.importJSON(e),a=e.children;if(N0(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=_0(a[e],t);i.append(n)}return i}function x0(e,t,n){const r=o0,o=a0,i=i0;o0=t,a0=!0,i0=e;try{return n()}finally{o0=r,a0=o,i0=i}}function w0(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=o0,u=a0,d=i0,h=e._updating,p=e._observer;let f=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){i0=e,o0=n,a0=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),f=function(e,t,n,r,o,i){uJ="",fJ="",dJ="",mJ=2===r,vJ=null,tJ=n,eJ=n._config,nJ=n._nodes,rJ=tJ._listeners.mutation,oJ=o,iJ=i,aJ=e._nodeMap,sJ=t._nodeMap,gJ=t._readOnly,lJ=new Map(n._keyToDOMMap);const a=new Map;return cJ=a,TJ("root",null),tJ=void 0,nJ=void 0,oJ=void 0,iJ=void 0,aJ=void 0,sJ=void 0,eJ=void 0,lJ=void 0,cJ=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),s0)throw t;return X0(e,null,r,n),OG(e),e._dirtyType=2,s0=!0,w0(e,i),void(s0=!1)}finally{p.observe(r,c0),e._updating=h,o0=c,a0=u,i0=d}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,g=e._dirtyElements,v=e._normalizedNodes,y=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=eK(e)),delete r[i])}(e,n);const _=o?null:$K(e._window);if(e._editable&&null!==_&&(l||null===s||s.dirty)&&null!==r&&!y.has("skip-dom-selection")){i0=e,o0=n;try{if(null!==p&&p.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&RK(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&RG(u))return;if(!zQ(t))return void(null!==e&&$G(n,a,s)&&r.removeAllRanges());const d=t.anchor,h=t.focus,p=d.key,f=h.key,m=MK(n,p),g=MK(n,f),v=d.offset,y=h.offset,b=t.format,_=t.style,x=t.isCollapsed();let w=m,S=g,k=!1;if("text"===d.type){w=VG(m);const e=d.getNode();k=e.getFormat()!==b||e.getStyle()!==_}else zQ(e)&&"text"===e.anchor.type&&(k=!0);var C,E,M,P,O;if("text"===h.type&&(S=VG(g)),null!==w&&null!==S&&(x&&(null===e||k||zQ(e)&&(e.format!==b||e.style!==_))&&(C=b,E=_,M=v,P=p,O=performance.now(),YJ=[C,E,M,P,O]),l!==v||c!==y||a!==w||s!==S||"Range"===r.type&&x||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===d.type))){try{r.setBaseAndExtent(w,v,S,y)}catch(e){}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=zQ(t)&&"element"===t.anchor.type?w.childNodes[v]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=OK(n),o=NK(r);if(null===r||null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=DK(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=PK(c)}}(n,t,i)}}BJ=!0}}(a,s,e,_,y,r)}(function(e,t,n){let r=e._blockCursorElement;if(zQ(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())zK(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(null!==t&&zK(t)){const n=t.getPreviousSibling();(null===n||zK(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=bG(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&RK(r,e,t)})(e,r,s),null!==p&&p.observe(r,c0)}finally{i0=d,o0=c}}null!==f&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,f,y,m,i),zQ(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(UU,void 0);const x=e._pendingDecorators;null!==x&&(e._decorators=x,e._pendingDecorators=null,S0("decorator",e,!0,x)),function(e,t,n){const r=tK(t),o=tK(n);r!==o&&S0("textcontent",e,!0,o)}(e,t||i,n),S0("update",e,!0,{dirtyElements:g,dirtyLeaves:m,editorState:n,normalizedNodes:v,prevEditorState:t||i,tags:y}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;E0(e,t,r)}}}(e)}function S0(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function k0(e,t,n){if(!1===e._updating||i0!==e){let r=!1;return e.update((()=>{r=k0(e,t,n)})),r}const r=lK(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function C0(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i;if(void 0!==o){if(i=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&yG(191),t._flushSync=!0}i&&e._deferred.push(i),y0(e,o.tag)}n()}}return r}function E0(e,t,n){const r=e._updateTags;let o,i=!1,a=!1;void 0!==n&&(o=n.onUpdate,y0(e,n.tag),i=n.skipTransforms||!1,a=n.discrete||!1),o&&e._deferred.push(o);const s=e._editorState;let l=e._pendingEditorState,c=!1;(null===l||l._readOnly)&&(l=e._pendingEditorState=R0(l||s),c=!0),l._flushSync=a;const u=o0,d=a0,h=i0,p=e._updating;o0=l,a0=!1,e._updating=!0,i0=e;try{c&&(e._headless?null!==s._selection&&(l._selection=s._selection.clone()):l._selection=function(e){const t=e.getEditorState()._selection,n=$K(e._window);return zQ(t)||null==t?ZQ(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),i=C0(e,i),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(zQ(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(l,e),0!==e._dirtyType&&(i?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);CQ(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&DG(t)}}(l,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=ZG(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);CQ(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&DG(r),void 0!==r&&v0(r,i)&&g0(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){l0++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&v0(l,i)&&g0(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,l0++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),C0(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(N0(t)&&QK(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(s,l,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(l._flushSync=!0);const r=l._selection;if(zQ(r)){const e=l._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||yG(19)}else $Q(r)&&0===r._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void w0(e)}finally{o0=u,a0=d,i0=h,e._updating=p,l0=0}const f=0!==e._dirtyType||e._deferred.length>0||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(l,e);f?l._flushSync?(l._flushSync=!1,w0(e)):c&&zG((()=>{w0(e)})):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function M0(e,t,n){e._updating?e._updates.push([t,n]):E0(e,t,n)}class P0{constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new P0(this.element,e,this.after)}withAfter(e){return new P0(this.element,this.before,e)}withElement(e){return new P0(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&yG(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&yG(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&yG(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(null===e)this.removeManagedLineBreak();else{const t="decorator"===e&&(YZ||VZ);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}const n=this.element,r=this.before,o=document.createElement("br");if(n.insertBefore(o,r),e){const e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",n.insertBefore(e,o),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){const t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}const o=O0(t,n);o.push(r);const i=O0(t,this.element);let a=e.getIndexWithinParent();for(let e=0;e<i.length;e++){const t=o[e],n=i[e];if(void 0===t||t<n)break;if(t>n){a+=1;break}}return[e.getParentOrThrow(),a]}}function O0(e,t){const n=[];let r=t;for(;r!==e&&null!==r;r=t.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=r.previousSibling)e++;n.push(e)}return r!==e&&yG(225),n.reverse()}class T0 extends rQ{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return mG[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=f0()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(CQ(t)&&e.push(t),N0(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;N0(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;N0(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return N0(e)&&e.getLastDescendant()||e||null}const r=t[e];return N0(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:GG(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&yG(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:GG(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&yG(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),N0(o)&&r!==n-1&&!o.isInline()&&(e+=aG)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),N0(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){const t=fG[e];return!!(this.getFormat()&t)}return!1}hasTextFormat(e){const t=hG[e];return!!(this.getTextFormat()&t)}getFormatFlags(e,t){return YG(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){d0();const n=GQ();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(CQ(e)||N0(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(CQ(e)||N0(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return zQ(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):qQ(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?fG[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable();e+t<=o||yG(226,String(e),String(t),String(o));const a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,d=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n<t;n++){null===e&&yG(100);const t=e.getNextSibling(),n=e.__key;XG(e.getWritable()),l.push(n),e=t}}let h=u;for(let e=0;e<r;e++){const t=n[e];null!==h&&t.is(h)&&(u=h=h.getPreviousSibling());const r=t.getWritable();r.__parent===a&&d--,XG(r);const o=t.__key;if(null===h)i.__first=o,r.__prev=null;else{const e=h.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&yG(76),r.__parent=a,s.push(o),h=t}if(e+t===o)null!==h&&(h.getWritable().__next=null,i.__last=h.__key);else if(null!==c){const e=c.getWritable();if(null!==h){const t=h.getWritable();e.__prev=h.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=d,l.length){const e=GQ();if(zQ(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;D0(r,t,n)&&e0(r,r.getNode(),this,u,c),D0(o,t,n)&&e0(o,o.getNode(),this,u,c),0!==d||this.canBeEmpty()||AK(this)||this.remove()}}return i}getDOMSlot(e){return new P0(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(jK(t)){const e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px")}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0!==t&&(e.textFormat=t),""!==n&&(e.textStyle=n),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const n=this.getDOMSlot(e);let r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){const o=t.getElementByKey(e.getKey());null!==o&&(null==r?(n.insertChild(o),r=o):r!==o&&n.replaceChild(o,r),r=r.nextSibling)}}}function N0(e){return e instanceof T0}function D0(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class A0 extends rQ{decorate(e,t){yG(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function L0(e){return e instanceof A0}class I0 extends T0{static getType(){return"root"}static clone(){return new I0}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){yG(51)}getTextContent(){const e=this.__cachedText;return!u0()&&0!==f0()._dirtyType||null===e?super.getTextContent():e}remove(){yG(52)}replace(e){yG(53)}insertBefore(e){yG(54)}insertAfter(e){yG(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];N0(n)||L0(n)||yG(56)}return super.append(...e)}static importJSON(e){return nK().updateFromJSON(e)}collapseAtStart(){return!0}}function z0(e){return e instanceof I0}function R0(e){return new j0(new Map(e._nodeMap))}function $0(){return new j0(new Map([["root",new I0]]))}function F0(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&yG(130,n.name),N0(e)){const r=t.children;Array.isArray(r)||yG(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=F0(o[e]);r.push(t)}}return t}class j0{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return x0(t&&t.editor||null,this,e)}clone(e){const t=new j0(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return x0(null,this,(()=>({root:F0(nK())})))}}class B0 extends T0{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class H0 extends T0{static getType(){return"paragraph"}static clone(e){return new H0(e.__key)}createDOM(e){const t=document.createElement("p"),n=_K(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:W0,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(jK(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return V0().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){const n=V0();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||CQ(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function W0(e){const t=V0();return e.style&&(t.setFormat(e.style.textAlign),KK(e,t)),{node:t}}function V0(){return LK(new H0)}function Y0(e){return e instanceof H0}function X0(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=$0(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}function q0(e){const t=e||{},n=i0,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=$0(),s=t.namespace||(null!==o?o._config.namespace:cK()),l=t.editorState,c=[I0,mQ,oQ,MQ,H0,B0,...t.nodes||[]],{onError:u,html:d}=t,h=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),p.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const f=new U0(a,o,p,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)})),t&&o(t),n}(p,d?d.import:void 0),h);return void 0!==l&&(f._pendingEditorState=l,f._dirtyType=2),f}class U0{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=cK(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&yG(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&yG(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0!==i&&i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&yG(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=ZK(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}return function(e,t){const n=ZK(e.getEditorState()),r=[];for(const e of t){const t=n.get(e);t&&r.push(t)}0!==r.length&&e.update((()=>{for(const e of r)for(const t of e.keys()){const e=GG(t);e&&e.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,r.map((e=>e.klass.getType()))),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return CK(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=_K(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,X0(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=jJ.get(t);void 0===n&&yG(162);const r=n-1;r>=0||yG(164),jJ.set(t,r),0===r&&t.removeEventListener("selectionchange",QJ);const o=BG(e);FG(o)?(function(e){if(null!==e._parentEditor){const t=lK(e),n=t[t.length-1]._key;JJ.get(n)===e&&JJ.delete(n)}else JJ.delete(e._key)}(o),e.__lexicalEditor=null):o&&yG(198);const i=KJ(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=NK(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,OG(this),this._updateTags.add("history-merge"),w0(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=jJ.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",QJ),jJ.set(n,(r||0)+1),e.__lexicalEditor=t;const o=KJ(e);for(let n=0;n<IJ.length;n++){const[r,i]=IJ[n],a="function"==typeof i?e=>{tQ(e)||(eQ(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(tQ(e))return;eQ(e);const n=t.isEditable();switch(r){case"cut":return n&&CK(t,TZ,e);case"copy":return CK(t,OZ,e);case"paste":return n&&CK(t,tZ,e);case"dragstart":return n&&CK(t,EZ,e);case"dragover":return n&&CK(t,MZ,e);case"dragend":return n&&CK(t,PZ,e);case"focus":return n&&CK(t,zZ,e);case"blur":return n&&CK(t,RZ,e);case"drop":return n&&CK(t,kZ,e)}};e.addEventListener(r,a),o.push((()=>{e.removeEventListener(r,a)}))}}(e,this),null!=n&&e.classList.add(...n)}else this._window=null,this._updateTags.add("history-merge"),w0(this);S0("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&yG(38);let n=e;n._readOnly&&(n=R0(e),n._selection=e._selection?e._selection.clone():null),PG(this);const r=this._pendingEditorState,o=this._updateTags,i=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=i&&o.add(i),w0(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=i&&o.add(i),this._updating||w0(this)}parseEditorState(e,t){return function(e,t,n){const r=$0(),o=o0,i=a0,a=i0,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,o0=r,a0=!1,i0=t;try{const o=t._nodes;_0(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,o0=o,a0=i,i0=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return w0(this),this.getEditorState().read(e,{editor:this})}update(e,t){M0(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),M0(this,(()=>{const e=GQ(),n=nK();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=$K(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,S0("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}U0.version="0.23.1+prod.esm";class Z0 extends mQ{constructor(e,t){super(e,t)}static getType(){return"extended-text"}static clone(e){return new Z0(e.__text,e.__key)}static importDOM(){const e=mQ.importDOM();return{...e,code:()=>({conversion:G0(e?.code),priority:1}),em:()=>({conversion:G0(e?.em),priority:1}),span:()=>({conversion:G0(e?.span),priority:1}),strong:()=>({conversion:G0(e?.strong),priority:1}),sub:()=>({conversion:G0(e?.sub),priority:1}),sup:()=>({conversion:G0(e?.sup),priority:1})}}static importJSON(e){return mQ.importJSON(e)}isSimpleText(){return("text"===this.__type||"extended-text"===this.__type)&&0===this.__mode}exportJSON(){return{...super.exportJSON(),type:"extended-text",version:1}}}function G0(e){return t=>{const n=e?.(t);if(!n)return null;const r=n.conversion(t);if(!r)return r;const o=t.style.backgroundColor,i=t.style.color,a=t.style.fontFamily,s=t.style.fontWeight,l=t.style.fontSize,c=t.style.textDecoration;return{...r,forChild:(e,t)=>{const n=r?.forChild??(e=>e),u=n(e,t);if(CQ(u)){const e=[o?`background-color: ${o}`:null,i?`color: ${i}`:null,a?`font-family: ${a}`:null,s?`font-weight: ${s}`:null,l?`font-size: ${l}`:null,c?`text-decoration: ${c}`:null].filter((e=>null!=e)).join("; ");if(e.length)return u.setStyle(e)}return u}}}}var K0=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const J0=new Map;function Q0(e){const t={};if(!e)return t;const n=e.split(";");for(const e of n)if(""!==e){const[n,r]=e.split(/:([^]+)/);n&&r&&(t[n.trim()]=r.trim())}return t}function e1(e){let t=J0.get(e);return void 0===t&&(t=Q0(e),J0.set(e,t)),t}function t1(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=jQ(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,d=0;return o?(d=n>r?r:n,u=n>r?n:r):l?(d=i?r:n,u=void 0):c&&(d=0,u=i?n:r),t.__text=t.__text.slice(d,u),t}}return t}function n1(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return N0(t)||K0(177),e.offset===t.getChildrenSize()}function r1(e){const t=e.getStyle(),n=Q0(t);J0.set(t,n)}function o1(e,t){const n=e1("getStyle"in e?e.getStyle():e.style),r=Object.entries(t).reduce(((t,[r,o])=>("function"==typeof o?t[r]=o(n[r],e):null===o?delete t[r]:t[r]=o,t)),{...n}||{}),o=function(e){let t="";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}(r);e.setStyle(o),J0.set(o,r)}function i1(e,t){e.isCollapsed()&&zQ(e)?o1(e,t):function(e){const t=GQ();if(!zQ(t))return;const n=t.getNodes(),r=n.length,{anchor:o,focus:i}=t,a=r-1;let s=n[0],l=n[a];const c=s.getTextContent().length,u=i.offset;let d=o.offset;const h=o.isBefore(i);let p=h?d:u,f=h?u:d;const m=h?o.type:i.type,g=h?i.type:o.type,v=h?i.key:o.key;if(CQ(s)&&p===c){const e=s.getNextSibling();CQ(e)&&(d=0,p=0,s=e)}if(1===n.length){if(CQ(s)&&s.canHaveFormat()){if(p="element"===m?0:d>u?u:d,f="element"===g?c:d>u?d:u,p===f)return;if(HG(s)||0===p&&f===c)e(s),s.select(p,f);else{const t=s.splitText(p,f),n=0===p?t[0]:t[1];e(n),n.select(0,f-p)}}}else{if(CQ(s)&&p<s.getTextContentSize()&&s.canHaveFormat()&&(0===p||HG(s)||(s=s.splitText(p)[1],p=0,h?o.set(s.getKey(),p,"text"):i.set(s.getKey(),p,"text")),e(s)),CQ(l)&&l.canHaveFormat()){const t=l.getTextContent().length;l.__key!==v&&0!==f&&(f=t),f===t||HG(l)||([l]=l.splitText(f)),0===f&&"element"!==g||e(l)}for(let t=1;t<a;t++){const r=n[t],o=r.getKey();CQ(r)&&r.canHaveFormat()&&o!==s.getKey()&&o!==l.getKey()&&!r.isToken()&&e(r)}}}((e=>{o1(e,t)}))}function a1(e,t){if(null===e)return;const n=e.getStartEndPoints(),r=n?n[0]:null;if(null!==r&&"root"===r.key){const e=t(),n=nK(),r=n.getFirstChild();return void(r?r.replace(e,!0):n.append(e))}const o=e.getNodes(),i=null!==r&&function(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}(r.getNode(),d1);i&&-1===o.indexOf(i)&&o.push(i);for(let e=0;e<o.length;e++){const n=o[e];if(!d1(n))continue;N0(n)||K0(178);const r=t();r.setFormat(n.getFormatType()),r.setIndent(n.getIndent()),n.replace(r,!0)}}function s1(e,t){const n=SK(e.focus,t);return L0(n)&&!n.isIsolated()||N0(n)&&!n.isInline()&&!n.canBeEmpty()}function l1(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(z0(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n,r){e.modify(t?"extend":"move",n,r)}(e,t,n?!r:r,"character")}function c1(e,t,n){const r=e1(e.getStyle());return null!==r&&r[t]||n}function u1(e,t,n=""){let r=null;const o=e.getNodes(),i=e.anchor,a=e.focus,s=e.isBackward(),l=s?a.offset:i.offset,c=s?a.getNode():i.getNode();if(zQ(e)&&e.isCollapsed()&&""!==e.style){const n=e1(e.style);if(null!==n&&t in n)return n[t]}for(let e=0;e<o.length;e++){const i=o[e];if((0===e||0!==l||!i.is(c))&&CQ(i)){const e=c1(i,t,n);if(null===r)r=e;else if(r!==e){r="";break}}}return null===r?n:r}function d1(e){if(L0(e))return!1;if(!N0(e)||AK(e))return!1;const t=e.getFirstChild(),n=null===t||sQ(t)||CQ(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}var h1=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const p1="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,f1=p1&&"documentMode"in document?document.documentMode:null;p1&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);const m1=p1&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);p1&&"InputEvent"in window&&!f1&&new window.InputEvent("input"),p1&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p1&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,p1&&/Android/.test(navigator.userAgent);p1&&/^(?=.*Chrome).*/i.test(navigator.userAgent);function g1(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}function v1(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}p1&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);function y1(e,...t){const n=g1(...t);n.length>0&&e.classList.add(...n)}function b1(e,...t){const n=g1(...t);n.length>0&&e.classList.remove(...n)}const _1=(e,t)=>{let n=e;for(;n!==nK()&&null!=n;){if(t(n))return n;n=n.getParent()}return null};function x1(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}let w1=!(m1||!p1)&&void 0;var S1,k1={exports:{}};S1||(S1=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(s)||(a[s]=i[s])}var c=r[e];return r[e]=a,o.languages.DFS(o.languages,(function(t,n){n===c&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=o.util.type(l);"Object"!==c||i[a(l)]?"Array"!==c||i[a(l)]||(i[a(l)]=!0,e(l,n,s,i)):(i[a(l)]=!0,e(l,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var l={element:t,language:i,grammar:a,code:t.textContent};function c(e){l.highlightedCode=e,o.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o.hooks.run("after-highlight",l),o.hooks.run("complete",l),r&&r.call(l.element)}if(o.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return o.hooks.run("complete",l),void(r&&r.call(l.element));if(o.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(o.highlight(l.code,l.grammar,l.language));else c(o.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new l;return c(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,l,d){for(var h in n)if(n.hasOwnProperty(h)&&n[h]){var p=n[h];p=Array.isArray(p)?p:[p];for(var f=0;f<p.length;++f){if(d&&d.cause==h+","+f)return;var m=p[f],g=m.inside,v=!!m.lookbehind,y=!!m.greedy,b=m.alias;if(y&&!m.pattern.global){var _=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,_+"g")}for(var x=m.pattern||m,w=r.next,S=l;w!==t.tail&&!(d&&S>=d.reach);S+=w.value.length,w=w.next){var k=w.value;if(t.length>e.length)return;if(!(k instanceof i)){var C,E=1;if(y){if(!(C=a(x,S,e,v))||C.index>=e.length)break;var M=C.index,P=C.index+C[0].length,O=S;for(O+=w.value.length;M>=O;)O+=(w=w.next).value.length;if(S=O-=w.value.length,w.value instanceof i)continue;for(var T=w;T!==t.tail&&(O<P||"string"==typeof T.value);T=T.next)E++,O+=T.value.length;E--,k=e.slice(S,O),C.index-=S}else if(!(C=a(x,0,k,v)))continue;M=C.index;var N=C[0],D=k.slice(0,M),A=k.slice(M+N.length),L=S+k.length;d&&L>d.reach&&(d.reach=L);var I=w.prev;if(D&&(I=c(t,I,D),S+=D.length),u(t,I,E),w=c(t,I,new i(h,g?o.tokenize(N,g):N,b,N)),A&&c(t,w,A),E>1){var z={cause:h+","+f,reach:L};s(e,t,n,w.prev,S,z),d&&z.reach>d.reach&&(d.reach=z.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var l in i.attributes)s+=" "+l+'="'+(i.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()}),!1),o):o;var d=o.util.currentScript();function h(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
92
92
  /**
93
93
  * Prism: Lightweight, robust, elegant syntax highlighting
94
94
  *
@@ -96,5 +96,5 @@ const lF=e=>e&&e.enabled&&e.modifierKey,cF=(e,t)=>e&&t[e+"Key"],uF=(e,t)=>e&&!t[
96
96
  * @author Lea Verou <https://lea.verou.me>
97
97
  * @namespace
98
98
  * @public
99
- */e.exports&&(e.exports=t),void 0!==ye&&(ye.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",(function(e){e.selector+=", "+i})),t.hooks.add("before-sanity-check",(function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var l=s.appendChild(document.createElement("CODE"));l.textContent="Loading…";var c=s.getAttribute("data-src"),u=a.language;if("none"===u){var d=(/\.(\w+)$/.exec(c)||[,"none"])[1];u=e[d]||d}t.util.setLanguage(l,u),t.util.setLanguage(s,u);var h=t.plugins.autoloader;h&&h.loadLanguages(u),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n(function(e,t){return"✖ Error "+e+" while fetching file: "+t}(r.status,r.statusText)):n("✖ Error: File does not exist or is empty"))},r.send(null)}(c,(function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],c=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(a,c).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}l.textContent=e,t.highlightElement(l)}),(function(e){s.setAttribute(n,"failed"),l.textContent=e}))}})),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(b1)),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,l]:a.alias.push(l):a.alias=[l]}}else e(o.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],c=/language-(.+)/.exec(i);if(c){n=c[1];break}}var u,d,h=e.languages[n];if(h)t.content=e.highlight((u=t.content,d=(d=u.replace(a,"")).replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n);var r=s[t];return r||e})),d),h,n);else if(n&&"none"!==n&&e.plugins.autoloader){var p="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=p,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(p);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism);var _1;_1||(_1=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var x1;x1||(x1=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}));var w1;w1||(w1=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism));var S1;S1||(S1=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var k1;k1||(k1=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const C1=globalThis.Prism||window.Prism,E1=e=>{try{return!!e&&C1.languages.hasOwnProperty(e)}catch(e){return!1}};function M1(e,t){for(const n of e.childNodes){if(IK(n)&&n.tagName===t)return!0;M1(n,t)}return!1}const P1="data-language",O1="data-highlight-language";class T1 extends C0{static getType(){return"code"}static clone(e){return new T1(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=E1(e)}createDOM(e){const t=document.createElement("code");p1(t,e.theme.code),t.setAttribute("spellcheck","false");const n=this.getLanguage();return n&&(t.setAttribute(P1,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(O1,n)),t}updateDOM(e,t,n){const r=this.__language,o=e.__language;return r?r!==o&&(t.setAttribute(P1,r),this.__isSyntaxHighlightSupported&&t.setAttribute(O1,r)):o&&(t.removeAttribute(P1),e.__isSyntaxHighlightSupported&&t.removeAttribute(O1)),!1}exportDOM(e){const t=document.createElement("pre");p1(t,e._config.theme.code),t.setAttribute("spellcheck","false");const n=this.getLanguage();return n&&(t.setAttribute(P1,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(O1,n)),{element:t}}static importDOM(){return{code:e=>null!=e.textContent&&(/\r?\n/.test(e.textContent)||M1(e,"BR"))?{conversion:D1,priority:1}:null,div:()=>({conversion:A1,priority:1}),pre:()=>({conversion:D1,priority:0}),table:e=>R1(e)?{conversion:L1,priority:3}:null,td:e=>{const t=e,n=t.closest("table");return t.classList.contains("js-file-line")||n&&R1(n)?{conversion:I1,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&R1(t)?{conversion:I1,priority:3}:null}}}static importJSON(e){return N1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage()}}insertNewAfter(e,t=!0){const n=this.getChildren(),r=n.length;if(r>=2&&"\n"===n[r-1].getTextContent()&&"\n"===n[r-2].getTextContent()&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===r){n[r-1].remove(),n[r-2].remove();const e=F0();return this.insertAfter(e,t),e}const{anchor:o,focus:i}=e,a=(o.isBefore(i)?o:i).getNode();if(_Q(a)){let e=function(e){let t=e,n=e;for(;B1(n)||kQ(n);)t=n,n=n.getPreviousSibling();return t}(a);const t=[];for(;;)if(kQ(e))t.push(SQ()),e=e.getNextSibling();else{if(!B1(e))break;{let n=0;const r=e.getTextContent(),o=e.getTextContentSize();for(;n<o&&" "===r[n];)n++;if(0!==n&&t.push(j1(" ".repeat(n))),n!==o)break;e=e.getNextSibling()}}const n=a.splitText(o.offset)[0],r=0===o.offset?0:1,i=n.getIndexWithinParent()+r,s=a.getParentOrThrow(),l=[tQ(),...t];s.splice(i,0,l);const c=t[t.length-1];c?c.select():0===o.offset?n.selectPrevious():n.getNextSibling().selectNext(0,0)}if(function(e){return e instanceof T1}(a)){const{offset:t}=e.anchor;a.splice(t,0,[tQ()]),a.select(t+1,t+1)}return null}canIndent(){return!1}collapseAtStart(){const e=F0();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}setLanguage(e){const t=this.getWritable();return t.__language=e||void 0,t.__isSyntaxHighlightSupported=E1(e),t}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}}function N1(e){return OK(new T1(e))}function D1(e){return{node:N1(e.getAttribute(P1))}}function A1(e){const t=e,n=z1(t);return n||function(e){let t=e.parentElement;for(;null!==t;){if(z1(t))return!0;t=t.parentElement}return!1}(t)?{node:n?N1():null}:{node:null}}function L1(){return{node:N1()}}function I1(){return{node:null}}function z1(e){return null!==e.style.fontFamily.match("monospace")}function R1(e){return e.classList.contains("js-file-line-container")}class $1 extends uQ{constructor(e="",t,n){super(e,n),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new $1(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){const t=super.createDOM(e);return p1(t,F1(e.theme,this.__highlightType)),t}updateDOM(e,t,n){const r=super.updateDOM(e,t,n),o=F1(n.theme,e.__highlightType),i=F1(n.theme,this.__highlightType);return o!==i&&(o&&f1(t,o),i&&p1(t,i)),r}static importJSON(e){return j1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return N1()}}function F1(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function j1(e="",t){return OK(new $1(e,t))}function B1(e){return e instanceof $1}var H1=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function W1(e){return n2(e)&&c2(e.getFirstChild())}function V1(e){return t2().append(e)}function Y1(e,t){e.splice(e.getChildrenSize(),0,t)}function X1(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&W1(n)&&W1(r)&&(X1(n.getFirstChild(),r.getFirstChild()),r.remove());const o=t.getChildren();o.length>0&&e.append(...o),t.remove()}function q1(e){const t=new Set;if(W1(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),o=e.getPreviousSibling();if(W1(r)&&W1(o)){const n=o.getFirstChild();if(c2(n)){n.append(e);const o=r.getFirstChild();c2(o)&&(Y1(n,o.getChildren()),r.remove(),t.add(r.getKey()))}}else if(W1(r)){const t=r.getFirstChild();if(c2(t)){const n=t.getFirstChild();null!==n&&n.insertBefore(e)}}else if(W1(o)){const t=o.getFirstChild();c2(t)&&t.append(e)}else if(c2(n)){const t=t2(),i=l2(n.getListType());t.append(i),i.append(e),o?o.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function U1(e){if(W1(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(c2(n?n.getParent():void 0)&&n2(n)&&c2(t)){const r=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{const r=t.getListType(),o=t2(),i=l2(r);o.append(i),e.getPreviousSiblings().forEach((e=>i.append(e)));const a=t2(),s=l2(r);a.append(s),Y1(s,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(a),n.replace(e)}}}function Z1(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}class G1 extends C0{static getType(){return"listitem"}static clone(e){return new G1(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){const t=document.createElement("li"),n=this.getParent();return c2(n)&&"check"===n.getListType()&&J1(t,this,null),t.value=this.__value,K1(t,e.theme,this),t}updateDOM(e,t,n){const r=this.getParent();return c2(r)&&"check"===r.getListType()&&J1(t,this,e),t.value=this.__value,K1(t,n.theme,this),!1}static transform(){return e=>{if(n2(e)||H1(144),null==e.__checked)return;const t=e.getParent();c2(t)&&"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:Q1,priority:0})}}static importJSON(e){return t2().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const t=this.createDOM(e._config);return t.style.textAlign=this.getFormatType(),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(E0(n)&&this.canMergeWith(n)){const e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(n2(e))return super.replace(e);this.setIndent(0);const n=this.getParentOrThrow();if(!c2(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{const t=l2(n.getListType());let r=this.getNextSibling();for(;r;){const e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&(E0(e)||H1(139),this.getChildren().forEach((t=>{e.append(t)}))),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){const n=this.getParentOrThrow();if(c2(n)||H1(39),n2(e))return super.insertAfter(e,t);const r=this.getNextSiblings();if(n.insertAfter(e,t),0!==r.length){const o=l2(n.getListType());r.forEach((e=>o.append(e))),e.insertAfter(o,t)}return e}remove(e){const t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&W1(t)&&W1(n)&&(X1(t.getFirstChild(),n.getFirstChild()),n.remove())}insertNewAfter(e,t=!0){const n=t2().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(n,t),n}collapseAtStart(e){const t=F0();this.getChildren().forEach((e=>t.append(e)));const n=this.getParentOrThrow(),r=n.getParentOrThrow(),o=n2(r);if(1===n.getChildrenSize())if(o)n.remove(),r.select();else{n.insertBefore(t),n.remove();const r=e.anchor,o=e.focus,i=t.getKey();"element"===r.type&&r.getNode().is(this)&&r.set(i,r.offset,"element"),"element"===o.type&&o.getNode().is(this)&&o.set(i,o.offset,"element")}else n.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const t=this.getWritable();return t.__value=e,t}getChecked(){const e=this.getLatest();let t;const n=this.getParent();return c2(n)&&(t=n.getListType()),"check"===t?Boolean(e.__checked):void 0}setChecked(e){const t=this.getWritable();return t.__checked=e,t}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(null===e)return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;n2(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){"number"!=typeof e&&H1(117),(e=Math.floor(e))>=0||H1(199);let t=this.getIndent();for(;t!==e;)t<e?(q1(this),t++):(U1(this),t--);return this}canInsertAfter(e){return n2(e)}canReplaceWith(e){return n2(e)}canMergeWith(e){return n2(e)||j0(e)}extractWithChild(e,t){if(!NQ(t))return!1;const n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return l2("bullet")}canMergeWhenEmpty(){return!0}}function K1(e,t,n){const r=[],o=[],i=t.list,a=i?i.listitem:void 0;let s;if(i&&i.nested&&(s=i.nested.listitem),void 0!==a&&r.push(...Z1(a)),i){const e=n.getParent(),t=c2(e)&&"check"===e.getListType(),a=n.getChecked();t&&!a||o.push(i.listitemUnchecked),t&&a||o.push(i.listitemChecked),t&&r.push(a?i.listitemChecked:i.listitemUnchecked)}if(void 0!==s){const e=Z1(s);n.getChildren().some((e=>c2(e)))?r.push(...e):o.push(...e)}o.length>0&&f1(e,...o),r.length>0&&p1(e,...r)}function J1(e,t,n,r){c2(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function Q1(e){if(e.classList.contains("task-list-item"))for(const t of e.children)if("INPUT"===t.tagName)return e2(t);const t=e.getAttribute("aria-checked");return{node:t2("true"===t||"false"!==t&&void 0)}}function e2(e){return"checkbox"!==e.getAttribute("type")?{node:null}:{node:t2(e.hasAttribute("checked"))}}function t2(e){return OK(new G1(void 0,e))}function n2(e){return e instanceof G1}class r2 extends C0{static getType(){return"list"}static clone(e){const t=e.__listType||s2[e.__tag];return new r2(t,e.__start,e.__key)}constructor(e="number",t=1,n){super(n);const r=s2[e]||e;this.__listType=r,this.__tag="number"===r?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){const t=this.getWritable();return t.__listType=e,t.__tag="number"===e?"ol":"ul",t}getListType(){return this.__listType}getStart(){return this.__start}setStart(e){const t=this.getWritable();return t.__start=e,t}createDOM(e,t){const n=this.__tag,r=document.createElement(n);return 1!==this.__start&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,o2(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||(o2(t,n.theme,this),!1)}static transform(){return e=>{c2(e)||H1(163),function(e){const t=e.getNextSibling();c2(t)&&e.getListType()===t.getListType()&&X1(e,t)}(e),function(e){const t="check"!==e.getListType();let n=e.getStart();for(const r of e.getChildren())n2(r)&&(r.getValue()!==n&&r.setValue(n),t&&null!=r.getLatest().__checked&&r.setChecked(void 0),c2(r.getFirstChild())||n++)}(e)}}static importDOM(){return{ol:()=>({conversion:a2,priority:0}),ul:()=>({conversion:a2,priority:0})}}static importJSON(e){return l2().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const t=this.createDOM(e._config,e);return IK(t)&&(1!==this.__start&&t.setAttribute("start",String(this.__start)),"check"===this.__listType&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(n2(n))super.append(n);else{const e=t2();if(c2(n))e.append(n);else if(E0(n))if(n.isInline())e.append(n);else{const t=bQ(n.getTextContent());e.append(t)}else e.append(n);super.append(e)}}return this}extractWithChild(e){return n2(e)}}function o2(e,t,n){const r=[],o=[],i=t.list;if(void 0!==i){const e=i[`${n.__tag}Depth`]||[],t=function(e){let t=1,n=e.getParent();for(;null!=n;){if(n2(n)){const e=n.getParent();if(c2(e)){t++,n=e.getParent();continue}H1(40)}return t}return t}(n)-1,a=t%e.length,s=e[a],l=i[n.__tag];let c;const u=i.nested,d=i.checklist;if(void 0!==u&&u.list&&(c=u.list),void 0!==l&&r.push(l),void 0!==d&&"check"===n.__listType&&r.push(d),void 0!==s){r.push(...Z1(s));for(let t=0;t<e.length;t++)t!==a&&o.push(n.__tag+t)}if(void 0!==c){const e=Z1(c);t>1?r.push(...e):o.push(...e)}}o.length>0&&f1(e,...o),r.length>0&&p1(e,...r)}function i2(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(n2(r)){t.push(r);const e=r.getChildren();e.length>1&&e.forEach((e=>{c2(e)&&t.push(V1(e))}))}else t.push(V1(r))}return t}function a2(e){const t=e.nodeName.toLowerCase();let n=null;return"ol"===t?n=l2("number",e.start):"ul"===t&&(n=function(e){if("check"===e.getAttribute("__lexicallisttype")||e.classList.contains("contains-task-list"))return!0;for(const t of e.childNodes)if(IK(t)&&t.hasAttribute("aria-checked"))return!0;return!1}(e)?l2("check"):l2("bullet")),{after:i2,node:n}}const s2={ol:"number",ul:"bullet"};function l2(e="number",t=1){return OK(new r2(e,t))}function c2(e){return e instanceof r2}const u2={},d2={};function h2(e,t){const n=t.body?t.body.childNodes:[];let r=[];const o=[];for(let t=0;t<n.length;t++){const i=n[t];if(!m2.has(i.nodeName)){const t=g2(i,e,o,!1);null!==t&&(r=r.concat(t))}}return function(e){for(const t of e)t.getNextSibling()instanceof z0&&t.insertAfter(tQ());for(const t of e){const e=t.getChildren();for(const n of e)t.insertBefore(n);t.remove()}}(o),r}function p2(e,t){if("undefined"==typeof document||"undefined"==typeof window&&void 0===global.window)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=KG().getChildren();for(let o=0;o<r.length;o++)f2(e,r[o],n,t);return n.innerHTML}function f2(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=E0(t)&&t.excludeFromCopy("html");let a=t;if(null!==r){let e=YK(t);e=_Q(e)&&null!==r?G0(r,e):e,a=e}const s=E0(a)?a.getChildren():[],l=e._nodes.get(a.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,a):a.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const h=document.createDocumentFragment();for(let n=0;n<s.length;n++){const i=s[n],a=f2(e,i,h,r);!o&&E0(t)&&a&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if((IK(u)||RK(u))&&u.append(h),n.append(u),d){const e=d.call(a,u);e&&(RK(u)?u.replaceChildren(e):u.replaceWith(e))}}else n.append(h);return o}const m2=new Set(["STYLE","SCRIPT"]);function g2(e,t,n,r,o=new Map,i){let a=[];if(m2.has(e.nodeName))return a;let s=null;const l=function(e,t){const{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase());let o=null;if(void 0!==r)for(const t of r){const n=t(e);null!==n&&(null===o||(o.priority||0)<=(n.priority||0))&&(o=n)}return null!==o?o.conversion:null}(e,t),c=l?l(e):null;let u=null;if(null!==c){u=c.after;const t=c.node;if(s=Array.isArray(t)?t[t.length-1]:t,null!==s){for(const[,e]of o)if(s=e(s,i),!s)break;s&&a.push(...Array.isArray(t)?t:[s])}null!=c.forChild&&o.set(e.nodeName,c.forChild)}const d=e.childNodes;let h=[];const p=(null==s||!PK(s))&&(null!=s&&BQ(s)||r);for(let e=0;e<d.length;e++)h.push(...g2(d[e],t,n,p,new Map(o),s));return null!=u&&(h=u(h)),FK(e)&&(h=function(e,t,n){const r=e.style.textAlign,o=[];let i=[];for(let e=0;e<t.length;e++){const a=t[e];if(BQ(a))r&&!a.getFormat()&&a.setFormat(r),o.push(a);else if(i.push(a),e===t.length-1||e<t.length-1&&BQ(t[e+1])){const e=n();e.setFormat(r),e.append(...i),o.push(e),i=[]}}return o}(e,h,p?()=>{const e=new z0;return n.push(e),e}:F0)),null==s?h.length>0?a=a.concat(h):FK(e)&&function(e){return null!=e.nextSibling&&null!=e.previousSibling&&($K(e.nextSibling)&&$K(e.previousSibling))}(e)&&(a=a.concat(tQ())):E0(s)&&s.append(...h),a}var v2=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function y2(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const e=JSON.parse(r);if(e.namespace===n._config.namespace&&Array.isArray(e.nodes))return b2(n,function(e){const t=[];for(let n=0;n<e.length;n++){const r=f0(e[n]);_Q(r)&&J0(r),t.push(r)}return t}(e.nodes),t)}catch(e){}const o=e.getData("text/html");if(o)try{return b2(n,h2(n,(new DOMParser).parseFromString(function(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(e):e}(o),"text/html")),t)}catch(e){}const i=e.getData("text/plain")||e.getData("text/uri-list");if(null!=i)if(NQ(t)){const e=i.split(/(\r?\n|\t)/);""===e[e.length-1]&&e.pop();for(let t=0;t<e.length;t++){const n=YQ();if(NQ(n)){const r=e[t];"\n"===r||"\r\n"===r?n.insertParagraph():"\t"===r?n.insertNodes([SQ()]):n.insertText(r)}}}else t.insertRawText(i)}function b2(e,t,n){e.dispatchCommand(VU,{nodes:t,selection:n})||n.insertNodes(t)}function _2(e,t,n,r=[]){let o=null===t||n.isSelected(t);const i=E0(n)&&n.excludeFromCopy("html");let a=n;if(null!==t){let e=YK(n);e=_Q(e)&&null!==t?G0(t,e):e,a=e}const s=E0(a)?a.getChildren():[],l=function(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&v2(58,n.name),E0(e)){const e=t.children;Array.isArray(e)||v2(59,n.name)}return t}(a);if(_Q(a)){const e=a.__text;e.length>0?l.text=e:o=!1}for(let r=0;r<s.length;r++){const i=s[r],a=_2(e,t,i,l.children);!o&&E0(n)&&a&&n.extractWithChild(i,t,"clone")&&(o=!0)}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let e=0;e<l.children.length;e++){const t=l.children[e];r.push(t)}return o}let x2=null;async function w2(e,t,n){if(null!==x2)return!1;if(null!==t)return new Promise(((r,o)=>{e.update((()=>{r(S2(e,t,n))}))}));const r=e.getRootElement(),o=null==e._window?window.document:e._window.document,i=AK(e._window);if(null===r||null===i)return!1;const a=o.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(o.createTextNode("#")),r.append(a);const s=new Range;return s.setStart(a,0),s.setEnd(a,1),i.removeAllRanges(),i.addRange(s),new Promise(((t,r)=>{const i=e.registerCommand(kZ,(r=>(g1(r,ClipboardEvent)&&(i(),null!==x2&&(window.clearTimeout(x2),x2=null),t(S2(e,r,n))),!0)),4);x2=window.setTimeout((()=>{i(),x2=null,t(!1)}),50),o.execCommand("copy"),a.remove()}))}function S2(e,t,n){if(void 0===n){const t=AK(e._window);if(!t)return!1;const r=t.anchorNode,o=t.focusNode;if(null!==r&&null!==o&&!AG(e,r,o))return!1;const i=YQ();if(null===i)return!1;n=function(e=YQ()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=c0();for(const[r,o]of k2){const i=o(n,e);null!==i&&(t[r]=i)}}return t}(i)}t.preventDefault();const r=t.clipboardData;return null!==r&&(function(e,t){for(const n in t){const r=t[n];void 0!==r&&e.setData(n,r)}}(r,n),!0)}const k2=[["text/html",function(e,t=YQ()){return null==t&&v2(166),NQ(t)&&t.isCollapsed()||0===t.getNodes().length?"":p2(e,t)}],["application/x-lexical-editor",function(e,t=YQ()){return null==t&&v2(166),NQ(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(function(e,t){const n=[],r=KG().getChildren();for(let o=0;o<r.length;o++)_2(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}(e,t))}]];function C2(e,t){if(void 0!==document.caretRangeFromPoint){const n=document.caretRangeFromPoint(e,t);return null===n?null:{node:n.startContainer,offset:n.startOffset}}if("undefined"!==document.caretPositionFromPoint){const n=document.caretPositionFromPoint(e,t);return null===n?null:{node:n.offsetNode,offset:n.offset}}return null}const E2="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,M2=E2&&"documentMode"in document?document.documentMode:null,P2=!(!E2||!("InputEvent"in window)||M2)&&"getTargetRanges"in new window.InputEvent("input"),O2=E2&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),T2=E2&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,N2=E2&&/^(?=.*Chrome).*/i.test(navigator.userAgent),D2=E2&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!N2,A2={};class L2 extends C0{static getType(){return"quote"}static clone(e){return new L2(e.__key)}createDOM(e){const t=document.createElement("blockquote");return p1(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:F2,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(IK(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return I2().updateFromJSON(e)}insertNewAfter(e,t){const n=F0(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){const e=F0();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function I2(){return OK(new L2)}class z2 extends C0{static getType(){return"heading"}static clone(e){return new z2(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){const t=this.getWritable();return this.__tag=e,t}createDOM(e){const t=this.__tag,n=document.createElement(t),r=e.theme.heading;if(void 0!==r){p1(n,r[t])}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:$2,priority:0}),h2:e=>({conversion:$2,priority:0}),h3:e=>({conversion:$2,priority:0}),h4:e=>({conversion:$2,priority:0}),h5:e=>({conversion:$2,priority:0}),h6:e=>({conversion:$2,priority:0}),p:e=>{const t=e.firstChild;return null!==t&&R2(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>R2(e)?{conversion:e=>({node:j2("h1")}),priority:3}:null}}exportDOM(e){const{element:t}=super.exportDOM(e);if(IK(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return j2(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){const n=e?e.anchor.offset:0,r=this.getLastDescendant(),o=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?F0():j2(this.getTag()),i=this.getDirection();if(o.setDirection(i),this.insertAfter(o,t),0===n&&!this.isEmpty()&&e){const e=F0();e.select(),this.replace(e,!0)}return o}collapseAtStart(){const e=this.isEmpty()?F0():j2(this.getTag());return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function R2(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function $2(e){const t=e.nodeName.toLowerCase();let n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=j2(t),null!==e.style&&(XK(e,n),n.setFormat(e.style.textAlign))),{node:n}}function F2(e){const t=I2();return null!==e.style&&(t.setFormat(e.style.textAlign),XK(e,t)),{node:t}}function j2(e="h1"){return OK(new z2(e))}function B2(e){let t=null;if(g1(e,DragEvent)?t=e.dataTransfer:g1(e,ClipboardEvent)&&(t=e.clipboardData),null===t)return[!1,[],!1];const n=t.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),o]}function H2(e){const t=YQ();if(!NQ(t))return!1;const n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){const o=r[t],i=o.getKey();if(n.has(i))continue;const a=m1(o,(e=>E0(e)&&!e.isInline()));if(null===a)continue;const s=a.getKey();a.canIndent()&&!n.has(s)&&(n.add(s),e(a))}return n.size>0}function W2(e){return O0(UG(e))}function V2(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function Y2(e){return h1(e.registerCommand(YU,(e=>{const t=YQ();return!!AQ(t)&&(t.clear(),!0)}),0),e.registerCommand(XU,(e=>{const t=YQ();return!!NQ(t)&&(t.deleteCharacter(e),!0)}),0),e.registerCommand(JU,(e=>{const t=YQ();return!!NQ(t)&&(t.deleteWord(e),!0)}),0),e.registerCommand(QU,(e=>{const t=YQ();return!!NQ(t)&&(t.deleteLine(e),!0)}),0),e.registerCommand(ZU,(t=>{const n=YQ();if("string"==typeof t)null!==n&&n.insertText(t);else{if(null===n)return!1;const r=t.dataTransfer;if(null!=r)y2(r,n,e);else if(NQ(n)){const e=t.data;return e&&n.insertText(e),!0}}return!0}),0),e.registerCommand(KU,(()=>{const e=YQ();return!!NQ(e)&&(e.removeText(),!0)}),0),e.registerCommand(eZ,(e=>{const t=YQ();return!!NQ(t)&&(t.formatText(e),!0)}),0),e.registerCommand(_Z,(e=>{const t=YQ();if(!NQ(t)&&!AQ(t))return!1;const n=t.getNodes();for(const t of n){const n=m1(t,(e=>E0(e)&&!e.isInline()));null!==n&&n.setFormat(e)}return!0}),0),e.registerCommand(qU,(e=>{const t=YQ();return!!NQ(t)&&(t.insertLineBreak(e),!0)}),0),e.registerCommand(UU,(()=>{const e=YQ();return!!NQ(e)&&(e.insertParagraph(),!0)}),0),e.registerCommand(gZ,(()=>(function(e){let t=YQ()||XQ();null===t&&(t=KG().selectEnd()),t.insertNodes(e)}([SQ()]),!0)),0),e.registerCommand(vZ,(()=>H2((e=>{const t=e.getIndent();e.setIndent(t+1)}))),0),e.registerCommand(yZ,(()=>H2((e=>{const t=e.getIndent();t>0&&e.setIndent(t-1)}))),0),e.registerCommand(lZ,(e=>{const t=YQ();if(AQ(t)&&!W2(e.target)){const e=t.getNodes();if(e.length>0)return e[0].selectPrevious(),!0}else if(NQ(t)){const n=yK(t.focus,!0);if(!e.shiftKey&&O0(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1}),0),e.registerCommand(cZ,(e=>{const t=YQ();if(AQ(t)){const e=t.getNodes();if(e.length>0)return e[0].selectNext(0,0),!0}else if(NQ(t)){if(function(e){const t=e.focus;return"root"===t.key&&t.offset===KG().getChildrenSize()}(t))return e.preventDefault(),!0;const n=yK(t.focus,!1);if(!e.shiftKey&&O0(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),e.preventDefault(),!0}return!1}),0),e.registerCommand(aZ,(e=>{const t=YQ();if(AQ(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectPrevious(),!0}if(!NQ(t))return!1;if(n1(t,!0)){const n=e.shiftKey;return e.preventDefault(),r1(t,n,!0),!0}return!1}),0),e.registerCommand(oZ,(e=>{const t=YQ();if(AQ(t)&&!W2(e.target)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectNext(0,0),!0}if(!NQ(t))return!1;const n=e.shiftKey;return!!n1(t,!1)&&(e.preventDefault(),r1(t,n,!1),!0)}),0),e.registerCommand(hZ,(t=>{if(W2(t.target))return!1;const n=YQ();if(!NQ(n))return!1;const{anchor:r}=n,o=r.getNode();return n.isCollapsed()&&0===r.offset&&!N0(o)&&function(e){const t=m1(e,(e=>E0(e)&&!e.isInline()));return E0(t)||s1(4,e.__key),t}(o).getIndent()>0?(t.preventDefault(),e.dispatchCommand(yZ,void 0)):(!T2||"ko-KR"!==navigator.language)&&(t.preventDefault(),e.dispatchCommand(XU,!0))}),0),e.registerCommand(fZ,(t=>{if(W2(t.target))return!1;return!!NQ(YQ())&&(t.preventDefault(),e.dispatchCommand(XU,!1))}),0),e.registerCommand(uZ,(t=>{const n=YQ();if(!NQ(n))return!1;if(V2(n),null!==t){if((T2||O2||D2)&&P2)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(qU,!1)}return e.dispatchCommand(UU,void 0)}),0),e.registerCommand(pZ,(()=>!!NQ(YQ())&&(e.blur(),!0)),0),e.registerCommand(bZ,(t=>{const[,n]=B2(t);if(n.length>0){const r=C2(t.clientX,t.clientY);if(null!==r){const{offset:t,node:o}=r,i=UG(o);if(null!==i){const e=function(){const e=EQ("root",0,"element"),t=EQ("root",0,"element");return new DQ(e,t,0,"")}();if(_Q(i))e.anchor.set(i.getKey(),t,"text"),e.focus.set(i.getKey(),t,"text");else{const t=i.getParentOrThrow().getKey(),n=i.getIndexWithinParent()+1;e.anchor.set(t,n,"element"),e.focus.set(t,n,"element")}QG(PG(e))}e.dispatchCommand(A2,n)}return t.preventDefault(),!0}return!!NQ(YQ())}),0),e.registerCommand(xZ,(e=>{const[t]=B2(e),n=YQ();return!(t&&!NQ(n))}),0),e.registerCommand(wZ,(e=>{const[t]=B2(e),n=YQ();if(t&&!NQ(n))return!1;const r=C2(e.clientX,e.clientY);if(null!==r){O0(UG(r.node))&&e.preventDefault()}return!0}),0),e.registerCommand(EZ,(()=>(function(e){const t=KG();if(NQ(e)){const t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),PG(e),e}{const e=t.select(0,t.getChildrenSize());QG(PG(e))}}(),!0)),0),e.registerCommand(kZ,(t=>(w2(e,g1(t,ClipboardEvent)?t:null),!0)),0),e.registerCommand(CZ,(t=>(async function(e,t){await w2(t,g1(e,ClipboardEvent)?e:null),t.update((()=>{const e=YQ();NQ(e)?e.removeText():AQ(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,e),!0)),0),e.registerCommand(GU,(t=>{const[,n,r]=B2(t);return n.length>0&&!r?(e.dispatchCommand(A2,n),!0):(!zK(t.target)||!DG(t.target))&&(null!==YQ()&&(function(e,t){e.preventDefault(),t.update((()=>{const n=YQ(),r=g1(e,InputEvent)||g1(e,KeyboardEvent)?null:e.clipboardData;null!=r&&null!==n&&y2(r,n,t)}),{tag:"paste"})}(t,e),!0))}),0),e.registerCommand(dZ,(e=>{const t=YQ();return NQ(t)&&V2(t),!1}),0),e.registerCommand(mZ,(e=>{const t=YQ();return NQ(t)&&V2(t),!1}),0))}var X2=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const q2=m(null);function U2(){const e=p(q2);return null==e&&X2(8),e}const Z2="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,G2=Z2?d:l,K2={tag:"history-merge"};function J2({initialConfig:t,children:n}){const r=i((()=>{const{theme:e,namespace:n,nodes:r,onError:o,editorState:i,html:a}=t,s=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}}(null,e),l=H0({editable:t.editable,html:a,namespace:n,nodes:r,onError:e=>o(e,l),theme:e});return function(e,t){if(null!==t)if(void 0===t)e.update((()=>{const t=KG();if(t.isEmpty()){const n=F0();t.append(n);const r=Z2?document.activeElement:null;(null!==YQ()||null!==r&&r===e.getRootElement())&&n.select()}}),K2);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,K2);break}case"object":e.setEditorState(t,K2);break;case"function":e.update((()=>{KG().isEmpty()&&t(e)}),K2)}}(l,i),[l,s]}),[]);return G2((()=>{const e=t.editable,[n]=r;n.setEditable(void 0===e||e)}),[]),e(q2.Provider,{value:r,children:n})}var Q2="LexicalContent-module_editableContent__f69V7",e5="LexicalContent-module_placeholder__EMU-N",t5="LexicalContent-module_editorContainer__l2-r1";function n5({defaultSelection:e}){const[t]=U2();return l((()=>{t.focus((()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})}),{defaultSelection:e})}),[e,t]),null}const r5="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d:l;function o5(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function i5(e,t=!0){if(e)return!1;let n=KG().getTextContent();return t&&(n=n.trim()),""===n}function a5(e){return()=>function(e){if(!i5(e,!1))return!1;const t=KG().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){const n=t[e];if(O0(n))return!1;if(E0(n)){if(!j0(n))return!1;if(0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!_Q(t[e]))return!1}}return!0}(e)}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const s5="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d:l;function l5(e){return e.getEditorState().read(a5(e.isComposing()))}function c5({contentEditable:r,placeholder:o=null,ErrorBoundary:a}){const[s]=U2(),c=function(t,n){const[r,o]=u((()=>t.getDecorators()));return s5((()=>t.registerDecoratorListener((e=>{T((()=>{o(e)}))}))),[t]),l((()=>{o(t.getDecorators())}),[t]),i((()=>{const o=[],i=Object.keys(r);for(let a=0;a<i.length;a++){const s=i[a],l=e(n,{onError:e=>t._onError(e),children:e(C,{fallback:null,children:r[s]})}),c=t.getElementByKey(s);null!==c&&o.push(P(l,c,s))}return o}),[n,r,t])}(s,a);return function(e){s5((()=>h1(Y2(e),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,a,s,l]=t;e.update((()=>{const e=YQ();if(NQ(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(_Q(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),_Q(l)){c=a,u=a+s;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(e))),[e])}(s),t(n,{children:[r,e(u5,{content:o}),c]})}function u5({content:e}){const[t]=U2(),n=function(e){const[t,n]=u((()=>l5(e)));return s5((()=>{function t(){const t=l5(e);n(t)}return t(),h1(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),r=function(e){const[t]=U2(),n=i((()=>e(t)),[t,e]),[r,o]=u((()=>n.initialValueFn())),a=s(r);return r5((()=>{const{initialValueFn:e,subscribe:t}=n,r=e();return a.current!==r&&(a.current=r,o(r)),t((e=>{a.current=e,o(e)}))}),[n,e]),r}(o5);return n?"function"==typeof e?e(r):e:null}const d5="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d:l;const h5=h((function({editor:t,ariaActiveDescendant:n,ariaAutoComplete:r,ariaControls:o,ariaDescribedBy:a,ariaErrorMessage:s,ariaExpanded:l,ariaInvalid:d,ariaLabel:h,ariaLabelledBy:p,ariaMultiline:f,ariaOwns:m,ariaRequired:g,autoCapitalize:v,className:y,id:b,role:_="textbox",spellCheck:x=!0,style:w,tabIndex:S,"data-testid":k,...C},E){const[M,P]=u(t.isEditable()),O=c((e=>{e&&e.ownerDocument&&e.ownerDocument.defaultView?t.setRootElement(e):t.setRootElement(null)}),[t]),T=i((()=>function(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}(E,O)),[O,E]);return d5((()=>(P(t.isEditable()),t.registerEditableListener((e=>{P(e)})))),[t]),e("div",{"aria-activedescendant":M?n:void 0,"aria-autocomplete":M?r:"none","aria-controls":M?o:void 0,"aria-describedby":a,...null!=s?{"aria-errormessage":s}:{},"aria-expanded":M&&"combobox"===_?!!l:void 0,...null!=d?{"aria-invalid":d}:{},"aria-label":h,"aria-labelledby":p,"aria-multiline":f,"aria-owns":M?m:void 0,"aria-readonly":!M||void 0,"aria-required":g,autoCapitalize:v,className:y,contentEditable:M,"data-testid":k,id:b,ref:T,role:M?_:void 0,spellCheck:x,style:w,tabIndex:S,...C})}));function p5(e){return e.getEditorState().read(a5(e.isComposing()))}const f5=h((function(r,o){const{placeholder:i,...a}=r,[s]=U2();return t(n,{children:[e(h5,{editor:s,...a,ref:o}),null!=i&&e(m5,{editor:s,content:i})]})}));function m5({content:t,editor:n}){const r=function(e){const[t,n]=u((()=>p5(e)));return d5((()=>{function t(){const t=p5(e);n(t)}return t(),h1(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(n),[o,i]=u(n.isEditable());if(d((()=>(i(n.isEditable()),n.registerEditableListener((e=>{i(e)})))),[n]),!r)return null;let a=null;return"function"==typeof t?a=t(o):null!==t&&(a=t),null===a?null:e("div",{"aria-hidden":!0,children:a})}function g5(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,a=e._selection;if(o)return 1;if(!(NQ(i)&&NQ(a)&&a.isCollapsed()&&i.isCollapsed()))return 0;const s=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||N0(n)||o.push(n)}return o}(t,n,r);if(0===s.length)return 0;if(s.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(a.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&_Q(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!_Q(c)||!_Q(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const h=i.anchor,p=a.anchor;if(h.key!==p.key||"text"!==h.type)return 0;const f=h.offset,m=p.offset,g=d.length-u.length;return 1===g&&m===f-1?2:-1===g&&m===f+1?3:-1===g&&m===f?4:0}function v5(e,t){let n=Date.now(),r=0;return(o,i,a,s,l,c)=>{const u=Date.now();if(c.has("historic"))return r=0,n=u,2;const d=g5(o,i,s,l,e.isComposing()),h=(()=>{const h=null===a||a.editor===e,p=c.has("history-push");if(!p&&h&&c.has("history-merge"))return 0;if(null===o)return 1;const f=i._selection;return s.size>0||l.size>0?!1===p&&0!==d&&d===r&&u<n+t&&h||1===s.size&&function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,a=n._selection;return!(NQ(i)&&NQ(a)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===a.anchor.type&&"text"===a.focus.type||!_Q(r)||!_Q(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read((()=>r.exportJSON())))===JSON.stringify(n.read((()=>o.exportJSON())))}(Array.from(s)[0],o,i)?0:1:null!==f?0:2})();return n=u,r=d,h}}function y5(e){e.undoStack=[],e.redoStack=[],e.current=null}function b5({delay:e,externalHistoryState:t}){const[n]=U2();return function(e,t,n=1e3){const r=i((()=>t||{current:null,redoStack:[],undoStack:[]}),[t]);l((()=>function(e,t,n){const r=v5(e,n),o=h1(e.registerCommand(tZ,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(OZ,!0)),0===r.length&&e.dispatchCommand(TZ,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(nZ,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(TZ,!0));const i=n.pop();0===n.length&&e.dispatchCommand(OZ,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(MZ,(()=>(y5(t),!1)),0),e.registerCommand(PZ,(()=>(y5(t),e.dispatchCommand(OZ,!1),e.dispatchCommand(TZ,!1),!0)),0),e.registerUpdateListener((({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null!==l&&n===d)return;const h=r(o,n,l,i,a,s);if(1===h)0!==c.length&&(t.redoStack=[],e.dispatchCommand(OZ,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(TZ,!0));else if(2===h)return;t.current={editor:e,editorState:n}})));return o}(e,r,n)),[n,e,r])}(n,t,e),null}function _5(e,t){return _5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_5(e,t)}var x5={error:null},w5=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=x5,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,_5(t,n),o.getDerivedStateFromError=function(e){return{error:e}};var i=o.prototype;return i.reset=function(){this.setState(x5)},i.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},i.componentDidUpdate=function(e,t){var n,r,o,i,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(o=e.resetKeys)&&(o=[]),void 0===(i=s)&&(i=[]),o.length!==i.length||o.some((function(e,t){return!Object.is(e,i[t])})))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,s),this.reset())},i.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,o=t.FallbackComponent,i=t.fallback;if(null!==e){var a={error:e,resetErrorBoundary:this.resetErrorBoundary};if(r.isValidElement(i))return i;if("function"==typeof n)return n(a);if(o)return r.createElement(o,a);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},o}(r.Component);function S5({children:t,onError:n}){return e(w5,{fallback:e("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:n,children:t})}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const k5=new Set(["http:","https:","mailto:","sms:","tel:"]);class C5 extends C0{static getType(){return"link"}static clone(e){return new C5(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},n){super(n);const{target:r=null,rel:o=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=o,this.__title=i}createDOM(e){const t=document.createElement("a");return t.href=this.sanitizeUrl(this.__url),null!==this.__target&&(t.target=this.__target),null!==this.__rel&&(t.rel=this.__rel),null!==this.__title&&(t.title=this.__title),p1(t,e.theme.link),t}updateDOM(e,t,n){if(LK(t)){const n=this.__url,r=this.__target,o=this.__rel,i=this.__title;n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),o!==e.__rel&&(o?t.rel=o:t.removeAttribute("rel")),i!==e.__title&&(i?t.title=i:t.removeAttribute("title"))}return!1}static importDOM(){return{a:e=>({conversion:E5,priority:1})}}static importJSON(e){return M5().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){try{const t=new URL(e);if(!k5.has(t.protocol))return"about:blank"}catch(t){return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){const t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){const t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){const t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){const n=M5(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!NQ(t))return!1;const r=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(o)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function E5(e){let t=null;if(LK(e)){const n=e.textContent;(null!==n&&""!==n||e.children.length>0)&&(t=M5(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function M5(e="",t){return OK(new C5(e,t))}function P5(e){return e instanceof C5}function O5({label:n,value:r,onChange:o,placeholder:i="","data-test-id":a,type:s="text"}){return t("div",{className:"Input__wrapper",children:[e("label",{className:"Input__label",children:n}),e("input",{type:s,className:"Input__input",placeholder:i,value:r,onChange:e=>{o(e.target.value)},"data-test-id":a})]})}let T5=!1;const N5=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000000","#4a4a4a","#9b9b9b","#ffffff"],D5=214;function A5({color:n,onChange:r}){const[o,a]=u(j5("hex",n)),[c,d]=u(n),h=s(null),p=i((()=>({x:o.hsv.s/100*D5,y:(100-o.hsv.v)/100*150})),[o.hsv.s,o.hsv.v]),f=i((()=>({x:o.hsv.h/360*D5})),[o.hsv]);return l((()=>{null!==h.current&&r&&(r(o.hex,T5),d(o.hex))}),[o,r]),l((()=>{if(void 0===n)return;const e=j5("hex",n);a(e),d(e.hex)}),[n]),t("div",{className:"color-picker-wrapper",style:{width:D5},ref:h,children:[e(O5,{label:"Hex",onChange:e=>{if(d(e),/^#[0-9A-Fa-f]{6}$/i.test(e)){const t=j5("hex",e);a(t)}},value:c}),e("div",{className:"color-picker-basic-color",children:N5.map((t=>e("button",{className:t===o.hex?" active":"",style:{backgroundColor:t},onClick:()=>{d(t),a(j5("hex",t))}},t)))}),e(L5,{className:"color-picker-saturation",style:{backgroundColor:`hsl(${o.hsv.h}, 100%, 50%)`},onChange:({x:e,y:t})=>{const n=j5("hsv",{...o.hsv,s:e/D5*100,v:100-t/150*100});a(n),d(n.hex)},children:e("div",{className:"color-picker-saturation_cursor",style:{backgroundColor:o.hex,left:p.x,top:p.y}})}),e(L5,{className:"color-picker-hue",onChange:({x:e})=>{const t=j5("hsv",{...o.hsv,h:e/D5*360});a(t),d(t.hex)},children:e("div",{className:"color-picker-hue_cursor",style:{backgroundColor:`hsl(${o.hsv.h}, 100%, 50%)`,left:f.x}})}),e("div",{className:"color-picker-color",style:{backgroundColor:o.hex}})]})}function L5({className:t,style:n,onChange:r,children:o}){const i=s(null),a=s(!1),l=e=>{if(i.current){const{current:t}=i,{width:n,height:o,left:a,top:s}=t.getBoundingClientRect(),l=function(e){let t=1;if(function(){if(void 0===v1){const e=document.createElement("div");e.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(e);const t=e.getBoundingClientRect();e.style.setProperty("zoom","2"),v1=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return v1}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}(t),c=I5(e.clientX/l-a,n,0),u=I5(e.clientY/l-s,o,0);r({x:c,y:u})}};return e("div",{ref:i,className:t,style:n,onMouseDown:e=>{if(0!==e.button)return;l(e);const t=e=>{a.current=!0,T5=!0,l(e)},n=e=>{a.current&&(T5=!1),document.removeEventListener("mousemove",t,!1),document.removeEventListener("mouseup",n,!1),l(e),a.current=!1};document.addEventListener("mousemove",t,!1),document.addEventListener("mouseup",n,!1)},children:o})}function I5(e,t,n){return e>t?t:e<n?n:e}function z5(e){if(!e.startsWith("#")){const t=document.createElement("canvas").getContext("2d");if(!t)throw new Error("2d context not supported or canvas already initialized");return t.fillStyle=e,t.fillStyle}return 4===e.length||5===e.length?(e=e.split("").map(((e,t)=>t?e+e:"#")).join(""),e):7===e.length||9===e.length?e:"#000000"}function R5(e){const t=(e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((e,t,n,r)=>"#"+t+t+n+n+r+r)).substring(1).match(/.{2}/g)||[]).map((e=>parseInt(e,16)));return{b:t[2],g:t[1],r:t[0]}}function $5({r:e,g:t,b:n}){e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=r-Math.min(e,t,n);return{h:o?60*(r===e?(t-n)/o+(t<n?6:0):r===t?2+(n-e)/o:4+(e-t)/o):0,s:r?o/r*100:0,v:100*r}}function F5({b:e,g:t,r:n}){return"#"+[n,t,e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function j5(e,t){let n=z5("#121212"),r=R5(n),o=$5(r);if("hex"===e){n=z5(t),r=R5(n),o=$5(r)}else if("rgb"===e){r=t,n=F5(r),o=$5(r)}else if("hsv"===e){o=t,r=function({h:e,s:t,v:n}){const r=~~(e/60),o=e/60-r,i=(n/=100)*(1-(t/=100)),a=n*(1-t*o),s=n*(1-t*(1-o)),l=r%6,c=Math.round(255*[n,a,i,i,s,n][l]),u=Math.round(255*[s,n,n,a,i,i][l]);return{b:Math.round(255*[i,i,s,n,n,a][l]),g:u,r:c}}(o),n=F5(r)}return{hex:n,hsv:o,rgb:r}}const B5=r.createContext(null);function H5({children:t,className:n,onClick:o,title:i}){const a=s(null),c=r.useContext(B5);if(null===c)throw new Error("DropDownItem must be used within a DropDown");const{registerItem:u}=c;return l((()=>{a&&a.current&&u(a)}),[a,u]),e("button",{className:`item ${n}`,onClick:o,ref:a,title:i,type:"button",children:t})}function W5({children:t,dropDownRef:n,onClose:r}){const[o,a]=u(),[s,d]=u(),h=c((e=>{a((t=>t?[...t,e]:[e]))}),[a]),p=i((()=>({registerItem:h})),[h]);return l((()=>{o&&!s&&d(o[0]),s&&s.current&&s.current.focus()}),[o,s]),e(B5.Provider,{value:p,children:e("div",{className:"dropdown",ref:n,onKeyDown:e=>{if(!o)return;const t=e.key;["Escape","ArrowUp","ArrowDown","Tab"].includes(t)&&e.preventDefault(),"Escape"===t||"Tab"===t?r():"ArrowUp"===t?d((e=>{if(!e)return o[0];const t=o.indexOf(e)-1;return o[-1===t?o.length-1:t]})):"ArrowDown"===t&&d((e=>e?o[o.indexOf(e)+1]:o[0]))},children:t})})}function V5({colorPicker:r=!1,disabled:o=!1,buttonLabel:i,buttonAriaLabel:a,buttonClassName:c,buttonIconClassName:d,labelClassName:h,children:p,icon:f=e(Ga,{name:"chevronDown"}),stopCloseOnClickSelf:m,buttonOnClick:g}){const v=s(null),y=s(null),[b,_]=u(!1);return l((()=>{const e=y.current,t=v.current;if(b&&null!==e&&null!==t){const{top:n,left:r}=e.getBoundingClientRect();t.style.top=`${n+e.offsetHeight+4}px`,t.style.left=`${Math.min(r,window.innerWidth-t.offsetWidth-20)}px`}}),[v,y,b]),l((()=>{const e=y.current;if(null!==e&&b){const t=t=>{const n=t.target;m&&v.current&&v.current.contains(n)||e.contains(n)||_(!1)};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}}}),[v,y,b,m]),l((()=>{const e=()=>{if(b){const e=y.current,t=v.current;if(null!==e&&null!==t){const{top:n}=e.getBoundingClientRect(),r=n+e.offsetHeight+4;r!==t.getBoundingClientRect().top&&(t.style.top=`${r}px`)}}};return document.addEventListener("scroll",e),()=>{document.removeEventListener("scroll",e)}}),[y,v,b]),t(n,{children:[t("button",{type:"button",disabled:o,"aria-label":a||i,className:`toolbar-item ${!r&&"dropdownButton"} ${c}`,onClick:()=>{_(!b),g&&g()},ref:y,children:[i&&e("div",{className:h,children:i}),!r&&f]}),b&&P(e(W5,{dropDownRef:v,onClose:()=>{_(!1),y&&y.current&&y.current.focus()},children:p}),document.body)]})}function Y5({disabled:t=!1,stopCloseOnClickSelf:n=!0,color:r,onChange:o,...i}){return e(V5,{...i,colorPicker:!0,disabled:t,stopCloseOnClickSelf:n,children:e("div",{style:{position:"static",top:0,zIndex:99},children:e(A5,{color:r,onChange:o})})})}var X5;function q5({selectionFontSize:t,editor:n}){const[o,i]=r.useState(t),a=r.useCallback(((e,t)=>{const r=e=>(e||(e="15px"),`${e=e.slice(0,-2)}px`);n.update((()=>{if(n.isEditable()){const t=YQ();null!==t&&e1(t,{"font-size":e||r})}}))}),[n]);r.useEffect((()=>{i(t)}),[t]);return e(V5,{buttonOnClick:()=>{},buttonLabel:`${o}px`,children:[8,9,10,11,12,14,16,18,20,24,28,32,36,48,60,72].map((t=>e(H5,{onClick:()=>{a(String(t)+"px",null)},children:e("span",{className:"text",children:t})},t)))})}!function(e){e[e.increment=1]="increment",e[e.decrement=2]="decrement"}(X5||(X5={}));const U5={bullet:"Bulleted List",check:"Check List",code:"Code Block",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",number:"Numbered List",paragraph:"Normal",quote:"Quote"},Z5=[["Arial","Arial"],["Courier New","Courier New"],["Georgia","Georgia"],["Times New Roman","Times New Roman"],["Trebuchet MS","Trebuchet MS"],["Verdana","Verdana"],["Roboto","Roboto"]],G5=[["10px","10px"],["11px","11px"],["12px","12px"],["13px","13px"],["14px","14px"],["15px","15px"],["16px","16px"],["17px","17px"],["18px","18px"],["19px","19px"],["20px","20px"]];function K5(e){return e?"active dropdown-item-active":""}function J5({editor:n,blockType:r,disabled:o=!1}){const i=()=>{n.update((()=>{const e=YQ();NQ(e)&&t1(e,(()=>F0()))}))},a=e=>{r!==e&&n.update((()=>{t1(YQ(),(()=>j2(e)))}))};return t(V5,{disabled:o,buttonClassName:"toolbar-item block-controls",buttonIconClassName:"icon block-type "+r,buttonLabel:U5[r],buttonAriaLabel:"Formatting options for text style",children:[e(H5,{className:"item "+K5("paragraph"===r),onClick:i,children:e("span",{className:"text",children:"Normal"})}),e(H5,{className:"item "+K5("h1"===r),onClick:()=>a("h1"),children:e("span",{className:"text",children:"Heading 1"})}),e(H5,{className:"item "+K5("h2"===r),onClick:()=>a("h2"),children:e("span",{className:"text",children:"Heading 2"})}),e(H5,{className:"item "+K5("h3"===r),onClick:()=>a("h3"),children:e("span",{className:"text",children:"Heading 3"})}),e(H5,{className:"item "+K5("bullet"===r),onClick:()=>{"bullet"!==r?n.dispatchCommand(u2,void 0):i()},children:e("span",{className:"text",children:"Bullet List"})}),e(H5,{className:"item "+K5("number"===r),onClick:()=>{"number"!==r?n.dispatchCommand(d2,void 0):i()},children:e("span",{className:"text",children:"Numbered List"})}),e(H5,{className:"item "+K5("quote"===r),onClick:()=>{"quote"!==r&&n.update((()=>{t1(YQ(),(()=>I2()))}))},children:e("span",{className:"text",children:"Quote"})})]})}function Q5({editor:t,value:n,style:r}){const o=c((e=>{t.update((()=>{const t=YQ();null!==t&&e1(t,{[r]:e})}))}),[t,r]);return e(V5,{buttonOnClick:()=>{t.dispatchCommand(NZ,void 0)},buttonClassName:"toolbar-item "+r,buttonLabel:n,buttonIconClassName:"font-family"===r?"icon block-type font-family":"",buttonAriaLabel:"font-family"===r?"Formatting options for font family":"Formatting options for font size",children:("font-family"===r?Z5:G5).map((([t,i])=>e(H5,{className:`item ${K5(n===t)} ${"font-size"===r?"fontsize-item":""}`,onClick:()=>o(t),children:e("span",{className:"text",children:t})},t)))})}function e3(){return e("div",{className:"divider"})}const t3=a((({editor:n,toolbarRef:r})=>{const o=s(null),i=s(null),[a,d]=u("14px"),[h,p]=u("#000"),[f,m]=u("#fff"),[g,v]=u("Arial"),[y,b]=u("left"),[_,x]=u(!1),[w,S]=u(!1),[k,C]=u(!1),[E,M]=u(!1),[P,O]=u(!1),[T,N]=u(!1),[D,A]=u(!1),[L,I]=u(!1),[z,R]=u("paragraph"),[$,F]=u(null),j=c((()=>{const e=YQ();if(NQ(e)){const t=e.anchor.getNode();let r="root"===t.getKey()?t:m1(t,(e=>{const t=e.getParent();return null!==t&&PK(t)}));null===r&&(r=t.getTopLevelElementOrThrow());const o=r.getKey(),i=n.getElementByKey(o);C(e.hasFormat("code")),S(e.hasFormat("bold")),M(e.hasFormat("italic")),O(e.hasFormat("underline")),N(e.hasFormat("strikethrough"));const a=function(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?K0(n)?r:o:K0(t)?r:o}(e),s=a.getParent();if(P5(s)||P5(a)?x(!0):x(!1),null!==i)if(F(o),c2(r)){const e=function(e,t){let n=e;for(;null!=n;){if(n instanceof t)return n;n=n.getParent()}return null}(t,r2),n=e?e.getListType():r.getListType();R(n)}else{const e=function(e){return e instanceof z2}(r)?r.getTag():r.getType();e in U5&&R(e)}let l;p(i1(e,"color","#000")),m(i1(e,"background-color","#fff")),v(i1(e,"font-family","Arial")),P5(s)&&(l=m1(a,(e=>E0(e)&&!e.isInline()))),b(E0(l)?l.getFormatType():E0(a)?a.getFormatType():s?.getFormatType()||"left")}NQ(e)&&d(i1(e,"font-size","14px"))}),[]);l((()=>h1(n.registerUpdateListener((({editorState:e})=>{e.read((()=>{j()}))})),n.registerCommand(WU,((e,t)=>(j(),!1)),1),n.registerCommand(TZ,(e=>(A(e),!1)),1),n.registerCommand(OZ,(e=>(I(e),!1)),1))),[n,j]);const B=c(((e,t)=>{n.update((()=>{const t=YQ();null!==t&&e1(t,e)}),t?{tag:"historic"}:{})}),[n]),H=c(((e,t)=>{V(e),B({color:e},t)}),[B]),W=c(((e,t)=>{Y(e),B({"background-color":e},t)}),[B]);l((()=>{V("white")}),[o]),l((()=>{Y("white")}),[i]);const V=e=>{if(!e||!o.current)return;const t=o.current.querySelectorAll("path");t[5]&&t[5].setAttribute("fill",e)},Y=e=>{if(!e||!i.current)return;const t=i.current.querySelectorAll("path");t[0]&&t[0].setAttribute("fill",e)},X=c(((e,t)=>{n.dispatchCommand(e,t)}),[]);return t("div",{className:"toolbar",ref:r,onClick:()=>{n.dispatchCommand(NZ,void 0)},children:[e("button",{disabled:!D,onClick:()=>{n.dispatchCommand(tZ,void 0)},className:"toolbar-item spaced","aria-label":"Undo",children:e(Ga,{name:"undo"})}),e("button",{disabled:!L,onClick:()=>{n.dispatchCommand(nZ,void 0)},className:"toolbar-item","aria-label":"Redo",children:e(Ga,{name:"redo"})}),e(e3,{}),e(J5,{blockType:z,editor:n}),e(e3,{}),e(Q5,{style:"font-family",value:g,editor:n}),e(e3,{}),e(q5,{selectionFontSize:a.slice(0,-2),editor:n}),e(e3,{}),e("button",{onClick:()=>{X(eZ,"bold")},className:"toolbar-item spaced "+(w?"active":""),"aria-label":"Format Bold",children:e(Ga,{name:"formatBold"})}),e("button",{onClick:()=>{X(eZ,"italic")},className:"toolbar-item spaced "+(E?"active":""),"aria-label":"Format Italics",children:e(Ga,{name:"formatItalic"})}),e("button",{onClick:()=>{X(eZ,"underline")},className:"toolbar-item spaced "+(P?"active":""),"aria-label":"Format Underline",children:e(Ga,{name:"formatUnderlined"})}),e("button",{onClick:()=>{X(eZ,"code")},className:"toolbar-item spaced "+(k?"active":""),"aria-label":"Format Underline",children:e(Ga,{name:"codeTags"})}),e("button",{onClick:()=>{X(eZ,"strikethrough")},className:"toolbar-item spaced "+(T?"active":""),"aria-label":"Format Strikethrough",children:e(Ga,{name:"strikethroughS"})}),e(e3,{}),e("button",{onClick:()=>{X(_Z,"left")},className:"toolbar-item spaced "+("left"==y?"active":""),"aria-label":"Left Align",children:e(Ga,{name:"formatAlignLeft"})}),e("button",{onClick:()=>{X(_Z,"center")},className:"toolbar-item spaced "+("center"==y?"active":""),"aria-label":"Center Align",children:e(Ga,{name:"formatAlignCenter"})}),e("button",{onClick:()=>{X(_Z,"right")},className:"toolbar-item spaced "+("right"==y?"active":""),"aria-label":"Right Align",children:e(Ga,{name:"formatAlignRight"})}),e("button",{onClick:()=>{X(_Z,"justify")},className:"toolbar-item spaced "+("justify"==y?"active":""),"aria-label":"Justify Align",children:e(Ga,{name:"formatAlignJustify"})}),e(e3,{}),e(Y5,{buttonClassName:"toolbar-item",buttonAriaLabel:"Formatting text color",buttonLabel:e(Ga,{name:"formatColorText"}),color:h,onChange:H,title:"text color"}),e(Y5,{buttonClassName:"toolbar-item",buttonAriaLabel:"Formatting background color",buttonLabel:e(Ga,{name:"formatColorFill"}),color:f,onChange:W,title:"bg color"})]})}));function n3({onChange:e}){const[t]=U2();return o.useEffect((()=>t.registerUpdateListener((({editorState:n})=>{e(n,t)}))),[t,e]),null}const r3=a((({onChange:n,placeHolder:r,...o})=>{const[i]=U2(),a=s(null),[c,d]=u(0);return l((()=>{a.current&&d(a.current.clientHeight)}),[a.current?.clientHeight,a.current?.offsetHeight]),e(B,{direction:"vertical",dimensionX:"fill",dimensionY:472,alignment:"leftTop",...o,children:t("div",{className:t5,children:[e(t3,{editor:i,toolbarRef:a}),e(c5,{contentEditable:e(f5,{className:Q2}),placeholder:r&&e("div",{className:e5,style:{top:c},children:r}),ErrorBoundary:S5}),e(n3,{onChange:n}),e(b5,{}),e(n5,{})]})})}));var o3=a((({className:n="",value:r="<p></p>",headerProps:o,description:i,onChange:a,contentProps:s,placeHolder:l})=>{const u=(e,t)=>(((e,t)=>{const n=KG(),r=h2(e,(new DOMParser).parseFromString(t,"text/html"));n.clear();try{n.append(...r)}catch{const e=F0();e.append(...r),n.append(e)}})(e,t),e),d={namespace:"RichTextInput",onError:e=>{console.error("Lexical Error:",e)},editorState:e=>u(e,r),nodes:[V0,{replace:uQ,with:e=>new V0(e.__text)},r2,G1,z2,L2,T1,$1]},h=c(((e,t)=>{e.read((()=>{const e=p2(t,null);a?.(e)}))}),[a]);return t(B,{className:`${BU} ${n}`,dimensionX:"fill",direction:"vertical",children:[o&&e(KA,{prefix:{children:o?.icon&&e(Ga,{name:o?.icon}),...o?.iconProps},root:{children:o?.label&&e(V,{children:o?.label}),...o?.labelProps},...o?.container}),e(J2,{initialConfig:d,children:e(r3,{...s,onChange:h,placeHolder:l})}),e(V,{size:"xsmall",className:`${HU}`,children:i})]})})),i3={container:"ObjectInput-module_container__JtW64",error:"ObjectInput-module_error__z1cTE",inputContainer:"ObjectInput-module_inputContainer__Kjm9k"};var a3=a((({value:n,properties:r,title:o,description:i,errorMessage:a,helperTextContainerProps:s,helperTextProps:l,onChange:c,errors:u,...d})=>{const h=_4({properties:r,value:n,onChange:c,error:u,errorClassName:i3.error,containerClassName:i3.inputContainer});return t(B,{gap:20,direction:"vertical",dimensionX:"fill",...d,className:`${d.className} ${i3.container}`,children:[o&&e(KA,{prefix:{children:e(Ga,{name:"dataObject",className:i3.icon})},root:{children:e(V,{variant:"secondary",children:o})}}),h,(a||i)&&e(se.HelperText,{alignment:"leftCenter",dimensionX:"fill",...s,className:`${i3.helperText} ${s?.className}`,children:e(V,{...l,size:"small",variant:a?"danger":"secondary",className:`${l?.className}`,children:a||i})})]})})),s3={container:"ArrayInput-module_container__pCN6T",header:"ArrayInput-module_header__v88Lg",inputHeader:"ArrayInput-module_inputHeader__YhlBU",emptyStateText:"ArrayInput-module_emptyStateText__ZHJbR"};var l3=a((({value:n,items:r,title:o,description:i,errorMessage:a,helperTextContainerProps:s,helperTextProps:l,maxItems:c,propertyKey:d,onChange:h,errors:p,minItems:f,...m})=>{const[g,v]=u(0),{inputFields:y,getDefaultValue:b}=S4({propertyKey:d,items:r,value:n,activeIndex:g,onChange:h,errors:p});return t(B,{gap:20,direction:"vertical",dimensionX:"fill",...m,className:`${m.className} ${s3.container}`,children:[t("div",{className:s3.header,children:[o&&e(KA,{className:s3.inputHeader,prefix:{children:e(Ga,{name:"ballot",className:s3.icon})},root:{children:e(V,{variant:"secondary",children:o})}}),e(ZA,{length:n?.length,active:g,maxItems:c,onChange:e=>{v(e)},onCreate:()=>{const e=[...n||[]];e?.push(n?.[g]||b()),h?.(e),v(e.length-1)},onDelete:e=>{const t=[...n||[]];t.splice(e,1),h?.(t),v(Math.max(0,e-1))}})]}),n?.length?y:e("span",{className:s3.emptyStateText,children:"Create an element to see the fields"}),e(se.HelperText,{alignment:"leftCenter",dimensionX:"fill",...s,className:`${s3.helperText} ${s?.className}`,children:e(V,{...l,size:"small",variant:a?"danger":"secondary",className:`${l?.className}`,children:a||i})})]})})),c3="ChipInput-module_chipInputContainer__wRY2y",u3="ChipInput-module_errorTextContainer__AQPXD",d3="ChipInput-module_errorText__Qw1NA";var h3,p3,f3,m3,g3,v3,y3,b3,_3,x3,w3,S3,k3,C3,E3,M3,P3,O3,T3,N3,D3,A3,L3,I3,z3,R3,$3,F3,j3=a((({label:n,placeholder:r="Enter a value than press enter",onChange:o,value:i,allowDuplicateValues:a=!1,valueType:s="string",...c})=>{const[d,h]=u(""),[p,f]=u();l((()=>{f(void 0)}),[d]),l((()=>{let e=[];"number"===s?e=i.filter((e=>!isNaN(Number(e)))).map((e=>Number(e))):(e=i.map((e=>String(e))),f(void 0)),o(e)}),[s]);return t(B,{dimensionX:"fill",direction:"wrap",alignment:"leftCenter",...c,className:`${c3} ${c.className}`,children:[i.map(((t,n)=>e(nm,{variant:"outlined",label:String(t),onDelete:()=>(e=>{const t=i.filter(((t,n)=>n!==e));o(t)})(n)},n))),e(G,{placeholder:r,value:d,onChange:e=>h(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&""!==d.trim()){e.preventDefault();const t="number"===s?Number(d.trim()):d.trim();if("number"==typeof t&&isNaN(t))return void f("Value must be a valid number");if(!a&&i.includes(t))return;const n=[...i,t];o(n),h("")}}}),e("div",{className:u3,children:p&&e(V,{className:d3,variant:"danger",children:p})})," "]})})),B3="RelationInput-module_icon__folVL",H3="RelationInput-module_text__h8Gq5",W3="RelationInput-module_select__H7bRO",V3="RelationInput-module_baseInput__9cDeK",Y3="RelationSelect-module_container__nwkcp",X3="RelationSelect-module_disabled__37hiQ",q3="RelationSelect-module_displayer__-ispL",U3="RelationSelect-module_displayerContainer__kCaoy",Z3="RelationSelect-module_selectDropdown__HAwgv",G3="RelationSelect-module_searchInputWrapper__2XT5T",K3="RelationSelect-module_searchIcon__Wpvzz",J3="RelationSelect-module_searchInput__Aihgm",Q3="RelationSelect-module_deleteIcon__l6plf",e4="RelationSelect-module_infiniteScroll__UQClb",t4="RelationSelect-module_deleteButton__9KhWk";function n4(){if(p3)return h3;return p3=1,h3=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},h3}function r4(){if(v3)return g3;v3=1;var e=function(){if(m3)return f3;m3=1;var e="object"==typeof ye&&ye&&ye.Object===Object&&ye;return f3=e}(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return g3=n}function o4(){if(S3)return w3;S3=1;var e=function(){if(x3)return _3;x3=1;var e=/\s/;return _3=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n},_3}(),t=/^\s+/;return w3=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n},w3}function i4(){if(C3)return k3;C3=1;var e=r4().Symbol;return k3=e}function a4(){if(N3)return T3;N3=1;var e=i4(),t=function(){if(M3)return E3;M3=1;var e=i4(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return E3=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(e){}var s=r.call(e);return a&&(t?e[o]=i:delete e[o]),s}}(),n=function(){if(O3)return P3;O3=1;var e=Object.prototype.toString;return P3=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;return T3=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)}}function s4(){if(I3)return L3;I3=1;var e=a4(),t=A3?D3:(A3=1,D3=function(e){return null!=e&&"object"==typeof e});return L3=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}var l4=function(){if(F3)return $3;F3=1;var e=n4(),t=function(){if(b3)return y3;b3=1;var e=r4();return y3=function(){return e.Date.now()}}(),n=function(){if(R3)return z3;R3=1;var e=o4(),t=n4(),n=s4(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt;return z3=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var l="function"==typeof s.valueOf?s.valueOf():s;s=t(l)?l+"":l}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var c=o.test(s);return c||i.test(s)?a(s.slice(2),c?2:8):r.test(s)?NaN:+s}}(),r=Math.max,o=Math.min;return $3=function(i,a,s){var l,c,u,d,h,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function y(e){var t=l,n=c;return l=c=void 0,f=e,d=i.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=a||t<0||g&&e-f>=u}function _(){var e=t();if(b(e))return x(e);h=setTimeout(_,function(e){var t=a-(e-p);return g?o(t,u-(e-f)):t}(e))}function x(e){return h=void 0,v&&l?y(e):(l=c=void 0,d)}function w(){var e=t(),n=b(e);if(l=arguments,c=this,p=e,n){if(void 0===h)return function(e){return f=e,h=setTimeout(_,a),m?y(e):d}(p);if(g)return clearTimeout(h),h=setTimeout(_,a),y(p)}return void 0===h&&(h=setTimeout(_,a)),d}return a=n(a)||0,e(s)&&(m=!!s.leading,u=(g="maxWait"in s)?r(n(s.maxWait)||0,a):u,v="trailing"in s?!!s.trailing:v),w.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=c=h=void 0},w.flush=function(){return void 0===h?d:x(t())},w},$3}(),c4=be(l4),u4=function(e,t){return u4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},u4(e,t)};var d4=function(){return d4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d4.apply(this,arguments)};var h4="Pixel",p4="Percent",f4={unit:p4,value:.8};function m4(e){return"number"==typeof e?{unit:p4,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:h4,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:p4,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),f4):(console.warn("scrollThreshold should be string or number"),f4)}var g4=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")}))},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout((function(){return n.props.onScroll&&n.props.onScroll(e)}),0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var o,i=!1,a=0;function s(){o&&clearTimeout(o)}function l(){var l=this,c=Date.now()-a,u=arguments;function d(){a=Date.now(),n.apply(l,u)}i||(r&&!o&&d(),s(),void 0===r&&c>e?d():!0!==t&&(o=setTimeout(r?function(){o=void 0}:d,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),i=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}u4(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?d4(d4({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=m4(t);return r.unit===h4?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=m4(t);return r.unit===h4?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=d4({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return o.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},o.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&o.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},o.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(S);var v4=a((({options:r,placeholder:o="Select an option",placement:a="bottom",multiple:c=!1,disabled:h=!1,maxCount:p,popupClassName:m="",optionProps:v,selectRef:y,disableClick:b,onChange:_,loadMoreOptions:x,searchOptions:w,totalOptionsLength:S,selectedOption:k,setSelectedOption:C,dropDownRef:E,portalClassName:M="",...P})=>{const[O,T]=u(!1),[N,D]=u(""),A=i((()=>c4((e=>{w(e)}),1e3)),[w]);l((()=>()=>{A.cancel()}),[A]),l((()=>{A(N)}),[N]);const L=s(null),I=()=>{b||T(!1)};Q({targetElements:[L],onClickOutside:I});const{targetPosition:z,calculatePosition:R}=ee({containerRef:L,targetRef:E,initialPlacement:a});d((()=>{O&&L.current&&E?.current&&R()}),[O,r,R]);const $=e=>{c?(()=>{if(!Array.isArray(k))return;const t=Boolean(k.find((t=>t.value===e.value&&t.label===e.label)))?k.filter((t=>t.value!==e.value)):[...k,e];C(t),_?.(t)})():(C(e),_?.(e),T(!1))};g(y,(()=>({toggleDropdown:j,clear:F})));const F=()=>{C([]),_?.([]),T(!1)},j=e=>{T(void 0===e?e=>!e:e)},W=f(),Y=null===r;return t(n,{children:[e(H,{ref:L,onClick:()=>{h||b||j()},dimensionX:"fill",dimensionY:36,...P,root:{className:U3,children:e(V,{dimensionX:"fill",style:P.root?.style,className:`${P.root?.className} ${q3}`,children:(!c||Array.isArray(k)&&k.length)&&"object"==typeof r?.[0]?k?.map?.((t=>e(nm,{variant:"outlined",label:t.label,onDelete:()=>$(t)},`${t.value}${t.label}`)))??k?.label??o:o}),dimensionX:"fill",alignment:"leftCenter"},suffix:{className:t4,onClick:e=>{e.stopPropagation(),C(c?[]:null)},children:e(Ga,{className:Q3,name:"delete",size:"sm"})},className:`${P.className} ${Y3} ${h&&X3}`}),O&&e(Gm,{onClickOutside:I,className:M,children:e(B,{ref:E,style:{...z},className:`${m} ${Z3}`,direction:"vertical",alignment:"leftTop",gap:0,id:W,children:t(g4,{dataLength:r?.length||0,next:()=>{Y||x()},hasMore:S>(r?.length||0),loader:e(_s,{size:"small"}),scrollableTarget:W,className:e4,children:[e("div",{className:G3,children:e(K,{gap:10,dimensionX:"fill",prefix:{children:e(Ga,{name:"magnify",className:K3})},inputProps:{placeholder:"Search",value:N,onChange:e=>D(e.target.value)},suffix:{children:Y?e(_s,{size:"small"}):null},className:J3})}),r?.map((t=>{const n="object"==typeof t?t.value:t,r=c?Array.isArray(k)&&Boolean(k.find((e=>e.value===t.value&&e.label===t.label))):k===t,o=c&&!!p&&Array.isArray(k)&&k.length>=p&&!r;return e(tg,{disabled:o,dimensionX:L.current?.offsetWidth,multiple:c,option:t,selected:r,onClick:()=>$(t),...v},n.toString())}))]})})})]})}));var y4=a((({label:t,description:n,value:r,onChange:o,selectProps:i,inputContainerClassName:a,getOptions:c,loadMoreOptions:d,searchOptions:h,totalOptionsLength:p,multiple:f,externalDropdownRef:m,...v})=>{const y=s(null),b=s(null),[_,x]=u(null),[w,S]=u((()=>r||(f?[]:null)));l((()=>{(r||0===r||""===r)&&S(r)}),[r]);l((()=>{c().then((e=>x(e)))}),[]);return g(i?.selectRef??{current:null},(()=>y.current)),g(m??{current:null},(()=>b.current)),e(pe,{dimensionX:"fill",description:n,dropDownRef:b,onFocusChange:e=>{y?.current?.toggleDropdown(e)},labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Ga,{className:B3,name:"callMerge"})},root:{dimensionX:"hug",children:e(V,{className:H3,size:"medium",children:t})}},inputContainerProps:{className:`${V3} ${a}`},...v,children:e(v4,{totalOptionsLength:p,disableClick:!0,options:_,placeholder:"",multiple:f,onChange:e=>{o?.(e)},...i,selectRef:y,className:`${W3} ${i?.className}`,loadMoreOptions:()=>{d().then((e=>x([..._??[],...e])))},searchOptions:e=>{h(e).then((e=>{x(e)}))},selectedOption:w,setSelectedOption:S,dropDownRef:b})})}));const b4={string:t=>e(nq,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,options:t.enum,onChange:e=>{t.onChange?.({key:t.key,value:e})}}),number:t=>e(lq,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,options:t.enum,onChange:e=>t.onChange?.({key:t.key,value:e})}),textarea:t=>e(fq,{title:t.title,containerProps:{className:t.className},value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e.target.value}),icon:t.icon??"formatSize",placeholder:t.placeholder}),date:t=>e(xq,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e})}),boolean:t=>e(kq,{checked:t.value,label:t.title,description:t.description,containerProps:{dimensionX:"fill"},onChange:e=>t.onChange?.({key:t.key,value:e}),size:t.size,className:t.className}),color:t=>e(Eq,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e})}),storage:t=>e(TU,{onUpload:()=>{},label:t.title,containerProps:{className:t.className}}),multiselect:t=>e(IU,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,options:t.enum,onChange:e=>t.onChange?.({key:t.key,value:e})}),location:t=>{if(MV.api.isTypeLocation(t.value)){const e=t?.value.coordinates;t.value={lat:e[1],lng:e[0]}}return e(jU,{title:t.title,dimensionX:"fill",coordinates:t.value,onChange:e=>{let n=e;MV.api.isTypeLocation(t.value)&&(n={type:"Point",coordinates:[e.lng,e.lng]}),t.onChange?.({key:t.key,value:n})},className:t.className})},richtext:t=>e(o3,{headerProps:{label:t.title,icon:"formatAlignCenter"},value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e}),className:t.className,placeHolder:t.placeholder}),object:t=>e(a3,{properties:t.properties,title:t.title,description:t.description,value:t.value,onChange:e=>{t.onChange?.({key:t.key,value:e})},errors:t.errors,className:t.className}),array:t=>e(l3,{title:t.title,description:t.description,value:t.value,onChange:e=>t.onChange?.({key:t.title,value:e}),minItems:t.minItems,maxItems:t.maxItems,items:t.items,propertyKey:t.key,errors:t.errors,className:t.className}),chip:t=>e(j3,{value:t.value??[],onChange:e=>{t.onChange?.({key:t.key,value:e})},valueType:t.valueType,className:t.className}),relation:t=>e(y4,{value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e}),label:t.title,getOptions:t.getOptions,loadMoreOptions:t.loadMoreOptions,searchOptions:t.searchOptions,totalOptionsLength:t.totalOptionsLength,multiple:"onetomany"===t.relationType,selectProps:{popupClassName:t.popupClassName||""},className:t.className}),select:t=>e(ng,{options:t.enum,value:t.value,onChange:e=>{t.onChange?.({key:t.key,value:e})},className:t.className})},_4=({properties:n,value:r,error:o,onChange:i,containerClassName:a,errorClassName:s,typeOverrides:l})=>{const c=l?{...b4,...l}:b4,u=Boolean(a||s);return Object.entries(n).map((([n,l])=>{const d="object"==typeof r&&!Array.isArray(r);if(d&&l.renderCondition){const{field:e}=l.renderCondition,t=r[e],n=(e,n=!1)=>{if(!(e in l.renderCondition))return!1;const r=l.renderCondition[e],o=Array.isArray(r)?r.includes(t):t===r;return n?o:!o};if(n("notEquals",!0)||n("equals"))return null}const h=d?r[n]??r:r,p=o?.[n];return t("div",{style:u?void 0:{position:"relative",width:"100%"},className:a,id:l.id??void 0,children:[c[l.type]({key:n,title:l.title,description:l.description,value:h,className:l.className,properties:l.properties,enum:l.enum??l.items?.enum,minItems:l.minItems,maxItems:l.maxItems,items:l.items,onChange:e=>(e=>{const t=structuredClone(r);t[e.key]=e.value,i?.(t)})(e),getOptions:l.getOptions,loadMoreOptions:l.loadMoreOptions,searchOptions:l.searchOptions,totalOptionsLength:l.totalOptionsLength,size:l.size,valueType:l.valueType,errors:"string"==typeof p?void 0:p,icon:l.icon,placeholder:l.placeholder,relationType:l.relationType,popupClassName:l.popupClassName}),p&&"string"==typeof p&&e(V,{className:s,style:u?void 0:{position:"absolute",bottom:0,left:0,pointerEvents:"none",whiteSpace:"nowrap"},size:"xsmall",variant:"danger",children:p})]},n)}))},x4=(e,t)=>{switch(e){case"string":case"textarea":case"richtext":case"color":case"storage":case"select":case"date":default:return"";case"multiselect":case"chip":case"relation":case"array":return[];case"number":return 0;case"boolean":return!1;case"location":return{lat:0,lng:0};case"object":{if(!t)return{};const e={};return Object.entries(t).forEach((([t,n])=>{e[t]=n.default??x4(n.type,n.properties)})),e}}},w4=e=>e?x4(e.type,e.properties):"",S4=({propertyKey:e,items:t,value:n,activeIndex:r,onChange:o,errors:a})=>{const s=c((t=>{if(null===r){const r=t[e],i=[...n||[]];i.push(r),o?.(i)}else{const i=[...n||[]];r>=0&&r<i.length&&(i[r]=t[e],o?.(i))}}),[e,n,r,o]),l=i((()=>null!==r&&r>=0?n?.[r]:w4(t)),[r,n,t]);return{inputFields:_4({properties:{[e]:t},value:{[e]:l},onChange:s,error:a}),getDefaultValue:c((()=>w4(t)),[t])}},k4=({propertyKey:t,items:n,value:r,activeIndex:o,onChange:i,errors:a})=>{const{inputFields:s}=S4({propertyKey:t,items:n,value:r,activeIndex:o,onChange:i,errors:a});return e("div",{children:s})},C4=({propertyKey:n,value:r,items:o,popoverProps:i,buttonsContainerProps:a,errors:s,onChange:l})=>{const[c,d]=u(null),h=e=>{if(e>=0)d(e);else{const e=[...r||[]],t=w4(o);e.push(t);const n=e.length-1;l?.(e),d(n)}},{contentProps:p,containerProps:f,...m}=i??{},g=[GX.contentContainer,p?.className].filter(Boolean).join(" "),v=[GX.container,f?.className].filter(Boolean).join(" "),y=[GX.buttonsContainer,a?.className].filter(Boolean).join(" ");return e(jA,{contentProps:{...p,className:g},containerProps:{dimensionX:"hug",...f,className:v},...m,open:null!==c,onClose:()=>d(null),content:null===c?null:e(k4,{propertyKey:n,items:o,value:r,activeIndex:c,onChange:e=>{l?.(e)},errors:s}),children:t(B,{...a,className:y,onClick:e=>e.stopPropagation(),children:[r?.map(((n,o)=>t("div",{className:GX.itemButtonWrapper,children:[e(xs,{variant:"filled",className:GX.itemButton,onClick:()=>h(o),children:o+1}),e(xs,{variant:"filled",shape:"circle",className:GX.removeButton,onClick:e=>((e,t)=>{t.stopPropagation();const n=[...r||[]];n.splice(e,1),l?.(n),c===e?d(null):null!==c&&c>e&&d(c-1)})(o,e),children:e(Ga,{name:"close",size:"xs"})})]},JSON.stringify(n)+o))),e(xs,{variant:"filled",className:GX.itemButton,onClick:()=>h(-1),children:"+"})]})})};var E4=a((({checked:t,disabled:n=!1,containerProps:r,onChange:o})=>e(FL,{checked:t,disabled:n,...r,onChange:o}))),M4="ColorMinimized-module_colorMinimized__CnRpu",P4="ColorMinimized-module_closeIcon__SH3uo";const O4=({value:t="#000000",onClear:n,onChange:r,...o})=>{const[i,a]=u(t);return e(H,{alignment:"leftCenter",dimensionX:"fill",className:M4,...o,root:{dimensionX:"fill",alignment:"leftCenter",children:e(om,{value:i||"#000000",onChange:e=>{a(e),r?.(e)}}),...o.root},suffix:{dimensionX:"hug",alignment:"center",children:e(xs,{children:e(Ga,{name:"close"}),color:"transparent",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(""),r?.(""),n?.()},className:P4}),...o.suffix}})};var T4="Date-module_minimizedDatePicker__ZIsQ7",N4="Date-module_clearButton__WMLse";const D4=({onChange:t,value:n,placeholder:r="",onClear:o,datePickerClassName:i,...a})=>e(H,{mode:"fill",dimensionX:"fill",gap:10,...a,className:`${T4} ${a.className}`,root:{alignment:"leftCenter",children:e(TA,{onChange:e=>{t?.(new Date(e))},value:n,placeholder:r,suffixIcon:null,allowClear:!1,className:i}),...a.root},suffix:{...a.suffix,children:e(xs,{variant:"text",className:N4,keepWidth:!1,onClick:o,children:e(Ga,{name:"close"})})}});var A4={container:"Location-module_container__SbKlF",iconContainer:"Location-module_iconContainer__ie0Rb",input:"Location-module_input__aoNPw",map:"Location-module_map__7pBAg"};const L4=({contentProps:t,mapProps:n,icon:r,childrenProps:o,containerProps:i,...a})=>{const s={lat:51.505,lng:-.09},c=()=>{const e=n?.coordinates;return void 0===e?.lat||void 0===e?.lng?"lat , lng":`${e.lat} , ${e.lng}`},[d,h]=u(c());l((()=>{h(c())}),[n?.coordinates]);l((()=>{const e=d.split(",");if(2===e.length){const t=Number.parseFloat(e[0].trim()),r=Number.parseFloat(e[1].trim());Number.isNaN(t)||Number.isNaN(r)||n?.onChange?.({lat:t,lng:r})}}),[d]);const p=(()=>{const e=n?.coordinates;return void 0===e?.lat||void 0===e?.lng?s:e})(),f=`${p.lat}-${p.lng}`;return e(jA,{content:e(_L,{...n,coordinates:p},f),contentProps:{dimensionX:500,dimensionY:500,...t},containerProps:{dimensionX:"fill",alignment:"leftCenter",...a},children:e(H,{dimensionX:"fill",dimensionY:"fill",...o,prefix:{children:o?.prefix?.children||r||e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAStSURBVHgBNZXZblNXFIa/vc88+NiJDSEDbQCVAheFtmp7Gy6rSn2DCt4EeBLKG7TqZWmLVKnTRYWYKYiEEEicxLN9Jp+hK1HrC8vS2fv3Wv//rXUU/312Nx9uGOX0Bv7SlbmyW7b2QZdoDXmeQtylceI8tVLM0py86hIYJ+S5cW8WZ3fW1pa/PdLRR19v3nZvaEP/YoTLG4YVtOqqJi9SLMvCMCx6xiLa7ZDOC+bJmHI+J8JBGyazWm9MDPv2aDC4caSl9rf/ua6CpduHB29ZbjfI0plcblOWFVVV4jgO6XgHb/FDxsNXNO0BuXkRRSVnE6Iokg5y/EZAnGRXda7Da249YNHJMFVFXLnU6SF2+gZbxPKyxMgz4ne/49cz4omW50+xzJoojKAqjkV7ewcU2eCoUzbmuknlnqJyOijtYPonmCQlbtlDpT3Mk5cIVj6j4dr0sgbKWiGb9hjvP+Ggsnk2vkvXtuR8fkUXtke31JhOiJo+xCKlloY6731EYp2iNCrqKiOdxsTa4PTpBfG1RWNhjR3W8fM9DruXOa96cjdpaX/2F6eNXNT7TNOGpCfe1TCZTnDj54TBCvnoLWbyGNc9g22kFJNX9AcDLi7GmFLMpeaUF1NFXQ+PqOgwiAUDmkyjAwlkJh71cE3FVhxiJZuYhiJc/Zy0/4j9vRzHRAiwGcYllBkT3SF0FIV7BT1q+RSNV9jvDkjdEfs//UyjIW2l2zR1we4sIBTzi8Mn1NK+b045tN4nEYSWFlfpiWjW32IhOMVQyFDx+LB+Mv2R7laMvXyednOPTtLBitaxYxO7OGSSG6T+Kg1x94/9LT5ZXJaEHeQ+2bwWOiTsWjDKp+g98adSmtUPPLQK2f1tzNwLYWygLZ+tbJWWM6TtxMyLgqvtjNCV9mqDWe81kSN2yW872yEIIrEssvGtWgy1aHnPWPyiZC118X1P0jRZ05tgn4XZA3TRozaXUZl4rQyiwOegPwRTYLdOUo3fSBEJ7L8uhPIea/PzXDS/oT89IJ92mXc3qU4uSVtjDOsCDf0dOE10uI4pQ5taS2JCSDbSUrUWQhRq1N+p8/gxufqYTNKsy23aoSyB8XNs8bE/eSZXouMRHFVtPIF72uvRkJQzDEaNB0LFpzSLMVomSeeZhW+sYlYDOsU2C95ZOSZGuzvUkx9E6k9s3UfZDsXua8q8ZjP4ntL1sSUYZ3SBllHiWTliMdpTu8Ot+RC3tYIKOpTJSxw1ocjXwbNR5QYzfYZR4tE6u0JcxLjJ15LsRCDWMq4e+4WUIEi6koWudXg/8FpiiJibTlDmEv3cl5FzmeuvKKJz2FYkocnqqiMCqXSpesvr0V1I9jlhx6waM6Z5iXIX7mnZELeMapm/5y0m1iqW25Iqh7LzKvrDEVb2lJkcbmbPcPNNHFth2Gu0/S+Zy0zX6qjNNkoKGMTGHXW8rV/8elPbizfyiQhYEozhSJoRbVv+GZNhXdO0lmXBCsj9lwJ1QC5UmAJ4NRCULNmFur517v3LN9X/r4Cd7Z3rbmhfc73mxmzvEZl7lrDcoTQXZOUlx0h4ns8wS3D8JXQWY6hiWCSj+0Fr/dbCgnfvSOdfUypD2h2KlUYAAAAASUVORK5CYII=",alt:"location",className:A4.icon}),className:A4.iconContainer},root:{children:e(G,{value:d,onChange:e=>{const t=e.target.value;(""===t||/^-?\d*\.?\d*\s*,\s*-?\d*\.?\d*$/.test(t))&&h(t)},dimensionY:"fill",className:A4.input}),dimensionX:"fill",dimensionY:"fill",className:o?.root?.className},className:`${A4.container} ${o?.className}`})})};var I4="MultiSelection-module_multiSelectionContainer__tUi2u",z4="MultiSelection-module_multiSelect__SA5u-";const R4=({options:t,value:n,onChange:r,selectProps:o,...i})=>{const a=s(null);return e(H,{mode:"fill",dimensionX:"fill",root:{children:e(ng,{selectRef:a,prefix:{children:e(Ga,{name:"chevronDown"})},suffix:{children:Array.isArray(n)&&n.length>0&&e(xs,{variant:"text",keepWidth:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),a?.current?.clear()},children:e(Ga,{name:"close"})})},multiple:!0,options:t,value:n,onChange:e=>r?.(e),...o,className:z4})},...i,className:`${I4} ${i.className}`})};var $4="NumberMinimized-module_numberMinimized__o1ZAN",F4="NumberMinimized-module_select__yHQXe",j4="NumberMinimized-module_closeIcon__EgNTI";var B4=a((({onClear:t,value:n,options:r,inputProps:o,onChange:i,...a})=>{const l=s(null),c=s(null);return e(H,{alignment:"leftCenter",dimensionX:"fill",className:$4,...a,root:{dimensionX:"fill",alignment:"leftCenter",children:r?e(ng,{selectRef:l,className:F4,placeholder:void 0!==n?String(n):"",value:n,options:r||[],onChange:e=>i?.(e)}):e(G,{ref:c,value:n??"",type:"number",...o,onChange:e=>i?.(Number(e.target.value))}),...a.root},suffix:{dimensionX:"hug",alignment:"center",children:e(xs,{children:e(Ga,{name:"close"}),color:"transparent",onClick:e=>{e.preventDefault(),e.stopPropagation(),t?.(),l.current&&l.current.clear(),c.current&&(c.current.value="")},className:j4}),...a.suffix}})})),H4="Object-module_inputMinimized__JH1n-",W4="Object-module_contentContainer__y0Sfp",V4="Object-module_value__SJt70";const Y4=({value:t,popoverProps:n,objectInputProps:r,properties:o,onChange:a,...s})=>{const l=i((()=>((e,t)=>{const n=Object.keys(t);return Object.fromEntries(n.map((t=>[t,e?.[t]])))})(t,o)),[t,o]),{contentProps:c,containerProps:u,...d}=n??{};return e(jA,{contentProps:{className:W4,...c},containerProps:{dimensionX:"fill",...u},...d,content:e(a3,{properties:o,value:t,onChange:e=>a?.(e),...r}),children:e(B,{dimensionX:"fill",alignment:"leftCenter",dimensionY:36,...s,className:`${s.className} ${H4}`,children:e(V,{className:V4,children:JSON.stringify(l)})})})};var X4="RichText-module_richTextMinimized__LUAfH",q4="RichText-module_richTextContent__F9RzT",U4="RichText-module_placeholder__p7vgx";var Z4=a((({value:n,richTextProps:r,placeHolder:o,onChange:i,onCancel:a,onSave:s,...d})=>{const[h,p]=u(n??""),[f,m]=u(!1);l((()=>{f||p(n??"")}),[f,n]);const g=c((e=>{p(e)}),[]),v=c((()=>{p(n??""),m(!0)}),[n]),y=c((()=>{m(!1),p(n??"")}),[n]),b=c((()=>{y(),a?.()}),[y,a]),_=c((()=>{i?.(h),m(!1),s?.(h)}),[h,i,s]),x=n&&""!==n.trim()&&"<p></p>"!==n,{onClick:w,...S}=d,k=c((e=>{w?.(e),v()}),[v,w]);return e(jA,{content:t(B,{direction:"vertical",gap:10,children:[e(o3,{value:h,contentProps:r,placeHolder:o,onChange:g}),t(B,{dimensionX:"fill",alignment:"rightBottom",gap:10,children:[e(xs,{variant:"filled",onClick:b,children:"Cancel"}),e(xs,{variant:"solid",onClick:_,children:"Save"})]})]}),containerProps:{dimensionX:"fill"},open:f,onClose:y,children:e(B,{dimensionX:"fill",alignment:"leftCenter",className:X4,onClick:k,...S,children:e("div",x?{className:q4,dangerouslySetInnerHTML:{__html:n||""}}:{className:q4,children:"string"==typeof o?e("span",{className:U4,children:o}):o})})})})),G4="StringMinimized-module_stringMinimized__m53JQ",K4="StringMinimized-module_select__uPgy-",J4="StringMinimized-module_closeIcon__N2ycP";var Q4=a((({onClear:t,value:n,options:r,inputProps:o,enumOnChange:i,...a})=>e(H,{alignment:"leftCenter",dimensionX:"fill",className:G4,...a,root:{dimensionX:"fill",alignment:"leftCenter",children:r?e(ng,{className:K4,placeholder:n||" ",options:r||[],onChange:e=>i?.(String(e))}):e(G,{value:n,...o}),...a.root},suffix:{dimensionX:"hug",alignment:"center",children:e(xs,{children:e(Ga,{name:"close"}),color:"transparent",onClick:t,className:J4}),...a.suffix}}))),e6="TextArea-module_textArea__VbAA6";const t6=({value:t,onClear:n,onChange:r,focusedRows:o=3,onFocus:i,onBlur:a,rows:l=2,cols:c=1,...d})=>{const[h,p]=u(!1),f=s(null);return Q({targetElements:[f],onClickOutside:()=>{p(!1),a?.(!1)}}),e(H,{ref:f,mode:"fill",dimensionX:"fill",prefix:d.prefix,root:{children:e("textarea",{value:t,onChange:e=>r?.(e.target.value),onFocus:()=>{p(!0),i?.(!0)},rows:h?Math.max(o,l):l,cols:c}),...d.root},suffix:{children:e(xs,{variant:"icon",color:"transparent",onClick:n,children:e(Ga,{name:"close"})}),...d.suffix},className:`${e6} ${d.className}`})};var n6="StorageMinimized-module_storageMinimized__ghk8k",r6="StorageMinimized-module_storage__QZPz8",o6="StorageMinimized-module_text__kRTzX";const i6=({file:n,placeholder:r="Click or Drag & Drop",onUpload:o,onClickShowFileSelect:i,onDelete:a,...l})=>{const c=s(null);return e(H,{ref:c,alignment:"leftCenter",dimensionX:"fill",mode:"fill",root:{children:e(EU,{multiple:!1,onDrop:e=>{e.length&&o?.(e[0])},children:({getRootProps:o,getInputProps:a})=>t(B,{className:r6,alignment:"leftCenter",dimensionX:"fill",gap:10,...o(),onClick:()=>{i?.()},children:[e(Ga,{name:"storage",size:14}),e(V,{className:o6,children:n?n.name:r}),e("input",{...a()})]})})},suffix:{children:n&&e(xs,{variant:"icon",children:e(Ga,{name:"close"}),color:"transparent",onClick:a})},...l,className:`${l.className} ${n6}`})};var a6=a((({selectClassName:t="",label:n="",options:r=[],onChange:o,...i})=>e(B,{...i,dimensionX:"fill",alignment:"leftCenter",children:e(ng,{className:t,placeholder:n,options:r,onChange:o||(()=>{})})}))),s6={drawerContainer:"Drawer-module_drawerContainer__ygAhi",contentContainer:"Drawer-module_contentContainer__Bku-Q",closeButton:"Drawer-module_closeButton__dw57X",leftPosition:"Drawer-module_leftPosition__kS7SQ",scrollableContent:"Drawer-module_scrollableContent__gAaIU",top:"Drawer-module_top__YhWtK",bottom:"Drawer-module_bottom__5nFWz",xs:"Drawer-module_xs__jAtGZ",sm:"Drawer-module_sm__Up7LN",md:"Drawer-module_md__cJcNU",lg:"Drawer-module_lg__c7C-6",xl:"Drawer-module_xl__r6s2-",full:"Drawer-module_full__maAwS",hug:"Drawer-module_hug__JzEGJ",left:"Drawer-module_left__NCP-V",right:"Drawer-module_right__X1qUr",leftToMiddle:"Drawer-module_leftToMiddle__UwTtm",slideFromLeft:"Drawer-module_slideFromLeft__PD3iU",rightToMiddle:"Drawer-module_rightToMiddle__-1zTg",slideFromRight:"Drawer-module_slideFromRight__y-9Lp",topToBottom:"Drawer-module_topToBottom__DlPXA",slideFromTop:"Drawer-module_slideFromTop__-c93O",bottomToTop:"Drawer-module_bottomToTop__b0ULm",slideFromBottom:"Drawer-module_slideFromBottom__uSm8d",shake:"Drawer-module_shake__pBbnG"};const l6=["xs","sm","md","lg","xl","full","hug"],c6=({placement:n,size:r="hug",children:o,showBackdrop:i=!0,backdropType:a="default",backdropClassName:s,backdropProps:c,showCloseButton:d=!0,isOpen:h=!1,onClose:p,portalClassName:f,contentClassName:m,scrollableContentClassName:g})=>{const[v,y]=u(h),[b,_]=u(!1),[x,w]=u(!1);l((()=>{y(h)}),[h]);const S=()=>{y(!1),p&&p()};if(!v)return null;const k={top:"topToBottom",right:"rightToMiddle",bottom:"bottomToTop",left:"leftToMiddle"}[n],C="number"==typeof r||"string"==typeof r&&!l6.includes(r),E=C?"left"===n||"right"===n?{width:"number"==typeof r?`${r}px`:r}:{height:"number"==typeof r?`${r}px`:r}:{};return e(Gm,{className:f,children:t(B,{className:s6.drawerContainer,children:[e(FA,{showBackdrop:i,...c,className:s,onClick:()=>{"static"===a?(_(!0),w(!1),setTimeout((()=>{_(!1),w(!0)}),400)):S()}}),t("div",{className:`${s6.contentContainer} ${x?"":s6[k]} ${b?s6.shake:""} ${s6[n]} ${C?"":s6[r]} ${m||""}`,style:E,children:[d&&e(xs,{className:`${s6.closeButton} ${"right"===n?s6.leftPosition:s6.rightPosition}`,onClick:S,children:e(Ga,{name:"close"}),variant:"icon"}),e("div",{className:`${s6.scrollableContent} ${g||""}`,children:o})]})]})})};var u6={container:"Tab-module_container__e6CN6",indicator:"Tab-module_indicator__UNCf0",item:"Tab-module_item__jpQZh",default:"Tab-module_default__qy-23",active:"Tab-module_active__687wz",underline:"Tab-module_underline__1gKBc",window:"Tab-module_window__vPuG0",root:"Tab-module_root__gGJhw"};var d6=a((({type:n="default",items:r,indicatorClassName:o,indicatorMode:i="equal",value:a,onChange:c,...d})=>{const[h,p]=u(0),[f,m]=u([]),g=s(null),v=s([]);l((()=>{(a||0===a)&&p(a)}),[a]);l((()=>{const e=v.current.map((e=>(e?.offsetWidth||0)+("window"===n?5:20)));m(e)}),[r,i,n]);const y="fit"===i?f[h]||0:f[h]-2,b=f.slice(0,h).reduce(((e,t)=>e+t-5),0);return t(B,{ref:g,dimensionX:"fill",gap:"window"===n?0:20,...d,className:`${u6.container} ${u6[n]} ${d.className||""}`,children:["window"!==n&&e("div",{className:`${u6.indicator} ${o||""}`,style:{width:y,left:b}}),r.map(((t,r)=>e(H,{ref:e=>v.current[r]=e,dimensionX:"equal"===i?"fill":"hug",dimensionY:"fill",mode:"middle",prefix:{children:t.prefix?.children,...t.prefix,className:`${t.prefix?.className||""}`},root:{children:t.root?.children,...t.root,className:`${u6.root} ${t.root?.className||""}`},suffix:{children:t.suffix?.children,...t.suffix,className:`${t.suffix?.className||""}`},onClick:()=>(e=>{p(e),c?.(e)})(r),...t,className:`${u6.item} ${u6[n]} ${r===h?u6.active:""}`},r)))]})})),h6={container:"CircularProgress-module_container__S-38y",svg:"CircularProgress-module_svg__gon7t",backgroundCircle:"CircularProgress-module_backgroundCircle__MQZ2z",progressCircle:"CircularProgress-module_progressCircle__aya2S",normal:"CircularProgress-module_normal__asGeP",success:"CircularProgress-module_success__F6h9t",danger:"CircularProgress-module_danger__POA1X",centerText:"CircularProgress-module_centerText__SKGzM",xxs:"CircularProgress-module_xxs__EO7l5",xs:"CircularProgress-module_xs__WVADp",sm:"CircularProgress-module_sm__yLhUL",md:"CircularProgress-module_md__5RBcj",lg:"CircularProgress-module_lg__mzdQa",xl:"CircularProgress-module_xl__tuBt-"};const p6={xxs:25,xs:40,sm:60,md:80,lg:100,xl:120},f6={xxs:"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"},m6={success:"check",danger:"close",normal:void 0},g6=({percent:n=0,size:r="md",strokeWidth:o=6,showLabel:i=!0,status:a="normal",label:s})=>{const l=p6[r],c=(l-o)/2,u=2*Math.PI*c,d=Math.min(Math.max(n,0),100),h=u-d/100*u,p=m6[a],f=f6[r];return t("div",{className:h6.container,style:{width:l,height:l},children:[t("svg",{className:h6.svg,width:l,height:l,children:[e("circle",{className:h6.backgroundCircle,cx:l/2,cy:l/2,r:c,strokeWidth:o}),e("circle",{className:`${h6.progressCircle} ${h6[a]}`,cx:l/2,cy:l/2,r:c,strokeWidth:o,strokeDasharray:u,strokeDashoffset:h})]}),i&&e("div",{className:`${h6.centerText} ${h6[a]} ${h6[r]}`,children:void 0!==s?s:p?e(Ga,{name:p,size:f}):`${Math.round(d)}%`})]})};var v6;!function(e){e.camelToKebab=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.deepCopy=e=>JSON.parse(JSON.stringify(e)),e.capitalize=e=>e.charAt(0).toUpperCase()+e.slice(1)}(v6||(v6={}));const y6={light:{primary:"#1976d2",primaryLight:"#63a4ff",primaryDark:"#004ba0",danger:"#d32f2f",dangerLight:"#ff6659",dangerDark:"#9a0007",success:"#388e3c",successLight:"#6abf69",successDark:"#00600f",soft:"#f5f5f5",softLight:"#ffffff",softDark:"#c2c2c2",background:"#ffffff",menuBackground:"#f0f0f0",zebra:"#f9f9f9",border:"#e0e0e0",boxShadow:"rgba(0, 0, 0, 0.1)",fontPrimary:"#212121",fontSecondary:"#757575",inputBackground:"#ffffff",inputPlaceholder:"#9e9e9e",tonalOffset:.2},dark:{primary:"#90caf9",primaryLight:"#e3f2fd",primaryDark:"#42a5f5",danger:"#ef5350",dangerLight:"#ff867c",dangerDark:"#b61827",success:"#66bb6a",successLight:"#98ee99",successDark:"#338a3e",soft:"#121212",softLight:"#1e1e1e",softDark:"#000000",background:"#121212",menuBackground:"#1e1e1e",zebra:"#181818",border:"#333333",boxShadow:"rgba(0, 0, 0, 0.5)",fontPrimary:"#ffffff",fontSecondary:"#bdbdbd",inputBackground:"#333333",inputPlaceholder:"#757575",tonalOffset:.3}},b6={PRIMARY:"#1c1c50",BACKGROUND:"#f5f5f5",MENU_BACKGROUND:"#ffffff",ZEBRA:"f6f6f9",SUCCESS:"#21f412",DANGER:"#f41212",SOFT:"#f5f5f5",BORDER:"#d4d0d0",BOX_SHADOW:"#0000000d",FONT_PRIMARY:"#525252",FONT_SECONDARY:"#525252",INPUT_BACKGROUND:"#fafafa",INPUT_PLACEHOLDER:"#9b9b9b",TONAL_OFFSET:.2},_6=5,x6=10,w6=10,S6=16,k6="Inter",C6=e=>{v6.deepCopy(e);const t=E6(e.palette?.primary||b6.PRIMARY,e.palette?.tonalOffset),n=E6(e.palette?.success||b6.SUCCESS,e.palette?.tonalOffset),r=E6(e.palette?.danger||b6.DANGER,e.palette?.tonalOffset),o=E6(e.palette?.soft||b6.SOFT,e.palette?.tonalOffset),i=e.borderRadius?.base??_6,a=e.padding?.base??x6,s=e.gap?.base??w6,l=e.palette?.mode,c=l?y6[l]:void 0,u=(t,n)=>e.palette?.[t]||c?.[t]||n,d=(t,n)=>e.borderRadius?.[t]??i*n,h=(t,n)=>e.padding?.[t]??s*n,p=(t,n)=>e.gap?.[t]??a*n,f={palette:{primary:u("primary",t.base),primaryLight:u("primaryLight",t.light),primaryDark:u("primaryDark",t.dark),danger:u("danger",r.base),dangerLight:u("dangerLight",r.light),dangerDark:u("dangerDark",r.dark),success:u("success",n.base),successLight:u("successLight",n.light),successDark:u("successDark",n.dark),soft:u("soft",o.base),softLight:u("softLight",o.light),softDark:u("softDark",o.dark),background:u("background",b6.BACKGROUND),menuBackground:u("menuBackground",b6.MENU_BACKGROUND),zebra:u("zebra",b6.ZEBRA),border:u("border",b6.BORDER),boxShadow:u("boxShadow",b6.BOX_SHADOW),fontPrimary:u("fontPrimary",b6.FONT_PRIMARY),fontSecondary:u("fontSecondary",b6.FONT_SECONDARY),inputBackground:u("inputBackground",b6.INPUT_BACKGROUND),inputPlaceholder:u("inputPlaceholder",b6.INPUT_PLACEHOLDER),tonalOffset:u("tonalOffset",b6.TONAL_OFFSET)},borderRadius:{sm:d("sm",.6),md:d("md",1),lg:d("lg",2)},padding:{xs:h("xs",.25),sm:h("sm",.5),md:h("md",1),lg:h("lg",1.5),xl:h("xl",2)},gap:{xs:p("xs",.25),sm:p("sm",.5),md:p("md",1),lg:p("lg",1.5),xl:p("xl",2)},fontSize:e.fontSize||S6,fontFamily:e.fontFamily||k6};return(e=>{const t=document.documentElement,n=(e,n)=>{Object.entries(e).forEach((([e,r])=>{const o=v6.camelToKebab(e);if("string"==typeof r&&r.startsWith("#")){const e=MV.color.hexToRgb(r);t.style.setProperty(`--${n}-${o}-rgb`,e)}t.style.setProperty(`--${n}-${o}`,r)}))};n(e.palette,"color"),n(e.borderRadius,"border-radius"),n(e.padding,"padding"),n(e.gap,"gap"),t.style.setProperty("--oziko-font-size-base",`${e.fontSize}px`),t.style.setProperty("--oziko-font-family-base",e.fontFamily)})(f),f},E6=(e,t=.2)=>{const{h:n,s:r,l:o}=MV.color.hexToHSL(e),i="number"==typeof t?t:t.light,a="number"==typeof t?t:t.dark;return{base:e,light:MV.color.hslToHex(n,r,Math.min(1,o+i)),dark:MV.color.hslToHex(n,r,Math.max(0,o-a))}},M6=m(void 0),P6=()=>{const e=p(M6);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};var O6,T6,N6;!function(e){e.isTypeLocation=e=>"object"==typeof e&&null!==e&&"string"==typeof e.type&&Array.isArray(e.coordinates)&&2===e.coordinates.length&&e.coordinates.every((e=>"number"==typeof e))}(O6||(O6={})),function(e){e.hexToHSL=e=>{let t=0,n=0,r=0;if(4===e.length)t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16);else{if(7!==e.length)throw new Error("Invalid HEX format");t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)}t/=255,n/=255,r/=255;const o=Math.max(t,n,r),i=Math.min(t,n,r);let a=0,s=0,l=(o+i)/2;if(o!==i){const e=o-i;switch(s=l>.5?e/(2-o-i):e/(o+i),o){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return{h:a,s:s,l:l}},e.hslToHex=(e,t,n)=>{const r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e);let o,i,a;if(0===t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=r(l,s,e+1/3),i=r(l,s,e),a=r(l,s,e-1/3)}return`#${Math.round(255*o).toString(16).padStart(2,"0")}${Math.round(255*i).toString(16).padStart(2,"0")}${Math.round(255*a).toString(16).padStart(2,"0")}`}}(T6||(T6={})),function(e){e.timeUnitsInSeconds={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3},e.unitMapper=e=>e<=10?"second":e<=120?"minute":e<=2160?"hour":e<=43200?"day":e<=50400?"week":e<=1296e3?"month":e<=9331200?"quarter":"year",e.getDiffInMinutes=(e,t)=>Math.abs(t.getTime()-e.getTime())/6e4,e.formatDateToEnUs=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(e)}(N6||(N6={}));export{eI as Accordion,l3 as ArrayInput,C4 as ArrayMinimizedInput,te as Autocomplete,FA as Backdrop,pe as BaseInput,kq as BooleanInput,E4 as BooleanMinimizedInput,es as BucketFieldPopup,xs as Button,Zf as Chart,em as Checkbox,nm as Chip,j3 as ChipInput,g6 as CircularProgress,om as Color,Eq as ColorInput,O4 as ColorMinimizedInput,og as ColorPicker,kX as Dashboard,fg as DashboardItem,xq as DateInput,D4 as DateMinimizedInput,TA as DatePicker,BA as Directory,c6 as Drawer,ZA as DropList,a6 as EnumInput,B as FlexElement,H as FluidContainer,Ga as Icon,G as Input,KA as InputHeader,K as InputWithIcon,QA as Json,qm as LayerManagerProvider,Y as ListItem,nL as ListRow,jU as LocationInput,L4 as LocationMinimizedInput,_L as Map,OX as MenuGroup,PL as Modal,IU as MultipleSelectionInput,R4 as MultipleSelectionMinimizedInput,rI as NavigatorItem,UX as NotificationProvider,lq as NumberInput,B4 as NumberMinimizedInput,a3 as ObjectInput,Y4 as ObjectMinimizedInput,jA as Popover,Gm as Portal,y4 as RelationInput,o3 as RichTextInput,Z4 as RichTextMinimizedInput,pg as Section,ng as Select,tg as SelectOption,_s as Spinner,lI as SsoButton,LL as StorageFileCard,W$ as StorageFilter,TU as StorageInput,i6 as StorageMinimizedInput,nq as StringInput,Q4 as StringMinimizedInput,FL as Switch,d6 as Tab,jX as Table,V as Text,fq as TextAreaInput,t6 as TextAreaMinimizedInput,TV as Timeline,BL as Title,O6 as apiUtil,T6 as colorUtil,C6 as createTheme,J as handledClickOutsideEvents,v6 as helperUtils,N6 as timeUtil,ee as useAdaptivePosition,_4 as useInputRepresenter,zA as useKeyDown,Zm as useLayer,ZX as useNotification,Q as useOnClickOutside,P6 as useTheme};
99
+ */e.exports&&(e.exports=t),void 0!==ye&&(ye.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",(function(e){e.selector+=", "+i})),t.hooks.add("before-sanity-check",(function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var l=s.appendChild(document.createElement("CODE"));l.textContent="Loading…";var c=s.getAttribute("data-src"),u=a.language;if("none"===u){var d=(/\.(\w+)$/.exec(c)||[,"none"])[1];u=e[d]||d}t.util.setLanguage(l,u),t.util.setLanguage(s,u);var h=t.plugins.autoloader;h&&h.loadLanguages(u),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n(function(e,t){return"✖ Error "+e+" while fetching file: "+t}(r.status,r.statusText)):n("✖ Error: File does not exist or is empty"))},r.send(null)}(c,(function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],c=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(a,c).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}l.textContent=e,t.highlightElement(l)}),(function(e){s.setAttribute(n,"failed"),l.textContent=e}))}})),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(k1)),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,l]:a.alias.push(l):a.alias=[l]}}else e(o.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],c=/language-(.+)/.exec(i);if(c){n=c[1];break}}var u,d,h=e.languages[n];if(h)t.content=e.highlight((u=t.content,d=(d=u.replace(a,"")).replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n);var r=s[t];return r||e})),d),h,n);else if(n&&"none"!==n&&e.plugins.autoloader){var p="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=p,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(p);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism);var C1;C1||(C1=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var E1;E1||(E1=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}));var M1;M1||(M1=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism));var P1;P1||(P1=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var O1;O1||(O1=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const T1=globalThis.Prism||window.Prism,N1=e=>{try{return!!e&&T1.languages.hasOwnProperty(e)}catch(e){return!1}};function D1(e,t){for(const n of e.childNodes){if(jK(n)&&n.tagName===t)return!0;D1(n,t)}return!1}const A1="data-language",L1="data-highlight-language";class I1 extends T0{static getType(){return"code"}static clone(e){return new I1(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=N1(e)}createDOM(e){const t=document.createElement("code");y1(t,e.theme.code),t.setAttribute("spellcheck","false");const n=this.getLanguage();return n&&(t.setAttribute(A1,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(L1,n)),t}updateDOM(e,t,n){const r=this.__language,o=e.__language;return r?r!==o&&(t.setAttribute(A1,r),this.__isSyntaxHighlightSupported&&t.setAttribute(L1,r)):o&&(t.removeAttribute(A1),e.__isSyntaxHighlightSupported&&t.removeAttribute(L1)),!1}exportDOM(e){const t=document.createElement("pre");y1(t,e._config.theme.code),t.setAttribute("spellcheck","false");const n=this.getLanguage();return n&&(t.setAttribute(A1,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(L1,n)),{element:t}}static importDOM(){return{code:e=>null!=e.textContent&&(/\r?\n/.test(e.textContent)||D1(e,"BR"))?{conversion:R1,priority:1}:null,div:()=>({conversion:$1,priority:1}),pre:()=>({conversion:R1,priority:0}),table:e=>H1(e)?{conversion:F1,priority:3}:null,td:e=>{const t=e,n=t.closest("table");return t.classList.contains("js-file-line")||n&&H1(n)?{conversion:j1,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&H1(t)?{conversion:j1,priority:3}:null}}}static importJSON(e){return z1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage()}}insertNewAfter(e,t=!0){const n=this.getChildren(),r=n.length;if(r>=2&&"\n"===n[r-1].getTextContent()&&"\n"===n[r-2].getTextContent()&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===r){n[r-1].remove(),n[r-2].remove();const e=V0();return this.insertAfter(e,t),e}const{anchor:o,focus:i}=e,a=(o.isBefore(i)?o:i).getNode();if(CQ(a)){let e=function(e){let t=e,n=e;for(;X1(n)||OQ(n);)t=n,n=n.getPreviousSibling();return t}(a);const t=[];for(;;)if(OQ(e))t.push(PQ()),e=e.getNextSibling();else{if(!X1(e))break;{let n=0;const r=e.getTextContent(),o=e.getTextContentSize();for(;n<o&&" "===r[n];)n++;if(0!==n&&t.push(Y1(" ".repeat(n))),n!==o)break;e=e.getNextSibling()}}const n=a.splitText(o.offset)[0],r=0===o.offset?0:1,i=n.getIndexWithinParent()+r,s=a.getParentOrThrow(),l=[aQ(),...t];s.splice(i,0,l);const c=t[t.length-1];c?c.select():0===o.offset?n.selectPrevious():n.getNextSibling().selectNext(0,0)}if(function(e){return e instanceof I1}(a)){const{offset:t}=e.anchor;a.splice(t,0,[aQ()]),a.select(t+1,t+1)}return null}canIndent(){return!1}collapseAtStart(){const e=V0();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}setLanguage(e){const t=this.getWritable();return t.__language=e||void 0,t.__isSyntaxHighlightSupported=N1(e),t}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}}function z1(e){return LK(new I1(e))}function R1(e){return{node:z1(e.getAttribute(A1))}}function $1(e){const t=e,n=B1(t);return n||function(e){let t=e.parentElement;for(;null!==t;){if(B1(t))return!0;t=t.parentElement}return!1}(t)?{node:n?z1():null}:{node:null}}function F1(){return{node:z1()}}function j1(){return{node:null}}function B1(e){return null!==e.style.fontFamily.match("monospace")}function H1(e){return e.classList.contains("js-file-line-container")}class W1 extends mQ{constructor(e="",t,n){super(e,n),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new W1(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){const t=super.createDOM(e);return y1(t,V1(e.theme,this.__highlightType)),t}updateDOM(e,t,n){const r=super.updateDOM(e,t,n),o=V1(n.theme,e.__highlightType),i=V1(n.theme,this.__highlightType);return o!==i&&(o&&b1(t,o),i&&y1(t,i)),r}static importJSON(e){return Y1().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return z1()}}function V1(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function Y1(e="",t){return LK(new W1(e,t))}function X1(e){return e instanceof W1}var q1=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function U1(e){return s2(e)&&f2(e.getFirstChild())}function Z1(e){return a2().append(e)}function G1(e,t){e.splice(e.getChildrenSize(),0,t)}function K1(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&U1(n)&&U1(r)&&(K1(n.getFirstChild(),r.getFirstChild()),r.remove());const o=t.getChildren();o.length>0&&e.append(...o),t.remove()}function J1(e){const t=new Set;if(U1(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),o=e.getPreviousSibling();if(U1(r)&&U1(o)){const n=o.getFirstChild();if(f2(n)){n.append(e);const o=r.getFirstChild();f2(o)&&(G1(n,o.getChildren()),r.remove(),t.add(r.getKey()))}}else if(U1(r)){const t=r.getFirstChild();if(f2(t)){const n=t.getFirstChild();null!==n&&n.insertBefore(e)}}else if(U1(o)){const t=o.getFirstChild();f2(t)&&t.append(e)}else if(f2(n)){const t=a2(),i=p2(n.getListType());t.append(i),i.append(e),o?o.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function Q1(e){if(U1(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(f2(n?n.getParent():void 0)&&s2(n)&&f2(t)){const r=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{const r=t.getListType(),o=a2(),i=p2(r);o.append(i),e.getPreviousSiblings().forEach((e=>i.append(e)));const a=a2(),s=p2(r);a.append(s),G1(s,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(a),n.replace(e)}}}function e2(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}class t2 extends T0{static getType(){return"listitem"}static clone(e){return new t2(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){const t=document.createElement("li"),n=this.getParent();return f2(n)&&"check"===n.getListType()&&r2(t,this,null),t.value=this.__value,n2(t,e.theme,this),t}updateDOM(e,t,n){const r=this.getParent();return f2(r)&&"check"===r.getListType()&&r2(t,this,e),t.value=this.__value,n2(t,n.theme,this),!1}static transform(){return e=>{if(s2(e)||q1(144),null==e.__checked)return;const t=e.getParent();f2(t)&&"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:o2,priority:0})}}static importJSON(e){return a2().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const t=this.createDOM(e._config);return t.style.textAlign=this.getFormatType(),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(N0(n)&&this.canMergeWith(n)){const e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(s2(e))return super.replace(e);this.setIndent(0);const n=this.getParentOrThrow();if(!f2(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{const t=p2(n.getListType());let r=this.getNextSibling();for(;r;){const e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&(N0(e)||q1(139),this.getChildren().forEach((t=>{e.append(t)}))),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){const n=this.getParentOrThrow();if(f2(n)||q1(39),s2(e))return super.insertAfter(e,t);const r=this.getNextSiblings();if(n.insertAfter(e,t),0!==r.length){const o=p2(n.getListType());r.forEach((e=>o.append(e))),e.insertAfter(o,t)}return e}remove(e){const t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&U1(t)&&U1(n)&&(K1(t.getFirstChild(),n.getFirstChild()),n.remove())}insertNewAfter(e,t=!0){const n=a2().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(n,t),n}collapseAtStart(e){const t=V0();this.getChildren().forEach((e=>t.append(e)));const n=this.getParentOrThrow(),r=n.getParentOrThrow(),o=s2(r);if(1===n.getChildrenSize())if(o)n.remove(),r.select();else{n.insertBefore(t),n.remove();const r=e.anchor,o=e.focus,i=t.getKey();"element"===r.type&&r.getNode().is(this)&&r.set(i,r.offset,"element"),"element"===o.type&&o.getNode().is(this)&&o.set(i,o.offset,"element")}else n.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const t=this.getWritable();return t.__value=e,t}getChecked(){const e=this.getLatest();let t;const n=this.getParent();return f2(n)&&(t=n.getListType()),"check"===t?Boolean(e.__checked):void 0}setChecked(e){const t=this.getWritable();return t.__checked=e,t}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(null===e)return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;s2(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){"number"!=typeof e&&q1(117),(e=Math.floor(e))>=0||q1(199);let t=this.getIndent();for(;t!==e;)t<e?(J1(this),t++):(Q1(this),t--);return this}canInsertAfter(e){return s2(e)}canReplaceWith(e){return s2(e)}canMergeWith(e){return s2(e)||Y0(e)}extractWithChild(e,t){if(!zQ(t))return!1;const n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return p2("bullet")}canMergeWhenEmpty(){return!0}}function n2(e,t,n){const r=[],o=[],i=t.list,a=i?i.listitem:void 0;let s;if(i&&i.nested&&(s=i.nested.listitem),void 0!==a&&r.push(...e2(a)),i){const e=n.getParent(),t=f2(e)&&"check"===e.getListType(),a=n.getChecked();t&&!a||o.push(i.listitemUnchecked),t&&a||o.push(i.listitemChecked),t&&r.push(a?i.listitemChecked:i.listitemUnchecked)}if(void 0!==s){const e=e2(s);n.getChildren().some((e=>f2(e)))?r.push(...e):o.push(...e)}o.length>0&&b1(e,...o),r.length>0&&y1(e,...r)}function r2(e,t,n,r){f2(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function o2(e){if(e.classList.contains("task-list-item"))for(const t of e.children)if("INPUT"===t.tagName)return i2(t);const t=e.getAttribute("aria-checked");return{node:a2("true"===t||"false"!==t&&void 0)}}function i2(e){return"checkbox"!==e.getAttribute("type")?{node:null}:{node:a2(e.hasAttribute("checked"))}}function a2(e){return LK(new t2(void 0,e))}function s2(e){return e instanceof t2}class l2 extends T0{static getType(){return"list"}static clone(e){const t=e.__listType||h2[e.__tag];return new l2(t,e.__start,e.__key)}constructor(e="number",t=1,n){super(n);const r=h2[e]||e;this.__listType=r,this.__tag="number"===r?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){const t=this.getWritable();return t.__listType=e,t.__tag="number"===e?"ol":"ul",t}getListType(){return this.__listType}getStart(){return this.__start}setStart(e){const t=this.getWritable();return t.__start=e,t}createDOM(e,t){const n=this.__tag,r=document.createElement(n);return 1!==this.__start&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,c2(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||(c2(t,n.theme,this),!1)}static transform(){return e=>{f2(e)||q1(163),function(e){const t=e.getNextSibling();f2(t)&&e.getListType()===t.getListType()&&K1(e,t)}(e),function(e){const t="check"!==e.getListType();let n=e.getStart();for(const r of e.getChildren())s2(r)&&(r.getValue()!==n&&r.setValue(n),t&&null!=r.getLatest().__checked&&r.setChecked(void 0),f2(r.getFirstChild())||n++)}(e)}}static importDOM(){return{ol:()=>({conversion:d2,priority:0}),ul:()=>({conversion:d2,priority:0})}}static importJSON(e){return p2().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const t=this.createDOM(e._config,e);return jK(t)&&(1!==this.__start&&t.setAttribute("start",String(this.__start)),"check"===this.__listType&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(s2(n))super.append(n);else{const e=a2();if(f2(n))e.append(n);else if(N0(n))if(n.isInline())e.append(n);else{const t=kQ(n.getTextContent());e.append(t)}else e.append(n);super.append(e)}}return this}extractWithChild(e){return s2(e)}}function c2(e,t,n){const r=[],o=[],i=t.list;if(void 0!==i){const e=i[`${n.__tag}Depth`]||[],t=function(e){let t=1,n=e.getParent();for(;null!=n;){if(s2(n)){const e=n.getParent();if(f2(e)){t++,n=e.getParent();continue}q1(40)}return t}return t}(n)-1,a=t%e.length,s=e[a],l=i[n.__tag];let c;const u=i.nested,d=i.checklist;if(void 0!==u&&u.list&&(c=u.list),void 0!==l&&r.push(l),void 0!==d&&"check"===n.__listType&&r.push(d),void 0!==s){r.push(...e2(s));for(let t=0;t<e.length;t++)t!==a&&o.push(n.__tag+t)}if(void 0!==c){const e=e2(c);t>1?r.push(...e):o.push(...e)}}o.length>0&&b1(e,...o),r.length>0&&y1(e,...r)}function u2(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(s2(r)){t.push(r);const e=r.getChildren();e.length>1&&e.forEach((e=>{f2(e)&&t.push(Z1(e))}))}else t.push(Z1(r))}return t}function d2(e){const t=e.nodeName.toLowerCase();let n=null;return"ol"===t?n=p2("number",e.start):"ul"===t&&(n=function(e){if("check"===e.getAttribute("__lexicallisttype")||e.classList.contains("contains-task-list"))return!0;for(const t of e.childNodes)if(jK(t)&&t.hasAttribute("aria-checked"))return!0;return!1}(e)?p2("check"):p2("bullet")),{after:u2,node:n}}const h2={ol:"number",ul:"bullet"};function p2(e="number",t=1){return LK(new l2(e,t))}function f2(e){return e instanceof l2}const m2={},g2={};function v2(e,t){const n=t.body?t.body.childNodes:[];let r=[];const o=[];for(let t=0;t<n.length;t++){const i=n[t];if(!_2.has(i.nodeName)){const t=x2(i,e,o,!1);null!==t&&(r=r.concat(t))}}return function(e){for(const t of e)t.getNextSibling()instanceof B0&&t.insertAfter(aQ());for(const t of e){const e=t.getChildren();for(const n of e)t.insertBefore(n);t.remove()}}(o),r}function y2(e,t){if("undefined"==typeof document||"undefined"==typeof window&&void 0===global.window)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=nK().getChildren();for(let o=0;o<r.length;o++)b2(e,r[o],n,t);return n.innerHTML}function b2(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=N0(t)&&t.excludeFromCopy("html");let a=t;if(null!==r){let e=GK(t);e=CQ(e)&&null!==r?t1(r,e):e,a=e}const s=N0(a)?a.getChildren():[],l=e._nodes.get(a.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,a):a.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const h=document.createDocumentFragment();for(let n=0;n<s.length;n++){const i=s[n],a=b2(e,i,h,r);!o&&N0(t)&&a&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if((jK(u)||HK(u))&&u.append(h),n.append(u),d){const e=d.call(a,u);e&&(HK(u)?u.replaceChildren(e):u.replaceWith(e))}}else n.append(h);return o}const _2=new Set(["STYLE","SCRIPT"]);function x2(e,t,n,r,o=new Map,i){let a=[];if(_2.has(e.nodeName))return a;let s=null;const l=function(e,t){const{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase());let o=null;if(void 0!==r)for(const t of r){const n=t(e);null!==n&&(null===o||(o.priority||0)<=(n.priority||0))&&(o=n)}return null!==o?o.conversion:null}(e,t),c=l?l(e):null;let u=null;if(null!==c){u=c.after;const t=c.node;if(s=Array.isArray(t)?t[t.length-1]:t,null!==s){for(const[,e]of o)if(s=e(s,i),!s)break;s&&a.push(...Array.isArray(t)?t:[s])}null!=c.forChild&&o.set(e.nodeName,c.forChild)}const d=e.childNodes;let h=[];const p=(null==s||!AK(s))&&(null!=s&&XQ(s)||r);for(let e=0;e<d.length;e++)h.push(...x2(d[e],t,n,p,new Map(o),s));return null!=u&&(h=u(h)),VK(e)&&(h=function(e,t,n){const r=e.style.textAlign,o=[];let i=[];for(let e=0;e<t.length;e++){const a=t[e];if(XQ(a))r&&!a.getFormat()&&a.setFormat(r),o.push(a);else if(i.push(a),e===t.length-1||e<t.length-1&&XQ(t[e+1])){const e=n();e.setFormat(r),e.append(...i),o.push(e),i=[]}}return o}(e,h,p?()=>{const e=new B0;return n.push(e),e}:V0)),null==s?h.length>0?a=a.concat(h):VK(e)&&function(e){return null!=e.nextSibling&&null!=e.previousSibling&&(WK(e.nextSibling)&&WK(e.previousSibling))}(e)&&(a=a.concat(aQ())):N0(s)&&s.append(...h),a}var w2=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function S2(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const e=JSON.parse(r);if(e.namespace===n._config.namespace&&Array.isArray(e.nodes))return k2(n,function(e){const t=[];for(let n=0;n<e.length;n++){const r=b0(e[n]);CQ(r)&&r1(r),t.push(r)}return t}(e.nodes),t)}catch(e){}const o=e.getData("text/html");if(o)try{return k2(n,v2(n,(new DOMParser).parseFromString(function(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(e):e}(o),"text/html")),t)}catch(e){}const i=e.getData("text/plain")||e.getData("text/uri-list");if(null!=i)if(zQ(t)){const e=i.split(/(\r?\n|\t)/);""===e[e.length-1]&&e.pop();for(let t=0;t<e.length;t++){const n=GQ();if(zQ(n)){const r=e[t];"\n"===r||"\r\n"===r?n.insertParagraph():"\t"===r?n.insertNodes([PQ()]):n.insertText(r)}}}else t.insertRawText(i)}function k2(e,t,n){e.dispatchCommand(ZU,{nodes:t,selection:n})||n.insertNodes(t)}function C2(e,t,n,r=[]){let o=null===t||n.isSelected(t);const i=N0(n)&&n.excludeFromCopy("html");let a=n;if(null!==t){let e=GK(n);e=CQ(e)&&null!==t?t1(t,e):e,a=e}const s=N0(a)?a.getChildren():[],l=function(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&w2(58,n.name),N0(e)){const e=t.children;Array.isArray(e)||w2(59,n.name)}return t}(a);if(CQ(a)){const e=a.__text;e.length>0?l.text=e:o=!1}for(let r=0;r<s.length;r++){const i=s[r],a=C2(e,t,i,l.children);!o&&N0(n)&&a&&n.extractWithChild(i,t,"clone")&&(o=!0)}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let e=0;e<l.children.length;e++){const t=l.children[e];r.push(t)}return o}let E2=null;async function M2(e,t,n){if(null!==E2)return!1;if(null!==t)return new Promise(((r,o)=>{e.update((()=>{r(P2(e,t,n))}))}));const r=e.getRootElement(),o=null==e._window?window.document:e._window.document,i=$K(e._window);if(null===r||null===i)return!1;const a=o.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(o.createTextNode("#")),r.append(a);const s=new Range;return s.setStart(a,0),s.setEnd(a,1),i.removeAllRanges(),i.addRange(s),new Promise(((t,r)=>{const i=e.registerCommand(OZ,(r=>(x1(r,ClipboardEvent)&&(i(),null!==E2&&(window.clearTimeout(E2),E2=null),t(P2(e,r,n))),!0)),4);E2=window.setTimeout((()=>{i(),E2=null,t(!1)}),50),o.execCommand("copy"),a.remove()}))}function P2(e,t,n){if(void 0===n){const t=$K(e._window);if(!t)return!1;const r=t.anchorNode,o=t.focusNode;if(null!==r&&null!==o&&!$G(e,r,o))return!1;const i=GQ();if(null===i)return!1;n=function(e=GQ()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=f0();for(const[r,o]of O2){const i=o(n,e);null!==i&&(t[r]=i)}}return t}(i)}t.preventDefault();const r=t.clipboardData;return null!==r&&(function(e,t){for(const n in t){const r=t[n];void 0!==r&&e.setData(n,r)}}(r,n),!0)}const O2=[["text/html",function(e,t=GQ()){return null==t&&w2(166),zQ(t)&&t.isCollapsed()||0===t.getNodes().length?"":y2(e,t)}],["application/x-lexical-editor",function(e,t=GQ()){return null==t&&w2(166),zQ(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(function(e,t){const n=[],r=nK().getChildren();for(let o=0;o<r.length;o++)C2(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}(e,t))}]];function T2(e,t){if(void 0!==document.caretRangeFromPoint){const n=document.caretRangeFromPoint(e,t);return null===n?null:{node:n.startContainer,offset:n.startOffset}}if("undefined"!==document.caretPositionFromPoint){const n=document.caretPositionFromPoint(e,t);return null===n?null:{node:n.offsetNode,offset:n.offset}}return null}const N2="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,D2=N2&&"documentMode"in document?document.documentMode:null,A2=!(!N2||!("InputEvent"in window)||D2)&&"getTargetRanges"in new window.InputEvent("input"),L2=N2&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),I2=N2&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,z2=N2&&/^(?=.*Chrome).*/i.test(navigator.userAgent),R2=N2&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!z2,$2={};class F2 extends T0{static getType(){return"quote"}static clone(e){return new F2(e.__key)}createDOM(e){const t=document.createElement("blockquote");return y1(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:V2,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(jK(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return j2().updateFromJSON(e)}insertNewAfter(e,t){const n=V0(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){const e=V0();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function j2(){return LK(new F2)}class B2 extends T0{static getType(){return"heading"}static clone(e){return new B2(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){const t=this.getWritable();return this.__tag=e,t}createDOM(e){const t=this.__tag,n=document.createElement(t),r=e.theme.heading;if(void 0!==r){y1(n,r[t])}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:W2,priority:0}),h2:e=>({conversion:W2,priority:0}),h3:e=>({conversion:W2,priority:0}),h4:e=>({conversion:W2,priority:0}),h5:e=>({conversion:W2,priority:0}),h6:e=>({conversion:W2,priority:0}),p:e=>{const t=e.firstChild;return null!==t&&H2(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>H2(e)?{conversion:e=>({node:Y2("h1")}),priority:3}:null}}exportDOM(e){const{element:t}=super.exportDOM(e);if(jK(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return Y2(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){const n=e?e.anchor.offset:0,r=this.getLastDescendant(),o=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?V0():Y2(this.getTag()),i=this.getDirection();if(o.setDirection(i),this.insertAfter(o,t),0===n&&!this.isEmpty()&&e){const e=V0();e.select(),this.replace(e,!0)}return o}collapseAtStart(){const e=this.isEmpty()?V0():Y2(this.getTag());return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function H2(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function W2(e){const t=e.nodeName.toLowerCase();let n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=Y2(t),null!==e.style&&(KK(e,n),n.setFormat(e.style.textAlign))),{node:n}}function V2(e){const t=j2();return null!==e.style&&(t.setFormat(e.style.textAlign),KK(e,t)),{node:t}}function Y2(e="h1"){return LK(new B2(e))}function X2(e){let t=null;if(x1(e,DragEvent)?t=e.dataTransfer:x1(e,ClipboardEvent)&&(t=e.clipboardData),null===t)return[!1,[],!1];const n=t.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),o]}function q2(e){const t=GQ();if(!zQ(t))return!1;const n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){const o=r[t],i=o.getKey();if(n.has(i))continue;const a=_1(o,(e=>N0(e)&&!e.isInline()));if(null===a)continue;const s=a.getKey();a.canIndent()&&!n.has(s)&&(n.add(s),e(a))}return n.size>0}function U2(e){return L0(QG(e))}function Z2(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function G2(e){return v1(e.registerCommand(GU,(e=>{const t=GQ();return!!$Q(t)&&(t.clear(),!0)}),0),e.registerCommand(KU,(e=>{const t=GQ();return!!zQ(t)&&(t.deleteCharacter(e),!0)}),0),e.registerCommand(rZ,(e=>{const t=GQ();return!!zQ(t)&&(t.deleteWord(e),!0)}),0),e.registerCommand(oZ,(e=>{const t=GQ();return!!zQ(t)&&(t.deleteLine(e),!0)}),0),e.registerCommand(eZ,(t=>{const n=GQ();if("string"==typeof t)null!==n&&n.insertText(t);else{if(null===n)return!1;const r=t.dataTransfer;if(null!=r)S2(r,n,e);else if(zQ(n)){const e=t.data;return e&&n.insertText(e),!0}}return!0}),0),e.registerCommand(nZ,(()=>{const e=GQ();return!!zQ(e)&&(e.removeText(),!0)}),0),e.registerCommand(iZ,(e=>{const t=GQ();return!!zQ(t)&&(t.formatText(e),!0)}),0),e.registerCommand(CZ,(e=>{const t=GQ();if(!zQ(t)&&!$Q(t))return!1;const n=t.getNodes();for(const t of n){const n=_1(t,(e=>N0(e)&&!e.isInline()));null!==n&&n.setFormat(e)}return!0}),0),e.registerCommand(JU,(e=>{const t=GQ();return!!zQ(t)&&(t.insertLineBreak(e),!0)}),0),e.registerCommand(QU,(()=>{const e=GQ();return!!zQ(e)&&(e.insertParagraph(),!0)}),0),e.registerCommand(xZ,(()=>(function(e){let t=GQ()||KQ();null===t&&(t=nK().selectEnd()),t.insertNodes(e)}([PQ()]),!0)),0),e.registerCommand(wZ,(()=>q2((e=>{const t=e.getIndent();e.setIndent(t+1)}))),0),e.registerCommand(SZ,(()=>q2((e=>{const t=e.getIndent();t>0&&e.setIndent(t-1)}))),0),e.registerCommand(pZ,(e=>{const t=GQ();if($Q(t)&&!U2(e.target)){const e=t.getNodes();if(e.length>0)return e[0].selectPrevious(),!0}else if(zQ(t)){const n=SK(t.focus,!0);if(!e.shiftKey&&L0(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1}),0),e.registerCommand(fZ,(e=>{const t=GQ();if($Q(t)){const e=t.getNodes();if(e.length>0)return e[0].selectNext(0,0),!0}else if(zQ(t)){if(function(e){const t=e.focus;return"root"===t.key&&t.offset===nK().getChildrenSize()}(t))return e.preventDefault(),!0;const n=SK(t.focus,!1);if(!e.shiftKey&&L0(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),e.preventDefault(),!0}return!1}),0),e.registerCommand(dZ,(e=>{const t=GQ();if($Q(t)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectPrevious(),!0}if(!zQ(t))return!1;if(s1(t,!0)){const n=e.shiftKey;return e.preventDefault(),l1(t,n,!0),!0}return!1}),0),e.registerCommand(cZ,(e=>{const t=GQ();if($Q(t)&&!U2(e.target)){const n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectNext(0,0),!0}if(!zQ(t))return!1;const n=e.shiftKey;return!!s1(t,!1)&&(e.preventDefault(),l1(t,n,!1),!0)}),0),e.registerCommand(vZ,(t=>{if(U2(t.target))return!1;const n=GQ();if(!zQ(n))return!1;const{anchor:r}=n,o=r.getNode();return n.isCollapsed()&&0===r.offset&&!z0(o)&&function(e){const t=_1(e,(e=>N0(e)&&!e.isInline()));return N0(t)||h1(4,e.__key),t}(o).getIndent()>0?(t.preventDefault(),e.dispatchCommand(SZ,void 0)):(!I2||"ko-KR"!==navigator.language)&&(t.preventDefault(),e.dispatchCommand(KU,!0))}),0),e.registerCommand(bZ,(t=>{if(U2(t.target))return!1;return!!zQ(GQ())&&(t.preventDefault(),e.dispatchCommand(KU,!1))}),0),e.registerCommand(mZ,(t=>{const n=GQ();if(!zQ(n))return!1;if(Z2(n),null!==t){if((I2||L2||R2)&&A2)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(JU,!1)}return e.dispatchCommand(QU,void 0)}),0),e.registerCommand(yZ,(()=>!!zQ(GQ())&&(e.blur(),!0)),0),e.registerCommand(kZ,(t=>{const[,n]=X2(t);if(n.length>0){const r=T2(t.clientX,t.clientY);if(null!==r){const{offset:t,node:o}=r,i=QG(o);if(null!==i){const e=function(){const e=NQ("root",0,"element"),t=NQ("root",0,"element");return new RQ(e,t,0,"")}();if(CQ(i))e.anchor.set(i.getKey(),t,"text"),e.focus.set(i.getKey(),t,"text");else{const t=i.getParentOrThrow().getKey(),n=i.getIndexWithinParent()+1;e.anchor.set(t,n,"element"),e.focus.set(t,n,"element")}oK(AG(e))}e.dispatchCommand($2,n)}return t.preventDefault(),!0}return!!zQ(GQ())}),0),e.registerCommand(EZ,(e=>{const[t]=X2(e),n=GQ();return!(t&&!zQ(n))}),0),e.registerCommand(MZ,(e=>{const[t]=X2(e),n=GQ();if(t&&!zQ(n))return!1;const r=T2(e.clientX,e.clientY);if(null!==r){L0(QG(r.node))&&e.preventDefault()}return!0}),0),e.registerCommand(NZ,(()=>(function(e){const t=nK();if(zQ(e)){const t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),AG(e),e}{const e=t.select(0,t.getChildrenSize());oK(AG(e))}}(),!0)),0),e.registerCommand(OZ,(t=>(M2(e,x1(t,ClipboardEvent)?t:null),!0)),0),e.registerCommand(TZ,(t=>(async function(e,t){await M2(t,x1(e,ClipboardEvent)?e:null),t.update((()=>{const e=GQ();zQ(e)?e.removeText():$Q(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,e),!0)),0),e.registerCommand(tZ,(t=>{const[,n,r]=X2(t);return n.length>0&&!r?(e.dispatchCommand($2,n),!0):(!BK(t.target)||!RG(t.target))&&(null!==GQ()&&(function(e,t){e.preventDefault(),t.update((()=>{const n=GQ(),r=x1(e,InputEvent)||x1(e,KeyboardEvent)?null:e.clipboardData;null!=r&&null!==n&&S2(r,n,t)}),{tag:"paste"})}(t,e),!0))}),0),e.registerCommand(gZ,(e=>{const t=GQ();return zQ(t)&&Z2(t),!1}),0),e.registerCommand(_Z,(e=>{const t=GQ();return zQ(t)&&Z2(t),!1}),0))}var K2=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const J2=m(null);function Q2(){const e=p(J2);return null==e&&K2(8),e}const e5="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,t5=e5?d:l,n5={tag:"history-merge"};function r5({initialConfig:t,children:n}){const r=i((()=>{const{theme:e,namespace:n,nodes:r,onError:o,editorState:i,html:a}=t,s=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}}(null,e),l=q0({editable:t.editable,html:a,namespace:n,nodes:r,onError:e=>o(e,l),theme:e});return function(e,t){if(null!==t)if(void 0===t)e.update((()=>{const t=nK();if(t.isEmpty()){const n=V0();t.append(n);const r=e5?document.activeElement:null;(null!==GQ()||null!==r&&r===e.getRootElement())&&n.select()}}),n5);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,n5);break}case"object":e.setEditorState(t,n5);break;case"function":e.update((()=>{nK().isEmpty()&&t(e)}),n5)}}(l,i),[l,s]}),[]);return t5((()=>{const e=t.editable,[n]=r;n.setEditable(void 0===e||e)}),[]),e(J2.Provider,{value:r,children:n})}var o5="LexicalContent-module_editableContent__f69V7",i5="LexicalContent-module_placeholder__EMU-N",a5="LexicalContent-module_editorContainer__l2-r1";function s5({defaultSelection:e}){const[t]=Q2();return l((()=>{t.focus((()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})}),{defaultSelection:e})}),[e,t]),null}const l5="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d:l;function c5(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function u5(e,t=!0){if(e)return!1;let n=nK().getTextContent();return t&&(n=n.trim()),""===n}function d5(e){return()=>function(e){if(!u5(e,!1))return!1;const t=nK().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){const n=t[e];if(L0(n))return!1;if(N0(n)){if(!Y0(n))return!1;if(0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!CQ(t[e]))return!1}}return!0}(e)}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const h5="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d:l;function p5(e){return e.getEditorState().read(d5(e.isComposing()))}function f5({contentEditable:r,placeholder:o=null,ErrorBoundary:a}){const[s]=Q2(),c=function(t,n){const[r,o]=u((()=>t.getDecorators()));return h5((()=>t.registerDecoratorListener((e=>{T((()=>{o(e)}))}))),[t]),l((()=>{o(t.getDecorators())}),[t]),i((()=>{const o=[],i=Object.keys(r);for(let a=0;a<i.length;a++){const s=i[a],l=e(n,{onError:e=>t._onError(e),children:e(C,{fallback:null,children:r[s]})}),c=t.getElementByKey(s);null!==c&&o.push(P(l,c,s))}return o}),[n,r,t])}(s,a);return function(e){h5((()=>v1(G2(e),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,a,s,l]=t;e.update((()=>{const e=GQ();if(zQ(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(CQ(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),CQ(l)){c=a,u=a+s;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(e))),[e])}(s),t(n,{children:[r,e(m5,{content:o}),c]})}function m5({content:e}){const[t]=Q2(),n=function(e){const[t,n]=u((()=>p5(e)));return h5((()=>{function t(){const t=p5(e);n(t)}return t(),v1(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),r=function(e){const[t]=Q2(),n=i((()=>e(t)),[t,e]),[r,o]=u((()=>n.initialValueFn())),a=s(r);return l5((()=>{const{initialValueFn:e,subscribe:t}=n,r=e();return a.current!==r&&(a.current=r,o(r)),t((e=>{a.current=e,o(e)}))}),[n,e]),r}(c5);return n?"function"==typeof e?e(r):e:null}const g5="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d:l;const v5=h((function({editor:t,ariaActiveDescendant:n,ariaAutoComplete:r,ariaControls:o,ariaDescribedBy:a,ariaErrorMessage:s,ariaExpanded:l,ariaInvalid:d,ariaLabel:h,ariaLabelledBy:p,ariaMultiline:f,ariaOwns:m,ariaRequired:g,autoCapitalize:v,className:y,id:b,role:_="textbox",spellCheck:x=!0,style:w,tabIndex:S,"data-testid":k,...C},E){const[M,P]=u(t.isEditable()),O=c((e=>{e&&e.ownerDocument&&e.ownerDocument.defaultView?t.setRootElement(e):t.setRootElement(null)}),[t]),T=i((()=>function(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}(E,O)),[O,E]);return g5((()=>(P(t.isEditable()),t.registerEditableListener((e=>{P(e)})))),[t]),e("div",{"aria-activedescendant":M?n:void 0,"aria-autocomplete":M?r:"none","aria-controls":M?o:void 0,"aria-describedby":a,...null!=s?{"aria-errormessage":s}:{},"aria-expanded":M&&"combobox"===_?!!l:void 0,...null!=d?{"aria-invalid":d}:{},"aria-label":h,"aria-labelledby":p,"aria-multiline":f,"aria-owns":M?m:void 0,"aria-readonly":!M||void 0,"aria-required":g,autoCapitalize:v,className:y,contentEditable:M,"data-testid":k,id:b,ref:T,role:M?_:void 0,spellCheck:x,style:w,tabIndex:S,...C})}));function y5(e){return e.getEditorState().read(d5(e.isComposing()))}const b5=h((function(r,o){const{placeholder:i,...a}=r,[s]=Q2();return t(n,{children:[e(v5,{editor:s,...a,ref:o}),null!=i&&e(_5,{editor:s,content:i})]})}));function _5({content:t,editor:n}){const r=function(e){const[t,n]=u((()=>y5(e)));return g5((()=>{function t(){const t=y5(e);n(t)}return t(),v1(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(n),[o,i]=u(n.isEditable());if(d((()=>(i(n.isEditable()),n.registerEditableListener((e=>{i(e)})))),[n]),!r)return null;let a=null;return"function"==typeof t?a=t(o):null!==t&&(a=t),null===a?null:e("div",{"aria-hidden":!0,children:a})}function x5(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,a=e._selection;if(o)return 1;if(!(zQ(i)&&zQ(a)&&a.isCollapsed()&&i.isCollapsed()))return 0;const s=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||z0(n)||o.push(n)}return o}(t,n,r);if(0===s.length)return 0;if(s.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(a.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&CQ(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!CQ(c)||!CQ(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const h=i.anchor,p=a.anchor;if(h.key!==p.key||"text"!==h.type)return 0;const f=h.offset,m=p.offset,g=d.length-u.length;return 1===g&&m===f-1?2:-1===g&&m===f+1?3:-1===g&&m===f?4:0}function w5(e,t){let n=Date.now(),r=0;return(o,i,a,s,l,c)=>{const u=Date.now();if(c.has("historic"))return r=0,n=u,2;const d=x5(o,i,s,l,e.isComposing()),h=(()=>{const h=null===a||a.editor===e,p=c.has("history-push");if(!p&&h&&c.has("history-merge"))return 0;if(null===o)return 1;const f=i._selection;return s.size>0||l.size>0?!1===p&&0!==d&&d===r&&u<n+t&&h||1===s.size&&function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,a=n._selection;return!(zQ(i)&&zQ(a)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===a.anchor.type&&"text"===a.focus.type||!CQ(r)||!CQ(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read((()=>r.exportJSON())))===JSON.stringify(n.read((()=>o.exportJSON())))}(Array.from(s)[0],o,i)?0:1:null!==f?0:2})();return n=u,r=d,h}}function S5(e){e.undoStack=[],e.redoStack=[],e.current=null}function k5({delay:e,externalHistoryState:t}){const[n]=Q2();return function(e,t,n=1e3){const r=i((()=>t||{current:null,redoStack:[],undoStack:[]}),[t]);l((()=>function(e,t,n){const r=w5(e,n),o=v1(e.registerCommand(aZ,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(LZ,!0)),0===r.length&&e.dispatchCommand(IZ,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(sZ,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(IZ,!0));const i=n.pop();0===n.length&&e.dispatchCommand(LZ,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(DZ,(()=>(S5(t),!1)),0),e.registerCommand(AZ,(()=>(S5(t),e.dispatchCommand(LZ,!1),e.dispatchCommand(IZ,!1),!0)),0),e.registerUpdateListener((({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null!==l&&n===d)return;const h=r(o,n,l,i,a,s);if(1===h)0!==c.length&&(t.redoStack=[],e.dispatchCommand(LZ,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(IZ,!0));else if(2===h)return;t.current={editor:e,editorState:n}})));return o}(e,r,n)),[n,e,r])}(n,t,e),null}function C5(e,t){return C5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C5(e,t)}var E5={error:null},M5=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=E5,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,C5(t,n),o.getDerivedStateFromError=function(e){return{error:e}};var i=o.prototype;return i.reset=function(){this.setState(E5)},i.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},i.componentDidUpdate=function(e,t){var n,r,o,i,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(o=e.resetKeys)&&(o=[]),void 0===(i=s)&&(i=[]),o.length!==i.length||o.some((function(e,t){return!Object.is(e,i[t])})))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,s),this.reset())},i.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,o=t.FallbackComponent,i=t.fallback;if(null!==e){var a={error:e,resetErrorBoundary:this.resetErrorBoundary};if(r.isValidElement(i))return i;if("function"==typeof n)return n(a);if(o)return r.createElement(o,a);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},o}(r.Component);function P5({children:t,onError:n}){return e(M5,{fallback:e("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:n,children:t})}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const O5=new Set(["http:","https:","mailto:","sms:","tel:"]);class T5 extends T0{static getType(){return"link"}static clone(e){return new T5(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},n){super(n);const{target:r=null,rel:o=null,title:i=null}=t;this.__url=e,this.__target=r,this.__rel=o,this.__title=i}createDOM(e){const t=document.createElement("a");return t.href=this.sanitizeUrl(this.__url),null!==this.__target&&(t.target=this.__target),null!==this.__rel&&(t.rel=this.__rel),null!==this.__title&&(t.title=this.__title),y1(t,e.theme.link),t}updateDOM(e,t,n){if(FK(t)){const n=this.__url,r=this.__target,o=this.__rel,i=this.__title;n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),o!==e.__rel&&(o?t.rel=o:t.removeAttribute("rel")),i!==e.__title&&(i?t.title=i:t.removeAttribute("title"))}return!1}static importDOM(){return{a:e=>({conversion:N5,priority:1})}}static importJSON(e){return D5().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){try{const t=new URL(e);if(!O5.has(t.protocol))return"about:blank"}catch(t){return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){const t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){const t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){const t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){const n=D5(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!zQ(t))return!1;const r=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(o)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function N5(e){let t=null;if(FK(e)){const n=e.textContent;(null!==n&&""!==n||e.children.length>0)&&(t=D5(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function D5(e="",t){return LK(new T5(e,t))}function A5(e){return e instanceof T5}function L5({label:n,value:r,onChange:o,placeholder:i="","data-test-id":a,type:s="text"}){return t("div",{className:"Input__wrapper",children:[e("label",{className:"Input__label",children:n}),e("input",{type:s,className:"Input__input",placeholder:i,value:r,onChange:e=>{o(e.target.value)},"data-test-id":a})]})}let I5=!1;const z5=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000000","#4a4a4a","#9b9b9b","#ffffff"],R5=214;function $5({color:n,onChange:r}){const[o,a]=u(Y5("hex",n)),[c,d]=u(n),h=s(null),p=i((()=>({x:o.hsv.s/100*R5,y:(100-o.hsv.v)/100*150})),[o.hsv.s,o.hsv.v]),f=i((()=>({x:o.hsv.h/360*R5})),[o.hsv]);return l((()=>{null!==h.current&&r&&(r(o.hex,I5),d(o.hex))}),[o,r]),l((()=>{if(void 0===n)return;const e=Y5("hex",n);a(e),d(e.hex)}),[n]),t("div",{className:"color-picker-wrapper",style:{width:R5},ref:h,children:[e(L5,{label:"Hex",onChange:e=>{if(d(e),/^#[0-9A-Fa-f]{6}$/i.test(e)){const t=Y5("hex",e);a(t)}},value:c}),e("div",{className:"color-picker-basic-color",children:z5.map((t=>e("button",{className:t===o.hex?" active":"",style:{backgroundColor:t},onClick:()=>{d(t),a(Y5("hex",t))}},t)))}),e(F5,{className:"color-picker-saturation",style:{backgroundColor:`hsl(${o.hsv.h}, 100%, 50%)`},onChange:({x:e,y:t})=>{const n=Y5("hsv",{...o.hsv,s:e/R5*100,v:100-t/150*100});a(n),d(n.hex)},children:e("div",{className:"color-picker-saturation_cursor",style:{backgroundColor:o.hex,left:p.x,top:p.y}})}),e(F5,{className:"color-picker-hue",onChange:({x:e})=>{const t=Y5("hsv",{...o.hsv,h:e/R5*360});a(t),d(t.hex)},children:e("div",{className:"color-picker-hue_cursor",style:{backgroundColor:`hsl(${o.hsv.h}, 100%, 50%)`,left:f.x}})}),e("div",{className:"color-picker-color",style:{backgroundColor:o.hex}})]})}function F5({className:t,style:n,onChange:r,children:o}){const i=s(null),a=s(!1),l=e=>{if(i.current){const{current:t}=i,{width:n,height:o,left:a,top:s}=t.getBoundingClientRect(),l=function(e){let t=1;if(function(){if(void 0===w1){const e=document.createElement("div");e.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(e);const t=e.getBoundingClientRect();e.style.setProperty("zoom","2"),w1=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return w1}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}(t),c=j5(e.clientX/l-a,n,0),u=j5(e.clientY/l-s,o,0);r({x:c,y:u})}};return e("div",{ref:i,className:t,style:n,onMouseDown:e=>{if(0!==e.button)return;l(e);const t=e=>{a.current=!0,I5=!0,l(e)},n=e=>{a.current&&(I5=!1),document.removeEventListener("mousemove",t,!1),document.removeEventListener("mouseup",n,!1),l(e),a.current=!1};document.addEventListener("mousemove",t,!1),document.addEventListener("mouseup",n,!1)},children:o})}function j5(e,t,n){return e>t?t:e<n?n:e}function B5(e){if(!e.startsWith("#")){const t=document.createElement("canvas").getContext("2d");if(!t)throw new Error("2d context not supported or canvas already initialized");return t.fillStyle=e,t.fillStyle}return 4===e.length||5===e.length?(e=e.split("").map(((e,t)=>t?e+e:"#")).join(""),e):7===e.length||9===e.length?e:"#000000"}function H5(e){const t=(e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((e,t,n,r)=>"#"+t+t+n+n+r+r)).substring(1).match(/.{2}/g)||[]).map((e=>parseInt(e,16)));return{b:t[2],g:t[1],r:t[0]}}function W5({r:e,g:t,b:n}){e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=r-Math.min(e,t,n);return{h:o?60*(r===e?(t-n)/o+(t<n?6:0):r===t?2+(n-e)/o:4+(e-t)/o):0,s:r?o/r*100:0,v:100*r}}function V5({b:e,g:t,r:n}){return"#"+[n,t,e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function Y5(e,t){let n=B5("#121212"),r=H5(n),o=W5(r);if("hex"===e){n=B5(t),r=H5(n),o=W5(r)}else if("rgb"===e){r=t,n=V5(r),o=W5(r)}else if("hsv"===e){o=t,r=function({h:e,s:t,v:n}){const r=~~(e/60),o=e/60-r,i=(n/=100)*(1-(t/=100)),a=n*(1-t*o),s=n*(1-t*(1-o)),l=r%6,c=Math.round(255*[n,a,i,i,s,n][l]),u=Math.round(255*[s,n,n,a,i,i][l]);return{b:Math.round(255*[i,i,s,n,n,a][l]),g:u,r:c}}(o),n=V5(r)}return{hex:n,hsv:o,rgb:r}}const X5=r.createContext(null);function q5({children:t,className:n,onClick:o,title:i}){const a=s(null),c=r.useContext(X5);if(null===c)throw new Error("DropDownItem must be used within a DropDown");const{registerItem:u}=c;return l((()=>{a&&a.current&&u(a)}),[a,u]),e("button",{className:`item ${n}`,onClick:o,ref:a,title:i,type:"button",children:t})}function U5({children:t,dropDownRef:n,onClose:r}){const[o,a]=u(),[s,d]=u(),h=c((e=>{a((t=>t?[...t,e]:[e]))}),[a]),p=i((()=>({registerItem:h})),[h]);return l((()=>{o&&!s&&d(o[0]),s&&s.current&&s.current.focus()}),[o,s]),e(X5.Provider,{value:p,children:e("div",{className:"dropdown",ref:n,onKeyDown:e=>{if(!o)return;const t=e.key;["Escape","ArrowUp","ArrowDown","Tab"].includes(t)&&e.preventDefault(),"Escape"===t||"Tab"===t?r():"ArrowUp"===t?d((e=>{if(!e)return o[0];const t=o.indexOf(e)-1;return o[-1===t?o.length-1:t]})):"ArrowDown"===t&&d((e=>e?o[o.indexOf(e)+1]:o[0]))},children:t})})}function Z5({colorPicker:r=!1,disabled:o=!1,buttonLabel:i,buttonAriaLabel:a,buttonClassName:c,buttonIconClassName:d,labelClassName:h,children:p,icon:f=e(Ga,{name:"chevronDown"}),stopCloseOnClickSelf:m,buttonOnClick:g}){const v=s(null),y=s(null),[b,_]=u(!1);return l((()=>{const e=y.current,t=v.current;if(b&&null!==e&&null!==t){const{top:n,left:r}=e.getBoundingClientRect();t.style.top=`${n+e.offsetHeight+4}px`,t.style.left=`${Math.min(r,window.innerWidth-t.offsetWidth-20)}px`}}),[v,y,b]),l((()=>{const e=y.current;if(null!==e&&b){const t=t=>{const n=t.target;m&&v.current&&v.current.contains(n)||e.contains(n)||_(!1)};return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}}}),[v,y,b,m]),l((()=>{const e=()=>{if(b){const e=y.current,t=v.current;if(null!==e&&null!==t){const{top:n}=e.getBoundingClientRect(),r=n+e.offsetHeight+4;r!==t.getBoundingClientRect().top&&(t.style.top=`${r}px`)}}};return document.addEventListener("scroll",e),()=>{document.removeEventListener("scroll",e)}}),[y,v,b]),t(n,{children:[t("button",{type:"button",disabled:o,"aria-label":a||i,className:`toolbar-item ${!r&&"dropdownButton"} ${c}`,onClick:()=>{_(!b),g&&g()},ref:y,children:[i&&e("div",{className:h,children:i}),!r&&f]}),b&&P(e(U5,{dropDownRef:v,onClose:()=>{_(!1),y&&y.current&&y.current.focus()},children:p}),document.body)]})}function G5({disabled:t=!1,stopCloseOnClickSelf:n=!0,color:r,onChange:o,...i}){return e(Z5,{...i,colorPicker:!0,disabled:t,stopCloseOnClickSelf:n,children:e("div",{style:{position:"static",top:0,zIndex:99},children:e($5,{color:r,onChange:o})})})}var K5;function J5({selectionFontSize:t,editor:n}){const[o,i]=r.useState(t),a=r.useCallback(((e,t)=>{const r=e=>(e||(e="15px"),`${e=e.slice(0,-2)}px`);n.update((()=>{if(n.isEditable()){const t=GQ();null!==t&&i1(t,{"font-size":e||r})}}))}),[n]);r.useEffect((()=>{i(t)}),[t]);return e(Z5,{buttonOnClick:()=>{},buttonLabel:`${o}px`,children:[8,9,10,11,12,14,16,18,20,24,28,32,36,48,60,72].map((t=>e(q5,{onClick:()=>{a(String(t)+"px",null)},children:e("span",{className:"text",children:t})},t)))})}!function(e){e[e.increment=1]="increment",e[e.decrement=2]="decrement"}(K5||(K5={}));const Q5={bullet:"Bulleted List",check:"Check List",code:"Code Block",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",number:"Numbered List",paragraph:"Normal",quote:"Quote"},e3=[["Arial","Arial"],["Courier New","Courier New"],["Georgia","Georgia"],["Times New Roman","Times New Roman"],["Trebuchet MS","Trebuchet MS"],["Verdana","Verdana"],["Roboto","Roboto"]],t3=[["10px","10px"],["11px","11px"],["12px","12px"],["13px","13px"],["14px","14px"],["15px","15px"],["16px","16px"],["17px","17px"],["18px","18px"],["19px","19px"],["20px","20px"]];function n3(e){return e?"active dropdown-item-active":""}function r3({editor:n,blockType:r,disabled:o=!1}){const i=()=>{n.update((()=>{const e=GQ();zQ(e)&&a1(e,(()=>V0()))}))},a=e=>{r!==e&&n.update((()=>{a1(GQ(),(()=>Y2(e)))}))};return t(Z5,{disabled:o,buttonClassName:"toolbar-item block-controls",buttonIconClassName:"icon block-type "+r,buttonLabel:Q5[r],buttonAriaLabel:"Formatting options for text style",children:[e(q5,{className:"item "+n3("paragraph"===r),onClick:i,children:e("span",{className:"text",children:"Normal"})}),e(q5,{className:"item "+n3("h1"===r),onClick:()=>a("h1"),children:e("span",{className:"text",children:"Heading 1"})}),e(q5,{className:"item "+n3("h2"===r),onClick:()=>a("h2"),children:e("span",{className:"text",children:"Heading 2"})}),e(q5,{className:"item "+n3("h3"===r),onClick:()=>a("h3"),children:e("span",{className:"text",children:"Heading 3"})}),e(q5,{className:"item "+n3("bullet"===r),onClick:()=>{"bullet"!==r?n.dispatchCommand(m2,void 0):i()},children:e("span",{className:"text",children:"Bullet List"})}),e(q5,{className:"item "+n3("number"===r),onClick:()=>{"number"!==r?n.dispatchCommand(g2,void 0):i()},children:e("span",{className:"text",children:"Numbered List"})}),e(q5,{className:"item "+n3("quote"===r),onClick:()=>{"quote"!==r&&n.update((()=>{a1(GQ(),(()=>j2()))}))},children:e("span",{className:"text",children:"Quote"})})]})}function o3({editor:t,value:n,style:r}){const o=c((e=>{t.update((()=>{const t=GQ();null!==t&&i1(t,{[r]:e})}))}),[t,r]);return e(Z5,{buttonOnClick:()=>{t.dispatchCommand(zZ,void 0)},buttonClassName:"toolbar-item "+r,buttonLabel:n,buttonIconClassName:"font-family"===r?"icon block-type font-family":"",buttonAriaLabel:"font-family"===r?"Formatting options for font family":"Formatting options for font size",children:("font-family"===r?e3:t3).map((([t,i])=>e(q5,{className:`item ${n3(n===t)} ${"font-size"===r?"fontsize-item":""}`,onClick:()=>o(t),children:e("span",{className:"text",children:t})},t)))})}function i3(){return e("div",{className:"divider"})}const a3=a((({editor:n,toolbarRef:r})=>{const o=s(null),i=s(null),[a,d]=u("14px"),[h,p]=u("#000"),[f,m]=u("#fff"),[g,v]=u("Arial"),[y,b]=u("left"),[_,x]=u(!1),[w,S]=u(!1),[k,C]=u(!1),[E,M]=u(!1),[P,O]=u(!1),[T,N]=u(!1),[D,A]=u(!1),[L,I]=u(!1),[z,R]=u("paragraph"),[$,F]=u(null),j=c((()=>{const e=GQ();if(zQ(e)){const t=e.anchor.getNode();let r="root"===t.getKey()?t:_1(t,(e=>{const t=e.getParent();return null!==t&&AK(t)}));null===r&&(r=t.getTopLevelElementOrThrow());const o=r.getKey(),i=n.getElementByKey(o);C(e.hasFormat("code")),S(e.hasFormat("bold")),M(e.hasFormat("italic")),O(e.hasFormat("underline")),N(e.hasFormat("strikethrough"));const a=function(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?n1(n)?r:o:n1(t)?r:o}(e),s=a.getParent();if(A5(s)||A5(a)?x(!0):x(!1),null!==i)if(F(o),f2(r)){const e=function(e,t){let n=e;for(;null!=n;){if(n instanceof t)return n;n=n.getParent()}return null}(t,l2),n=e?e.getListType():r.getListType();R(n)}else{const e=function(e){return e instanceof B2}(r)?r.getTag():r.getType();e in Q5&&R(e)}let l;p(u1(e,"color","#000")),m(u1(e,"background-color","#fff")),v(u1(e,"font-family","Arial")),A5(s)&&(l=_1(a,(e=>N0(e)&&!e.isInline()))),b(N0(l)?l.getFormatType():N0(a)?a.getFormatType():s?.getFormatType()||"left")}zQ(e)&&d(u1(e,"font-size","14px"))}),[]);l((()=>v1(n.registerUpdateListener((({editorState:e})=>{e.read((()=>{j()}))})),n.registerCommand(UU,((e,t)=>(j(),!1)),1),n.registerCommand(IZ,(e=>(A(e),!1)),1),n.registerCommand(LZ,(e=>(I(e),!1)),1))),[n,j]);const B=c(((e,t)=>{n.update((()=>{const t=GQ();null!==t&&i1(t,e)}),t?{tag:"historic"}:{})}),[n]),H=c(((e,t)=>{V(e),B({color:e},t)}),[B]),W=c(((e,t)=>{Y(e),B({"background-color":e},t)}),[B]);l((()=>{V("white")}),[o]),l((()=>{Y("white")}),[i]);const V=e=>{if(!e||!o.current)return;const t=o.current.querySelectorAll("path");t[5]&&t[5].setAttribute("fill",e)},Y=e=>{if(!e||!i.current)return;const t=i.current.querySelectorAll("path");t[0]&&t[0].setAttribute("fill",e)},X=c(((e,t)=>{n.dispatchCommand(e,t)}),[]);return t("div",{className:"toolbar",ref:r,onClick:()=>{n.dispatchCommand(zZ,void 0)},children:[e("button",{disabled:!D,onClick:()=>{n.dispatchCommand(aZ,void 0)},className:"toolbar-item spaced","aria-label":"Undo",children:e(Ga,{name:"undo"})}),e("button",{disabled:!L,onClick:()=>{n.dispatchCommand(sZ,void 0)},className:"toolbar-item","aria-label":"Redo",children:e(Ga,{name:"redo"})}),e(i3,{}),e(r3,{blockType:z,editor:n}),e(i3,{}),e(o3,{style:"font-family",value:g,editor:n}),e(i3,{}),e(J5,{selectionFontSize:a.slice(0,-2),editor:n}),e(i3,{}),e("button",{onClick:()=>{X(iZ,"bold")},className:"toolbar-item spaced "+(w?"active":""),"aria-label":"Format Bold",children:e(Ga,{name:"formatBold"})}),e("button",{onClick:()=>{X(iZ,"italic")},className:"toolbar-item spaced "+(E?"active":""),"aria-label":"Format Italics",children:e(Ga,{name:"formatItalic"})}),e("button",{onClick:()=>{X(iZ,"underline")},className:"toolbar-item spaced "+(P?"active":""),"aria-label":"Format Underline",children:e(Ga,{name:"formatUnderlined"})}),e("button",{onClick:()=>{X(iZ,"code")},className:"toolbar-item spaced "+(k?"active":""),"aria-label":"Format Underline",children:e(Ga,{name:"codeTags"})}),e("button",{onClick:()=>{X(iZ,"strikethrough")},className:"toolbar-item spaced "+(T?"active":""),"aria-label":"Format Strikethrough",children:e(Ga,{name:"strikethroughS"})}),e(i3,{}),e("button",{onClick:()=>{X(CZ,"left")},className:"toolbar-item spaced "+("left"==y?"active":""),"aria-label":"Left Align",children:e(Ga,{name:"formatAlignLeft"})}),e("button",{onClick:()=>{X(CZ,"center")},className:"toolbar-item spaced "+("center"==y?"active":""),"aria-label":"Center Align",children:e(Ga,{name:"formatAlignCenter"})}),e("button",{onClick:()=>{X(CZ,"right")},className:"toolbar-item spaced "+("right"==y?"active":""),"aria-label":"Right Align",children:e(Ga,{name:"formatAlignRight"})}),e("button",{onClick:()=>{X(CZ,"justify")},className:"toolbar-item spaced "+("justify"==y?"active":""),"aria-label":"Justify Align",children:e(Ga,{name:"formatAlignJustify"})}),e(i3,{}),e(G5,{buttonClassName:"toolbar-item",buttonAriaLabel:"Formatting text color",buttonLabel:e(Ga,{name:"formatColorText"}),color:h,onChange:H,title:"text color"}),e(G5,{buttonClassName:"toolbar-item",buttonAriaLabel:"Formatting background color",buttonLabel:e(Ga,{name:"formatColorFill"}),color:f,onChange:W,title:"bg color"})]})}));function s3({onChange:e}){const[t]=Q2();return o.useEffect((()=>t.registerUpdateListener((({editorState:n})=>{e(n,t)}))),[t,e]),null}const l3=a((({onChange:n,placeHolder:r,...o})=>{const[i]=Q2(),a=s(null),[c,d]=u(0);return l((()=>{a.current&&d(a.current.clientHeight)}),[a.current?.clientHeight,a.current?.offsetHeight]),e(B,{direction:"vertical",dimensionX:"fill",dimensionY:472,alignment:"leftTop",...o,children:t("div",{className:a5,children:[e(a3,{editor:i,toolbarRef:a}),e(f5,{contentEditable:e(b5,{className:o5}),placeholder:r&&e("div",{className:i5,style:{top:c},children:r}),ErrorBoundary:P5}),e(s3,{onChange:n}),e(k5,{}),e(s5,{})]})})}));var c3=a((({className:n="",value:r="<p></p>",headerProps:o,description:i,onChange:a,contentProps:s,placeHolder:l})=>{const u=(e,t)=>(((e,t)=>{const n=nK(),r=v2(e,(new DOMParser).parseFromString(t,"text/html"));n.clear();try{n.append(...r)}catch{const e=V0();e.append(...r),n.append(e)}})(e,t),e),d={namespace:"RichTextInput",onError:e=>{console.error("Lexical Error:",e)},editorState:e=>u(e,r),nodes:[Z0,{replace:mQ,with:e=>new Z0(e.__text)},l2,t2,B2,F2,I1,W1]},h=c(((e,t)=>{e.read((()=>{const e=y2(t,null);a?.(e)}))}),[a]);return t(B,{className:`${XU} ${n}`,dimensionX:"fill",direction:"vertical",children:[o&&e(KA,{prefix:{children:o?.icon&&e(Ga,{name:o?.icon}),...o?.iconProps},root:{children:o?.label&&e(V,{children:o?.label}),...o?.labelProps},...o?.container}),e(r5,{initialConfig:d,children:e(l3,{...s,onChange:h,placeHolder:l})}),e(V,{size:"xsmall",className:`${qU}`,children:i})]})})),u3={container:"ObjectInput-module_container__JtW64",error:"ObjectInput-module_error__z1cTE",inputContainer:"ObjectInput-module_inputContainer__Kjm9k"};var d3=a((({value:n,properties:r,title:o,description:i,errorMessage:a,helperTextContainerProps:s,helperTextProps:l,onChange:c,errors:u,...d})=>{const h=C4({properties:r,value:n,onChange:c,error:u,errorClassName:u3.error,containerClassName:u3.inputContainer});return t(B,{gap:20,direction:"vertical",dimensionX:"fill",...d,className:`${d.className} ${u3.container}`,children:[o&&e(KA,{prefix:{children:e(Ga,{name:"dataObject",className:u3.icon})},root:{children:e(V,{variant:"secondary",children:o})}}),h,(a||i)&&e(se.HelperText,{alignment:"leftCenter",dimensionX:"fill",...s,className:`${u3.helperText} ${s?.className}`,children:e(V,{...l,size:"small",variant:a?"danger":"secondary",className:`${l?.className}`,children:a||i})})]})})),h3={container:"ArrayInput-module_container__pCN6T",header:"ArrayInput-module_header__v88Lg",inputHeader:"ArrayInput-module_inputHeader__YhlBU",emptyStateText:"ArrayInput-module_emptyStateText__ZHJbR"};var p3=a((({value:n,items:r,title:o,description:i,errorMessage:a,helperTextContainerProps:s,helperTextProps:l,maxItems:c,propertyKey:d,onChange:h,errors:p,minItems:f,...m})=>{const[g,v]=u(0),{inputFields:y,getDefaultValue:b}=P4({propertyKey:d,items:r,value:n,activeIndex:g,onChange:h,errors:p});return t(B,{gap:20,direction:"vertical",dimensionX:"fill",...m,className:`${m.className} ${h3.container}`,children:[t("div",{className:h3.header,children:[o&&e(KA,{className:h3.inputHeader,prefix:{children:e(Ga,{name:"ballot",className:h3.icon})},root:{children:e(V,{variant:"secondary",children:o})}}),e(ZA,{length:n?.length,active:g,maxItems:c,onChange:e=>{v(e)},onCreate:()=>{const e=[...n||[]];e?.push(n?.[g]||b()),h?.(e),v(e.length-1)},onDelete:e=>{const t=[...n||[]];t.splice(e,1),h?.(t),v(Math.max(0,e-1))}})]}),n?.length?y:e("span",{className:h3.emptyStateText,children:"Create an element to see the fields"}),e(se.HelperText,{alignment:"leftCenter",dimensionX:"fill",...s,className:`${h3.helperText} ${s?.className}`,children:e(V,{...l,size:"small",variant:a?"danger":"secondary",className:`${l?.className}`,children:a||i})})]})})),f3="ChipInput-module_chipInputContainer__wRY2y",m3="ChipInput-module_errorTextContainer__AQPXD",g3="ChipInput-module_errorText__Qw1NA";var v3,y3,b3,_3,x3,w3,S3,k3,C3,E3,M3,P3,O3,T3,N3,D3,A3,L3,I3,z3,R3,$3,F3,j3,B3,H3,W3,V3,Y3=a((({label:n,placeholder:r="Enter a value than press enter",onChange:o,value:i,allowDuplicateValues:a=!1,valueType:s="string",...c})=>{const[d,h]=u(""),[p,f]=u();l((()=>{f(void 0)}),[d]),l((()=>{let e=[];"number"===s?e=i.filter((e=>!isNaN(Number(e)))).map((e=>Number(e))):(e=i.map((e=>String(e))),f(void 0)),o(e)}),[s]);return t(B,{dimensionX:"fill",direction:"wrap",alignment:"leftCenter",...c,className:`${f3} ${c.className}`,children:[i.map(((t,n)=>e(nm,{variant:"outlined",label:String(t),onDelete:()=>(e=>{const t=i.filter(((t,n)=>n!==e));o(t)})(n)},n))),e(G,{placeholder:r,value:d,onChange:e=>h(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&""!==d.trim()){e.preventDefault();const t="number"===s?Number(d.trim()):d.trim();if("number"==typeof t&&isNaN(t))return void f("Value must be a valid number");if(!a&&i.includes(t))return;const n=[...i,t];o(n),h("")}}}),e("div",{className:m3,children:p&&e(V,{className:g3,variant:"danger",children:p})})," "]})})),X3="RelationInput-module_icon__folVL",q3="RelationInput-module_text__h8Gq5",U3="RelationInput-module_select__H7bRO",Z3="RelationInput-module_baseInput__9cDeK",G3="RelationSelect-module_container__nwkcp",K3="RelationSelect-module_disabled__37hiQ",J3="RelationSelect-module_displayer__-ispL",Q3="RelationSelect-module_displayerContainer__kCaoy",e4="RelationSelect-module_selectDropdown__HAwgv",t4="RelationSelect-module_searchInputWrapper__2XT5T",n4="RelationSelect-module_searchIcon__Wpvzz",r4="RelationSelect-module_searchInput__Aihgm",o4="RelationSelect-module_deleteIcon__l6plf",i4="RelationSelect-module_infiniteScroll__UQClb",a4="RelationSelect-module_deleteButton__9KhWk";function s4(){if(y3)return v3;return y3=1,v3=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},v3}function l4(){if(w3)return x3;w3=1;var e=function(){if(_3)return b3;_3=1;var e="object"==typeof ye&&ye&&ye.Object===Object&&ye;return b3=e}(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return x3=n}function c4(){if(P3)return M3;P3=1;var e=function(){if(E3)return C3;E3=1;var e=/\s/;return C3=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n},C3}(),t=/^\s+/;return M3=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n},M3}function u4(){if(T3)return O3;T3=1;var e=l4().Symbol;return O3=e}function d4(){if(z3)return I3;z3=1;var e=u4(),t=function(){if(D3)return N3;D3=1;var e=u4(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return N3=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(e){}var s=r.call(e);return a&&(t?e[o]=i:delete e[o]),s}}(),n=function(){if(L3)return A3;L3=1;var e=Object.prototype.toString;return A3=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;return I3=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)}}function h4(){if(j3)return F3;j3=1;var e=d4(),t=$3?R3:($3=1,R3=function(e){return null!=e&&"object"==typeof e});return F3=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}var p4=function(){if(V3)return W3;V3=1;var e=s4(),t=function(){if(k3)return S3;k3=1;var e=l4();return S3=function(){return e.Date.now()}}(),n=function(){if(H3)return B3;H3=1;var e=c4(),t=s4(),n=h4(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt;return B3=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var l="function"==typeof s.valueOf?s.valueOf():s;s=t(l)?l+"":l}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var c=o.test(s);return c||i.test(s)?a(s.slice(2),c?2:8):r.test(s)?NaN:+s}}(),r=Math.max,o=Math.min;return W3=function(i,a,s){var l,c,u,d,h,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function y(e){var t=l,n=c;return l=c=void 0,f=e,d=i.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=a||t<0||g&&e-f>=u}function _(){var e=t();if(b(e))return x(e);h=setTimeout(_,function(e){var t=a-(e-p);return g?o(t,u-(e-f)):t}(e))}function x(e){return h=void 0,v&&l?y(e):(l=c=void 0,d)}function w(){var e=t(),n=b(e);if(l=arguments,c=this,p=e,n){if(void 0===h)return function(e){return f=e,h=setTimeout(_,a),m?y(e):d}(p);if(g)return clearTimeout(h),h=setTimeout(_,a),y(p)}return void 0===h&&(h=setTimeout(_,a)),d}return a=n(a)||0,e(s)&&(m=!!s.leading,u=(g="maxWait"in s)?r(n(s.maxWait)||0,a):u,v="trailing"in s?!!s.trailing:v),w.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=c=h=void 0},w.flush=function(){return void 0===h?d:x(t())},w},W3}(),f4=be(p4),m4=function(e,t){return m4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},m4(e,t)};var g4=function(){return g4=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g4.apply(this,arguments)};var v4="Pixel",y4="Percent",b4={unit:y4,value:.8};function _4(e){return"number"==typeof e?{unit:y4,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:v4,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:y4,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),b4):(console.warn("scrollThreshold should be string or number"),b4)}var x4=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")}))},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout((function(){return n.props.onScroll&&n.props.onScroll(e)}),0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var o,i=!1,a=0;function s(){o&&clearTimeout(o)}function l(){var l=this,c=Date.now()-a,u=arguments;function d(){a=Date.now(),n.apply(l,u)}i||(r&&!o&&d(),s(),void 0===r&&c>e?d():!0!==t&&(o=setTimeout(r?function(){o=void 0}:d,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),i=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}m4(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?g4(g4({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=_4(t);return r.unit===v4?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=_4(t);return r.unit===v4?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=g4({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return o.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},o.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&o.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},o.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(S);var w4=a((({options:r,placeholder:o="Select an option",placement:a="bottom",multiple:c=!1,disabled:h=!1,maxCount:p,popupClassName:m="",optionProps:v,selectRef:y,disableClick:b,onChange:_,loadMoreOptions:x,searchOptions:w,totalOptionsLength:S,selectedOption:k,setSelectedOption:C,dropDownRef:E,portalClassName:M="",...P})=>{const[O,T]=u(!1),[N,D]=u(""),A=i((()=>f4((e=>{w(e)}),1e3)),[w]);l((()=>()=>{A.cancel()}),[A]),l((()=>{A(N)}),[N]);const L=s(null),I=s(null);g(E??{current:null},(()=>I.current));const{targetPosition:z,calculatePosition:R}=ee({containerRef:L,targetRef:I,initialPlacement:a});d((()=>{O&&L.current&&I.current&&R()}),[O,r,R]);const $=e=>{c?(()=>{if(!Array.isArray(k))return;const t=Boolean(k.find((t=>t.value===e.value&&t.label===e.label)))?k.filter((t=>t.value!==e.value)):[...k,e];C(t),_?.(t)})():(C(e),_?.(e),T(!1))};g(y,(()=>({toggleDropdown:j,clear:F})));const F=()=>{C([]),_?.([]),T(!1)},j=e=>{T(void 0===e?e=>!e:e)},W=f(),Y=null===r;return t(n,{children:[e(H,{ref:L,onClick:()=>{h||b||j()},dimensionX:"fill",dimensionY:36,...P,root:{className:Q3,children:e(V,{dimensionX:"fill",style:P.root?.style,className:`${P.root?.className} ${J3}`,children:(!c||Array.isArray(k)&&k.length)&&"object"==typeof r?.[0]?k?.map?.((t=>e(nm,{variant:"outlined",label:t.label,onDelete:()=>$(t)},`${t.value}${t.label}`)))??k?.label??o:o}),dimensionX:"fill",alignment:"leftCenter"},suffix:{className:a4,onClick:e=>{e.stopPropagation(),C(c?[]:null)},children:e(Ga,{className:o4,name:"delete",size:"sm"})},className:`${P.className} ${G3} ${h&&K3}`}),O&&e(Gm,{onClickOutside:()=>{b||T(!1)},className:M,additionalRefs:[L,I],children:e(B,{ref:I,style:{...z},className:`${m} ${e4}`,direction:"vertical",alignment:"leftTop",gap:0,id:W,children:t(x4,{dataLength:r?.length||0,next:()=>{Y||x()},hasMore:S>(r?.length||0),loader:e(_s,{size:"small"}),scrollableTarget:W,className:i4,children:[e("div",{className:t4,children:e(K,{gap:10,dimensionX:"fill",prefix:{children:e(Ga,{name:"magnify",className:n4})},inputProps:{placeholder:"Search",value:N,onChange:e=>D(e.target.value)},suffix:{children:Y?e(_s,{size:"small"}):null},className:r4})}),r?.map((t=>{const n="object"==typeof t?t.value:t,r=c?Array.isArray(k)&&Boolean(k.find((e=>e.value===t.value&&e.label===t.label))):k===t,o=c&&!!p&&Array.isArray(k)&&k.length>=p&&!r;return e(tg,{disabled:o,dimensionX:L.current?.offsetWidth,multiple:c,option:t,selected:r,onClick:()=>$(t),...v},n.toString())}))]})})})]})}));var S4=a((({label:t,description:n,value:r,onChange:o,selectProps:i,inputContainerClassName:a,getOptions:c,loadMoreOptions:d,searchOptions:h,totalOptionsLength:p,multiple:f,externalDropdownRef:m,...v})=>{const y=s(null),b=s(null),[_,x]=u(null),[w,S]=u((()=>r||(f?[]:null)));l((()=>{(r||0===r||""===r)&&S(r)}),[r]);l((()=>{c().then((e=>x(e)))}),[]);return g(i?.selectRef??{current:null},(()=>y.current)),g(m??{current:null},(()=>b.current)),e(pe,{dimensionX:"fill",description:n,dropDownRef:b,onFocusChange:e=>{y?.current?.toggleDropdown(e)},labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Ga,{className:X3,name:"callMerge"})},root:{dimensionX:"hug",children:e(V,{className:q3,size:"medium",children:t})}},inputContainerProps:{className:`${Z3} ${a}`},...v,children:e(w4,{totalOptionsLength:p,disableClick:!0,options:_,placeholder:"",multiple:f,onChange:e=>{o?.(e)},...i,selectRef:y,className:`${U3} ${i?.className}`,loadMoreOptions:()=>{d().then((e=>x([..._??[],...e])))},searchOptions:e=>{h(e).then((e=>{x(e)}))},selectedOption:w,setSelectedOption:S,dropDownRef:b})})}));const k4={string:t=>e(sq,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,options:t.enum,onChange:e=>{t.onChange?.({key:t.key,value:e})}}),number:t=>e(pq,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,options:t.enum,onChange:e=>t.onChange?.({key:t.key,value:e})}),textarea:t=>e(bq,{title:t.title,containerProps:{className:t.className},value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e.target.value}),icon:t.icon??"formatSize",placeholder:t.placeholder}),date:t=>e(Eq,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e})}),boolean:t=>e(Oq,{checked:t.value,label:t.title,description:t.description,containerProps:{dimensionX:"fill"},onChange:e=>t.onChange?.({key:t.key,value:e}),size:t.size,className:t.className}),color:t=>e(Nq,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e})}),storage:t=>e(IU,{onUpload:()=>{},label:t.title,containerProps:{className:t.className}}),multiselect:t=>e(jU,{label:t.title,description:t.description,inputContainerClassName:t.className,value:t.value,options:t.enum,onChange:e=>t.onChange?.({key:t.key,value:e})}),location:t=>{if(MV.api.isTypeLocation(t.value)){const e=t?.value.coordinates;t.value={lat:e[1],lng:e[0]}}return e(YU,{title:t.title,dimensionX:"fill",coordinates:t.value,onChange:e=>{let n=e;MV.api.isTypeLocation(t.value)&&(n={type:"Point",coordinates:[e.lng,e.lng]}),t.onChange?.({key:t.key,value:n})},className:t.className})},richtext:t=>e(c3,{headerProps:{label:t.title,icon:"formatAlignCenter"},value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e}),className:t.className,placeHolder:t.placeholder}),object:t=>e(d3,{properties:t.properties,title:t.title,description:t.description,value:t.value,onChange:e=>{t.onChange?.({key:t.key,value:e})},errors:t.errors,className:t.className}),array:t=>e(p3,{title:t.title,description:t.description,value:t.value,onChange:e=>t.onChange?.({key:t.title,value:e}),minItems:t.minItems,maxItems:t.maxItems,items:t.items,propertyKey:t.key,errors:t.errors,className:t.className}),chip:t=>e(Y3,{value:t.value??[],onChange:e=>{t.onChange?.({key:t.key,value:e})},valueType:t.valueType,className:t.className}),relation:t=>e(S4,{value:t.value,onChange:e=>t.onChange?.({key:t.key,value:e}),label:t.title,getOptions:t.getOptions,loadMoreOptions:t.loadMoreOptions,searchOptions:t.searchOptions,totalOptionsLength:t.totalOptionsLength,multiple:"onetomany"===t.relationType,selectProps:{popupClassName:t.popupClassName||""},className:t.className}),select:t=>e(ng,{options:t.enum,value:t.value,onChange:e=>{t.onChange?.({key:t.key,value:e})},className:t.className})},C4=({properties:n,value:r,error:o,onChange:i,containerClassName:a,errorClassName:s,typeOverrides:l})=>{const c=l?{...k4,...l}:k4,u=Boolean(a||s);return Object.entries(n).map((([n,l])=>{const d="object"==typeof r&&!Array.isArray(r);if(d&&l.renderCondition){const{field:e}=l.renderCondition,t=r[e],n=(e,n=!1)=>{if(!(e in l.renderCondition))return!1;const r=l.renderCondition[e],o=Array.isArray(r)?r.includes(t):t===r;return n?o:!o};if(n("notEquals",!0)||n("equals"))return null}const h=d?r[n]??r:r,p=o?.[n];return t("div",{style:u?void 0:{position:"relative",width:"100%"},className:a,id:l.id??void 0,children:[c[l.type]({key:n,title:l.title,description:l.description,value:h,className:l.className,properties:l.properties,enum:l.enum??l.items?.enum,minItems:l.minItems,maxItems:l.maxItems,items:l.items,onChange:e=>(e=>{const t=structuredClone(r);t[e.key]=e.value,i?.(t)})(e),getOptions:l.getOptions,loadMoreOptions:l.loadMoreOptions,searchOptions:l.searchOptions,totalOptionsLength:l.totalOptionsLength,size:l.size,valueType:l.valueType,errors:"string"==typeof p?void 0:p,icon:l.icon,placeholder:l.placeholder,relationType:l.relationType,popupClassName:l.popupClassName}),p&&"string"==typeof p&&e(V,{className:s,style:u?void 0:{position:"absolute",bottom:0,left:0,pointerEvents:"none",whiteSpace:"nowrap"},size:"xsmall",variant:"danger",children:p})]},n)}))},E4=(e,t)=>{switch(e){case"string":case"textarea":case"richtext":case"color":case"storage":case"select":case"date":default:return"";case"multiselect":case"chip":case"relation":case"array":return[];case"number":return 0;case"boolean":return!1;case"location":return{lat:0,lng:0};case"object":{if(!t)return{};const e={};return Object.entries(t).forEach((([t,n])=>{e[t]=n.default??E4(n.type,n.properties)})),e}}},M4=e=>e?E4(e.type,e.properties):"",P4=({propertyKey:e,items:t,value:n,activeIndex:r,onChange:o,errors:a})=>{const s=c((t=>{if(null===r){const r=t[e],i=[...n||[]];i.push(r),o?.(i)}else{const i=[...n||[]];r>=0&&r<i.length&&(i[r]=t[e],o?.(i))}}),[e,n,r,o]),l=i((()=>null!==r&&r>=0?n?.[r]:M4(t)),[r,n,t]);return{inputFields:C4({properties:{[e]:t},value:{[e]:l},onChange:s,error:a}),getDefaultValue:c((()=>M4(t)),[t])}},O4=({propertyKey:t,items:n,value:r,activeIndex:o,onChange:i,errors:a})=>{const{inputFields:s}=P4({propertyKey:t,items:n,value:r,activeIndex:o,onChange:i,errors:a});return e("div",{children:s})},T4=({propertyKey:n,value:r,items:o,popoverProps:i,buttonsContainerProps:a,errors:s,onChange:l})=>{const[c,d]=u(null),h=e=>{if(e>=0)d(e);else{const e=[...r||[]],t=M4(o);e.push(t);const n=e.length-1;l?.(e),d(n)}},{contentProps:p,containerProps:f,...m}=i??{},g=[tq.contentContainer,p?.className].filter(Boolean).join(" "),v=[tq.container,f?.className].filter(Boolean).join(" "),y=[tq.buttonsContainer,a?.className].filter(Boolean).join(" ");return e(jA,{contentProps:{...p,className:g},containerProps:{dimensionX:"hug",...f,className:v},...m,open:null!==c,onClose:()=>d(null),content:null===c?null:e(O4,{propertyKey:n,items:o,value:r,activeIndex:c,onChange:e=>{l?.(e)},errors:s}),children:t(B,{...a,className:y,onClick:e=>e.stopPropagation(),children:[r?.map(((n,o)=>t("div",{className:tq.itemButtonWrapper,children:[e(xs,{variant:"filled",className:tq.itemButton,onClick:()=>h(o),children:o+1}),e(xs,{variant:"filled",shape:"circle",className:tq.removeButton,onClick:e=>((e,t)=>{t.stopPropagation();const n=[...r||[]];n.splice(e,1),l?.(n),c===e?d(null):null!==c&&c>e&&d(c-1)})(o,e),children:e(Ga,{name:"close",size:"xs"})})]},JSON.stringify(n)+o))),e(xs,{variant:"filled",className:tq.itemButton,onClick:()=>h(-1),children:"+"})]})})};var N4=a((({checked:t,disabled:n=!1,containerProps:r,onChange:o})=>e(FL,{checked:t,disabled:n,...r,onChange:o}))),D4="ColorMinimized-module_colorMinimized__CnRpu",A4="ColorMinimized-module_closeIcon__SH3uo";const L4=({value:t="#000000",onClear:n,onChange:r,...o})=>{const[i,a]=u(t);return e(H,{alignment:"leftCenter",dimensionX:"fill",className:D4,...o,root:{dimensionX:"fill",alignment:"leftCenter",children:e(om,{value:i||"#000000",onChange:e=>{a(e),r?.(e)}}),...o.root},suffix:{dimensionX:"hug",alignment:"center",children:e(xs,{children:e(Ga,{name:"close"}),color:"transparent",onClick:e=>{e.preventDefault(),e.stopPropagation(),a(""),r?.(""),n?.()},className:A4}),...o.suffix}})};var I4="Date-module_minimizedDatePicker__ZIsQ7",z4="Date-module_clearButton__WMLse";const R4=({onChange:t,value:n,placeholder:r="",onClear:o,datePickerClassName:i,...a})=>e(H,{mode:"fill",dimensionX:"fill",gap:10,...a,className:`${I4} ${a.className}`,root:{alignment:"leftCenter",children:e(TA,{onChange:e=>{t?.(new Date(e))},value:n,placeholder:r,suffixIcon:null,allowClear:!1,className:i}),...a.root},suffix:{...a.suffix,children:e(xs,{variant:"text",className:z4,keepWidth:!1,onClick:o,children:e(Ga,{name:"close"})})}});var $4={container:"Location-module_container__SbKlF",iconContainer:"Location-module_iconContainer__ie0Rb",input:"Location-module_input__aoNPw",map:"Location-module_map__7pBAg"};const F4=({contentProps:t,mapProps:n,icon:r,childrenProps:o,containerProps:i,...a})=>{const s={lat:51.505,lng:-.09},c=()=>{const e=n?.coordinates;return void 0===e?.lat||void 0===e?.lng?"lat , lng":`${e.lat} , ${e.lng}`},[d,h]=u(c());l((()=>{h(c())}),[n?.coordinates]);l((()=>{const e=d.split(",");if(2===e.length){const t=Number.parseFloat(e[0].trim()),r=Number.parseFloat(e[1].trim());Number.isNaN(t)||Number.isNaN(r)||n?.onChange?.({lat:t,lng:r})}}),[d]);const p=(()=>{const e=n?.coordinates;return void 0===e?.lat||void 0===e?.lng?s:e})(),f=`${p.lat}-${p.lng}`;return e(jA,{content:e(_L,{...n,coordinates:p},f),contentProps:{dimensionX:500,dimensionY:500,...t},containerProps:{dimensionX:"fill",alignment:"leftCenter",...a},children:e(H,{dimensionX:"fill",dimensionY:"fill",...o,prefix:{children:o?.prefix?.children||r||e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAStSURBVHgBNZXZblNXFIa/vc88+NiJDSEDbQCVAheFtmp7Gy6rSn2DCt4EeBLKG7TqZWmLVKnTRYWYKYiEEEicxLN9Jp+hK1HrC8vS2fv3Wv//rXUU/312Nx9uGOX0Bv7SlbmyW7b2QZdoDXmeQtylceI8tVLM0py86hIYJ+S5cW8WZ3fW1pa/PdLRR19v3nZvaEP/YoTLG4YVtOqqJi9SLMvCMCx6xiLa7ZDOC+bJmHI+J8JBGyazWm9MDPv2aDC4caSl9rf/ua6CpduHB29ZbjfI0plcblOWFVVV4jgO6XgHb/FDxsNXNO0BuXkRRSVnE6Iokg5y/EZAnGRXda7Da249YNHJMFVFXLnU6SF2+gZbxPKyxMgz4ne/49cz4omW50+xzJoojKAqjkV7ewcU2eCoUzbmuknlnqJyOijtYPonmCQlbtlDpT3Mk5cIVj6j4dr0sgbKWiGb9hjvP+Ggsnk2vkvXtuR8fkUXtke31JhOiJo+xCKlloY6731EYp2iNCrqKiOdxsTa4PTpBfG1RWNhjR3W8fM9DruXOa96cjdpaX/2F6eNXNT7TNOGpCfe1TCZTnDj54TBCvnoLWbyGNc9g22kFJNX9AcDLi7GmFLMpeaUF1NFXQ+PqOgwiAUDmkyjAwlkJh71cE3FVhxiJZuYhiJc/Zy0/4j9vRzHRAiwGcYllBkT3SF0FIV7BT1q+RSNV9jvDkjdEfs//UyjIW2l2zR1we4sIBTzi8Mn1NK+b045tN4nEYSWFlfpiWjW32IhOMVQyFDx+LB+Mv2R7laMvXyednOPTtLBitaxYxO7OGSSG6T+Kg1x94/9LT5ZXJaEHeQ+2bwWOiTsWjDKp+g98adSmtUPPLQK2f1tzNwLYWygLZ+tbJWWM6TtxMyLgqvtjNCV9mqDWe81kSN2yW872yEIIrEssvGtWgy1aHnPWPyiZC118X1P0jRZ05tgn4XZA3TRozaXUZl4rQyiwOegPwRTYLdOUo3fSBEJ7L8uhPIea/PzXDS/oT89IJ92mXc3qU4uSVtjDOsCDf0dOE10uI4pQ5taS2JCSDbSUrUWQhRq1N+p8/gxufqYTNKsy23aoSyB8XNs8bE/eSZXouMRHFVtPIF72uvRkJQzDEaNB0LFpzSLMVomSeeZhW+sYlYDOsU2C95ZOSZGuzvUkx9E6k9s3UfZDsXua8q8ZjP4ntL1sSUYZ3SBllHiWTliMdpTu8Ot+RC3tYIKOpTJSxw1ocjXwbNR5QYzfYZR4tE6u0JcxLjJ15LsRCDWMq4e+4WUIEi6koWudXg/8FpiiJibTlDmEv3cl5FzmeuvKKJz2FYkocnqqiMCqXSpesvr0V1I9jlhx6waM6Z5iXIX7mnZELeMapm/5y0m1iqW25Iqh7LzKvrDEVb2lJkcbmbPcPNNHFth2Gu0/S+Zy0zX6qjNNkoKGMTGHXW8rV/8elPbizfyiQhYEozhSJoRbVv+GZNhXdO0lmXBCsj9lwJ1QC5UmAJ4NRCULNmFur517v3LN9X/r4Cd7Z3rbmhfc73mxmzvEZl7lrDcoTQXZOUlx0h4ns8wS3D8JXQWY6hiWCSj+0Fr/dbCgnfvSOdfUypD2h2KlUYAAAAASUVORK5CYII=",alt:"location",className:$4.icon}),className:$4.iconContainer},root:{children:e(G,{value:d,onChange:e=>{const t=e.target.value;(""===t||/^-?\d*\.?\d*\s*,\s*-?\d*\.?\d*$/.test(t))&&h(t)},dimensionY:"fill",className:$4.input}),dimensionX:"fill",dimensionY:"fill",className:o?.root?.className},className:`${$4.container} ${o?.className}`})})};var j4="MultiSelection-module_multiSelectionContainer__tUi2u",B4="MultiSelection-module_multiSelect__SA5u-";const H4=({options:t,value:n,onChange:r,selectProps:o,...i})=>{const a=s(null);return e(H,{mode:"fill",dimensionX:"fill",root:{children:e(ng,{selectRef:a,prefix:{children:e(Ga,{name:"chevronDown"})},suffix:{children:Array.isArray(n)&&n.length>0&&e(xs,{variant:"text",keepWidth:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),a?.current?.clear()},children:e(Ga,{name:"close"})})},multiple:!0,options:t,value:n,onChange:e=>r?.(e),...o,className:B4})},...i,className:`${j4} ${i.className}`})};var W4="NumberMinimized-module_numberMinimized__o1ZAN",V4="NumberMinimized-module_select__yHQXe",Y4="NumberMinimized-module_closeIcon__EgNTI";var X4=a((({onClear:t,value:n,options:r,inputProps:o,onChange:i,...a})=>{const l=s(null),c=s(null);return e(H,{alignment:"leftCenter",dimensionX:"fill",className:W4,...a,root:{dimensionX:"fill",alignment:"leftCenter",children:r?e(ng,{selectRef:l,className:V4,placeholder:void 0!==n?String(n):"",value:n,options:r||[],onChange:e=>i?.(e)}):e(G,{ref:c,value:n??"",type:"number",...o,onChange:e=>i?.(Number(e.target.value))}),...a.root},suffix:{dimensionX:"hug",alignment:"center",children:e(xs,{children:e(Ga,{name:"close"}),color:"transparent",onClick:e=>{e.preventDefault(),e.stopPropagation(),t?.(),l.current&&l.current.clear(),c.current&&(c.current.value="")},className:Y4}),...a.suffix}})})),q4="Object-module_inputMinimized__JH1n-",U4="Object-module_contentContainer__y0Sfp",Z4="Object-module_value__SJt70";const G4=({value:t,popoverProps:n,objectInputProps:r,properties:o,onChange:a,...s})=>{const l=i((()=>((e,t)=>{const n=Object.keys(t);return Object.fromEntries(n.map((t=>[t,e?.[t]])))})(t,o)),[t,o]),{contentProps:c,containerProps:u,...d}=n??{};return e(jA,{contentProps:{className:U4,...c},containerProps:{dimensionX:"fill",...u},...d,content:e(d3,{properties:o,value:t,onChange:e=>a?.(e),...r}),children:e(B,{dimensionX:"fill",alignment:"leftCenter",dimensionY:36,...s,className:`${s.className} ${q4}`,children:e(V,{className:Z4,children:JSON.stringify(l)})})})};var K4="RichText-module_richTextMinimized__LUAfH",J4="RichText-module_richTextContent__F9RzT",Q4="RichText-module_placeholder__p7vgx";var e6=a((({value:n,richTextProps:r,placeHolder:o,onChange:i,onCancel:a,onSave:s,...d})=>{const[h,p]=u(n??""),[f,m]=u(!1);l((()=>{f||p(n??"")}),[f,n]);const g=c((e=>{p(e)}),[]),v=c((()=>{p(n??""),m(!0)}),[n]),y=c((()=>{m(!1),p(n??"")}),[n]),b=c((()=>{y(),a?.()}),[y,a]),_=c((()=>{i?.(h),m(!1),s?.(h)}),[h,i,s]),x=n&&""!==n.trim()&&"<p></p>"!==n,{onClick:w,...S}=d,k=c((e=>{w?.(e),v()}),[v,w]);return e(jA,{content:t(B,{direction:"vertical",gap:10,children:[e(c3,{value:h,contentProps:r,placeHolder:o,onChange:g}),t(B,{dimensionX:"fill",alignment:"rightBottom",gap:10,children:[e(xs,{variant:"filled",onClick:b,children:"Cancel"}),e(xs,{variant:"solid",onClick:_,children:"Save"})]})]}),containerProps:{dimensionX:"fill"},open:f,onClose:y,children:e(B,{dimensionX:"fill",alignment:"leftCenter",className:K4,onClick:k,...S,children:e("div",x?{className:J4,dangerouslySetInnerHTML:{__html:n||""}}:{className:J4,children:"string"==typeof o?e("span",{className:Q4,children:o}):o})})})})),t6="StringMinimized-module_stringMinimized__m53JQ",n6="StringMinimized-module_select__uPgy-",r6="StringMinimized-module_closeIcon__N2ycP";var o6=a((({onClear:t,value:n,options:r,inputProps:o,enumOnChange:i,...a})=>e(H,{alignment:"leftCenter",dimensionX:"fill",className:t6,...a,root:{dimensionX:"fill",alignment:"leftCenter",children:r?e(ng,{className:n6,placeholder:n||" ",options:r||[],onChange:e=>i?.(String(e))}):e(G,{value:n,...o}),...a.root},suffix:{dimensionX:"hug",alignment:"center",children:e(xs,{children:e(Ga,{name:"close"}),color:"transparent",onClick:t,className:r6}),...a.suffix}}))),i6="TextArea-module_textArea__VbAA6";const a6=({value:t,onClear:n,onChange:r,focusedRows:o=3,onFocus:i,onBlur:a,rows:l=2,cols:c=1,...d})=>{const[h,p]=u(!1),f=s(null);return Q({targetElements:[f],onClickOutside:()=>{p(!1),a?.(!1)}}),e(H,{ref:f,mode:"fill",dimensionX:"fill",prefix:d.prefix,root:{children:e("textarea",{value:t,onChange:e=>r?.(e.target.value),onFocus:()=>{p(!0),i?.(!0)},rows:h?Math.max(o,l):l,cols:c}),...d.root},suffix:{children:e(xs,{variant:"icon",color:"transparent",onClick:n,children:e(Ga,{name:"close"})}),...d.suffix},className:`${i6} ${d.className}`})};var s6="StorageMinimized-module_storageMinimized__ghk8k",l6="StorageMinimized-module_storage__QZPz8",c6="StorageMinimized-module_text__kRTzX";const u6=({file:n,placeholder:r="Click or Drag & Drop",onUpload:o,onClickShowFileSelect:i,onDelete:a,...l})=>{const c=s(null);return e(H,{ref:c,alignment:"leftCenter",dimensionX:"fill",mode:"fill",root:{children:e(NU,{multiple:!1,onDrop:e=>{e.length&&o?.(e[0])},children:({getRootProps:o,getInputProps:a})=>t(B,{className:l6,alignment:"leftCenter",dimensionX:"fill",gap:10,...o(),onClick:()=>{i?.()},children:[e(Ga,{name:"storage",size:14}),e(V,{className:c6,children:n?n.name:r}),e("input",{...a()})]})})},suffix:{children:n&&e(xs,{variant:"icon",children:e(Ga,{name:"close"}),color:"transparent",onClick:a})},...l,className:`${l.className} ${s6}`})};var d6=a((({selectClassName:t="",label:n="",options:r=[],onChange:o,...i})=>e(B,{...i,dimensionX:"fill",alignment:"leftCenter",children:e(ng,{className:t,placeholder:n,options:r,onChange:o||(()=>{})})}))),h6={drawerContainer:"Drawer-module_drawerContainer__ygAhi",contentContainer:"Drawer-module_contentContainer__Bku-Q",closeButton:"Drawer-module_closeButton__dw57X",leftPosition:"Drawer-module_leftPosition__kS7SQ",scrollableContent:"Drawer-module_scrollableContent__gAaIU",top:"Drawer-module_top__YhWtK",bottom:"Drawer-module_bottom__5nFWz",xs:"Drawer-module_xs__jAtGZ",sm:"Drawer-module_sm__Up7LN",md:"Drawer-module_md__cJcNU",lg:"Drawer-module_lg__c7C-6",xl:"Drawer-module_xl__r6s2-",full:"Drawer-module_full__maAwS",hug:"Drawer-module_hug__JzEGJ",left:"Drawer-module_left__NCP-V",right:"Drawer-module_right__X1qUr",leftToMiddle:"Drawer-module_leftToMiddle__UwTtm",slideFromLeft:"Drawer-module_slideFromLeft__PD3iU",rightToMiddle:"Drawer-module_rightToMiddle__-1zTg",slideFromRight:"Drawer-module_slideFromRight__y-9Lp",topToBottom:"Drawer-module_topToBottom__DlPXA",slideFromTop:"Drawer-module_slideFromTop__-c93O",bottomToTop:"Drawer-module_bottomToTop__b0ULm",slideFromBottom:"Drawer-module_slideFromBottom__uSm8d",shake:"Drawer-module_shake__pBbnG"};const p6=["xs","sm","md","lg","xl","full","hug"],f6=({placement:n,size:r="hug",children:o,showBackdrop:i=!0,backdropType:a="default",backdropClassName:s,backdropProps:c,showCloseButton:d=!0,isOpen:h=!1,onClose:p,portalClassName:f,contentClassName:m,scrollableContentClassName:g})=>{const[v,y]=u(h),[b,_]=u(!1),[x,w]=u(!1);l((()=>{y(h)}),[h]);const S=()=>{y(!1),p&&p()};if(!v)return null;const k={top:"topToBottom",right:"rightToMiddle",bottom:"bottomToTop",left:"leftToMiddle"}[n],C="number"==typeof r||"string"==typeof r&&!p6.includes(r),E=C?"left"===n||"right"===n?{width:"number"==typeof r?`${r}px`:r}:{height:"number"==typeof r?`${r}px`:r}:{};return e(Gm,{className:f,children:t(B,{className:h6.drawerContainer,children:[e(FA,{showBackdrop:i,...c,className:s,onClick:()=>{"static"===a?(_(!0),w(!1),setTimeout((()=>{_(!1),w(!0)}),400)):S()}}),t("div",{className:`${h6.contentContainer} ${x?"":h6[k]} ${b?h6.shake:""} ${h6[n]} ${C?"":h6[r]} ${m||""}`,style:E,children:[d&&e(xs,{className:`${h6.closeButton} ${"right"===n?h6.leftPosition:h6.rightPosition}`,onClick:S,children:e(Ga,{name:"close"}),variant:"icon"}),e("div",{className:`${h6.scrollableContent} ${g||""}`,children:o})]})]})})};var m6={container:"Tab-module_container__e6CN6",indicator:"Tab-module_indicator__UNCf0",item:"Tab-module_item__jpQZh",default:"Tab-module_default__qy-23",active:"Tab-module_active__687wz",underline:"Tab-module_underline__1gKBc",window:"Tab-module_window__vPuG0",root:"Tab-module_root__gGJhw"};var g6=a((({type:n="default",items:r,indicatorClassName:o,indicatorMode:i="equal",value:a,onChange:c,...d})=>{const[h,p]=u(0),[f,m]=u([]),g=s(null),v=s([]);l((()=>{(a||0===a)&&p(a)}),[a]);l((()=>{const e=v.current.map((e=>(e?.offsetWidth||0)+("window"===n?5:20)));m(e)}),[r,i,n]);const y="fit"===i?f[h]||0:f[h]-2,b=f.slice(0,h).reduce(((e,t)=>e+t-5),0);return t(B,{ref:g,dimensionX:"fill",gap:"window"===n?0:20,...d,className:`${m6.container} ${m6[n]} ${d.className||""}`,children:["window"!==n&&e("div",{className:`${m6.indicator} ${o||""}`,style:{width:y,left:b}}),r.map(((t,r)=>e(H,{ref:e=>v.current[r]=e,dimensionX:"equal"===i?"fill":"hug",dimensionY:"fill",mode:"middle",prefix:{children:t.prefix?.children,...t.prefix,className:`${t.prefix?.className||""}`},root:{children:t.root?.children,...t.root,className:`${m6.root} ${t.root?.className||""}`},suffix:{children:t.suffix?.children,...t.suffix,className:`${t.suffix?.className||""}`},onClick:()=>(e=>{p(e),c?.(e)})(r),...t,className:`${m6.item} ${m6[n]} ${r===h?m6.active:""}`},r)))]})})),v6={container:"CircularProgress-module_container__S-38y",svg:"CircularProgress-module_svg__gon7t",backgroundCircle:"CircularProgress-module_backgroundCircle__MQZ2z",progressCircle:"CircularProgress-module_progressCircle__aya2S",normal:"CircularProgress-module_normal__asGeP",success:"CircularProgress-module_success__F6h9t",danger:"CircularProgress-module_danger__POA1X",centerText:"CircularProgress-module_centerText__SKGzM",xxs:"CircularProgress-module_xxs__EO7l5",xs:"CircularProgress-module_xs__WVADp",sm:"CircularProgress-module_sm__yLhUL",md:"CircularProgress-module_md__5RBcj",lg:"CircularProgress-module_lg__mzdQa",xl:"CircularProgress-module_xl__tuBt-"};const y6={xxs:25,xs:40,sm:60,md:80,lg:100,xl:120},b6={xxs:"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"},_6={success:"check",danger:"close",normal:void 0},x6=({percent:n=0,size:r="md",strokeWidth:o=6,showLabel:i=!0,status:a="normal",label:s})=>{const l=y6[r],c=(l-o)/2,u=2*Math.PI*c,d=Math.min(Math.max(n,0),100),h=u-d/100*u,p=_6[a],f=b6[r];return t("div",{className:v6.container,style:{width:l,height:l},children:[t("svg",{className:v6.svg,width:l,height:l,children:[e("circle",{className:v6.backgroundCircle,cx:l/2,cy:l/2,r:c,strokeWidth:o}),e("circle",{className:`${v6.progressCircle} ${v6[a]}`,cx:l/2,cy:l/2,r:c,strokeWidth:o,strokeDasharray:u,strokeDashoffset:h})]}),i&&e("div",{className:`${v6.centerText} ${v6[a]} ${v6[r]}`,children:void 0!==s?s:p?e(Ga,{name:p,size:f}):`${Math.round(d)}%`})]})};var w6;!function(e){e.camelToKebab=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.deepCopy=e=>JSON.parse(JSON.stringify(e)),e.capitalize=e=>e.charAt(0).toUpperCase()+e.slice(1)}(w6||(w6={}));const S6={light:{primary:"#1976d2",primaryLight:"#63a4ff",primaryDark:"#004ba0",danger:"#d32f2f",dangerLight:"#ff6659",dangerDark:"#9a0007",success:"#388e3c",successLight:"#6abf69",successDark:"#00600f",soft:"#f5f5f5",softLight:"#ffffff",softDark:"#c2c2c2",background:"#ffffff",menuBackground:"#f0f0f0",zebra:"#f9f9f9",border:"#e0e0e0",boxShadow:"rgba(0, 0, 0, 0.1)",fontPrimary:"#212121",fontSecondary:"#757575",inputBackground:"#ffffff",inputPlaceholder:"#9e9e9e",tonalOffset:.2},dark:{primary:"#90caf9",primaryLight:"#e3f2fd",primaryDark:"#42a5f5",danger:"#ef5350",dangerLight:"#ff867c",dangerDark:"#b61827",success:"#66bb6a",successLight:"#98ee99",successDark:"#338a3e",soft:"#121212",softLight:"#1e1e1e",softDark:"#000000",background:"#121212",menuBackground:"#1e1e1e",zebra:"#181818",border:"#333333",boxShadow:"rgba(0, 0, 0, 0.5)",fontPrimary:"#ffffff",fontSecondary:"#bdbdbd",inputBackground:"#333333",inputPlaceholder:"#757575",tonalOffset:.3}},k6={PRIMARY:"#1c1c50",BACKGROUND:"#f5f5f5",MENU_BACKGROUND:"#ffffff",ZEBRA:"f6f6f9",SUCCESS:"#21f412",DANGER:"#f41212",SOFT:"#f5f5f5",BORDER:"#d4d0d0",BOX_SHADOW:"#0000000d",FONT_PRIMARY:"#525252",FONT_SECONDARY:"#525252",INPUT_BACKGROUND:"#fafafa",INPUT_PLACEHOLDER:"#9b9b9b",TONAL_OFFSET:.2},C6=5,E6=10,M6=10,P6=16,O6="Inter",T6=e=>{w6.deepCopy(e);const t=N6(e.palette?.primary||k6.PRIMARY,e.palette?.tonalOffset),n=N6(e.palette?.success||k6.SUCCESS,e.palette?.tonalOffset),r=N6(e.palette?.danger||k6.DANGER,e.palette?.tonalOffset),o=N6(e.palette?.soft||k6.SOFT,e.palette?.tonalOffset),i=e.borderRadius?.base??C6,a=e.padding?.base??E6,s=e.gap?.base??M6,l=e.palette?.mode,c=l?S6[l]:void 0,u=(t,n)=>e.palette?.[t]||c?.[t]||n,d=(t,n)=>e.borderRadius?.[t]??i*n,h=(t,n)=>e.padding?.[t]??s*n,p=(t,n)=>e.gap?.[t]??a*n,f={palette:{primary:u("primary",t.base),primaryLight:u("primaryLight",t.light),primaryDark:u("primaryDark",t.dark),danger:u("danger",r.base),dangerLight:u("dangerLight",r.light),dangerDark:u("dangerDark",r.dark),success:u("success",n.base),successLight:u("successLight",n.light),successDark:u("successDark",n.dark),soft:u("soft",o.base),softLight:u("softLight",o.light),softDark:u("softDark",o.dark),background:u("background",k6.BACKGROUND),menuBackground:u("menuBackground",k6.MENU_BACKGROUND),zebra:u("zebra",k6.ZEBRA),border:u("border",k6.BORDER),boxShadow:u("boxShadow",k6.BOX_SHADOW),fontPrimary:u("fontPrimary",k6.FONT_PRIMARY),fontSecondary:u("fontSecondary",k6.FONT_SECONDARY),inputBackground:u("inputBackground",k6.INPUT_BACKGROUND),inputPlaceholder:u("inputPlaceholder",k6.INPUT_PLACEHOLDER),tonalOffset:u("tonalOffset",k6.TONAL_OFFSET)},borderRadius:{sm:d("sm",.6),md:d("md",1),lg:d("lg",2)},padding:{xs:h("xs",.25),sm:h("sm",.5),md:h("md",1),lg:h("lg",1.5),xl:h("xl",2)},gap:{xs:p("xs",.25),sm:p("sm",.5),md:p("md",1),lg:p("lg",1.5),xl:p("xl",2)},fontSize:e.fontSize||P6,fontFamily:e.fontFamily||O6};return(e=>{const t=document.documentElement,n=(e,n)=>{Object.entries(e).forEach((([e,r])=>{const o=w6.camelToKebab(e);if("string"==typeof r&&r.startsWith("#")){const e=MV.color.hexToRgb(r);t.style.setProperty(`--${n}-${o}-rgb`,e)}t.style.setProperty(`--${n}-${o}`,r)}))};n(e.palette,"color"),n(e.borderRadius,"border-radius"),n(e.padding,"padding"),n(e.gap,"gap"),t.style.setProperty("--oziko-font-size-base",`${e.fontSize}px`),t.style.setProperty("--oziko-font-family-base",e.fontFamily)})(f),f},N6=(e,t=.2)=>{const{h:n,s:r,l:o}=MV.color.hexToHSL(e),i="number"==typeof t?t:t.light,a="number"==typeof t?t:t.dark;return{base:e,light:MV.color.hslToHex(n,r,Math.min(1,o+i)),dark:MV.color.hslToHex(n,r,Math.max(0,o-a))}},D6=m(void 0),A6=()=>{const e=p(D6);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};var L6,I6,z6;!function(e){e.isTypeLocation=e=>"object"==typeof e&&null!==e&&"string"==typeof e.type&&Array.isArray(e.coordinates)&&2===e.coordinates.length&&e.coordinates.every((e=>"number"==typeof e))}(L6||(L6={})),function(e){e.hexToHSL=e=>{let t=0,n=0,r=0;if(4===e.length)t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16);else{if(7!==e.length)throw new Error("Invalid HEX format");t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)}t/=255,n/=255,r/=255;const o=Math.max(t,n,r),i=Math.min(t,n,r);let a=0,s=0,l=(o+i)/2;if(o!==i){const e=o-i;switch(s=l>.5?e/(2-o-i):e/(o+i),o){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return{h:a,s:s,l:l}},e.hslToHex=(e,t,n)=>{const r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e);let o,i,a;if(0===t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=r(l,s,e+1/3),i=r(l,s,e),a=r(l,s,e-1/3)}return`#${Math.round(255*o).toString(16).padStart(2,"0")}${Math.round(255*i).toString(16).padStart(2,"0")}${Math.round(255*a).toString(16).padStart(2,"0")}`}}(I6||(I6={})),function(e){e.timeUnitsInSeconds={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3},e.unitMapper=e=>e<=10?"second":e<=120?"minute":e<=2160?"hour":e<=43200?"day":e<=50400?"week":e<=1296e3?"month":e<=9331200?"quarter":"year",e.getDiffInMinutes=(e,t)=>Math.abs(t.getTime()-e.getTime())/6e4,e.formatDateToEnUs=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(e)}(z6||(z6={}));export{eI as Accordion,p3 as ArrayInput,T4 as ArrayMinimizedInput,te as Autocomplete,FA as Backdrop,pe as BaseInput,Oq as BooleanInput,N4 as BooleanMinimizedInput,es as BucketFieldPopup,xs as Button,Zf as Chart,em as Checkbox,nm as Chip,Y3 as ChipInput,x6 as CircularProgress,om as Color,Nq as ColorInput,L4 as ColorMinimizedInput,og as ColorPicker,kX as Dashboard,fg as DashboardItem,Eq as DateInput,R4 as DateMinimizedInput,TA as DatePicker,BA as Directory,f6 as Drawer,ZA as DropList,d6 as EnumInput,B as FlexElement,H as FluidContainer,Ga as Icon,G as Input,KA as InputHeader,K as InputWithIcon,QA as Json,qm as LayerManagerProvider,Y as ListItem,nL as ListRow,YU as LocationInput,F4 as LocationMinimizedInput,_L as Map,OX as MenuGroup,PL as Modal,jU as MultipleSelectionInput,H4 as MultipleSelectionMinimizedInput,rI as NavigatorItem,QX as NotificationProvider,pq as NumberInput,X4 as NumberMinimizedInput,d3 as ObjectInput,G4 as ObjectMinimizedInput,jA as Popover,Gm as Portal,S4 as RelationInput,c3 as RichTextInput,e6 as RichTextMinimizedInput,pg as Section,ng as Select,tg as SelectOption,_s as Spinner,lI as SsoButton,LL as StorageFileCard,W$ as StorageFilter,IU as StorageInput,u6 as StorageMinimizedInput,sq as StringInput,o6 as StringMinimizedInput,FL as Switch,g6 as Tab,UX as Table,V as Text,bq as TextAreaInput,a6 as TextAreaMinimizedInput,TV as Timeline,BL as Title,L6 as apiUtil,I6 as colorUtil,T6 as createTheme,J as handledClickOutsideEvents,w6 as helperUtils,z6 as timeUtil,ee as useAdaptivePosition,C4 as useInputRepresenter,zA as useKeyDown,Zm as useLayer,eq as useNotification,Q as useOnClickOutside,A6 as useTheme};
100
100
  //# sourceMappingURL=index.mjs.map