@oliasoft-open-source/charts-library 5.1.3-beta-1 → 5.1.3-beta-3

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.
@@ -1358,7 +1358,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1358
1358
  `)+`
1359
1359
  `}function f(h,m,o,d,l,w,E){return u(c(h,m,o,d,l,w,E))}function g(h,m,o,d,l,w){return f(h,h,m,o,d,l,w)}return cu}var Xd={},o$;function Hqe(){if(o$)return Xd;o$=1,Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.arrayEqual=e,Xd.arrayStartsWith=t;function e(n,r){return n.length!==r.length?!1:t(n,r)}function t(n,r){if(r.length>n.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==n[i])return!1;return!0}return Xd}var s$;function Bqe(){if(s$)return Kd;s$=1,Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.calcLineCount=f,Kd.merge=g;var e=Ite(),t=d6(),n=Hqe();function r(k){return c(k)||a(k)||s(k)||i()}function i(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1360
1360
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(k,D){if(k){if(typeof k=="string")return u(k,D);var I=Object.prototype.toString.call(k).slice(8,-1);if(I==="Object"&&k.constructor&&(I=k.constructor.name),I==="Map"||I==="Set")return Array.from(k);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return u(k,D)}}function a(k){if(typeof Symbol<"u"&&Symbol.iterator in Object(k))return Array.from(k)}function c(k){if(Array.isArray(k))return u(k)}function u(k,D){(D==null||D>k.length)&&(D=k.length);for(var I=0,N=new Array(D);I<D;I++)N[I]=k[I];return N}function f(k){var D=M(k.lines),I=D.oldLines,N=D.newLines;I!==void 0?k.oldLines=I:delete k.oldLines,N!==void 0?k.newLines=N:delete k.newLines}function g(k,D,I){k=h(k,I),D=h(D,I);var N={};(k.index||D.index)&&(N.index=k.index||D.index),(k.newFileName||D.newFileName)&&(m(k)?m(D)?(N.oldFileName=o(N,k.oldFileName,D.oldFileName),N.newFileName=o(N,k.newFileName,D.newFileName),N.oldHeader=o(N,k.oldHeader,D.oldHeader),N.newHeader=o(N,k.newHeader,D.newHeader)):(N.oldFileName=k.oldFileName,N.newFileName=k.newFileName,N.oldHeader=k.oldHeader,N.newHeader=k.newHeader):(N.oldFileName=D.oldFileName||k.oldFileName,N.newFileName=D.newFileName||k.newFileName,N.oldHeader=D.oldHeader||k.oldHeader,N.newHeader=D.newHeader||k.newHeader)),N.hunks=[];for(var B=0,z=0,R=0,W=0;B<k.hunks.length||z<D.hunks.length;){var V=k.hunks[B]||{oldStart:1/0},Q=D.hunks[z]||{oldStart:1/0};if(d(V,Q))N.hunks.push(l(V,R)),B++,W+=V.newLines-V.oldLines;else if(d(Q,V))N.hunks.push(l(Q,W)),z++,R+=Q.newLines-Q.oldLines;else{var Y={oldStart:Math.min(V.oldStart,Q.oldStart),oldLines:0,newStart:Math.min(V.newStart+R,Q.oldStart+W),newLines:0,lines:[]};w(Y,V.oldStart,V.lines,Q.oldStart,Q.lines),z++,B++,N.hunks.push(Y)}}return N}function h(k,D){if(typeof k=="string"){if(/^@@/m.test(k)||/^Index:/m.test(k))return(0,t.parsePatch)(k)[0];if(!D)throw new Error("Must provide a base reference or pass in a patch");return(0,e.structuredPatch)(void 0,void 0,D,k)}return k}function m(k){return k.newFileName&&k.newFileName!==k.oldFileName}function o(k,D,I){return D===I?D:(k.conflict=!0,{mine:D,theirs:I})}function d(k,D){return k.oldStart<D.oldStart&&k.oldStart+k.oldLines<D.oldStart}function l(k,D){return{oldStart:k.oldStart,oldLines:k.oldLines,newStart:k.newStart+D,newLines:k.newLines,lines:k.lines}}function w(k,D,I,N,B){var z={offset:D,lines:I,index:0},R={offset:N,lines:B,index:0};for(y(k,z,R),y(k,R,z);z.index<z.lines.length&&R.index<R.lines.length;){var W=z.lines[z.index],V=R.lines[R.index];if((W[0]==="-"||W[0]==="+")&&(V[0]==="-"||V[0]==="+"))E(k,z,R);else if(W[0]==="+"&&V[0]===" "){var Q;(Q=k.lines).push.apply(Q,r(_(z)))}else if(V[0]==="+"&&W[0]===" "){var Y;(Y=k.lines).push.apply(Y,r(_(R)))}else W[0]==="-"&&V[0]===" "?v(k,z,R):V[0]==="-"&&W[0]===" "?v(k,R,z,!0):W===V?(k.lines.push(W),z.index++,R.index++):p(k,_(z),_(R))}T(k,z),T(k,R),f(k)}function E(k,D,I){var N=_(D),B=_(I);if(S(N)&&S(B)){if((0,n.arrayStartsWith)(N,B)&&C(I,N,N.length-B.length)){var z;(z=k.lines).push.apply(z,r(N));return}else if((0,n.arrayStartsWith)(B,N)&&C(D,B,B.length-N.length)){var R;(R=k.lines).push.apply(R,r(B));return}}else if((0,n.arrayEqual)(N,B)){var W;(W=k.lines).push.apply(W,r(N));return}p(k,N,B)}function v(k,D,I,N){var B=_(D),z=A(I,B);if(z.merged){var R;(R=k.lines).push.apply(R,r(z.merged))}else p(k,N?z:B,N?B:z)}function p(k,D,I){k.conflict=!0,k.lines.push({conflict:!0,mine:D,theirs:I})}function y(k,D,I){for(;D.offset<I.offset&&D.index<D.lines.length;){var N=D.lines[D.index++];k.lines.push(N),D.offset++}}function T(k,D){for(;D.index<D.lines.length;){var I=D.lines[D.index++];k.lines.push(I)}}function _(k){for(var D=[],I=k.lines[k.index][0];k.index<k.lines.length;){var N=k.lines[k.index];if(I==="-"&&N[0]==="+"&&(I="+"),I===N[0])D.push(N),k.index++;else break}return D}function A(k,D){for(var I=[],N=[],B=0,z=!1,R=!1;B<D.length&&k.index<k.lines.length;){var W=k.lines[k.index],V=D[B];if(V[0]==="+")break;if(z=z||W[0]!==" ",N.push(V),B++,W[0]==="+")for(R=!0;W[0]==="+";)I.push(W),W=k.lines[++k.index];V.substr(1)===W.substr(1)?(I.push(W),k.index++):R=!0}if((D[B]||"")[0]==="+"&&z&&(R=!0),R)return I;for(;B<D.length;)N.push(D[B++]);return{merged:N,changes:I}}function S(k){return k.reduce(function(D,I){return D&&I[0]==="-"},!0)}function C(k,D,I){for(var N=0;N<I;N++){var B=D[D.length-I+N].substr(1);if(k.lines[k.index+N]!==" "+B)return!1}return k.index+=I,!0}function M(k){var D=0,I=0;return k.forEach(function(N){if(typeof N!="string"){var B=M(N.mine),z=M(N.theirs);D!==void 0&&(B.oldLines===z.oldLines?D+=B.oldLines:D=void 0),I!==void 0&&(B.newLines===z.newLines?I+=B.newLines:I=void 0)}else I!==void 0&&(N[0]==="+"||N[0]===" ")&&I++,D!==void 0&&(N[0]==="-"||N[0]===" ")&&D++}),{oldLines:D,newLines:I}}return Kd}var fm={},a$;function Oqe(){if(a$)return fm;a$=1,Object.defineProperty(fm,"__esModule",{value:!0}),fm.reversePatch=r;function e(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(i);s&&(c=c.filter(function(u){return Object.getOwnPropertyDescriptor(i,u).enumerable})),a.push.apply(a,c)}return a}function t(i){for(var s=1;s<arguments.length;s++){var a=arguments[s]!=null?arguments[s]:{};s%2?e(Object(a),!0).forEach(function(c){n(i,c,a[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach(function(c){Object.defineProperty(i,c,Object.getOwnPropertyDescriptor(a,c))})}return i}function n(i,s,a){return s in i?Object.defineProperty(i,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[s]=a,i}function r(i){return Array.isArray(i)?i.map(r).reverse():t(t({},i),{},{oldFileName:i.newFileName,oldHeader:i.newHeader,newFileName:i.oldFileName,newHeader:i.oldHeader,hunks:i.hunks.map(function(s){return{oldLines:s.newLines,oldStart:s.newStart,newLines:s.oldLines,newStart:s.oldStart,linedelimiters:s.linedelimiters,lines:s.lines.map(function(a){return a.startsWith("-")?"+".concat(a.slice(1)):a.startsWith("+")?"-".concat(a.slice(1)):a})}})})}return fm}var pm={},u$;function zqe(){if(u$)return pm;u$=1,Object.defineProperty(pm,"__esModule",{value:!0}),pm.convertChangesToDMP=e;function e(t){for(var n=[],r,i,s=0;s<t.length;s++)r=t[s],r.added?i=1:r.removed?i=-1:i=0,n.push([i,r.value]);return n}return pm}var mm={},l$;function Uqe(){if(l$)return mm;l$=1,Object.defineProperty(mm,"__esModule",{value:!0}),mm.convertChangesToXML=e;function e(n){for(var r=[],i=0;i<n.length;i++){var s=n[i];s.added?r.push("<ins>"):s.removed&&r.push("<del>"),r.push(t(s.value)),s.added?r.push("</ins>"):s.removed&&r.push("</del>")}return r.join("")}function t(n){var r=n;return r=r.replace(/&/g,"&amp;"),r=r.replace(/</g,"&lt;"),r=r.replace(/>/g,"&gt;"),r=r.replace(/"/g,"&quot;"),r}return mm}var c$;function qqe(){return c$||(c$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Diff",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"diffChars",{enumerable:!0,get:function(){return n.diffChars}}),Object.defineProperty(e,"diffWords",{enumerable:!0,get:function(){return r.diffWords}}),Object.defineProperty(e,"diffWordsWithSpace",{enumerable:!0,get:function(){return r.diffWordsWithSpace}}),Object.defineProperty(e,"diffLines",{enumerable:!0,get:function(){return i.diffLines}}),Object.defineProperty(e,"diffTrimmedLines",{enumerable:!0,get:function(){return i.diffTrimmedLines}}),Object.defineProperty(e,"diffSentences",{enumerable:!0,get:function(){return s.diffSentences}}),Object.defineProperty(e,"diffCss",{enumerable:!0,get:function(){return a.diffCss}}),Object.defineProperty(e,"diffJson",{enumerable:!0,get:function(){return c.diffJson}}),Object.defineProperty(e,"canonicalize",{enumerable:!0,get:function(){return c.canonicalize}}),Object.defineProperty(e,"diffArrays",{enumerable:!0,get:function(){return u.diffArrays}}),Object.defineProperty(e,"applyPatch",{enumerable:!0,get:function(){return f.applyPatch}}),Object.defineProperty(e,"applyPatches",{enumerable:!0,get:function(){return f.applyPatches}}),Object.defineProperty(e,"parsePatch",{enumerable:!0,get:function(){return g.parsePatch}}),Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return h.merge}}),Object.defineProperty(e,"reversePatch",{enumerable:!0,get:function(){return m.reversePatch}}),Object.defineProperty(e,"structuredPatch",{enumerable:!0,get:function(){return o.structuredPatch}}),Object.defineProperty(e,"createTwoFilesPatch",{enumerable:!0,get:function(){return o.createTwoFilesPatch}}),Object.defineProperty(e,"createPatch",{enumerable:!0,get:function(){return o.createPatch}}),Object.defineProperty(e,"formatPatch",{enumerable:!0,get:function(){return o.formatPatch}}),Object.defineProperty(e,"convertChangesToDMP",{enumerable:!0,get:function(){return d.convertChangesToDMP}}),Object.defineProperty(e,"convertChangesToXML",{enumerable:!0,get:function(){return l.convertChangesToXML}});var t=w(ja()),n=Mqe(),r=bqe(),i=c6(),s=Rqe(),a=Nqe(),c=Lqe(),u=Fqe(),f=xqe(),g=d6(),h=Bqe(),m=Oqe(),o=Ite(),d=zqe(),l=Uqe();function w(E){return E&&E.__esModule?E:{default:E}}}(dI)),dI}var d$;function Wqe(){if(d$)return Yr;d$=1;var e=Yr&&Yr.__createBinding||(Object.create?function(g,h,m,o){o===void 0&&(o=m);var d=Object.getOwnPropertyDescriptor(h,m);(!d||("get"in d?!h.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(g,o,d)}:function(g,h,m,o){o===void 0&&(o=m),g[o]=h[m]}),t=Yr&&Yr.__setModuleDefault||(Object.create?function(g,h){Object.defineProperty(g,"default",{enumerable:!0,value:h})}:function(g,h){g.default=h}),n=Yr&&Yr.__importStar||function(g){if(g&&g.__esModule)return g;var h={};if(g!=null)for(var m in g)m!=="default"&&Object.prototype.hasOwnProperty.call(g,m)&&e(h,g,m);return t(h,g),h};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.computeLineInformation=Yr.DiffMethod=Yr.DiffType=void 0;const r=n(qqe()),i=r;var s;(function(g){g[g.DEFAULT=0]="DEFAULT",g[g.ADDED=1]="ADDED",g[g.REMOVED=2]="REMOVED",g[g.CHANGED=3]="CHANGED"})(s||(Yr.DiffType=s={}));var a;(function(g){g.CHARS="diffChars",g.WORDS="diffWords",g.WORDS_WITH_SPACE="diffWordsWithSpace",g.LINES="diffLines",g.TRIMMED_LINES="diffTrimmedLines",g.SENTENCES="diffSentences",g.CSS="diffCss",g.JSON="diffJson"})(a||(Yr.DiffMethod=a={}));const c=g=>g===""?[]:g.replace(/\n$/,"").split(`
1361
- `),u=(g,h,m=a.CHARS)=>{const o=i[m](g,h),d={left:[],right:[]};return o.forEach(({added:l,removed:w,value:E})=>{const v={};return l&&(v.type=s.ADDED,v.value=E,d.right.push(v)),w&&(v.type=s.REMOVED,v.value=E,d.left.push(v)),!w&&!l&&(v.type=s.DEFAULT,v.value=E,d.right.push(v),d.left.push(v)),v}),d},f=(g,h,m=!1,o=a.CHARS,d=0,l=[])=>{let w=[];typeof g=="string"&&typeof h=="string"?w=r.diffLines(g.trimRight(),h.trimRight(),{newlineIsToken:!1,ignoreWhitespace:!1,ignoreCase:!1}):w=r.diffJson(g,h);let E=d,v=d,p=[],y=0;const T=[],_=[],A=(S,C,M,k,D)=>c(S).map((N,B)=>{const z={},R={};if(!(_.includes(`${C}-${B}`)||D&&B!==0)){if(M||k){let W=!0;if(k){v+=1,z.lineNumber=v,z.type=s.REMOVED,z.value=N||" ";const V=w[C+1];if(V&&V.added){const Q=c(V.value)[B];if(Q){const Y=A(Q,C,!0,!1,!0),{value:se,lineNumber:oe,type:te}=Y[0].right;if(_.push(`${C+1}-${B}`),R.lineNumber=oe,z.value===se)W=!1,R.type=0,z.type=0,R.value=se;else if(R.type=te,m)R.value=se;else{const ve=u(N,se,o);R.value=ve.right,z.value=ve.left}}}}else E+=1,R.lineNumber=E,R.type=s.ADDED,R.value=N;W&&!D&&(T.includes(y)||T.push(y))}else v+=1,E+=1,z.lineNumber=v,z.type=s.DEFAULT,z.value=N,R.lineNumber=E,R.type=s.DEFAULT,R.value=N;return(l!=null&&l.includes(`L-${z.lineNumber}`)||l!=null&&l.includes(`R-${R.lineNumber}`)&&!T.includes(y))&&T.push(y),D||(y+=1),{right:R,left:z}}}).filter(Boolean);return w.forEach(({added:S,removed:C,value:M},k)=>{p=[...p,...A(M,k,S,C)]}),{lineInformation:p,diffLines:T}};return Yr.computeLineInformation=f,Yr}var $s={},h$;function Vqe(){if(h$)return $s;h$=1;var e=$s&&$s.__rest||function(r,i){var s={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.indexOf(a)<0&&(s[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(r);c<a.length;c++)i.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(r,a[c])&&(s[a[c]]=r[a[c]]);return s},t=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});const n=t(qFe());return $s.default=(r,i=!1,s="")=>{const{variables:a={}}=r,c=e(r,["variables"]),u={light:Object.assign({diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",changedBackground:"#fffbdd",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee"},a.light||{}),dark:Object.assign({diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#044B53",addedColor:"white",removedBackground:"#632F34",removedColor:"white",changedBackground:"#3e302c",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f",addedGutterBackground:"#034148",removedGutterBackground:"#632b30",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#21232b",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#666c87",addedGutterColor:"#8c8c8c",removedGutterColor:"#8c8c8c",codeFoldContentColor:"#656a8b",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#555a7b",diffViewerTitleBorderColor:"#353846"},a.dark||{})},f=i?u.dark:u.light,{css:g,cx:h}=(0,n.default)({key:"react-diff",nonce:s}),m=g({width:"100%",label:"content"}),o=g({[`.${m}`]:{width:"50%"},label:"split-view"}),d=g({width:"100%",background:f.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"25px"},label:"diff-container",borderCollapse:"collapse"}),l=g({color:f.codeFoldContentColor,label:"code-fold-content"}),w=g({color:f.diffViewerColor,label:"content-text"}),E=g({background:f.diffViewerTitleBackground,padding:10,borderBottom:`1px solid ${f.diffViewerTitleBorderColor}`,label:"title-block",":last-child":{borderLeft:`1px solid ${f.diffViewerTitleBorderColor}`},[`.${w}`]:{color:f.diffViewerTitleColor}}),v=g({color:f.gutterColor,label:"line-number"}),p=g({background:f.removedBackground,color:f.removedColor,pre:{color:f.removedColor},[`.${v}`]:{color:f.removedGutterColor},label:"diff-removed"}),y=g({background:f.addedBackground,color:f.addedColor,pre:{color:f.addedColor},[`.${v}`]:{color:f.addedGutterColor},label:"diff-added"}),T=g({background:f.changedBackground,[`.${v}`]:{color:f.gutterColor},label:"diff-changed"}),_=g({padding:2,display:"inline-flex",borderRadius:4,wordBreak:"break-all",label:"word-diff"}),A=g({background:f.wordAddedBackground,label:"word-added"}),S=g({background:f.wordRemovedBackground,label:"word-removed"}),C=g({backgroundColor:f.codeFoldGutterBackground,label:"code-fold-gutter"}),M=g({backgroundColor:f.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:"code-fold",a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),k=g({backgroundColor:f.emptyLineBackground,label:"empty-line"}),D=g({width:25,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${y}`]:{pre:{color:f.addedColor}},[`&.${p}`]:{pre:{color:f.removedColor}}}),I=g({background:f.highlightBackground,label:"highlighted-line",[`.${A}, .${S}`]:{backgroundColor:"initial"}}),N=g({label:"highlighted-gutter"}),B=g({userSelect:"none",minWidth:50,padding:"0 10px",whiteSpace:"nowrap",label:"gutter",textAlign:"right",background:f.gutterBackground,"&:hover":{cursor:"pointer",background:f.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5},[`&.${y}`]:{background:f.addedGutterBackground},[`&.${p}`]:{background:f.removedGutterBackground},[`&.${N}`]:{background:f.highlightGutterBackground,"&:hover":{background:f.highlightGutterBackground}}}),z=g({"&:hover":{background:f.gutterBackground,cursor:"initial"},label:"empty-gutter"}),R=g({verticalAlign:"baseline",label:"line"}),W={diffContainer:d,diffRemoved:p,diffAdded:y,diffChanged:T,splitView:o,marker:D,highlightedGutter:N,highlightedLine:I,gutter:B,line:R,wordDiff:_,wordAdded:A,wordRemoved:S,codeFoldGutter:C,codeFold:M,emptyGutter:z,emptyLine:k,lineNumber:v,contentText:w,content:m,codeFoldContent:l,titleBlock:E},V=Object.keys(c).reduce((Q,Y)=>Object.assign(Object.assign({},Q),{[Y]:g(c[Y])}),{});return Object.keys(W).reduce((Q,Y)=>Object.assign(Object.assign({},Q),{[Y]:V[Y]?h(W[Y],V[Y]):W[Y]}),{})},$s}var jd={},f$;function $qe(){if(f$)return jd;f$=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.computeHiddenBlocks=void 0;function e(t,n,r){let i=0,s,a={},c=[];return t.forEach((u,f)=>{const g=n.some(h=>h>=f-r&&h<=f+r);!g&&s==null?(s={index:i,startLine:f,endLine:f,lines:1},c.push(s),a[f]=s.index,i++):g?s=void 0:(s.endLine=f,s.lines++,a[f]=s.index)}),{lineBlocks:a,blocks:c}}return jd.computeHiddenBlocks=e,jd}var p$=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Gqe(e,t){return!!(e===t||p$(e)&&p$(t))}function Yqe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Gqe(e[n],t[n]))return!1;return!0}function Kqe(e,t){t===void 0&&(t=Yqe);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}const Xqe=Object.freeze(Object.defineProperty({__proto__:null,default:Kqe},Symbol.toStringTag,{value:"Module"})),jqe=Qu(Xqe);var m$;function Qqe(){return m$||(m$=1,function(e){var t=Zi&&Zi.__createBinding||(Object.create?function(l,w,E,v){v===void 0&&(v=E);var p=Object.getOwnPropertyDescriptor(w,E);(!p||("get"in p?!w.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(l,v,p)}:function(l,w,E,v){v===void 0&&(v=E),l[v]=w[E]}),n=Zi&&Zi.__setModuleDefault||(Object.create?function(l,w){Object.defineProperty(l,"default",{enumerable:!0,value:w})}:function(l,w){l.default=w}),r=Zi&&Zi.__importStar||function(l){if(l&&l.__esModule)return l;var w={};if(l!=null)for(var E in l)E!=="default"&&Object.prototype.hasOwnProperty.call(l,E)&&t(w,l,E);return n(w,l),w},i=Zi&&Zi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.DiffMethod=e.LineNumberPrefix=void 0;const s=one,a=r(We),c=i(_M()),u=Wqe();Object.defineProperty(e,"DiffMethod",{enumerable:!0,get:function(){return u.DiffMethod}});const f=i(Vqe()),g=$qe(),h=jqe,m=h.default||h;var o;(function(l){l.LEFT="L",l.RIGHT="R"})(o||(e.LineNumberPrefix=o={}));class d extends a.Component{constructor(w){super(w),this.resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1,this.onBlockExpand=E=>{const v=this.state.expandedBlocks.slice();v.push(E),this.setState({expandedBlocks:v})},this.computeStyles=m(f.default),this.onLineNumberClickProxy=E=>this.props.onLineNumberClick?v=>this.props.onLineNumberClick(E,v):()=>{},this.renderWordDiff=(E,v)=>E.map((p,y)=>(0,s.jsx)("span",{className:(0,c.default)(this.styles.wordDiff,{[this.styles.wordAdded]:p.type===u.DiffType.ADDED,[this.styles.wordRemoved]:p.type===u.DiffType.REMOVED}),children:v?v(p.value):p.value},y)),this.renderLine=(E,v,p,y,T,_)=>{const A=`${p}-${E}`,S=`${_}-${T}`,C=this.props.highlightLines.includes(A)||this.props.highlightLines.includes(S),M=v===u.DiffType.ADDED,k=v===u.DiffType.REMOVED,D=v===u.DiffType.CHANGED;let I;return Array.isArray(y)?I=this.renderWordDiff(y,this.props.renderContent):this.props.renderContent?I=this.props.renderContent(y):I=y,(0,s.jsxs)(a.Fragment,{children:[!this.props.hideLineNumbers&&(0,s.jsx)("td",{onClick:E&&this.onLineNumberClickProxy(A),className:(0,c.default)(this.styles.gutter,{[this.styles.emptyGutter]:!E,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedGutter]:C}),children:(0,s.jsx)("pre",{className:this.styles.lineNumber,children:E})}),!this.props.splitView&&!this.props.hideLineNumbers&&(0,s.jsx)("td",{onClick:T&&this.onLineNumberClickProxy(S),className:(0,c.default)(this.styles.gutter,{[this.styles.emptyGutter]:!T,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedGutter]:C}),children:(0,s.jsx)("pre",{className:this.styles.lineNumber,children:T})}),this.props.renderGutter?this.props.renderGutter({lineNumber:E,type:v,prefix:p,value:y,additionalLineNumber:T,additionalPrefix:_,styles:this.styles}):null,!this.props.hideMarkers&&(0,s.jsx)("td",{className:(0,c.default)(this.styles.marker,{[this.styles.emptyLine]:!I,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedLine]:C}),children:(0,s.jsxs)("pre",{children:[M&&"+",k&&"-"]})}),(0,s.jsx)("td",{className:(0,c.default)(this.styles.content,{[this.styles.emptyLine]:!I,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedLine]:C}),children:(0,s.jsx)("pre",{className:this.styles.contentText,children:I})})]})},this.renderSplitView=({left:E,right:v},p)=>(0,s.jsxs)("tr",{className:this.styles.line,children:[this.renderLine(E.lineNumber,E.type,o.LEFT,E.value),this.renderLine(v.lineNumber,v.type,o.RIGHT,v.value)]},p),this.renderInlineView=({left:E,right:v},p)=>{let y;return E.type===u.DiffType.REMOVED&&v.type===u.DiffType.ADDED?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("tr",{className:this.styles.line,children:this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,null)}),(0,s.jsx)("tr",{className:this.styles.line,children:this.renderLine(null,v.type,o.RIGHT,v.value,v.lineNumber)})]},p):(E.type===u.DiffType.REMOVED&&(y=this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,null)),E.type===u.DiffType.DEFAULT&&(y=this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,v.lineNumber,o.RIGHT)),v.type===u.DiffType.ADDED&&(y=this.renderLine(null,v.type,o.RIGHT,v.value,v.lineNumber)),(0,s.jsx)("tr",{className:this.styles.line,children:y},p))},this.onBlockClickProxy=E=>()=>this.onBlockExpand(E),this.renderSkippedLineIndicator=(E,v,p,y)=>{const{hideLineNumbers:T,splitView:_}=this.props,A=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(E,p,y):(0,s.jsxs)("pre",{className:this.styles.codeFoldContent,children:["Expand ",E," lines ..."]}),S=(0,s.jsx)("td",{children:(0,s.jsx)("a",{onClick:this.onBlockClickProxy(v),tabIndex:0,children:A})}),C=!_&&!T;return(0,s.jsxs)("tr",{className:this.styles.codeFold,children:[!T&&(0,s.jsx)("td",{className:this.styles.codeFoldGutter}),this.props.renderGutter?(0,s.jsx)("td",{className:this.styles.codeFoldGutter}):null,(0,s.jsx)("td",{className:(0,c.default)({[this.styles.codeFoldGutter]:C})}),C?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("td",{}),S]}):(0,s.jsxs)(a.Fragment,{children:[S,this.props.renderGutter?(0,s.jsx)("td",{}):null,(0,s.jsx)("td",{})]}),(0,s.jsx)("td",{}),(0,s.jsx)("td",{})]},`${p}-${y}`)},this.renderDiff=()=>{const{oldValue:E,newValue:v,splitView:p,disableWordDiff:y,compareMethod:T,linesOffset:_}=this.props,{lineInformation:A,diffLines:S}=(0,u.computeLineInformation)(E,v,y,T,_,this.props.alwaysShowLines),C=this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff),{lineBlocks:M,blocks:k}=(0,g.computeHiddenBlocks)(A,S,C);return A.map((D,I)=>{if(this.props.showDiffOnly){const B=M[I];if(B!==void 0){const z=k[B].endLine===I;if(!this.state.expandedBlocks.includes(B)&&z)return(0,s.jsx)(a.Fragment,{children:this.renderSkippedLineIndicator(k[B].lines,B,D.left.lineNumber,D.right.lineNumber)},I);if(!this.state.expandedBlocks.includes(B))return null}}return p?this.renderSplitView(D,I):this.renderInlineView(D,I)})},this.render=()=>{const{oldValue:E,newValue:v,useDarkTheme:p,leftTitle:y,rightTitle:T,splitView:_,hideLineNumbers:A,hideMarkers:S,nonce:C}=this.props;if(this.props.compareMethod!==u.DiffMethod.JSON&&(typeof E!="string"||typeof v!="string"))throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,p,C);const M=this.renderDiff();let k=A?2:3,D=A?2:4;S&&(k-=1,D-=1);const I=this.props.renderGutter?1:0,N=(y||T)&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colSpan:(_?k:D)+I,className:this.styles.titleBlock,children:(0,s.jsx)("pre",{className:this.styles.contentText,children:y})}),_&&(0,s.jsx)("td",{colSpan:k+I,className:this.styles.titleBlock,children:(0,s.jsx)("pre",{className:this.styles.contentText,children:T})})]});return(0,s.jsx)("table",{className:(0,c.default)(this.styles.diffContainer,{[this.styles.splitView]:_}),children:(0,s.jsxs)("tbody",{children:[N,M]})})},this.state={expandedBlocks:[]}}}d.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:u.DiffMethod.CHARS,styles:{},hideLineNumbers:!1,hideMarkers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:""},e.default=d}(Zi)),Zi}Qqe();const V$e=2,$$e=5,G$e=1,Y$e="round",K$e="transparent",X$e="rgba(0, 0, 0, 0.1)",j$e="dblclick",Q$e={TRANSLATIONS:"translations",LANGUAGE_KEY:"languageKey"},J$e=1e-4,Z$e=1e7,Mte=()=>{const e=q.useContext(tne);if(e===void 0)throw new Error("useLegend must be used within a LegendProvider");return e},Jqe=({chartRef:e,options:t})=>{const{state:n,dispatch:r}=Mte()??{},{annotations:i,interactions:{onLegendClick:s},legend:{customLegend:a}}=t??{};q.useEffect(()=>{var g;(g=n==null?void 0:n.datasets)==null||g.forEach((h,m)=>{var d,l;const o=(h==null?void 0:h.hidden)??!1;(d=e==null?void 0:e.current)==null||d.setDatasetVisibility(Number(m),!o),(l=e==null?void 0:e.current)==null||l.update()})},[n]);const c=q.useCallback((g,h)=>{var E;const{datasetIndex:m=-1}=h??{};let o=null;const d=e==null?void 0:e.current,l=((E=d==null?void 0:d.data)==null?void 0:E.datasets)??[],w=(l==null?void 0:l[m])??{};if(i!=null&&i.controlAnnotation&&(w!=null&&w.isAnnotation)&&(o=(w==null?void 0:w.annotationIndex)??null),s){const v=(h==null?void 0:h.hidden)??!1;s(h==null?void 0:h.text,v)}r({type:nne,payload:{chartInstance:d,dsConfig:{datasetIndex:m,datasets:l,dataset:w},annotationConfig:{annotationIndex:o}}}),d==null||d.update()},[e,i,r]),u=q.useMemo(()=>rne(t,c),[t,c]),f=q.useMemo(()=>({[ine]:(a==null?void 0:a.customLegendPlugin)&&{containerID:a==null?void 0:a.customLegendContainerID}}),[a]);return{legendClick:c,annotation:n==null?void 0:n.annotation,legend:u,customLegendPlugin:f}},eGe=(e=[])=>{let t={};return e.length&&(t=e.reduce((n,r,i)=>(n[`annotation${i+1}`]=r,n),{})),{annotations:t}};var Zqe=function(){},bte=typeof window<"u",eWe=bte?q.useLayoutEffect:q.useEffect,Rte={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function tWe(){var e=q.useState(null),t=e[0],n=e[1],r=q.useState(Rte),i=r[0],s=r[1],a=q.useMemo(function(){return new window.ResizeObserver(function(c){if(c[0]){var u=c[0].contentRect,f=u.x,g=u.y,h=u.width,m=u.height,o=u.top,d=u.left,l=u.bottom,w=u.right;s({x:f,y:g,width:h,height:m,top:o,left:d,bottom:l,right:w})}})},[]);return eWe(function(){if(t)return a.observe(t),function(){a.disconnect()}},[t]),[n,i]}const nWe=bte&&typeof window.ResizeObserver<"u"?tWe:function(){return[Zqe,Rte]};var Nte={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g$=We.createContext&&We.createContext(Nte),wa=function(){return wa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wa.apply(this,arguments)},rWe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Lte(e){return e&&e.map(function(t,n){return We.createElement(t.tag,wa({key:n},t.attr),Lte(t.child))})}function Is(e){return function(t){return We.createElement(iWe,wa({attr:wa({},e.attr)},t),Lte(e.child))}}function iWe(e){var t=function(n){var r=e.attr,i=e.size,s=e.title,a=rWe(e,["attr","size","title"]),c=i||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),We.createElement("svg",wa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:wa(wa({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),s&&We.createElement("title",null,s),e.children)};return g$!==void 0?We.createElement(g$.Consumer,null,function(n){return t(n)}):t(Nte)}function tGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 9l3 3l-3 3"}},{tag:"path",attr:{d:"M15 12h6"}},{tag:"path",attr:{d:"M6 9l-3 3l3 3"}},{tag:"path",attr:{d:"M3 12h6"}},{tag:"path",attr:{d:"M9 18l3 3l3 -3"}},{tag:"path",attr:{d:"M12 15v6"}},{tag:"path",attr:{d:"M15 6l-3 -3l-3 3"}},{tag:"path",attr:{d:"M12 3v6"}}]})(e)}function nGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}},{tag:"path",attr:{d:"M5.7 5.7l12.6 12.6"}}]})(e)}function oWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z",strokeWidth:"0",fill:"currentColor"}}]})(e)}function rGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}},{tag:"path",attr:{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}},{tag:"path",attr:{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}},{tag:"path",attr:{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"}}]})(e)}function sWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M9 6l11 0"}},{tag:"path",attr:{d:"M9 12l11 0"}},{tag:"path",attr:{d:"M9 18l11 0"}},{tag:"path",attr:{d:"M5 6l0 .01"}},{tag:"path",attr:{d:"M5 12l0 .01"}},{tag:"path",attr:{d:"M5 18l0 .01"}}]})(e)}function iGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M5 4h14a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-7a1 1 0 0 0 -1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1"}},{tag:"path",attr:{d:"M4 8l2 0"}},{tag:"path",attr:{d:"M4 12l3 0"}},{tag:"path",attr:{d:"M4 16l2 0"}},{tag:"path",attr:{d:"M8 4l0 2"}},{tag:"path",attr:{d:"M12 4l0 3"}},{tag:"path",attr:{d:"M16 4l0 2"}}]})(e)}function aWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M19 2h-14a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3 -3v-14a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"}}]})(e)}function uWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 6l-12 12"}},{tag:"path",attr:{d:"M6 6l12 12"}}]})(e)}function oGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}},{tag:"path",attr:{d:"M7 10l6 0"}},{tag:"path",attr:{d:"M10 7l0 6"}},{tag:"path",attr:{d:"M21 21l-6 -6"}}]})(e)}const lWe="_legend_wpro0_1",cWe="_isDragging_wpro0_8",dWe="_legendItems_wpro0_11",hWe="_isHidden_wpro0_47",fWe="_legendToggle_wpro0_50",pWe="_legendItem_wpro0_11",mWe="_legendItemSymbol_wpro0_80",gWe="_legendItemBox_wpro0_90",yWe="_legendItemLine_wpro0_95",vWe="_legendItemPoint_wpro0_103",EWe="_legendItemText_wpro0_110",wWe="_dropzoneContainer_wpro0_140",TWe="_dropzone_wpro0_140",SWe="_left_wpro0_149",_We="_right_wpro0_153",AWe="_top_wpro0_157",CWe="_bottom_wpro0_161",kWe="_dropzonePlaceholder_wpro0_165",DWe="_isActive_wpro0_173",IWe="_resizeContainer_wpro0_176",_n={legend:lWe,isDragging:cWe,legendItems:dWe,isHidden:hWe,legendToggle:fWe,legendItem:pWe,legendItemSymbol:mWe,legendItemBox:gWe,legendItemLine:yWe,legendItemPoint:vWe,legendItemText:EWe,dropzoneContainer:wWe,dropzone:TWe,left:SWe,right:_We,top:AWe,bottom:CWe,dropzonePlaceholder:kWe,isActive:DWe,resizeContainer:IWe},sM=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("circle",{cx:12,cy:12,r:12,fill:"currentColor"}));var Ih=(e=>(e.LINE="line",e.BAR="bar",e.PIE="pie",e.SCATTER="scatter",e))(Ih||{}),MWe=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(MWe||{});const bWe=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("rect",{x:2,y:2,width:20,height:20,fill:"currentColor"})),RWe=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("rect",{x:3,y:3,width:18,height:18,fill:"currentColor",transform:"rotate(45 12 12)"})),NWe=e=>q.createElement("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},q.createElement("path",{d:"m22.7998 22.0623h-21.5996c-.21066.0001-.417617-.0554-.600067-.1607-.182451-.1053-.333965-.2567-.439311-.4392-.1053464-.1824-.16081228-.3893-.160822-.6s.0554372-.4176.160767-.6l10.799833-18.70518c.1139-.17137.2684-.31191.4497-.40913.1814-.09722.3839-.14809.5897-.14809s.4083.05087.5897.14809c.1813.09722.3358.23776.4497.40913l10.7998 18.70518c.1054.1824.1608.3893.1608.6s-.0555.4176-.1608.6c-.1054.1825-.2569.3339-.4393.4392-.1825.1053-.3894.1608-.6001.1607z",fill:"currentColor"})),pI=16,y$=({dataset:e})=>{var u;const{borderColor:t,borderDash:n,borderWidth:r}=e??{},[i,s]=n??[],a=i&&s?(pI-i)/2%(i+s)*-1:0,c=((u=e==null?void 0:e.borderDash)==null?void 0:u.join(" "))||"";return x.jsx("span",{className:_n.legendItemLine,children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${pI} ${pI}`,width:"100%",height:"100%",children:x.jsx("line",{x1:"0",y1:"50%",x2:"100%",y2:"50%",stroke:t,strokeWidth:r,strokeDasharray:c,strokeDashoffset:a})})})},LWe=({dataset:e})=>{const{pointBackgroundColor:t,pointRadius:n,pointStyle:r=""}=e??{};if(!n)return null;const i=n*2,s={circle:x.jsx(sM,{}),triangle:x.jsx(NWe,{}),rectRot:x.jsx(RWe,{}),rect:x.jsx(bWe,{})};return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(pn,{icon:(s==null?void 0:s[r])??x.jsx(sM,{}),size:i,color:t})})},FWe=({dataset:e})=>{const{backgroundColor:t}=e??{},n={backgroundColor:t};return x.jsx("span",{className:_n.legendItemBox,style:n})},Fte=({dataset:e})=>{const{annotationType:t,showLine:n}=e??{};switch(t){case G0.Box:case G0.Ellipse:return x.jsx(FWe,{dataset:e});case G0.Line:return x.jsx(y$,{dataset:e});default:return x.jsxs(x.Fragment,{children:[n&&x.jsx(y$,{dataset:e}),x.jsx(LWe,{dataset:e})]})}};Fte.__docgenInfo={description:"",methods:[],displayName:"LegendItemLine"};const PWe=16,xWe=(e,t,n)=>{switch(t){case Ih.LINE:return x.jsx(Fte,{dataset:e});case Ih.BAR:{const{backgroundColor:r}=e??{},i=r instanceof Array?r==null?void 0:r[n]:r;return x.jsx("span",{className:_n.legendItemBox,children:x.jsx(aWe,{color:i})})}case Ih.PIE:return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(pn,{icon:x.jsx(sM,{})})});case Ih.SCATTER:{const{backgroundColor:r,borderColor:i}=e??{},s=r instanceof Array?r==null?void 0:r[n]:r;return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(oWe,{color:s??i})})}default:return null}},Pte=({hidden:e,dataset:t,handleClick:n,chartType:r,index:i})=>x.jsxs("div",{className:lM(_n==null?void 0:_n.legendItem,e&&(_n==null?void 0:_n.isHidden)),onClick:n,children:[x.jsx("span",{className:_n.legendItemSymbol,style:{width:PWe},children:xWe(t,r,i)}),x.jsx("span",{className:_n.legendItemText,children:t==null?void 0:t.label})]});Pte.__docgenInfo={description:"",methods:[],displayName:"LegendItem",props:{hidden:{required:!0,tsType:{name:"boolean"},description:""},dataset:{required:!0,tsType:{name:"union",raw:`| IGeneratedLineChartDataset
1361
+ `),u=(g,h,m=a.CHARS)=>{const o=i[m](g,h),d={left:[],right:[]};return o.forEach(({added:l,removed:w,value:E})=>{const v={};return l&&(v.type=s.ADDED,v.value=E,d.right.push(v)),w&&(v.type=s.REMOVED,v.value=E,d.left.push(v)),!w&&!l&&(v.type=s.DEFAULT,v.value=E,d.right.push(v),d.left.push(v)),v}),d},f=(g,h,m=!1,o=a.CHARS,d=0,l=[])=>{let w=[];typeof g=="string"&&typeof h=="string"?w=r.diffLines(g.trimRight(),h.trimRight(),{newlineIsToken:!1,ignoreWhitespace:!1,ignoreCase:!1}):w=r.diffJson(g,h);let E=d,v=d,p=[],y=0;const T=[],_=[],A=(S,C,M,k,D)=>c(S).map((N,B)=>{const z={},R={};if(!(_.includes(`${C}-${B}`)||D&&B!==0)){if(M||k){let W=!0;if(k){v+=1,z.lineNumber=v,z.type=s.REMOVED,z.value=N||" ";const V=w[C+1];if(V&&V.added){const Q=c(V.value)[B];if(Q){const Y=A(Q,C,!0,!1,!0),{value:se,lineNumber:oe,type:te}=Y[0].right;if(_.push(`${C+1}-${B}`),R.lineNumber=oe,z.value===se)W=!1,R.type=0,z.type=0,R.value=se;else if(R.type=te,m)R.value=se;else{const ve=u(N,se,o);R.value=ve.right,z.value=ve.left}}}}else E+=1,R.lineNumber=E,R.type=s.ADDED,R.value=N;W&&!D&&(T.includes(y)||T.push(y))}else v+=1,E+=1,z.lineNumber=v,z.type=s.DEFAULT,z.value=N,R.lineNumber=E,R.type=s.DEFAULT,R.value=N;return(l!=null&&l.includes(`L-${z.lineNumber}`)||l!=null&&l.includes(`R-${R.lineNumber}`)&&!T.includes(y))&&T.push(y),D||(y+=1),{right:R,left:z}}}).filter(Boolean);return w.forEach(({added:S,removed:C,value:M},k)=>{p=[...p,...A(M,k,S,C)]}),{lineInformation:p,diffLines:T}};return Yr.computeLineInformation=f,Yr}var $s={},h$;function Vqe(){if(h$)return $s;h$=1;var e=$s&&$s.__rest||function(r,i){var s={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.indexOf(a)<0&&(s[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(r);c<a.length;c++)i.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(r,a[c])&&(s[a[c]]=r[a[c]]);return s},t=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});const n=t(qFe());return $s.default=(r,i=!1,s="")=>{const{variables:a={}}=r,c=e(r,["variables"]),u={light:Object.assign({diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",changedBackground:"#fffbdd",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee"},a.light||{}),dark:Object.assign({diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#044B53",addedColor:"white",removedBackground:"#632F34",removedColor:"white",changedBackground:"#3e302c",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f",addedGutterBackground:"#034148",removedGutterBackground:"#632b30",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#21232b",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#666c87",addedGutterColor:"#8c8c8c",removedGutterColor:"#8c8c8c",codeFoldContentColor:"#656a8b",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#555a7b",diffViewerTitleBorderColor:"#353846"},a.dark||{})},f=i?u.dark:u.light,{css:g,cx:h}=(0,n.default)({key:"react-diff",nonce:s}),m=g({width:"100%",label:"content"}),o=g({[`.${m}`]:{width:"50%"},label:"split-view"}),d=g({width:"100%",background:f.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"25px"},label:"diff-container",borderCollapse:"collapse"}),l=g({color:f.codeFoldContentColor,label:"code-fold-content"}),w=g({color:f.diffViewerColor,label:"content-text"}),E=g({background:f.diffViewerTitleBackground,padding:10,borderBottom:`1px solid ${f.diffViewerTitleBorderColor}`,label:"title-block",":last-child":{borderLeft:`1px solid ${f.diffViewerTitleBorderColor}`},[`.${w}`]:{color:f.diffViewerTitleColor}}),v=g({color:f.gutterColor,label:"line-number"}),p=g({background:f.removedBackground,color:f.removedColor,pre:{color:f.removedColor},[`.${v}`]:{color:f.removedGutterColor},label:"diff-removed"}),y=g({background:f.addedBackground,color:f.addedColor,pre:{color:f.addedColor},[`.${v}`]:{color:f.addedGutterColor},label:"diff-added"}),T=g({background:f.changedBackground,[`.${v}`]:{color:f.gutterColor},label:"diff-changed"}),_=g({padding:2,display:"inline-flex",borderRadius:4,wordBreak:"break-all",label:"word-diff"}),A=g({background:f.wordAddedBackground,label:"word-added"}),S=g({background:f.wordRemovedBackground,label:"word-removed"}),C=g({backgroundColor:f.codeFoldGutterBackground,label:"code-fold-gutter"}),M=g({backgroundColor:f.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:"code-fold",a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),k=g({backgroundColor:f.emptyLineBackground,label:"empty-line"}),D=g({width:25,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${y}`]:{pre:{color:f.addedColor}},[`&.${p}`]:{pre:{color:f.removedColor}}}),I=g({background:f.highlightBackground,label:"highlighted-line",[`.${A}, .${S}`]:{backgroundColor:"initial"}}),N=g({label:"highlighted-gutter"}),B=g({userSelect:"none",minWidth:50,padding:"0 10px",whiteSpace:"nowrap",label:"gutter",textAlign:"right",background:f.gutterBackground,"&:hover":{cursor:"pointer",background:f.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5},[`&.${y}`]:{background:f.addedGutterBackground},[`&.${p}`]:{background:f.removedGutterBackground},[`&.${N}`]:{background:f.highlightGutterBackground,"&:hover":{background:f.highlightGutterBackground}}}),z=g({"&:hover":{background:f.gutterBackground,cursor:"initial"},label:"empty-gutter"}),R=g({verticalAlign:"baseline",label:"line"}),W={diffContainer:d,diffRemoved:p,diffAdded:y,diffChanged:T,splitView:o,marker:D,highlightedGutter:N,highlightedLine:I,gutter:B,line:R,wordDiff:_,wordAdded:A,wordRemoved:S,codeFoldGutter:C,codeFold:M,emptyGutter:z,emptyLine:k,lineNumber:v,contentText:w,content:m,codeFoldContent:l,titleBlock:E},V=Object.keys(c).reduce((Q,Y)=>Object.assign(Object.assign({},Q),{[Y]:g(c[Y])}),{});return Object.keys(W).reduce((Q,Y)=>Object.assign(Object.assign({},Q),{[Y]:V[Y]?h(W[Y],V[Y]):W[Y]}),{})},$s}var jd={},f$;function $qe(){if(f$)return jd;f$=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.computeHiddenBlocks=void 0;function e(t,n,r){let i=0,s,a={},c=[];return t.forEach((u,f)=>{const g=n.some(h=>h>=f-r&&h<=f+r);!g&&s==null?(s={index:i,startLine:f,endLine:f,lines:1},c.push(s),a[f]=s.index,i++):g?s=void 0:(s.endLine=f,s.lines++,a[f]=s.index)}),{lineBlocks:a,blocks:c}}return jd.computeHiddenBlocks=e,jd}var p$=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Gqe(e,t){return!!(e===t||p$(e)&&p$(t))}function Yqe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Gqe(e[n],t[n]))return!1;return!0}function Kqe(e,t){t===void 0&&(t=Yqe);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}const Xqe=Object.freeze(Object.defineProperty({__proto__:null,default:Kqe},Symbol.toStringTag,{value:"Module"})),jqe=Qu(Xqe);var m$;function Qqe(){return m$||(m$=1,function(e){var t=Zi&&Zi.__createBinding||(Object.create?function(l,w,E,v){v===void 0&&(v=E);var p=Object.getOwnPropertyDescriptor(w,E);(!p||("get"in p?!w.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(l,v,p)}:function(l,w,E,v){v===void 0&&(v=E),l[v]=w[E]}),n=Zi&&Zi.__setModuleDefault||(Object.create?function(l,w){Object.defineProperty(l,"default",{enumerable:!0,value:w})}:function(l,w){l.default=w}),r=Zi&&Zi.__importStar||function(l){if(l&&l.__esModule)return l;var w={};if(l!=null)for(var E in l)E!=="default"&&Object.prototype.hasOwnProperty.call(l,E)&&t(w,l,E);return n(w,l),w},i=Zi&&Zi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.DiffMethod=e.LineNumberPrefix=void 0;const s=one,a=r(We),c=i(_M()),u=Wqe();Object.defineProperty(e,"DiffMethod",{enumerable:!0,get:function(){return u.DiffMethod}});const f=i(Vqe()),g=$qe(),h=jqe,m=h.default||h;var o;(function(l){l.LEFT="L",l.RIGHT="R"})(o||(e.LineNumberPrefix=o={}));class d extends a.Component{constructor(w){super(w),this.resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1,this.onBlockExpand=E=>{const v=this.state.expandedBlocks.slice();v.push(E),this.setState({expandedBlocks:v})},this.computeStyles=m(f.default),this.onLineNumberClickProxy=E=>this.props.onLineNumberClick?v=>this.props.onLineNumberClick(E,v):()=>{},this.renderWordDiff=(E,v)=>E.map((p,y)=>(0,s.jsx)("span",{className:(0,c.default)(this.styles.wordDiff,{[this.styles.wordAdded]:p.type===u.DiffType.ADDED,[this.styles.wordRemoved]:p.type===u.DiffType.REMOVED}),children:v?v(p.value):p.value},y)),this.renderLine=(E,v,p,y,T,_)=>{const A=`${p}-${E}`,S=`${_}-${T}`,C=this.props.highlightLines.includes(A)||this.props.highlightLines.includes(S),M=v===u.DiffType.ADDED,k=v===u.DiffType.REMOVED,D=v===u.DiffType.CHANGED;let I;return Array.isArray(y)?I=this.renderWordDiff(y,this.props.renderContent):this.props.renderContent?I=this.props.renderContent(y):I=y,(0,s.jsxs)(a.Fragment,{children:[!this.props.hideLineNumbers&&(0,s.jsx)("td",{onClick:E&&this.onLineNumberClickProxy(A),className:(0,c.default)(this.styles.gutter,{[this.styles.emptyGutter]:!E,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedGutter]:C}),children:(0,s.jsx)("pre",{className:this.styles.lineNumber,children:E})}),!this.props.splitView&&!this.props.hideLineNumbers&&(0,s.jsx)("td",{onClick:T&&this.onLineNumberClickProxy(S),className:(0,c.default)(this.styles.gutter,{[this.styles.emptyGutter]:!T,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedGutter]:C}),children:(0,s.jsx)("pre",{className:this.styles.lineNumber,children:T})}),this.props.renderGutter?this.props.renderGutter({lineNumber:E,type:v,prefix:p,value:y,additionalLineNumber:T,additionalPrefix:_,styles:this.styles}):null,!this.props.hideMarkers&&(0,s.jsx)("td",{className:(0,c.default)(this.styles.marker,{[this.styles.emptyLine]:!I,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedLine]:C}),children:(0,s.jsxs)("pre",{children:[M&&"+",k&&"-"]})}),(0,s.jsx)("td",{className:(0,c.default)(this.styles.content,{[this.styles.emptyLine]:!I,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedLine]:C}),children:(0,s.jsx)("pre",{className:this.styles.contentText,children:I})})]})},this.renderSplitView=({left:E,right:v},p)=>(0,s.jsxs)("tr",{className:this.styles.line,children:[this.renderLine(E.lineNumber,E.type,o.LEFT,E.value),this.renderLine(v.lineNumber,v.type,o.RIGHT,v.value)]},p),this.renderInlineView=({left:E,right:v},p)=>{let y;return E.type===u.DiffType.REMOVED&&v.type===u.DiffType.ADDED?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("tr",{className:this.styles.line,children:this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,null)}),(0,s.jsx)("tr",{className:this.styles.line,children:this.renderLine(null,v.type,o.RIGHT,v.value,v.lineNumber)})]},p):(E.type===u.DiffType.REMOVED&&(y=this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,null)),E.type===u.DiffType.DEFAULT&&(y=this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,v.lineNumber,o.RIGHT)),v.type===u.DiffType.ADDED&&(y=this.renderLine(null,v.type,o.RIGHT,v.value,v.lineNumber)),(0,s.jsx)("tr",{className:this.styles.line,children:y},p))},this.onBlockClickProxy=E=>()=>this.onBlockExpand(E),this.renderSkippedLineIndicator=(E,v,p,y)=>{const{hideLineNumbers:T,splitView:_}=this.props,A=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(E,p,y):(0,s.jsxs)("pre",{className:this.styles.codeFoldContent,children:["Expand ",E," lines ..."]}),S=(0,s.jsx)("td",{children:(0,s.jsx)("a",{onClick:this.onBlockClickProxy(v),tabIndex:0,children:A})}),C=!_&&!T;return(0,s.jsxs)("tr",{className:this.styles.codeFold,children:[!T&&(0,s.jsx)("td",{className:this.styles.codeFoldGutter}),this.props.renderGutter?(0,s.jsx)("td",{className:this.styles.codeFoldGutter}):null,(0,s.jsx)("td",{className:(0,c.default)({[this.styles.codeFoldGutter]:C})}),C?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("td",{}),S]}):(0,s.jsxs)(a.Fragment,{children:[S,this.props.renderGutter?(0,s.jsx)("td",{}):null,(0,s.jsx)("td",{})]}),(0,s.jsx)("td",{}),(0,s.jsx)("td",{})]},`${p}-${y}`)},this.renderDiff=()=>{const{oldValue:E,newValue:v,splitView:p,disableWordDiff:y,compareMethod:T,linesOffset:_}=this.props,{lineInformation:A,diffLines:S}=(0,u.computeLineInformation)(E,v,y,T,_,this.props.alwaysShowLines),C=this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff),{lineBlocks:M,blocks:k}=(0,g.computeHiddenBlocks)(A,S,C);return A.map((D,I)=>{if(this.props.showDiffOnly){const B=M[I];if(B!==void 0){const z=k[B].endLine===I;if(!this.state.expandedBlocks.includes(B)&&z)return(0,s.jsx)(a.Fragment,{children:this.renderSkippedLineIndicator(k[B].lines,B,D.left.lineNumber,D.right.lineNumber)},I);if(!this.state.expandedBlocks.includes(B))return null}}return p?this.renderSplitView(D,I):this.renderInlineView(D,I)})},this.render=()=>{const{oldValue:E,newValue:v,useDarkTheme:p,leftTitle:y,rightTitle:T,splitView:_,hideLineNumbers:A,hideMarkers:S,nonce:C}=this.props;if(this.props.compareMethod!==u.DiffMethod.JSON&&(typeof E!="string"||typeof v!="string"))throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,p,C);const M=this.renderDiff();let k=A?2:3,D=A?2:4;S&&(k-=1,D-=1);const I=this.props.renderGutter?1:0,N=(y||T)&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colSpan:(_?k:D)+I,className:this.styles.titleBlock,children:(0,s.jsx)("pre",{className:this.styles.contentText,children:y})}),_&&(0,s.jsx)("td",{colSpan:k+I,className:this.styles.titleBlock,children:(0,s.jsx)("pre",{className:this.styles.contentText,children:T})})]});return(0,s.jsx)("table",{className:(0,c.default)(this.styles.diffContainer,{[this.styles.splitView]:_}),children:(0,s.jsxs)("tbody",{children:[N,M]})})},this.state={expandedBlocks:[]}}}d.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:u.DiffMethod.CHARS,styles:{},hideLineNumbers:!1,hideMarkers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:""},e.default=d}(Zi)),Zi}Qqe();const V$e=2,$$e=5,G$e=1,Y$e="round",K$e="transparent",X$e="rgba(0, 0, 0, 0.1)",j$e="dblclick",Q$e={TRANSLATIONS:"translations",LANGUAGE_KEY:"languageKey"},J$e=1e-4,Z$e=1e7,Mte=()=>{const e=q.useContext(tne);if(e===void 0)throw new Error("useLegend must be used within a LegendProvider");return e},Jqe=({chartRef:e,options:t})=>{const{state:n,dispatch:r}=Mte()??{},{annotations:i,interactions:{onLegendClick:s},legend:{customLegend:a}}=t??{};q.useEffect(()=>{var g;console.log("Legend state effect triggered",n),(g=n==null?void 0:n.datasets)==null||g.forEach((h,m)=>{var d,l;const o=(h==null?void 0:h.hidden)??!1;(d=e==null?void 0:e.current)==null||d.setDatasetVisibility(Number(m),!o),(l=e==null?void 0:e.current)==null||l.update("none")})},[e,n]);const c=q.useCallback((g,h)=>{var E;const{datasetIndex:m=-1}=h??{};let o=null;const d=e==null?void 0:e.current,l=((E=d==null?void 0:d.data)==null?void 0:E.datasets)??[],w=(l==null?void 0:l[m])??{};if(i!=null&&i.controlAnnotation&&(w!=null&&w.isAnnotation)&&(o=(w==null?void 0:w.annotationIndex)??null),s){const v=(h==null?void 0:h.hidden)??!1;s(h==null?void 0:h.text,v)}r({type:nne,payload:{chartInstance:d,dsConfig:{datasetIndex:m,datasets:l,dataset:w},annotationConfig:{annotationIndex:o}}}),d==null||d.update()},[e,i,r]),u=q.useMemo(()=>rne(t,c),[t,c]),f=q.useMemo(()=>({[ine]:(a==null?void 0:a.customLegendPlugin)&&{containerID:a==null?void 0:a.customLegendContainerID}}),[a]);return{legendClick:c,annotation:n==null?void 0:n.annotation,legend:u,customLegendPlugin:f}},eGe=(e=[])=>{let t={};return e.length&&(t=e.reduce((n,r,i)=>(n[`annotation${i+1}`]=r,n),{})),{annotations:t}};var Zqe=function(){},bte=typeof window<"u",eWe=bte?q.useLayoutEffect:q.useEffect,Rte={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function tWe(){var e=q.useState(null),t=e[0],n=e[1],r=q.useState(Rte),i=r[0],s=r[1],a=q.useMemo(function(){return new window.ResizeObserver(function(c){if(c[0]){var u=c[0].contentRect,f=u.x,g=u.y,h=u.width,m=u.height,o=u.top,d=u.left,l=u.bottom,w=u.right;s({x:f,y:g,width:h,height:m,top:o,left:d,bottom:l,right:w})}})},[]);return eWe(function(){if(t)return a.observe(t),function(){a.disconnect()}},[t]),[n,i]}const nWe=bte&&typeof window.ResizeObserver<"u"?tWe:function(){return[Zqe,Rte]};var Nte={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g$=We.createContext&&We.createContext(Nte),wa=function(){return wa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wa.apply(this,arguments)},rWe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Lte(e){return e&&e.map(function(t,n){return We.createElement(t.tag,wa({key:n},t.attr),Lte(t.child))})}function Is(e){return function(t){return We.createElement(iWe,wa({attr:wa({},e.attr)},t),Lte(e.child))}}function iWe(e){var t=function(n){var r=e.attr,i=e.size,s=e.title,a=rWe(e,["attr","size","title"]),c=i||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),We.createElement("svg",wa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:wa(wa({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),s&&We.createElement("title",null,s),e.children)};return g$!==void 0?We.createElement(g$.Consumer,null,function(n){return t(n)}):t(Nte)}function tGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 9l3 3l-3 3"}},{tag:"path",attr:{d:"M15 12h6"}},{tag:"path",attr:{d:"M6 9l-3 3l3 3"}},{tag:"path",attr:{d:"M3 12h6"}},{tag:"path",attr:{d:"M9 18l3 3l3 -3"}},{tag:"path",attr:{d:"M12 15v6"}},{tag:"path",attr:{d:"M15 6l-3 -3l-3 3"}},{tag:"path",attr:{d:"M12 3v6"}}]})(e)}function nGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}},{tag:"path",attr:{d:"M5.7 5.7l12.6 12.6"}}]})(e)}function oWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z",strokeWidth:"0",fill:"currentColor"}}]})(e)}function rGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}},{tag:"path",attr:{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}},{tag:"path",attr:{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}},{tag:"path",attr:{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"}}]})(e)}function sWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M9 6l11 0"}},{tag:"path",attr:{d:"M9 12l11 0"}},{tag:"path",attr:{d:"M9 18l11 0"}},{tag:"path",attr:{d:"M5 6l0 .01"}},{tag:"path",attr:{d:"M5 12l0 .01"}},{tag:"path",attr:{d:"M5 18l0 .01"}}]})(e)}function iGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M5 4h14a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-7a1 1 0 0 0 -1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1"}},{tag:"path",attr:{d:"M4 8l2 0"}},{tag:"path",attr:{d:"M4 12l3 0"}},{tag:"path",attr:{d:"M4 16l2 0"}},{tag:"path",attr:{d:"M8 4l0 2"}},{tag:"path",attr:{d:"M12 4l0 3"}},{tag:"path",attr:{d:"M16 4l0 2"}}]})(e)}function aWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M19 2h-14a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3 -3v-14a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"}}]})(e)}function uWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 6l-12 12"}},{tag:"path",attr:{d:"M6 6l12 12"}}]})(e)}function oGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}},{tag:"path",attr:{d:"M7 10l6 0"}},{tag:"path",attr:{d:"M10 7l0 6"}},{tag:"path",attr:{d:"M21 21l-6 -6"}}]})(e)}const lWe="_legend_wpro0_1",cWe="_isDragging_wpro0_8",dWe="_legendItems_wpro0_11",hWe="_isHidden_wpro0_47",fWe="_legendToggle_wpro0_50",pWe="_legendItem_wpro0_11",mWe="_legendItemSymbol_wpro0_80",gWe="_legendItemBox_wpro0_90",yWe="_legendItemLine_wpro0_95",vWe="_legendItemPoint_wpro0_103",EWe="_legendItemText_wpro0_110",wWe="_dropzoneContainer_wpro0_140",TWe="_dropzone_wpro0_140",SWe="_left_wpro0_149",_We="_right_wpro0_153",AWe="_top_wpro0_157",CWe="_bottom_wpro0_161",kWe="_dropzonePlaceholder_wpro0_165",DWe="_isActive_wpro0_173",IWe="_resizeContainer_wpro0_176",_n={legend:lWe,isDragging:cWe,legendItems:dWe,isHidden:hWe,legendToggle:fWe,legendItem:pWe,legendItemSymbol:mWe,legendItemBox:gWe,legendItemLine:yWe,legendItemPoint:vWe,legendItemText:EWe,dropzoneContainer:wWe,dropzone:TWe,left:SWe,right:_We,top:AWe,bottom:CWe,dropzonePlaceholder:kWe,isActive:DWe,resizeContainer:IWe},sM=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("circle",{cx:12,cy:12,r:12,fill:"currentColor"}));var Ih=(e=>(e.LINE="line",e.BAR="bar",e.PIE="pie",e.SCATTER="scatter",e))(Ih||{}),MWe=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(MWe||{});const bWe=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("rect",{x:2,y:2,width:20,height:20,fill:"currentColor"})),RWe=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("rect",{x:3,y:3,width:18,height:18,fill:"currentColor",transform:"rotate(45 12 12)"})),NWe=e=>q.createElement("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},q.createElement("path",{d:"m22.7998 22.0623h-21.5996c-.21066.0001-.417617-.0554-.600067-.1607-.182451-.1053-.333965-.2567-.439311-.4392-.1053464-.1824-.16081228-.3893-.160822-.6s.0554372-.4176.160767-.6l10.799833-18.70518c.1139-.17137.2684-.31191.4497-.40913.1814-.09722.3839-.14809.5897-.14809s.4083.05087.5897.14809c.1813.09722.3358.23776.4497.40913l10.7998 18.70518c.1054.1824.1608.3893.1608.6s-.0555.4176-.1608.6c-.1054.1825-.2569.3339-.4393.4392-.1825.1053-.3894.1608-.6001.1607z",fill:"currentColor"})),pI=16,y$=({dataset:e})=>{var u;const{borderColor:t,borderDash:n,borderWidth:r}=e??{},[i,s]=n??[],a=i&&s?(pI-i)/2%(i+s)*-1:0,c=((u=e==null?void 0:e.borderDash)==null?void 0:u.join(" "))||"";return x.jsx("span",{className:_n.legendItemLine,children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${pI} ${pI}`,width:"100%",height:"100%",children:x.jsx("line",{x1:"0",y1:"50%",x2:"100%",y2:"50%",stroke:t,strokeWidth:r,strokeDasharray:c,strokeDashoffset:a})})})},LWe=({dataset:e})=>{const{pointBackgroundColor:t,pointRadius:n,pointStyle:r=""}=e??{};if(!n)return null;const i=n*2,s={circle:x.jsx(sM,{}),triangle:x.jsx(NWe,{}),rectRot:x.jsx(RWe,{}),rect:x.jsx(bWe,{})};return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(pn,{icon:(s==null?void 0:s[r])??x.jsx(sM,{}),size:i,color:t})})},FWe=({dataset:e})=>{const{backgroundColor:t}=e??{},n={backgroundColor:t};return x.jsx("span",{className:_n.legendItemBox,style:n})},Fte=({dataset:e})=>{const{annotationType:t,showLine:n}=e??{};switch(t){case G0.Box:case G0.Ellipse:return x.jsx(FWe,{dataset:e});case G0.Line:return x.jsx(y$,{dataset:e});default:return x.jsxs(x.Fragment,{children:[n&&x.jsx(y$,{dataset:e}),x.jsx(LWe,{dataset:e})]})}};Fte.__docgenInfo={description:"",methods:[],displayName:"LegendItemLine"};const PWe=16,xWe=(e,t,n)=>{switch(t){case Ih.LINE:return x.jsx(Fte,{dataset:e});case Ih.BAR:{const{backgroundColor:r}=e??{},i=r instanceof Array?r==null?void 0:r[n]:r;return x.jsx("span",{className:_n.legendItemBox,children:x.jsx(aWe,{color:i})})}case Ih.PIE:return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(pn,{icon:x.jsx(sM,{})})});case Ih.SCATTER:{const{backgroundColor:r,borderColor:i}=e??{},s=r instanceof Array?r==null?void 0:r[n]:r;return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(oWe,{color:s??i})})}default:return null}},Pte=({hidden:e,dataset:t,handleClick:n,chartType:r,index:i})=>x.jsxs("div",{className:lM(_n==null?void 0:_n.legendItem,e&&(_n==null?void 0:_n.isHidden)),onClick:n,children:[x.jsx("span",{className:_n.legendItemSymbol,style:{width:PWe},children:xWe(t,r,i)}),x.jsx("span",{className:_n.legendItemText,children:t==null?void 0:t.label})]});Pte.__docgenInfo={description:"",methods:[],displayName:"LegendItem",props:{hidden:{required:!0,tsType:{name:"boolean"},description:""},dataset:{required:!0,tsType:{name:"union",raw:`| IGeneratedLineChartDataset
1362
1362
  | IGenerateBarChartDataset
1363
1363
  | IGeneratedPieChartDataset
1364
1364
  | IGeneratedScatterChartDataset`,elements:[{name:"IGeneratedLineChartDataset"},{name:"IGenerateBarChartDataset"},{name:"IGeneratedPieChartDataset"},{name:"IGeneratedScatterChartDataset"}]},description:""},handleClick:{required:!0,tsType:{name:"MouseEventHandler",elements:[{name:"HTMLDivElement"}],raw:"MouseEventHandler<HTMLDivElement>"},description:""},chartType:{required:!0,tsType:{name:"ChartType"},description:""},index:{required:!0,tsType:{name:"number"},description:""}}};const HWe=e=>{const t=vn.get(e,"options.plugins.annotation.annotations",null);return!t||!Object.keys(t).length?[]:Object.values(t)},BWe=e=>{var t,n,r,i,s;return vn.cloneDeep((s=(i=(r=(n=(t=e==null?void 0:e.options)==null?void 0:t.plugins)==null?void 0:n.legend)==null?void 0:r.labels)==null?void 0:i.generateLabels)==null?void 0:s.call(i,e))??[]},OWe=e=>{const t=BWe(e),n=HWe(e);return vn.map(t,r=>{const i=vn.find(n,s=>{var a;return r.text===((a=s==null?void 0:s.label)==null?void 0:a.content)});return i?{...r,hidden:!(i!=null&&i.display)}:r})},zWe=(e,t)=>{const[n,r]=q.useState([]);return q.useEffect(()=>{const i=e==null?void 0:e.current;if(!i)return;const s=OWe(i);r(s)},[t,e]),n},i1=4,UWe=(e,t)=>{const{height:n=0,width:r=0,chartArea:i}=t??{},{top:s=0,left:a=0,bottom:c=0,right:u=0}=i??{};return{left:e!=null&&e.includes("left")?a:void 0,right:e!=null&&e.includes("right")?r-u:void 0,top:e!=null&&e.includes("top")?s:void 0,bottom:e!=null&&e.includes("bottom")?n-c:void 0,maxHeight:.5*(c-s-i1*2),maxWidth:.9*(u-a-i1*2),margin:i1}},qWe=({items:e,legendState:t,datasets:n,legendClick:r,chartType:i})=>x.jsx("div",{className:_n.legendItems,children:e==null?void 0:e.map((s,a)=>{var u,f,g;if((u=n==null?void 0:n[s==null?void 0:s.datasetIndex])!=null&&u.hideLegend)return null;const c=(g=(f=t==null?void 0:t.datasets)==null?void 0:f[s==null?void 0:s.datasetIndex])==null?void 0:g.hidden;return x.jsx(Pte,{index:a,hidden:c??(s==null?void 0:s.hidden),dataset:n==null?void 0:n[s==null?void 0:s.datasetIndex],handleClick:h=>r(h,s),chartType:i},`${s==null?void 0:s.datasetIndex}-hidden-${s==null?void 0:s.hidden}`)})}),xte=q.forwardRef(({legendPosition:e,chartRef:t,isDragging:n,legendConfig:r},i)=>{var E;const s=t==null?void 0:t.current,{options:a,generatedDatasets:c,chartType:u}=r??{},f=(E=s==null?void 0:s.data)==null?void 0:E.datasets,{legend:g,legendClick:h}=Jqe({chartRef:t,options:a}),{state:m}=Mte()??{},[o,d]=q.useState((g==null?void 0:g.display)??!0),l=zWe(t,c),w=UWe(e,s);return x.jsxs("div",{ref:i,className:lM(_n.legend,!o&&_n.isHidden,n&&_n.isDragging),style:w,children:[x.jsx("div",{className:_n.legendToggle,children:x.jsx(jr,{onClick:()=>d(!o),small:!0,round:!0,icon:o?x.jsx(uWe,{}):x.jsx(sWe,{})})}),x.jsx(qWe,{items:l,legendState:m,datasets:f,legendClick:h,chartType:u})]})});xte.__docgenInfo={description:"",methods:[],displayName:"LegendPanel",props:{chartRef:{required:!0,tsType:{name:"RefObject",elements:[{name:"Chart"}],raw:"RefObject<Chart>"},description:""},legendConfig:{required:!0,tsType:{name:"ILegendConfig"},description:""},legendPosition:{required:!0,tsType:{name:"Position"},description:""},isDragging:{required:!0,tsType:{name:"boolean"},description:""}}};const WWe=e=>{const{position:t="",onDrop:n=vn.noop,placeholderSize:r={}}=e??{},[{isOver:i,canDrop:s},a]=Boe(()=>({accept:"legend",drop:n,collect:u=>({isOver:u==null?void 0:u.isOver(),canDrop:u==null?void 0:u.canDrop()})})),c=i&&s;return x.jsx("div",{ref:a,className:lM(_n.dropzone,c&&_n.isActive,(t==null?void 0:t.includes("left"))&&_n.left,(t==null?void 0:t.includes("right"))&&_n.right,(t==null?void 0:t.includes("top"))&&_n.top,(t==null?void 0:t.includes("bottom"))&&_n.bottom),children:x.jsx("div",{className:_n.dropzonePlaceholder,style:{...r,margin:i1}})})},Hte=e=>{const{chartArea:t,setLegendPosition:n,isDragging:r,placeholderSize:i}=e??{},s=[Qd.TopLeft,Qd.TopRight,Qd.BottomLeft,Qd.BottomRight],{top:a,left:c,width:u,height:f}=t??{};return x.jsx("div",{className:_n.dropzoneContainer,style:{top:a,left:c,width:u,height:f,zIndex:r?0:-1},children:s==null?void 0:s.map(g=>x.jsx(WWe,{position:g,onDrop:()=>n(g),placeholderSize:i},g))})};Hte.__docgenInfo={description:"",methods:[],displayName:"LegendDropZones",props:{chartArea:{required:!1,tsType:{name:"ChartArea"},description:""},setLegendPosition:{required:!0,tsType:{name:"signature",type:"function",raw:"(position: Position) => void",signature:{arguments:[{type:{name:"Position"},name:"position"}],return:{name:"void"}}},description:""},isDragging:{required:!0,tsType:{name:"boolean"},description:""},placeholderSize:{required:!1,tsType:{name:"signature",type:"object",raw:`{