@antv/g-svg 2.0.13 → 2.0.14

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.
@@ -1,2 +1,34 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.SVG={}),t.window.G)}(this,(function(t,e){"use strict";var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+e+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;r>n;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)};function o(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);r.length>i;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function a(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function c(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))}function c(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&i[3]>c[1])){a.label=c[1];break}if(6===c[0]&&i[1]>a.label){a.label=i[1],i=c;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;o>i;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var u=function(){function t(){}return t.prototype.apply=function(e,n){var r=this,i=e.renderingService,o=e.renderingContext,a=e.config;this.context=e;var c=o.root.ownerDocument.defaultView,s=function(t){i.hooks.pointerMove.call(t)},l=function(t){i.hooks.pointerUp.call(t)},u=function(t){i.hooks.pointerDown.call(t)},d=function(t){i.hooks.pointerOver.call(t)},p=function(t){i.hooks.pointerOut.call(t)},f=function(t){i.hooks.pointerCancel.call(t)},h=function(t){i.hooks.pointerWheel.call(t)},v=function(t){i.hooks.click.call(t)};i.hooks.init.tap(t.tag,(function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="none",t.style.msTouchAction="none"):c.supportsPointerEvents&&(t.style.touchAction="none"),c.supportsPointerEvents?function(t){n.globalThis.document.addEventListener("pointermove",s,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("pointerleave",p,!0),t.addEventListener("pointerover",d,!0),n.globalThis.addEventListener("pointerup",l,!0),n.globalThis.addEventListener("pointercancel",f,!0)}(t):function(t){n.globalThis.document.addEventListener("mousemove",s,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("mouseout",p,!0),t.addEventListener("mouseover",d,!0),n.globalThis.addEventListener("mouseup",l,!0)}(t),c.supportsTouchEvents&&function(t){t.addEventListener("touchstart",u,!0),t.addEventListener("touchend",l,!0),t.addEventListener("touchmove",s,!0),t.addEventListener("touchcancel",f,!0)}(t),a.useNativeClickEvent&&t.addEventListener("click",v,!0),t.addEventListener("wheel",h,{passive:!0,capture:!0})})),i.hooks.destroy.tap(t.tag,(function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):c.supportsPointerEvents&&(t.style.touchAction=""),c.supportsPointerEvents?function(t){n.globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",u,!0),t.removeEventListener("pointerleave",p,!0),t.removeEventListener("pointerover",d,!0),n.globalThis.removeEventListener("pointerup",l,!0),n.globalThis.removeEventListener("pointercancel",f,!0)}(t):function(t){n.globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",u,!0),t.removeEventListener("mouseout",p,!0),t.removeEventListener("mouseover",d,!0),n.globalThis.removeEventListener("mouseup",l,!0)}(t),c.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",u,!0),t.removeEventListener("touchend",l,!0),t.removeEventListener("touchmove",s,!0),t.removeEventListener("touchcancel",f,!0)}(t),a.useNativeClickEvent&&t.removeEventListener("click",v,!0),t.removeEventListener("wheel",h,!0)}))},t.tag="DOMInteraction",t}(),d=function(t){function e(){var e=t.apply(this,l([],s(arguments),!1))||this;return e.name="dom-interaction",e}return r(e,t),e.prototype.init=function(){this.addRenderingPlugin(new u)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(e.AbstractRendererPlugin),p=Object.freeze({__proto__:null,Plugin:d}),f=function(){function t(){}return t.prototype.apply=function(e,n){var r=this,i=e.config.document,o=e.renderingService,s=e.svgElementMap;o.hooks.pick.tapPromise(t.tag,(function(t){return a(r,void 0,void 0,(function(){return c(this,(function(e){return[2,this.pick(s,i,t)]}))}))})),o.hooks.pickSync.tap(t.tag,(function(t){return r.pick(s,i,t)}))},t.prototype.pick=function(t,e,n){var r,i,o=n.topmost,a=n.position,c=a.clientX,s=a.clientY;try{var l=[];try{for(var u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}((e||document).elementsFromPoint(c,s)),d=u.next();!d.done;d=u.next()){var p=d.value;if(p.shadowRoot&&p.shadowRoot!==e)return this.pick(t,p.shadowRoot,n);var f=t.get(p);if(f&&f.isInteractive()&&(l.push(f),o))return n.picked=l,n}}catch(t){r={error:t}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}n.picked=l}catch(t){n.picked=[]}return n},t.tag="SVGPicker",t}(),h=function(t){function e(){var e=t.apply(this,l([],s(arguments),!1))||this;return e.name="svg-picker",e}return r(e,t),e.prototype.init=function(){this.addRenderingPlugin(new f)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(e.AbstractRendererPlugin),v=Object.freeze({__proto__:null,Plugin:h}),m=function(t){return null==t},g={}.toString,y=function(t,e){return g.call(t)==="[object "+e+"]"},b=function(t){return y(t,"String")},E=function(t,e,n){return e>t?e:t>n?n:t},A="undefined"!=typeof Float32Array?Float32Array:Array;function S(){var t=new A(16);return A!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function x(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],c=e[5],s=e[6],l=e[7],u=e[8],d=e[9],p=e[10],f=e[11],h=e[12],v=e[13],m=e[14],g=e[15],y=n*c-r*a,b=n*s-i*a,E=n*l-o*a,A=r*s-i*c,S=r*l-o*c,x=i*l-o*s,C=u*v-d*h,w=u*m-p*h,O=u*g-f*h,T=d*m-p*v,k=d*g-f*v,L=p*g-f*m,M=y*L-b*k+E*T+A*O-S*w+x*C;return M?(t[0]=(c*L-s*k+l*T)*(M=1/M),t[1]=(i*k-r*L-o*T)*M,t[2]=(v*x-m*S+g*A)*M,t[3]=(p*S-d*x-f*A)*M,t[4]=(s*O-a*L-l*w)*M,t[5]=(n*L-i*O+o*w)*M,t[6]=(m*E-h*x-g*b)*M,t[7]=(u*x-p*E+f*b)*M,t[8]=(a*k-c*O+l*C)*M,t[9]=(r*O-n*k-o*C)*M,t[10]=(h*S-v*E+g*y)*M,t[11]=(d*E-u*S-f*y)*M,t[12]=(c*w-a*T-s*C)*M,t[13]=(n*T-r*w+i*C)*M,t[14]=(v*b-h*A-m*y)*M,t[15]=(u*A-d*b+p*y)*M,t):null}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var C=function(){function t(){}return t.tag="c-svg-element",t}();function w(t,e){var n=e.src,r=void 0===n?"":n,i=e.x,o=e.y,a=void 0===o?0:o,c=e.width,s=e.height;if(t.setAttribute("x","".concat(void 0===i?0:i)),t.setAttribute("y","".concat(a)),b(r))t.setAttribute("href",r);else if(r instanceof Image)c||t.setAttribute("width","".concat(r.width)),s||t.setAttribute("height","".concat(r.height)),t.setAttribute("href",r.src);else if(r instanceof HTMLElement&&b(r.nodeName)&&"CANVAS"===r.nodeName.toUpperCase())t.setAttribute("href",r.toDataURL());else if(r instanceof ImageData){var l=document.createElement("canvas");l.setAttribute("width","".concat(r.width)),l.setAttribute("height","".concat(r.height));var u=l.getContext("2d");u&&(u.putImageData(r,0,0),c||t.setAttribute("width","".concat(r.width)),s||t.setAttribute("height","".concat(r.height)),t.setAttribute("href",l.toDataURL()))}}function O(t,n){var r=n.x1,i=n.y1,o=n.x2,a=n.y2,c=n.markerStart,s=n.markerEnd,l=n.markerStartOffset,u=n.markerEndOffset,d=0,p=0,f=0,h=0,v=0;c&&e.isDisplayObject(c)&&l&&(d=Math.cos(v=Math.atan2(a-i,o-r))*(l||0),p=Math.sin(v)*(l||0)),s&&e.isDisplayObject(s)&&u&&(f=Math.cos(v=Math.atan2(i-a,r-o))*(u||0),h=Math.sin(v)*(u||0)),t.setAttribute("x1","".concat(r+d)),t.setAttribute("y1","".concat(i+p)),t.setAttribute("x2","".concat(o+f)),t.setAttribute("y2","".concat(a+h))}function T(t,n){var r=n.d,i=n.markerStart,o=n.markerEnd,a=n.markerStartOffset,c=n.markerEndOffset,l=0,u=0,d=0,p=0,f=0;if(i&&e.isDisplayObject(i)&&a){var h=s(i.parentNode.getStartTangent(),2);l=Math.cos(f=Math.atan2((v=h[0])[1]-(m=h[1])[1],v[0]-m[0]))*(a||0),u=Math.sin(f)*(a||0)}if(o&&e.isDisplayObject(o)&&c){var v,m,g=s(o.parentNode.getEndTangent(),2);d=Math.cos(f=Math.atan2((v=g[0])[1]-(m=g[1])[1],v[0]-m[0]))*(c||0),p=Math.sin(f)*(c||0)}t.setAttribute("d",e.translatePathToString(r.absolutePath,l,u,d,p))}function k(t,n){var r=n.points.points,i=n.markerStart,o=n.markerStartOffset,a=n.markerEnd,c=n.markerEndOffset,s=r.length;if(r&&s>=2){var l=0,u=0,d=0,p=0,f=0;i&&e.isDisplayObject(i)&&o&&(l=Math.cos(f=Math.atan2(r[1][1]-r[0][1],r[1][0]-r[0][0]))*(o||0),u=Math.sin(f)*(o||0)),a&&e.isDisplayObject(a)&&c&&(d=Math.cos(f=Math.atan2(r[s-2][1]-r[s-1][1],r[s-2][0]-r[s-1][0]))*(c||0),p=Math.sin(f)*(c||0)),t.setAttribute("points",r.map((function(t,e){var n=0,r=0;return 0===e?(n=l,r=u):e===s-1&&(n=d,r=p),"".concat(t[0]+n,",").concat(t[1]+r)})).join(" "))}}function L(t,e){var n=e.radius,r=e.x,i=void 0===r?0:r,o=e.y,a=void 0===o?0:o,c=e.width,l=e.height;if(isFinite(c)&&isFinite(l)){var u="";if(n&&n.some((function(t){return 0!==t}))){var d=s(n.map((function(t){return E(t,0,Math.min(Math.abs(c)/2,Math.abs(l)/2))})),4),p=d[0],f=d[1],h=d[2],v=d[3],m=c>0?1:-1,g=l>0?1:-1,y=m+g!==0?1:0;u=[["M ".concat(m*p+i,",").concat(a)],["l ".concat(c-m*(p+f),",0")],["a ".concat(f,",").concat(f,",0,0,").concat(y,",").concat(m*f,",").concat(g*f)],["l 0,".concat(l-g*(f+h))],["a ".concat(h,",").concat(h,",0,0,").concat(y,",").concat(-m*h,",").concat(g*h)],["l ".concat(m*(h+v)-c,",0")],["a ".concat(v,",").concat(v,",0,0,").concat(y,",").concat(-m*v,",").concat(-g*v)],["l 0,".concat(g*(v+p)-l)],["a ".concat(p,",").concat(p,",0,0,").concat(y,",").concat(m*p,",").concat(-g*p)],["z"]].join(" ")}else u="M ".concat(i,",").concat(a," l ").concat(c,",0 l 0,").concat(l," l").concat(-c," 0 z");t.setAttribute("d",u)}}function M(t,e){return(e||document).createElementNS("http://www.w3.org/2000/svg",t)}var G="g-filter-";function P(t,e,n,r,i){var o=G+n.entity,a=e.querySelectorAll("[name=".concat(o,"]"));if(a.length&&a.forEach((function(t){e.removeChild(t)})),0===i.length)null==r||r.removeAttribute("filter");else{var c=i.map((function(n,r){var i=n.name,a=n.params,c=M("filter",t);return c.setAttribute("filterUnits","userSpaceOnUse"),"blur"===i?function(t,e,n){var r=M("feGaussianBlur",t);r.setAttribute("in","SourceGraphic"),r.setAttribute("stdDeviation","".concat(n[0].value)),e.appendChild(r)}(t,c,a):"brightness"===i?function(t,e,n){var r=D(n[0]);R(t,e,{type:"linear",slope:r,intercept:0})}(t,c,a):"drop-shadow"===i?function(t,e,n){var r=n[0].value,i=n[1].value,o=n[2].value,a=n[3].formatted,c=M("feGaussianBlur",t);c.setAttribute("in","SourceAlpha"),c.setAttribute("stdDeviation","".concat(o)),e.appendChild(c);var s=M("feOffset",t);s.setAttribute("dx","".concat(r)),s.setAttribute("dy","".concat(i)),s.setAttribute("result","offsetblur"),e.appendChild(s);var l=M("feFlood",t);l.setAttribute("flood-color",a),e.appendChild(l);var u=M("feComposite",t);u.setAttribute("in2","offsetblur"),u.setAttribute("operator","in"),e.appendChild(u);var d=M("feMerge",t);e.appendChild(d);var p=M("feMergeNode",t),f=M("feMergeNode",t);f.setAttribute("in","SourceGraphic"),d.appendChild(p),d.appendChild(f)}(t,c,a):"contrast"===i?function(t,e,n){var r=D(n[0]);R(t,e,{type:"linear",slope:r,intercept:-.5*r+.5})}(t,c,a):"grayscale"===i?function(t,e,n){var r=D(n[0]);V(t,e,[.2126+.7874*(1-r),.7152-.7152*(1-r),.0722-.0722*(1-r),0,0,.2126-.2126*(1-r),.7152+.2848*(1-r),.0722-.0722*(1-r),0,0,.2126-.2126*(1-r),.7152-.7152*(1-r),.0722+.9278*(1-r),0,0,0,0,0,1,0])}(t,c,a):"sepia"===i?function(t,e,n){var r=D(n[0]);V(t,e,[.393+.607*(1-r),.769-.769*(1-r),.189-.189*(1-r),0,0,.349-.349*(1-r),.686+.314*(1-r),.168-.168*(1-r),0,0,.272-.272*(1-r),.534-.534*(1-r),.131+.869*(1-r),0,0,0,0,0,1,0])}(t,c,a):"saturate"===i?function(t,e,n){var r=D(n[0]),i=M("feColorMatrix",t);i.setAttribute("type","saturate"),i.setAttribute("values","".concat(r)),e.appendChild(i)}(t,c,a):"hue-rotate"===i?function(t,e,n){var r=M("feColorMatrix",t);r.setAttribute("type","hueRotate"),r.setAttribute("values","".concat(n[0].value)),e.appendChild(r)}(t,c,a):"invert"===i&&function(t,e,n){var r=D(n[0]);R(t,e,{type:"table",tableValues:"".concat(r," ").concat(1-r)})}(t,c,a),c.id="".concat(o,"-").concat(r),c.setAttribute("name",o),e.appendChild(c),c.id}));setTimeout((function(){null==r||r.setAttribute("filter",c.map((function(t){return"url(#".concat(t,")")})).join(" "))}))}}function D(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function R(t,e,n){var r=n.type,i=n.slope,o=n.intercept,a=n.tableValues,c=M("feComponentTransfer",t);[M("feFuncR",t),M("feFuncG",t),M("feFuncB",t)].forEach((function(t){t.setAttribute("type",r),"table"===r?t.setAttribute("tableValues","".concat(a)):(t.setAttribute("slope","".concat(i)),t.setAttribute("intercept","".concat(o))),c.appendChild(t)})),e.appendChild(c)}function V(t,e,n){var r=M("feColorMatrix",t);r.setAttribute("type","matrix"),r.setAttribute("values",n.join(" ")),e.appendChild(r)}var N="g-pattern-",$={},U=0;function I(t,n,r,i,o,a,c,s){if(!o)return"";if(!e.isCSSRGB(o)){if(e.isPattern(o)){var l=function(t,n,r,i,o,a){var c=j(i),s=n.querySelector("#".concat(c));if(!s){var l=i.image,u="";if(b(l)?u=l:e.isBrowser&&(l instanceof HTMLImageElement?u=l.src:l instanceof HTMLCanvasElement&&(u=l.toDataURL())),u){var d,p=M("image",t);p.setAttribute("href",u),o?d=o(u):e.isBrowser&&(d=new window.Image),u.match(/^data:/i)||(d.crossOrigin="Anonymous",p.setAttribute("crossorigin","anonymous")),d.src=u;var f=function(){var e=_(t,n,r,i,c,d.width,d.height);n.appendChild(e),e.appendChild(p),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("width","".concat(d.width)),p.setAttribute("height","".concat(d.height))};d.complete?f():d.onload=f}if("rect"===l.nodeName){var h=l.parsedStyle,v=_(t,n,l,i,c,h.width,h.height);l.forEach((function(e){a.createSVGDom(t,e,null);var n=e.elementSVG,r=e.getLocalTransform();a.applyTransform(n.$groupEl,r)})),v.appendChild(l.elementSVG.$groupEl)}}return c}(t,n,r,o,c,s);return i.style[a]="url(#".concat(l,")"),l}if(1===o.length){var u=H(t,r,n,i,o[0]);return null==i||i.setAttribute(a,"url(#".concat(u,")")),u}var d=function(t,e,n,r,i){var o=G+e.entity+"-gradient",a=n.querySelector("#".concat(o));a||((a=M("filter",t)).setAttribute("filterUnits","userSpaceOnUse"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.id=o,n.appendChild(a));var c=0;i.forEach((function(i,s){var l=H(t,e,n,r,i),u=l+"_rect",d=M("rect",t);d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.setAttribute("fill","url(#".concat(l,")")),d.id=u,n.appendChild(d);var p=M("feImage",t);if(p.setAttribute("href","#".concat(u)),p.setAttribute("result","".concat(o,"-").concat(s)),a.appendChild(p),s>0){var f=M("feBlend",t);f.setAttribute("in",1===s?"".concat(o,"-").concat(s-1):"".concat(o,"-blended-").concat(c-1)),f.setAttribute("in2","".concat(o,"-").concat(s)),f.setAttribute("result","".concat(o,"-blended-").concat(c++)),f.setAttribute("mode","multiply"),a.appendChild(f)}}));var s=M("feComposite",t);return s.setAttribute("in","".concat(o,"-blended-").concat(c)),s.setAttribute("in2","SourceGraphic"),s.setAttribute("operator","in"),a.appendChild(s),o}(t,r,n,i,o);return null==i||i.setAttribute("filter","url(#".concat(d,")")),null==i||i.setAttribute("fill","black"),d}return"currentColor"===r.style[a]?null==i||i.setAttribute(a,"currentColor"):null==i||i.setAttribute(a,o.isNone?"none":""+o),""}function j(t,n){void 0===n&&(n={});var r="";if(e.isCSSGradientValue(t)){var o=t.type;if(o===e.GradientType.LinearGradient||o===e.GradientType.RadialGradient){var a=i(i({},t.value),n),c=a.x,s=a.y,l=a.width,u=a.height,d=a.steps,p=a.angle,f=a.cx,h=a.cy,v=a.size;r="gradient-".concat(a.type,"-").concat((null==c?void 0:""+c)||0,"-").concat((null==s?void 0:""+s)||0,"-").concat((null==p?void 0:""+p)||0,"-").concat((null==f?void 0:""+f)||0,"-").concat((null==h?void 0:""+h)||0,"-").concat((null==v?void 0:""+v)||0,"-").concat(l,"-").concat(u,"-").concat(d.map((function(t){var e=t.color;return"".concat(t.offset).concat(e)})).join("-"))}}else e.isPattern(t)&&(r=b(t.image)?"pattern-".concat(t.image,"-").concat(t.repetition):"rect"===t.image.nodeName?"pattern-rect-".concat(t.image.entity):"pattern-".concat(U));return r&&($[r]||($[r]=N+"".concat(U++))),$[r]}function _(t,n,r,i,o,a,c){var l=i.repetition,u=i.transform,d=M("pattern",t);u&&d.setAttribute("patternTransform",function(t){return e.parseTransform(t).map((function(t){var e=t.t,n=t.d;if("translate"===e)return"translate(".concat(n[0].value," ").concat(n[1].value,")");if("translateX"===e)return"translate(".concat(n[0].value," 0)");if("translateY"===e)return"translate(0 ".concat(n[0].value,")");if("rotate"===e)return"rotate(".concat(n[0].value,")");if("scale"===e){var r=(null==n?void 0:n.map((function(t){return t.value})))||[1,1];return"scale(".concat(r[0],", ").concat(r[1],")")}if("scaleX"===e)return r=(null==n?void 0:n.map((function(t){return t.value})))||[1],"scale(".concat(r[0],", 1)");if("scaleY"===e)return r=(null==n?void 0:n.map((function(t){return t.value})))||[1],"scale(1, ".concat(r[0],")");if("skew"===e){var i=(null==n?void 0:n.map((function(t){return t.value})))||[0,0];return"skewX(".concat(i[0],") skewY(").concat(i[1],")")}if("skewZ"===e)return i=(null==n?void 0:n.map((function(t){return t.value})))||[0],"skewX(".concat(i[0],")");if("skewY"===e)return i=(null==n?void 0:n.map((function(t){return t.value})))||[0],"skewY(".concat(i[0],")");if("matrix"===e){var o=s(n.map((function(t){return t.value})),6),a=o[1],c=o[2],l=o[3],u=o[4],d=o[5];return"matrix(".concat(o[0]," ").concat(a," ").concat(c," ").concat(l," ").concat(u," ").concat(d,")")}})).join(" ")}(u)),d.setAttribute("patternUnits","userSpaceOnUse"),d.id=o,n.appendChild(d);var p=r.getGeometryBounds(),f=p.halfExtents,h=p.min;d.setAttribute("x","".concat(h[0])),d.setAttribute("y","".concat(h[1]));var v=a,m=c;return"repeat-x"===l?m=2*f[1]:"repeat-y"===l?v=2*f[0]:"no-repeat"===l&&(v=2*f[0],m=2*f[1]),d.setAttribute("width","".concat(v)),d.setAttribute("height","".concat(m)),d}function H(t,n,r,i,o){var a=n.getGeometryBounds(),c=a&&2*a.halfExtents[0]||0,s=a&&2*a.halfExtents[1]||0,l=a&&a.min||[0,0],u=j(o,{x:l[0],y:l[1],width:c,height:s}),d=r.querySelector("#".concat(u));if(!d){(d=M(o.type===e.GradientType.LinearGradient?"linearGradient":"radialGradient",t)).setAttribute("gradientUnits","userSpaceOnUse");var p="";o.value.steps.sort((function(t,e){return t.offset.value-e.offset.value})).forEach((function(t){var e=t.color;p+='<stop offset="'.concat(t.offset.value/100,'" stop-color="').concat(e,'"></stop>')})),d.innerHTML=p,d.id=u,r.appendChild(d)}if(o.type===e.GradientType.LinearGradient){var f=e.computeLinearGradient([l[0],l[1]],c,s,o.value.angle),h=f.y1,v=f.x2,m=f.y2;d.setAttribute("x1","".concat(f.x1)),d.setAttribute("y1","".concat(h)),d.setAttribute("x2","".concat(v)),d.setAttribute("y2","".concat(m))}else{var g=o.value,y=e.computeRadialGradient([l[0],l[1]],c,s,g.cx,g.cy,g.size),b=y.y,E=y.r;d.setAttribute("cx","".concat(y.x)),d.setAttribute("cy","".concat(b)),d.setAttribute("r","".concat(E))}return u}var F=/url\("?#(.*)\)/,B=function(){function t(t){this.context=t,this.gradientCache={}}return t.prototype.getDefElement=function(){return this.$def},t.prototype.init=function(){var t=this.context.config.document,e=this.context.contextService.getContext();this.$def=M("defs",t),e.appendChild(this.$def)},t.prototype.clear=function(t){var e=this;Object.keys(this.gradientCache).forEach((function(n){e.clearUnusedDefElement(e.gradientCache,n,t)}))},t.prototype.clearUnusedDefElement=function(t,e,n){if(t[e]&&1===t[e].size&&t[e].has(n)){var r=this.$def.querySelector("#".concat(e));r&&this.$def.removeChild(r)}},t.prototype.createOrUpdateGradientAndPattern=function(t,n,r,i,o){var a=this.context.config,c=a.document,s=a.createImage;if(n){var l=(e.isPattern(r)?n.style[i]:n.getAttribute(i)||"").match(F);l&&l.length>1&&this.clearUnusedDefElement(this.gradientCache,l[1].replace('"',""),t.entity);var u=I(c||document,this.$def,t,n,r,i,s,o);u&&(this.gradientCache[u]||(this.gradientCache[u]=new Set),this.gradientCache[u].add(t.entity))}},t.prototype.createOrUpdateShadow=function(t,e,n){!function(t,e,n,r,i){var o=n.parsedStyle,a=o.shadowType,c=void 0===a?"outer":a,s=o.shadowBlur,l=o.shadowColor,u=o.shadowOffsetX,d=o.shadowOffsetY,p=!m(l)&&s>0,f="g-filter-dropshadow-"+n.entity,h=e.querySelector("#".concat(f));if(h&&(h.getAttribute("data-type")===c&&p||(h.remove(),h=null)),p){if(null==r||r.setAttribute("filter","url(#".concat(f,")")),!h){if((h=M("filter",t)).setAttribute("data-type",c),"outer"===c)(O=M("feDropShadow",t)).setAttribute("dx","".concat((u||0)/2)),O.setAttribute("dy","".concat((d||0)/2)),O.setAttribute("stdDeviation","".concat((s||0)/4)),O.setAttribute("flood-color",""+l),h.appendChild(O);else if("inner"===c){var v=M("feComponentTransfer",t);v.setAttribute("in","SourceAlpha");var g=M("feFuncA",t);g.setAttribute("type","table"),g.setAttribute("tableValues","1 0"),v.appendChild(g),h.appendChild(v),(x=M("feGaussianBlur",t)).setAttribute("stdDeviation","".concat((s||0)/4)),h.appendChild(x),(C=M("feOffset",t)).setAttribute("dx","".concat((u||0)/2)),C.setAttribute("dy","".concat((d||0)/2)),C.setAttribute("result","offsetblur"),h.appendChild(C),(w=M("feFlood",t)).setAttribute("flood-color",""+l),w.setAttribute("result","color"),h.appendChild(w);var y=M("feComposite",t);y.setAttribute("in2","offsetblur"),y.setAttribute("operator","in"),h.appendChild(y);var b=M("feComposite",t);b.setAttribute("in2","SourceAlpha"),b.setAttribute("operator","in"),h.appendChild(b);var E=M("feMerge",t);h.appendChild(E);var A=M("feMergeNode",t);A.setAttribute("in","SourceGraphic");var S=M("feMergeNode",t);E.appendChild(A),E.appendChild(S)}return h.id=f,h.setAttribute("filterUnits","userSpaceOnUse"),void e.appendChild(h)}if("inner"===c){var x=h.children[1],C=h.children[2],w=h.children[3];"shadowColor"===i?w.setAttribute("flood-color",""+l):"shadowBlur"===i?x.setAttribute("stdDeviation","".concat((s||0)/4)):"shadowOffsetX"===i?C.setAttribute("dx","".concat((u||0)/2)):"shadowOffsetY"===i&&C.setAttribute("dy","".concat((d||0)/2))}else if("outer"===c){var O=h.children[0];"shadowColor"===i?O.setAttribute("flood-color",""+l):"shadowBlur"===i?O.setAttribute("stdDeviation","".concat((s||0)/4)):"shadowOffsetX"===i?O.setAttribute("dx","".concat((u||0)/2)):"shadowOffsetY"===i&&O.setAttribute("dy","".concat((d||0)/2))}}else null==r||r.removeAttribute("filter")}(this.context.config.document||document,this.$def,t,e,n)},t.prototype.createOrUpdateFilter=function(t,e,n){P(this.context.config.document||document,this.$def,t,e,n)},t}();function W(t){return t.toFixed(6).replace(".000000","")}function z(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&amp;":"<"===t?"&lt;":">"===t?"&gt;":'"'===t?"&quot;":"&apos;"}))}var X,Y,q={opacity:"opacity",fillStyle:"fill",fill:"fill",fillRule:"fill-rule",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",textPath:"text-path",r:"r",cx:"cx",cy:"cy",rx:"rx",ry:"ry",x:"x",y:"y",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML",textAlign:"text-anchor",pointerEvents:"pointer-events"},Q={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},Z={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",fillRule:"nonzero",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit",pointerEvents:"auto",transform:"matrix(1,0,0,1,0,0)"},J="g-svg",K="clip-path-",tt="text-path-",et=function(){function t(t,e,n){this.pluginOptions=t,this.defElementManager=e,this.context=n,this.svgElementMap=new WeakMap,this.renderQueue=[],this.dirtyAttributes=new WeakMap,this.pendingReorderQueue=new Set,this.clipPathUseMap=new WeakMap}return t.prototype.apply=function(n){var r=this,i=n.renderingService,o=n.renderingContext;this.context=n,this.context.svgElementMap=this.svgElementMap;var a=o.root.ownerDocument.defaultView,c=this.context.config.document,s=function(t){var e=t.target;if(r.clipPathUseMap.get(e)){var n=r.defElementManager.getDefElement().querySelector("#".concat(r.getId(e)));n&&n.remove()}r.createSVGDom(c,e,r.$camera)},l=function(t){var e=t.target;r.defElementManager.clear(e.entity),r.clipPathUseMap.delete(e),r.removeSVGDom(e)},u=function(t){var e,n,i=t.parentNode,o=null===(n=null===(e=t.parentNode)||void 0===e?void 0:e.elementSVG)||void 0===n?void 0:n.$groupEl,a=((null==i?void 0:i.children)||[]).slice();o&&r.reorderChildren(c,o,a)},d=function(t){u(t.target)},p=function(t){var e=t.target;if(e.elementSVG){var n=t.attrName,i=r.dirtyAttributes.get(e);i||(r.dirtyAttributes.set(e,[]),i=r.dirtyAttributes.get(e)),i.push(n)}},f=function(t){var n=t.target;(n.nodeName===e.Shape.FRAGMENT?n.childNodes:[n]).forEach((function(t){var n,i=null===(n=t.elementSVG)||void 0===n?void 0:n.$el,o=t.parsedStyle,a=o.fill,c=o.stroke,s=o.clipPath;if(a&&!e.isCSSRGB(a)&&r.defElementManager.createOrUpdateGradientAndPattern(t,i,a,"fill",r),c&&!e.isCSSRGB(c)&&r.defElementManager.createOrUpdateGradientAndPattern(t,i,c,"stroke",r),s){var l=x(S(),t.getWorldTransform()),u=K+s.entity+"-"+t.entity,d=r.defElementManager.getDefElement().querySelector("#".concat(u));d&&r.applyTransform(d,l)}}))};i.hooks.init.tap(t.tag,(function(){var t=r.context.config,n=t.background,i=t.document;r.defElementManager.init();var o=r.context.contextService.getContext();n&&(o.style.background=n),o.setAttribute("color-interpolation-filters","sRGB"),r.$camera=M("g",i),r.$camera.id="".concat(J,"-camera"),r.applyTransform(r.$camera,r.context.camera.getOrthoMatrix()),o.appendChild(r.$camera),a.addEventListener(e.ElementEvent.MOUNTED,s),a.addEventListener(e.ElementEvent.UNMOUNTED,l),a.addEventListener(e.ElementEvent.REPARENT,d),a.addEventListener(e.ElementEvent.ATTR_MODIFIED,p),a.addEventListener(e.ElementEvent.BOUNDS_CHANGED,f)})),i.hooks.destroy.tap(t.tag,(function(){a.removeEventListener(e.ElementEvent.MOUNTED,s),a.removeEventListener(e.ElementEvent.UNMOUNTED,l),a.removeEventListener(e.ElementEvent.REPARENT,d),a.removeEventListener(e.ElementEvent.ATTR_MODIFIED,p),a.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,f),U=0,$={}})),i.hooks.render.tap(t.tag,(function(t){r.renderQueue.push(t)})),i.hooks.beginFrame.tap(t.tag,(function(){var t=r.context.config.document;r.pendingReorderQueue.size&&(r.pendingReorderQueue.forEach((function(e){var n,i=((null==e?void 0:e.children)||[]).slice(),o=null===(n=null==e?void 0:e.elementSVG)||void 0===n?void 0:n.$groupEl;o&&r.reorderChildren(t||c,o,i||[])})),r.pendingReorderQueue.clear())})),i.hooks.endFrame.tap(t.tag,(function(){o.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&r.applyTransform(r.$camera,r.context.camera.getOrthoMatrix()),r.renderQueue.forEach((function(t){var e,n,i=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,o=null===(n=t.elementSVG)||void 0===n?void 0:n.$groupEl;if(i&&o){var a=t.getLocalTransform();r.applyTransform(o,a);var c=r.clipPathUseMap.get(t);c&&c.length&&c.forEach((function(e){r.applyTransform(e,t.getWorldTransform())})),t.renderable.dirty=!1}var s=r.dirtyAttributes.get(t);s&&(s.forEach((function(e){"zIndex"===e?u(t):"increasedLineWidthForHitTesting"===e&&r.createOrUpdateHitArea(t,i,o),r.updateAttribute(t,[e])})),r.dirtyAttributes.delete(t))})),r.renderQueue=[]}))},t.prototype.getId=function(t){return t.id||"".concat(J,"-").concat(t.entity)},t.prototype.reorderChildren=function(t,e,n){if(n.sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})),n.length){var r=(t||document).createDocumentFragment();n.forEach((function(t){if(t.isConnected){var e=t.elementSVG.$groupEl;e&&r.appendChild(e)}})),e.appendChild(r)}},t.prototype.applyTransform=function(t,e){var n="matrix(".concat(W(e[0]),",").concat(W(e[1]),",").concat(W(e[4]),",").concat(W(e[5]),",").concat(W(e[12]),",").concat(W(e[13]),")");n!==t.getAttribute("transform")&&t.setAttribute("transform",n),n===Z.transform&&t.removeAttribute("transform")},t.prototype.applyAttributes=function(t){var n=t.elementSVG,r=null==n?void 0:n.$el;if(r&&(null==n?void 0:n.$groupEl)){var i=t.nodeName,o=t.attributes;i!==e.Shape.HTML&&r.setAttribute("fill","none"),i===e.Shape.IMAGE&&r.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(o))}},t.prototype.updateAttribute=function(t,n){var r=this,i=this.context.config.document,o=t.elementSVG,a=o.$el,c=o.$hitTestingEl,s=t.parsedStyle,l=t.nodeName;n.some((function(e){return r.context.SVGElementLifeCycleContribution.shouldUpdateElementAttribute(t,e)}))&&a&&[a,c].forEach((function(e){e&&r.context.SVGElementLifeCycleContribution.updateElementAttribute(t,e,r.svgElementMap)})),n.forEach((function(n){var o,u,d=q[n],p=s[n],f=!m(p)&&""+p,h=(null===(o=Q[n])||void 0===o?void 0:o[f])||f,v=s[n],g=d&&!!(null===(u=e.propertyMetadataCache[n])||void 0===u?void 0:u.inh);if(l===e.Shape.HTML)"fill"===n?a.style.background=""+v:"stroke"===n?(a.style["border-color"]=""+v,a.style["border-style"]="solid"):"lineWidth"===n?a.style["border-width"]="".concat(v||0,"px"):"lineDash"===n?a.style["border-style"]="dashed":"innerHTML"===n?r.createOrUpdateInnerHTML(i,a,v):"width"===n||"height"===n||"class"===n?a.setAttribute(n,""+v):m(t.style[n])||""===t.style[n]||(a.style[n]=t.style[n]);else{if(!d||(l===e.Shape.GROUP||t.isCustomElement)&&(g||"fill"===d||"stroke"===d))return;"fill"===n||"stroke"===n?r.defElementManager.createOrUpdateGradientAndPattern(t,a,v,d,r):"clipPath"===n?r.createOrUpdateClipOrTextPath(i,v,t):"textPath"===n?r.createOrUpdateClipOrTextPath(i,v,t,!0):"shadowType"===n||"shadowColor"===n||"shadowBlur"===n||"shadowOffsetX"===n||"shadowOffsetY"===n?r.defElementManager.createOrUpdateShadow(t,a,n):"filter"===n?r.defElementManager.createOrUpdateFilter(t,a,v):m(p)||[a,c].forEach((function(t){t&&d&&("unset"!==f&&f!==Z[n]?t.setAttribute(d,h):t.removeAttribute(d))}))}}))},t.prototype.createSVGDom=function(t,n,r,i){var o;void 0===i&&(i=!1),n.elementSVG=new C;var a=n.elementSVG,c=this.context.SVGElementLifeCycleContribution.createElement(n,this.svgElementMap);if(c){var s=void 0;n.nodeName===e.Shape.HTML&&(n.parsedStyle.$el=c),this.pluginOptions.outputSVGElementId&&(c.id=this.getId(n)),this.pluginOptions.outputSVGElementName&&n.name&&c.setAttribute("name",n.name),!c.hasAttribute("data-wrapgroup")&&"g"===c.nodeName||i?s=c:(s=M("g",t)).appendChild(c),a.$el=c,a.$groupEl=s,this.applyAttributes(n),this.createOrUpdateHitArea(n,c,s);var l=r||n.parentNode&&(null===(o=n.parentNode.elementSVG)||void 0===o?void 0:o.$groupEl);l&&(l.appendChild(s),this.pendingReorderQueue.add(n.parentNode))}},t.prototype.removeSVGDom=function(t){var e,n=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;n&&n.parentNode&&(n.parentNode.removeChild(n),this.context.SVGElementLifeCycleContribution.destroyElement(t,n))},t.prototype.createOrUpdateHitArea=function(t,e,n){var r=t.elementSVG,i=r.$hitTestingEl,o=Number(t.parsedStyle.increasedLineWidthForHitTesting);if(o){if(!i){i=e.cloneNode(),["filter"].forEach((function(t){i.removeAttribute(t)}));var a="none"!==e.getAttribute("fill");i.setAttribute("fill",a?"transparent":"none"),i.setAttribute("stroke","transparent"),n.appendChild(i),r.$hitTestingEl=i,this.svgElementMap.set(i,t)}i.setAttribute("stroke-width","".concat(o+t.parsedStyle.lineWidth))}else i&&(n.removeChild(i),r.$hitTestingEl=null)},t.prototype.createOrUpdateInnerHTML=function(t,e,n){var r=(t||document).createElement("div");"string"==typeof n?r.innerHTML=n:r.appendChild(n),e.innerHTML="",e.appendChild(r)},t.prototype.createOrUpdateClipOrTextPath=function(t,e,n,r){void 0===r&&(r=!1);var i=n.elementSVG.$groupEl,o=r?"g":"clipPath",a=r?"text-path":"clip-path";if(e){var c=(r?tt:K)+e.entity+"-"+n.entity,s=this.defElementManager.getDefElement();if(!s.querySelector("#".concat(c))){var l=void 0;if(r)this.createSVGDom(t,e,null,!0),l=e.elementSVG.$el;else{if(!e.isConnected)s.querySelector("#".concat(this.getId(e)))||this.createSVGDom(t,e,s,!0);l=M(o,t);var u=M("use",t);u.setAttribute("href","#".concat(e.elementSVG.$el.id)),l.appendChild(u);var d=this.clipPathUseMap.get(e);d||(this.clipPathUseMap.set(e,[]),d=this.clipPathUseMap.get(e)),d.push(u),this.applyTransform(u,e.getWorldTransform());var p=x(S(),n.getWorldTransform());this.applyTransform(l,p)}this.pluginOptions.outputSVGElementId&&(l.id=c),s.appendChild(l)}this.applyAttributes(e),r||i.setAttribute(a,"url(#".concat(c,")"))}else r||i.removeAttribute(a)},t.tag="SVGRenderer",t}(),nt={top:"hanging",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"};function rt(t,e,n,r){n.getBounds();var i=e.lineWidth,o=void 0===i?1:i,a=e.x,c=void 0===a?0:a,s=e.y,l=void 0===s?0:s,u=e.dx,d=void 0===u?0:u,p=e.dy,f=void 0===p?0:p,h=e.textPath,v=e.textPathSide,m=void 0===v?"left":v,g=e.textPathStartOffset,y=void 0===g?0:g,b=e.textDecorationLine,E=void 0===b?"":b,A=e.textDecorationColor,S=void 0===A?"":A,x=e.textDecorationStyle,C=void 0===x?"":x,w=e.metrics,O=e.textBaseline,T=void 0===O?"alphabetic":O;"alphabetic"===T&&(T="bottom"),t.setAttribute("dominant-baseline",nt[T]),t.setAttribute("paint-order","stroke");var k=w.lines,L=w.lineHeight,G=w.height,P=k.length,D="";if(0===d&&0===f||(D+="transform:translate(".concat(d,"px, ").concat(f,"px);")),E&&"none"!==E&&(D+="text-decoration:".concat(E," ").concat(C," ").concat(S,";")),D&&t.setAttribute("style",D),0!==c&&t.setAttribute("x","".concat(c)),0!==l&&t.setAttribute("y","".concat(l)),1===P){var R=z(k[0]);if(t.setAttribute("dx","".concat(o/2)),"bottom"!==T&&"top"!==T||(t.setAttribute("dominant-baseline",nt.middle),t.setAttribute("dy","bottom"===T?"-".concat(G/2,"px"):"".concat(G/2,"px"))),h){t.innerHTML="";var V=M("textPath",t.ownerDocument);V.setAttribute("href","#".concat(tt+h.entity)),"left"!==m&&V.setAttribute("side",m),0!==y&&V.setAttribute("startOffset","".concat(y)),V.innerHTML=R,t.appendChild(V)}else t.innerHTML=R}else t.innerHTML=k.map((function(t,e){var n=o/2,r=0;return 0===e?"middle"===T?r=L/2-G/2:"top"===T||"hanging"===T?r=0:"bottom"!==T&&"ideographic"!==T||(r=-L*(P-1)):r=L,"<tspan x=".concat(c,' dx="').concat(n,'" dy="').concat(r,'">').concat(z(t),"</tspan>")})).join("")}var it=((X={})[e.Shape.RECT]="path",X[e.Shape.CIRCLE]="circle",X[e.Shape.ELLIPSE]="ellipse",X[e.Shape.IMAGE]="image",X[e.Shape.GROUP]="g",X[e.Shape.LINE]="line",X[e.Shape.POLYLINE]="polyline",X[e.Shape.POLYGON]="polygon",X[e.Shape.TEXT]="text",X[e.Shape.PATH]="path",X[e.Shape.HTML]="foreignObject",X),ot=((Y={})[e.Shape.CIRCLE]=["cx","cy","r"],Y[e.Shape.ELLIPSE]=["cx","cy","rx","ry"],Y[e.Shape.RECT]=["x","y","width","height","radius"],Y[e.Shape.IMAGE]=["x","y","src","width","height"],Y[e.Shape.LINE]=["x1","y1","x2","y2","markerStart","markerEnd","markerStartOffset","markerEndOffset"],Y[e.Shape.POLYLINE]=["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],Y[e.Shape.POLYGON]=["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],Y[e.Shape.PATH]=["d","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],Y[e.Shape.TEXT]=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","maxLines","leading","textBaseline","textAlign","textTransform","textOverflow","textPath","textPathSide","textPathStartOffset","textDecorationLine","textDecorationColor","textDecorationStyle","dx","dy"],Y),at=function(){function t(t,e){this.context=t,this.runtime=e}return t.prototype.createElement=function(t,e){var n=M(it[t.nodeName]||"g",this.context.config.document||document);return e.set(n,t),n},t.prototype.destroyElement=function(t,e){},t.prototype.shouldUpdateElementAttribute=function(t,e){return(ot[t.nodeName]||[]).indexOf(e)>-1},t.prototype.updateElementAttribute=function(t){var n=t.elementSVG.$el,r=t.parsedStyle;switch(t.nodeName){case e.Shape.IMAGE:w(n,r);break;case e.Shape.RECT:L(n,r);break;case e.Shape.LINE:O(n,r);break;case e.Shape.POLYGON:case e.Shape.POLYLINE:k(n,r);break;case e.Shape.PATH:T(n,r);break;case e.Shape.TEXT:rt(n,r,t)}},t}(),ct=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n.options=e,n.name="svg-renderer",n}return r(e,t),e.prototype.init=function(t){var e=this.options,n=e.outputSVGElementId,r=e.outputSVGElementName,i=new B(this.context),o=new at(this.context,t);this.context.defaultElementLifeCycleContribution=o,this.context.SVGElementLifeCycleContribution=o;var a={outputSVGElementId:!!m(n)||!!n,outputSVGElementName:!!m(r)||!!r};this.addRenderingPlugin(new et(a,i,this.context))},e.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultElementLifeCycleContribution,delete this.context.SVGElementLifeCycleContribution},e}(e.AbstractRendererPlugin),st=Object.freeze({__proto__:null,CLIP_PATH_PREFIX:K,DEFAULT_VALUE_MAP:Z,DefaultElementLifeCycleContribution:at,ElementSVG:C,G_SVG_PREFIX:J,Plugin:ct,SHAPE2TAGS:it,SHAPE_UPDATE_DEPS:ot,SVGRendererPlugin:et,SVG_ATTR_MAP:q,TEXT_PATH_PREFIX:tt,createSVGElement:M,updateImageElementAttribute:w,updateLineElementAttribute:O,updatePathElementAttribute:T,updatePolylineElementAttribute:k,updateRectElementAttribute:L,updateTextElementAttribute:rt}),lt=function(){function t(t){this.context=t,this.canvasConfig=t.config}return t.prototype.init=function(){var t=this.canvasConfig,n=t.container,r=t.document,i=t.devicePixelRatio;if(this.$container=b(n)?(r||document).getElementById(n):n,this.$container){this.$container.style.position||(this.$container.style.position="relative");var o=M("svg",r);o.setAttribute("width","".concat(this.canvasConfig.width)),o.setAttribute("height","".concat(this.canvasConfig.height)),this.$container.appendChild(o),this.$namespace=o}var a=i||e.isBrowser&&window.devicePixelRatio||1;this.dpr=a=1>a?1:Math.ceil(a)},t.prototype.getDomElement=function(){return this.$namespace},t.prototype.getContext=function(){return this.$namespace},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)},t.prototype.resize=function(t,e){this.$namespace&&(this.$namespace.setAttribute("width","".concat(t)),this.$namespace.setAttribute("height","".concat(e)))},t.prototype.applyCursorStyle=function(t){this.$container&&(this.$container.style.cursor=t)},t.prototype.generateCSSText=function(t,e,n,r,i){void 0===i&&(i={});var a=r.duration,c=r.easing,s=r.delay,l=r.direction,u=r.iterations,d=r.fill;return"@keyframes ".concat(t,"{").concat(n.map((function(t){var e=t.computedOffset,n=o(t,["offset","composite","computedOffset","easing"]),r=Object.keys(n).map((function(t){return"".concat(t,":").concat(i[t]||"").concat(n[t],";")})).join("");return"".concat(100*e,"%{").concat(r,"}")})).join(""),"}")+"".concat(e," {animation: ").concat(t," ").concat(a,"ms ").concat(c," ").concat(s,"ms ").concat(u===1/0?"infinite":u," ").concat(l," ").concat(d,";}")},t.prototype.toDataURL=function(){return a(this,arguments,void 0,(function(t){var n,r,i,a,s,l,u=this;return c(this,(function(t){return n=this.$namespace.cloneNode(!0),r=this.canvasConfig.document,i=0,a=null,this.context.renderingContext.root.forEach((function(t){var c=t.getAnimations();if(c.length){a||(a=(r||document).createElement("style"),n.appendChild(a));var s=t.elementSVG,l="#".concat(s.$el.id),d="#".concat(s.$groupEl.id),p="",f="";c.forEach((function(t){var n=t.effect.getKeyframes();if(n.length){var r=[],a=[],c=n[0],h=o(c,["offset","composite","computedOffset","easing","transformOrigin"]);if(Object.keys(h).forEach((function(t){var n;"transform"===t&&a.push(t),!!(null===(n=e.propertyMetadataCache[t])||void 0===n?void 0:n.inh)?a.push(t):"transform"!==t&&r.push(t)})),a.length){var v=n.map((function(t){var e=t.offset,n=t.composite,r=t.computedOffset,i=t.easing,c=o(t,["offset","composite","computedOffset","easing","transformOrigin"]),s={offset:e,composite:n,computedOffset:r,easing:i};return Object.keys(c).forEach((function(e){a.includes(e)&&(s[e]=t[e])})),s}));f+=u.generateCSSText("a".concat(i++),d,v,t.effect.getComputedTiming(),{transform:s.$groupEl.getAttribute("transform")})}if(r.length){var m=n.map((function(t){var e=t.offset,n=t.composite,i=t.computedOffset,a=t.easing,c=o(t,["offset","composite","computedOffset","easing","transformOrigin"]),s={offset:e,composite:n,computedOffset:i,easing:a};return Object.keys(c).forEach((function(e){r.includes(e)&&(s[e]=t[e])})),s}));p+=u.generateCSSText("a".concat(i++),l,m,t.effect.getComputedTiming())}}})),a.textContent+=p+f}})),s=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),(l=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",s)).replaceChild(n,l.documentElement),[2,"data:image/svg+xml;charset=utf8,".concat(encodeURIComponent((new XMLSerializer).serializeToString(l)))]}))}))},t}(),ut=function(t){function e(){var e=t.apply(this,l([],s(arguments),!1))||this;return e.name="svg-context-register",e}return r(e,t),e.prototype.init=function(){this.context.ContextService=lt},e.prototype.destroy=function(){delete this.context.ContextService},e}(e.AbstractRendererPlugin),dt=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.registerPlugin(new ut),n.registerPlugin(new ct({outputSVGElementId:e.outputSVGElementId})),n.registerPlugin(new d),n.registerPlugin(new h),n}return r(e,t),e}(e.AbstractRenderer);t.DomInteraction=p,t.Renderer=dt,t.SVGPicker=v,t.SVGRenderer=st}));
1
+ /*!
2
+ * @antv/g-svg
3
+ * @description A renderer implemented by SVG
4
+ * @version 2.0.14
5
+ * @date 10/23/2024, 7:15:43 AM
6
+ * @author AntVis
7
+ * @docs https://g.antv.antgroup.com/
8
+ */
9
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.SVG={}),t.window.G)}(this,(function(t,e){"use strict";
10
+ /*!
11
+ * @antv/g-plugin-dom-interaction
12
+ * @description A G plugin
13
+ * @version 2.1.1
14
+ * @date 10/23/2024, 7:13:54 AM
15
+ * @author AntVis
16
+ * @docs https://g.antv.antgroup.com/
17
+ */class r{apply(t,e){var n=t.renderingService,i=t.renderingContext,a=t.config;this.context=t;var o=i.root.ownerDocument.defaultView,c=t=>{n.hooks.pointerMove.call(t)},s=t=>{n.hooks.pointerUp.call(t)},l=t=>{n.hooks.pointerDown.call(t)},u=t=>{n.hooks.pointerOver.call(t)},d=t=>{n.hooks.pointerOut.call(t)},h=t=>{n.hooks.pointerCancel.call(t)},p=t=>{n.hooks.pointerWheel.call(t)},f=t=>{n.hooks.click.call(t)};n.hooks.init.tap(r.tag,(()=>{var t=this.context.contextService.getDomElement();e.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="none",t.style.msTouchAction="none"):o.supportsPointerEvents&&(t.style.touchAction="none"),o.supportsPointerEvents?(t=>{e.globalThis.document.addEventListener("pointermove",c,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("pointerleave",d,!0),t.addEventListener("pointerover",u,!0),e.globalThis.addEventListener("pointerup",s,!0),e.globalThis.addEventListener("pointercancel",h,!0)})(t):(t=>{e.globalThis.document.addEventListener("mousemove",c,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("mouseout",d,!0),t.addEventListener("mouseover",u,!0),e.globalThis.addEventListener("mouseup",s,!0)})(t),o.supportsTouchEvents&&(t=>{t.addEventListener("touchstart",l,!0),t.addEventListener("touchend",s,!0),t.addEventListener("touchmove",c,!0),t.addEventListener("touchcancel",h,!0)})(t),a.useNativeClickEvent&&t.addEventListener("click",f,!0),t.addEventListener("wheel",p,{passive:!0,capture:!0})})),n.hooks.destroy.tap(r.tag,(()=>{var t=this.context.contextService.getDomElement();e.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):o.supportsPointerEvents&&(t.style.touchAction=""),o.supportsPointerEvents?(t=>{e.globalThis.document.removeEventListener("pointermove",c,!0),t.removeEventListener("pointerdown",l,!0),t.removeEventListener("pointerleave",d,!0),t.removeEventListener("pointerover",u,!0),e.globalThis.removeEventListener("pointerup",s,!0),e.globalThis.removeEventListener("pointercancel",h,!0)})(t):(t=>{e.globalThis.document.removeEventListener("mousemove",c,!0),t.removeEventListener("mousedown",l,!0),t.removeEventListener("mouseout",d,!0),t.removeEventListener("mouseover",u,!0),e.globalThis.removeEventListener("mouseup",s,!0)})(t),o.supportsTouchEvents&&(t=>{t.removeEventListener("touchstart",l,!0),t.removeEventListener("touchend",s,!0),t.removeEventListener("touchmove",c,!0),t.removeEventListener("touchcancel",h,!0)})(t),a.useNativeClickEvent&&t.removeEventListener("click",f,!0),t.removeEventListener("wheel",p,!0)}))}}r.tag="DOMInteraction";let n=class extends e.AbstractRendererPlugin{constructor(){super(...arguments),this.name="dom-interaction"}init(){this.addRenderingPlugin(new r)}destroy(){this.removeAllRenderingPlugins()}};var i=Object.freeze({__proto__:null,Plugin:n});function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);e>r;r++)n[r]=t[r];return n}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var a=Object.create((e&&e.prototype instanceof b?e:b).prototype),o=new M(n||[]);return i(a,"_invoke",{value:k(t,r,o)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var f="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function E(){}function A(){}var S={};d(S,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(D([])));w&&w!==r&&n.call(w,o)&&(S=w);var C=A.prototype=b.prototype=Object.create(S);function O(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(i,a,o,s){var l=p(t[i],t,a);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==c(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(d).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function k(e,r,n){var i=f;return function(a,o){if(i===m)throw Error("Generator is already running");if(i===g){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var c=n.delegate;if(c){var s=T(c,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var l=p(e,r,n);if("normal"===l.type){if(i=n.done?g:v,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=g,n.method="throw",n.arg=l.arg)}}}function T(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=p(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function G(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(c(e)+" is not iterable")}return E.prototype=A,i(C,"constructor",{value:A,configurable:!0}),i(A,"constructor",{value:E,configurable:!0}),E.displayName=d(A,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===E||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,d(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(L.prototype),d(L.prototype,l,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new L(h(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},O(C),d(C,u,"Generator"),d(C,o,(function(){return this})),d(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(G),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return c.type="throw",c.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],c=o.completion;if("root"===o.tryLoc)return i("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(o.catchLoc>this.prev)return i(o.catchLoc,!0);if(o.finallyLoc>this.prev)return i(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return i(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var a=i;break}}a&&("break"===t||"continue"===t)&&e>=a.tryLoc&&a.finallyLoc>=e&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),G(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;G(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function l(t,e,r,n,i,a,o){try{var c=t[a](o),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){l(a,n,i,o,c,"next",t)}function c(t){l(a,n,i,o,c,"throw",t)}o(void 0)}))}}
18
+ /*!
19
+ * @antv/g-plugin-svg-picker
20
+ * @description A G plugin for picking in SVG
21
+ * @version 2.0.14
22
+ * @date 10/23/2024, 7:15:14 AM
23
+ * @author AntVis
24
+ * @docs https://g.antv.antgroup.com/
25
+ */class d{apply(t,e){var r=this,n=t.config.document,i=t.renderingService,a=t.svgElementMap;i.hooks.pick.tapPromise(d.tag,function(){var t=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(a,n,e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),i.hooks.pickSync.tap(d.tag,(t=>this.pick(a,n,t)))}pick(t,e,r){var n=r.topmost,i=r.position,a=i.clientX,c=i.clientY;try{var s,l=[],u=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=o(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){s=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(s)throw a}}}}((e||document).elementsFromPoint(a,c));try{for(u.s();!(s=u.n()).done;){var d=s.value;if(d.shadowRoot&&d.shadowRoot!==e)return this.pick(t,d.shadowRoot,r);var h=t.get(d);if(h&&h.isInteractive()&&(l.push(h),n))return r.picked=l,r}}catch(t){u.e(t)}finally{u.f()}r.picked=l}catch(t){r.picked=[]}return r}}d.tag="SVGPicker";let h=class extends e.AbstractRendererPlugin{constructor(){super(...arguments),this.name="svg-picker"}init(){this.addRenderingPlugin(new d)}destroy(){this.removeAllRenderingPlugins()}};var p=Object.freeze({__proto__:null,Plugin:h}),f=function(t){return null==t},v={}.toString,m=function(t,e){return v.call(t)==="[object "+e+"]"},g=function(t){return m(t,"String")},y=function(t,e,r){return e>t?e:t>r?r:t},b="undefined"!=typeof Float32Array?Float32Array:Array;function E(){var t=new b(16);return b!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function A(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],c=e[5],s=e[6],l=e[7],u=e[8],d=e[9],h=e[10],p=e[11],f=e[12],v=e[13],m=e[14],g=e[15],y=r*c-n*o,b=r*s-i*o,E=r*l-a*o,A=n*s-i*c,S=n*l-a*c,x=i*l-a*s,w=u*v-d*f,C=u*m-h*f,O=u*g-p*f,L=d*m-h*v,k=d*g-p*v,T=h*g-p*m,P=y*T-b*k+E*L+A*O-S*C+x*w;return P?(t[0]=(c*T-s*k+l*L)*(P=1/P),t[1]=(i*k-n*T-a*L)*P,t[2]=(v*x-m*S+g*A)*P,t[3]=(h*S-d*x-p*A)*P,t[4]=(s*O-o*T-l*C)*P,t[5]=(r*T-i*O+a*C)*P,t[6]=(m*E-f*x-g*b)*P,t[7]=(u*x-h*E+p*b)*P,t[8]=(o*k-c*O+l*w)*P,t[9]=(n*O-r*k-a*w)*P,t[10]=(f*S-v*E+g*y)*P,t[11]=(d*E-u*S-p*y)*P,t[12]=(c*C-o*L-s*w)*P,t[13]=(r*L-n*C+i*w)*P,t[14]=(v*b-f*A-m*y)*P,t[15]=(u*A-d*b+h*y)*P,t):null}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){l=!0,i=t}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return c}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}function w(t,e,r){return(e=x(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function O(t){for(var e=1;arguments.length>e;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach((function(e){w(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}
26
+ /*!
27
+ * @antv/g-plugin-svg-renderer
28
+ * @description A G plugin of renderer implementation with SVG
29
+ * @version 2.1.1
30
+ * @date 10/23/2024, 7:14:23 AM
31
+ * @author AntVis
32
+ * @docs https://g.antv.antgroup.com/
33
+ */Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});class L{}function k(t,e){var r=e.src,n=void 0===r?"":r,i=e.x,a=e.y,o=void 0===a?0:a,c=e.width,s=e.height;if(t.setAttribute("x","".concat(void 0===i?0:i)),t.setAttribute("y","".concat(o)),g(n))t.setAttribute("href",n);else if(n instanceof Image)c||t.setAttribute("width","".concat(n.width)),s||t.setAttribute("height","".concat(n.height)),t.setAttribute("href",n.src);else if(n instanceof HTMLElement&&g(n.nodeName)&&"CANVAS"===n.nodeName.toUpperCase())t.setAttribute("href",n.toDataURL());else if(n instanceof ImageData){var l=document.createElement("canvas");l.setAttribute("width","".concat(n.width)),l.setAttribute("height","".concat(n.height));var u=l.getContext("2d");u&&(u.putImageData(n,0,0),c||t.setAttribute("width","".concat(n.width)),s||t.setAttribute("height","".concat(n.height)),t.setAttribute("href",l.toDataURL()))}}function T(t,r){var n=r.x1,i=r.y1,a=r.x2,o=r.y2,c=r.markerStart,s=r.markerEnd,l=r.markerStartOffset,u=r.markerEndOffset,d=0,h=0,p=0,f=0,v=0;c&&e.isDisplayObject(c)&&l&&(d=Math.cos(v=Math.atan2(o-i,a-n))*(l||0),h=Math.sin(v)*(l||0)),s&&e.isDisplayObject(s)&&u&&(p=Math.cos(v=Math.atan2(i-o,n-a))*(u||0),f=Math.sin(v)*(u||0)),t.setAttribute("x1","".concat(n+d)),t.setAttribute("y1","".concat(i+h)),t.setAttribute("x2","".concat(a+p)),t.setAttribute("y2","".concat(o+f))}function P(t,r){var n=r.d,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,c=r.markerEndOffset,s=0,l=0,u=0,d=0,h=0;if(i&&e.isDisplayObject(i)&&o){var p=S(i.parentNode.getStartTangent(),2),f=p[0],v=p[1];s=Math.cos(h=Math.atan2(f[1]-v[1],f[0]-v[0]))*(o||0),l=Math.sin(h)*(o||0)}if(a&&e.isDisplayObject(a)&&c){var m=S(a.parentNode.getEndTangent(),2),g=m[0],y=m[1];u=Math.cos(h=Math.atan2(g[1]-y[1],g[0]-y[0]))*(c||0),d=Math.sin(h)*(c||0)}t.setAttribute("d",e.translatePathToString(n.absolutePath,s,l,u,d))}function G(t,r){var n=r.points.points,i=r.markerStart,a=r.markerStartOffset,o=r.markerEnd,c=r.markerEndOffset,s=n.length;if(n&&s>=2){var l=0,u=0,d=0,h=0,p=0;i&&e.isDisplayObject(i)&&a&&(l=Math.cos(p=Math.atan2(n[1][1]-n[0][1],n[1][0]-n[0][0]))*(a||0),u=Math.sin(p)*(a||0)),o&&e.isDisplayObject(o)&&c&&(d=Math.cos(p=Math.atan2(n[s-2][1]-n[s-1][1],n[s-2][0]-n[s-1][0]))*(c||0),h=Math.sin(p)*(c||0)),t.setAttribute("points",n.map(((t,e)=>{var r=0,n=0;return 0===e?(r=l,n=u):e===s-1&&(r=d,n=h),"".concat(t[0]+r,",").concat(t[1]+n)})).join(" "))}}function M(t,e){var r=e.radius,n=e.x,i=void 0===n?0:n,a=e.y,o=void 0===a?0:a,c=e.width,s=e.height;if(isFinite(c)&&isFinite(s)){var l="";if(r&&r.some((t=>0!==t))){var u=S(r.map((t=>y(t,0,Math.min(Math.abs(c)/2,Math.abs(s)/2)))),4),d=u[0],h=u[1],p=u[2],f=u[3],v=c>0?1:-1,m=s>0?1:-1,g=v+m!==0?1:0;l=[["M ".concat(v*d+i,",").concat(o)],["l ".concat(c-v*(d+h),",0")],["a ".concat(h,",").concat(h,",0,0,").concat(g,",").concat(v*h,",").concat(m*h)],["l 0,".concat(s-m*(h+p))],["a ".concat(p,",").concat(p,",0,0,").concat(g,",").concat(-v*p,",").concat(m*p)],["l ".concat(v*(p+f)-c,",0")],["a ".concat(f,",").concat(f,",0,0,").concat(g,",").concat(-v*f,",").concat(-m*f)],["l 0,".concat(m*(f+d)-s)],["a ".concat(d,",").concat(d,",0,0,").concat(g,",").concat(v*d,",").concat(-m*d)],["z"]].join(" ")}else l="M ".concat(i,",").concat(o," l ").concat(c,",0 l 0,").concat(s," l").concat(-c," 0 z");t.setAttribute("d",l)}}function D(t,e){return(e||document).createElementNS("http://www.w3.org/2000/svg",t)}L.tag="c-svg-element";var N="g-filter-";function R(t,e,r,n,i){var a=N+r.entity,o=e.querySelectorAll("[name=".concat(a,"]"));if(o.length&&o.forEach((t=>{e.removeChild(t)})),0===i.length)null==n||n.removeAttribute("filter");else{var c=i.map(((r,n)=>{var i=r.name,o=r.params,c=D("filter",t);return c.setAttribute("filterUnits","userSpaceOnUse"),"blur"===i?function(t,e,r){var n=D("feGaussianBlur",t);n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation","".concat(r[0].value)),e.appendChild(n)}(t,c,o):"brightness"===i?function(t,e,r){var n=V(r[0]);j(t,e,{type:"linear",slope:n,intercept:0})}(t,c,o):"drop-shadow"===i?function(t,e,r){var n=r[0].value,i=r[1].value,a=r[2].value,o=r[3].formatted,c=D("feGaussianBlur",t);c.setAttribute("in","SourceAlpha"),c.setAttribute("stdDeviation","".concat(a)),e.appendChild(c);var s=D("feOffset",t);s.setAttribute("dx","".concat(n)),s.setAttribute("dy","".concat(i)),s.setAttribute("result","offsetblur"),e.appendChild(s);var l=D("feFlood",t);l.setAttribute("flood-color",o),e.appendChild(l);var u=D("feComposite",t);u.setAttribute("in2","offsetblur"),u.setAttribute("operator","in"),e.appendChild(u);var d=D("feMerge",t);e.appendChild(d);var h=D("feMergeNode",t),p=D("feMergeNode",t);p.setAttribute("in","SourceGraphic"),d.appendChild(h),d.appendChild(p)}(t,c,o):"contrast"===i?function(t,e,r){var n=V(r[0]);j(t,e,{type:"linear",slope:n,intercept:-.5*n+.5})}(t,c,o):"grayscale"===i?function(t,e,r){var n=V(r[0]);$(t,e,[.2126+.7874*(1-n),.7152-.7152*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152+.2848*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152-.7152*(1-n),.0722+.9278*(1-n),0,0,0,0,0,1,0])}(t,c,o):"sepia"===i?function(t,e,r){var n=V(r[0]);$(t,e,[.393+.607*(1-n),.769-.769*(1-n),.189-.189*(1-n),0,0,.349-.349*(1-n),.686+.314*(1-n),.168-.168*(1-n),0,0,.272-.272*(1-n),.534-.534*(1-n),.131+.869*(1-n),0,0,0,0,0,1,0])}(t,c,o):"saturate"===i?function(t,e,r){var n=V(r[0]),i=D("feColorMatrix",t);i.setAttribute("type","saturate"),i.setAttribute("values","".concat(n)),e.appendChild(i)}(t,c,o):"hue-rotate"===i?function(t,e,r){var n=D("feColorMatrix",t);n.setAttribute("type","hueRotate"),n.setAttribute("values","".concat(r[0].value)),e.appendChild(n)}(t,c,o):"invert"===i&&function(t,e,r){var n=V(r[0]);j(t,e,{type:"table",tableValues:"".concat(n," ").concat(1-n)})}(t,c,o),c.id="".concat(a,"-").concat(n),c.setAttribute("name",a),e.appendChild(c),c.id}));setTimeout((()=>{null==n||n.setAttribute("filter",c.map((t=>"url(#".concat(t,")"))).join(" "))}))}}function V(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function j(t,e,r){var n=r.type,i=r.slope,a=r.intercept,o=r.tableValues,c=D("feComponentTransfer",t);[D("feFuncR",t),D("feFuncG",t),D("feFuncB",t)].forEach((t=>{t.setAttribute("type",n),"table"===n?t.setAttribute("tableValues","".concat(o)):(t.setAttribute("slope","".concat(i)),t.setAttribute("intercept","".concat(a))),c.appendChild(t)})),e.appendChild(c)}function $(t,e,r){var n=D("feColorMatrix",t);n.setAttribute("type","matrix"),n.setAttribute("values",r.join(" ")),e.appendChild(n)}var U="g-pattern-",I={},_=0;function H(t,r,n,i,a,o,c,s){if(!a)return"";if(!e.isCSSRGB(a)){if(e.isPattern(a)){var l=function(t,r,n,i,a,o){var c=F(i),s=r.querySelector("#".concat(c));if(!s){var l=i.image,u="";if(g(l)?u=l:e.isBrowser&&(l instanceof HTMLImageElement?u=l.src:l instanceof HTMLCanvasElement&&(u=l.toDataURL())),u){var d,h=D("image",t);h.setAttribute("href",u),a?d=a(u):e.isBrowser&&(d=new window.Image),u.match(/^data:/i)||(d.crossOrigin="Anonymous",h.setAttribute("crossorigin","anonymous")),d.src=u;var p=function(){var e=B(t,r,n,i,c,d.width,d.height);r.appendChild(e),e.appendChild(h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width","".concat(d.width)),h.setAttribute("height","".concat(d.height))};d.complete?p():d.onload=p}if("rect"===l.nodeName){var f=l.parsedStyle,v=B(t,r,l,i,c,f.width,f.height);l.forEach((e=>{o.createSVGDom(t,e,null);var r=e.elementSVG,n=e.getLocalTransform();o.applyTransform(r.$groupEl,n)})),v.appendChild(l.elementSVG.$groupEl)}}return c}(t,r,n,a,c,s);return i.style[o]="url(#".concat(l,")"),l}if(1===a.length){var u=W(t,n,r,i,a[0]);return null==i||i.setAttribute(o,"url(#".concat(u,")")),u}var d=function(t,e,r,n,i){var a="".concat(N+e.entity,"-gradient"),o=r.querySelector("#".concat(a));o||((o=D("filter",t)).setAttribute("filterUnits","userSpaceOnUse"),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.id=a,r.appendChild(o));var c=0;i.forEach(((i,s)=>{var l=W(t,e,r,n,i),u="".concat(l,"_rect"),d=D("rect",t);d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.setAttribute("fill","url(#".concat(l,")")),d.id=u,r.appendChild(d);var h=D("feImage",t);if(h.setAttribute("href","#".concat(u)),h.setAttribute("result","".concat(a,"-").concat(s)),o.appendChild(h),s>0){var p=D("feBlend",t);p.setAttribute("in",1===s?"".concat(a,"-").concat(s-1):"".concat(a,"-blended-").concat(c-1)),p.setAttribute("in2","".concat(a,"-").concat(s)),p.setAttribute("result","".concat(a,"-blended-").concat(c++)),p.setAttribute("mode","multiply"),o.appendChild(p)}}));var s=D("feComposite",t);return s.setAttribute("in","".concat(a,"-blended-").concat(c)),s.setAttribute("in2","SourceGraphic"),s.setAttribute("operator","in"),o.appendChild(s),a}(t,n,r,i,a);return null==i||i.setAttribute("filter","url(#".concat(d,")")),null==i||i.setAttribute("fill","black"),d}return"currentColor"===n.style[o]?null==i||i.setAttribute(o,"currentColor"):null==i||i.setAttribute(o,a.isNone?"none":""+a),""}function F(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="";if(e.isCSSGradientValue(t)){var i=t.type;if(i===e.GradientType.LinearGradient||i===e.GradientType.RadialGradient){var a=O(O({},t.value),r),o=a.x,c=a.y,s=a.width,l=a.height,u=a.steps,d=a.angle,h=a.cx,p=a.cy,f=a.size;n="gradient-".concat(a.type,"-").concat((null==o?void 0:""+o)||0,"-").concat((null==c?void 0:""+c)||0,"-").concat((null==d?void 0:""+d)||0,"-").concat((null==h?void 0:""+h)||0,"-").concat((null==p?void 0:""+p)||0,"-").concat((null==f?void 0:""+f)||0,"-").concat(s,"-").concat(l,"-").concat(u.map((t=>{var e=t.color;return"".concat(t.offset).concat(e)})).join("-"))}}else e.isPattern(t)&&(n=g(t.image)?"pattern-".concat(t.image,"-").concat(t.repetition):"rect"===t.image.nodeName?"pattern-rect-".concat(t.image.entity):"pattern-".concat(_));return n&&(I[n]||(I[n]="".concat(U).concat(_++))),I[n]}function B(t,r,n,i,a,o,c){var s=i.repetition,l=i.transform,u=D("pattern",t);l&&u.setAttribute("patternTransform",function(t){return e.parseTransform(t).map((t=>{var e=t.t,r=t.d;if("translate"===e)return"translate(".concat(r[0].value," ").concat(r[1].value,")");if("translateX"===e)return"translate(".concat(r[0].value," 0)");if("translateY"===e)return"translate(0 ".concat(r[0].value,")");if("rotate"===e)return"rotate(".concat(r[0].value,")");if("scale"===e){var n=(null==r?void 0:r.map((t=>t.value)))||[1,1];return"scale(".concat(n[0],", ").concat(n[1],")")}if("scaleX"===e){var i=(null==r?void 0:r.map((t=>t.value)))||[1];return"scale(".concat(i[0],", 1)")}if("scaleY"===e){var a=(null==r?void 0:r.map((t=>t.value)))||[1];return"scale(1, ".concat(a[0],")")}if("skew"===e){var o=(null==r?void 0:r.map((t=>t.value)))||[0,0];return"skewX(".concat(o[0],") skewY(").concat(o[1],")")}if("skewZ"===e){var c=(null==r?void 0:r.map((t=>t.value)))||[0];return"skewX(".concat(c[0],")")}if("skewY"===e){var s=(null==r?void 0:r.map((t=>t.value)))||[0];return"skewY(".concat(s[0],")")}if("matrix"===e){var l=S(r.map((t=>t.value)),6),u=l[1],d=l[2],h=l[3],p=l[4],f=l[5];return"matrix(".concat(l[0]," ").concat(u," ").concat(d," ").concat(h," ").concat(p," ").concat(f,")")}return null})).filter((t=>null!==t)).join(" ")}(l)),u.setAttribute("patternUnits","userSpaceOnUse"),u.id=a,r.appendChild(u);var d=n.getGeometryBounds(),h=d.halfExtents,p=d.min;u.setAttribute("x","".concat(p[0])),u.setAttribute("y","".concat(p[1]));var f=o,v=c;return"repeat-x"===s?v=2*h[1]:"repeat-y"===s?f=2*h[0]:"no-repeat"===s&&(f=2*h[0],v=2*h[1]),u.setAttribute("width","".concat(f)),u.setAttribute("height","".concat(v)),u}function W(t,r,n,i,a){var o=r.getGeometryBounds(),c=o&&2*o.halfExtents[0]||0,s=o&&2*o.halfExtents[1]||0,l=o&&o.min||[0,0],u=F(a,{x:l[0],y:l[1],width:c,height:s}),d=n.querySelector("#".concat(u));if(!d){(d=D(a.type===e.GradientType.LinearGradient?"linearGradient":"radialGradient",t)).setAttribute("gradientUnits","userSpaceOnUse");var h="";a.value.steps.sort(((t,e)=>t.offset.value-e.offset.value)).forEach((t=>{var e=t.color;h+='<stop offset="'.concat(t.offset.value/100,'" stop-color="').concat(e,'"></stop>')})),d.innerHTML=h,d.id=u,n.appendChild(d)}if(a.type===e.GradientType.LinearGradient){var p=e.computeLinearGradient([l[0],l[1]],c,s,a.value.angle),f=p.y1,v=p.x2,m=p.y2;d.setAttribute("x1","".concat(p.x1)),d.setAttribute("y1","".concat(f)),d.setAttribute("x2","".concat(v)),d.setAttribute("y2","".concat(m))}else{var g=a.value,y=e.computeRadialGradient([l[0],l[1]],c,s,g.cx,g.cy,g.size),b=y.y,E=y.r;d.setAttribute("cx","".concat(y.x)),d.setAttribute("cy","".concat(b)),d.setAttribute("r","".concat(E))}return u}var Y=/url\("?#(.*)\)/;class z{constructor(t){this.gradientCache={},this.context=t}getDefElement(){return this.$def}init(){var t=this.context.config.document,e=this.context.contextService.getContext();this.$def=D("defs",t),e.appendChild(this.$def)}clear(t){Object.keys(this.gradientCache).forEach((e=>{this.clearUnusedDefElement(this.gradientCache,e,t)}))}clearUnusedDefElement(t,e,r){if(t[e]&&1===t[e].size&&t[e].has(r)){var n=this.$def.querySelector("#".concat(e));n&&this.$def.removeChild(n)}}createOrUpdateGradientAndPattern(t,r,n,i,a){var o=this.context.config,c=o.document,s=o.createImage;if(r){var l=(e.isPattern(n)?r.style[i]:r.getAttribute(i)||"").match(Y);l&&l.length>1&&this.clearUnusedDefElement(this.gradientCache,l[1].replace('"',""),t.entity);var u=H(c||document,this.$def,t,r,n,i,s,a);u&&(this.gradientCache[u]||(this.gradientCache[u]=new Set),this.gradientCache[u].add(t.entity))}}createOrUpdateShadow(t,e,r){!function(t,e,r,n,i){var a=r.parsedStyle,o=a.shadowType,c=void 0===o?"outer":o,s=a.shadowBlur,l=a.shadowColor,u=a.shadowOffsetX,d=a.shadowOffsetY,h=!f(l)&&s>0,p="g-filter-dropshadow-"+r.entity,v=e.querySelector("#".concat(p));if(v&&(v.getAttribute("data-type")===c&&h||(v.remove(),v=null)),h){if(null==n||n.setAttribute("filter","url(#".concat(p,")")),!v){if((v=D("filter",t)).setAttribute("data-type",c),"outer"===c){var m=D("feDropShadow",t);m.setAttribute("dx","".concat((u||0)/2)),m.setAttribute("dy","".concat((d||0)/2)),m.setAttribute("stdDeviation","".concat((s||0)/4)),m.setAttribute("flood-color",""+l),v.appendChild(m)}else if("inner"===c){var g=D("feComponentTransfer",t);g.setAttribute("in","SourceAlpha");var y=D("feFuncA",t);y.setAttribute("type","table"),y.setAttribute("tableValues","1 0"),g.appendChild(y),v.appendChild(g);var b=D("feGaussianBlur",t);b.setAttribute("stdDeviation","".concat((s||0)/4)),v.appendChild(b);var E=D("feOffset",t);E.setAttribute("dx","".concat((u||0)/2)),E.setAttribute("dy","".concat((d||0)/2)),E.setAttribute("result","offsetblur"),v.appendChild(E);var A=D("feFlood",t);A.setAttribute("flood-color",""+l),A.setAttribute("result","color"),v.appendChild(A);var S=D("feComposite",t);S.setAttribute("in2","offsetblur"),S.setAttribute("operator","in"),v.appendChild(S);var x=D("feComposite",t);x.setAttribute("in2","SourceAlpha"),x.setAttribute("operator","in"),v.appendChild(x);var w=D("feMerge",t);v.appendChild(w);var C=D("feMergeNode",t);C.setAttribute("in","SourceGraphic");var O=D("feMergeNode",t);w.appendChild(C),w.appendChild(O)}return v.id=p,v.setAttribute("filterUnits","userSpaceOnUse"),void e.appendChild(v)}if("inner"===c){var L=v.children[1],k=v.children[2];"shadowColor"===i?v.children[3].setAttribute("flood-color",""+l):"shadowBlur"===i?L.setAttribute("stdDeviation","".concat((s||0)/4)):"shadowOffsetX"===i?k.setAttribute("dx","".concat((u||0)/2)):"shadowOffsetY"===i&&k.setAttribute("dy","".concat((d||0)/2))}else if("outer"===c){var T=v.children[0];"shadowColor"===i?T.setAttribute("flood-color",""+l):"shadowBlur"===i?T.setAttribute("stdDeviation","".concat((s||0)/4)):"shadowOffsetX"===i?T.setAttribute("dx","".concat((u||0)/2)):"shadowOffsetY"===i&&T.setAttribute("dy","".concat((d||0)/2))}}else null==n||n.removeAttribute("filter")}(this.context.config.document||document,this.$def,t,e,r)}createOrUpdateFilter(t,e,r){R(this.context.config.document||document,this.$def,t,e,r)}}function X(t){return t.toFixed(6).replace(".000000","")}function q(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&amp;":"<"===t?"&lt;":">"===t?"&gt;":'"'===t?"&quot;":"&apos;"}))}var Q={opacity:"opacity",fillStyle:"fill",fill:"fill",fillRule:"fill-rule",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",textPath:"text-path",r:"r",cx:"cx",cy:"cy",rx:"rx",ry:"ry",x:"x",y:"y",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML",textAlign:"text-anchor",pointerEvents:"pointer-events"},Z={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},J={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",fillRule:"nonzero",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit",pointerEvents:"auto",transform:"matrix(1,0,0,1,0,0)"},K="g-svg",tt="clip-path-",et="text-path-";class rt{constructor(t,e,r){this.svgElementMap=new WeakMap,this.renderQueue=[],this.dirtyAttributes=new WeakMap,this.pendingReorderQueue=new Set,this.clipPathUseMap=new WeakMap,this.pluginOptions=t,this.defElementManager=e,this.context=r}apply(t){var r=t.renderingService,n=t.renderingContext;this.context=t,this.context.svgElementMap=this.svgElementMap;var i=n.root.ownerDocument.defaultView,a=this.context.config.document,o=t=>{var e=t.target;if(this.clipPathUseMap.get(e)){var r=this.defElementManager.getDefElement().querySelector("#".concat(this.getId(e)));r&&r.remove()}this.createSVGDom(a,e,this.$camera)},c=t=>{var e=t.target;this.defElementManager.clear(e.entity),this.clipPathUseMap.delete(e),this.removeSVGDom(e)},s=t=>{var e,r=t.parentNode,n=null===(e=t.parentNode)||void 0===e||null===(e=e.elementSVG)||void 0===e?void 0:e.$groupEl,i=((null==r?void 0:r.children)||[]).slice();n&&this.reorderChildren(a,n,i)},l=t=>{s(t.target)},u=t=>{var e=t.target;if(e.elementSVG){var r=t.attrName,n=this.dirtyAttributes.get(e);n||(this.dirtyAttributes.set(e,[]),n=this.dirtyAttributes.get(e)),n.push(r)}},d=t=>{var r=t.target;(r.nodeName===e.Shape.FRAGMENT?r.childNodes:[r]).forEach((t=>{var r,n=null===(r=t.elementSVG)||void 0===r?void 0:r.$el,i=t.parsedStyle,a=i.fill,o=i.stroke,c=i.clipPath;if(a&&!e.isCSSRGB(a)&&this.defElementManager.createOrUpdateGradientAndPattern(t,n,a,"fill",this),o&&!e.isCSSRGB(o)&&this.defElementManager.createOrUpdateGradientAndPattern(t,n,o,"stroke",this),c){var s=A(E(),t.getWorldTransform()),l="".concat(tt+c.entity,"-").concat(t.entity),u=this.defElementManager.getDefElement().querySelector("#".concat(l));u&&this.applyTransform(u,s)}}))};r.hooks.init.tap(rt.tag,(()=>{var t=this.context.config,r=t.background,n=t.document;this.defElementManager.init();var a=this.context.contextService.getContext();r&&(a.style.background=r),a.setAttribute("color-interpolation-filters","sRGB"),this.$camera=D("g",n),this.$camera.id="".concat(K,"-camera"),this.applyTransform(this.$camera,this.context.camera.getOrthoMatrix()),a.appendChild(this.$camera),i.addEventListener(e.ElementEvent.MOUNTED,o),i.addEventListener(e.ElementEvent.UNMOUNTED,c),i.addEventListener(e.ElementEvent.REPARENT,l),i.addEventListener(e.ElementEvent.ATTR_MODIFIED,u),i.addEventListener(e.ElementEvent.BOUNDS_CHANGED,d)})),r.hooks.destroy.tap(rt.tag,(()=>{i.removeEventListener(e.ElementEvent.MOUNTED,o),i.removeEventListener(e.ElementEvent.UNMOUNTED,c),i.removeEventListener(e.ElementEvent.REPARENT,l),i.removeEventListener(e.ElementEvent.ATTR_MODIFIED,u),i.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,d),_=0,I={}})),r.hooks.render.tap(rt.tag,(t=>{this.renderQueue.push(t)})),r.hooks.beginFrame.tap(rt.tag,(()=>{var t=this.context.config.document;this.pendingReorderQueue.size&&(this.pendingReorderQueue.forEach((e=>{var r,n=((null==e?void 0:e.children)||[]).slice(),i=null==e||null===(r=e.elementSVG)||void 0===r?void 0:r.$groupEl;i&&this.reorderChildren(t||a,i,n||[])})),this.pendingReorderQueue.clear())})),r.hooks.endFrame.tap(rt.tag,(()=>{n.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&this.applyTransform(this.$camera,this.context.camera.getOrthoMatrix()),this.renderQueue.forEach((t=>{var e,r,n=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,i=null===(r=t.elementSVG)||void 0===r?void 0:r.$groupEl;if(n&&i){var a=t.getLocalTransform();this.applyTransform(i,a);var o=this.clipPathUseMap.get(t);o&&o.length&&o.forEach((e=>{this.applyTransform(e,t.getWorldTransform())})),t.renderable.dirty=!1}var c=this.dirtyAttributes.get(t);c&&(c.forEach((e=>{"zIndex"===e?s(t):"increasedLineWidthForHitTesting"===e&&this.createOrUpdateHitArea(t,n,i),this.updateAttribute(t,[e])})),this.dirtyAttributes.delete(t))})),this.renderQueue=[]}))}getId(t){return t.id||"".concat(K,"-").concat(t.entity)}reorderChildren(t,e,r){if(r.sort(((t,e)=>t.sortable.renderOrder-e.sortable.renderOrder)),r.length){var n=(t||document).createDocumentFragment();r.forEach((t=>{if(t.isConnected){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)}})),e.appendChild(n)}}applyTransform(t,e){var r="matrix(".concat(X(e[0]),",").concat(X(e[1]),",").concat(X(e[4]),",").concat(X(e[5]),",").concat(X(e[12]),",").concat(X(e[13]),")");r!==t.getAttribute("transform")&&t.setAttribute("transform",r),r===J.transform&&t.removeAttribute("transform")}applyAttributes(t){var r=t.elementSVG,n=null==r?void 0:r.$el;if(n&&(null==r?void 0:r.$groupEl)){var i=t.nodeName,a=t.attributes;i!==e.Shape.HTML&&n.setAttribute("fill","none"),i===e.Shape.IMAGE&&n.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(a))}}updateAttribute(t,r){var n=this.context.config.document,i=t.elementSVG,a=i.$el,o=i.$hitTestingEl,c=t.parsedStyle,s=t.nodeName;r.some((e=>this.context.SVGElementLifeCycleContribution.shouldUpdateElementAttribute(t,e)))&&a&&[a,o].forEach((e=>{e&&this.context.SVGElementLifeCycleContribution.updateElementAttribute(t,e,this.svgElementMap)})),r.forEach((r=>{var i,l,u=Q[r],d=c[r],h=!f(d)&&""+d,p=(null===(i=Z[r])||void 0===i?void 0:i[h])||h,v=c[r],m=u&&!(null===(l=e.propertyMetadataCache[r])||void 0===l||!l.inh);if(s===e.Shape.HTML)"fill"===r?a.style.background=""+v:"stroke"===r?(a.style["border-color"]=""+v,a.style["border-style"]="solid"):"lineWidth"===r?a.style["border-width"]="".concat(v||0,"px"):"lineDash"===r?a.style["border-style"]="dashed":"innerHTML"===r?this.createOrUpdateInnerHTML(n,a,v):"width"===r||"height"===r||"class"===r?a.setAttribute(r,""+v):f(t.style[r])||""===t.style[r]||(a.style[r]=t.style[r]);else{if(!u||(s===e.Shape.GROUP||t.isCustomElement)&&(m||"fill"===u||"stroke"===u))return;"fill"===r||"stroke"===r?this.defElementManager.createOrUpdateGradientAndPattern(t,a,v,u,this):"clipPath"===r?this.createOrUpdateClipOrTextPath(n,v,t):"textPath"===r?this.createOrUpdateClipOrTextPath(n,v,t,!0):"shadowType"===r||"shadowColor"===r||"shadowBlur"===r||"shadowOffsetX"===r||"shadowOffsetY"===r?this.defElementManager.createOrUpdateShadow(t,a,r):"filter"===r?this.defElementManager.createOrUpdateFilter(t,a,v):f(d)||[a,o].forEach((t=>{t&&u&&("unset"!==h&&h!==J[r]?t.setAttribute(u,p):t.removeAttribute(u))}))}}))}createSVGDom(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];r.elementSVG=new L;var a=r.elementSVG,o=this.context.SVGElementLifeCycleContribution.createElement(r,this.svgElementMap);if(o){var c,s;r.nodeName===e.Shape.HTML&&(r.parsedStyle.$el=o),this.pluginOptions.outputSVGElementId&&(o.id=this.getId(r)),this.pluginOptions.outputSVGElementName&&r.name&&o.setAttribute("name",r.name),!o.hasAttribute("data-wrapgroup")&&"g"===o.nodeName||i?s=o:(s=D("g",t)).appendChild(o),a.$el=o,a.$groupEl=s,this.applyAttributes(r),this.createOrUpdateHitArea(r,o,s);var l=n||r.parentNode&&(null===(c=r.parentNode.elementSVG)||void 0===c?void 0:c.$groupEl);l&&(l.appendChild(s),this.pendingReorderQueue.add(r.parentNode))}}removeSVGDom(t){var e,r=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;r&&r.parentNode&&(r.parentNode.removeChild(r),this.context.SVGElementLifeCycleContribution.destroyElement(t,r))}createOrUpdateHitArea(t,e,r){var n=t.elementSVG,i=n.$hitTestingEl,a=Number(t.parsedStyle.increasedLineWidthForHitTesting);if(a){if(!i){i=e.cloneNode(),["filter"].forEach((t=>{i.removeAttribute(t)}));var o="none"!==e.getAttribute("fill");i.setAttribute("fill",o?"transparent":"none"),i.setAttribute("stroke","transparent"),r.appendChild(i),n.$hitTestingEl=i,this.svgElementMap.set(i,t)}i.setAttribute("stroke-width","".concat(a+t.parsedStyle.lineWidth))}else i&&(r.removeChild(i),n.$hitTestingEl=null)}createOrUpdateInnerHTML(t,e,r){var n=(t||document).createElement("div");"string"==typeof r?n.innerHTML=r:n.appendChild(r),e.innerHTML="",e.appendChild(n)}createOrUpdateClipOrTextPath(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=r.elementSVG.$groupEl,a=n?"g":"clipPath",o=n?"text-path":"clip-path";if(e){var c="".concat((n?et:tt)+e.entity,"-").concat(r.entity),s=this.defElementManager.getDefElement();if(!s.querySelector("#".concat(c))){var l;if(n)this.createSVGDom(t,e,null,!0),l=e.elementSVG.$el;else{if(!e.isConnected)s.querySelector("#".concat(this.getId(e)))||this.createSVGDom(t,e,s,!0);l=D(a,t);var u=D("use",t);u.setAttribute("href","#".concat(e.elementSVG.$el.id)),l.appendChild(u);var d=this.clipPathUseMap.get(e);d||(this.clipPathUseMap.set(e,[]),d=this.clipPathUseMap.get(e)),d.push(u),this.applyTransform(u,e.getWorldTransform());var h=A(E(),r.getWorldTransform());this.applyTransform(l,h)}this.pluginOptions.outputSVGElementId&&(l.id=c),s.appendChild(l)}this.applyAttributes(e),n||i.setAttribute(o,"url(#".concat(c,")"))}else n||i.removeAttribute(o)}}rt.tag="SVGRenderer";var nt={top:"hanging",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"};function it(t,e,r,n){r.getBounds();var i=e.lineWidth,a=void 0===i?1:i,o=e.x,c=void 0===o?0:o,s=e.y,l=void 0===s?0:s,u=e.dx,d=void 0===u?0:u,h=e.dy,p=void 0===h?0:h,f=e.textPath,v=e.textPathSide,m=void 0===v?"left":v,g=e.textPathStartOffset,y=void 0===g?0:g,b=e.textDecorationLine,E=void 0===b?"":b,A=e.textDecorationColor,S=void 0===A?"":A,x=e.textDecorationStyle,w=void 0===x?"":x,C=e.metrics,O=e.textBaseline,L=void 0===O?"alphabetic":O;"alphabetic"===L&&(L="bottom"),t.setAttribute("dominant-baseline",nt[L]),t.setAttribute("paint-order","stroke");var k=C.lines,T=C.lineHeight,P=C.height,G=k.length,M="";if(0===d&&0===p||(M+="transform:translate(".concat(d,"px, ").concat(p,"px);")),E&&"none"!==E&&(M+="text-decoration:".concat(E," ").concat(w," ").concat(S,";")),M&&t.setAttribute("style",M),0!==c&&t.setAttribute("x","".concat(c)),0!==l&&t.setAttribute("y","".concat(l)),1===G){var N=q(k[0]);if(t.setAttribute("dx","".concat(a/2)),"bottom"!==L&&"top"!==L||(t.setAttribute("dominant-baseline",nt.middle),t.setAttribute("dy","bottom"===L?"-".concat(P/2,"px"):"".concat(P/2,"px"))),f){t.innerHTML="";var R=D("textPath",t.ownerDocument);R.setAttribute("href","#".concat(et+f.entity)),"left"!==m&&R.setAttribute("side",m),0!==y&&R.setAttribute("startOffset","".concat(y)),R.innerHTML=N,t.appendChild(R)}else t.innerHTML=N}else t.innerHTML=k.map(((t,e)=>{var r=a/2,n=0;return 0===e?"middle"===L?n=T/2-P/2:"top"===L||"hanging"===L?n=0:"bottom"!==L&&"ideographic"!==L||(n=-T*(G-1)):n=T,"<tspan x=".concat(c,' dx="').concat(r,'" dy="').concat(n,'">').concat(q(t),"</tspan>")})).join("")}var at={[e.Shape.RECT]:"path",[e.Shape.CIRCLE]:"circle",[e.Shape.ELLIPSE]:"ellipse",[e.Shape.IMAGE]:"image",[e.Shape.GROUP]:"g",[e.Shape.LINE]:"line",[e.Shape.POLYLINE]:"polyline",[e.Shape.POLYGON]:"polygon",[e.Shape.TEXT]:"text",[e.Shape.PATH]:"path",[e.Shape.HTML]:"foreignObject"},ot={[e.Shape.CIRCLE]:["cx","cy","r"],[e.Shape.ELLIPSE]:["cx","cy","rx","ry"],[e.Shape.RECT]:["x","y","width","height","radius"],[e.Shape.IMAGE]:["x","y","src","width","height"],[e.Shape.LINE]:["x1","y1","x2","y2","markerStart","markerEnd","markerStartOffset","markerEndOffset"],[e.Shape.POLYLINE]:["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],[e.Shape.POLYGON]:["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],[e.Shape.PATH]:["d","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],[e.Shape.TEXT]:["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","maxLines","leading","textBaseline","textAlign","textTransform","textOverflow","textPath","textPathSide","textPathStartOffset","textDecorationLine","textDecorationColor","textDecorationStyle","dx","dy"]};class ct{constructor(t,e){this.context=t,this.runtime=e}createElement(t,e){var r=D(at[t.nodeName]||"g",this.context.config.document||document);return e.set(r,t),r}destroyElement(t,e){}shouldUpdateElementAttribute(t,e){return(ot[t.nodeName]||[]).indexOf(e)>-1}updateElementAttribute(t){var r=t.elementSVG.$el,n=t.parsedStyle;switch(t.nodeName){case e.Shape.IMAGE:k(r,n);break;case e.Shape.RECT:M(r,n);break;case e.Shape.LINE:T(r,n);break;case e.Shape.POLYGON:case e.Shape.POLYLINE:G(r,n);break;case e.Shape.PATH:P(r,n);break;case e.Shape.TEXT:it(r,n,t)}}}class st extends e.AbstractRendererPlugin{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.name="svg-renderer",this.options=t}init(t){var e=this.options,r=e.outputSVGElementId,n=e.outputSVGElementName,i=new z(this.context),a=new ct(this.context,t);this.context.defaultElementLifeCycleContribution=a,this.context.SVGElementLifeCycleContribution=a;var o={outputSVGElementId:!!f(r)||!!r,outputSVGElementName:!!f(n)||!!n};this.addRenderingPlugin(new rt(o,i,this.context))}destroy(){this.removeAllRenderingPlugins(),delete this.context.defaultElementLifeCycleContribution,delete this.context.SVGElementLifeCycleContribution}}var lt=Object.freeze({__proto__:null,CLIP_PATH_PREFIX:tt,DEFAULT_VALUE_MAP:J,DefaultElementLifeCycleContribution:ct,ElementSVG:L,G_SVG_PREFIX:K,Plugin:st,SHAPE2TAGS:at,SHAPE_UPDATE_DEPS:ot,SVGRendererPlugin:rt,SVG_ATTR_MAP:Q,TEXT_PATH_PREFIX:et,createSVGElement:D,updateImageElementAttribute:k,updateLineElementAttribute:T,updatePathElementAttribute:P,updatePolylineElementAttribute:G,updateRectElementAttribute:M,updateTextElementAttribute:it});function ut(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;a.length>n;n++)e.includes(r=a[n])||{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var dt=["offset","composite","computedOffset","easing"],ht=["offset","composite","computedOffset","easing","transformOrigin"],pt=["offset","composite","computedOffset","easing","transformOrigin"],ft=["offset","composite","computedOffset","easing","transformOrigin"];class vt{constructor(t){this.context=t,this.canvasConfig=t.config}init(){var t=this.canvasConfig,r=t.container,n=t.document,i=t.devicePixelRatio;if(this.$container=g(r)?(n||document).getElementById(r):r,this.$container){this.$container.style.position||(this.$container.style.position="relative");var a=D("svg",n);a.setAttribute("width","".concat(this.canvasConfig.width)),a.setAttribute("height","".concat(this.canvasConfig.height)),this.$container.appendChild(a),this.$namespace=a}var o=i||e.isBrowser&&window.devicePixelRatio||1;this.dpr=o=1>o?1:Math.ceil(o)}getDomElement(){return this.$namespace}getContext(){return this.$namespace}getDPR(){return this.dpr}getBoundingClientRect(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()}destroy(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)}resize(t,e){this.$namespace&&(this.$namespace.setAttribute("width","".concat(t)),this.$namespace.setAttribute("height","".concat(e)))}applyCursorStyle(t){this.$container&&(this.$container.style.cursor=t)}generateCSSText(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=n.duration,o=n.easing,c=n.delay,s=n.direction,l=n.iterations,u=n.fill;return"@keyframes ".concat(t,"{").concat(r.map((t=>{var e=t.computedOffset,r=ut(t,dt),n=Object.keys(r).map((t=>"".concat(t,":").concat(i[t]||"").concat(r[t],";"))).join("");return"".concat(100*e,"%{").concat(n,"}")})).join(""),"}")+"".concat(e," {animation: ").concat(t," ").concat(a,"ms ").concat(o," ").concat(c,"ms ").concat(l===1/0?"infinite":l," ").concat(s," ").concat(u,";}")}toDataURL(){var t=this;return u(s().mark((function r(){var n,i,a,o,c,l;return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.$namespace.cloneNode(!0),i=t.canvasConfig.document,a=0,o=null,t.context.renderingContext.root.forEach((r=>{var c=r.getAnimations();if(c.length){o||(o=(i||document).createElement("style"),n.appendChild(o));var s=r.elementSVG,l="#".concat(s.$el.id),u="#".concat(s.$groupEl.id),d="",h="";c.forEach((r=>{var n=r.effect.getKeyframes();if(n.length){var i=[],o=[],c=n[0],p=ut(c,ht);if(Object.keys(p).forEach((t=>{var r;"transform"===t&&o.push(t),!(null===(r=e.propertyMetadataCache[t])||void 0===r||!r.inh)?o.push(t):"transform"!==t&&i.push(t)})),o.length){var f=n.map((t=>{var e=t.offset,r=t.composite,n=t.computedOffset,i=t.easing,a=ut(t,pt),c={offset:e,composite:r,computedOffset:n,easing:i};return Object.keys(a).forEach((e=>{o.includes(e)&&(c[e]=t[e])})),c}));h+=t.generateCSSText("a".concat(a++),u,f,r.effect.getComputedTiming(),{transform:s.$groupEl.getAttribute("transform")})}if(i.length){var v=n.map((t=>{var e=t.offset,r=t.composite,n=t.computedOffset,a=t.easing,o=ut(t,ft),c={offset:e,composite:r,computedOffset:n,easing:a};return Object.keys(o).forEach((e=>{i.includes(e)&&(c[e]=t[e])})),c}));d+=t.generateCSSText("a".concat(a++),l,v,r.effect.getComputedTiming())}}})),o.textContent+=d+h}})),c=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),(l=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",c)).replaceChild(n,l.documentElement),r.abrupt("return","data:image/svg+xml;charset=utf8,".concat(encodeURIComponent((new XMLSerializer).serializeToString(l))));case 10:case"end":return r.stop()}}),r)})))()}}class mt extends e.AbstractRendererPlugin{constructor(){super(...arguments),this.name="svg-context-register"}init(){this.context.ContextService=vt}destroy(){delete this.context.ContextService}}t.DomInteraction=i,t.Renderer=class extends e.AbstractRenderer{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(t),this.registerPlugin(new mt),this.registerPlugin(new st({outputSVGElementId:t.outputSVGElementId})),this.registerPlugin(new n),this.registerPlugin(new h)}},t.SVGPicker=p,t.SVGRenderer=lt}));
2
34
  //# sourceMappingURL=index.umd.min.js.map