@oliasoft-open-source/charts-library 5.1.4-beta-2 → 5.1.4

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.
Files changed (23) hide show
  1. package/dist/assets/{Color-YHDXOIA2-CVL3yqvq.js → Color-YHDXOIA2-Bw7frVc4.js} +1 -1
  2. package/dist/assets/{DocsRenderer-CFRXHY34-BVHN4IgT.js → DocsRenderer-CFRXHY34-Ddfpn1tl.js} +3 -3
  3. package/dist/assets/{bar-chart.stories-DquA7ACv.js → bar-chart.stories-BOmiGyRJ.js} +1 -1
  4. package/dist/assets/{entry-preview-DZ_R6dYr.js → entry-preview-C1S3a8Ki.js} +1 -1
  5. package/dist/assets/{get-draggableData-B6vSKEXH.js → get-draggableData-DwR56Jcm.js} +1 -1
  6. package/dist/assets/{iframe-C_yRnxwh.js → iframe-Bxryd8aq.js} +2 -2
  7. package/dist/assets/{legend-context-Ck5tFDGN.js → legend-context-C_u_4J2t.js} +16 -16
  8. package/dist/assets/{legend-DOA3L9eH.js → legend-oIKfg-IX.js} +1 -1
  9. package/dist/assets/{line-chart-CpA-Dt9p.js → line-chart-DRDZItEY.js} +1 -1
  10. package/dist/assets/{line-chart.stories-CcH00UaJ.js → line-chart.stories-DW8IZszu.js} +1 -1
  11. package/dist/assets/{line-chart.test-case.stories-D7ekx7KO.js → line-chart.test-case.stories-BznLYsnQ.js} +1 -1
  12. package/dist/assets/pie-chart.stories-BcF2NKWC.js +45 -0
  13. package/dist/assets/{preview-DY34liza.js → preview-Bnn3MLlY.js} +1 -1
  14. package/dist/assets/{preview-Da3Tuoe0.js → preview-Cr9g82CZ.js} +2 -2
  15. package/dist/assets/{scatter-chart.stories-DVIcv9-6.js → scatter-chart.stories-qmWyacKn.js} +1 -1
  16. package/dist/iframe.html +1 -1
  17. package/dist/index.js +23 -7
  18. package/dist/project.json +1 -1
  19. package/dist/src/components/common/hooks/use-update-annotations.d.ts +7 -0
  20. package/dist/src/components/common/legend-component/state/legend-action-types.d.ts +1 -0
  21. package/dist/src/components/common/legend-component/state/legend-state-reducer.d.ts +4 -1
  22. package/package.json +1 -1
  23. package/dist/assets/pie-chart.stories-BxRNBusg.js +0 -45
@@ -1,4 +1,4 @@
1
- import{af as ac,ag as uc,h as V0,ah as Ku,ai as Ts,aj as aM,ak as gs,al as rg,am as ao,an as Ote,ao as zte,ap as ec,aq as v$,ar as Ute,as as qte,at as Wte,au as Vte,av as Mh,aw as E$,ax as uM,ay as hd,az as tp,aA as m6,aB as w$,aC as $te,aD as g6,aE as $0,aF as y6,aG as Gte,v as vn,aH as mI,aI as Yte,r as Kte,aJ as Xte,aK as jte,aL as Qte,aM as Jte,aN as Zte,aO as ene,aP as tne,aQ as nne,aR as rne,aS as ine,aT as G0,c as lM,P as Qd}from"./legend-context-Ck5tFDGN.js";import{j as x,r as one}from"./jsx-runtime-W3oueGCa.js";import{r as q,g as sne,R as We}from"./index-YTOF1_EJ.js";import{r as No,h as T$}from"./index-DHw5ixvP.js";import{e as ane}from"./index-CgYGpm1H.js";/*!
1
+ import{af as ac,ag as uc,h as V0,ah as Ku,ai as Ts,aj as aM,ak as gs,al as rg,am as ao,an as Ote,ao as zte,ap as ec,aq as v$,ar as Ute,as as qte,at as Wte,au as Vte,av as Mh,aw as E$,ax as uM,ay as hd,az as tp,aA as m6,aB as w$,aC as $te,aD as g6,aE as $0,aF as y6,aG as Gte,v as vn,aH as mI,aI as Yte,r as Kte,aJ as Xte,aK as jte,aL as Qte,aM as Jte,aN as Zte,aO as ene,aP as tne,aQ as nne,aR as rne,aS as ine,aT as G0,c as lM,P as Qd}from"./legend-context-C_u_4J2t.js";import{j as x,r as one}from"./jsx-runtime-W3oueGCa.js";import{r as q,g as sne,R as We}from"./index-YTOF1_EJ.js";import{r as No,h as T$}from"./index-DHw5ixvP.js";import{e as ane}from"./index-CgYGpm1H.js";/*!
2
2
  * chartjs-plugin-annotation v3.1.0
3
3
  * https://www.chartjs.org/chartjs-plugin-annotation/index
4
4
  * (c) 2024 chartjs-plugin-annotation Contributors
@@ -1,4 +1,4 @@
1
- import{j as F}from"./jsx-runtime-W3oueGCa.js";import{r as G,g as ct}from"./index-YTOF1_EJ.js";import{$ as dt,a0 as bn,a1 as we,B as fe,a2 as gt,v as Y,A as ie,P as Ce,C as _e,a3 as an,a4 as ht,g as Ke,y as pt,S as mt,E as bt,F as yt,a5 as Se,a6 as Pe,H as Ee,a7 as Ne,G as Je,I as wt,T as _t,L as yn,a as Et,J as Be,K as Tt,M as be,d as Lt,r as vt,N as wn,a8 as At,f as xt,a9 as Ct,U as St,aa as le,ab as fn,ac as xe,D as Pt,ad as ye,b as It,s as Ot,Q as Nt,ae as Mt,h as Dt,i as Bt,V as jt,W as Ft,j as kt,k as Ut,p as Rt,m as Gt,n as Yt,o as zt,q as Vt,t as Xt}from"./legend-context-Ck5tFDGN.js";import{r as He,M as cn,k as je,B as ce,s as Ht,v as qt,w as _n,x as Wt,y as $t,z as Zt,A as Kt,E as Jt,N as En,G as Qt,S as er,g as nr,e as tr,F as rr,T as Un,J as or,K as sr,D as ir,O as lr,Q as ur,o as ar,q as fr,U as cr,j as dr,u as gr,Z as hr,t as pr,R as mr,l as br,H as yr,L as wr,m as _r,n as Er}from"./legend-DOA3L9eH.js";import{c as Tr,C as Lr,f as Tn,a as vr,b as Ar}from"./get-draggableData-B6vSKEXH.js";import{e as xr}from"./index-CgYGpm1H.js";const Cr=(e,n,t)=>{const[o,r]=e.major,[d,c]=e.minor,p=(o.x+r.x+d.x+c.x)/4,w=(o.y+r.y+d.y+c.y)/4,C=r.x-o.x,E=r.y-o.y,P=Math.atan2(t.getPixelForValue(w+E/2)-t.getPixelForValue(w-E/2),n.getPixelForValue(p+C/2)-n.getPixelForValue(p-C/2)),M=Math.hypot(n.getPixelForValue(o.x)-n.getPixelForValue(r.x),t.getPixelForValue(o.y)-t.getPixelForValue(r.y))/2,N=Math.hypot(n.getPixelForValue(d.x)-n.getPixelForValue(c.x),t.getPixelForValue(d.y)-t.getPixelForValue(c.y))/2,v=n.getPixelForValue(p),x=t.getPixelForValue(w);return{cx:v,cy:x,radiusX:M,radiusY:N,angle:P}},Sr=e=>e.data.datasets.some(n=>n.data.some(t=>!!t.ellipsePoints)),Pr={id:"ellipsisAnnotationPlugin",afterDatasetsDraw(e){var d,c,p,w,C,E,P,M,N;if(!Sr(e))return;const n=e==null?void 0:e.ctx,t=(d=e==null?void 0:e.scales)==null?void 0:d.x,o=(c=e==null?void 0:e.scales)==null?void 0:c.y,r=e==null?void 0:e.chartArea;!t||!o||!r||((p=n==null?void 0:n.save)==null||p.call(n),(w=n==null?void 0:n.beginPath)==null||w.call(n),(C=n==null?void 0:n.rect)==null||C.call(n,r.left,r.top,r.right-r.left,r.bottom-r.top),(E=n==null?void 0:n.clip)==null||E.call(n),(M=(P=e==null?void 0:e.data)==null?void 0:P.datasets)==null||M.forEach(v=>{var h;const x=v;(h=x==null?void 0:x.data)==null||h.forEach(A=>{var l,u,i,_,T;const{ellipsePoints:b}=A??{};if(!b)return;const{cx:L,cy:y,radiusX:S,radiusY:f,angle:g}=Cr(b,t,o);(l=n==null?void 0:n.save)==null||l.call(n),(u=n==null?void 0:n.beginPath)==null||u.call(n),(i=n==null?void 0:n.ellipse)==null||i.call(n,L,y,S,f,g,0,2*Math.PI),n.strokeStyle=x.borderColor||dt,n.lineWidth=x.borderWidth||1,(_=n==null?void 0:n.stroke)==null||_.call(n),(T=n==null?void 0:n.restore)==null||T.call(n)})}),(N=n==null?void 0:n.restore)==null||N.call(n))}},Ir="_chart_e3qdd_1",Or="_canvas_e3qdd_11",Nr="_fixedHeight_e3qdd_20",Mr="_stretchHeight_e3qdd_26",Dr="_squareAspectRatio_e3qdd_32",Br="_table_e3qdd_62",qe={chart:Ir,canvas:Or,fixedHeight:Nr,stretchHeight:Mr,squareAspectRatio:Dr,table:Br};var Rn=Symbol.for("immer-nothing"),Ln=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function oe(e,...n){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Te=Object.getPrototypeOf;function Le(e){return!!e&&!!e[ne]}function he(e){var n;return e?Gn(e)||Array.isArray(e)||!!e[Ln]||!!((n=e.constructor)!=null&&n[Ln])||ze(e)||Ve(e):!1}var jr=Object.prototype.constructor.toString();function Gn(e){if(!e||typeof e!="object")return!1;const n=Te(e);if(n===null)return!0;const t=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return t===Object?!0:typeof t=="function"&&Function.toString.call(t)===jr}function Fe(e,n){Ye(e)===0?Reflect.ownKeys(e).forEach(t=>{n(t,e[t],e)}):e.forEach((t,o)=>n(o,t,e))}function Ye(e){const n=e[ne];return n?n.type_:Array.isArray(e)?1:ze(e)?2:Ve(e)?3:0}function Qe(e,n){return Ye(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function Yn(e,n,t){const o=Ye(e);o===2?e.set(n,t):o===3?e.add(t):e[n]=t}function Fr(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n}function ze(e){return e instanceof Map}function Ve(e){return e instanceof Set}function ge(e){return e.copy_||e.base_}function en(e,n){if(ze(e))return new Map(e);if(Ve(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const t=Gn(e);if(n===!0||n==="class_only"&&!t){const o=Object.getOwnPropertyDescriptors(e);delete o[ne];let r=Reflect.ownKeys(o);for(let d=0;d<r.length;d++){const c=r[d],p=o[c];p.writable===!1&&(p.writable=!0,p.configurable=!0),(p.get||p.set)&&(o[c]={configurable:!0,writable:!0,enumerable:p.enumerable,value:e[c]})}return Object.create(Te(e),o)}else{const o=Te(e);if(o!==null&&t)return{...e};const r=Object.create(o);return Object.assign(r,e)}}function dn(e,n=!1){return Xe(e)||Le(e)||!he(e)||(Ye(e)>1&&(e.set=e.add=e.clear=e.delete=kr),Object.freeze(e),n&&Object.entries(e).forEach(([t,o])=>dn(o,!0))),e}function kr(){oe(2)}function Xe(e){return Object.isFrozen(e)}var Ur={};function pe(e){const n=Ur[e];return n||oe(0,e),n}var Ie;function zn(){return Ie}function Rr(e,n){return{drafts_:[],parent_:e,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vn(e,n){n&&(pe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=n)}function nn(e){tn(e),e.drafts_.forEach(Gr),e.drafts_=null}function tn(e){e===Ie&&(Ie=e.parent_)}function An(e){return Ie=Rr(Ie,e)}function Gr(e){const n=e[ne];n.type_===0||n.type_===1?n.revoke_():n.revoked_=!0}function xn(e,n){n.unfinalizedDrafts_=n.drafts_.length;const t=n.drafts_[0];return e!==void 0&&e!==t?(t[ne].modified_&&(nn(n),oe(4)),he(e)&&(e=ke(n,e),n.parent_||Ue(n,e)),n.patches_&&pe("Patches").generateReplacementPatches_(t[ne].base_,e,n.patches_,n.inversePatches_)):e=ke(n,t,[]),nn(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),e!==Rn?e:void 0}function ke(e,n,t){if(Xe(n))return n;const o=n[ne];if(!o)return Fe(n,(r,d)=>Cn(e,o,n,r,d,t)),n;if(o.scope_!==e)return n;if(!o.modified_)return Ue(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const r=o.copy_;let d=r,c=!1;o.type_===3&&(d=new Set(r),r.clear(),c=!0),Fe(d,(p,w)=>Cn(e,o,r,p,w,t,c)),Ue(e,r,!1),t&&e.patches_&&pe("Patches").generatePatches_(o,t,e.patches_,e.inversePatches_)}return o.copy_}function Cn(e,n,t,o,r,d,c){if(Le(r)){const p=d&&n&&n.type_!==3&&!Qe(n.assigned_,o)?d.concat(o):void 0,w=ke(e,r,p);if(Yn(t,o,w),Le(w))e.canAutoFreeze_=!1;else return}else c&&t.add(r);if(he(r)&&!Xe(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ke(e,r),(!n||!n.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(t,o)&&Ue(e,r)}}function Ue(e,n,t=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&dn(n,t)}function Yr(e,n){const t=Array.isArray(e),o={type_:t?1:0,scope_:n?n.scope_:zn(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=o,d=gn;t&&(r=[o],d=Oe);const{revoke:c,proxy:p}=Proxy.revocable(r,d);return o.draft_=p,o.revoke_=c,p}var gn={get(e,n){if(n===ne)return e;const t=ge(e);if(!Qe(t,n))return zr(e,t,n);const o=t[n];return e.finalized_||!he(o)?o:o===We(e.base_,n)?($e(e),e.copy_[n]=on(o,e)):o},has(e,n){return n in ge(e)},ownKeys(e){return Reflect.ownKeys(ge(e))},set(e,n,t){const o=Vn(ge(e),n);if(o!=null&&o.set)return o.set.call(e.draft_,t),!0;if(!e.modified_){const r=We(ge(e),n),d=r==null?void 0:r[ne];if(d&&d.base_===t)return e.copy_[n]=t,e.assigned_[n]=!1,!0;if(Fr(t,r)&&(t!==void 0||Qe(e.base_,n)))return!0;$e(e),rn(e)}return e.copy_[n]===t&&(t!==void 0||n in e.copy_)||Number.isNaN(t)&&Number.isNaN(e.copy_[n])||(e.copy_[n]=t,e.assigned_[n]=!0),!0},deleteProperty(e,n){return We(e.base_,n)!==void 0||n in e.base_?(e.assigned_[n]=!1,$e(e),rn(e)):delete e.assigned_[n],e.copy_&&delete e.copy_[n],!0},getOwnPropertyDescriptor(e,n){const t=ge(e),o=Reflect.getOwnPropertyDescriptor(t,n);return o&&{writable:!0,configurable:e.type_!==1||n!=="length",enumerable:o.enumerable,value:t[n]}},defineProperty(){oe(11)},getPrototypeOf(e){return Te(e.base_)},setPrototypeOf(){oe(12)}},Oe={};Fe(gn,(e,n)=>{Oe[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}});Oe.deleteProperty=function(e,n){return Oe.set.call(this,e,n,void 0)};Oe.set=function(e,n,t){return gn.set.call(this,e[0],n,t,e[0])};function We(e,n){const t=e[ne];return(t?ge(t):e)[n]}function zr(e,n,t){var r;const o=Vn(n,t);return o?"value"in o?o.value:(r=o.get)==null?void 0:r.call(e.draft_):void 0}function Vn(e,n){if(!(n in e))return;let t=Te(e);for(;t;){const o=Object.getOwnPropertyDescriptor(t,n);if(o)return o;t=Te(t)}}function rn(e){e.modified_||(e.modified_=!0,e.parent_&&rn(e.parent_))}function $e(e){e.copy_||(e.copy_=en(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vr=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(n,t,o)=>{if(typeof n=="function"&&typeof t!="function"){const d=t;t=n;const c=this;return function(w=d,...C){return c.produce(w,E=>t.call(this,E,...C))}}typeof t!="function"&&oe(6),o!==void 0&&typeof o!="function"&&oe(7);let r;if(he(n)){const d=An(this),c=on(n,void 0);let p=!0;try{r=t(c),p=!1}finally{p?nn(d):tn(d)}return vn(d,o),xn(r,d)}else if(!n||typeof n!="object"){if(r=t(n),r===void 0&&(r=n),r===Rn&&(r=void 0),this.autoFreeze_&&dn(r,!0),o){const d=[],c=[];pe("Patches").generateReplacementPatches_(n,r,d,c),o(d,c)}return r}else oe(1,n)},this.produceWithPatches=(n,t)=>{if(typeof n=="function")return(c,...p)=>this.produceWithPatches(c,w=>n(w,...p));let o,r;return[this.produce(n,t,(c,p)=>{o=c,r=p}),o,r]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){he(e)||oe(8),Le(e)&&(e=Xr(e));const n=An(this),t=on(e,void 0);return t[ne].isManual_=!0,tn(n),t}finishDraft(e,n){const t=e&&e[ne];(!t||!t.isManual_)&&oe(9);const{scope_:o}=t;return vn(o,n),xn(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,n){let t;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.path.length===0&&r.op==="replace"){e=r.value;break}}t>-1&&(n=n.slice(t+1));const o=pe("Patches").applyPatches_;return Le(e)?o(e,n):this.produce(e,r=>o(r,n))}};function on(e,n){const t=ze(e)?pe("MapSet").proxyMap_(e,n):Ve(e)?pe("MapSet").proxySet_(e,n):Yr(e,n);return(n?n.scope_:zn()).drafts_.push(t),t}function Xr(e){return Le(e)||oe(10,e),Xn(e)}function Xn(e){if(!he(e)||Xe(e))return e;const n=e[ne];let t;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,t=en(e,n.scope_.immer_.useStrictShallowCopy_)}else t=en(e,!0);return Fe(t,(o,r)=>{Yn(t,o,Xn(r))}),n&&(n.finalized_=!1),t}var te=new Vr,Hr=te.produce;te.produceWithPatches.bind(te);te.setAutoFreeze.bind(te);te.setUseStrictShallowCopy.bind(te);te.applyPatches.bind(te);te.createDraft.bind(te);te.finishDraft.bind(te);const Hn="TOGGLE_ZOOM",qn="TOGGLE_PAN",Wn="TOGGLE_POINTS",$n="TOGGLE_LINE",Zn="TOGGLE_LEGEND",Kn="TOGGLE_TABLE",sn="RESET_AXES_RANGES",ln="UPDATE_AXES_RANGES",Jn="TOGGLE_DRAG_POINTS",Qn="TOGGLE_DRAG_ANNOTATION",et="DISABLE_DRAG_OPTIONS",De="UPDATE_EDITED",qr=(e,n)=>Hr(e,t=>{switch(n.type){case Hn:{t.zoomEnabled=!t.zoomEnabled,t.panEnabled&&(t.panEnabled=!1),t.enableDragPoints&&(t.enableDragPoints=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case qn:{t.panEnabled=!t.panEnabled,t.zoomEnabled&&(t.zoomEnabled=!1),t.enableDragPoints&&(t.enableDragPoints=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case Wn:{t.pointsEnabled=!t.pointsEnabled;break}case $n:{t.lineEnabled=!t.lineEnabled;break}case Zn:{t.legendEnabled=!t.legendEnabled;break}case Kn:{t.showTable=!t.showTable;break}case ln:{const{axes:o}=n.payload;t.axes=o;break}case sn:{const{axes:o}=n.payload;t.axes=o;break}case Jn:{t.enableDragPoints=!t.enableDragPoints,t.panEnabled&&(t.panEnabled=!1),t.zoomEnabled&&(t.zoomEnabled=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case Qn:{t.enableDragAnnotation=!t.enableDragAnnotation,t.panEnabled&&(t.panEnabled=!1),t.zoomEnabled&&(t.zoomEnabled=!1);break}case et:{(t.enableDragAnnotation||t.enableDragPoints||t.panEnabled||t.zoomEnabled)&&(t.enableDragAnnotation=!1,t.enableDragPoints=!1,t.panEnabled=!1,t.zoomEnabled=!1);break}case De:{t.edited=n.payload;break}}}),Wr=e=>{if(!e)return null;const n=`line-chart-state-${e}`,t=localStorage.getItem(n);return t?JSON.parse(t).state:null},$r=(e=72)=>{const n=new Date().getTime(),t=e*60*60*1e3;for(let o=0;o<localStorage.length;o++){const r=localStorage.key(o);if(r!=null&&r.includes("line-chart-state-")){const d=localStorage.getItem(r);if(d){const p=JSON.parse(d).timestamp;p&&n-p>t&&localStorage.removeItem(r)}}}},Zr=(e,n)=>{if(!n)return;const t=new Date().getTime(),o=`line-chart-state-${n}`,r={state:e,timestamp:t};localStorage.setItem(o,JSON.stringify(r)),$r()},Kr=({options:e,persistenceId:n})=>{const{chartOptions:{enableZoom:t,enablePan:o,showPoints:r,showLine:d,enableDragAnnotation:c},legend:{display:p},dragData:w}=e,{zoomEnabled:C,panEnabled:E,pointsEnabled:P,lineEnabled:M,legendEnabled:N,enableDragPoints:v,enableDragAnnotation:x}=Wr(n)||{};return{zoomEnabled:c??x?!1:C??t,panEnabled:E??o,pointsEnabled:P??r,lineEnabled:M??d,legendEnabled:N??p,axes:[],showTable:!1,enableDragPoints:(w==null?void 0:w.enableDragData)&&v,enableDragAnnotation:c??x,edited:!1}},Jr=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},G.createElement("clipPath",{id:"a"},G.createElement("path",{d:"m0 0h12v12h-12z"})),G.createElement("g",{clipPath:"url(#a)"},G.createElement("path",{d:"m.5 6.5v-1h11v1c-4.16104 0-6.63549 0-11 0z"}))),Qr=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e},G.createElement("circle",{cx:6,cy:6,r:2})),eo=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},G.createElement("clipPath",{id:"a"},G.createElement("path",{d:"m0 0h12v12h-12z"})),G.createElement("g",{clipPath:"url(#a)"},G.createElement("path",{d:"m7.937 6.5c-.11122.42912-.36179.80916-.71237 1.08047-.35058.2713-.78133.4185-1.22463.4185s-.87405-.1472-1.22463-.4185c-.35058-.27131-.60115-.65135-.71237-1.08047h-3.563v-1h3.563c.11122-.42912.36179-.80916.71237-1.08046s.78133-.41851 1.22463-.41851.87405.14721 1.22463.41851.60115.65134.71237 1.08046h3.563v1z"})));function no({lineEnabled:e,onToggleLine:n,onTogglePoints:t,pointsEnabled:o,translations:r}){return[{type:"Option",label:r.pointsLines,icon:F.jsx(He,{icon:F.jsx(eo,{})}),selected:o&&e,onClick:()=>{o||t(),e||n()}},{type:"Option",label:r.linesOnly,icon:F.jsx(He,{icon:F.jsx(Jr,{})}),selected:!o&&e,onClick:()=>{o&&t(),e||n()}},{type:"Option",label:r.pointsOnly,icon:F.jsx(He,{icon:F.jsx(Qr,{})}),selected:o&&!e,onClick:()=>{o||t(),e&&n()}}]}const nt=({options:e})=>{const[n,t]=G.useState(!1),o=e.find(r=>r.selected);return F.jsx(cn,{open:n,setOpen:t,menu:{sections:e,trigger:"Component",component:F.jsx(je,{display:"inline-flex",text:o==null?void 0:o.label,placement:"bottom-start",enabled:!n,children:F.jsx(ce,{colored:"muted",basic:!0,small:!0,round:!0,icon:o==null?void 0:o.icon})})}})};nt.__docgenInfo={description:"",methods:[],displayName:"LineOptions",props:{options:{required:!0,tsType:{name:"Array",elements:[{name:"IMenuSection"}],raw:"IMenuSection[]"},description:""}}};function to({onTogglePan:e,onToggleZoom:n,panEnabled:t,zoomEnabled:o,enableDragPoints:r,enableDragAnnotation:d,isDragDataAllowed:c,isDragAnnotationAllowed:p,onToggleDragAnnotation:w,onToggleDragPoints:C,onDisableDragOptions:E,translations:{dragToZoom:P,doubleClickToReset:M,dragToPan:N,dragToMovePoints:v,dragDisabled:x,dragToMoveAnnotation:h}}){return[{label:P,description:M,icon:F.jsx(Ht,{}),selected:o,type:"Option",onClick:()=>{o||n()}},{label:N,description:M,icon:F.jsx(qt,{}),selected:t,type:"Option",onClick:()=>{t||e()}},...c?[{label:v,icon:F.jsx(_n,{}),selected:r,type:"Option",onClick:()=>{r||C()}}]:[],...p?[{label:h,icon:F.jsx(_n,{}),selected:d,type:"Option",onClick:()=>{d||w()}}]:[],{label:x,icon:F.jsx(Wt,{}),selected:!o&&!t&&!r&&!d,type:"Option",onClick:E}]}const tt=({options:e})=>{const n=e.find(t=>t.selected);return F.jsx(cn,{menu:{sections:e,trigger:"Component",component:F.jsx(ce,{colored:"muted",basic:!0,small:!0,label:n==null?void 0:n.label,icon:n==null?void 0:n.icon})}})};tt.__docgenInfo={description:"@param {import('./drag-options-interfaces').IDragOptions} obj",methods:[],displayName:"DragOptions",props:{options:{required:!0,tsType:{name:"Array",elements:[{name:"IMenuSection"}],raw:"IMenuSection[]"},description:""}}};const ro="_controls_1edjs_1",oo="_buttons_1edjs_6",Sn={controls:ro,buttons:oo},so=e=>{const n=G.useCallback(t=>()=>{e({type:t})},[e]);return{onToggleLegend:n(Zn),onToggleLine:n($n),onTogglePan:n(qn),onTogglePoints:n(Wn),onToggleTable:n(Kn),onToggleZoom:n(Hn),onToggleDragPoints:n(Jn),onToggleDragAnnotation:n(Qn),onDisableDragOptions:n(et)}};function Me(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ze={exports:{}},Pn;function io(){return Pn||(Pn=1,function(e,n){(function(t){e.exports=t()})(function(){return function t(o,r,d){function c(C,E){if(!r[C]){if(!o[C]){var P=typeof Me=="function"&&Me;if(!E&&P)return P(C,!0);if(p)return p(C,!0);throw new Error("Cannot find module '"+C+"'")}E=r[C]={exports:{}},o[C][0].call(E.exports,function(M){var N=o[C][1][M];return c(N||M)},E,E.exports,t,o,r,d)}return r[C].exports}for(var p=typeof Me=="function"&&Me,w=0;w<d.length;w++)c(d[w]);return c}({1:[function(t,o,r){(function(d,c,p,w,C,E,P,M,N){var v=t("crypto");function x(f,g){g=b(f,g);var l;return(l=g.algorithm!=="passthrough"?v.createHash(g.algorithm):new S).write===void 0&&(l.write=l.update,l.end=l.update),y(g,l).dispatch(f),l.update||l.end(""),l.digest?l.digest(g.encoding==="buffer"?void 0:g.encoding):(f=l.read(),g.encoding!=="buffer"?f.toString(g.encoding):f)}(r=o.exports=x).sha1=function(f){return x(f)},r.keys=function(f){return x(f,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(f){return x(f,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(f){return x(f,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var h=v.getHashes?v.getHashes().slice():["sha1","md5"],A=(h.push("passthrough"),["buffer","hex","binary","base64"]);function b(f,g){var l={};if(l.algorithm=(g=g||{}).algorithm||"sha1",l.encoding=g.encoding||"hex",l.excludeValues=!!g.excludeValues,l.algorithm=l.algorithm.toLowerCase(),l.encoding=l.encoding.toLowerCase(),l.ignoreUnknown=g.ignoreUnknown===!0,l.respectType=g.respectType!==!1,l.respectFunctionNames=g.respectFunctionNames!==!1,l.respectFunctionProperties=g.respectFunctionProperties!==!1,l.unorderedArrays=g.unorderedArrays===!0,l.unorderedSets=g.unorderedSets!==!1,l.unorderedObjects=g.unorderedObjects!==!1,l.replacer=g.replacer||void 0,l.excludeKeys=g.excludeKeys||void 0,f===void 0)throw new Error("Object argument required.");for(var u=0;u<h.length;++u)h[u].toLowerCase()===l.algorithm.toLowerCase()&&(l.algorithm=h[u]);if(h.indexOf(l.algorithm)===-1)throw new Error('Algorithm "'+l.algorithm+'" not supported. supported values: '+h.join(", "));if(A.indexOf(l.encoding)===-1&&l.algorithm!=="passthrough")throw new Error('Encoding "'+l.encoding+'" not supported. supported values: '+A.join(", "));return l}function L(f){if(typeof f=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(f))!=null}function y(f,g,l){l=l||[];function u(i){return g.update?g.update(i,"utf8"):g.write(i,"utf8")}return{dispatch:function(i){return this["_"+((i=f.replacer?f.replacer(i):i)===null?"null":typeof i)](i)},_object:function(i){var _,T=Object.prototype.toString.call(i),U=/\[object (.*)\]/i.exec(T);if(U=(U=U?U[1]:"unknown:["+T+"]").toLowerCase(),0<=(T=l.indexOf(i)))return this.dispatch("[CIRCULAR:"+T+"]");if(l.push(i),p!==void 0&&p.isBuffer&&p.isBuffer(i))return u("buffer:"),u(i);if(U==="object"||U==="function"||U==="asyncfunction")return T=Object.keys(i),f.unorderedObjects&&(T=T.sort()),f.respectType===!1||L(i)||T.splice(0,0,"prototype","__proto__","constructor"),f.excludeKeys&&(T=T.filter(function(k){return!f.excludeKeys(k)})),u("object:"+T.length+":"),_=this,T.forEach(function(k){_.dispatch(k),u(":"),f.excludeValues||_.dispatch(i[k]),u(",")});if(!this["_"+U]){if(f.ignoreUnknown)return u("["+U+"]");throw new Error('Unknown object type "'+U+'"')}this["_"+U](i)},_array:function(i,k){k=k!==void 0?k:f.unorderedArrays!==!1;var T=this;if(u("array:"+i.length+":"),!k||i.length<=1)return i.forEach(function(R){return T.dispatch(R)});var U=[],k=i.map(function(R){var D=new S,z=l.slice();return y(f,D,z).dispatch(R),U=U.concat(z.slice(l.length)),D.read().toString()});return l=l.concat(U),k.sort(),this._array(k,!1)},_date:function(i){return u("date:"+i.toJSON())},_symbol:function(i){return u("symbol:"+i.toString())},_error:function(i){return u("error:"+i.toString())},_boolean:function(i){return u("bool:"+i.toString())},_string:function(i){u("string:"+i.length+":"),u(i.toString())},_function:function(i){u("fn:"),L(i)?this.dispatch("[native]"):this.dispatch(i.toString()),f.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(i.name)),f.respectFunctionProperties&&this._object(i)},_number:function(i){return u("number:"+i.toString())},_xml:function(i){return u("xml:"+i.toString())},_null:function(){return u("Null")},_undefined:function(){return u("Undefined")},_regexp:function(i){return u("regex:"+i.toString())},_uint8array:function(i){return u("uint8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint8clampedarray:function(i){return u("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(i))},_int8array:function(i){return u("int8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint16array:function(i){return u("uint16array:"),this.dispatch(Array.prototype.slice.call(i))},_int16array:function(i){return u("int16array:"),this.dispatch(Array.prototype.slice.call(i))},_uint32array:function(i){return u("uint32array:"),this.dispatch(Array.prototype.slice.call(i))},_int32array:function(i){return u("int32array:"),this.dispatch(Array.prototype.slice.call(i))},_float32array:function(i){return u("float32array:"),this.dispatch(Array.prototype.slice.call(i))},_float64array:function(i){return u("float64array:"),this.dispatch(Array.prototype.slice.call(i))},_arraybuffer:function(i){return u("arraybuffer:"),this.dispatch(new Uint8Array(i))},_url:function(i){return u("url:"+i.toString())},_map:function(i){return u("map:"),i=Array.from(i),this._array(i,f.unorderedSets!==!1)},_set:function(i){return u("set:"),i=Array.from(i),this._array(i,f.unorderedSets!==!1)},_file:function(i){return u("file:"),this.dispatch([i.name,i.size,i.type,i.lastModfied])},_blob:function(){if(f.ignoreUnknown)return u("[blob]");throw Error(`Hashing Blob objects is currently not supported
1
+ import{j as F}from"./jsx-runtime-W3oueGCa.js";import{r as G,g as ct}from"./index-YTOF1_EJ.js";import{$ as dt,a0 as bn,a1 as we,B as fe,a2 as gt,v as Y,A as ie,P as Ce,C as _e,a3 as an,a4 as ht,g as Ke,y as pt,S as mt,E as bt,F as yt,a5 as Se,a6 as Pe,H as Ee,a7 as Ne,G as Je,I as wt,T as _t,L as yn,a as Et,J as Be,K as Tt,M as be,d as Lt,r as vt,N as wn,a8 as At,f as xt,a9 as Ct,U as St,aa as le,ab as fn,ac as xe,D as Pt,ad as ye,b as It,s as Ot,Q as Nt,ae as Mt,h as Dt,i as Bt,V as jt,W as Ft,j as kt,k as Ut,p as Rt,m as Gt,n as Yt,o as zt,q as Vt,t as Xt}from"./legend-context-C_u_4J2t.js";import{r as He,M as cn,k as je,B as ce,s as Ht,v as qt,w as _n,x as Wt,y as $t,z as Zt,A as Kt,E as Jt,N as En,G as Qt,S as er,g as nr,e as tr,F as rr,T as Un,J as or,K as sr,D as ir,O as lr,Q as ur,o as ar,q as fr,U as cr,j as dr,u as gr,Z as hr,t as pr,R as mr,l as br,H as yr,L as wr,m as _r,n as Er}from"./legend-oIKfg-IX.js";import{c as Tr,C as Lr,f as Tn,a as vr,b as Ar}from"./get-draggableData-DwR56Jcm.js";import{e as xr}from"./index-CgYGpm1H.js";const Cr=(e,n,t)=>{const[o,r]=e.major,[d,c]=e.minor,p=(o.x+r.x+d.x+c.x)/4,w=(o.y+r.y+d.y+c.y)/4,C=r.x-o.x,E=r.y-o.y,P=Math.atan2(t.getPixelForValue(w+E/2)-t.getPixelForValue(w-E/2),n.getPixelForValue(p+C/2)-n.getPixelForValue(p-C/2)),M=Math.hypot(n.getPixelForValue(o.x)-n.getPixelForValue(r.x),t.getPixelForValue(o.y)-t.getPixelForValue(r.y))/2,N=Math.hypot(n.getPixelForValue(d.x)-n.getPixelForValue(c.x),t.getPixelForValue(d.y)-t.getPixelForValue(c.y))/2,v=n.getPixelForValue(p),x=t.getPixelForValue(w);return{cx:v,cy:x,radiusX:M,radiusY:N,angle:P}},Sr=e=>e.data.datasets.some(n=>n.data.some(t=>!!t.ellipsePoints)),Pr={id:"ellipsisAnnotationPlugin",afterDatasetsDraw(e){var d,c,p,w,C,E,P,M,N;if(!Sr(e))return;const n=e==null?void 0:e.ctx,t=(d=e==null?void 0:e.scales)==null?void 0:d.x,o=(c=e==null?void 0:e.scales)==null?void 0:c.y,r=e==null?void 0:e.chartArea;!t||!o||!r||((p=n==null?void 0:n.save)==null||p.call(n),(w=n==null?void 0:n.beginPath)==null||w.call(n),(C=n==null?void 0:n.rect)==null||C.call(n,r.left,r.top,r.right-r.left,r.bottom-r.top),(E=n==null?void 0:n.clip)==null||E.call(n),(M=(P=e==null?void 0:e.data)==null?void 0:P.datasets)==null||M.forEach(v=>{var h;const x=v;(h=x==null?void 0:x.data)==null||h.forEach(A=>{var l,u,i,_,T;const{ellipsePoints:b}=A??{};if(!b)return;const{cx:L,cy:y,radiusX:S,radiusY:f,angle:g}=Cr(b,t,o);(l=n==null?void 0:n.save)==null||l.call(n),(u=n==null?void 0:n.beginPath)==null||u.call(n),(i=n==null?void 0:n.ellipse)==null||i.call(n,L,y,S,f,g,0,2*Math.PI),n.strokeStyle=x.borderColor||dt,n.lineWidth=x.borderWidth||1,(_=n==null?void 0:n.stroke)==null||_.call(n),(T=n==null?void 0:n.restore)==null||T.call(n)})}),(N=n==null?void 0:n.restore)==null||N.call(n))}},Ir="_chart_e3qdd_1",Or="_canvas_e3qdd_11",Nr="_fixedHeight_e3qdd_20",Mr="_stretchHeight_e3qdd_26",Dr="_squareAspectRatio_e3qdd_32",Br="_table_e3qdd_62",qe={chart:Ir,canvas:Or,fixedHeight:Nr,stretchHeight:Mr,squareAspectRatio:Dr,table:Br};var Rn=Symbol.for("immer-nothing"),Ln=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function oe(e,...n){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Te=Object.getPrototypeOf;function Le(e){return!!e&&!!e[ne]}function he(e){var n;return e?Gn(e)||Array.isArray(e)||!!e[Ln]||!!((n=e.constructor)!=null&&n[Ln])||ze(e)||Ve(e):!1}var jr=Object.prototype.constructor.toString();function Gn(e){if(!e||typeof e!="object")return!1;const n=Te(e);if(n===null)return!0;const t=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return t===Object?!0:typeof t=="function"&&Function.toString.call(t)===jr}function Fe(e,n){Ye(e)===0?Reflect.ownKeys(e).forEach(t=>{n(t,e[t],e)}):e.forEach((t,o)=>n(o,t,e))}function Ye(e){const n=e[ne];return n?n.type_:Array.isArray(e)?1:ze(e)?2:Ve(e)?3:0}function Qe(e,n){return Ye(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function Yn(e,n,t){const o=Ye(e);o===2?e.set(n,t):o===3?e.add(t):e[n]=t}function Fr(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n}function ze(e){return e instanceof Map}function Ve(e){return e instanceof Set}function ge(e){return e.copy_||e.base_}function en(e,n){if(ze(e))return new Map(e);if(Ve(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const t=Gn(e);if(n===!0||n==="class_only"&&!t){const o=Object.getOwnPropertyDescriptors(e);delete o[ne];let r=Reflect.ownKeys(o);for(let d=0;d<r.length;d++){const c=r[d],p=o[c];p.writable===!1&&(p.writable=!0,p.configurable=!0),(p.get||p.set)&&(o[c]={configurable:!0,writable:!0,enumerable:p.enumerable,value:e[c]})}return Object.create(Te(e),o)}else{const o=Te(e);if(o!==null&&t)return{...e};const r=Object.create(o);return Object.assign(r,e)}}function dn(e,n=!1){return Xe(e)||Le(e)||!he(e)||(Ye(e)>1&&(e.set=e.add=e.clear=e.delete=kr),Object.freeze(e),n&&Object.entries(e).forEach(([t,o])=>dn(o,!0))),e}function kr(){oe(2)}function Xe(e){return Object.isFrozen(e)}var Ur={};function pe(e){const n=Ur[e];return n||oe(0,e),n}var Ie;function zn(){return Ie}function Rr(e,n){return{drafts_:[],parent_:e,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vn(e,n){n&&(pe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=n)}function nn(e){tn(e),e.drafts_.forEach(Gr),e.drafts_=null}function tn(e){e===Ie&&(Ie=e.parent_)}function An(e){return Ie=Rr(Ie,e)}function Gr(e){const n=e[ne];n.type_===0||n.type_===1?n.revoke_():n.revoked_=!0}function xn(e,n){n.unfinalizedDrafts_=n.drafts_.length;const t=n.drafts_[0];return e!==void 0&&e!==t?(t[ne].modified_&&(nn(n),oe(4)),he(e)&&(e=ke(n,e),n.parent_||Ue(n,e)),n.patches_&&pe("Patches").generateReplacementPatches_(t[ne].base_,e,n.patches_,n.inversePatches_)):e=ke(n,t,[]),nn(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),e!==Rn?e:void 0}function ke(e,n,t){if(Xe(n))return n;const o=n[ne];if(!o)return Fe(n,(r,d)=>Cn(e,o,n,r,d,t)),n;if(o.scope_!==e)return n;if(!o.modified_)return Ue(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const r=o.copy_;let d=r,c=!1;o.type_===3&&(d=new Set(r),r.clear(),c=!0),Fe(d,(p,w)=>Cn(e,o,r,p,w,t,c)),Ue(e,r,!1),t&&e.patches_&&pe("Patches").generatePatches_(o,t,e.patches_,e.inversePatches_)}return o.copy_}function Cn(e,n,t,o,r,d,c){if(Le(r)){const p=d&&n&&n.type_!==3&&!Qe(n.assigned_,o)?d.concat(o):void 0,w=ke(e,r,p);if(Yn(t,o,w),Le(w))e.canAutoFreeze_=!1;else return}else c&&t.add(r);if(he(r)&&!Xe(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ke(e,r),(!n||!n.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(t,o)&&Ue(e,r)}}function Ue(e,n,t=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&dn(n,t)}function Yr(e,n){const t=Array.isArray(e),o={type_:t?1:0,scope_:n?n.scope_:zn(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=o,d=gn;t&&(r=[o],d=Oe);const{revoke:c,proxy:p}=Proxy.revocable(r,d);return o.draft_=p,o.revoke_=c,p}var gn={get(e,n){if(n===ne)return e;const t=ge(e);if(!Qe(t,n))return zr(e,t,n);const o=t[n];return e.finalized_||!he(o)?o:o===We(e.base_,n)?($e(e),e.copy_[n]=on(o,e)):o},has(e,n){return n in ge(e)},ownKeys(e){return Reflect.ownKeys(ge(e))},set(e,n,t){const o=Vn(ge(e),n);if(o!=null&&o.set)return o.set.call(e.draft_,t),!0;if(!e.modified_){const r=We(ge(e),n),d=r==null?void 0:r[ne];if(d&&d.base_===t)return e.copy_[n]=t,e.assigned_[n]=!1,!0;if(Fr(t,r)&&(t!==void 0||Qe(e.base_,n)))return!0;$e(e),rn(e)}return e.copy_[n]===t&&(t!==void 0||n in e.copy_)||Number.isNaN(t)&&Number.isNaN(e.copy_[n])||(e.copy_[n]=t,e.assigned_[n]=!0),!0},deleteProperty(e,n){return We(e.base_,n)!==void 0||n in e.base_?(e.assigned_[n]=!1,$e(e),rn(e)):delete e.assigned_[n],e.copy_&&delete e.copy_[n],!0},getOwnPropertyDescriptor(e,n){const t=ge(e),o=Reflect.getOwnPropertyDescriptor(t,n);return o&&{writable:!0,configurable:e.type_!==1||n!=="length",enumerable:o.enumerable,value:t[n]}},defineProperty(){oe(11)},getPrototypeOf(e){return Te(e.base_)},setPrototypeOf(){oe(12)}},Oe={};Fe(gn,(e,n)=>{Oe[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}});Oe.deleteProperty=function(e,n){return Oe.set.call(this,e,n,void 0)};Oe.set=function(e,n,t){return gn.set.call(this,e[0],n,t,e[0])};function We(e,n){const t=e[ne];return(t?ge(t):e)[n]}function zr(e,n,t){var r;const o=Vn(n,t);return o?"value"in o?o.value:(r=o.get)==null?void 0:r.call(e.draft_):void 0}function Vn(e,n){if(!(n in e))return;let t=Te(e);for(;t;){const o=Object.getOwnPropertyDescriptor(t,n);if(o)return o;t=Te(t)}}function rn(e){e.modified_||(e.modified_=!0,e.parent_&&rn(e.parent_))}function $e(e){e.copy_||(e.copy_=en(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vr=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(n,t,o)=>{if(typeof n=="function"&&typeof t!="function"){const d=t;t=n;const c=this;return function(w=d,...C){return c.produce(w,E=>t.call(this,E,...C))}}typeof t!="function"&&oe(6),o!==void 0&&typeof o!="function"&&oe(7);let r;if(he(n)){const d=An(this),c=on(n,void 0);let p=!0;try{r=t(c),p=!1}finally{p?nn(d):tn(d)}return vn(d,o),xn(r,d)}else if(!n||typeof n!="object"){if(r=t(n),r===void 0&&(r=n),r===Rn&&(r=void 0),this.autoFreeze_&&dn(r,!0),o){const d=[],c=[];pe("Patches").generateReplacementPatches_(n,r,d,c),o(d,c)}return r}else oe(1,n)},this.produceWithPatches=(n,t)=>{if(typeof n=="function")return(c,...p)=>this.produceWithPatches(c,w=>n(w,...p));let o,r;return[this.produce(n,t,(c,p)=>{o=c,r=p}),o,r]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){he(e)||oe(8),Le(e)&&(e=Xr(e));const n=An(this),t=on(e,void 0);return t[ne].isManual_=!0,tn(n),t}finishDraft(e,n){const t=e&&e[ne];(!t||!t.isManual_)&&oe(9);const{scope_:o}=t;return vn(o,n),xn(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,n){let t;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.path.length===0&&r.op==="replace"){e=r.value;break}}t>-1&&(n=n.slice(t+1));const o=pe("Patches").applyPatches_;return Le(e)?o(e,n):this.produce(e,r=>o(r,n))}};function on(e,n){const t=ze(e)?pe("MapSet").proxyMap_(e,n):Ve(e)?pe("MapSet").proxySet_(e,n):Yr(e,n);return(n?n.scope_:zn()).drafts_.push(t),t}function Xr(e){return Le(e)||oe(10,e),Xn(e)}function Xn(e){if(!he(e)||Xe(e))return e;const n=e[ne];let t;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,t=en(e,n.scope_.immer_.useStrictShallowCopy_)}else t=en(e,!0);return Fe(t,(o,r)=>{Yn(t,o,Xn(r))}),n&&(n.finalized_=!1),t}var te=new Vr,Hr=te.produce;te.produceWithPatches.bind(te);te.setAutoFreeze.bind(te);te.setUseStrictShallowCopy.bind(te);te.applyPatches.bind(te);te.createDraft.bind(te);te.finishDraft.bind(te);const Hn="TOGGLE_ZOOM",qn="TOGGLE_PAN",Wn="TOGGLE_POINTS",$n="TOGGLE_LINE",Zn="TOGGLE_LEGEND",Kn="TOGGLE_TABLE",sn="RESET_AXES_RANGES",ln="UPDATE_AXES_RANGES",Jn="TOGGLE_DRAG_POINTS",Qn="TOGGLE_DRAG_ANNOTATION",et="DISABLE_DRAG_OPTIONS",De="UPDATE_EDITED",qr=(e,n)=>Hr(e,t=>{switch(n.type){case Hn:{t.zoomEnabled=!t.zoomEnabled,t.panEnabled&&(t.panEnabled=!1),t.enableDragPoints&&(t.enableDragPoints=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case qn:{t.panEnabled=!t.panEnabled,t.zoomEnabled&&(t.zoomEnabled=!1),t.enableDragPoints&&(t.enableDragPoints=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case Wn:{t.pointsEnabled=!t.pointsEnabled;break}case $n:{t.lineEnabled=!t.lineEnabled;break}case Zn:{t.legendEnabled=!t.legendEnabled;break}case Kn:{t.showTable=!t.showTable;break}case ln:{const{axes:o}=n.payload;t.axes=o;break}case sn:{const{axes:o}=n.payload;t.axes=o;break}case Jn:{t.enableDragPoints=!t.enableDragPoints,t.panEnabled&&(t.panEnabled=!1),t.zoomEnabled&&(t.zoomEnabled=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case Qn:{t.enableDragAnnotation=!t.enableDragAnnotation,t.panEnabled&&(t.panEnabled=!1),t.zoomEnabled&&(t.zoomEnabled=!1);break}case et:{(t.enableDragAnnotation||t.enableDragPoints||t.panEnabled||t.zoomEnabled)&&(t.enableDragAnnotation=!1,t.enableDragPoints=!1,t.panEnabled=!1,t.zoomEnabled=!1);break}case De:{t.edited=n.payload;break}}}),Wr=e=>{if(!e)return null;const n=`line-chart-state-${e}`,t=localStorage.getItem(n);return t?JSON.parse(t).state:null},$r=(e=72)=>{const n=new Date().getTime(),t=e*60*60*1e3;for(let o=0;o<localStorage.length;o++){const r=localStorage.key(o);if(r!=null&&r.includes("line-chart-state-")){const d=localStorage.getItem(r);if(d){const p=JSON.parse(d).timestamp;p&&n-p>t&&localStorage.removeItem(r)}}}},Zr=(e,n)=>{if(!n)return;const t=new Date().getTime(),o=`line-chart-state-${n}`,r={state:e,timestamp:t};localStorage.setItem(o,JSON.stringify(r)),$r()},Kr=({options:e,persistenceId:n})=>{const{chartOptions:{enableZoom:t,enablePan:o,showPoints:r,showLine:d,enableDragAnnotation:c},legend:{display:p},dragData:w}=e,{zoomEnabled:C,panEnabled:E,pointsEnabled:P,lineEnabled:M,legendEnabled:N,enableDragPoints:v,enableDragAnnotation:x}=Wr(n)||{};return{zoomEnabled:c??x?!1:C??t,panEnabled:E??o,pointsEnabled:P??r,lineEnabled:M??d,legendEnabled:N??p,axes:[],showTable:!1,enableDragPoints:(w==null?void 0:w.enableDragData)&&v,enableDragAnnotation:c??x,edited:!1}},Jr=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},G.createElement("clipPath",{id:"a"},G.createElement("path",{d:"m0 0h12v12h-12z"})),G.createElement("g",{clipPath:"url(#a)"},G.createElement("path",{d:"m.5 6.5v-1h11v1c-4.16104 0-6.63549 0-11 0z"}))),Qr=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e},G.createElement("circle",{cx:6,cy:6,r:2})),eo=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},G.createElement("clipPath",{id:"a"},G.createElement("path",{d:"m0 0h12v12h-12z"})),G.createElement("g",{clipPath:"url(#a)"},G.createElement("path",{d:"m7.937 6.5c-.11122.42912-.36179.80916-.71237 1.08047-.35058.2713-.78133.4185-1.22463.4185s-.87405-.1472-1.22463-.4185c-.35058-.27131-.60115-.65135-.71237-1.08047h-3.563v-1h3.563c.11122-.42912.36179-.80916.71237-1.08046s.78133-.41851 1.22463-.41851.87405.14721 1.22463.41851.60115.65134.71237 1.08046h3.563v1z"})));function no({lineEnabled:e,onToggleLine:n,onTogglePoints:t,pointsEnabled:o,translations:r}){return[{type:"Option",label:r.pointsLines,icon:F.jsx(He,{icon:F.jsx(eo,{})}),selected:o&&e,onClick:()=>{o||t(),e||n()}},{type:"Option",label:r.linesOnly,icon:F.jsx(He,{icon:F.jsx(Jr,{})}),selected:!o&&e,onClick:()=>{o&&t(),e||n()}},{type:"Option",label:r.pointsOnly,icon:F.jsx(He,{icon:F.jsx(Qr,{})}),selected:o&&!e,onClick:()=>{o||t(),e&&n()}}]}const nt=({options:e})=>{const[n,t]=G.useState(!1),o=e.find(r=>r.selected);return F.jsx(cn,{open:n,setOpen:t,menu:{sections:e,trigger:"Component",component:F.jsx(je,{display:"inline-flex",text:o==null?void 0:o.label,placement:"bottom-start",enabled:!n,children:F.jsx(ce,{colored:"muted",basic:!0,small:!0,round:!0,icon:o==null?void 0:o.icon})})}})};nt.__docgenInfo={description:"",methods:[],displayName:"LineOptions",props:{options:{required:!0,tsType:{name:"Array",elements:[{name:"IMenuSection"}],raw:"IMenuSection[]"},description:""}}};function to({onTogglePan:e,onToggleZoom:n,panEnabled:t,zoomEnabled:o,enableDragPoints:r,enableDragAnnotation:d,isDragDataAllowed:c,isDragAnnotationAllowed:p,onToggleDragAnnotation:w,onToggleDragPoints:C,onDisableDragOptions:E,translations:{dragToZoom:P,doubleClickToReset:M,dragToPan:N,dragToMovePoints:v,dragDisabled:x,dragToMoveAnnotation:h}}){return[{label:P,description:M,icon:F.jsx(Ht,{}),selected:o,type:"Option",onClick:()=>{o||n()}},{label:N,description:M,icon:F.jsx(qt,{}),selected:t,type:"Option",onClick:()=>{t||e()}},...c?[{label:v,icon:F.jsx(_n,{}),selected:r,type:"Option",onClick:()=>{r||C()}}]:[],...p?[{label:h,icon:F.jsx(_n,{}),selected:d,type:"Option",onClick:()=>{d||w()}}]:[],{label:x,icon:F.jsx(Wt,{}),selected:!o&&!t&&!r&&!d,type:"Option",onClick:E}]}const tt=({options:e})=>{const n=e.find(t=>t.selected);return F.jsx(cn,{menu:{sections:e,trigger:"Component",component:F.jsx(ce,{colored:"muted",basic:!0,small:!0,label:n==null?void 0:n.label,icon:n==null?void 0:n.icon})}})};tt.__docgenInfo={description:"@param {import('./drag-options-interfaces').IDragOptions} obj",methods:[],displayName:"DragOptions",props:{options:{required:!0,tsType:{name:"Array",elements:[{name:"IMenuSection"}],raw:"IMenuSection[]"},description:""}}};const ro="_controls_1edjs_1",oo="_buttons_1edjs_6",Sn={controls:ro,buttons:oo},so=e=>{const n=G.useCallback(t=>()=>{e({type:t})},[e]);return{onToggleLegend:n(Zn),onToggleLine:n($n),onTogglePan:n(qn),onTogglePoints:n(Wn),onToggleTable:n(Kn),onToggleZoom:n(Hn),onToggleDragPoints:n(Jn),onToggleDragAnnotation:n(Qn),onDisableDragOptions:n(et)}};function Me(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ze={exports:{}},Pn;function io(){return Pn||(Pn=1,function(e,n){(function(t){e.exports=t()})(function(){return function t(o,r,d){function c(C,E){if(!r[C]){if(!o[C]){var P=typeof Me=="function"&&Me;if(!E&&P)return P(C,!0);if(p)return p(C,!0);throw new Error("Cannot find module '"+C+"'")}E=r[C]={exports:{}},o[C][0].call(E.exports,function(M){var N=o[C][1][M];return c(N||M)},E,E.exports,t,o,r,d)}return r[C].exports}for(var p=typeof Me=="function"&&Me,w=0;w<d.length;w++)c(d[w]);return c}({1:[function(t,o,r){(function(d,c,p,w,C,E,P,M,N){var v=t("crypto");function x(f,g){g=b(f,g);var l;return(l=g.algorithm!=="passthrough"?v.createHash(g.algorithm):new S).write===void 0&&(l.write=l.update,l.end=l.update),y(g,l).dispatch(f),l.update||l.end(""),l.digest?l.digest(g.encoding==="buffer"?void 0:g.encoding):(f=l.read(),g.encoding!=="buffer"?f.toString(g.encoding):f)}(r=o.exports=x).sha1=function(f){return x(f)},r.keys=function(f){return x(f,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(f){return x(f,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(f){return x(f,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var h=v.getHashes?v.getHashes().slice():["sha1","md5"],A=(h.push("passthrough"),["buffer","hex","binary","base64"]);function b(f,g){var l={};if(l.algorithm=(g=g||{}).algorithm||"sha1",l.encoding=g.encoding||"hex",l.excludeValues=!!g.excludeValues,l.algorithm=l.algorithm.toLowerCase(),l.encoding=l.encoding.toLowerCase(),l.ignoreUnknown=g.ignoreUnknown===!0,l.respectType=g.respectType!==!1,l.respectFunctionNames=g.respectFunctionNames!==!1,l.respectFunctionProperties=g.respectFunctionProperties!==!1,l.unorderedArrays=g.unorderedArrays===!0,l.unorderedSets=g.unorderedSets!==!1,l.unorderedObjects=g.unorderedObjects!==!1,l.replacer=g.replacer||void 0,l.excludeKeys=g.excludeKeys||void 0,f===void 0)throw new Error("Object argument required.");for(var u=0;u<h.length;++u)h[u].toLowerCase()===l.algorithm.toLowerCase()&&(l.algorithm=h[u]);if(h.indexOf(l.algorithm)===-1)throw new Error('Algorithm "'+l.algorithm+'" not supported. supported values: '+h.join(", "));if(A.indexOf(l.encoding)===-1&&l.algorithm!=="passthrough")throw new Error('Encoding "'+l.encoding+'" not supported. supported values: '+A.join(", "));return l}function L(f){if(typeof f=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(f))!=null}function y(f,g,l){l=l||[];function u(i){return g.update?g.update(i,"utf8"):g.write(i,"utf8")}return{dispatch:function(i){return this["_"+((i=f.replacer?f.replacer(i):i)===null?"null":typeof i)](i)},_object:function(i){var _,T=Object.prototype.toString.call(i),U=/\[object (.*)\]/i.exec(T);if(U=(U=U?U[1]:"unknown:["+T+"]").toLowerCase(),0<=(T=l.indexOf(i)))return this.dispatch("[CIRCULAR:"+T+"]");if(l.push(i),p!==void 0&&p.isBuffer&&p.isBuffer(i))return u("buffer:"),u(i);if(U==="object"||U==="function"||U==="asyncfunction")return T=Object.keys(i),f.unorderedObjects&&(T=T.sort()),f.respectType===!1||L(i)||T.splice(0,0,"prototype","__proto__","constructor"),f.excludeKeys&&(T=T.filter(function(k){return!f.excludeKeys(k)})),u("object:"+T.length+":"),_=this,T.forEach(function(k){_.dispatch(k),u(":"),f.excludeValues||_.dispatch(i[k]),u(",")});if(!this["_"+U]){if(f.ignoreUnknown)return u("["+U+"]");throw new Error('Unknown object type "'+U+'"')}this["_"+U](i)},_array:function(i,k){k=k!==void 0?k:f.unorderedArrays!==!1;var T=this;if(u("array:"+i.length+":"),!k||i.length<=1)return i.forEach(function(R){return T.dispatch(R)});var U=[],k=i.map(function(R){var D=new S,z=l.slice();return y(f,D,z).dispatch(R),U=U.concat(z.slice(l.length)),D.read().toString()});return l=l.concat(U),k.sort(),this._array(k,!1)},_date:function(i){return u("date:"+i.toJSON())},_symbol:function(i){return u("symbol:"+i.toString())},_error:function(i){return u("error:"+i.toString())},_boolean:function(i){return u("bool:"+i.toString())},_string:function(i){u("string:"+i.length+":"),u(i.toString())},_function:function(i){u("fn:"),L(i)?this.dispatch("[native]"):this.dispatch(i.toString()),f.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(i.name)),f.respectFunctionProperties&&this._object(i)},_number:function(i){return u("number:"+i.toString())},_xml:function(i){return u("xml:"+i.toString())},_null:function(){return u("Null")},_undefined:function(){return u("Undefined")},_regexp:function(i){return u("regex:"+i.toString())},_uint8array:function(i){return u("uint8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint8clampedarray:function(i){return u("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(i))},_int8array:function(i){return u("int8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint16array:function(i){return u("uint16array:"),this.dispatch(Array.prototype.slice.call(i))},_int16array:function(i){return u("int16array:"),this.dispatch(Array.prototype.slice.call(i))},_uint32array:function(i){return u("uint32array:"),this.dispatch(Array.prototype.slice.call(i))},_int32array:function(i){return u("int32array:"),this.dispatch(Array.prototype.slice.call(i))},_float32array:function(i){return u("float32array:"),this.dispatch(Array.prototype.slice.call(i))},_float64array:function(i){return u("float64array:"),this.dispatch(Array.prototype.slice.call(i))},_arraybuffer:function(i){return u("arraybuffer:"),this.dispatch(new Uint8Array(i))},_url:function(i){return u("url:"+i.toString())},_map:function(i){return u("map:"),i=Array.from(i),this._array(i,f.unorderedSets!==!1)},_set:function(i){return u("set:"),i=Array.from(i),this._array(i,f.unorderedSets!==!1)},_file:function(i){return u("file:"),this.dispatch([i.name,i.size,i.type,i.lastModfied])},_blob:function(){if(f.ignoreUnknown)return u("[blob]");throw Error(`Hashing Blob objects is currently not supported
2
2
  (see https://github.com/puleos/object-hash/issues/26)
3
3
  Use "options.replacer" or "options.ignoreUnknown"
4
4
  `)},_domwindow:function(){return u("domwindow")},_bigint:function(i){return u("bigint:"+i.toString())},_process:function(){return u("process")},_timer:function(){return u("timer")},_pipe:function(){return u("pipe")},_tcp:function(){return u("tcp")},_udp:function(){return u("udp")},_tty:function(){return u("tty")},_statwatcher:function(){return u("statwatcher")},_securecontext:function(){return u("securecontext")},_connection:function(){return u("connection")},_zlib:function(){return u("zlib")},_context:function(){return u("context")},_nodescript:function(){return u("nodescript")},_httpparser:function(){return u("httpparser")},_dataview:function(){return u("dataview")},_signal:function(){return u("signal")},_fsevent:function(){return u("fsevent")},_tlswrap:function(){return u("tlswrap")}}}function S(){return{buf:"",write:function(f){this.buf+=f},end:function(f){this.buf+=f},read:function(){return this.buf}}}r.writeToStream=function(f,g,l){return l===void 0&&(l=g,g={}),y(g=b(f,g),l).dispatch(f)}}).call(this,t("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(t,o,r){(function(d,c,p,w,C,E,P,M,N){(function(v){var x=typeof Uint8Array<"u"?Uint8Array:Array,h=43,A=47,b=48,L=97,y=65,S=45,f=95;function g(l){return l=l.charCodeAt(0),l===h||l===S?62:l===A||l===f?63:l<b?-1:l<b+10?l-b+26+26:l<y+26?l-y:l<L+26?l-L+26:void 0}v.toByteArray=function(l){var u,i;if(0<l.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var _=l.length,_=l.charAt(_-2)==="="?2:l.charAt(_-1)==="="?1:0,T=new x(3*l.length/4-_),U=0<_?l.length-4:l.length,k=0;function R(D){T[k++]=D}for(u=0;u<U;u+=4,0)R((16711680&(i=g(l.charAt(u))<<18|g(l.charAt(u+1))<<12|g(l.charAt(u+2))<<6|g(l.charAt(u+3))))>>16),R((65280&i)>>8),R(255&i);return _==2?R(255&(i=g(l.charAt(u))<<2|g(l.charAt(u+1))>>4)):_==1&&(R((i=g(l.charAt(u))<<10|g(l.charAt(u+1))<<4|g(l.charAt(u+2))>>2)>>8&255),R(255&i)),T},v.fromByteArray=function(l){var u,i,_,T,U=l.length%3,k="";function R(D){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(D)}for(u=0,_=l.length-U;u<_;u+=3)i=(l[u]<<16)+(l[u+1]<<8)+l[u+2],k+=R((T=i)>>18&63)+R(T>>12&63)+R(T>>6&63)+R(63&T);switch(U){case 1:k=(k+=R((i=l[l.length-1])>>2))+R(i<<4&63)+"==";break;case 2:k=(k=(k+=R((i=(l[l.length-2]<<8)+l[l.length-1])>>10))+R(i>>4&63))+R(i<<2&63)+"="}return k}})(r===void 0?this.base64js={}:r)}).call(this,t("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,o,r){(function(d,c,h,w,C,E,P,M,N){var v=t("base64-js"),x=t("ieee754");function h(s,a,m){if(!(this instanceof h))return new h(s,a,m);var O,I,j,V,W=typeof s;if(a==="base64"&&W=="string")for(s=(V=s).trim?V.trim():V.replace(/^\s+|\s+$/g,"");s.length%4!=0;)s+="=";if(W=="number")O=q(s);else if(W=="string")O=h.byteLength(s,a);else{if(W!="object")throw new Error("First argument needs to be a number, array or string.");O=q(s.length)}if(h._useTypedArrays?I=h._augment(new Uint8Array(O)):((I=this).length=O,I._isBuffer=!0),h._useTypedArrays&&typeof s.byteLength=="number")I._set(s);else if(H(V=s)||h.isBuffer(V)||V&&typeof V=="object"&&typeof V.length=="number")for(j=0;j<O;j++)h.isBuffer(s)?I[j]=s.readUInt8(j):I[j]=s[j];else if(W=="string")I.write(s,0,a);else if(W=="number"&&!h._useTypedArrays&&!m)for(j=0;j<O;j++)I[j]=0;return I}function A(s,a,m,O){return h._charsWritten=de(function(I){for(var j=[],V=0;V<I.length;V++)j.push(255&I.charCodeAt(V));return j}(a),s,m,O)}function b(s,a,m,O){return h._charsWritten=de(function(I){for(var j,V,W=[],K=0;K<I.length;K++)V=I.charCodeAt(K),j=V>>8,V=V%256,W.push(V),W.push(j);return W}(a),s,m,O)}function L(s,a,m){var O="";m=Math.min(s.length,m);for(var I=a;I<m;I++)O+=String.fromCharCode(s[I]);return O}function y(s,a,m,j){j||(B(typeof m=="boolean","missing or invalid endian"),B(a!=null,"missing offset"),B(a+1<s.length,"Trying to read beyond buffer length"));var I,j=s.length;if(!(j<=a))return m?(I=s[a],a+1<j&&(I|=s[a+1]<<8)):(I=s[a]<<8,a+1<j&&(I|=s[a+1])),I}function S(s,a,m,j){j||(B(typeof m=="boolean","missing or invalid endian"),B(a!=null,"missing offset"),B(a+3<s.length,"Trying to read beyond buffer length"));var I,j=s.length;if(!(j<=a))return m?(a+2<j&&(I=s[a+2]<<16),a+1<j&&(I|=s[a+1]<<8),I|=s[a],a+3<j&&(I+=s[a+3]<<24>>>0)):(a+1<j&&(I=s[a+1]<<16),a+2<j&&(I|=s[a+2]<<8),a+3<j&&(I|=s[a+3]),I+=s[a]<<24>>>0),I}function f(s,a,m,O){if(O||(B(typeof m=="boolean","missing or invalid endian"),B(a!=null,"missing offset"),B(a+1<s.length,"Trying to read beyond buffer length")),!(s.length<=a))return O=y(s,a,m,!0),32768&O?-1*(65535-O+1):O}function g(s,a,m,O){if(O||(B(typeof m=="boolean","missing or invalid endian"),B(a!=null,"missing offset"),B(a+3<s.length,"Trying to read beyond buffer length")),!(s.length<=a))return O=S(s,a,m,!0),2147483648&O?-1*(4294967295-O+1):O}function l(s,a,m,O){return O||(B(typeof m=="boolean","missing or invalid endian"),B(a+3<s.length,"Trying to read beyond buffer length")),x.read(s,a,m,23,4)}function u(s,a,m,O){return O||(B(typeof m=="boolean","missing or invalid endian"),B(a+7<s.length,"Trying to read beyond buffer length")),x.read(s,a,m,52,8)}function i(s,a,m,O,I){if(I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+1<s.length,"trying to write beyond buffer length"),ue(a,65535)),I=s.length,!(I<=m))for(var j=0,V=Math.min(I-m,2);j<V;j++)s[m+j]=(a&255<<8*(O?j:1-j))>>>8*(O?j:1-j)}function _(s,a,m,O,I){if(I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+3<s.length,"trying to write beyond buffer length"),ue(a,4294967295)),I=s.length,!(I<=m))for(var j=0,V=Math.min(I-m,4);j<V;j++)s[m+j]=a>>>8*(O?j:3-j)&255}function T(s,a,m,O,I){I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+1<s.length,"Trying to write beyond buffer length"),ae(a,32767,-32768)),s.length<=m||i(s,0<=a?a:65535+a+1,m,O,I)}function U(s,a,m,O,I){I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+3<s.length,"Trying to write beyond buffer length"),ae(a,2147483647,-2147483648)),s.length<=m||_(s,0<=a?a:4294967295+a+1,m,O,I)}function k(s,a,m,O,I){I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+3<s.length,"Trying to write beyond buffer length"),pn(a,34028234663852886e22,-34028234663852886e22)),s.length<=m||x.write(s,a,m,O,23,4)}function R(s,a,m,O,I){I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+7<s.length,"Trying to write beyond buffer length"),pn(a,17976931348623157e292,-17976931348623157e292)),s.length<=m||x.write(s,a,m,O,52,8)}r.Buffer=h,r.SlowBuffer=h,r.INSPECT_MAX_BYTES=50,h.poolSize=8192,h._useTypedArrays=function(){try{var s=new ArrayBuffer(0),a=new Uint8Array(s);return a.foo=function(){return 42},a.foo()===42&&typeof a.subarray=="function"}catch{return!1}}(),h.isEncoding=function(s){switch(String(s).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.isBuffer=function(s){return!(s==null||!s._isBuffer)},h.byteLength=function(s,a){var m;switch(s+="",a||"utf8"){case"hex":m=s.length/2;break;case"utf8":case"utf-8":m=Z(s).length;break;case"ascii":case"binary":case"raw":m=s.length;break;case"base64":m=ve(s).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":m=2*s.length;break;default:throw new Error("Unknown encoding")}return m},h.concat=function(s,a){if(B(H(s),`Usage: Buffer.concat(list, [totalLength])