@ni/nimble-components 18.12.1 → 18.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-components-bundle.js +99 -116
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +279 -279
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/tree-item/index.d.ts +2 -9
- package/dist/esm/tree-item/index.js +10 -46
- package/dist/esm/tree-item/index.js.map +1 -1
- package/dist/esm/tree-view/index.d.ts +5 -0
- package/dist/esm/tree-view/index.js +26 -2
- package/dist/esm/tree-view/index.js.map +1 -1
- package/dist/esm/tree-view/template.d.ts +2 -0
- package/dist/esm/tree-view/template.js +17 -0
- package/dist/esm/tree-view/template.js.map +1 -0
- package/package.json +2 -2
|
@@ -7128,11 +7128,8 @@ Hr.subscribe(t),t.attach(i),this.cache.set(e,t)}}(me`
|
|
|
7128
7128
|
transform: rotate(135deg);
|
|
7129
7129
|
}
|
|
7130
7130
|
`))
|
|
7131
|
-
class Hx extends mn{constructor(){super(...arguments),this.
|
|
7132
|
-
|
|
7133
|
-
let t=e
|
|
7134
|
-
for(;t?.parentElement!==this.treeView;)t=t?.parentElement
|
|
7135
|
-
t&&t.setAttribute(Mx,"true")}getParentTreeView(){return this.parentElement.closest("[role='tree']")}}const Px=Hx.compose({baseName:"tree-item",baseClass:mn,template:(e,t)=>G`
|
|
7131
|
+
class Hx extends mn{constructor(){super(...arguments),this.groupSelected=!1}}e([ne({attribute:"group-selected",mode:"boolean"})],Hx.prototype,"groupSelected",void 0)
|
|
7132
|
+
const Px=Hx.compose({baseName:"tree-item",baseClass:mn,template:(e,t)=>G`
|
|
7136
7133
|
<template
|
|
7137
7134
|
role="treeitem"
|
|
7138
7135
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
@@ -7186,18 +7183,11 @@ const Tx=me`
|
|
|
7186
7183
|
:host(${yn}) {
|
|
7187
7184
|
outline: none;
|
|
7188
7185
|
}
|
|
7189
|
-
`
|
|
7190
|
-
class Lx extends fn{constructor(){super(...arguments),this.selectionMode=Ax}handleClick(e){if(e.defaultPrevented)return!1
|
|
7191
|
-
if(!(e.target instanceof Element&&vn(e.target)))return!0
|
|
7192
|
-
const t=e.target
|
|
7193
|
-
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case Ax:return!0
|
|
7194
|
-
case Ex:return!1
|
|
7195
|
-
case Ox:return!this.itemHasChildren(e)
|
|
7196
|
-
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}}e([ne({attribute:"selection-mode"})],Lx.prototype,"selectionMode",void 0)
|
|
7197
|
-
const Dx=Lx.compose({baseName:"tree-view",baseClass:fn,template:(e,t)=>G`
|
|
7186
|
+
`,Lx=G`
|
|
7198
7187
|
<template
|
|
7199
7188
|
role="tree"
|
|
7200
7189
|
${_e("treeView")}
|
|
7190
|
+
${De({property:"selectedItems",subtree:!0,selector:'[role="treeitem"][selected]',attributeFilter:["role","selected"]})}
|
|
7201
7191
|
@keydown="${(e,t)=>e.handleKeyDown(t.event)}"
|
|
7202
7192
|
@focusin="${(e,t)=>e.handleFocus(t.event)}"
|
|
7203
7193
|
@focusout="${(e,t)=>e.handleBlur(t.event)}"
|
|
@@ -7206,264 +7196,274 @@ const Dx=Lx.compose({baseName:"tree-view",baseClass:fn,template:(e,t)=>G`
|
|
|
7206
7196
|
>
|
|
7207
7197
|
<slot ${Te("slottedTreeItems")}></slot>
|
|
7208
7198
|
</template>
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7199
|
+
`
|
|
7200
|
+
class Dx extends fn{constructor(){super(...arguments),this.selectionMode=Ax,this.selectedItems=[]}handleClick(e){if(e.defaultPrevented)return!1
|
|
7201
|
+
if(!(e.target instanceof Element&&vn(e.target)))return!0
|
|
7202
|
+
const t=e.target
|
|
7203
|
+
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case Ax:return!0
|
|
7204
|
+
case Ex:return!1
|
|
7205
|
+
case Ox:return!this.itemHasChildren(e)
|
|
7206
|
+
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof Hx&&(e.groupSelected=!1)
|
|
7207
|
+
for(let e of this.selectedItems){for(;null!==e.parentElement&&e.parentElement!==this;)e=e.parentElement
|
|
7208
|
+
e instanceof Hx&&(e.groupSelected=!0)}}}e([ne({attribute:"selection-mode"})],Dx.prototype,"selectionMode",void 0),e([m],Dx.prototype,"selectedItems",void 0)
|
|
7209
|
+
const zx=Dx.compose({baseName:"tree-view",baseClass:fn,template:Lx,styles:Tx})
|
|
7210
|
+
no.getOrCreate().withPrefix("nimble").register(zx()),no.tagFor(Dx)
|
|
7211
|
+
var Bx={value:()=>{}}
|
|
7212
|
+
function Nx(){for(var e,t=0,i=arguments.length,o={};t<i;++t){if(!(e=arguments[t]+"")||e in o||/[\s.]/.test(e))throw new Error("illegal type: "+e)
|
|
7213
|
+
o[e]=[]}return new Zx(o)}function Zx(e){this._=e}function qx(e,t){return e.trim().split(/^|\s+/).map((function(e){var i="",o=e.indexOf(".")
|
|
7214
7214
|
if(o>=0&&(i=e.slice(o+1),e=e.slice(0,o)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7215
|
-
return{type:e,name:i}}))}function
|
|
7216
|
-
break}return null!=i&&e.push({name:t,value:i}),e}
|
|
7215
|
+
return{type:e,name:i}}))}function jx(e,t){for(var i,o=0,n=e.length;o<n;++o)if((i=e[o]).name===t)return i.value}function Ux(e,t,i){for(var o=0,n=e.length;o<n;++o)if(e[o].name===t){e[o]=Bx,e=e.slice(0,o).concat(e.slice(o+1))
|
|
7216
|
+
break}return null!=i&&e.push({name:t,value:i}),e}Zx.prototype=Nx.prototype={constructor:Zx,on:function(e,t){var i,o=this._,n=qx(e+"",o),s=-1,r=n.length
|
|
7217
7217
|
if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t)
|
|
7218
|
-
for(;++s<r;)if(i=(e=n[s]).type)o[i]=
|
|
7219
|
-
else if(null==t)for(i in o)o[i]=
|
|
7220
|
-
return this}for(;++s<r;)if((i=(e=n[s]).type)&&(i=
|
|
7218
|
+
for(;++s<r;)if(i=(e=n[s]).type)o[i]=Ux(o[i],e.name,t)
|
|
7219
|
+
else if(null==t)for(i in o)o[i]=Ux(o[i],e.name,null)
|
|
7220
|
+
return this}for(;++s<r;)if((i=(e=n[s]).type)&&(i=jx(o[i],e.name)))return i},copy:function(){var e={},t=this._
|
|
7221
7221
|
for(var i in t)e[i]=t[i].slice()
|
|
7222
|
-
return new
|
|
7222
|
+
return new Zx(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var i,o,n=new Array(i),s=0;s<i;++s)n[s]=arguments[s+2]
|
|
7223
7223
|
if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7224
7224
|
for(s=0,i=(o=this._[e]).length;s<i;++s)o[s].value.apply(t,n)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
7225
7225
|
for(var o=this._[e],n=0,s=o.length;n<s;++n)o[n].value.apply(t,i)}}
|
|
7226
|
-
var
|
|
7227
|
-
function
|
|
7228
|
-
return i>=0&&"xmlns"!==(t=e.slice(0,i))&&(e=e.slice(i+1)),
|
|
7229
|
-
return i===
|
|
7230
|
-
return(t.local?Kx
|
|
7231
|
-
function
|
|
7232
|
-
function
|
|
7233
|
-
for(;a<l;++a)(r=t[a])&&(n[a]=r)}function
|
|
7226
|
+
var Gx="http://www.w3.org/1999/xhtml",Wx={svg:"http://www.w3.org/2000/svg",xhtml:Gx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
7227
|
+
function Xx(e){var t=e+="",i=t.indexOf(":")
|
|
7228
|
+
return i>=0&&"xmlns"!==(t=e.slice(0,i))&&(e=e.slice(i+1)),Wx.hasOwnProperty(t)?{space:Wx[t],local:e}:e}function Kx(e){return function(){var t=this.ownerDocument,i=this.namespaceURI
|
|
7229
|
+
return i===Gx&&t.documentElement.namespaceURI===Gx?t.createElement(e):t.createElementNS(i,e)}}function Yx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qx(e){var t=Xx(e)
|
|
7230
|
+
return(t.local?Yx:Kx)(t)}function Jx(){}function ey(e){return null==e?Jx:function(){return this.querySelector(e)}}function ty(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function iy(){return[]}function oy(e){return null==e?iy:function(){return this.querySelectorAll(e)}}function ny(e){return function(){return this.matches(e)}}function sy(e){return function(t){return t.matches(e)}}var ry=Array.prototype.find
|
|
7231
|
+
function ay(){return this.firstElementChild}var ly=Array.prototype.filter
|
|
7232
|
+
function cy(){return Array.from(this.children)}function dy(e){return new Array(e.length)}function hy(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function uy(e){return function(){return e}}function py(e,t,i,o,n,s){for(var r,a=0,l=t.length,c=s.length;a<c;++a)(r=t[a])?(r.__data__=s[a],o[a]=r):i[a]=new hy(e,s[a])
|
|
7233
|
+
for(;a<l;++a)(r=t[a])&&(n[a]=r)}function gy(e,t,i,o,n,s,r){var a,l,c,d=new Map,h=t.length,u=s.length,p=new Array(h)
|
|
7234
7234
|
for(a=0;a<h;++a)(l=t[a])&&(p[a]=c=r.call(l,l.__data__,a,t)+"",d.has(c)?n[a]=l:d.set(c,l))
|
|
7235
|
-
for(a=0;a<u;++a)c=r.call(e,s[a],a,s)+"",(l=d.get(c))?(o[a]=l,l.__data__=s[a],d.delete(c)):i[a]=new
|
|
7236
|
-
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(n[a]=l)}function
|
|
7237
|
-
null==i?this.removeAttribute(e):this.setAttribute(e,i)}}function
|
|
7238
|
-
null==i?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function
|
|
7239
|
-
null==o?this.style.removeProperty(e):this.style.setProperty(e,o,i)}}function
|
|
7240
|
-
null==i?delete this[e]:this[e]=i}}function
|
|
7241
|
-
this.textContent=null==t?"":t}}function
|
|
7242
|
-
this.innerHTML=null==t?"":t}}function
|
|
7243
|
-
e&&e.removeChild(this)}function
|
|
7244
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
7245
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
7246
|
-
return i>=0&&(t=e.slice(i+1),e=e.slice(0,i)),{type:e,name:t}}))}function
|
|
7247
|
-
if(t){for(var i,o=0,n=-1,s=t.length;o<s;++o)i=t[o],e.type&&i.type!==e.type||i.name!==e.name?t[++n]=i:this.removeEventListener(i.type,i.listener,i.options);++n?t.length=n:delete this.__on}}}function
|
|
7235
|
+
for(a=0;a<u;++a)c=r.call(e,s[a],a,s)+"",(l=d.get(c))?(o[a]=l,l.__data__=s[a],d.delete(c)):i[a]=new hy(e,s[a])
|
|
7236
|
+
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(n[a]=l)}function vy(e){return e.__data__}function my(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function fy(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function by(e){return function(){this.removeAttribute(e)}}function wy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xy(e,t){return function(){this.setAttribute(e,t)}}function yy(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $y(e,t){return function(){var i=t.apply(this,arguments)
|
|
7237
|
+
null==i?this.removeAttribute(e):this.setAttribute(e,i)}}function Cy(e,t){return function(){var i=t.apply(this,arguments)
|
|
7238
|
+
null==i?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function ky(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Sy(e){return function(){this.style.removeProperty(e)}}function _y(e,t,i){return function(){this.style.setProperty(e,t,i)}}function Iy(e,t,i){return function(){var o=t.apply(this,arguments)
|
|
7239
|
+
null==o?this.style.removeProperty(e):this.style.setProperty(e,o,i)}}function Ry(e,t){return e.style.getPropertyValue(t)||ky(e).getComputedStyle(e,null).getPropertyValue(t)}function My(e){return function(){delete this[e]}}function Ay(e,t){return function(){this[e]=t}}function Oy(e,t){return function(){var i=t.apply(this,arguments)
|
|
7240
|
+
null==i?delete this[e]:this[e]=i}}function Ey(e){return e.trim().split(/^|\s+/)}function Vy(e){return e.classList||new Fy(e)}function Fy(e){this._node=e,this._names=Ey(e.getAttribute("class")||"")}function Hy(e,t){for(var i=Vy(e),o=-1,n=t.length;++o<n;)i.add(t[o])}function Py(e,t){for(var i=Vy(e),o=-1,n=t.length;++o<n;)i.remove(t[o])}function Ty(e){return function(){Hy(this,e)}}function Ly(e){return function(){Py(this,e)}}function Dy(e,t){return function(){(t.apply(this,arguments)?Hy:Py)(this,e)}}function zy(){this.textContent=""}function By(e){return function(){this.textContent=e}}function Ny(e){return function(){var t=e.apply(this,arguments)
|
|
7241
|
+
this.textContent=null==t?"":t}}function Zy(){this.innerHTML=""}function qy(e){return function(){this.innerHTML=e}}function jy(e){return function(){var t=e.apply(this,arguments)
|
|
7242
|
+
this.innerHTML=null==t?"":t}}function Uy(){this.nextSibling&&this.parentNode.appendChild(this)}function Gy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Wy(){return null}function Xy(){var e=this.parentNode
|
|
7243
|
+
e&&e.removeChild(this)}function Ky(){var e=this.cloneNode(!1),t=this.parentNode
|
|
7244
|
+
return t?t.insertBefore(e,this.nextSibling):e}function Yy(){var e=this.cloneNode(!0),t=this.parentNode
|
|
7245
|
+
return t?t.insertBefore(e,this.nextSibling):e}function Qy(e){return e.trim().split(/^|\s+/).map((function(e){var t="",i=e.indexOf(".")
|
|
7246
|
+
return i>=0&&(t=e.slice(i+1),e=e.slice(0,i)),{type:e,name:t}}))}function Jy(e){return function(){var t=this.__on
|
|
7247
|
+
if(t){for(var i,o=0,n=-1,s=t.length;o<s;++o)i=t[o],e.type&&i.type!==e.type||i.name!==e.name?t[++n]=i:this.removeEventListener(i.type,i.listener,i.options);++n?t.length=n:delete this.__on}}}function e$(e,t,i){return function(){var o,n=this.__on,s=function(e){return function(t){e.call(this,t,this.__data__)}}(t)
|
|
7248
7248
|
if(n)for(var r=0,a=n.length;r<a;++r)if((o=n[r]).type===e.type&&o.name===e.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=i),void(o.value=t)
|
|
7249
|
-
this.addEventListener(e.type,s,i),o={type:e.type,name:e.name,value:t,listener:s,options:i},n?n.push(o):this.__on=[o]}}function
|
|
7250
|
-
"function"==typeof n?n=new n(t,i):(n=o.document.createEvent("Event"),i?(n.initEvent(t,i.bubbles,i.cancelable),n.detail=i.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function
|
|
7249
|
+
this.addEventListener(e.type,s,i),o={type:e.type,name:e.name,value:t,listener:s,options:i},n?n.push(o):this.__on=[o]}}function t$(e,t,i){var o=ky(e),n=o.CustomEvent
|
|
7250
|
+
"function"==typeof n?n=new n(t,i):(n=o.document.createEvent("Event"),i?(n.initEvent(t,i.bubbles,i.cancelable),n.detail=i.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function i$(e,t){return function(){return t$(this,e,t)}}function o$(e,t){return function(){return t$(this,e,t.apply(this,arguments))}}hy.prototype={constructor:hy,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Fy.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e)
|
|
7251
7251
|
t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}
|
|
7252
|
-
var
|
|
7253
|
-
function
|
|
7252
|
+
var n$=[null]
|
|
7253
|
+
function s$(e,t){this._groups=e,this._parents=t}function r$(){return new s$([[document.documentElement]],n$)}function a$(e){return"string"==typeof e?new s$([[document.querySelector(e)]],[document.documentElement]):new s$([[e]],n$)}function l$(e,t){if(e=function(e){let t
|
|
7254
7254
|
for(;t=e.sourceEvent;)e=t
|
|
7255
7255
|
return e}(e),void 0===t&&(t=e.currentTarget),t){var i=t.ownerSVGElement||t
|
|
7256
7256
|
if(i.createSVGPoint){var o=i.createSVGPoint()
|
|
7257
7257
|
return o.x=e.clientX,o.y=e.clientY,[(o=o.matrixTransform(t.getScreenCTM().inverse())).x,o.y]}if(t.getBoundingClientRect){var n=t.getBoundingClientRect()
|
|
7258
|
-
return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}}return[e.pageX,e.pageY]}
|
|
7258
|
+
return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}}return[e.pageX,e.pageY]}s$.prototype=r$.prototype={constructor:s$,select:function(e){"function"!=typeof e&&(e=ey(e))
|
|
7259
7259
|
for(var t=this._groups,i=t.length,o=new Array(i),n=0;n<i;++n)for(var s,r,a=t[n],l=a.length,c=o[n]=new Array(l),d=0;d<l;++d)(s=a[d])&&(r=e.call(s,s.__data__,d,a))&&("__data__"in s&&(r.__data__=s.__data__),c[d]=r)
|
|
7260
|
-
return new
|
|
7260
|
+
return new s$(o,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return ty(e.apply(this,arguments))}}(e):oy(e)
|
|
7261
7261
|
for(var t=this._groups,i=t.length,o=[],n=[],s=0;s<i;++s)for(var r,a=t[s],l=a.length,c=0;c<l;++c)(r=a[c])&&(o.push(e.call(r,r.__data__,c,a)),n.push(r))
|
|
7262
|
-
return new
|
|
7262
|
+
return new s$(o,n)},selectChild:function(e){return this.select(null==e?ay:function(e){return function(){return ry.call(this.children,e)}}("function"==typeof e?e:sy(e)))},selectChildren:function(e){return this.selectAll(null==e?cy:function(e){return function(){return ly.call(this.children,e)}}("function"==typeof e?e:sy(e)))},filter:function(e){"function"!=typeof e&&(e=ny(e))
|
|
7263
7263
|
for(var t=this._groups,i=t.length,o=new Array(i),n=0;n<i;++n)for(var s,r=t[n],a=r.length,l=o[n]=[],c=0;c<a;++c)(s=r[c])&&e.call(s,s.__data__,c,r)&&l.push(s)
|
|
7264
|
-
return new
|
|
7265
|
-
var i=t?py
|
|
7266
|
-
"function"!=typeof e&&(e=
|
|
7267
|
-
for(var s=n.length,r=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var d=o[c],h=n[c],u=h.length,p=
|
|
7264
|
+
return new s$(o,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,vy)
|
|
7265
|
+
var i=t?gy:py,o=this._parents,n=this._groups
|
|
7266
|
+
"function"!=typeof e&&(e=uy(e))
|
|
7267
|
+
for(var s=n.length,r=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var d=o[c],h=n[c],u=h.length,p=my(e.call(d,d&&d.__data__,c,o)),g=p.length,v=a[c]=new Array(g),m=r[c]=new Array(g),f=l[c]=new Array(u)
|
|
7268
7268
|
i(d,h,v,m,f,p,t)
|
|
7269
|
-
for(var b,w,x=0,y=0;x<g;++x)if(b=v[x]){for(x>=y&&(y=x+1);!(w=m[y])&&++y<g;);b._next=w||null}}return(r=new
|
|
7269
|
+
for(var b,w,x=0,y=0;x<g;++x)if(b=v[x]){for(x>=y&&(y=x+1);!(w=m[y])&&++y<g;);b._next=w||null}}return(r=new s$(r,o))._enter=a,r._exit=l,r},enter:function(){return new s$(this._enter||this._groups.map(dy),this._parents)},exit:function(){return new s$(this._exit||this._groups.map(dy),this._parents)},join:function(e,t,i){var o=this.enter(),n=this,s=this.exit()
|
|
7270
7270
|
return"function"==typeof e?(o=e(o))&&(o=o.selection()):o=o.append(e+""),null!=t&&(n=t(n))&&(n=n.selection()),null==i?s.remove():i(s),o&&n?o.merge(n).order():n},merge:function(e){for(var t=e.selection?e.selection():e,i=this._groups,o=t._groups,n=i.length,s=o.length,r=Math.min(n,s),a=new Array(n),l=0;l<r;++l)for(var c,d=i[l],h=o[l],u=d.length,p=a[l]=new Array(u),g=0;g<u;++g)(c=d[g]||h[g])&&(p[g]=c)
|
|
7271
7271
|
for(;l<n;++l)a[l]=i[l]
|
|
7272
|
-
return new
|
|
7273
|
-
return this},sort:function(e){function t(t,i){return t&&i?e(t.__data__,i.__data__):!t-!i}e||(e=
|
|
7272
|
+
return new s$(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var o,n=e[t],s=n.length-1,r=n[s];--s>=0;)(o=n[s])&&(r&&4^o.compareDocumentPosition(r)&&r.parentNode.insertBefore(o,r),r=o)
|
|
7273
|
+
return this},sort:function(e){function t(t,i){return t&&i?e(t.__data__,i.__data__):!t-!i}e||(e=fy)
|
|
7274
7274
|
for(var i=this._groups,o=i.length,n=new Array(o),s=0;s<o;++s){for(var r,a=i[s],l=a.length,c=n[s]=new Array(l),d=0;d<l;++d)(r=a[d])&&(c[d]=r)
|
|
7275
|
-
c.sort(t)}return new
|
|
7275
|
+
c.sort(t)}return new s$(n,this._parents).order()},call:function(){var e=arguments[0]
|
|
7276
7276
|
return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var o=e[t],n=0,s=o.length;n<s;++n){var r=o[n]
|
|
7277
7277
|
if(r)return r}return null},size:function(){let e=0
|
|
7278
7278
|
for(const t of this)++e
|
|
7279
7279
|
return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,i=0,o=t.length;i<o;++i)for(var n,s=t[i],r=0,a=s.length;r<a;++r)(n=s[r])&&e.call(n,n.__data__,r,s)
|
|
7280
|
-
return this},attr:function(e,t){var i=
|
|
7280
|
+
return this},attr:function(e,t){var i=Xx(e)
|
|
7281
7281
|
if(arguments.length<2){var o=this.node()
|
|
7282
|
-
return i.local?o.getAttributeNS(i.space,i.local):o.getAttribute(i)}return this.each((null==t?i.local?by:
|
|
7283
|
-
if(arguments.length<2){for(var o=
|
|
7284
|
-
return!0}return this.each(("function"==typeof t?
|
|
7285
|
-
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var i="function"==typeof e?e:
|
|
7286
|
-
return this.select((function(){return this.insertBefore(i.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
7287
|
-
if(!(arguments.length<2)){for(a=t?Jy
|
|
7282
|
+
return i.local?o.getAttributeNS(i.space,i.local):o.getAttribute(i)}return this.each((null==t?i.local?wy:by:"function"==typeof t?i.local?Cy:$y:i.local?yy:xy)(i,t))},style:function(e,t,i){return arguments.length>1?this.each((null==t?Sy:"function"==typeof t?Iy:_y)(e,t,null==i?"":i)):Ry(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?My:"function"==typeof t?Oy:Ay)(e,t)):this.node()[e]},classed:function(e,t){var i=Ey(e+"")
|
|
7283
|
+
if(arguments.length<2){for(var o=Vy(this.node()),n=-1,s=i.length;++n<s;)if(!o.contains(i[n]))return!1
|
|
7284
|
+
return!0}return this.each(("function"==typeof t?Dy:t?Ty:Ly)(i,t))},text:function(e){return arguments.length?this.each(null==e?zy:("function"==typeof e?Ny:By)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Zy:("function"==typeof e?jy:qy)(e)):this.node().innerHTML},raise:function(){return this.each(Uy)},lower:function(){return this.each(Gy)},append:function(e){var t="function"==typeof e?e:Qx(e)
|
|
7285
|
+
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var i="function"==typeof e?e:Qx(e),o=null==t?Wy:"function"==typeof t?t:ey(t)
|
|
7286
|
+
return this.select((function(){return this.insertBefore(i.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(Xy)},clone:function(e){return this.select(e?Yy:Ky)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,i){var o,n,s=Qy(e+""),r=s.length
|
|
7287
|
+
if(!(arguments.length<2)){for(a=t?e$:Jy,o=0;o<r;++o)this.each(a(s[o],t,i))
|
|
7288
7288
|
return this}var a=this.node().__on
|
|
7289
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(o=0,l=a[c];o<r;++o)if((n=s[o]).type===l.type&&n.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?i
|
|
7290
|
-
const
|
|
7291
|
-
function
|
|
7292
|
-
"onselectstart"in t?i.on("selectstart.drag",c
|
|
7293
|
-
t&&(o.on("click.drag",c
|
|
7289
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(o=0,l=a[c];o<r;++o)if((n=s[o]).type===l.type&&n.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?o$:i$)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var o,n=e[t],s=0,r=n.length;s<r;++s)(o=n[s])&&(yield o)}}
|
|
7290
|
+
const c$={capture:!0,passive:!1}
|
|
7291
|
+
function d$(e){e.preventDefault(),e.stopImmediatePropagation()}function h$(e){var t=e.document.documentElement,i=a$(e).on("dragstart.drag",d$,c$)
|
|
7292
|
+
"onselectstart"in t?i.on("selectstart.drag",d$,c$):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function u$(e,t){var i=e.document.documentElement,o=a$(e).on("dragstart.drag",null)
|
|
7293
|
+
t&&(o.on("click.drag",d$,c$),setTimeout((function(){o.on("click.drag",null)}),0)),"onselectstart"in i?o.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}function p$(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function g$(e,t){var i=Object.create(e.prototype)
|
|
7294
7294
|
for(var o in t)i[o]=t[o]
|
|
7295
|
-
return i}function
|
|
7296
|
-
function
|
|
7297
|
-
return e=(e+"").trim().toLowerCase(),(t=
|
|
7298
|
-
return`${1===e?"rgb(":"rgba("}${
|
|
7299
|
-
if(e instanceof
|
|
7300
|
-
if(e instanceof
|
|
7295
|
+
return i}function v$(){}var m$=.7,f$=1/m$,b$="\\s*([+-]?\\d+)\\s*",w$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",x$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y$=/^#([0-9a-f]{3,8})$/,$$=new RegExp(`^rgb\\(${b$},${b$},${b$}\\)$`),C$=new RegExp(`^rgb\\(${x$},${x$},${x$}\\)$`),k$=new RegExp(`^rgba\\(${b$},${b$},${b$},${w$}\\)$`),S$=new RegExp(`^rgba\\(${x$},${x$},${x$},${w$}\\)$`),_$=new RegExp(`^hsl\\(${w$},${x$},${x$}\\)$`),I$=new RegExp(`^hsla\\(${w$},${x$},${x$},${w$}\\)$`),R$={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}
|
|
7296
|
+
function M$(){return this.rgb().formatHex()}function A$(){return this.rgb().formatRgb()}function O$(e){var t,i
|
|
7297
|
+
return e=(e+"").trim().toLowerCase(),(t=y$.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?E$(t):3===i?new P$(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?V$(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?V$(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=$$.exec(e))?new P$(t[1],t[2],t[3],1):(t=C$.exec(e))?new P$(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=k$.exec(e))?V$(t[1],t[2],t[3],t[4]):(t=S$.exec(e))?V$(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=_$.exec(e))?N$(t[1],t[2]/100,t[3]/100,1):(t=I$.exec(e))?N$(t[1],t[2]/100,t[3]/100,t[4]):R$.hasOwnProperty(e)?E$(R$[e]):"transparent"===e?new P$(NaN,NaN,NaN,0):null}function E$(e){return new P$(e>>16&255,e>>8&255,255&e,1)}function V$(e,t,i,o){return o<=0&&(e=t=i=NaN),new P$(e,t,i,o)}function F$(e){return e instanceof v$||(e=O$(e)),e?new P$((e=e.rgb()).r,e.g,e.b,e.opacity):new P$}function H$(e,t,i,o){return 1===arguments.length?F$(e):new P$(e,t,i,null==o?1:o)}function P$(e,t,i,o){this.r=+e,this.g=+t,this.b=+i,this.opacity=+o}function T$(){return`#${B$(this.r)}${B$(this.g)}${B$(this.b)}`}function L$(){const e=D$(this.opacity)
|
|
7298
|
+
return`${1===e?"rgb(":"rgba("}${z$(this.r)}, ${z$(this.g)}, ${z$(this.b)}${1===e?")":`, ${e})`}`}function D$(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function z$(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function B$(e){return((e=z$(e))<16?"0":"")+e.toString(16)}function N$(e,t,i,o){return o<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new q$(e,t,i,o)}function Z$(e){if(e instanceof q$)return new q$(e.h,e.s,e.l,e.opacity)
|
|
7299
|
+
if(e instanceof v$||(e=O$(e)),!e)return new q$
|
|
7300
|
+
if(e instanceof q$)return e
|
|
7301
7301
|
var t=(e=e.rgb()).r/255,i=e.g/255,o=e.b/255,n=Math.min(t,i,o),s=Math.max(t,i,o),r=NaN,a=s-n,l=(s+n)/2
|
|
7302
|
-
return a?(r=t===s?(i-o)/a+6*(i<o):i===s?(o-t)/a+2:(t-i)/a+4,a/=l<.5?s+n:2-s-n,r*=60):a=l>0&&l<1?0:r,new
|
|
7303
|
-
return new
|
|
7304
|
-
return`${1===e?"hsl(":"hsla("}${
|
|
7305
|
-
var
|
|
7306
|
-
function
|
|
7307
|
-
return i?function(e,t){return function(i){return e+i*t}}(e,i):
|
|
7308
|
-
function o(e,t){var o=i((e=
|
|
7302
|
+
return a?(r=t===s?(i-o)/a+6*(i<o):i===s?(o-t)/a+2:(t-i)/a+4,a/=l<.5?s+n:2-s-n,r*=60):a=l>0&&l<1?0:r,new q$(r,a,l,e.opacity)}function q$(e,t,i,o){this.h=+e,this.s=+t,this.l=+i,this.opacity=+o}function j$(e){return(e=(e||0)%360)<0?e+360:e}function U$(e){return Math.max(0,Math.min(1,e||0))}function G$(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}p$(v$,O$,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:M$,formatHex:M$,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Z$(this).formatHsl()},formatRgb:A$,toString:A$}),p$(P$,H$,g$(v$,{brighter(e){return e=null==e?f$:Math.pow(f$,e),new P$(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?m$:Math.pow(m$,e),new P$(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new P$(z$(this.r),z$(this.g),z$(this.b),D$(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T$,formatHex:T$,formatHex8:function(){return`#${B$(this.r)}${B$(this.g)}${B$(this.b)}${B$(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:L$,toString:L$})),p$(q$,(function(e,t,i,o){return 1===arguments.length?Z$(e):new q$(e,t,i,null==o?1:o)}),g$(v$,{brighter(e){return e=null==e?f$:Math.pow(f$,e),new q$(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?m$:Math.pow(m$,e),new q$(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,o=i+(i<.5?i:1-i)*t,n=2*i-o
|
|
7303
|
+
return new P$(G$(e>=240?e-240:e+120,n,o),G$(e,n,o),G$(e<120?e+240:e-120,n,o),this.opacity)},clamp(){return new q$(j$(this.h),U$(this.s),U$(this.l),D$(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=D$(this.opacity)
|
|
7304
|
+
return`${1===e?"hsl(":"hsla("}${j$(this.h)}, ${100*U$(this.s)}%, ${100*U$(this.l)}%${1===e?")":`, ${e})`}`}}))
|
|
7305
|
+
var W$=e=>()=>e
|
|
7306
|
+
function X$(e){return 1==(e=+e)?K$:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(o){return Math.pow(e+o*t,i)}}(t,i,e):W$(isNaN(t)?i:t)}}function K$(e,t){var i=t-e
|
|
7307
|
+
return i?function(e,t){return function(i){return e+i*t}}(e,i):W$(isNaN(e)?t:e)}var Y$=function e(t){var i=X$(t)
|
|
7308
|
+
function o(e,t){var o=i((e=H$(e)).r,(t=H$(t)).r),n=i(e.g,t.g),s=i(e.b,t.b),r=K$(e.opacity,t.opacity)
|
|
7309
7309
|
return function(t){return e.r=o(t),e.g=n(t),e.b=s(t),e.opacity=r(t),e+""}}return o.gamma=e,o}(1)
|
|
7310
|
-
function
|
|
7310
|
+
function Q$(e,t){t||(t=[])
|
|
7311
7311
|
var i,o=e?Math.min(t.length,e.length):0,n=t.slice()
|
|
7312
7312
|
return function(s){for(i=0;i<o;++i)n[i]=e[i]*(1-s)+t[i]*s
|
|
7313
|
-
return n}}function
|
|
7314
|
-
for(i=0;i<n;++i)s[i]=
|
|
7313
|
+
return n}}function J$(e,t){var i,o=t?t.length:0,n=e?Math.min(o,e.length):0,s=new Array(n),r=new Array(o)
|
|
7314
|
+
for(i=0;i<n;++i)s[i]=rC(e[i],t[i])
|
|
7315
7315
|
for(;i<o;++i)r[i]=t[i]
|
|
7316
7316
|
return function(e){for(i=0;i<n;++i)r[i]=s[i](e)
|
|
7317
|
-
return r}}function
|
|
7318
|
-
return e=+e,t=+t,function(o){return i.setTime(e*(1-o)+t*o),i}}function
|
|
7319
|
-
for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?o[i]=
|
|
7317
|
+
return r}}function eC(e,t){var i=new Date
|
|
7318
|
+
return e=+e,t=+t,function(o){return i.setTime(e*(1-o)+t*o),i}}function tC(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}function iC(e,t){var i,o={},n={}
|
|
7319
|
+
for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?o[i]=rC(e[i],t[i]):n[i]=t[i]
|
|
7320
7320
|
return function(e){for(i in o)n[i]=o[i](e)
|
|
7321
|
-
return n}}var
|
|
7322
|
-
function
|
|
7323
|
-
for(e+="",t+="";(i=
|
|
7321
|
+
return n}}var oC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nC=new RegExp(oC.source,"g")
|
|
7322
|
+
function sC(e,t){var i,o,n,s=oC.lastIndex=nC.lastIndex=0,r=-1,a=[],l=[]
|
|
7323
|
+
for(e+="",t+="";(i=oC.exec(e))&&(o=nC.exec(t));)(n=o.index)>s&&(n=t.slice(s,n),a[r]?a[r]+=n:a[++r]=n),(i=i[0])===(o=o[0])?a[r]?a[r]+=o:a[++r]=o:(a[++r]=null,l.push({i:r,x:tC(i,o)})),s=nC.lastIndex
|
|
7324
7324
|
return s<t.length&&(n=t.slice(s),a[r]?a[r]+=n:a[++r]=n),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var i,o=0;o<t;++o)a[(i=l[o]).i]=i.x(e)
|
|
7325
|
-
return a.join("")})}function
|
|
7326
|
-
return null==t||"boolean"===n?
|
|
7327
|
-
function
|
|
7328
|
-
return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*i+t*o)&&(i-=e*l,o-=t*l),(a=Math.sqrt(i*i+o*o))&&(i/=a,o/=a,l/=a),e*o<t*i&&(e=-e,t=-t,l=-l,r=-r),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*
|
|
7325
|
+
return a.join("")})}function rC(e,t){var i,o,n=typeof t
|
|
7326
|
+
return null==t||"boolean"===n?W$(t):("number"===n?tC:"string"===n?(i=O$(t))?(t=i,Y$):sC:t instanceof O$?Y$:t instanceof Date?eC:(o=t,!ArrayBuffer.isView(o)||o instanceof DataView?Array.isArray(t)?J$:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?iC:tC:Q$))(e,t)}function aC(e,t){return e=+e,t=+t,function(i){return Math.round(e*(1-i)+t*i)}}var lC,cC=180/Math.PI,dC={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
7327
|
+
function hC(e,t,i,o,n,s){var r,a,l
|
|
7328
|
+
return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*i+t*o)&&(i-=e*l,o-=t*l),(a=Math.sqrt(i*i+o*o))&&(i/=a,o/=a,l/=a),e*o<t*i&&(e=-e,t=-t,l=-l,r=-r),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*cC,skewX:Math.atan(l)*cC,scaleX:r,scaleY:a}}function uC(e,t,i,o){function n(e){return e.length?e.pop()+" ":""}return function(s,r){var a=[],l=[]
|
|
7329
7329
|
return s=e(s),r=e(r),function(e,o,n,s,r,a){if(e!==n||o!==s){var l=r.push("translate(",null,t,null,i)
|
|
7330
|
-
a.push({i:l-4,x:
|
|
7331
|
-
r.push({i:a-4,x:
|
|
7332
|
-
return a.join("")}}}var uC
|
|
7333
|
-
return t.isIdentity?
|
|
7334
|
-
function
|
|
7330
|
+
a.push({i:l-4,x:tC(e,n)},{i:l-2,x:tC(o,s)})}else(n||s)&&r.push("translate("+n+t+s+i)}(s.translateX,s.translateY,r.translateX,r.translateY,a,l),function(e,t,i,s){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),s.push({i:i.push(n(i)+"rotate(",null,o)-2,x:tC(e,t)})):t&&i.push(n(i)+"rotate("+t+o)}(s.rotate,r.rotate,a,l),function(e,t,i,s){e!==t?s.push({i:i.push(n(i)+"skewX(",null,o)-2,x:tC(e,t)}):t&&i.push(n(i)+"skewX("+t+o)}(s.skewX,r.skewX,a,l),function(e,t,i,o,s,r){if(e!==i||t!==o){var a=s.push(n(s)+"scale(",null,",",null,")")
|
|
7331
|
+
r.push({i:a-4,x:tC(e,i)},{i:a-2,x:tC(t,o)})}else 1===i&&1===o||s.push(n(s)+"scale("+i+","+o+")")}(s.scaleX,s.scaleY,r.scaleX,r.scaleY,a,l),s=r=null,function(e){for(var t,i=-1,o=l.length;++i<o;)a[(t=l[i]).i]=t.x(e)
|
|
7332
|
+
return a.join("")}}}var pC=uC((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")
|
|
7333
|
+
return t.isIdentity?dC:hC(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),gC=uC((function(e){return null==e?dC:(lC||(lC=document.createElementNS("http://www.w3.org/2000/svg","g")),lC.setAttribute("transform",e),(e=lC.transform.baseVal.consolidate())?hC((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):dC)}),", ",")",")")
|
|
7334
|
+
function vC(e){return((e=Math.exp(e))+1/e)/2}var mC,fC,bC=function e(t,i,o){function n(e,n){var s,r,a=e[0],l=e[1],c=e[2],d=n[0],h=n[1],u=n[2],p=d-a,g=h-l,v=p*p+g*g
|
|
7335
7335
|
if(v<1e-12)r=Math.log(u/c)/t,s=function(e){return[a+e*p,l+e*g,c*Math.exp(t*e*r)]}
|
|
7336
7336
|
else{var m=Math.sqrt(v),f=(u*u-c*c+o*v)/(2*c*i*m),b=(u*u-c*c-o*v)/(2*u*i*m),w=Math.log(Math.sqrt(f*f+1)-f),x=Math.log(Math.sqrt(b*b+1)-b)
|
|
7337
|
-
r=(x-w)/t,s=function(e){var o,n=e*r,s=
|
|
7338
|
-
return[a+d*p,l+d*g,c*s/
|
|
7339
|
-
return e(i,o,o*o)},n}(Math.SQRT2,2,4),
|
|
7340
|
-
function
|
|
7341
|
-
return o.restart(e,t,i),o}function
|
|
7342
|
-
try{!function(){
|
|
7343
|
-
for(var e,t=
|
|
7344
|
-
for(;i;)i._call?(o>i._time&&(o=i._time),e=i,i=i._next):(t=i._next,i._next=null,i=e?e._next=t:
|
|
7345
|
-
|
|
7346
|
-
t>1e3&&(
|
|
7347
|
-
return t=null==t?0:+t,o.restart((i=>{o.stop(),e(i+t)}),t,i),o}
|
|
7348
|
-
i=(null==i?
|
|
7349
|
-
var
|
|
7350
|
-
function
|
|
7337
|
+
r=(x-w)/t,s=function(e){var o,n=e*r,s=vC(w),d=c/(i*m)*(s*(o=t*n+w,((o=Math.exp(2*o))-1)/(o+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w))
|
|
7338
|
+
return[a+d*p,l+d*g,c*s/vC(t*n+w)]}}return s.duration=1e3*r*t/Math.SQRT2,s}return n.rho=function(t){var i=Math.max(.001,+t),o=i*i
|
|
7339
|
+
return e(i,o,o*o)},n}(Math.SQRT2,2,4),wC=0,xC=0,yC=0,$C=0,CC=0,kC=0,SC="object"==typeof performance&&performance.now?performance:Date,_C="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)}
|
|
7340
|
+
function IC(){return CC||(_C(RC),CC=SC.now()+kC)}function RC(){CC=0}function MC(){this._call=this._time=this._next=null}function AC(e,t,i){var o=new MC
|
|
7341
|
+
return o.restart(e,t,i),o}function OC(){CC=($C=SC.now())+kC,wC=xC=0
|
|
7342
|
+
try{!function(){IC(),++wC
|
|
7343
|
+
for(var e,t=mC;t;)(e=CC-t._time)>=0&&t._call.call(void 0,e),t=t._next;--wC}()}finally{wC=0,function(){var e,t,i=mC,o=1/0
|
|
7344
|
+
for(;i;)i._call?(o>i._time&&(o=i._time),e=i,i=i._next):(t=i._next,i._next=null,i=e?e._next=t:mC=t)
|
|
7345
|
+
fC=e,VC(o)}(),CC=0}}function EC(){var e=SC.now(),t=e-$C
|
|
7346
|
+
t>1e3&&(kC-=t,$C=e)}function VC(e){wC||(xC&&(xC=clearTimeout(xC)),e-CC>24?(e<1/0&&(xC=setTimeout(OC,e-SC.now()-kC)),yC&&(yC=clearInterval(yC))):(yC||($C=SC.now(),yC=setInterval(EC,1e3)),wC=1,_C(OC)))}function FC(e,t,i){var o=new MC
|
|
7347
|
+
return t=null==t?0:+t,o.restart((i=>{o.stop(),e(i+t)}),t,i),o}MC.prototype=AC.prototype={constructor:MC,restart:function(e,t,i){if("function"!=typeof e)throw new TypeError("callback is not a function")
|
|
7348
|
+
i=(null==i?IC():+i)+(null==t?0:+t),this._next||fC===this||(fC?fC._next=this:mC=this,fC=this),this._call=e,this._time=i,VC()},stop:function(){this._call&&(this._call=null,this._time=1/0,VC())}}
|
|
7349
|
+
var HC=Nx("start","end","cancel","interrupt"),PC=[]
|
|
7350
|
+
function TC(e,t,i,o,n,s){var r=e.__transition
|
|
7351
7351
|
if(r){if(i in r)return}else e.__transition={}
|
|
7352
7352
|
!function(e,t,i){var o,n=e.__transition
|
|
7353
7353
|
function s(e){i.state=1,i.timer.restart(r,i.delay,i.time),i.delay<=e&&r(e-i.delay)}function r(s){var c,d,h,u
|
|
7354
7354
|
if(1!==i.state)return l()
|
|
7355
|
-
for(c in n)if((u=n[c]).name===i.name){if(3===u.state)return
|
|
7356
|
-
4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete n[c]):+c<t&&(u.state=6,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete n[c])}if(
|
|
7355
|
+
for(c in n)if((u=n[c]).name===i.name){if(3===u.state)return FC(r)
|
|
7356
|
+
4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete n[c]):+c<t&&(u.state=6,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete n[c])}if(FC((function(){3===i.state&&(i.state=4,i.timer.restart(a,i.delay,i.time),a(s))})),i.state=2,i.on.call("start",e,e.__data__,i.index,i.group),2===i.state){for(i.state=3,o=new Array(h=i.tween.length),c=0,d=-1;c<h;++c)(u=i.tween[c].value.call(e,e.__data__,i.index,i.group))&&(o[++d]=u)
|
|
7357
7357
|
o.length=d+1}}function a(t){for(var n=t<i.duration?i.ease.call(null,t/i.duration):(i.timer.restart(l),i.state=5,1),s=-1,r=o.length;++s<r;)o[s].call(e,n)
|
|
7358
7358
|
5===i.state&&(i.on.call("end",e,e.__data__,i.index,i.group),l())}function l(){for(var o in i.state=6,i.timer.stop(),delete n[t],n)return
|
|
7359
|
-
delete e.__transition}n[t]=i,i.timer=
|
|
7359
|
+
delete e.__transition}n[t]=i,i.timer=AC(s,0,i.time)}(e,i,{name:t,index:o,group:n,on:HC,tween:PC,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:0})}function LC(e,t){var i=zC(e,t)
|
|
7360
7360
|
if(i.state>0)throw new Error("too late; already scheduled")
|
|
7361
|
-
return i}function
|
|
7361
|
+
return i}function DC(e,t){var i=zC(e,t)
|
|
7362
7362
|
if(i.state>3)throw new Error("too late; already running")
|
|
7363
|
-
return i}function
|
|
7363
|
+
return i}function zC(e,t){var i=e.__transition
|
|
7364
7364
|
if(!i||!(i=i[t]))throw new Error("transition not found")
|
|
7365
|
-
return i}function
|
|
7365
|
+
return i}function BC(e,t){var i,o,n,s=e.__transition,r=!0
|
|
7366
7366
|
if(s){for(n in t=null==t?null:t+"",s)(i=s[n]).name===t?(o=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete s[n]):r=!1
|
|
7367
|
-
r&&delete e.__transition}}function
|
|
7368
|
-
return function(){var n=
|
|
7367
|
+
r&&delete e.__transition}}function NC(e,t){var i,o
|
|
7368
|
+
return function(){var n=DC(this,e),s=n.tween
|
|
7369
7369
|
if(s!==i)for(var r=0,a=(o=i=s).length;r<a;++r)if(o[r].name===t){(o=o.slice()).splice(r,1)
|
|
7370
|
-
break}n.tween=o}}function
|
|
7370
|
+
break}n.tween=o}}function ZC(e,t,i){var o,n
|
|
7371
7371
|
if("function"!=typeof i)throw new Error
|
|
7372
|
-
return function(){var s=
|
|
7372
|
+
return function(){var s=DC(this,e),r=s.tween
|
|
7373
7373
|
if(r!==o){n=(o=r).slice()
|
|
7374
7374
|
for(var a={name:t,value:i},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=a
|
|
7375
|
-
break}l===c&&n.push(a)}s.tween=n}}function
|
|
7376
|
-
return e.each((function(){var e=
|
|
7377
|
-
return("number"==typeof t?
|
|
7375
|
+
break}l===c&&n.push(a)}s.tween=n}}function qC(e,t,i){var o=e._id
|
|
7376
|
+
return e.each((function(){var e=DC(this,o);(e.value||(e.value={}))[t]=i.apply(this,arguments)})),function(e){return zC(e,o).value[t]}}function jC(e,t){var i
|
|
7377
|
+
return("number"==typeof t?tC:t instanceof O$?Y$:(i=O$(t))?(t=i,Y$):sC)(e,t)}function UC(e){return function(){this.removeAttribute(e)}}function GC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function WC(e,t,i){var o,n,s=i+""
|
|
7378
7378
|
return function(){var r=this.getAttribute(e)
|
|
7379
|
-
return r===s?null:r===o?n:n=t(o=r,i)}}function
|
|
7379
|
+
return r===s?null:r===o?n:n=t(o=r,i)}}function XC(e,t,i){var o,n,s=i+""
|
|
7380
7380
|
return function(){var r=this.getAttributeNS(e.space,e.local)
|
|
7381
|
-
return r===s?null:r===o?n:n=t(o=r,i)}}function
|
|
7381
|
+
return r===s?null:r===o?n:n=t(o=r,i)}}function KC(e,t,i){var o,n,s
|
|
7382
7382
|
return function(){var r,a,l=i(this)
|
|
7383
7383
|
if(null!=l)return(r=this.getAttribute(e))===(a=l+"")?null:r===o&&a===n?s:(n=a,s=t(o=r,l))
|
|
7384
|
-
this.removeAttribute(e)}}function
|
|
7384
|
+
this.removeAttribute(e)}}function YC(e,t,i){var o,n,s
|
|
7385
7385
|
return function(){var r,a,l=i(this)
|
|
7386
7386
|
if(null!=l)return(r=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:r===o&&a===n?s:(n=a,s=t(o=r,l))
|
|
7387
|
-
this.removeAttributeNS(e.space,e.local)}}function
|
|
7387
|
+
this.removeAttributeNS(e.space,e.local)}}function QC(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}function JC(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}function ek(e,t){var i,o
|
|
7388
7388
|
function n(){var n=t.apply(this,arguments)
|
|
7389
|
-
return n!==o&&(i=(o=n)&&
|
|
7389
|
+
return n!==o&&(i=(o=n)&&JC(e,n)),i}return n._value=t,n}function tk(e,t){var i,o
|
|
7390
7390
|
function n(){var n=t.apply(this,arguments)
|
|
7391
|
-
return n!==o&&(i=(o=n)&&
|
|
7392
|
-
return function(){
|
|
7393
|
-
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?
|
|
7391
|
+
return n!==o&&(i=(o=n)&&QC(e,n)),i}return n._value=t,n}function ik(e,t){return function(){LC(this,e).delay=+t.apply(this,arguments)}}function ok(e,t){return t=+t,function(){LC(this,e).delay=t}}function nk(e,t){return function(){DC(this,e).duration=+t.apply(this,arguments)}}function sk(e,t){return t=+t,function(){DC(this,e).duration=t}}function rk(e,t){if("function"!=typeof t)throw new Error
|
|
7392
|
+
return function(){DC(this,e).ease=t}}function ak(e,t,i){var o,n,s=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".")
|
|
7393
|
+
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?LC:DC
|
|
7394
7394
|
return function(){var r=s(this,e),a=r.on
|
|
7395
|
-
a!==o&&(n=(o=a).copy()).on(t,i),r.on=n}}var
|
|
7396
|
-
function
|
|
7395
|
+
a!==o&&(n=(o=a).copy()).on(t,i),r.on=n}}var lk=r$.prototype.constructor
|
|
7396
|
+
function ck(e){return function(){this.style.removeProperty(e)}}function dk(e,t,i){return function(o){this.style.setProperty(e,t.call(this,o),i)}}function hk(e,t,i){var o,n
|
|
7397
7397
|
function s(){var s=t.apply(this,arguments)
|
|
7398
|
-
return s!==n&&(o=(n=s)&&
|
|
7398
|
+
return s!==n&&(o=(n=s)&&dk(e,s,i)),o}return s._value=t,s}function uk(e){return function(t){this.textContent=e.call(this,t)}}function pk(e){var t,i
|
|
7399
7399
|
function o(){var o=e.apply(this,arguments)
|
|
7400
|
-
return o!==i&&(t=(i=o)&&
|
|
7401
|
-
function
|
|
7402
|
-
|
|
7403
|
-
"function"!=typeof e&&(e=
|
|
7404
|
-
for(var o=this._groups,n=o.length,s=new Array(n),r=0;r<n;++r)for(var a,l,c=o[r],d=c.length,h=s[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,
|
|
7405
|
-
return new
|
|
7406
|
-
"function"!=typeof e&&(e=
|
|
7407
|
-
for(var o=this._groups,n=o.length,s=[],r=[],a=0;a<n;++a)for(var l,c=o[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=e.call(l,l.__data__,h,c),g=
|
|
7408
|
-
s.push(p),r.push(l)}return new
|
|
7400
|
+
return o!==i&&(t=(i=o)&&uk(o)),t}return o._value=e,o}var gk=0
|
|
7401
|
+
function vk(e,t,i,o){this._groups=e,this._parents=t,this._name=i,this._id=o}function mk(){return++gk}var fk=r$.prototype
|
|
7402
|
+
vk.prototype={constructor:vk,select:function(e){var t=this._name,i=this._id
|
|
7403
|
+
"function"!=typeof e&&(e=ey(e))
|
|
7404
|
+
for(var o=this._groups,n=o.length,s=new Array(n),r=0;r<n;++r)for(var a,l,c=o[r],d=c.length,h=s[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,TC(h[u],t,i,u,h,zC(a,i)))
|
|
7405
|
+
return new vk(s,this._parents,t,i)},selectAll:function(e){var t=this._name,i=this._id
|
|
7406
|
+
"function"!=typeof e&&(e=oy(e))
|
|
7407
|
+
for(var o=this._groups,n=o.length,s=[],r=[],a=0;a<n;++a)for(var l,c=o[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=e.call(l,l.__data__,h,c),g=zC(l,i),v=0,m=p.length;v<m;++v)(u=p[v])&&TC(u,t,i,v,p,g)
|
|
7408
|
+
s.push(p),r.push(l)}return new vk(s,r,t,i)},selectChild:fk.selectChild,selectChildren:fk.selectChildren,filter:function(e){"function"!=typeof e&&(e=ny(e))
|
|
7409
7409
|
for(var t=this._groups,i=t.length,o=new Array(i),n=0;n<i;++n)for(var s,r=t[n],a=r.length,l=o[n]=[],c=0;c<a;++c)(s=r[c])&&e.call(s,s.__data__,c,r)&&l.push(s)
|
|
7410
|
-
return new
|
|
7410
|
+
return new vk(o,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error
|
|
7411
7411
|
for(var t=this._groups,i=e._groups,o=t.length,n=i.length,s=Math.min(o,n),r=new Array(o),a=0;a<s;++a)for(var l,c=t[a],d=i[a],h=c.length,u=r[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
|
|
7412
7412
|
for(;a<o;++a)r[a]=t[a]
|
|
7413
|
-
return new
|
|
7414
|
-
|
|
7415
|
-
return arguments.length<2?
|
|
7416
|
-
return this.attrTween(e,"function"==typeof t?(i.local?KC
|
|
7413
|
+
return new vk(r,this._parents,this._name,this._id)},selection:function(){return new lk(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,i=mk(),o=this._groups,n=o.length,s=0;s<n;++s)for(var r,a=o[s],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=zC(r,t)
|
|
7414
|
+
TC(r,e,i,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new vk(o,this._parents,e,i)},call:fk.call,nodes:fk.nodes,node:fk.node,size:fk.size,empty:fk.empty,each:fk.each,on:function(e,t){var i=this._id
|
|
7415
|
+
return arguments.length<2?zC(this.node(),i).on.on(e):this.each(ak(i,e,t))},attr:function(e,t){var i=Xx(e),o="transform"===i?gC:jC
|
|
7416
|
+
return this.attrTween(e,"function"==typeof t?(i.local?YC:KC)(i,o,qC(this,"attr."+e,t)):null==t?(i.local?GC:UC)(i):(i.local?XC:WC)(i,o,t))},attrTween:function(e,t){var i="attr."+e
|
|
7417
7417
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
7418
7418
|
if(null==t)return this.tween(i,null)
|
|
7419
7419
|
if("function"!=typeof t)throw new Error
|
|
7420
|
-
var o=
|
|
7421
|
-
return this.tween(i,(o.local?
|
|
7420
|
+
var o=Xx(e)
|
|
7421
|
+
return this.tween(i,(o.local?ek:tk)(o,t))},style:function(e,t,i){var o="transform"==(e+="")?pC:jC
|
|
7422
7422
|
return null==t?this.styleTween(e,function(e,t){var i,o,n
|
|
7423
|
-
return function(){var s=
|
|
7424
|
-
return s===r?null:s===i&&r===o?n:n=t(i=s,o=r)}}(e,o)).on("end.style."+e,
|
|
7425
|
-
return function(){var r=
|
|
7426
|
-
return null==a&&(this.style.removeProperty(e),l=a=
|
|
7427
|
-
return function(){var l=
|
|
7423
|
+
return function(){var s=Ry(this,e),r=(this.style.removeProperty(e),Ry(this,e))
|
|
7424
|
+
return s===r?null:s===i&&r===o?n:n=t(i=s,o=r)}}(e,o)).on("end.style."+e,ck(e)):"function"==typeof t?this.styleTween(e,function(e,t,i){var o,n,s
|
|
7425
|
+
return function(){var r=Ry(this,e),a=i(this),l=a+""
|
|
7426
|
+
return null==a&&(this.style.removeProperty(e),l=a=Ry(this,e)),r===l?null:r===o&&l===n?s:(n=l,s=t(o=r,a))}}(e,o,qC(this,"style."+e,t))).each(function(e,t){var i,o,n,s,r="style."+t,a="end."+r
|
|
7427
|
+
return function(){var l=DC(this,e),c=l.on,d=null==l.value[r]?s||(s=ck(t)):void 0
|
|
7428
7428
|
c===i&&n===d||(o=(i=c).copy()).on(a,n=d),l.on=o}}(this._id,e)):this.styleTween(e,function(e,t,i){var o,n,s=i+""
|
|
7429
|
-
return function(){var r=
|
|
7429
|
+
return function(){var r=Ry(this,e)
|
|
7430
7430
|
return r===s?null:r===o?n:n=t(o=r,i)}}(e,o,t),i).on("end.style."+e,null)},styleTween:function(e,t,i){var o="style."+(e+="")
|
|
7431
7431
|
if(arguments.length<2)return(o=this.tween(o))&&o._value
|
|
7432
7432
|
if(null==t)return this.tween(o,null)
|
|
7433
7433
|
if("function"!=typeof t)throw new Error
|
|
7434
|
-
return this.tween(o,
|
|
7435
|
-
this.textContent=null==t?"":t}}(
|
|
7434
|
+
return this.tween(o,hk(e,t,null==i?"":i))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this)
|
|
7435
|
+
this.textContent=null==t?"":t}}(qC(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text"
|
|
7436
7436
|
if(arguments.length<1)return(t=this.tween(t))&&t._value
|
|
7437
7437
|
if(null==e)return this.tween(t,null)
|
|
7438
7438
|
if("function"!=typeof e)throw new Error
|
|
7439
|
-
return this.tween(t,
|
|
7439
|
+
return this.tween(t,pk(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode
|
|
7440
7440
|
for(var i in this.__transition)if(+i!==e)return
|
|
7441
7441
|
t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var i=this._id
|
|
7442
|
-
if(e+="",arguments.length<2){for(var o,n=
|
|
7443
|
-
return null}return this.each((null==t?
|
|
7444
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
7445
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
7446
|
-
return arguments.length?this.each(
|
|
7442
|
+
if(e+="",arguments.length<2){for(var o,n=zC(this.node(),i).tween,s=0,r=n.length;s<r;++s)if((o=n[s]).name===e)return o.value
|
|
7443
|
+
return null}return this.each((null==t?NC:ZC)(i,e,t))},delay:function(e){var t=this._id
|
|
7444
|
+
return arguments.length?this.each(("function"==typeof e?ik:ok)(t,e)):zC(this.node(),t).delay},duration:function(e){var t=this._id
|
|
7445
|
+
return arguments.length?this.each(("function"==typeof e?nk:sk)(t,e)):zC(this.node(),t).duration},ease:function(e){var t=this._id
|
|
7446
|
+
return arguments.length?this.each(rk(t,e)):zC(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error
|
|
7447
7447
|
return this.each(function(e,t){return function(){var i=t.apply(this,arguments)
|
|
7448
7448
|
if("function"!=typeof i)throw new Error
|
|
7449
|
-
|
|
7449
|
+
DC(this,e).ease=i}}(this._id,e))},end:function(){var e,t,i=this,o=i._id,n=i.size()
|
|
7450
7450
|
return new Promise((function(s,r){var a={value:r},l={value:function(){0==--n&&s()}}
|
|
7451
|
-
i.each((function(){var i=
|
|
7452
|
-
n!==e&&((t=(e=n).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),i.on=t})),0===n&&s()}))},[Symbol.iterator]:
|
|
7453
|
-
var
|
|
7454
|
-
function
|
|
7455
|
-
return i}
|
|
7456
|
-
e instanceof
|
|
7457
|
-
for(var o=this._groups,n=o.length,s=0;s<n;++s)for(var r,a=o[s],l=a.length,c=0;c<l;++c)(r=a[c])&&
|
|
7458
|
-
return new
|
|
7459
|
-
var
|
|
7460
|
-
function
|
|
7461
|
-
var
|
|
7462
|
-
function
|
|
7463
|
-
return e.__zoom}function
|
|
7464
|
-
return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function
|
|
7465
|
-
return e.translate(n>o?(o+n)/2:Math.min(0,o)||Math.max(0,n),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}
|
|
7466
|
-
const
|
|
7451
|
+
i.each((function(){var i=DC(this,o),n=i.on
|
|
7452
|
+
n!==e&&((t=(e=n).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),i.on=t})),0===n&&s()}))},[Symbol.iterator]:fk[Symbol.iterator]}
|
|
7453
|
+
var bk={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}}
|
|
7454
|
+
function wk(e,t){for(var i;!(i=e.__transition)||!(i=i[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`)
|
|
7455
|
+
return i}r$.prototype.interrupt=function(e){return this.each((function(){BC(this,e)}))},r$.prototype.transition=function(e){var t,i
|
|
7456
|
+
e instanceof vk?(t=e._id,e=e._name):(t=mk(),(i=bk).time=IC(),e=null==e?null:e+"")
|
|
7457
|
+
for(var o=this._groups,n=o.length,s=0;s<n;++s)for(var r,a=o[s],l=a.length,c=0;c<l;++c)(r=a[c])&&TC(r,e,t,c,a,i||wk(r,t))
|
|
7458
|
+
return new vk(o,this._parents,e,t)}
|
|
7459
|
+
var xk=e=>()=>e
|
|
7460
|
+
function yk(e,{sourceEvent:t,target:i,transform:o,dispatch:n}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:n}})}function $k(e,t,i){this.k=e,this.x=t,this.y=i}$k.prototype={constructor:$k,scale:function(e){return 1===e?this:new $k(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new $k(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
|
|
7461
|
+
var Ck=new $k(1,0,0)
|
|
7462
|
+
function kk(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ck
|
|
7463
|
+
return e.__zoom}function Sk(e){e.stopImmediatePropagation()}function _k(e){e.preventDefault(),e.stopImmediatePropagation()}function Ik(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function Rk(){var e=this
|
|
7464
|
+
return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function Mk(){return this.__zoom||Ck}function Ak(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ok(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ek(e,t,i){var o=e.invertX(t[0][0])-i[0][0],n=e.invertX(t[1][0])-i[1][0],s=e.invertY(t[0][1])-i[0][1],r=e.invertY(t[1][1])-i[1][1]
|
|
7465
|
+
return e.translate(n>o?(o+n)/2:Math.min(0,o)||Math.max(0,n),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}kk.prototype=$k.prototype
|
|
7466
|
+
const Vk=G`
|
|
7467
7467
|
<div class="wafer-map-container">
|
|
7468
7468
|
<svg class="svg-root">
|
|
7469
7469
|
<g ${_e("zoomContainer")} transform=${e=>e.transform.toString()}>
|
|
@@ -7493,7 +7493,7 @@ const Ek=G`
|
|
|
7493
7493
|
/>
|
|
7494
7494
|
</svg>
|
|
7495
7495
|
</div>
|
|
7496
|
-
`,
|
|
7496
|
+
`,Fk=me`
|
|
7497
7497
|
:host {
|
|
7498
7498
|
display: inline-block;
|
|
7499
7499
|
width: 500px;
|
|
@@ -7577,68 +7577,68 @@ const Ek=G`
|
|
|
7577
7577
|
outline-width: 0px;
|
|
7578
7578
|
}
|
|
7579
7579
|
`
|
|
7580
|
-
function
|
|
7580
|
+
function Hk(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Pk(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Tk(e){let t,i,o
|
|
7581
7581
|
function n(e,o,n=0,s=e.length){if(n<s){if(0!==t(o,o))return s
|
|
7582
7582
|
do{const t=n+s>>>1
|
|
7583
|
-
i(e[t],o)<0?n=t+1:s=t}while(n<s)}return n}return 2!==e.length?(t=
|
|
7583
|
+
i(e[t],o)<0?n=t+1:s=t}while(n<s)}return n}return 2!==e.length?(t=Hk,i=(t,i)=>Hk(e(t),i),o=(t,i)=>e(t)-i):(t=e===Hk||e===Pk?e:Lk,i=e,o=e),{left:n,center:function(e,t,i=0,s=e.length){const r=n(e,t,i,s-1)
|
|
7584
7584
|
return r>i&&o(e[r-1],t)>-o(e[r],t)?r-1:r},right:function(e,o,n=0,s=e.length){if(n<s){if(0!==t(o,o))return s
|
|
7585
7585
|
do{const t=n+s>>>1
|
|
7586
|
-
i(e[t],o)<=0?n=t+1:s=t}while(n<s)}return n}}}function
|
|
7587
|
-
|
|
7588
|
-
var zk
|
|
7589
|
-
class
|
|
7586
|
+
i(e[t],o)<=0?n=t+1:s=t}while(n<s)}return n}}}function Lk(){return 0}function Dk(e){return null===e?NaN:+e}const zk=Tk(Hk).right
|
|
7587
|
+
Tk(Dk).center
|
|
7588
|
+
var Bk=zk
|
|
7589
|
+
class Nk extends Map{constructor(e,t=qk){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,i]of e)this.set(t,i)}get(e){return super.get(Zk(this,e))}has(e){return super.has(Zk(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},i){const o=t(i)
|
|
7590
7590
|
return e.has(o)?e.get(o):(e.set(o,i),i)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},i){const o=t(i)
|
|
7591
7591
|
e.has(o)&&(i=e.get(o),e.delete(o))
|
|
7592
|
-
return i}(this,e))}}function
|
|
7593
|
-
return e.has(o)?e.get(o):i}function
|
|
7594
|
-
function
|
|
7592
|
+
return i}(this,e))}}function Zk({_intern:e,_key:t},i){const o=t(i)
|
|
7593
|
+
return e.has(o)?e.get(o):i}function qk(e){return null!==e&&"object"==typeof e?e.valueOf():e}const jk=Math.sqrt(50),Uk=Math.sqrt(10),Gk=Math.sqrt(2)
|
|
7594
|
+
function Wk(e,t,i){const o=(t-e)/Math.max(0,i),n=Math.floor(Math.log10(o)),s=o/Math.pow(10,n),r=s>=jk?10:s>=Uk?5:s>=Gk?2:1
|
|
7595
7595
|
let a,l,c
|
|
7596
|
-
return n<0?(c=Math.pow(10,-n)/r,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*r,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=i&&i<2?
|
|
7596
|
+
return n<0?(c=Math.pow(10,-n)/r,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,n)*r,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=i&&i<2?Wk(e,t,2*i):[a,l,c]}function Xk(e,t,i){return Wk(e=+e,t=+t,i=+i)[2]}function Kk(e,t,i=Dk){if((o=e.length)&&!isNaN(t=+t)){if(t<=0||o<2)return+i(e[0],0,e)
|
|
7597
7597
|
if(t>=1)return+i(e[o-1],o-1,e)
|
|
7598
7598
|
var o,n=(o-1)*t,s=Math.floor(n),r=+i(e[s],s,e)
|
|
7599
|
-
return r+(+i(e[s+1],s+1,e)-r)*(n-s)}}function
|
|
7599
|
+
return r+(+i(e[s+1],s+1,e)-r)*(n-s)}}function Yk(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i
|
|
7600
7600
|
for(var o=-1,n=0|Math.max(0,Math.ceil((t-e)/i)),s=new Array(n);++o<n;)s[o]=e+o*i
|
|
7601
|
-
return s}function
|
|
7601
|
+
return s}function Qk(e,t){switch(arguments.length){case 0:break
|
|
7602
7602
|
case 1:this.range(e)
|
|
7603
7603
|
break
|
|
7604
|
-
default:this.range(t).domain(e)}return this}const
|
|
7605
|
-
function
|
|
7604
|
+
default:this.range(t).domain(e)}return this}const Jk=Symbol("implicit")
|
|
7605
|
+
function eS(){var e=new Nk,t=[],i=[],o=Jk
|
|
7606
7606
|
function n(n){let s=e.get(n)
|
|
7607
|
-
if(void 0===s){if(o!==
|
|
7607
|
+
if(void 0===s){if(o!==Jk)return o
|
|
7608
7608
|
e.set(n,s=t.push(n)-1)}return i[s%i.length]}return n.domain=function(i){if(!arguments.length)return t.slice()
|
|
7609
|
-
t=[],e=new
|
|
7609
|
+
t=[],e=new Nk
|
|
7610
7610
|
for(const o of i)e.has(o)||e.set(o,t.push(o)-1)
|
|
7611
|
-
return n},n.range=function(e){return arguments.length?(i=Array.from(e),n):i.slice()},n.unknown=function(e){return arguments.length?(o=e,n):o},n.copy=function(){return
|
|
7611
|
+
return n},n.range=function(e){return arguments.length?(i=Array.from(e),n):i.slice()},n.unknown=function(e){return arguments.length?(o=e,n):o},n.copy=function(){return eS(t,i).unknown(o)},Qk.apply(n,arguments),n}function tS(){var e,t,i=eS().unknown(void 0),o=i.domain,n=i.range,s=0,r=1,a=!1,l=0,c=0,d=.5
|
|
7612
7612
|
function h(){var i=o().length,h=r<s,u=h?r:s,p=h?s:r
|
|
7613
7613
|
e=(p-u)/Math.max(1,i-l+2*c),a&&(e=Math.floor(e)),u+=(p-u-e*(i-l))*d,t=e*(1-l),a&&(u=Math.round(u),t=Math.round(t))
|
|
7614
|
-
var g=
|
|
7615
|
-
return n(h?g.reverse():g)}return delete i.unknown,i.domain=function(e){return arguments.length?(o(e),h()):o()},i.range=function(e){return arguments.length?([s,r]=e,s=+s,r=+r,h()):[s,r]},i.rangeRound=function(e){return[s,r]=e,s=+s,r=+r,a=!0,h()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(e){return arguments.length?(a=!!e,h()):a},i.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},i.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},i.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},i.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},i.copy=function(){return
|
|
7616
|
-
function
|
|
7617
|
-
var i}function
|
|
7618
|
-
return n<o?(o=
|
|
7619
|
-
for(e[o]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++r<o;)n[r]=
|
|
7620
|
-
return function(t){var i=
|
|
7621
|
-
return s[i](n[i](t))}}function
|
|
7614
|
+
var g=Yk(i).map((function(t){return u+e*t}))
|
|
7615
|
+
return n(h?g.reverse():g)}return delete i.unknown,i.domain=function(e){return arguments.length?(o(e),h()):o()},i.range=function(e){return arguments.length?([s,r]=e,s=+s,r=+r,h()):[s,r]},i.rangeRound=function(e){return[s,r]=e,s=+s,r=+r,a=!0,h()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(e){return arguments.length?(a=!!e,h()):a},i.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},i.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},i.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},i.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},i.copy=function(){return tS(o(),[s,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},Qk.apply(h(),arguments)}function iS(e){return+e}var oS=[0,1]
|
|
7616
|
+
function nS(e){return e}function sS(e,t){return(t-=e=+e)?function(i){return(i-e)/t}:(i=isNaN(t)?NaN:.5,function(){return i})
|
|
7617
|
+
var i}function rS(e,t,i){var o=e[0],n=e[1],s=t[0],r=t[1]
|
|
7618
|
+
return n<o?(o=sS(n,o),s=i(r,s)):(o=sS(o,n),s=i(s,r)),function(e){return s(o(e))}}function aS(e,t,i){var o=Math.min(e.length,t.length)-1,n=new Array(o),s=new Array(o),r=-1
|
|
7619
|
+
for(e[o]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++r<o;)n[r]=sS(e[r],e[r+1]),s[r]=i(t[r],t[r+1])
|
|
7620
|
+
return function(t){var i=Bk(e,t,1,o)-1
|
|
7621
|
+
return s[i](n[i](t))}}function lS(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function cS(){var e,t,i,o,n,s,r=oS,a=oS,l=rC,c=nS
|
|
7622
7622
|
function d(){var e,t,i,l=Math.min(r.length,a.length)
|
|
7623
|
-
return c!==
|
|
7623
|
+
return c!==nS&&(e=r[0],t=r[l-1],e>t&&(i=e,e=t,t=i),c=function(i){return Math.max(e,Math.min(t,i))}),o=l>2?aS:rS,n=s=null,h}function h(t){return null==t||isNaN(t=+t)?i:(n||(n=o(r.map(e),a,l)))(e(c(t)))}return h.invert=function(i){return c(t((s||(s=o(a,r.map(e),tC)))(i)))},h.domain=function(e){return arguments.length?(r=Array.from(e,iS),d()):r.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),d()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=aC,d()},h.clamp=function(e){return arguments.length?(c=!!e||nS,d()):c!==nS},h.interpolate=function(e){return arguments.length?(l=e,d()):l},h.unknown=function(e){return arguments.length?(i=e,h):i},function(i,o){return e=i,t=o,d()}}function dS(){return cS()(nS,nS)}function hS(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null
|
|
7624
7624
|
var i,o=e.slice(0,i)
|
|
7625
|
-
return[o.length>1?o[0]+o.slice(2):o,+e.slice(i+1)]}function
|
|
7626
|
-
function
|
|
7625
|
+
return[o.length>1?o[0]+o.slice(2):o,+e.slice(i+1)]}function uS(e){return(e=hS(Math.abs(e)))?e[1]:NaN}var pS,gS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
7626
|
+
function vS(e){if(!(t=gS.exec(e)))throw new Error("invalid format: "+e)
|
|
7627
7627
|
var t
|
|
7628
|
-
return new
|
|
7628
|
+
return new mS({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function mS(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function fS(e,t){var i=hS(e,t)
|
|
7629
7629
|
if(!i)return e+""
|
|
7630
7630
|
var o=i[0],n=i[1]
|
|
7631
|
-
return n<0?"0."+new Array(-n).join("0")+o:o.length>n+1?o.slice(0,n+1)+"."+o.slice(n+1):o+new Array(n-o.length+2).join("0")}
|
|
7632
|
-
var
|
|
7631
|
+
return n<0?"0."+new Array(-n).join("0")+o:o.length>n+1?o.slice(0,n+1)+"."+o.slice(n+1):o+new Array(n-o.length+2).join("0")}vS.prototype=mS.prototype,mS.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}
|
|
7632
|
+
var bS={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>fS(100*e,t),r:fS,s:function(e,t){var i=hS(e,t)
|
|
7633
7633
|
if(!i)return e+""
|
|
7634
|
-
var o=i[0],n=i[1],s=n-(
|
|
7635
|
-
return s===r?o:s>r?o+new Array(s-r+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+
|
|
7636
|
-
function
|
|
7637
|
-
function
|
|
7638
|
-
return s.reverse().join(i)}),n=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?
|
|
7639
|
-
function h(e){var t=(e=
|
|
7640
|
-
"n"===b?(v=!0,b="g"):
|
|
7641
|
-
var w="$"===u?n:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===u?s:/[%p]/.test(b)?l:"",y=
|
|
7634
|
+
var o=i[0],n=i[1],s=n-(pS=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,r=o.length
|
|
7635
|
+
return s===r?o:s>r?o+new Array(s-r+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+hS(e,Math.max(0,t+s-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}
|
|
7636
|
+
function wS(e){return e}var xS,yS,$S,CS=Array.prototype.map,kS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
7637
|
+
function SS(e){var t,i,o=void 0===e.grouping||void 0===e.thousands?wS:(t=CS.call(e.grouping,Number),i=e.thousands+"",function(e,o){for(var n=e.length,s=[],r=0,a=t[0],l=0;n>0&&a>0&&(l+a+1>o&&(a=Math.max(1,o-l)),s.push(e.substring(n-=a,n+a)),!((l+=a+1)>o));)a=t[r=(r+1)%t.length]
|
|
7638
|
+
return s.reverse().join(i)}),n=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?wS:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(CS.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",d=void 0===e.nan?"NaN":e.nan+""
|
|
7639
|
+
function h(e){var t=(e=vS(e)).fill,i=e.align,h=e.sign,u=e.symbol,p=e.zero,g=e.width,v=e.comma,m=e.precision,f=e.trim,b=e.type
|
|
7640
|
+
"n"===b?(v=!0,b="g"):bS[b]||(void 0===m&&(m=12),f=!0,b="g"),(p||"0"===t&&"="===i)&&(p=!0,t="0",i="=")
|
|
7641
|
+
var w="$"===u?n:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===u?s:/[%p]/.test(b)?l:"",y=bS[b],$=/[defgprs%]/.test(b)
|
|
7642
7642
|
function C(e){var n,s,l,u=w,C=x
|
|
7643
7643
|
if("c"===b)C=y(e)+C,e=""
|
|
7644
7644
|
else{var k=(e=+e)<0||1/e<0
|
|
@@ -7647,7 +7647,7 @@ break
|
|
|
7647
7647
|
case"0":0===n&&(n=o),t=o
|
|
7648
7648
|
break
|
|
7649
7649
|
default:if(!+e[o])break e
|
|
7650
|
-
n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==h&&(k=!1),u=(k?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?
|
|
7650
|
+
n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==h&&(k=!1),u=(k?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?kS[8+pS/3]:"")+C+(k&&"("===h?")":""),$)for(n=-1,s=e.length;++n<s;)if(48>(l=e.charCodeAt(n))||l>57){C=(46===l?r+e.slice(n+1):e.slice(n))+C,e=e.slice(0,n)
|
|
7651
7651
|
break}}v&&!p&&(e=o(e,1/0))
|
|
7652
7652
|
var S=u.length+e.length+C.length,_=S<g?new Array(g-S+1).join(t):""
|
|
7653
7653
|
switch(v&&p&&(e=o(_+e,_.length?g-C.length:1/0),_=""),i){case"<":e=u+e+C+_
|
|
@@ -7656,19 +7656,19 @@ case"=":e=u+_+e+C
|
|
|
7656
7656
|
break
|
|
7657
7657
|
case"^":e=_.slice(0,S=_.length>>1)+u+e+C+_.slice(S)
|
|
7658
7658
|
break
|
|
7659
|
-
default:e=_+u+e+C}return a(e)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var i=h(((e=
|
|
7660
|
-
return function(e){return i(n*e)+s}}}}function
|
|
7661
|
-
const o=(t=+t)<(e=+e),n=o?
|
|
7659
|
+
default:e=_+u+e+C}return a(e)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var i=h(((e=vS(e)).type="f",e)),o=3*Math.max(-8,Math.min(8,Math.floor(uS(t)/3))),n=Math.pow(10,-o),s=kS[8+o/3]
|
|
7660
|
+
return function(e){return i(n*e)+s}}}}function _S(e,t,i,o){var n,s=function(e,t,i){i=+i
|
|
7661
|
+
const o=(t=+t)<(e=+e),n=o?Xk(t,e,i):Xk(e,t,i)
|
|
7662
7662
|
return(o?-1:1)*(n<0?1/-n:n)}(e,t,i)
|
|
7663
|
-
switch((o=
|
|
7664
|
-
return null!=o.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
7665
|
-
case"":case"e":case"g":case"p":case"r":null!=o.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,
|
|
7663
|
+
switch((o=vS(null==o?",f":o)).type){case"s":var r=Math.max(Math.abs(e),Math.abs(t))
|
|
7664
|
+
return null!=o.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(uS(t)/3)))-uS(Math.abs(e)))}(s,r))||(o.precision=n),$S(o,r)
|
|
7665
|
+
case"":case"e":case"g":case"p":case"r":null!=o.precision||isNaN(n=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,uS(t)-uS(e))+1}(s,Math.max(Math.abs(e),Math.abs(t))))||(o.precision=n-("e"===o.type))
|
|
7666
7666
|
break
|
|
7667
|
-
case"f":case"%":null!=o.precision||isNaN(n=function(e){return Math.max(0,-
|
|
7667
|
+
case"f":case"%":null!=o.precision||isNaN(n=function(e){return Math.max(0,-uS(Math.abs(e)))}(s))||(o.precision=n-2*("%"===o.type))}return yS(o)}function IS(e){var t=e.domain
|
|
7668
7668
|
return e.ticks=function(e){var i=t()
|
|
7669
7669
|
return function(e,t,i){if(!((i=+i)>0))return[]
|
|
7670
7670
|
if((e=+e)==(t=+t))return[e]
|
|
7671
|
-
const o=t<e,[n,s,r]=o?
|
|
7671
|
+
const o=t<e,[n,s,r]=o?Wk(t,e,i):Wk(e,t,i)
|
|
7672
7672
|
if(!(s>=n))return[]
|
|
7673
7673
|
const a=s-n+1,l=new Array(a)
|
|
7674
7674
|
if(o)if(r<0)for(let e=0;e<a;++e)l[e]=(s-e)/-r
|
|
@@ -7676,85 +7676,85 @@ else for(let e=0;e<a;++e)l[e]=(s-e)*r
|
|
|
7676
7676
|
else if(r<0)for(let e=0;e<a;++e)l[e]=(n+e)/-r
|
|
7677
7677
|
else for(let e=0;e<a;++e)l[e]=(n+e)*r
|
|
7678
7678
|
return l}(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var o=t()
|
|
7679
|
-
return
|
|
7679
|
+
return _S(o[0],o[o.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10)
|
|
7680
7680
|
var o,n,s=t(),r=0,a=s.length-1,l=s[r],c=s[a],d=10
|
|
7681
|
-
for(c<l&&(n=l,l=c,c=n,n=r,r=a,a=n);d-- >0;){if((n=
|
|
7681
|
+
for(c<l&&(n=l,l=c,c=n,n=r,r=a,a=n);d-- >0;){if((n=Xk(l,c,i))===o)return s[r]=l,s[a]=c,t(s)
|
|
7682
7682
|
if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n
|
|
7683
7683
|
else{if(!(n<0))break
|
|
7684
|
-
l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}o=n}return e},e}function
|
|
7685
|
-
return e.copy=function(){return
|
|
7684
|
+
l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}o=n}return e},e}function RS(){var e=dS()
|
|
7685
|
+
return e.copy=function(){return lS(e,RS())},Qk.apply(e,arguments),IS(e)}function MS(){var e,t=[],i=[],o=[]
|
|
7686
7686
|
function n(){var e=0,n=Math.max(1,i.length)
|
|
7687
|
-
for(o=new Array(n-1);++e<n;)o[e-1]=
|
|
7688
|
-
return s}function s(t){return null==t||isNaN(t=+t)?e:i[
|
|
7687
|
+
for(o=new Array(n-1);++e<n;)o[e-1]=Kk(t,e/n)
|
|
7688
|
+
return s}function s(t){return null==t||isNaN(t=+t)?e:i[Bk(o,t)]}return s.invertExtent=function(e){var n=i.indexOf(e)
|
|
7689
7689
|
return n<0?[NaN,NaN]:[n>0?o[n-1]:t[0],n<o.length?o[n]:t[t.length-1]]},s.domain=function(e){if(!arguments.length)return t.slice()
|
|
7690
7690
|
t=[]
|
|
7691
7691
|
for(let i of e)null==i||isNaN(i=+i)||t.push(i)
|
|
7692
|
-
return t.sort(
|
|
7693
|
-
const
|
|
7694
|
-
class
|
|
7692
|
+
return t.sort(Hk),n()},s.range=function(e){return arguments.length?(i=Array.from(e),n()):i.slice()},s.unknown=function(t){return arguments.length?(e=t,s):e},s.quantiles=function(){return o.slice()},s.copy=function(){return MS().domain(t).range(i).unknown(e)},Qk.apply(s,arguments)}xS=SS({thousands:",",grouping:[3],currency:["$",""]}),yS=xS.format,$S=xS.formatPrefix
|
|
7693
|
+
const AS="bottom-left",OS="bottom-right",ES="top-left",VS="top-right",FS="top",HS="show",PS="hide",TS="linear",LS="ordinal"
|
|
7694
|
+
class DS{constructor(e){this.defaultPadding=0,this.baseMarginPercentage=.04
|
|
7695
7695
|
const t={width:e.canvasWidth,height:e.canvasHeight},i=this.calculateGridDimensions(e.dies),o=Math.min(t.width,t.height),n={top:(t.height-o)/2,right:(t.width-o)/2,bottom:(t.height-o)/2,left:(t.width-o)/2},s={top:o*this.baseMarginPercentage,right:o*this.baseMarginPercentage,bottom:o*this.baseMarginPercentage,left:o*this.baseMarginPercentage}
|
|
7696
7696
|
this.margin=this.calculateMarginAddition(s,n),this.containerDimensions=this.calculateContainerDimensions(t,this.margin)
|
|
7697
7697
|
const r=Math.min(this.containerDimensions.width,this.containerDimensions.height)
|
|
7698
7698
|
this.horizontalScale=this.createHorizontalScale(e.quadrant,i,r),this.invertedHorizontalScale=this.createInvertedHorizontalScale(e.quadrant,i,r),this.verticalScale=this.createVerticalScale(e.quadrant,i,r),this.invertedVerticalScale=this.createInvertedVerticalScale(e.quadrant,i,r),this.dieDimensions={width:this.horizontalScale.bandwidth(),height:this.verticalScale.bandwidth()},this.radius=r/2}calculateGridDimensions(e){if(0===e.length||void 0===e[0])return{origin:{x:0,y:0},rows:0,cols:0}
|
|
7699
7699
|
const t={x:e[0].x,y:e[0].y},i={x:e[0].x,y:e[0].y}
|
|
7700
7700
|
for(const o of e)o.x<t.x&&(t.x=o.x),o.y<t.y&&(t.y=o.y),o.x>i.x&&(i.x=o.x),o.y>i.y&&(i.y=o.y)
|
|
7701
|
-
return{origin:t,rows:i.y-t.y+1,cols:i.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,i){const o=
|
|
7702
|
-
return e===
|
|
7703
|
-
return e===
|
|
7704
|
-
return e===
|
|
7705
|
-
return e===
|
|
7701
|
+
return{origin:t,rows:i.y-t.y+1,cols:i.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,i){const o=tS().domain(Yk(t.origin.x,t.origin.x+t.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
7702
|
+
return e===AS||e===ES?o.range([0,i]):o.range([i,0])}createInvertedHorizontalScale(e,t,i){const o=MS().domain([0,i])
|
|
7703
|
+
return e===AS||e===ES?o.range(Yk(t.origin.x,t.origin.x+t.cols)):o.range(Yk(t.origin.x,t.origin.x+t.cols).reverse())}createVerticalScale(e,t,i){const o=tS().domain(Yk(t.origin.y,t.origin.y+t.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
7704
|
+
return e===AS||e===OS?o.range([i,0]):o.range([0,i])}createInvertedVerticalScale(e,t,i){const o=MS().domain([0,i])
|
|
7705
|
+
return e===AS||e===OS?o.range(Yk(t.origin.y,t.origin.y+t.rows).reverse()):o.range(Yk(t.origin.y,t.origin.y+t.rows))}calculateMarginAddition(e,t){return{top:e.top+t.top,right:e.right+t.right,bottom:e.bottom+t.bottom,left:e.left+t.left}}}class zS{constructor(e,t,i,o,n){this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)",this.d3ColorScale=this.createD3ColorScale(e.colorScale,e.colorScaleMode),this.labelsFontSize=this.calculateLabelsFontSize(o,e.maxCharacters),this.diesRenderInfo=[]
|
|
7706
7706
|
for(const o of e.dies){const s=t(o.x)??0,r=i(o.y)??0
|
|
7707
|
-
this.diesRenderInfo.push({x:s+n.right,y:r+n.top,fillStyle:this.calculateFillStyle(o.value,e.colorScaleMode,e.highlightedValues),text:this.buildLabel(o.value,e.maxCharacters,e.dieLabelsHidden,e.dieLabelsSuffix)})}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?
|
|
7707
|
+
this.diesRenderInfo.push({x:s+n.right,y:r+n.top,fillStyle:this.calculateFillStyle(o.value,e.colorScaleMode,e.highlightedValues),text:this.buildLabel(o.value,e.maxCharacters,e.dieLabelsHidden,e.dieLabelsSuffix)})}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?RS().domain(e.values.map((e=>+e))).range(e.colors):eS().domain(e.values).range(e.colors)}dieHasData(e){return null!=e&&""!==e}buildLabel(e,t,i,o){if(i||!this.dieHasData(e))return""
|
|
7708
7708
|
const n=`${e}${o}`
|
|
7709
|
-
return n.length>t?`${n.substring(0,t)}…`:n}calculateOpacity(e,t){return t.length>0&&!t.some((t=>t===e))?this.nonHighlightedOpacity:1}isColorScaleLinear(e){return e===
|
|
7709
|
+
return n.length>t?`${n.substring(0,t)}…`:n}calculateOpacity(e,t){return t.length>0&&!t.some((t=>t===e))?this.nonHighlightedOpacity:1}isColorScaleLinear(e){return e===TS}isColorScaleOrdinal(e){return e===LS}calculateFillStyle(e,t,i){let o=this.emptyDieColor
|
|
7710
7710
|
if(this.dieHasData(e)&&(isNaN(+e)?o=this.nanDieColor:this.isColorScaleLinear(t)?o=this.d3ColorScale(+e):this.isColorScaleOrdinal(t)&&(o=this.d3ColorScale(e))),void 0===o)return this.emptyDieColor
|
|
7711
7711
|
let n=Fn(o)
|
|
7712
|
-
return null===n?this.emptyDieColor:(n=new _n(n.r,n.g,n.b,this.calculateOpacity(e,i)),n.toStringWebRGBA())}}class
|
|
7712
|
+
return null===n?this.emptyDieColor:(n=new _n(n.r,n.g,n.b,this.calculateOpacity(e,i)),n.toStringWebRGBA())}}class BS{constructor(e){this.computations=new DS(e),this.prerendering=new zS(e,this.horizontalScale,this.verticalScale,this.dieDimensions,this.margin),this.dataMap=new Map(e.dies.map((e=>[`${e.x}_${e.y}`,e])))}get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}getWaferMapDie(e){return this.dataMap.get(`${e.x}_${e.y}`)}}class NS{constructor(e){this.wafermap=e,this.dies=e.dataManager.diesRenderInfo,this.dimensions=e.dataManager.dieDimensions,this.labelFontSize=e.dataManager.labelsFontSize}drawWafer(){this.wafermap.canvasContext.save(),this.clearCanvas(),this.scaleCanvas(),this.renderDies(),this.renderText(),this.wafermap.canvasContext.restore(),this.renderHover()}renderHover(){this.wafermap.hoverWidth=this.wafermap.dataManager.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.dataManager.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?PS:HS,this.wafermap.hoverTransform=this.calculateHoverTransform()}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const e=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x),t=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y),i=this.wafermap.transform.apply([e+this.wafermap.dataManager.margin.left,t+this.wafermap.dataManager.margin.top])
|
|
7713
7713
|
return`translate(${i[0]}, ${i[1]})`}return""}renderDies(){let e
|
|
7714
7714
|
this.dies.sort(((e,t)=>e.fillStyle>t.fillStyle?1:t.fillStyle>e.fillStyle?-1:0))
|
|
7715
7715
|
for(const t of this.dies)e||(this.wafermap.canvasContext.fillStyle=t.fillStyle),e&&t.fillStyle!==e.fillStyle&&t.fillStyle&&(this.wafermap.canvasContext.fillStyle=t.fillStyle),this.wafermap.canvasContext.fillRect(t.x,t.y,this.dimensions.width,this.dimensions.height),e=t}renderText(){const e=this.dimensions.width*this.dimensions.height*(this.wafermap.transform.k||1),t=this.labelFontSize
|
|
7716
7716
|
this.wafermap.canvasContext.font=`${t.toString()}px sans-serif`,this.wafermap.canvasContext.fillStyle="#ffffff",this.wafermap.canvasContext.textAlign="center",this.wafermap.canvasContext.lineCap="butt"
|
|
7717
7717
|
const i=this.wafermap.canvasContext.measureText("M")
|
|
7718
|
-
if(e>=50)for(const e of this.dies)this.wafermap.canvasContext.fillText(e.text,e.x+this.dimensions.width/2,e.y+this.dimensions.height/2+i.width/2,this.dimensions.width-this.dimensions.width/100*20)}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvasWidth*this.wafermap.transform.k,this.wafermap.canvasHeight*this.wafermap.transform.k)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}}class
|
|
7719
|
-
t.k===this.minScale?(this.zoomTransform
|
|
7720
|
-
function m(e){e.property("__zoom",
|
|
7721
|
-
return o===e.x&&n===e.y?e:new
|
|
7718
|
+
if(e>=50)for(const e of this.dies)this.wafermap.canvasContext.fillText(e.text,e.x+this.dimensions.width/2,e.y+this.dimensions.height/2+i.width/2,this.dimensions.width-this.dimensions.width/100*20)}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvasWidth*this.wafermap.transform.k,this.wafermap.canvasHeight*this.wafermap.transform.k)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}}class ZS{constructor(e){this.wafermap=e,this.zoomTransform=Ck,this.minScale=1.1,this.minExtentPoint=[-100,-100],this.extentPadding=100,this.zoomBehavior=this.createZoomBehavior(),this.zoomBehavior(a$(this.wafermap.canvas))}rescale(e){const t=e.transform
|
|
7719
|
+
t.k===this.minScale?(this.zoomTransform=Ck,this.zoomBehavior.transform(a$(this.wafermap.canvas),Ck)):this.zoomTransform=t,this.wafermap.transform=this.zoomTransform}createZoomBehavior(){const e=function(){var e,t,i,o=Ik,n=Rk,s=Ek,r=Ak,a=Ok,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=bC,u=Nx("start","zoom","end"),p=500,g=0,v=10
|
|
7720
|
+
function m(e){e.property("__zoom",Mk).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",S).filter(a).on("touchstart.zoom",_).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new $k(t,e.x,e.y)}function b(e,t,i){var o=t[0]-i[0]*e.k,n=t[1]-i[1]*e.k
|
|
7721
|
+
return o===e.x&&n===e.y?e:new $k(e.k,o,n)}function w(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,i,o){e.on("start.zoom",(function(){y(this,arguments).event(o).start()})).on("interrupt.zoom end.zoom",(function(){y(this,arguments).event(o).end()})).tween("zoom",(function(){var e=this,s=arguments,r=y(e,s).event(o),a=n.apply(e,s),l=null==i?w(a):"function"==typeof i?i.apply(e,s):i,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=e.__zoom,u="function"==typeof t?t.apply(e,s):t,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
|
|
7722
7722
|
return function(e){if(1===e)e=u
|
|
7723
7723
|
else{var t=p(e),i=c/t[2]
|
|
7724
|
-
e=new
|
|
7724
|
+
e=new $k(i,l[0]-t[0]*i,l[1]-t[1]*i)}r.zoom(null,e)}}))}function y(e,t,i){return!i&&e.__zooming||new $(e,t)}function $(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=n.apply(e,t),this.taps=0}function C(e,...t){if(o.apply(this,arguments)){var i=y(this,t).event(e),n=this.__zoom,a=Math.max(l[0],Math.min(l[1],n.k*Math.pow(2,r.apply(this,arguments)))),d=l$(e)
|
|
7725
7725
|
if(i.wheel)i.mouse[0][0]===d[0]&&i.mouse[0][1]===d[1]||(i.mouse[1]=n.invert(i.mouse[0]=d)),clearTimeout(i.wheel)
|
|
7726
7726
|
else{if(n.k===a)return
|
|
7727
|
-
i.mouse=[d,n.invert(d)],
|
|
7728
|
-
|
|
7729
|
-
r.moved=t*t+i*i>g}r.event(e).zoom("mouse",s(b(r.that.__zoom,r.mouse[0]=
|
|
7730
|
-
|
|
7731
|
-
for(
|
|
7732
|
-
e&&(e=clearTimeout(e)),s&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),
|
|
7733
|
-
for(
|
|
7727
|
+
i.mouse=[d,n.invert(d)],BC(this),i.start()}_k(e),i.wheel=setTimeout(h,150),i.zoom("mouse",s(b(f(n,a),i.mouse[0],i.mouse[1]),i.extent,c))}function h(){i.wheel=null,i.end()}}function k(e,...t){if(!i&&o.apply(this,arguments)){var n=e.currentTarget,r=y(this,t,!0).event(e),a=a$(e.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",p,!0),l=l$(e,n),d=e.clientX,h=e.clientY
|
|
7728
|
+
h$(e.view),Sk(e),r.mouse=[l,this.__zoom.invert(l)],BC(this),r.start()}function u(e){if(_k(e),!r.moved){var t=e.clientX-d,i=e.clientY-h
|
|
7729
|
+
r.moved=t*t+i*i>g}r.event(e).zoom("mouse",s(b(r.that.__zoom,r.mouse[0]=l$(e,n),r.mouse[1]),r.extent,c))}function p(e){a.on("mousemove.zoom mouseup.zoom",null),u$(e.view,r.moved),_k(e),r.event(e).end()}}function S(e,...t){if(o.apply(this,arguments)){var i=this.__zoom,r=l$(e.changedTouches?e.changedTouches[0]:e,this),a=i.invert(r),l=i.k*(e.shiftKey?.5:2),h=s(b(f(i,l),r,a),n.apply(this,t),c)
|
|
7730
|
+
_k(e),d>0?a$(this).transition().duration(d).call(x,h,r,e):a$(this).call(m.transform,h,r,e)}}function _(i,...n){if(o.apply(this,arguments)){var s,r,a,l,c=i.touches,d=c.length,h=y(this,n,i.changedTouches.length===d).event(i)
|
|
7731
|
+
for(Sk(i),r=0;r<d;++r)l=[l=l$(a=c[r],this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,s=!0,h.taps=1+!!e)
|
|
7732
|
+
e&&(e=clearTimeout(e)),s&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),BC(this),h.start())}}function I(e,...t){if(this.__zooming){var i,o,n,r,a=y(this,t).event(e),l=e.changedTouches,d=l.length
|
|
7733
|
+
for(_k(e),i=0;i<d;++i)n=l$(o=l[i],this),a.touch0&&a.touch0[2]===o.identifier?a.touch0[0]=n:a.touch1&&a.touch1[2]===o.identifier&&(a.touch1[0]=n)
|
|
7734
7734
|
if(o=a.that.__zoom,a.touch1){var h=a.touch0[0],u=a.touch0[1],p=a.touch1[0],g=a.touch1[1],v=(v=p[0]-h[0])*v+(v=p[1]-h[1])*v,m=(m=g[0]-u[0])*m+(m=g[1]-u[1])*m
|
|
7735
7735
|
o=f(o,Math.sqrt(v/m)),n=[(h[0]+p[0])/2,(h[1]+p[1])/2],r=[(u[0]+g[0])/2,(u[1]+g[1])/2]}else{if(!a.touch0)return
|
|
7736
7736
|
n=a.touch0[0],r=a.touch0[1]}a.zoom("touch",s(b(o,n,r),a.extent,c))}}function R(e,...o){if(this.__zooming){var n,s,r=y(this,o).event(e),a=e.changedTouches,l=a.length
|
|
7737
|
-
for(
|
|
7737
|
+
for(Sk(e),i&&clearTimeout(i),i=setTimeout((function(){i=null}),p),n=0;n<l;++n)s=a[n],r.touch0&&r.touch0[2]===s.identifier?delete r.touch0:r.touch1&&r.touch1[2]===s.identifier&&delete r.touch1
|
|
7738
7738
|
if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0])
|
|
7739
|
-
else if(r.end(),2===r.taps&&(s=
|
|
7739
|
+
else if(r.end(),2===r.taps&&(s=l$(s,this),Math.hypot(t[0]-s[0],t[1]-s[1])<v)){var c=a$(this).on("dblclick.zoom")
|
|
7740
7740
|
c&&c.apply(this,arguments)}}}return m.transform=function(e,t,i,o){var n=e.selection?e.selection():e
|
|
7741
|
-
n.property("__zoom",
|
|
7741
|
+
n.property("__zoom",Mk),e!==n?x(e,t,i,o):n.interrupt().each((function(){y(this,arguments).event(o).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,i,o){m.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),i,o)},m.scaleTo=function(e,t,i,o){m.transform(e,(function(){var e=n.apply(this,arguments),o=this.__zoom,r=null==i?w(e):"function"==typeof i?i.apply(this,arguments):i,a=o.invert(r),l="function"==typeof t?t.apply(this,arguments):t
|
|
7742
7742
|
return s(b(f(o,l),r,a),e,c)}),i,o)},m.translateBy=function(e,t,i,o){m.transform(e,(function(){return s(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof i?i.apply(this,arguments):i),n.apply(this,arguments),c)}),null,o)},m.translateTo=function(e,t,i,o,r){m.transform(e,(function(){var e=n.apply(this,arguments),r=this.__zoom,a=null==o?w(e):"function"==typeof o?o.apply(this,arguments):o
|
|
7743
|
-
return s(
|
|
7744
|
-
u.call(e,this.that,new
|
|
7745
|
-
return e===u?m:e},m.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,m):Math.sqrt(g)},m.tapDistance=function(e){return arguments.length?(v=+e,m):v},m}().scaleExtent([1.1,this.getZoomMax(this.wafermap.canvasWidth*this.wafermap.canvasHeight,this.wafermap.dataManager.containerDimensions.width*this.wafermap.dataManager.containerDimensions.height)]).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth+this.extentPadding,this.wafermap.canvasHeight+this.extentPadding]]).filter((e=>
|
|
7746
|
-
return e}getZoomMax(e,t){return Math.ceil(t/e*100)}}class
|
|
7743
|
+
return s(Ck.translate(a[0],a[1]).scale(r.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof i?-i.apply(this,arguments):-i),e,c)}),o,r)},$.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=a$(this.that).datum()
|
|
7744
|
+
u.call(e,this.that,new yk(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:u}),t)}},m.wheelDelta=function(e){return arguments.length?(r="function"==typeof e?e:xk(+e),m):r},m.filter=function(e){return arguments.length?(o="function"==typeof e?e:xk(!!e),m):o},m.touchable=function(e){return arguments.length?(a="function"==typeof e?e:xk(!!e),m):a},m.extent=function(e){return arguments.length?(n="function"==typeof e?e:xk([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):n},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(s=e,m):s},m.duration=function(e){return arguments.length?(d=+e,m):d},m.interpolate=function(e){return arguments.length?(h=e,m):h},m.on=function(){var e=u.on.apply(u,arguments)
|
|
7745
|
+
return e===u?m:e},m.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,m):Math.sqrt(g)},m.tapDistance=function(e){return arguments.length?(v=+e,m):v},m}().scaleExtent([1.1,this.getZoomMax(this.wafermap.canvasWidth*this.wafermap.canvasHeight,this.wafermap.dataManager.containerDimensions.width*this.wafermap.dataManager.containerDimensions.height)]).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth+this.extentPadding,this.wafermap.canvasHeight+this.extentPadding]]).filter((e=>kk(this.wafermap.canvas).k>=this.minScale||"wheel"===e.type)).on("zoom",(e=>{this.rescale(e)}))
|
|
7746
|
+
return e}getZoomMax(e,t){return Math.ceil(t/e*100)}}class qS{constructor(e){this.wafermap=e}mousemove(e){const t={x:e.offsetX,y:e.offsetY}
|
|
7747
7747
|
if(!this.hoversOverDie(t))return void(this.wafermap.hoverDie=void 0)
|
|
7748
7748
|
const i=this.wafermap.transform.invert([t.x,t.y]),o=this.calculateDieCoordinates({x:i[0],y:i[1]})
|
|
7749
|
-
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(o)}mouseout(e){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e){const t=this.wafermap.quadrant,i=t===
|
|
7749
|
+
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(o)}mouseout(e){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e){const t=this.wafermap.quadrant,i=t===AS||t===ES?Math.floor:Math.ceil,o=t===ES||t===VS?Math.floor:Math.ceil
|
|
7750
7750
|
return{x:i(this.wafermap.dataManager.invertedHorizontalScale(e.x-this.wafermap.dataManager.margin.left)),y:o(this.wafermap.dataManager.invertedVerticalScale(e.y-this.wafermap.dataManager.margin.top))}}hoversOverDie(e){const t=this.wafermap.canvasContext.getImageData(e.x,e.y,1,1).data
|
|
7751
7751
|
let i=0
|
|
7752
7752
|
for(const e of t)i+=e
|
|
7753
|
-
return i>0}}class
|
|
7753
|
+
return i>0}}class jS{constructor(e){this.wafermap=e,this.onWheelMove=e=>{e.preventDefault()},this.onMouseMove=e=>{this.hoverHandler.mousemove(e)},this.onMouseOut=e=>{this.hoverHandler.mouseout(e)},this.zoomHandler=new ZS(e),this.hoverHandler=new qS(e),this.attachEvents()}detachEvents(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.removeEventListener("wheel",this.onWheelMove)}attachEvents(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.addEventListener("wheel",this.onWheelMove,{passive:!1})}}class US extends _t{constructor(){super(...arguments),this.quadrant=ES,this.orientation=FS,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=TS,this.renderQueued=!1,this.transform=Ck,this.hoverTransform="",this.hoverOpacity=PS,this.hoverWidth=0,this.hoverHeight=0,this.highlightedValues=[],this.dies=[],this.colorScale={colors:[],values:[]}}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.resizeObserver=this.createResizeObserver()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){this.renderQueued=!1,this.initializeInternalModules(),this.renderer?.drawWafer()}queueRender(){this.$fastController.isConnected&&(this.renderQueued||(this.renderQueued=!0,u.queueUpdate((()=>this.render()))))}queueRenderHover(){this.$fastController.isConnected&&u.queueUpdate((()=>this.renderer?.renderHover()))}initializeInternalModules(){this.eventCoordinator?.detachEvents(),this.dataManager=new BS(this),this.renderer=new NS(this),this.eventCoordinator=new jS(this)}createResizeObserver(){const e=new ResizeObserver((e=>{const t=e[0]
|
|
7754
7754
|
if(void 0===t)return
|
|
7755
7755
|
const{height:i,width:o}=t.contentRect
|
|
7756
7756
|
this.canvas.width=o,this.canvas.height=i,this.canvasWidth=o,this.canvasHeight=i}))
|
|
7757
|
-
return e.observe(this),e}quadrantChanged(){this.queueRender()}orientationChanged(){this.queueRender()}maxCharactersChanged(){this.queueRender()}dieLabelsHiddenChanged(){this.queueRender()}dieLabelsSuffixChanged(){this.queueRender()}colorScaleModeChanged(){this.queueRender()}highlightedValuesChanged(){this.queueRender()}diesChanged(){this.queueRender()}colorScaleChanged(){this.queueRender()}transformChanged(){this.queueRender()}canvasWidthChanged(){this.queueRender()}canvasHeightChanged(){this.queueRender()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.queueRenderHover()}}e([ne],
|
|
7758
|
-
const US
|
|
7759
|
-
no.getOrCreate().withPrefix("nimble").register(
|
|
7757
|
+
return e.observe(this),e}quadrantChanged(){this.queueRender()}orientationChanged(){this.queueRender()}maxCharactersChanged(){this.queueRender()}dieLabelsHiddenChanged(){this.queueRender()}dieLabelsSuffixChanged(){this.queueRender()}colorScaleModeChanged(){this.queueRender()}highlightedValuesChanged(){this.queueRender()}diesChanged(){this.queueRender()}colorScaleChanged(){this.queueRender()}transformChanged(){this.queueRender()}canvasWidthChanged(){this.queueRender()}canvasHeightChanged(){this.queueRender()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.queueRenderHover()}}e([ne],US.prototype,"quadrant",void 0),e([ne],US.prototype,"orientation",void 0),e([ne({attribute:"max-characters",converter:ie})],US.prototype,"maxCharacters",void 0),e([ne({attribute:"die-labels-hidden",mode:"boolean"})],US.prototype,"dieLabelsHidden",void 0),e([ne({attribute:"die-labels-suffix"})],US.prototype,"dieLabelsSuffix",void 0),e([ne({attribute:"color-scale-mode"})],US.prototype,"colorScaleMode",void 0),e([m],US.prototype,"canvasWidth",void 0),e([m],US.prototype,"canvasHeight",void 0),e([m],US.prototype,"transform",void 0),e([m],US.prototype,"hoverTransform",void 0),e([m],US.prototype,"hoverOpacity",void 0),e([m],US.prototype,"hoverWidth",void 0),e([m],US.prototype,"hoverHeight",void 0),e([m],US.prototype,"hoverDie",void 0),e([m],US.prototype,"highlightedValues",void 0),e([m],US.prototype,"dies",void 0),e([m],US.prototype,"colorScale",void 0)
|
|
7758
|
+
const GS=US.compose({baseName:"wafer-map",template:Vk,styles:Fk})
|
|
7759
|
+
no.getOrCreate().withPrefix("nimble").register(GS()),no.tagFor(US)}()
|
|
7760
7760
|
//# sourceMappingURL=all-components-bundle.min.js.map
|