@ni/nimble-components 24.1.11 → 24.1.12
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 +12 -7
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +764 -762
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/select/index.js +11 -6
- package/dist/esm/select/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -8895,8 +8895,8 @@ const mT=xt`
|
|
|
8895
8895
|
}
|
|
8896
8896
|
`))
|
|
8897
8897
|
let gT=class extends Di{}
|
|
8898
|
-
class vT extends(Mn(gT)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}const bT=t=>t instanceof Sv
|
|
8899
|
-
class
|
|
8898
|
+
class vT extends(Mn(gT)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}const bT=t=>t instanceof Sv,yT=t=>!t.visuallyHidden&&!t.disabled&&!t.hidden
|
|
8899
|
+
class wT extends vT{constructor(){super(...arguments),this.appearance=ng,this.errorVisible=!1,this.filterMode=ag.none,this.displayPlaceholder=!1,this.open=!1,this.listboxId=xa("listbox-"),this.hasOverflow=!1,this.filteredOptions=[],this.filter="",this.maxHeight=0,this._value="",this.forcedPosition=!1}get collapsible(){return!(this.multiple||"number"==typeof this.size)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.initializeOpenState()}get value(){return m.track(this,"value"),this._value}set value(t){const e=this._value
|
|
8900
8900
|
let n=t
|
|
8901
8901
|
if(this.options?.length){const t=this.options.findIndex((t=>t.value===n)),e=this.options[this.selectedIndex]?.value??null,i=this.options[t]?.value??null;-1!==t&&e===i||(n="",this.selectedIndex=t),n=this.firstSelectedOption?.value??n}e===n||this.open&&this.selectedIndex<0||(this._value=n,super.valueChanged(e,n),this.open||(this.committedSelectedOption=this.options.find((t=>t.value===n))),m.notify(this,"value"),this.collapsible&&m.notify(this,"displayValue"))}get displayValue(){return m.track(this,"displayValue"),this.committedSelectedOption?.text??""}anchoredRegionChanged(t,e){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}controlChanged(t,e){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}slottedOptionsChanged(t,e){const n=this.value
|
|
8902
8902
|
this.options.forEach((t=>{const e=m.getNotifier(t)
|
|
@@ -8927,22 +8927,24 @@ break
|
|
|
8927
8927
|
case fa:if(!this.open)break
|
|
8928
8928
|
this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),this.selectedIndex!==this.indexWhenOpened&&(this.options[this.selectedIndex].selected=!1,this.selectedIndex=this.indexWhenOpened),this.focus()
|
|
8929
8929
|
break
|
|
8930
|
-
case ba:return this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(e===da||e===ua)}selectedIndexChanged(t,e){this.setSelectedOptions(),this.updateValue()}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}selectNextOption(){for(let t=this.selectedIndex+1;t<this.options.length;t++)
|
|
8931
|
-
|
|
8932
|
-
break}}
|
|
8930
|
+
case ba:return this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(e===da||e===ua)}selectedIndexChanged(t,e){this.setSelectedOptions(),this.updateValue()}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}selectNextOption(){for(let t=this.selectedIndex+1;t<this.options.length;t++){const e=this.options[t]
|
|
8931
|
+
if(bT(e)&&yT(e)){this.selectedIndex=t
|
|
8932
|
+
break}}}selectPreviousOption(){for(let t=this.selectedIndex-1;t>=0;t--){const e=this.options[t]
|
|
8933
|
+
if(bT(e)&&yT(e)){this.selectedIndex=t
|
|
8934
|
+
break}}}registerOption(t){this.options.includes(t)||this.options.push(t)}setSelectedOptions(){this.open&&-1===this.selectedIndex||super.setSelectedOptions()}focusAndScrollOptionIntoView(){this.open&&(super.focusAndScrollOptionIntoView(),window.requestAnimationFrame((()=>{this.filterInput?.focus()})))}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}sizeChanged(t,e){super.sizeChanged(t,e),this.proxy&&(this.proxy.size=e)}openChanged(){if(this.collapsible){if(this.open)return this.initializeOpenState(),void(this.indexWhenOpened=this.selectedIndex)
|
|
8933
8935
|
this.filter="",this.filterInput&&(this.filterInput.value=""),this.ariaControls="",this.ariaExpanded="false"}}selectedOptionsChanged(t,e){this.options?.forEach(((t,n)=>{const i=m.getNotifier(t)
|
|
8934
8936
|
i.unsubscribe(this,"selected"),t.selected=e.includes(t),i.subscribe(this,"selected")
|
|
8935
8937
|
const o=this.proxy?.options.item(n)
|
|
8936
|
-
o&&(o.selected=t.selected)}))}setDefaultSelectedOption(){const t=this.options??Array.from(this.children).filter((t=>bT(t))),e=t=>t.hasAttribute("selected")||t.selected
|
|
8937
|
-
let
|
|
8938
|
-
for(let
|
|
8938
|
+
o&&(o.selected=t.selected)}))}setDefaultSelectedOption(){const t=this.options??Array.from(this.children).filter((t=>bT(t))),e=t=>t.hasAttribute("selected")||t.selected
|
|
8939
|
+
let n=-1,i=-1
|
|
8940
|
+
for(let o=0;o<t?.length;o++){const s=t[o];(e(s)||s?.value===this.value)&&(n=o),-1===i&&yT(s)&&(i=o)}this.selectedIndex=-1!==n?n:-1!==i?i:0,this.committedSelectedOption=t[this.selectedIndex]}committedSelectedOptionChanged(){this.updateDisplayValue()}setPositioning(){if(!this.$fastController.isConnected)return
|
|
8939
8941
|
const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom
|
|
8940
8942
|
this.forcedPosition?this.position=this.positionAttribute:t.top>e?this.position=Hn:this.position=Bn,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Hn?Math.trunc(t.top):Math.trunc(e),this.updateListboxMaxHeightCssVariable()}filterOptions(){const t=this.filter.toLowerCase()
|
|
8941
8943
|
this.filteredOptions=t?this.options.filter((e=>{const n=O$(t)
|
|
8942
8944
|
return!e.hidden&&O$(e.text).includes(n)})):this.options.filter((t=>!t.hidden)),this.options.forEach((t=>{bT(t)&&(this.filteredOptions.includes(t)?t.visuallyHidden=!1:t.visuallyHidden=!0)}))}updateValue(t){this.$fastController.isConnected&&(this.value=this.firstSelectedOption?.value??""),t&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach((t=>{const e=t.proxy||(t instanceof HTMLOptionElement?t.cloneNode():null)
|
|
8943
8945
|
e&&this.proxy.options.add(e)})))}clearSelection(){this.options.forEach((t=>{t.selected=!1}))}filterChanged(){this.filterOptions()}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}initializeOpenState(){if(!this.open)return this.ariaExpanded="false",void(this.ariaControls="")
|
|
8944
|
-
this.committedSelectedOption=this.options[this.selectedIndex],this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}t([lt],
|
|
8945
|
-
const wT
|
|
8946
|
+
this.committedSelectedOption=this.options[this.selectedIndex],this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}t([lt],wT.prototype,"appearance",void 0),t([lt({attribute:"position"})],wT.prototype,"positionAttribute",void 0),t([lt({attribute:"error-text"})],wT.prototype,"errorText",void 0),t([lt({attribute:"error-visible",mode:"boolean"})],wT.prototype,"errorVisible",void 0),t([lt({attribute:"filter-mode"})],wT.prototype,"filterMode",void 0),t([g],wT.prototype,"displayPlaceholder",void 0),t([lt({attribute:"open",mode:"boolean"})],wT.prototype,"open",void 0),t([g],wT.prototype,"position",void 0),t([g],wT.prototype,"control",void 0),t([g],wT.prototype,"scrollableRegion",void 0),t([g],wT.prototype,"filterInput",void 0),t([g],wT.prototype,"anchoredRegion",void 0),t([g],wT.prototype,"hasOverflow",void 0),t([g],wT.prototype,"filteredOptions",void 0),t([g],wT.prototype,"filter",void 0),t([g],wT.prototype,"committedSelectedOption",void 0),t([g],wT.prototype,"maxHeight",void 0),t([v],wT.prototype,"collapsible",null),t([v],wT.prototype,"displayValue",null)
|
|
8947
|
+
const xT=wT.compose({baseName:"select",baseClass:Yi,template:(t,e)=>Z`
|
|
8946
8948
|
<template
|
|
8947
8949
|
class="${t=>[t.collapsible&&"collapsible",t.collapsible&&t.open&&"open",t.disabled&&"disabled",t.collapsible&&t.position].filter(Boolean).join(" ")}"
|
|
8948
8950
|
aria-activedescendant="${t=>t.filterMode===ag.none?t.ariaActiveDescendant:null}"
|
|
@@ -9045,8 +9047,8 @@ const wT=yT.compose({baseName:"select",baseClass:Yi,template:(t,e)=>Z`
|
|
|
9045
9047
|
></${hm}>
|
|
9046
9048
|
${Qm}
|
|
9047
9049
|
`})
|
|
9048
|
-
qe(
|
|
9049
|
-
const
|
|
9050
|
+
qe(wT,te,Qi),wi.getOrCreate().withPrefix("nimble").register(xT())
|
|
9051
|
+
const CT=xt`
|
|
9050
9052
|
${Oo("inline-grid")}
|
|
9051
9053
|
|
|
9052
9054
|
:host {
|
|
@@ -9204,7 +9206,7 @@ const xT=xt`
|
|
|
9204
9206
|
:host([appearance='accent']) {
|
|
9205
9207
|
--ni-private-spinner-bits-background-color: ${vs};
|
|
9206
9208
|
}
|
|
9207
|
-
`)),
|
|
9209
|
+
`)),kT=Z`
|
|
9208
9210
|
<template role="progressbar">
|
|
9209
9211
|
${""}
|
|
9210
9212
|
<div class="overlay"></div>
|
|
@@ -9214,11 +9216,11 @@ const xT=xt`
|
|
|
9214
9216
|
<div class="bit2"></div>
|
|
9215
9217
|
</div>
|
|
9216
9218
|
</template>
|
|
9217
|
-
`,
|
|
9218
|
-
class
|
|
9219
|
-
const
|
|
9220
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
9221
|
-
const
|
|
9219
|
+
`,ST={default:void 0,accent:"accent"}
|
|
9220
|
+
class $T extends Ve{constructor(){super(...arguments),this.appearance=ST.default}}t([lt],$T.prototype,"appearance",void 0)
|
|
9221
|
+
const MT=$T.compose({baseName:"spinner",template:kT,styles:CT})
|
|
9222
|
+
wi.getOrCreate().withPrefix("nimble").register(MT())
|
|
9223
|
+
const _T="nimble-spinner",ET=xt`
|
|
9222
9224
|
${Oo("inline-flex")}
|
|
9223
9225
|
|
|
9224
9226
|
:host {
|
|
@@ -9379,7 +9381,7 @@ const MT="nimble-spinner",_T=xt`
|
|
|
9379
9381
|
--ni-private-switch-indicator-border-color: ${rs};
|
|
9380
9382
|
--ni-private-switch-indicator-border-disabled-color: ${_s(rs,.3)};
|
|
9381
9383
|
}
|
|
9382
|
-
`)),
|
|
9384
|
+
`)),IT=Z`
|
|
9383
9385
|
<template
|
|
9384
9386
|
role="switch"
|
|
9385
9387
|
aria-checked="${t=>t.checked}"
|
|
@@ -9414,9 +9416,9 @@ const MT="nimble-spinner",_T=xt`
|
|
|
9414
9416
|
</div>
|
|
9415
9417
|
</template>
|
|
9416
9418
|
`
|
|
9417
|
-
const
|
|
9418
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
9419
|
-
const
|
|
9419
|
+
const DT=class extends no{}.compose({baseClass:no,baseName:"switch",template:IT,styles:ET})
|
|
9420
|
+
wi.getOrCreate().withPrefix("nimble").register(DT())
|
|
9421
|
+
const AT=xt`
|
|
9420
9422
|
${Oo("inline-flex")}
|
|
9421
9423
|
|
|
9422
9424
|
:host {
|
|
@@ -9517,13 +9519,13 @@ const DT=xt`
|
|
|
9517
9519
|
border-bottom-color: rgba(${Wa}, 0.3);
|
|
9518
9520
|
}
|
|
9519
9521
|
`
|
|
9520
|
-
const
|
|
9522
|
+
const TT=class extends oo{}.compose({baseName:"tab",baseClass:oo,template:(t,e)=>Z`
|
|
9521
9523
|
<template slot="tab" role="tab" aria-disabled="${t=>t.disabled}">
|
|
9522
9524
|
<slot></slot>
|
|
9523
9525
|
</template>
|
|
9524
|
-
`,styles:
|
|
9525
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
9526
|
-
const
|
|
9526
|
+
`,styles:AT})
|
|
9527
|
+
wi.getOrCreate().withPrefix("nimble").register(TT())
|
|
9528
|
+
const OT=xt`
|
|
9527
9529
|
${Oo("block")}
|
|
9528
9530
|
|
|
9529
9531
|
:host {
|
|
@@ -9533,11 +9535,11 @@ const TT=xt`
|
|
|
9533
9535
|
padding-top: ${al};
|
|
9534
9536
|
}
|
|
9535
9537
|
`
|
|
9536
|
-
const
|
|
9538
|
+
const RT=class extends io{}.compose({baseName:"tab-panel",baseClass:io,template:(t,e)=>Z`
|
|
9537
9539
|
<template slot="tabpanel" role="tabpanel">
|
|
9538
9540
|
<slot></slot>
|
|
9539
9541
|
</template>
|
|
9540
|
-
`,styles:
|
|
9542
|
+
`,styles:OT})
|
|
9541
9543
|
|
|
9542
9544
|
;/**
|
|
9543
9545
|
* table-core
|
|
@@ -9549,10 +9551,10 @@ const OT=class extends io{}.compose({baseName:"tab-panel",baseClass:io,template:
|
|
|
9549
9551
|
*
|
|
9550
9552
|
* @license MIT
|
|
9551
9553
|
*/
|
|
9552
|
-
function
|
|
9554
|
+
function FT(t,e){return"function"==typeof t?t(e):t}function NT(t,e){return n=>{e.setState((e=>({...e,[t]:FT(n,e[t])})))}}function PT(t){return t instanceof Function}function LT(t,e){const n=[],i=t=>{t.forEach((t=>{n.push(t)
|
|
9553
9555
|
const o=e(t)
|
|
9554
9556
|
null!=o&&o.length&&i(o)}))}
|
|
9555
|
-
return i(t),n}function
|
|
9557
|
+
return i(t),n}function zT(t,e,n){let i,o=[]
|
|
9556
9558
|
return s=>{let r
|
|
9557
9559
|
n.key&&n.debug&&(r=Date.now())
|
|
9558
9560
|
const a=t(s)
|
|
@@ -9560,22 +9562,22 @@ if(!(a.length!==o.length||a.some(((t,e)=>o[e]!==t))))return i
|
|
|
9560
9562
|
let l
|
|
9561
9563
|
if(o=a,n.key&&n.debug&&(l=Date.now()),i=e(...a),null==n||null==n.onChange||n.onChange(i),n.key&&n.debug&&null!=n&&n.debug()){const t=Math.round(100*(Date.now()-r))/100,e=Math.round(100*(Date.now()-l))/100,i=e/16,o=(t,e)=>{for(t=String(t);t.length<e;)t=" "+t
|
|
9562
9564
|
return t}
|
|
9563
|
-
console.info(`%c⏱ ${o(e,5)} /${o(t,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return i}}function
|
|
9564
|
-
return null!=(n=null==t?void 0:t.debugAll)?n:t[e]},key:!1,onChange:i}}wi.getOrCreate().withPrefix("nimble").register(
|
|
9565
|
-
const
|
|
9566
|
-
function
|
|
9565
|
+
console.info(`%c⏱ ${o(e,5)} /${o(t,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return i}}function VT(t,e,n,i){return{debug:()=>{var n
|
|
9566
|
+
return null!=(n=null==t?void 0:t.debugAll)?n:t[e]},key:!1,onChange:i}}wi.getOrCreate().withPrefix("nimble").register(RT())
|
|
9567
|
+
const HT="debugHeaders"
|
|
9568
|
+
function BT(t,e,n){var i
|
|
9567
9569
|
let o={id:null!=(i=n.id)?i:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const t=[],e=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(e),t.push(n)}
|
|
9568
9570
|
return e(o),t},getContext:()=>({table:t,header:o,column:e})}
|
|
9569
|
-
return t._features.forEach((e=>{null==e.createHeader||e.createHeader(o,t)})),o}const
|
|
9571
|
+
return t._features.forEach((e=>{null==e.createHeader||e.createHeader(o,t)})),o}const qT={createTable:t=>{t.getHeaderGroups=zT((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,n,i,o)=>{var s,r
|
|
9570
9572
|
const a=null!=(s=null==i?void 0:i.map((t=>n.find((e=>e.id===t)))).filter(Boolean))?s:[],l=null!=(r=null==o?void 0:o.map((t=>n.find((e=>e.id===t)))).filter(Boolean))?r:[]
|
|
9571
|
-
return
|
|
9572
|
-
return
|
|
9573
|
-
return
|
|
9574
|
-
return!(null!=(e=t.subHeaders)&&e.length)}))),
|
|
9575
|
-
return!(null!=(e=t.subHeaders)&&e.length)}))),
|
|
9576
|
-
return!(null!=(e=t.subHeaders)&&e.length)}))),
|
|
9577
|
-
return[...null!=(i=null==(o=t[0])?void 0:o.headers)?i:[],...null!=(s=null==(r=e[0])?void 0:r.headers)?s:[],...null!=(a=null==(l=n[0])?void 0:l.headers)?a:[]].map((t=>t.getLeafHeaders())).flat()}),
|
|
9578
|
-
function
|
|
9573
|
+
return UT(e,[...a,...n.filter((t=>!(null!=i&&i.includes(t.id)||null!=o&&o.includes(t.id)))),...l],t)}),VT(t.options,HT)),t.getCenterHeaderGroups=zT((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,n,i,o)=>UT(e,n=n.filter((t=>!(null!=i&&i.includes(t.id)||null!=o&&o.includes(t.id)))),t,"center")),VT(t.options,HT)),t.getLeftHeaderGroups=zT((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left]),((e,n,i)=>{var o
|
|
9574
|
+
return UT(e,null!=(o=null==i?void 0:i.map((t=>n.find((e=>e.id===t)))).filter(Boolean))?o:[],t,"left")}),VT(t.options,HT)),t.getRightHeaderGroups=zT((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right]),((e,n,i)=>{var o
|
|
9575
|
+
return UT(e,null!=(o=null==i?void 0:i.map((t=>n.find((e=>e.id===t)))).filter(Boolean))?o:[],t,"right")}),VT(t.options,HT)),t.getFooterGroups=zT((()=>[t.getHeaderGroups()]),(t=>[...t].reverse()),VT(t.options,HT)),t.getLeftFooterGroups=zT((()=>[t.getLeftHeaderGroups()]),(t=>[...t].reverse()),VT(t.options,HT)),t.getCenterFooterGroups=zT((()=>[t.getCenterHeaderGroups()]),(t=>[...t].reverse()),VT(t.options,HT)),t.getRightFooterGroups=zT((()=>[t.getRightHeaderGroups()]),(t=>[...t].reverse()),VT(t.options,HT)),t.getFlatHeaders=zT((()=>[t.getHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),VT(t.options,HT)),t.getLeftFlatHeaders=zT((()=>[t.getLeftHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),VT(t.options,HT)),t.getCenterFlatHeaders=zT((()=>[t.getCenterHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),VT(t.options,HT)),t.getRightFlatHeaders=zT((()=>[t.getRightHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),VT(t.options,HT)),t.getCenterLeafHeaders=zT((()=>[t.getCenterFlatHeaders()]),(t=>t.filter((t=>{var e
|
|
9576
|
+
return!(null!=(e=t.subHeaders)&&e.length)}))),VT(t.options,HT)),t.getLeftLeafHeaders=zT((()=>[t.getLeftFlatHeaders()]),(t=>t.filter((t=>{var e
|
|
9577
|
+
return!(null!=(e=t.subHeaders)&&e.length)}))),VT(t.options,HT)),t.getRightLeafHeaders=zT((()=>[t.getRightFlatHeaders()]),(t=>t.filter((t=>{var e
|
|
9578
|
+
return!(null!=(e=t.subHeaders)&&e.length)}))),VT(t.options,HT)),t.getLeafHeaders=zT((()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()]),((t,e,n)=>{var i,o,s,r,a,l
|
|
9579
|
+
return[...null!=(i=null==(o=t[0])?void 0:o.headers)?i:[],...null!=(s=null==(r=e[0])?void 0:r.headers)?s:[],...null!=(a=null==(l=n[0])?void 0:l.headers)?a:[]].map((t=>t.getLeafHeaders())).flat()}),VT(t.options,HT))}}
|
|
9580
|
+
function UT(t,e,n,i){var o,s
|
|
9579
9581
|
let r=0
|
|
9580
9582
|
const a=function(t,e){void 0===e&&(e=1),r=Math.max(r,e),t.filter((t=>t.getIsVisible())).forEach((t=>{var n
|
|
9581
9583
|
null!=(n=t.columns)&&n.length&&a(t.columns,e+1)}),0)}
|
|
@@ -9585,16 +9587,16 @@ const c=(t,e)=>{const o={depth:e,id:[i,`${e}`].filter(Boolean).join("_"),headers
|
|
|
9585
9587
|
t.forEach((t=>{const r=[...s].reverse()[0]
|
|
9586
9588
|
let a,l=!1
|
|
9587
9589
|
if(t.column.depth===o.depth&&t.column.parent?a=t.column.parent:(a=t.column,l=!0),r&&(null==r?void 0:r.column)===a)r.subHeaders.push(t)
|
|
9588
|
-
else{const o=
|
|
9589
|
-
o.subHeaders.push(t),s.push(o)}o.headers.push(t),t.headerGroup=o})),l.push(o),e>0&&c(s,e-1)},d=e.map(((t,e)=>
|
|
9590
|
+
else{const o=BT(n,a,{id:[i,e,a.id,null==t?void 0:t.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${s.filter((t=>t.column===a)).length}`:void 0,depth:e,index:s.length})
|
|
9591
|
+
o.subHeaders.push(t),s.push(o)}o.headers.push(t),t.headerGroup=o})),l.push(o),e>0&&c(s,e-1)},d=e.map(((t,e)=>BT(n,t,{depth:r,index:e})))
|
|
9590
9592
|
c(d,r-1),l.reverse()
|
|
9591
9593
|
const h=t=>t.filter((t=>t.column.getIsVisible())).map((t=>{let e=0,n=0,i=[0]
|
|
9592
9594
|
t.subHeaders&&t.subHeaders.length?(i=[],h(t.subHeaders).forEach((t=>{let{colSpan:n,rowSpan:o}=t
|
|
9593
9595
|
e+=n,i.push(o)}))):e=1
|
|
9594
9596
|
return n+=Math.min(...i),t.colSpan=e,t.rowSpan=n,{colSpan:e,rowSpan:n}}))
|
|
9595
|
-
return h(null!=(o=null==(s=l[0])?void 0:s.headers)?o:[]),l}const
|
|
9597
|
+
return h(null!=(o=null==(s=l[0])?void 0:s.headers)?o:[]),l}const jT={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},WT={getDefaultColumnDef:()=>jT,getInitialState:t=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:NT("columnSizing",t),onColumnSizingInfoChange:NT("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,i,o
|
|
9596
9598
|
const s=e.getState().columnSizing[t.id]
|
|
9597
|
-
return Math.min(Math.max(null!=(n=t.columnDef.minSize)?n:
|
|
9599
|
+
return Math.min(Math.max(null!=(n=t.columnDef.minSize)?n:jT.minSize,null!=(i=null!=s?s:t.columnDef.size)?i:jT.size),null!=(o=t.columnDef.maxSize)?o:jT.maxSize)},t.getStart=zT((t=>[t,MO(e,t),e.getState().columnSizing]),((e,n)=>n.slice(0,t.getIndex(e)).reduce(((t,e)=>t+e.getSize()),0)),VT(e.options,"debugColumns")),t.getAfter=zT((t=>[t,MO(e,t),e.getState().columnSizing]),((e,n)=>n.slice(t.getIndex(e)+1).reduce(((t,e)=>t+e.getSize()),0)),VT(e.options,"debugColumns")),t.resetSize=()=>{e.setColumnSizing((e=>{let{[t.id]:n,...i}=e
|
|
9598
9600
|
return i}))},t.getCanResize=()=>{var n,i
|
|
9599
9601
|
return(null==(n=t.columnDef.enableResizing)||n)&&(null==(i=e.options.enableColumnResizing)||i)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let e=0
|
|
9600
9602
|
const n=t=>{var i
|
|
@@ -9602,24 +9604,24 @@ t.subHeaders.length?t.subHeaders.forEach(n):e+=null!=(i=t.column.getSize())?i:0}
|
|
|
9602
9604
|
return n(t),e},t.getStart=()=>{if(t.index>0){const e=t.headerGroup.headers[t.index-1]
|
|
9603
9605
|
return e.getStart()+e.getSize()}return 0},t.getResizeHandler=n=>{const i=e.getColumn(t.column.id),o=null==i?void 0:i.getCanResize()
|
|
9604
9606
|
return s=>{if(!i||!o)return
|
|
9605
|
-
if(null==s.persist||s.persist(),
|
|
9606
|
-
const r=t.getSize(),a=t?t.getLeafHeaders().map((t=>[t.column.id,t.column.getSize()])):[[i.id,i.getSize()]],l=
|
|
9607
|
+
if(null==s.persist||s.persist(),GT(s)&&s.touches&&s.touches.length>1)return
|
|
9608
|
+
const r=t.getSize(),a=t?t.getLeafHeaders().map((t=>[t.column.id,t.column.getSize()])):[[i.id,i.getSize()]],l=GT(s)?Math.round(s.touches[0].clientX):s.clientX,c={},d=(t,n)=>{"number"==typeof n&&(e.setColumnSizingInfo((t=>{var i,o
|
|
9607
9609
|
const s="rtl"===e.options.columnResizeDirection?-1:1,r=(n-(null!=(i=null==t?void 0:t.startOffset)?i:0))*s,a=Math.max(r/(null!=(o=null==t?void 0:t.startSize)?o:0),-.999999)
|
|
9608
9610
|
return t.columnSizingStart.forEach((t=>{let[e,n]=t
|
|
9609
9611
|
c[e]=Math.round(100*Math.max(n+n*a,0))/100})),{...t,deltaOffset:r,deltaPercentage:a}})),"onChange"!==e.options.columnResizeMode&&"end"!==t||e.setColumnSizing((t=>({...t,...c}))))},h=t=>d("move",t),u=t=>{d("end",t),e.setColumnSizingInfo((t=>({...t,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=n||"undefined"!=typeof document?document:null,f={moveHandler:t=>h(t.clientX),upHandler:t=>{null==p||p.removeEventListener("mousemove",f.moveHandler),null==p||p.removeEventListener("mouseup",f.upHandler),u(t.clientX)}},m={moveHandler:t=>(t.cancelable&&(t.preventDefault(),t.stopPropagation()),h(t.touches[0].clientX),!1),upHandler:t=>{var e
|
|
9610
|
-
null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),t.cancelable&&(t.preventDefault(),t.stopPropagation()),u(null==(e=t.touches[0])?void 0:e.clientX)}},g=!!function(){if("boolean"==typeof
|
|
9612
|
+
null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),t.cancelable&&(t.preventDefault(),t.stopPropagation()),u(null==(e=t.touches[0])?void 0:e.clientX)}},g=!!function(){if("boolean"==typeof ZT)return ZT
|
|
9611
9613
|
let t=!1
|
|
9612
9614
|
try{const e={get passive(){return t=!0,!1}},n=()=>{}
|
|
9613
|
-
window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch(e){t=!1}return
|
|
9614
|
-
|
|
9615
|
+
window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch(e){t=!1}return ZT=t,ZT}()&&{passive:!1}
|
|
9616
|
+
GT(s)?(null==p||p.addEventListener("touchmove",m.moveHandler,g),null==p||p.addEventListener("touchend",m.upHandler,g)):(null==p||p.addEventListener("mousemove",f.moveHandler,g),null==p||p.addEventListener("mouseup",f.upHandler,g)),e.setColumnSizingInfo((t=>({...t,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id})))}}},createTable:t=>{t.setColumnSizing=e=>null==t.options.onColumnSizingChange?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>null==t.options.onColumnSizingInfoChange?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n
|
|
9615
9617
|
t.setColumnSizing(e?{}:null!=(n=t.initialState.columnSizing)?n:{})},t.resetHeaderSizeInfo=e=>{var n
|
|
9616
9618
|
t.setColumnSizingInfo(e?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=t.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},t.getTotalSize=()=>{var e,n
|
|
9617
9619
|
return null!=(e=null==(n=t.getHeaderGroups()[0])?void 0:n.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getLeftTotalSize=()=>{var e,n
|
|
9618
9620
|
return null!=(e=null==(n=t.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getCenterTotalSize=()=>{var e,n
|
|
9619
9621
|
return null!=(e=null==(n=t.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getRightTotalSize=()=>{var e,n
|
|
9620
9622
|
return null!=(e=null==(n=t.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0}}}
|
|
9621
|
-
let
|
|
9622
|
-
function
|
|
9623
|
+
let ZT=null
|
|
9624
|
+
function GT(t){return"touchstart"===t.type}const KT={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:NT("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1
|
|
9623
9625
|
t._autoResetExpanded=()=>{var i,o
|
|
9624
9626
|
if(e){if(null!=(i=null!=(o=t.options.autoResetAll)?o:t.options.autoResetExpanded)?i:!t.options.manualExpanding){if(n)return
|
|
9625
9627
|
n=!0,t._queue((()=>{t.resetExpanded(),n=!1}))}}else t._queue((()=>{e=!0}))},t.setExpanded=e=>null==t.options.onExpandedChange?void 0:t.options.onExpandedChange(e),t.toggleAllRowsExpanded=e=>{(null!=e?e:!t.getIsAllRowsExpanded())?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=e=>{var n,i
|
|
@@ -9638,57 +9640,57 @@ return!!(null!=(n=null==e.options.getIsRowExpanded?void 0:e.options.getIsRowExpa
|
|
|
9638
9640
|
return null!=(n=null==e.options.getRowCanExpand?void 0:e.options.getRowCanExpand(t))?n:(null==(i=e.options.enableExpanding)||i)&&!(null==(o=t.subRows)||!o.length)},t.getIsAllParentsExpanded=()=>{let n=!0,i=t
|
|
9639
9641
|
for(;n&&i.parentId;)i=e.getRow(i.parentId,!0),n=i.getIsExpanded()
|
|
9640
9642
|
return n},t.getToggleExpandedHandler=()=>{const e=t.getCanExpand()
|
|
9641
|
-
return()=>{e&&t.toggleExpanded()}}}},
|
|
9643
|
+
return()=>{e&&t.toggleExpanded()}}}},JT=(t,e,n)=>{var i
|
|
9642
9644
|
const o=n.toLowerCase()
|
|
9643
9645
|
return Boolean(null==(i=t.getValue(e))||null==(i=i.toString())||null==(i=i.toLowerCase())?void 0:i.includes(o))}
|
|
9644
|
-
|
|
9645
|
-
const JT=(t,e,n)=>{var i
|
|
9646
|
-
return Boolean(null==(i=t.getValue(e))||null==(i=i.toString())?void 0:i.includes(n))}
|
|
9647
|
-
JT.autoRemove=t=>sO(t)
|
|
9646
|
+
JT.autoRemove=t=>rO(t)
|
|
9648
9647
|
const XT=(t,e,n)=>{var i
|
|
9649
|
-
return(null==(i=t.getValue(e))||null==(i=i.toString())?void 0:i.
|
|
9650
|
-
XT.autoRemove=t=>
|
|
9648
|
+
return Boolean(null==(i=t.getValue(e))||null==(i=i.toString())?void 0:i.includes(n))}
|
|
9649
|
+
XT.autoRemove=t=>rO(t)
|
|
9651
9650
|
const YT=(t,e,n)=>{var i
|
|
9651
|
+
return(null==(i=t.getValue(e))||null==(i=i.toString())?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())}
|
|
9652
|
+
YT.autoRemove=t=>rO(t)
|
|
9653
|
+
const QT=(t,e,n)=>{var i
|
|
9652
9654
|
return null==(i=t.getValue(e))?void 0:i.includes(n)}
|
|
9653
|
-
|
|
9654
|
-
const
|
|
9655
|
+
QT.autoRemove=t=>rO(t)||!(null!=t&&t.length)
|
|
9656
|
+
const tO=(t,e,n)=>!n.some((n=>{var i
|
|
9655
9657
|
return!(null!=(i=t.getValue(e))&&i.includes(n))}))
|
|
9656
|
-
|
|
9657
|
-
const
|
|
9658
|
+
tO.autoRemove=t=>rO(t)||!(null!=t&&t.length)
|
|
9659
|
+
const eO=(t,e,n)=>n.some((n=>{var i
|
|
9658
9660
|
return null==(i=t.getValue(e))?void 0:i.includes(n)}))
|
|
9659
|
-
|
|
9660
|
-
const
|
|
9661
|
-
|
|
9662
|
-
const
|
|
9663
|
-
|
|
9664
|
-
const
|
|
9661
|
+
eO.autoRemove=t=>rO(t)||!(null!=t&&t.length)
|
|
9662
|
+
const nO=(t,e,n)=>t.getValue(e)===n
|
|
9663
|
+
nO.autoRemove=t=>rO(t)
|
|
9664
|
+
const iO=(t,e,n)=>t.getValue(e)==n
|
|
9665
|
+
iO.autoRemove=t=>rO(t)
|
|
9666
|
+
const oO=(t,e,n)=>{let[i,o]=n
|
|
9665
9667
|
const s=t.getValue(e)
|
|
9666
9668
|
return s>=i&&s<=o}
|
|
9667
|
-
|
|
9669
|
+
oO.resolveFilterValue=t=>{let[e,n]=t,i="number"!=typeof e?parseFloat(e):e,o="number"!=typeof n?parseFloat(n):n,s=null===e||Number.isNaN(i)?-1/0:i,r=null===n||Number.isNaN(o)?1/0:o
|
|
9668
9670
|
if(s>r){const t=s
|
|
9669
|
-
s=r,r=t}return[s,r]},
|
|
9670
|
-
const
|
|
9671
|
-
function
|
|
9671
|
+
s=r,r=t}return[s,r]},oO.autoRemove=t=>rO(t)||rO(t[0])&&rO(t[1])
|
|
9672
|
+
const sO={includesString:JT,includesStringSensitive:XT,equalsString:YT,arrIncludes:QT,arrIncludesAll:tO,arrIncludesSome:eO,equals:nO,weakEquals:iO,inNumberRange:oO}
|
|
9673
|
+
function rO(t){return null==t||""===t}const aO={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:NT("columnFilters",t),onGlobalFilterChange:NT("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n
|
|
9672
9674
|
const i=null==(n=t.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[e.id])?void 0:n.getValue()
|
|
9673
9675
|
return"string"==typeof i||"number"==typeof i}}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],i=null==n?void 0:n.getValue(t.id)
|
|
9674
|
-
return"string"==typeof i?
|
|
9675
|
-
return
|
|
9676
|
+
return"string"==typeof i?sO.includesString:"number"==typeof i?sO.inNumberRange:"boolean"==typeof i||null!==i&&"object"==typeof i?sO.equals:Array.isArray(i)?sO.arrIncludes:sO.weakEquals},t.getFilterFn=()=>{var n,i
|
|
9677
|
+
return PT(t.columnDef.filterFn)?t.columnDef.filterFn:"auto"===t.columnDef.filterFn?t.getAutoFilterFn():null!=(n=null==(i=e.options.filterFns)?void 0:i[t.columnDef.filterFn])?n:sO[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,i,o
|
|
9676
9678
|
return(null==(n=t.columnDef.enableColumnFilter)||n)&&(null==(i=e.options.enableColumnFilters)||i)&&(null==(o=e.options.enableFilters)||o)&&!!t.accessorFn},t.getCanGlobalFilter=()=>{var n,i,o,s
|
|
9677
9679
|
return(null==(n=t.columnDef.enableGlobalFilter)||n)&&(null==(i=e.options.enableGlobalFilter)||i)&&(null==(o=e.options.enableFilters)||o)&&(null==(s=null==e.options.getColumnCanGlobalFilter?void 0:e.options.getColumnCanGlobalFilter(t))||s)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n
|
|
9678
9680
|
return null==(n=e.getState().columnFilters)||null==(n=n.find((e=>e.id===t.id)))?void 0:n.value},t.getFilterIndex=()=>{var n,i
|
|
9679
|
-
return null!=(n=null==(i=e.getState().columnFilters)?void 0:i.findIndex((e=>e.id===t.id)))?n:-1},t.setFilterValue=n=>{e.setColumnFilters((e=>{const i=t.getFilterFn(),o=null==e?void 0:e.find((e=>e.id===t.id)),s=
|
|
9681
|
+
return null!=(n=null==(i=e.getState().columnFilters)?void 0:i.findIndex((e=>e.id===t.id)))?n:-1},t.setFilterValue=n=>{e.setColumnFilters((e=>{const i=t.getFilterFn(),o=null==e?void 0:e.find((e=>e.id===t.id)),s=FT(n,o?o.value:void 0)
|
|
9680
9682
|
var r
|
|
9681
|
-
if(
|
|
9683
|
+
if(lO(i,s,t))return null!=(r=null==e?void 0:e.filter((e=>e.id!==t.id)))?r:[]
|
|
9682
9684
|
const a={id:t.id,value:s}
|
|
9683
9685
|
var l
|
|
9684
|
-
return o?null!=(l=null==e?void 0:e.map((e=>e.id===t.id?a:e)))?l:[]:null!=e&&e.length?[...e,a]:[a]}))},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>
|
|
9686
|
+
return o?null!=(l=null==e?void 0:e.map((e=>e.id===t.id?a:e)))?l:[]:null!=e&&e.length?[...e,a]:[a]}))},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>sO.includesString,t.getGlobalFilterFn=()=>{var e,n
|
|
9685
9687
|
const{globalFilterFn:i}=t.options
|
|
9686
|
-
return
|
|
9688
|
+
return PT(i)?i:"auto"===i?t.getGlobalAutoFilterFn():null!=(e=null==(n=t.options.filterFns)?void 0:n[i])?e:sO[i]},t.setColumnFilters=e=>{const n=t.getAllLeafColumns()
|
|
9687
9689
|
null==t.options.onColumnFiltersChange||t.options.onColumnFiltersChange((t=>{var i
|
|
9688
|
-
return null==(i=
|
|
9689
|
-
if(e){if(
|
|
9690
|
+
return null==(i=FT(e,t))?void 0:i.filter((t=>{const e=n.find((e=>e.id===t.id))
|
|
9691
|
+
if(e){if(lO(e.getFilterFn(),t.value,e))return!1}return!0}))}))},t.setGlobalFilter=e=>{null==t.options.onGlobalFilterChange||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t.resetColumnFilters=e=>{var n,i
|
|
9690
9692
|
t.setColumnFilters(e?[]:null!=(n=null==(i=t.initialState)?void 0:i.columnFilters)?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}}
|
|
9691
|
-
function
|
|
9693
|
+
function lO(t,e,n){return!(!t||!t.autoRemove)&&t.autoRemove(e,n)||void 0===e||"string"==typeof e&&!e}const cO={sum:(t,e,n)=>n.reduce(((e,n)=>{const i=n.getValue(t)
|
|
9692
9694
|
return e+("number"==typeof i?i:0)}),0),min:(t,e,n)=>{let i
|
|
9693
9695
|
return n.forEach((e=>{const n=e.getValue(t)
|
|
9694
9696
|
null!=n&&(i>n||void 0===i&&n>=n)&&(i=n)})),i},max:(t,e,n)=>{let i
|
|
@@ -9703,45 +9705,45 @@ if(i=n,!Array.isArray(i)||!i.every((t=>"number"==typeof t)))return
|
|
|
9703
9705
|
var i
|
|
9704
9706
|
if(1===n.length)return n[0]
|
|
9705
9707
|
const o=Math.floor(n.length/2),s=n.sort(((t,e)=>t-e))
|
|
9706
|
-
return n.length%2!=0?s[o]:(s[o-1]+s[o])/2},unique:(t,e)=>Array.from(new Set(e.map((e=>e.getValue(t)))).values()),uniqueCount:(t,e)=>new Set(e.map((e=>e.getValue(t)))).size,count:(t,e)=>e.length},
|
|
9707
|
-
return null!=(e=null==(n=t.getValue())||null==n.toString?void 0:n.toString())?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:
|
|
9708
|
+
return n.length%2!=0?s[o]:(s[o-1]+s[o])/2},unique:(t,e)=>Array.from(new Set(e.map((e=>e.getValue(t)))).values()),uniqueCount:(t,e)=>new Set(e.map((e=>e.getValue(t)))).size,count:(t,e)=>e.length},dO={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n
|
|
9709
|
+
return null!=(e=null==(n=t.getValue())||null==n.toString?void 0:n.toString())?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:NT("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping((e=>null!=e&&e.includes(t.id)?e.filter((e=>e!==t.id)):[...null!=e?e:[],t.id]))},t.getCanGroup=()=>{var n,i,o,s
|
|
9708
9710
|
return null!=(n=null==(i=null!=(o=null==(s=t.columnDef.enableGrouping)||s)?o:e.options.enableGrouping)||i)?n:!!t.accessorFn},t.getIsGrouped=()=>{var n
|
|
9709
9711
|
return null==(n=e.getState().grouping)?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n
|
|
9710
9712
|
return null==(n=e.getState().grouping)?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const e=t.getCanGroup()
|
|
9711
9713
|
return()=>{e&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],i=null==n?void 0:n.getValue(t.id)
|
|
9712
|
-
return"number"==typeof i?
|
|
9714
|
+
return"number"==typeof i?cO.sum:"[object Date]"===Object.prototype.toString.call(i)?cO.extent:void 0},t.getAggregationFn=()=>{var n,i
|
|
9713
9715
|
if(!t)throw new Error
|
|
9714
|
-
return
|
|
9716
|
+
return PT(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:"auto"===t.columnDef.aggregationFn?t.getAutoAggregationFn():null!=(n=null==(i=e.options.aggregationFns)?void 0:i[t.columnDef.aggregationFn])?n:cO[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>null==t.options.onGroupingChange?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,i
|
|
9715
9717
|
t.setGrouping(e?[]:null!=(n=null==(i=t.initialState)?void 0:i.grouping)?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n]
|
|
9716
9718
|
const i=e.getColumn(n)
|
|
9717
9719
|
return null!=i&&i.columnDef.getGroupingValue?(t._groupingValuesCache[n]=i.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,i)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var e
|
|
9718
9720
|
return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!(null==(e=n.subRows)||!e.length)}}}
|
|
9719
|
-
const
|
|
9720
|
-
return(null==(i
|
|
9721
|
-
const o
|
|
9721
|
+
const hO={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:NT("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=zT((t=>[MO(e,t)]),(e=>e.findIndex((e=>e.id===t.id))),VT(e.options,"debugColumns")),t.getIsFirstColumn=n=>{var i
|
|
9722
|
+
return(null==(i=MO(e,n)[0])?void 0:i.id)===t.id},t.getIsLastColumn=n=>{var i
|
|
9723
|
+
const o=MO(e,n)
|
|
9722
9724
|
return(null==(i=o[o.length-1])?void 0:i.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>null==t.options.onColumnOrderChange?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n
|
|
9723
|
-
t.setColumnOrder(e?[]:null!=(n=t.initialState.columnOrder)?n:[])},t._getOrderColumnsFn=
|
|
9725
|
+
t.setColumnOrder(e?[]:null!=(n=t.initialState.columnOrder)?n:[])},t._getOrderColumnsFn=zT((()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode]),((t,e,n)=>i=>{let o=[]
|
|
9724
9726
|
if(null!=t&&t.length){const e=[...t],n=[...i]
|
|
9725
9727
|
for(;n.length&&e.length;){const t=e.shift(),i=n.findIndex((e=>e.id===t))
|
|
9726
9728
|
i>-1&&o.push(n.splice(i,1)[0])}o=[...o,...n]}else o=i
|
|
9727
9729
|
return function(t,e,n){if(null==e||!e.length||!n)return t
|
|
9728
9730
|
const i=t.filter((t=>!e.includes(t.id)))
|
|
9729
|
-
return"remove"===n?i:[...e.map((e=>t.find((t=>t.id===e)))).filter(Boolean),...i]}(o,e,n)}),
|
|
9731
|
+
return"remove"===n?i:[...e.map((e=>t.find((t=>t.id===e)))).filter(Boolean),...i]}(o,e,n)}),VT(t.options,"debugTable"))}},uO={getInitialState:t=>({...t,pagination:{pageIndex:0,pageSize:10,...null==t?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:NT("pagination",t)}),createTable:t=>{let e=!1,n=!1
|
|
9730
9732
|
t._autoResetPageIndex=()=>{var i,o
|
|
9731
9733
|
if(e){if(null!=(i=null!=(o=t.options.autoResetAll)?o:t.options.autoResetPageIndex)?i:!t.options.manualPagination){if(n)return
|
|
9732
|
-
n=!0,t._queue((()=>{t.resetPageIndex(),n=!1}))}}else t._queue((()=>{e=!0}))},t.setPagination=e=>null==t.options.onPaginationChange?void 0:t.options.onPaginationChange((t=>
|
|
9733
|
-
t.setPagination(e?{pageIndex:0,pageSize:10}:null!=(n=t.initialState.pagination)?n:{pageIndex:0,pageSize:10})},t.setPageIndex=e=>{t.setPagination((n=>{let i=
|
|
9734
|
+
n=!0,t._queue((()=>{t.resetPageIndex(),n=!1}))}}else t._queue((()=>{e=!0}))},t.setPagination=e=>null==t.options.onPaginationChange?void 0:t.options.onPaginationChange((t=>FT(e,t))),t.resetPagination=e=>{var n
|
|
9735
|
+
t.setPagination(e?{pageIndex:0,pageSize:10}:null!=(n=t.initialState.pagination)?n:{pageIndex:0,pageSize:10})},t.setPageIndex=e=>{t.setPagination((n=>{let i=FT(e,n.pageIndex)
|
|
9734
9736
|
const o=void 0===t.options.pageCount||-1===t.options.pageCount?Number.MAX_SAFE_INTEGER:t.options.pageCount-1
|
|
9735
9737
|
return i=Math.max(0,Math.min(i,o)),{...n,pageIndex:i}}))},t.resetPageIndex=e=>{var n,i
|
|
9736
9738
|
t.setPageIndex(e?0:null!=(n=null==(i=t.initialState)||null==(i=i.pagination)?void 0:i.pageIndex)?n:0)},t.resetPageSize=e=>{var n,i
|
|
9737
|
-
t.setPageSize(e?10:null!=(n=null==(i=t.initialState)||null==(i=i.pagination)?void 0:i.pageSize)?n:10)},t.setPageSize=e=>{t.setPagination((t=>{const n=Math.max(1,
|
|
9739
|
+
t.setPageSize(e?10:null!=(n=null==(i=t.initialState)||null==(i=i.pagination)?void 0:i.pageSize)?n:10)},t.setPageSize=e=>{t.setPagination((t=>{const n=Math.max(1,FT(e,t.pageSize)),i=t.pageSize*t.pageIndex,o=Math.floor(i/n)
|
|
9738
9740
|
return{...t,pageIndex:o,pageSize:n}}))},t.setPageCount=e=>t.setPagination((n=>{var i
|
|
9739
|
-
let o=
|
|
9740
|
-
return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),t.getPageOptions=
|
|
9741
|
-
return t&&t>0&&(e=[...new Array(t)].fill(null).map(((t,e)=>e))),e}),
|
|
9741
|
+
let o=FT(e,null!=(i=t.options.pageCount)?i:-1)
|
|
9742
|
+
return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),t.getPageOptions=zT((()=>[t.getPageCount()]),(t=>{let e=[]
|
|
9743
|
+
return t&&t>0&&(e=[...new Array(t)].fill(null).map(((t,e)=>e))),e}),VT(t.options,"debugTable")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:e}=t.getState().pagination,n=t.getPageCount()
|
|
9742
9744
|
return-1===n||0!==n&&e<n-1},t.previousPage=()=>t.setPageIndex((t=>t-1)),t.nextPage=()=>t.setPageIndex((t=>t+1)),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var e
|
|
9743
9745
|
return null!=(e=t.options.pageCount)?e:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var e
|
|
9744
|
-
return null!=(e=t.options.rowCount)?e:t.getPrePaginationRowModel().rows.length}}},
|
|
9746
|
+
return null!=(e=t.options.rowCount)?e:t.getPrePaginationRowModel().rows.length}}},pO={getInitialState:t=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...t}),getDefaultOptions:t=>({onColumnPinningChange:NT("columnPinning",t),onRowPinningChange:NT("rowPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const i=t.getLeafColumns().map((t=>t.id)).filter(Boolean)
|
|
9745
9747
|
e.setColumnPinning((t=>{var e,o,s,r,a,l
|
|
9746
9748
|
return"right"===n?{left:(null!=(s=null==t?void 0:t.left)?s:[]).filter((t=>!(null!=i&&i.includes(t)))),right:[...(null!=(r=null==t?void 0:t.right)?r:[]).filter((t=>!(null!=i&&i.includes(t)))),...i]}:"left"===n?{left:[...(null!=(a=null==t?void 0:t.left)?a:[]).filter((t=>!(null!=i&&i.includes(t)))),...i],right:(null!=(l=null==t?void 0:t.right)?l:[]).filter((t=>!(null!=i&&i.includes(t))))}:{left:(null!=(e=null==t?void 0:t.left)?e:[]).filter((t=>!(null!=i&&i.includes(t)))),right:(null!=(o=null==t?void 0:t.right)?o:[]).filter((t=>!(null!=i&&i.includes(t))))}}))},t.getCanPin=()=>t.getLeafColumns().some((t=>{var n,i,o
|
|
9747
9749
|
return(null==(n=t.columnDef.enablePinning)||n)&&(null==(i=null!=(o=e.options.enableColumnPinning)?o:e.options.enablePinning)||i)})),t.getIsPinned=()=>{const n=t.getLeafColumns().map((t=>t.id)),{left:i,right:o}=e.getState().columnPinning,s=n.some((t=>null==i?void 0:i.includes(t))),r=n.some((t=>null==o?void 0:o.includes(t)))
|
|
@@ -9759,24 +9761,24 @@ const o=t.getIsPinned()
|
|
|
9759
9761
|
if(!o)return-1
|
|
9760
9762
|
const s=null==(n=e._getPinnedRows(o))?void 0:n.map((t=>{let{id:e}=t
|
|
9761
9763
|
return e}))
|
|
9762
|
-
return null!=(i=null==s?void 0:s.indexOf(t.id))?i:-1},t.getCenterVisibleCells=
|
|
9763
|
-
return t.filter((t=>!i.includes(t.column.id)))}),
|
|
9764
|
+
return null!=(i=null==s?void 0:s.indexOf(t.id))?i:-1},t.getCenterVisibleCells=zT((()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,e,n)=>{const i=[...null!=e?e:[],...null!=n?n:[]]
|
|
9765
|
+
return t.filter((t=>!i.includes(t.column.id)))}),VT(e.options,"debugRows")),t.getLeftVisibleCells=zT((()=>[t._getAllVisibleCells(),e.getState().columnPinning.left]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.column.id===e)))).filter(Boolean).map((t=>({...t,position:"left"})))),VT(e.options,"debugRows")),t.getRightVisibleCells=zT((()=>[t._getAllVisibleCells(),e.getState().columnPinning.right]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.column.id===e)))).filter(Boolean).map((t=>({...t,position:"right"})))),VT(e.options,"debugRows"))},createTable:t=>{t.setColumnPinning=e=>null==t.options.onColumnPinningChange?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,i
|
|
9764
9766
|
return t.setColumnPinning(e?{left:[],right:[]}:null!=(n=null==(i=t.initialState)?void 0:i.columnPinning)?n:{left:[],right:[]})},t.getIsSomeColumnsPinned=e=>{var n
|
|
9765
9767
|
const i=t.getState().columnPinning
|
|
9766
9768
|
var o,s
|
|
9767
|
-
return e?Boolean(null==(n=i[e])?void 0:n.length):Boolean((null==(o=i.left)?void 0:o.length)||(null==(s=i.right)?void 0:s.length))},t.getLeftLeafColumns=
|
|
9768
|
-
return t.filter((t=>!i.includes(t.id)))}),
|
|
9769
|
+
return e?Boolean(null==(n=i[e])?void 0:n.length):Boolean((null==(o=i.left)?void 0:o.length)||(null==(s=i.right)?void 0:s.length))},t.getLeftLeafColumns=zT((()=>[t.getAllLeafColumns(),t.getState().columnPinning.left]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.id===e)))).filter(Boolean)),VT(t.options,"debugColumns")),t.getRightLeafColumns=zT((()=>[t.getAllLeafColumns(),t.getState().columnPinning.right]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.id===e)))).filter(Boolean)),VT(t.options,"debugColumns")),t.getCenterLeafColumns=zT((()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((t,e,n)=>{const i=[...null!=e?e:[],...null!=n?n:[]]
|
|
9770
|
+
return t.filter((t=>!i.includes(t.id)))}),VT(t.options,"debugColumns")),t.setRowPinning=e=>null==t.options.onRowPinningChange?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,i
|
|
9769
9771
|
return t.setRowPinning(e?{top:[],bottom:[]}:null!=(n=null==(i=t.initialState)?void 0:i.rowPinning)?n:{top:[],bottom:[]})},t.getIsSomeRowsPinned=e=>{var n
|
|
9770
9772
|
const i=t.getState().rowPinning
|
|
9771
9773
|
var o,s
|
|
9772
|
-
return e?Boolean(null==(n=i[e])?void 0:n.length):Boolean((null==(o=i.top)?void 0:o.length)||(null==(s=i.bottom)?void 0:s.length))},t._getPinnedRows=
|
|
9774
|
+
return e?Boolean(null==(n=i[e])?void 0:n.length):Boolean((null==(o=i.top)?void 0:o.length)||(null==(s=i.bottom)?void 0:s.length))},t._getPinnedRows=zT((e=>[t.getRowModel().rows,t.getState().rowPinning[e],e]),((e,n,i)=>{var o
|
|
9773
9775
|
return(null==(o=t.options.keepPinnedRows)||o?(null!=n?n:[]).map((e=>{const n=t.getRow(e,!0)
|
|
9774
|
-
return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((t=>e.find((e=>e.id===t))))).filter(Boolean).map((t=>({...t,position:i})))}),
|
|
9775
|
-
return t.filter((t=>!i.has(t.id)))}),
|
|
9776
|
+
return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((t=>e.find((e=>e.id===t))))).filter(Boolean).map((t=>({...t,position:i})))}),VT(t.options,"debugRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=zT((()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom]),((t,e,n)=>{const i=new Set([...null!=e?e:[],...null!=n?n:[]])
|
|
9777
|
+
return t.filter((t=>!i.has(t.id)))}),VT(t.options,"debugRows"))}},fO={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:NT("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>null==t.options.onRowSelectionChange?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n
|
|
9776
9778
|
return t.setRowSelection(e?{}:null!=(n=t.initialState.rowSelection)?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection((n=>{e=void 0!==e?e:!t.getIsAllRowsSelected()
|
|
9777
9779
|
const i={...n},o=t.getPreGroupedRowModel().flatRows
|
|
9778
9780
|
return e?o.forEach((t=>{t.getCanSelect()&&(i[t.id]=!0)})):o.forEach((t=>{delete i[t.id]})),i}))},t.toggleAllPageRowsSelected=e=>t.setRowSelection((n=>{const i=void 0!==e?e:!t.getIsAllPageRowsSelected(),o={...n}
|
|
9779
|
-
return t.getRowModel().rows.forEach((e=>{
|
|
9781
|
+
return t.getRowModel().rows.forEach((e=>{mO(o,e.id,i,!0,t)})),o})),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=zT((()=>[t.getState().rowSelection,t.getCoreRowModel()]),((e,n)=>Object.keys(e).length?gO(t,n):{rows:[],flatRows:[],rowsById:{}}),VT(t.options,"debugTable")),t.getFilteredSelectedRowModel=zT((()=>[t.getState().rowSelection,t.getFilteredRowModel()]),((e,n)=>Object.keys(e).length?gO(t,n):{rows:[],flatRows:[],rowsById:{}}),VT(t.options,"debugTable")),t.getGroupedSelectedRowModel=zT((()=>[t.getState().rowSelection,t.getSortedRowModel()]),((e,n)=>Object.keys(e).length?gO(t,n):{rows:[],flatRows:[],rowsById:{}}),VT(t.options,"debugTable")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState()
|
|
9780
9782
|
let i=Boolean(e.length&&Object.keys(n).length)
|
|
9781
9783
|
return i&&e.some((t=>t.getCanSelect()&&!n[t.id]))&&(i=!1),i},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter((t=>t.getCanSelect())),{rowSelection:n}=t.getState()
|
|
9782
9784
|
let i=!!e.length
|
|
@@ -9787,40 +9789,40 @@ return!t.getIsAllPageRowsSelected()&&e.filter((t=>t.getCanSelect())).some((t=>t.
|
|
|
9787
9789
|
e.setRowSelection((s=>{var r
|
|
9788
9790
|
if(n=void 0!==n?n:!o,t.getCanSelect()&&o===n)return s
|
|
9789
9791
|
const a={...s}
|
|
9790
|
-
return
|
|
9791
|
-
return
|
|
9792
|
-
return"some"===
|
|
9793
|
-
return"all"===
|
|
9792
|
+
return mO(a,t.id,n,null==(r=null==i?void 0:i.selectChildren)||r,e),a}))},t.getIsSelected=()=>{const{rowSelection:n}=e.getState()
|
|
9793
|
+
return vO(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState()
|
|
9794
|
+
return"some"===bO(t,n)},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState()
|
|
9795
|
+
return"all"===bO(t,n)},t.getCanSelect=()=>{var n
|
|
9794
9796
|
return"function"==typeof e.options.enableRowSelection?e.options.enableRowSelection(t):null==(n=e.options.enableRowSelection)||n},t.getCanSelectSubRows=()=>{var n
|
|
9795
9797
|
return"function"==typeof e.options.enableSubRowSelection?e.options.enableSubRowSelection(t):null==(n=e.options.enableSubRowSelection)||n},t.getCanMultiSelect=()=>{var n
|
|
9796
9798
|
return"function"==typeof e.options.enableMultiRowSelection?e.options.enableMultiRowSelection(t):null==(n=e.options.enableMultiRowSelection)||n},t.getToggleSelectedHandler=()=>{const e=t.getCanSelect()
|
|
9797
9799
|
return n=>{var i
|
|
9798
|
-
e&&t.toggleSelected(null==(i=n.target)?void 0:i.checked)}}}},
|
|
9800
|
+
e&&t.toggleSelected(null==(i=n.target)?void 0:i.checked)}}}},mO=(t,e,n,i,o)=>{var s
|
|
9799
9801
|
const r=o.getRow(e,!0)
|
|
9800
|
-
n?(r.getCanMultiSelect()||Object.keys(t).forEach((e=>delete t[e])),r.getCanSelect()&&(t[e]=!0)):delete t[e],i&&null!=(s=r.subRows)&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach((e=>
|
|
9801
|
-
function
|
|
9802
|
-
const r=
|
|
9802
|
+
n?(r.getCanMultiSelect()||Object.keys(t).forEach((e=>delete t[e])),r.getCanSelect()&&(t[e]=!0)):delete t[e],i&&null!=(s=r.subRows)&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach((e=>mO(t,e.id,n,i,o)))}
|
|
9803
|
+
function gO(t,e){const n=t.getState().rowSelection,i=[],o={},s=function(t,e){return t.map((t=>{var e
|
|
9804
|
+
const r=vO(t,n)
|
|
9803
9805
|
if(r&&(i.push(t),o[t.id]=t),null!=(e=t.subRows)&&e.length&&(t={...t,subRows:s(t.subRows)}),r)return t})).filter(Boolean)}
|
|
9804
|
-
return{rows:s(e.rows),flatRows:i,rowsById:o}}function
|
|
9805
|
-
return null!=(n=e[t.id])&&n}function
|
|
9806
|
+
return{rows:s(e.rows),flatRows:i,rowsById:o}}function vO(t,e){var n
|
|
9807
|
+
return null!=(n=e[t.id])&&n}function bO(t,e,n){var i
|
|
9806
9808
|
if(null==(i=t.subRows)||!i.length)return!1
|
|
9807
9809
|
let o=!0,s=!1
|
|
9808
|
-
return t.subRows.forEach((t=>{if((!s||o)&&(t.getCanSelect()&&(
|
|
9809
|
-
"all"===n?s=!0:"some"===n?(s=!0,o=!1):o=!1}})),o?"all":!!s&&"some"}const
|
|
9810
|
-
function
|
|
9810
|
+
return t.subRows.forEach((t=>{if((!s||o)&&(t.getCanSelect()&&(vO(t,e)?s=!0:o=!1),t.subRows&&t.subRows.length)){const n=bO(t,e)
|
|
9811
|
+
"all"===n?s=!0:"some"===n?(s=!0,o=!1):o=!1}})),o?"all":!!s&&"some"}const yO=/([0-9]+)/gm
|
|
9812
|
+
function wO(t,e){return t===e?0:t>e?1:-1}function xO(t){return"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?"":String(t):"string"==typeof t?t:""}function CO(t,e){const n=t.split(yO).filter(Boolean),i=e.split(yO).filter(Boolean)
|
|
9811
9813
|
for(;n.length&&i.length;){const t=n.shift(),e=i.shift(),o=parseInt(t,10),s=parseInt(e,10),r=[o,s].sort()
|
|
9812
9814
|
if(isNaN(r[0])){if(t>e)return 1
|
|
9813
9815
|
if(e>t)return-1}else{if(isNaN(r[1]))return isNaN(o)?-1:1
|
|
9814
9816
|
if(o>s)return 1
|
|
9815
|
-
if(s>o)return-1}}return n.length-i.length}const
|
|
9816
|
-
return i>o?1:i<o?-1:0},basic:(t,e,n)=>
|
|
9817
|
+
if(s>o)return-1}}return n.length-i.length}const kO={alphanumeric:(t,e,n)=>CO(xO(t.getValue(n)).toLowerCase(),xO(e.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(t,e,n)=>CO(xO(t.getValue(n)),xO(e.getValue(n))),text:(t,e,n)=>wO(xO(t.getValue(n)).toLowerCase(),xO(e.getValue(n)).toLowerCase()),textCaseSensitive:(t,e,n)=>wO(xO(t.getValue(n)),xO(e.getValue(n))),datetime:(t,e,n)=>{const i=t.getValue(n),o=e.getValue(n)
|
|
9818
|
+
return i>o?1:i<o?-1:0},basic:(t,e,n)=>wO(t.getValue(n),e.getValue(n))},SO={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:NT("sorting",t),isMultiSortEvent:t=>t.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10)
|
|
9817
9819
|
let i=!1
|
|
9818
9820
|
for(const e of n){const n=null==e?void 0:e.getValue(t.id)
|
|
9819
|
-
if("[object Date]"===Object.prototype.toString.call(n))return
|
|
9820
|
-
if("string"==typeof n&&(i=!0,n.split(
|
|
9821
|
+
if("[object Date]"===Object.prototype.toString.call(n))return kO.datetime
|
|
9822
|
+
if("string"==typeof n&&(i=!0,n.split(yO).length>1))return kO.alphanumeric}return i?kO.text:kO.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0]
|
|
9821
9823
|
return"string"==typeof(null==n?void 0:n.getValue(t.id))?"asc":"desc"},t.getSortingFn=()=>{var n,i
|
|
9822
9824
|
if(!t)throw new Error
|
|
9823
|
-
return
|
|
9825
|
+
return PT(t.columnDef.sortingFn)?t.columnDef.sortingFn:"auto"===t.columnDef.sortingFn?t.getAutoSortingFn():null!=(n=null==(i=e.options.sortingFns)?void 0:i[t.columnDef.sortingFn])?n:kO[t.columnDef.sortingFn]},t.toggleSorting=(n,i)=>{const o=t.getNextSortingOrder(),s=null!=n
|
|
9824
9826
|
e.setSorting((r=>{const a=null==r?void 0:r.find((e=>e.id===t.id)),l=null==r?void 0:r.findIndex((e=>e.id===t.id))
|
|
9825
9827
|
let c,d=[],h=s?n:"desc"===o
|
|
9826
9828
|
var u;(c=null!=r&&r.length&&t.getCanMultiSort()&&i?a?"toggle":"add":null!=r&&r.length&&l!==r.length-1?"replace":a?"toggle":"replace","toggle"===c&&(s||o||(c="remove")),"add"===c)?(d=[...r,{id:t.id,desc:h}],d.splice(0,d.length-(null!=(u=e.options.maxMultiSortColCount)?u:Number.MAX_SAFE_INTEGER))):d="toggle"===c?r.map((e=>e.id===t.id?{...e,desc:h}:e)):"remove"===c?r.filter((e=>e.id!==t.id)):[{id:t.id,desc:h}]
|
|
@@ -9834,67 +9836,67 @@ const i=null==(n=e.getState().sorting)?void 0:n.find((e=>e.id===t.id))
|
|
|
9834
9836
|
return!!i&&(i.desc?"desc":"asc")},t.getSortIndex=()=>{var n,i
|
|
9835
9837
|
return null!=(n=null==(i=e.getState().sorting)?void 0:i.findIndex((e=>e.id===t.id)))?n:-1},t.clearSorting=()=>{e.setSorting((e=>null!=e&&e.length?e.filter((e=>e.id!==t.id)):[]))},t.getToggleSortingHandler=()=>{const n=t.getCanSort()
|
|
9836
9838
|
return i=>{n&&(null==i.persist||i.persist(),null==t.toggleSorting||t.toggleSorting(void 0,!!t.getCanMultiSort()&&(null==e.options.isMultiSortEvent?void 0:e.options.isMultiSortEvent(i))))}}},createTable:t=>{t.setSorting=e=>null==t.options.onSortingChange?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,i
|
|
9837
|
-
t.setSorting(e?[]:null!=(n=null==(i=t.initialState)?void 0:i.sorting)?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}}
|
|
9839
|
+
t.setSorting(e?[]:null!=(n=null==(i=t.initialState)?void 0:i.sorting)?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},$O={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:NT("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility((e=>({...e,[t.id]:null!=n?n:!t.getIsVisible()})))},t.getIsVisible=()=>{var n,i
|
|
9838
9840
|
const o=t.columns
|
|
9839
9841
|
return null==(n=o.length?o.some((t=>t.getIsVisible())):null==(i=e.getState().columnVisibility)?void 0:i[t.id])||n},t.getCanHide=()=>{var n,i
|
|
9840
|
-
return(null==(n=t.columnDef.enableHiding)||n)&&(null==(i=e.options.enableHiding)||i)},t.getToggleVisibilityHandler=()=>e=>{null==t.toggleVisibility||t.toggleVisibility(e.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=
|
|
9842
|
+
return(null==(n=t.columnDef.enableHiding)||n)&&(null==(i=e.options.enableHiding)||i)},t.getToggleVisibilityHandler=()=>e=>{null==t.toggleVisibility||t.toggleVisibility(e.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=zT((()=>[t.getAllCells(),e.getState().columnVisibility]),(t=>t.filter((t=>t.column.getIsVisible()))),VT(e.options,"debugRows")),t.getVisibleCells=zT((()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()]),((t,e,n)=>[...t,...e,...n]),VT(e.options,"debugRows"))},createTable:t=>{const e=(e,n)=>zT((()=>[n(),n().filter((t=>t.getIsVisible())).map((t=>t.id)).join("_")]),(t=>t.filter((t=>null==t.getIsVisible?void 0:t.getIsVisible()))),VT(t.options,"debugColumns"))
|
|
9841
9843
|
t.getVisibleFlatColumns=e(0,(()=>t.getAllFlatColumns())),t.getVisibleLeafColumns=e(0,(()=>t.getAllLeafColumns())),t.getLeftVisibleLeafColumns=e(0,(()=>t.getLeftLeafColumns())),t.getRightVisibleLeafColumns=e(0,(()=>t.getRightLeafColumns())),t.getCenterVisibleLeafColumns=e(0,(()=>t.getCenterLeafColumns())),t.setColumnVisibility=e=>null==t.options.onColumnVisibilityChange?void 0:t.options.onColumnVisibilityChange(e),t.resetColumnVisibility=e=>{var n
|
|
9842
9844
|
t.setColumnVisibility(e?{}:null!=(n=t.initialState.columnVisibility)?n:{})},t.toggleAllColumnsVisible=e=>{var n
|
|
9843
9845
|
e=null!=(n=e)?n:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce(((t,n)=>({...t,[n.id]:e||!(null!=n.getCanHide&&n.getCanHide())})),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some((t=>!(null!=t.getIsVisible&&t.getIsVisible()))),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some((t=>null==t.getIsVisible?void 0:t.getIsVisible())),t.getToggleAllColumnsVisibilityHandler=()=>e=>{var n
|
|
9844
9846
|
t.toggleAllColumnsVisible(null==(n=e.target)?void 0:n.checked)}}}
|
|
9845
|
-
function
|
|
9846
|
-
function
|
|
9847
|
-
let n={_features:
|
|
9847
|
+
function MO(t,e){return e?"center"===e?t.getCenterVisibleLeafColumns():"left"===e?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const _O=[qT,$O,hO,pO,aO,SO,dO,KT,uO,fO,WT]
|
|
9848
|
+
function EO(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...")
|
|
9849
|
+
let n={_features:_O}
|
|
9848
9850
|
const i=n._features.reduce(((t,e)=>Object.assign(t,null==e.getDefaultOptions?void 0:e.getDefaultOptions(n))),{})
|
|
9849
9851
|
let o={...null!=(e=t.initialState)?e:{}}
|
|
9850
9852
|
n._features.forEach((t=>{var e
|
|
9851
9853
|
o=null!=(e=null==t.getInitialState?void 0:t.getInitialState(o))?e:o}))
|
|
9852
9854
|
const s=[]
|
|
9853
9855
|
let r=!1
|
|
9854
|
-
const a={_features:
|
|
9855
|
-
r=!1})).catch((t=>setTimeout((()=>{throw t})))))},reset:()=>{n.setState(n.initialState)},setOptions:t=>{const e=
|
|
9856
|
+
const a={_features:_O,options:{...i,...t},initialState:o,_queue:t=>{s.push(t),r||(r=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()()
|
|
9857
|
+
r=!1})).catch((t=>setTimeout((()=>{throw t})))))},reset:()=>{n.setState(n.initialState)},setOptions:t=>{const e=FT(t,n.options)
|
|
9856
9858
|
n.options=(t=>n.options.mergeOptions?n.options.mergeOptions(i,t):{...i,...t})(e)},getState:()=>n.options.state,setState:t=>{null==n.options.onStateChange||n.options.onStateChange(t)},_getRowId:(t,e,i)=>{var o
|
|
9857
9859
|
return null!=(o=null==n.options.getRowId?void 0:n.options.getRowId(t,e,i))?o:`${i?[i.id,e].join("."):e}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(t,e)=>{let i=(e?n.getPrePaginationRowModel():n.getRowModel()).rowsById[t]
|
|
9858
9860
|
if(!i&&(i=n.getCoreRowModel().rowsById[t],!i))throw new Error
|
|
9859
|
-
return i},_getDefaultColumnDef:
|
|
9861
|
+
return i},_getDefaultColumnDef:zT((()=>[n.options.defaultColumn]),(t=>{var e
|
|
9860
9862
|
return t=null!=(e=t)?e:{},{header:t=>{const e=t.header.column.columnDef
|
|
9861
9863
|
return e.accessorKey?e.accessorKey:e.accessorFn?e.id:null},cell:t=>{var e,n
|
|
9862
|
-
return null!=(e=null==(n=t.renderValue())||null==n.toString?void 0:n.toString())?e:null},...n._features.reduce(((t,e)=>Object.assign(t,null==e.getDefaultColumnDef?void 0:e.getDefaultColumnDef())),{}),...t}}),
|
|
9864
|
+
return null!=(e=null==(n=t.renderValue())||null==n.toString?void 0:n.toString())?e:null},...n._features.reduce(((t,e)=>Object.assign(t,null==e.getDefaultColumnDef?void 0:e.getDefaultColumnDef())),{}),...t}}),VT(t,"debugColumns")),_getColumnDefs:()=>n.options.columns,getAllColumns:zT((()=>[n._getColumnDefs()]),(t=>{const e=function(t,i,o){return void 0===o&&(o=0),t.map((t=>{const s=function(t,e,n,i){var o,s
|
|
9863
9865
|
const r={...t._getDefaultColumnDef(),...e},a=r.accessorKey
|
|
9864
9866
|
let l,c=null!=(o=null!=(s=r.id)?s:a?a.replace(".","_"):void 0)?o:"string"==typeof r.header?r.header:void 0
|
|
9865
9867
|
if(r.accessorFn?l=r.accessorFn:a&&(l=a.includes(".")?t=>{let e=t
|
|
9866
9868
|
for(const t of a.split(".")){var n
|
|
9867
9869
|
e=null==(n=e)?void 0:n[t]}return e}:t=>t[r.accessorKey]),!c)throw new Error
|
|
9868
|
-
let d={id:`${String(c)}`,accessorFn:l,parent:i,depth:n,columnDef:r,columns:[],getFlatColumns:
|
|
9869
|
-
return[d,...null==(t=d.columns)?void 0:t.flatMap((t=>t.getFlatColumns()))]}),
|
|
9870
|
+
let d={id:`${String(c)}`,accessorFn:l,parent:i,depth:n,columnDef:r,columns:[],getFlatColumns:zT((()=>[!0]),(()=>{var t
|
|
9871
|
+
return[d,...null==(t=d.columns)?void 0:t.flatMap((t=>t.getFlatColumns()))]}),VT(t.options,"debugColumns")),getLeafColumns:zT((()=>[t._getOrderColumnsFn()]),(t=>{var e
|
|
9870
9872
|
if(null!=(e=d.columns)&&e.length){let e=d.columns.flatMap((t=>t.getLeafColumns()))
|
|
9871
|
-
return t(e)}return[d]}),
|
|
9873
|
+
return t(e)}return[d]}),VT(t.options,"debugColumns"))}
|
|
9872
9874
|
for(const e of t._features)null==e.createColumn||e.createColumn(d,t)
|
|
9873
9875
|
return d}(n,t,o,i),r=t
|
|
9874
9876
|
return s.columns=r.columns?e(r.columns,s,o+1):[],s}))}
|
|
9875
|
-
return e(t)}),
|
|
9877
|
+
return e(t)}),VT(t,"debugColumns")),getAllFlatColumns:zT((()=>[n.getAllColumns()]),(t=>t.flatMap((t=>t.getFlatColumns()))),VT(t,"debugColumns")),_getAllFlatColumnsById:zT((()=>[n.getAllFlatColumns()]),(t=>t.reduce(((t,e)=>(t[e.id]=e,t)),{})),VT(t,"debugColumns")),getAllLeafColumns:zT((()=>[n.getAllColumns(),n._getOrderColumnsFn()]),((t,e)=>e(t.flatMap((t=>t.getLeafColumns())))),VT(t,"debugColumns")),getColumn:t=>n._getAllFlatColumnsById()[t]}
|
|
9876
9878
|
Object.assign(n,a)
|
|
9877
9879
|
for(let t=0;t<n._features.length;t++){const e=n._features[t]
|
|
9878
|
-
null==e||null==e.createTable||e.createTable(n)}return n}const
|
|
9880
|
+
null==e||null==e.createTable||e.createTable(n)}return n}const IO=(t,e,n,i,o,s,r)=>{let a={id:e,index:i,original:n,depth:o,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:e=>{if(a._valuesCache.hasOwnProperty(e))return a._valuesCache[e]
|
|
9879
9881
|
const n=t.getColumn(e)
|
|
9880
9882
|
return null!=n&&n.accessorFn?(a._valuesCache[e]=n.accessorFn(a.original,i),a._valuesCache[e]):void 0},getUniqueValues:e=>{if(a._uniqueValuesCache.hasOwnProperty(e))return a._uniqueValuesCache[e]
|
|
9881
9883
|
const n=t.getColumn(e)
|
|
9882
9884
|
return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(a._uniqueValuesCache[e]=n.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[e]):(a._uniqueValuesCache[e]=[a.getValue(e)],a._uniqueValuesCache[e]):void 0},renderValue:e=>{var n
|
|
9883
|
-
return null!=(n=a.getValue(e))?n:t.options.renderFallbackValue},subRows:null!=s?s:[],getLeafRows:()=>
|
|
9885
|
+
return null!=(n=a.getValue(e))?n:t.options.renderFallbackValue},subRows:null!=s?s:[],getLeafRows:()=>LT(a.subRows,(t=>t.subRows)),getParentRow:()=>a.parentId?t.getRow(a.parentId,!0):void 0,getParentRows:()=>{let t=[],e=a
|
|
9884
9886
|
for(;;){const n=e.getParentRow()
|
|
9885
9887
|
if(!n)break
|
|
9886
|
-
t.push(n),e=n}return t.reverse()},getAllCells:
|
|
9887
|
-
return null!=(e=o.getValue())?e:t.options.renderFallbackValue},getContext:
|
|
9888
|
-
return t._features.forEach((i=>{null==i.createCell||i.createCell(o,n,e,t)}),{}),o}(t,a,e,e.id)))),
|
|
9888
|
+
t.push(n),e=n}return t.reverse()},getAllCells:zT((()=>[t.getAllLeafColumns()]),(e=>e.map((e=>function(t,e,n,i){const o={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(i),renderValue:()=>{var e
|
|
9889
|
+
return null!=(e=o.getValue())?e:t.options.renderFallbackValue},getContext:zT((()=>[t,n,e,o]),((t,e,n,i)=>({table:t,column:e,row:n,cell:i,getValue:i.getValue,renderValue:i.renderValue})),VT(t.options,"debugCells"))}
|
|
9890
|
+
return t._features.forEach((i=>{null==i.createCell||i.createCell(o,n,e,t)}),{}),o}(t,a,e,e.id)))),VT(t.options,"debugRows")),_getAllCellsByColumnId:zT((()=>[a.getAllCells()]),(t=>t.reduce(((t,e)=>(t[e.column.id]=e,t)),{})),VT(t.options,"debugRows"))}
|
|
9889
9891
|
for(let e=0;e<t._features.length;e++){const n=t._features[e]
|
|
9890
9892
|
null==n||null==n.createRow||n.createRow(a,t)}return a}
|
|
9891
|
-
function
|
|
9893
|
+
function DO(){return t=>zT((()=>[t.getState().grouping,t.getPreGroupedRowModel()]),((e,n)=>{if(!n.rows.length||!e.length)return n
|
|
9892
9894
|
const i=e.filter((e=>t.getColumn(e))),o=[],s={},r=function(e,n,a){if(void 0===n&&(n=0),n>=i.length)return e.map((t=>(t.depth=n,o.push(t),s[t.id]=t,t.subRows&&(t.subRows=r(t.subRows,n+1,t.id)),t)))
|
|
9893
9895
|
const l=i[n],c=function(t,e){const n=new Map
|
|
9894
9896
|
return t.reduce(((t,n)=>{const i=`${n.getGroupingValue(e)}`,o=t.get(i)
|
|
9895
9897
|
return o?o.push(n):t.set(i,[n]),t}),n)}(e,l),d=Array.from(c.entries()).map(((e,c)=>{let[d,h]=e,u=`${l}:${d}`
|
|
9896
9898
|
u=a?`${a}>${u}`:u
|
|
9897
|
-
const p=r(h,n+1,u),f=n?
|
|
9899
|
+
const p=r(h,n+1,u),f=n?LT(h,(t=>t.subRows)):h,m=IO(t,u,f[0].original,c,n,void 0,a)
|
|
9898
9900
|
return Object.assign(m,{groupingColumnId:l,groupingValue:d,subRows:p,leafRows:f,getValue:e=>{if(i.includes(e)){if(m._valuesCache.hasOwnProperty(e))return m._valuesCache[e]
|
|
9899
9901
|
var n
|
|
9900
9902
|
if(h[0])m._valuesCache[e]=null!=(n=h[0].getValue(e))?n:void 0
|
|
@@ -9902,10 +9904,10 @@ return m._valuesCache[e]}if(m._groupingValuesCache.hasOwnProperty(e))return m._g
|
|
|
9902
9904
|
const o=t.getColumn(e),s=null==o?void 0:o.getAggregationFn()
|
|
9903
9905
|
return s?(m._groupingValuesCache[e]=s(e,f,h),m._groupingValuesCache[e]):void 0}}),p.forEach((t=>{o.push(t),s[t.id]=t})),m}))
|
|
9904
9906
|
return d},a=r(n.rows,0)
|
|
9905
|
-
return a.forEach((t=>{o.push(t),s[t.id]=t})),{rows:a,flatRows:o,rowsById:s}}),
|
|
9906
|
-
class
|
|
9907
|
-
const
|
|
9908
|
-
try{e=document.createElement(t)}catch(t){}if(!(e instanceof
|
|
9907
|
+
return a.forEach((t=>{o.push(t),s[t.id]=t})),{rows:a,flatRows:o,rowsById:s}}),VT(t.options,"debugTable",0,(()=>{t._queue((()=>{t._autoResetExpanded(),t._autoResetPageIndex()}))})))}const AO=void 0,TO="can-load-children",OO="loading-children",RO={none:void 0,ascending:"ascending",descending:"descending"},FO={none:void 0,single:"single",multiple:"multiple"},NO="not-selected",PO="selected",LO="partially-selected",zO="basic",VO="localeAwareCaseSensitive",HO=117,BO=1
|
|
9908
|
+
class qO extends Ve{}t([g],qO.prototype,"groupHeaderValue",void 0),t([g],qO.prototype,"columnConfig",void 0)
|
|
9909
|
+
const UO=t=>((t=>{let e
|
|
9910
|
+
try{e=document.createElement(t)}catch(t){}if(!(e instanceof qO))throw new Error(`Group header view tag name (${t}) must evaluate to an element extending TableGroupHeaderView`)})(t),Z`
|
|
9909
9911
|
<${t}
|
|
9910
9912
|
:groupHeaderValue="${t=>t.groupRowValue}"
|
|
9911
9913
|
:columnConfig="${t=>t.groupColumn?.columnInternals.columnConfig}"
|
|
@@ -9913,11 +9915,11 @@ try{e=document.createElement(t)}catch(t){}if(!(e instanceof BO))throw new Error(
|
|
|
9913
9915
|
>
|
|
9914
9916
|
</${t}>
|
|
9915
9917
|
`)
|
|
9916
|
-
class
|
|
9918
|
+
class jO extends Ve{constructor(){super(...arguments),this.delegatedEvents=[],this.delegatedEventHandler=()=>{}}focusedRecycleCallback(){}columnChanged(){for(const t of this.delegatedEvents)this.removeEventListener(t,this.delegatedEventHandler)
|
|
9917
9919
|
if(this.delegatedEvents=[],this.delegatedEventHandler=()=>{},this.column){this.delegatedEvents=this.column.columnInternals.delegatedEvents,this.delegatedEventHandler=t=>{this.recordId&&this.column?.dispatchEvent(new CustomEvent("delegated-event",{detail:{originalEvent:t,recordId:this.recordId}}))}
|
|
9918
|
-
for(const t of this.delegatedEvents)this.addEventListener(t,this.delegatedEventHandler)}}}t([g],
|
|
9919
|
-
const
|
|
9920
|
-
try{e=document.createElement(t)}catch(t){}if(!(e instanceof
|
|
9920
|
+
for(const t of this.delegatedEvents)this.addEventListener(t,this.delegatedEventHandler)}}}t([g],jO.prototype,"cellRecord",void 0),t([g],jO.prototype,"columnConfig",void 0),t([g],jO.prototype,"column",void 0),t([g],jO.prototype,"recordId",void 0)
|
|
9921
|
+
const WO=t=>((t=>{let e
|
|
9922
|
+
try{e=document.createElement(t)}catch(t){}if(!(e instanceof jO))throw new Error(`Cell view tag name (${t}) must evaluate to an element extending TableCellView`)})(t),Z`
|
|
9921
9923
|
<${t}
|
|
9922
9924
|
:cellRecord="${t=>t.cellState?.cellRecord}"
|
|
9923
9925
|
:columnConfig="${t=>t.cellState?.columnConfig}"
|
|
@@ -9927,11 +9929,11 @@ try{e=document.createElement(t)}catch(t){}if(!(e instanceof UO))throw new Error(
|
|
|
9927
9929
|
>
|
|
9928
9930
|
</${t}>
|
|
9929
9931
|
`)
|
|
9930
|
-
class
|
|
9931
|
-
return!1}t([g],
|
|
9932
|
-
class
|
|
9933
|
-
class
|
|
9934
|
-
return!t.duplicateRecordId&&!t.missingRecordId&&!t.invalidRecordId}validateIdFieldConfiguration(t,e,n){const i=t!==
|
|
9932
|
+
class ZO{constructor(t){this.uniqueId=xa("table-column-slot"),this.sortOperation=zO,this.dataRecordFieldNames=[],this.groupingDisabled=!1,this.fractionalWidth=BO,this.minPixelWidth=HO,this.currentFractionalWidth=BO,this.currentSortDirection=RO.none,this.cellRecordFieldNames=t.cellRecordFieldNames,this.cellViewTemplate=WO(t.cellViewTag),this.groupHeaderViewTemplate=UO(t.groupHeaderViewTag),this.delegatedEvents=t.delegatedEvents,this.sortOperation=t.sortOperation??zO,this.validator=t.validator}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}function GO(t,...e){for(const n of e)if(t===n)return!0
|
|
9933
|
+
return!1}t([g],ZO.prototype,"columnConfig",void 0),t([g],ZO.prototype,"operandDataRecordFieldName",void 0),t([g],ZO.prototype,"sortOperation",void 0),t([g],ZO.prototype,"dataRecordFieldNames",void 0),t([g],ZO.prototype,"groupingDisabled",void 0),t([g],ZO.prototype,"groupIndex",void 0),t([g],ZO.prototype,"pixelWidth",void 0),t([g],ZO.prototype,"fractionalWidth",void 0),t([g],ZO.prototype,"minPixelWidth",void 0),t([g],ZO.prototype,"currentFractionalWidth",void 0),t([g],ZO.prototype,"currentPixelWidth",void 0),t([g],ZO.prototype,"currentSortIndex",void 0),t([g],ZO.prototype,"currentSortDirection",void 0)
|
|
9934
|
+
class KO extends Ve{constructor(){super(...arguments),this.columnInternals=new ZO(this.getColumnInternalsOptions()),this.columnHidden=!1,this.sortDirection=RO.none,this.sortingDisabled=!1,this.hasOverflow=!1}checkValidity(){return this.columnInternals.validator.isColumnValid}get validity(){return this.columnInternals.validator.getValidity()}get headerTextContent(){return this.contentSlot.assignedNodes().map((t=>t.textContent?.trim())).join(" ")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot",this.columnInternals.uniqueId)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex)}sortingDisabledChanged(){this.sortingDisabled?(this.columnInternals.currentSortDirection=RO.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex)}}t([lt({attribute:"column-id"})],KO.prototype,"columnId",void 0),t([lt({attribute:"action-menu-slot"})],KO.prototype,"actionMenuSlot",void 0),t([lt({attribute:"action-menu-label"})],KO.prototype,"actionMenuLabel",void 0),t([lt({attribute:"column-hidden",mode:"boolean"})],KO.prototype,"columnHidden",void 0),t([lt({attribute:"sort-index",converter:rt})],KO.prototype,"sortIndex",void 0),t([lt({attribute:"sort-direction"})],KO.prototype,"sortDirection",void 0),t([lt({attribute:"sorting-disabled",mode:"boolean"})],KO.prototype,"sortingDisabled",void 0),t([g],KO.prototype,"hasOverflow",void 0)
|
|
9935
|
+
class JO{constructor(){this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.duplicateColumnId=!1,this.missingColumnId=!1,this.duplicateSortIndex=!1,this.duplicateGroupIndex=!1,this.idFieldNameNotConfigured=!1,this.invalidColumnConfiguration=!1,this.invalidParentIdConfiguration=!1,this.recordIds=new Set}getValidity(){return{duplicateRecordId:this.duplicateRecordId,missingRecordId:this.missingRecordId,invalidRecordId:this.invalidRecordId,duplicateColumnId:this.duplicateColumnId,missingColumnId:this.missingColumnId,duplicateSortIndex:this.duplicateSortIndex,duplicateGroupIndex:this.duplicateGroupIndex,idFieldNameNotConfigured:this.idFieldNameNotConfigured,invalidColumnConfiguration:this.invalidColumnConfiguration,invalidParentIdConfiguration:this.invalidParentIdConfiguration}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}areRecordIdsValid(){const t=this.getValidity()
|
|
9936
|
+
return!t.duplicateRecordId&&!t.missingRecordId&&!t.invalidRecordId}validateIdFieldConfiguration(t,e,n){const i=t!==FO.none||"string"==typeof n
|
|
9935
9937
|
return this.idFieldNameNotConfigured=!!i&&"string"!=typeof e,!this.idFieldNameNotConfigured}validateRecordIds(t,e){if(this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.recordIds.clear(),"string"!=typeof e)return!0
|
|
9936
9938
|
for(const n of t){if(!Object.prototype.hasOwnProperty.call(n,e)){this.missingRecordId=!0
|
|
9937
9939
|
continue}const t=n[e]
|
|
@@ -9940,7 +9942,7 @@ const e=t.some((t=>t))
|
|
|
9940
9942
|
if(!e)return!0
|
|
9941
9943
|
const n=new Set
|
|
9942
9944
|
for(const e of t)e?(n.has(e)&&(this.duplicateColumnId=!0),n.add(e)):this.missingColumnId=!0
|
|
9943
|
-
return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t){return this.duplicateSortIndex=!this.validateIndicesAreUnique(t),!this.duplicateSortIndex}validateColumnGroupIndices(t){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(t),!this.duplicateGroupIndex}validateColumnConfigurations(t){return this.invalidColumnConfiguration=t.some((t=>!t.columnInternals.validator.isColumnValid)),!this.invalidColumnConfiguration}getPresentRecordIds(t){return t.filter((t=>this.recordIds.has(t)))}getOptionsWithPresentIds(t){return t.filter((t=>this.recordIds.has(t.recordId)))}setParentIdConfigurationValidity(t){this.invalidParentIdConfiguration=!t}validateIndicesAreUnique(t){return new Set(t).size===t.length}}const
|
|
9945
|
+
return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t){return this.duplicateSortIndex=!this.validateIndicesAreUnique(t),!this.duplicateSortIndex}validateColumnGroupIndices(t){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(t),!this.duplicateGroupIndex}validateColumnConfigurations(t){return this.invalidColumnConfiguration=t.some((t=>!t.columnInternals.validator.isColumnValid)),!this.invalidColumnConfiguration}getPresentRecordIds(t){return t.filter((t=>this.recordIds.has(t)))}getOptionsWithPresentIds(t){return t.filter((t=>this.recordIds.has(t.recordId)))}setParentIdConfigurationValidity(t){this.invalidParentIdConfiguration=!t}validateIndicesAreUnique(t){return new Set(t).size===t.length}}const XO=xt`
|
|
9944
9946
|
${Oo("flex")}
|
|
9945
9947
|
|
|
9946
9948
|
:host {
|
|
@@ -10122,7 +10124,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t
|
|
|
10122
10124
|
background-color: ${_s(rs,.1)};
|
|
10123
10125
|
position: absolute;
|
|
10124
10126
|
}
|
|
10125
|
-
`)),
|
|
10127
|
+
`)),YO=xt`
|
|
10126
10128
|
${Oo("flex")}
|
|
10127
10129
|
|
|
10128
10130
|
:host {
|
|
@@ -10141,7 +10143,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t
|
|
|
10141
10143
|
.grouped-indicator {
|
|
10142
10144
|
flex: 0 0 auto;
|
|
10143
10145
|
}
|
|
10144
|
-
`,
|
|
10146
|
+
`,QO=Z`
|
|
10145
10147
|
<template role="columnheader"
|
|
10146
10148
|
aria-sort="${t=>t.ariaSort}"
|
|
10147
10149
|
${""}
|
|
@@ -10149,14 +10151,14 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t
|
|
|
10149
10151
|
>
|
|
10150
10152
|
<slot></slot>
|
|
10151
10153
|
${""}
|
|
10152
|
-
${Ht((t=>t.sortDirection===
|
|
10154
|
+
${Ht((t=>t.sortDirection===RO.ascending),Z`
|
|
10153
10155
|
<${Eg}
|
|
10154
10156
|
class="sort-indicator"
|
|
10155
10157
|
title="${t=>hv.getValueFor(t)}"
|
|
10156
10158
|
aria-hidden="true"
|
|
10157
10159
|
></${Eg}>
|
|
10158
10160
|
`)}
|
|
10159
|
-
${Ht((t=>t.sortDirection===
|
|
10161
|
+
${Ht((t=>t.sortDirection===RO.descending),Z`
|
|
10160
10162
|
<${Mg}
|
|
10161
10163
|
class="sort-indicator"
|
|
10162
10164
|
title="${t=>uv.getValueFor(t)}"
|
|
@@ -10173,10 +10175,10 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t
|
|
|
10173
10175
|
`)}
|
|
10174
10176
|
</template>
|
|
10175
10177
|
`
|
|
10176
|
-
class
|
|
10177
|
-
const tR
|
|
10178
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
10179
|
-
const
|
|
10178
|
+
class tR extends Ve{constructor(){super(...arguments),this.sortDirection=RO.none,this.firstSortedColumn=!1,this.isGrouped=!1}sortDirectionChanged(t,e){this.updateAriaSort()}firstSortedColumnChanged(t,e){this.updateAriaSort()}updateAriaSort(){this.firstSortedColumn&&this.sortDirection!==RO.none?this.sortDirection===RO.ascending?this.ariaSort="ascending":this.ariaSort="descending":this.ariaSort=null}}t([lt({attribute:"sort-direction"})],tR.prototype,"sortDirection",void 0),t([lt({attribute:"first-sorted-column",mode:"boolean"})],tR.prototype,"firstSortedColumn",void 0),t([g],tR.prototype,"isGrouped",void 0)
|
|
10179
|
+
const eR=tR.compose({baseName:"table-header",template:QO,styles:YO})
|
|
10180
|
+
wi.getOrCreate().withPrefix("nimble").register(eR())
|
|
10181
|
+
const nR="nimble-table-header",iR=xt`
|
|
10180
10182
|
:host .animating {
|
|
10181
10183
|
transition: ${Hd} ease-in;
|
|
10182
10184
|
}
|
|
@@ -10199,8 +10201,8 @@ const eR="nimble-table-header",nR=xt`
|
|
|
10199
10201
|
transition-duration: 0s;
|
|
10200
10202
|
}
|
|
10201
10203
|
}
|
|
10202
|
-
`,
|
|
10203
|
-
${
|
|
10204
|
+
`,oR=xt`
|
|
10205
|
+
${iR}
|
|
10204
10206
|
${Oo("flex")}
|
|
10205
10207
|
|
|
10206
10208
|
:host {
|
|
@@ -10320,7 +10322,7 @@ const eR="nimble-table-header",nR=xt`
|
|
|
10320
10322
|
:host([selected]:hover)::before {
|
|
10321
10323
|
background-color: ${_s(rs,.2)};
|
|
10322
10324
|
}
|
|
10323
|
-
`)),
|
|
10325
|
+
`)),sR=xt`
|
|
10324
10326
|
${Oo("flex")}
|
|
10325
10327
|
|
|
10326
10328
|
:host {
|
|
@@ -10350,7 +10352,7 @@ const eR="nimble-table-header",nR=xt`
|
|
|
10350
10352
|
height: ${ol};
|
|
10351
10353
|
align-self: center;
|
|
10352
10354
|
}
|
|
10353
|
-
`,
|
|
10355
|
+
`,rR=Z`
|
|
10354
10356
|
<template role="cell" style="--ni-private-table-cell-nesting-level: ${t=>t.nestingLevel}">
|
|
10355
10357
|
${t=>t.cellViewTemplate}
|
|
10356
10358
|
${Ht((t=>t.hasActionMenu),Z`
|
|
@@ -10370,10 +10372,10 @@ const eR="nimble-table-header",nR=xt`
|
|
|
10370
10372
|
`)}
|
|
10371
10373
|
</template>
|
|
10372
10374
|
`
|
|
10373
|
-
class
|
|
10374
|
-
const aR
|
|
10375
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
10376
|
-
const
|
|
10375
|
+
class aR extends Ve{constructor(){super(...arguments),this.hasActionMenu=!1,this.menuOpen=!1,this.nestingLevel=0}onActionMenuBeforeToggle(t){this.$emit("cell-action-menu-beforetoggle",t.detail)}onActionMenuToggle(t){this.menuOpen=t.detail.newState,this.$emit("cell-action-menu-toggle",t.detail)}}t([g],aR.prototype,"cellState",void 0),t([g],aR.prototype,"column",void 0),t([g],aR.prototype,"recordId",void 0),t([lt({attribute:"column-id"})],aR.prototype,"columnId",void 0),t([lt({attribute:"has-action-menu",mode:"boolean"})],aR.prototype,"hasActionMenu",void 0),t([lt({attribute:"menu-open",mode:"boolean"})],aR.prototype,"menuOpen",void 0),t([lt({attribute:"action-menu-label"})],aR.prototype,"actionMenuLabel",void 0),t([g],aR.prototype,"cellViewTemplate",void 0),t([g],aR.prototype,"nestingLevel",void 0)
|
|
10376
|
+
const lR=aR.compose({baseName:"table-cell",template:rR,styles:sR})
|
|
10377
|
+
wi.getOrCreate().withPrefix("nimble").register(lR())
|
|
10378
|
+
const cR="nimble-table-cell",dR=Z`
|
|
10377
10379
|
<template
|
|
10378
10380
|
role="row"
|
|
10379
10381
|
aria-selected=${t=>t.ariaSelected}
|
|
@@ -10399,12 +10401,12 @@ const lR="nimble-table-cell",cR=Z`
|
|
|
10399
10401
|
${Ht((t=>t.isParentRow),Z`
|
|
10400
10402
|
${Ht((t=>t.loading),Z`
|
|
10401
10403
|
<span class="spinner-container">
|
|
10402
|
-
<${
|
|
10403
|
-
appearance="${
|
|
10404
|
+
<${_T}
|
|
10405
|
+
appearance="${ST.accent}"
|
|
10404
10406
|
aria-label="${t=>vv.getValueFor(t)}"
|
|
10405
10407
|
title="${t=>vv.getValueFor(t)}"
|
|
10406
10408
|
>
|
|
10407
|
-
</${
|
|
10409
|
+
</${_T}>
|
|
10408
10410
|
</span>
|
|
10409
10411
|
`)}
|
|
10410
10412
|
${Ht((t=>!t.loading),Z`
|
|
@@ -10427,7 +10429,7 @@ const lR="nimble-table-cell",cR=Z`
|
|
|
10427
10429
|
>
|
|
10428
10430
|
${Zt((t=>t.columns),Z`
|
|
10429
10431
|
${Ht((t=>!t.columnHidden),Z`
|
|
10430
|
-
<${
|
|
10432
|
+
<${cR}
|
|
10431
10433
|
class="cell"
|
|
10432
10434
|
:cellState="${(t,e)=>e.parent.cellStates[e.index]}"
|
|
10433
10435
|
:cellViewTemplate="${t=>t.columnInternals.cellViewTemplate}"
|
|
@@ -10447,29 +10449,29 @@ const lR="nimble-table-cell",cR=Z`
|
|
|
10447
10449
|
slot="cellActionMenu"
|
|
10448
10450
|
></slot>
|
|
10449
10451
|
`)}
|
|
10450
|
-
</${
|
|
10452
|
+
</${cR}>
|
|
10451
10453
|
`)}
|
|
10452
10454
|
`,{recycle:!1,positioning:!0})}
|
|
10453
10455
|
</span>
|
|
10454
10456
|
</template>
|
|
10455
10457
|
`
|
|
10456
|
-
class
|
|
10458
|
+
class hR extends Ve{constructor(){super(...arguments),this.selectable=!1,this.selected=!1,this.hideSelection=!1,this.expanded=!1,this.columnNotifiers=[],this.columns=[],this.nestingLevel=0,this.isParentRow=!1,this.menuOpen=!1,this.rowOperationGridCellHidden=!1,this.loading=!1,this.cellIndentLevels=[],this.cellStates=[],this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon?.removeEventListener("transitionend",this.removeAnimatingClass)}}get isTopLevelParentRow(){return this.isParentRow&&0===this.nestingLevel}get isNestedParent(){return this.isParentRow&&this.nestingLevel>0}get ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionChange(t){if(this.ignoreSelectionChangeEvents)return
|
|
10457
10459
|
const e=t.target.checked
|
|
10458
10460
|
this.selected=e
|
|
10459
10461
|
const n={oldState:!e,newState:e}
|
|
10460
|
-
this.$emit("row-selection-toggle",n)}onCellActionMenuBeforeToggle(t,e){this.currentActionMenuColumn=e,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",t.detail,e)}onCellActionMenuToggle(t,e){this.menuOpen=t.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",t.detail,e)}closeOpenActionMenus(){if(this.menuOpen){const t=Array.from(this.cellContainer.children).find((t=>t instanceof
|
|
10461
|
-
t?.actionMenuButton?.open&&t.actionMenuButton.toggleButton.control.click()}}handleChange(t,e){t instanceof
|
|
10462
|
+
this.$emit("row-selection-toggle",n)}onCellActionMenuBeforeToggle(t,e){this.currentActionMenuColumn=e,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",t.detail,e)}onCellActionMenuToggle(t,e){this.menuOpen=t.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",t.detail,e)}closeOpenActionMenus(){if(this.menuOpen){const t=Array.from(this.cellContainer.children).find((t=>t instanceof aR&&t.menuOpen))
|
|
10463
|
+
t?.actionMenuButton?.open&&t.actionMenuButton.toggleButton.control.click()}}handleChange(t,e){t instanceof ZO&&"string"==typeof e&&(GO(e,"columnConfig")||GO(e,"dataRecordFieldNames"))&&this.updateCellStates()}onRowExpandToggle(t){const e={oldState:this.expanded,newState:!this.expanded,recordId:this.recordId}
|
|
10462
10464
|
this.$emit("row-expand-toggle",e),t.stopImmediatePropagation(),this.animationClass="animating",this.expandIcon?.addEventListener("transitionend",this.removeAnimatingClass)}emitActionMenuToggleEvent(t,e,n){const i={newState:e.newState,oldState:e.oldState,recordIds:[this.recordId],columnId:n.columnId}
|
|
10463
10465
|
this.$emit(t,i)}columnsChanged(){this.updateCellIndentLevels(),this.updateCellStates(),this.observeColumns()}dataRecordChanged(){this.updateCellStates()}nestingLevelChanged(){this.updateCellIndentLevels()}updateCellIndentLevels(){this.cellIndentLevels=this.columns.map(((t,e)=>0===e?this.nestingLevel:0))}removeColumnObservers(){this.columnNotifiers.forEach((t=>{t.unsubscribe(this)})),this.columnNotifiers=[]}observeColumns(){this.removeColumnObservers(),this.columnNotifiers=this.columns.map((t=>{const e=m.getNotifier(t.columnInternals)
|
|
10464
10466
|
return e.subscribe(this),e}))}updateCellStates(){this.cellStates=this.columns.map((t=>{const e=t.columnInternals.dataRecordFieldNames
|
|
10465
10467
|
let n
|
|
10466
10468
|
if(this.hasValidFieldNames(e)&&this.dataRecord){const i=e.map((t=>this.dataRecord[t]))
|
|
10467
|
-
n={cellRecord:Object.fromEntries(t.columnInternals.cellRecordFieldNames.map(((t,e)=>[t,i[e]]))),columnConfig:t.columnInternals.columnConfig}}return n}))}hasValidFieldNames(t){return t.every((t=>void 0!==t))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}t([lt({attribute:"record-id"})],
|
|
10468
|
-
const hR
|
|
10469
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
10470
|
-
const
|
|
10469
|
+
n={cellRecord:Object.fromEntries(t.columnInternals.cellRecordFieldNames.map(((t,e)=>[t,i[e]]))),columnConfig:t.columnInternals.columnConfig}}return n}))}hasValidFieldNames(t){return t.every((t=>void 0!==t))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}t([lt({attribute:"record-id"})],hR.prototype,"recordId",void 0),t([lt({mode:"boolean"})],hR.prototype,"selectable",void 0),t([lt({mode:"boolean"})],hR.prototype,"selected",void 0),t([lt({attribute:"hide-selection",mode:"boolean"})],hR.prototype,"hideSelection",void 0),t([lt({mode:"boolean"})],hR.prototype,"expanded",void 0),t([g],hR.prototype,"dataRecord",void 0),t([g],hR.prototype,"columns",void 0),t([g],hR.prototype,"currentActionMenuColumn",void 0),t([g],hR.prototype,"nestingLevel",void 0),t([lt({attribute:"is-parent-row",mode:"boolean"})],hR.prototype,"isParentRow",void 0),t([lt({attribute:"menu-open",mode:"boolean"})],hR.prototype,"menuOpen",void 0),t([lt({attribute:"row-operation-grid-cell-hidden",mode:"boolean"})],hR.prototype,"rowOperationGridCellHidden",void 0),t([lt({mode:"boolean"})],hR.prototype,"loading",void 0),t([g],hR.prototype,"cellIndentLevels",void 0),t([g],hR.prototype,"cellStates",void 0),t([g],hR.prototype,"selectionCheckbox",void 0),t([g],hR.prototype,"animationClass",void 0),t([v],hR.prototype,"isTopLevelParentRow",null),t([v],hR.prototype,"isNestedParent",null),t([v],hR.prototype,"ariaSelected",null)
|
|
10470
|
+
const uR=hR.compose({baseName:"table-row",template:dR,styles:oR})
|
|
10471
|
+
wi.getOrCreate().withPrefix("nimble").register(uR())
|
|
10472
|
+
const pR="nimble-table-row",fR=xt`
|
|
10471
10473
|
${Oo("grid")}
|
|
10472
|
-
${
|
|
10474
|
+
${iR}
|
|
10473
10475
|
|
|
10474
10476
|
:host {
|
|
10475
10477
|
align-items: center;
|
|
@@ -10552,7 +10554,7 @@ const uR="nimble-table-row",pR=xt`
|
|
|
10552
10554
|
:host(:hover)::before {
|
|
10553
10555
|
background-color: ${_s(rs,.1)};
|
|
10554
10556
|
}
|
|
10555
|
-
`)),
|
|
10557
|
+
`)),mR=Z`
|
|
10556
10558
|
<template
|
|
10557
10559
|
role="row"
|
|
10558
10560
|
@click=${t=>t.onGroupExpandToggle()}
|
|
@@ -10592,14 +10594,14 @@ const uR="nimble-table-row",pR=xt`
|
|
|
10592
10594
|
</div>
|
|
10593
10595
|
</template>
|
|
10594
10596
|
`
|
|
10595
|
-
class
|
|
10597
|
+
class gR extends Ve{constructor(){super(...arguments),this.nestingLevel=0,this.expanded=!1,this.selectable=!1,this.selectionState=NO,this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon.removeEventListener("transitionend",this.removeAnimatingClass)}}onGroupExpandToggle(){this.$emit("group-expand-toggle"),this.animationClass="animating",this.expandIcon.addEventListener("transitionend",this.removeAnimatingClass)}onSelectionChange(t){if(this.ignoreSelectionChangeEvents)return
|
|
10596
10598
|
const e=t.target.checked
|
|
10597
|
-
this.selectionState=e?NO
|
|
10599
|
+
this.selectionState=e?PO:NO
|
|
10598
10600
|
const n={oldState:!e,newState:e}
|
|
10599
|
-
this.$emit("group-selection-toggle",n)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
10600
|
-
const gR
|
|
10601
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
10602
|
-
const
|
|
10601
|
+
this.$emit("group-selection-toggle",n)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===PO,this.selectionCheckbox.indeterminate=this.selectionState===LO,this.ignoreSelectionChangeEvents=!1)}}t([g],gR.prototype,"groupRowValue",void 0),t([g],gR.prototype,"nestingLevel",void 0),t([g],gR.prototype,"immediateChildCount",void 0),t([g],gR.prototype,"groupColumn",void 0),t([lt({mode:"boolean"})],gR.prototype,"expanded",void 0),t([lt({mode:"boolean"})],gR.prototype,"selectable",void 0),t([lt({attribute:"selection-state"})],gR.prototype,"selectionState",void 0),t([g],gR.prototype,"selectionCheckbox",void 0),t([g],gR.prototype,"animationClass",void 0)
|
|
10602
|
+
const vR=gR.compose({baseName:"table-group-row",template:mR,styles:fR})
|
|
10603
|
+
wi.getOrCreate().withPrefix("nimble").register(vR())
|
|
10604
|
+
const bR="nimble-table-group-row",yR=Z`
|
|
10603
10605
|
<template
|
|
10604
10606
|
role="treegrid"
|
|
10605
10607
|
aria-multiselectable="${t=>t.ariaMultiSelectable}"
|
|
@@ -10625,7 +10627,7 @@ const vR="nimble-table-group-row",bR=Z`
|
|
|
10625
10627
|
${t=>gv.getValueFor(t)}
|
|
10626
10628
|
</span>
|
|
10627
10629
|
`)}
|
|
10628
|
-
${Ht((t=>t.selectionMode===
|
|
10630
|
+
${Ht((t=>t.selectionMode===FO.multiple),Z`
|
|
10629
10631
|
<span class="checkbox-container">
|
|
10630
10632
|
<${Gm}
|
|
10631
10633
|
${Pt("selectionCheckbox")}
|
|
@@ -10662,15 +10664,15 @@ const vR="nimble-table-group-row",bR=Z`
|
|
|
10662
10664
|
@mousedown="${(t,e)=>e.parent.onLeftDividerMouseDown(e.event,e.index)}">
|
|
10663
10665
|
</div>
|
|
10664
10666
|
`)}
|
|
10665
|
-
<${
|
|
10667
|
+
<${nR}
|
|
10666
10668
|
class="header"
|
|
10667
|
-
sort-direction="${t=>"number"==typeof t.columnInternals.currentSortIndex?t.columnInternals.currentSortDirection:
|
|
10669
|
+
sort-direction="${t=>"number"==typeof t.columnInternals.currentSortIndex?t.columnInternals.currentSortDirection:RO.none}"
|
|
10668
10670
|
?first-sorted-column="${(t,e)=>t===e.parent.firstSortedColumn}"
|
|
10669
10671
|
@click="${(t,e)=>e.parent.toggleColumnSort(t,e.event.shiftKey)}"
|
|
10670
10672
|
:isGrouped=${t=>"number"==typeof t.columnInternals.groupIndex&&!t.columnInternals.groupingDisabled}
|
|
10671
10673
|
>
|
|
10672
10674
|
<slot name="${t=>t.slot}"></slot>
|
|
10673
|
-
</${
|
|
10675
|
+
</${nR}>
|
|
10674
10676
|
${Ht(((t,e)=>e.index<e.length-1),Z`
|
|
10675
10677
|
<div
|
|
10676
10678
|
class="
|
|
@@ -10690,33 +10692,33 @@ const vR="nimble-table-group-row",bR=Z`
|
|
|
10690
10692
|
</div>
|
|
10691
10693
|
<div class="table-viewport" ${Pt("viewport")}>
|
|
10692
10694
|
<div class="table-scroll"></div>
|
|
10693
|
-
<div class="table-row-container" ${Qt({property:"rowElements",filter:Gt(
|
|
10695
|
+
<div class="table-row-container" ${Qt({property:"rowElements",filter:Gt(pR)})}
|
|
10694
10696
|
role="rowgroup">
|
|
10695
10697
|
${Ht((t=>t.columns.length>0&&t.canRenderRows),Z`
|
|
10696
10698
|
${Zt((t=>t.virtualizer.visibleItems),Z`
|
|
10697
10699
|
${Ht(((t,e)=>e.parent.tableData[t.index]?.isGroupRow),Z`
|
|
10698
|
-
<${
|
|
10700
|
+
<${bR}
|
|
10699
10701
|
class="group-row"
|
|
10700
10702
|
:groupRowValue="${(t,e)=>e.parent.tableData[t.index]?.groupRowValue}"
|
|
10701
10703
|
?expanded="${(t,e)=>e.parent.tableData[t.index]?.isExpanded}"
|
|
10702
10704
|
:nestingLevel="${(t,e)=>e.parent.tableData[t.index]?.nestingLevel}"
|
|
10703
10705
|
:immediateChildCount="${(t,e)=>e.parent.tableData[t.index]?.immediateChildCount}"
|
|
10704
10706
|
:groupColumn="${(t,e)=>e.parent.tableData[t.index]?.groupColumn}"
|
|
10705
|
-
?selectable="${(t,e)=>e.parent.selectionMode===
|
|
10707
|
+
?selectable="${(t,e)=>e.parent.selectionMode===FO.multiple}"
|
|
10706
10708
|
selection-state="${(t,e)=>e.parent.tableData[t.index]?.selectionState}"
|
|
10707
10709
|
@group-selection-toggle="${(t,e)=>e.parent.onRowSelectionToggle(t.index,e.event)}"
|
|
10708
10710
|
@group-expand-toggle="${(t,e)=>e.parent.handleGroupRowExpanded(t.index,e.event)}"
|
|
10709
10711
|
>
|
|
10710
|
-
</${
|
|
10712
|
+
</${bR}>
|
|
10711
10713
|
`)}
|
|
10712
10714
|
${Ht(((t,e)=>!e.parent.tableData[t.index]?.isGroupRow),Z`
|
|
10713
|
-
<${
|
|
10715
|
+
<${pR}
|
|
10714
10716
|
class="row"
|
|
10715
10717
|
record-id="${(t,e)=>e.parent.tableData[t.index]?.id}"
|
|
10716
|
-
?selectable="${(t,e)=>e.parent.selectionMode!==
|
|
10717
|
-
?selected="${(t,e)=>e.parent.tableData[t.index]?.selectionState===
|
|
10718
|
+
?selectable="${(t,e)=>e.parent.selectionMode!==FO.none}"
|
|
10719
|
+
?selected="${(t,e)=>e.parent.tableData[t.index]?.selectionState===PO}"
|
|
10718
10720
|
?expanded="${(t,e)=>e.parent.tableData[t.index]?.isExpanded}"
|
|
10719
|
-
?hide-selection="${(t,e)=>e.parent.selectionMode!==
|
|
10721
|
+
?hide-selection="${(t,e)=>e.parent.selectionMode!==FO.multiple}"
|
|
10720
10722
|
:dataRecord="${(t,e)=>e.parent.tableData[t.index]?.record}"
|
|
10721
10723
|
:columns="${(t,e)=>e.parent.columns}"
|
|
10722
10724
|
:isParentRow="${(t,e)=>e.parent.tableData[t.index]?.isParentRow}"
|
|
@@ -10738,7 +10740,7 @@ const vR="nimble-table-group-row",bR=Z`
|
|
|
10738
10740
|
</slot>
|
|
10739
10741
|
`)}
|
|
10740
10742
|
`)}
|
|
10741
|
-
</${
|
|
10743
|
+
</${pR}>
|
|
10742
10744
|
`)}
|
|
10743
10745
|
`)}
|
|
10744
10746
|
`)}
|
|
@@ -10748,7 +10750,7 @@ const vR="nimble-table-group-row",bR=Z`
|
|
|
10748
10750
|
</div>
|
|
10749
10751
|
</template>
|
|
10750
10752
|
`
|
|
10751
|
-
function
|
|
10753
|
+
function wR(t,e,n){let i,o=n.initialDeps??[]
|
|
10752
10754
|
return()=>{var s,r,a,l
|
|
10753
10755
|
let c
|
|
10754
10756
|
n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(c=Date.now())
|
|
@@ -10757,10 +10759,10 @@ if(!(d.length!==o.length||d.some(((t,e)=>o[e]!==t))))return i
|
|
|
10757
10759
|
let h
|
|
10758
10760
|
if(o=d,n.key&&(null==(r=n.debug)?void 0:r.call(n))&&(h=Date.now()),i=e(...d),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const t=Math.round(100*(Date.now()-c))/100,e=Math.round(100*(Date.now()-h))/100,i=e/16,o=(t,e)=>{for(t=String(t);t.length<e;)t=" "+t
|
|
10759
10761
|
return t}
|
|
10760
|
-
console.info(`%c⏱ ${o(e,5)} /${o(t,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,i),i}}function
|
|
10761
|
-
return t}const
|
|
10762
|
+
console.info(`%c⏱ ${o(e,5)} /${o(t,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,i),i}}function xR(t,e){if(void 0===t)throw new Error("Unexpected undefined"+(e?`: ${e}`:""))
|
|
10763
|
+
return t}const CR=t=>t,kR=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),i=[]
|
|
10762
10764
|
for(let t=e;t<=n;t++)i.push(t)
|
|
10763
|
-
return i},
|
|
10765
|
+
return i},SR=(t,e)=>{const n=t.scrollElement
|
|
10764
10766
|
if(!n)return
|
|
10765
10767
|
const i=t=>{const{width:n,height:i}=t
|
|
10766
10768
|
e({width:Math.round(n),height:Math.round(i)})}
|
|
@@ -10768,46 +10770,46 @@ if(i(n.getBoundingClientRect()),"undefined"==typeof ResizeObserver)return()=>{}
|
|
|
10768
10770
|
const o=new ResizeObserver((t=>{const e=t[0]
|
|
10769
10771
|
if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0]
|
|
10770
10772
|
if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(n.getBoundingClientRect())}))
|
|
10771
|
-
return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}}
|
|
10773
|
+
return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},$R=(t,e)=>{const n=t.scrollElement
|
|
10772
10774
|
if(!n)return
|
|
10773
10775
|
const i=()=>{e(n[t.options.horizontal?"scrollLeft":"scrollTop"])}
|
|
10774
|
-
return i(),n.addEventListener("scroll",i,{passive:!0}),()=>{n.removeEventListener("scroll",i)}}
|
|
10775
|
-
if(t){return Math.round(t[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},
|
|
10776
|
+
return i(),n.addEventListener("scroll",i,{passive:!0}),()=>{n.removeEventListener("scroll",i)}},MR=(t,e,n)=>{if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0]
|
|
10777
|
+
if(t){return Math.round(t[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},_R=(t,{adjustments:e=0,behavior:n},i)=>{var o,s
|
|
10776
10778
|
const r=t+e
|
|
10777
10779
|
null==(s=null==(o=i.scrollElement)?void 0:o.scrollTo)||s.call(o,{[i.options.horizontal?"left":"top"]:r,behavior:n})}
|
|
10778
|
-
let
|
|
10780
|
+
let ER=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let t=null
|
|
10779
10781
|
const e=()=>t||("undefined"!=typeof ResizeObserver?t=new ResizeObserver((t=>{t.forEach((t=>{this._measureElement(t.target,t)}))})):null)
|
|
10780
10782
|
return{disconnect:()=>{var t
|
|
10781
10783
|
return null==(t=e())?void 0:t.disconnect()},observe:t=>{var n
|
|
10782
10784
|
return null==(n=e())?void 0:n.observe(t,{box:"border-box"})},unobserve:t=>{var n
|
|
10783
|
-
return null==(n=e())?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach((([e,n])=>{void 0===n&&delete t[e]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:
|
|
10784
|
-
null==(n=(e=this.options).onChange)||n.call(e,this,t)},this.maybeNotify=
|
|
10785
|
-
this.scrollElement!==t&&(this.cleanup(),this.scrollElement=t,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(t=>{this.scrollRect=t,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,(t=>{this.scrollAdjustments=0,this.scrollOffset!==t&&(null!==this.isScrollingTimeoutId&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset<t?"forward":"backward",this.scrollOffset=t,this.maybeNotify(),this.isScrollingTimeoutId=setTimeout((()=>{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()}),this.options.scrollingDelay))}))))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=
|
|
10785
|
+
return null==(n=e())?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach((([e,n])=>{void 0===n&&delete t[e]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:CR,rangeExtractor:kR,onChange:()=>{},measureElement:MR,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...t}},this.notify=t=>{var e,n
|
|
10786
|
+
null==(n=(e=this.options).onChange)||n.call(e,this,t)},this.maybeNotify=wR((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(t=>{this.notify(t)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((t=>t())),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const t=this.options.getScrollElement()
|
|
10787
|
+
this.scrollElement!==t&&(this.cleanup(),this.scrollElement=t,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(t=>{this.scrollRect=t,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,(t=>{this.scrollAdjustments=0,this.scrollOffset!==t&&(null!==this.isScrollingTimeoutId&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset<t?"forward":"backward",this.scrollOffset=t,this.maybeNotify(),this.isScrollingTimeoutId=setTimeout((()=>{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()}),this.options.scrollingDelay))}))))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=wR((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey]),((t,e,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:e,scrollMargin:n,getItemKey:i})),{key:!1}),this.getFurthestMeasurement=(t,e)=>{const n=new Map,i=new Map
|
|
10786
10788
|
for(let o=e-1;o>=0;o--){const e=t[o]
|
|
10787
10789
|
if(n.has(e.lane))continue
|
|
10788
10790
|
const s=i.get(e.lane)
|
|
10789
|
-
if(null==s||e.end>s.end?i.set(e.lane,e):e.end<s.end&&n.set(e.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort(((t,e)=>t.end===e.end?t.index-e.index:t.end-e.end))[0]:void 0},this.getMeasurements=
|
|
10791
|
+
if(null==s||e.end>s.end?i.set(e.lane,e):e.end<s.end&&n.set(e.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort(((t,e)=>t.end===e.end?t.index-e.index:t.end-e.end))[0]:void 0},this.getMeasurements=wR((()=>[this.memoOptions(),this.itemSizeCache]),(({count:t,paddingStart:e,scrollMargin:n,getItemKey:i},o)=>{const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0
|
|
10790
10792
|
this.pendingMeasuredCacheIndexes=[]
|
|
10791
10793
|
const r=this.measurementsCache.slice(0,s)
|
|
10792
10794
|
for(let a=s;a<t;a++){const t=i(a),s=1===this.options.lanes?r[a-1]:this.getFurthestMeasurement(r,a),l=s?s.end:e+n,c=o.get(t),d="number"==typeof c?c:this.options.estimateSize(a),h=l+d,u=s?s.lane:a%this.options.lanes
|
|
10793
|
-
r[a]={index:a,start:l,size:d,end:h,key:t,lane:u}}return this.measurementsCache=r,r}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=
|
|
10795
|
+
r[a]={index:a,start:l,size:d,end:h,key:t,lane:u}}return this.measurementsCache=r,r}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=wR((()=>[this.getMeasurements(),this.getSize(),this.scrollOffset]),((t,e,n)=>this.range=t.length>0&&e>0?function({measurements:t,outerSize:e,scrollOffset:n}){const i=t.length-1,o=e=>t[e].start,s=IR(0,i,o,n)
|
|
10794
10796
|
let r=s
|
|
10795
10797
|
for(;r<i&&t[r].end<n+e;)r++
|
|
10796
|
-
return{startIndex:s,endIndex:r}}({measurements:t,outerSize:e,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=
|
|
10798
|
+
return{startIndex:s,endIndex:r}}({measurements:t,outerSize:e,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=wR((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((t,e,n,i)=>null===e?[]:t({...e,overscan:n,count:i})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,n=t.getAttribute(e)
|
|
10797
10799
|
return n?parseInt(n,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this._measureElement=(t,e)=>{const n=this.measurementsCache[this.indexFromElement(t)]
|
|
10798
10800
|
if(!n||!t.isConnected)return void this.measureElementCache.forEach(((e,n)=>{e===t&&(this.observer.unobserve(t),this.measureElementCache.delete(n))}))
|
|
10799
10801
|
const i=this.measureElementCache.get(n.key)
|
|
10800
10802
|
i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.measureElementCache.set(n.key,t))
|
|
10801
10803
|
const o=this.options.measureElement(t,e,this)
|
|
10802
10804
|
this.resizeItem(n,o)},this.resizeItem=(t,e)=>{const n=e-(this.itemSizeCache.get(t.key)??t.size)
|
|
10803
|
-
0!==n&&(t.start<this.scrollOffset+this.scrollAdjustments&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(t.index),this.itemSizeCache=new Map(this.itemSizeCache.set(t.key,e)),this.notify(!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=
|
|
10805
|
+
0!==n&&(t.start<this.scrollOffset+this.scrollAdjustments&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(t.index),this.itemSizeCache=new Map(this.itemSizeCache.set(t.key,e)),this.notify(!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=wR((()=>[this.getIndexes(),this.getMeasurements()]),((t,e)=>{const n=[]
|
|
10804
10806
|
for(let i=0,o=t.length;i<o;i++){const o=e[t[i]]
|
|
10805
10807
|
n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements()
|
|
10806
|
-
return
|
|
10808
|
+
return xR(e[IR(0,e.length-1,(t=>xR(e[t]).start),t)])},this.getOffsetForAlignment=(t,e)=>{const n=this.getSize()
|
|
10807
10809
|
"auto"===e&&(e=t<=this.scrollOffset?"start":t>=this.scrollOffset+n?"end":"start"),"start"===e||("end"===e?t-=n:"center"===e&&(t-=n/2))
|
|
10808
10810
|
const i=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize()
|
|
10809
10811
|
return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1))
|
|
10810
|
-
const n=
|
|
10812
|
+
const n=xR(this.getMeasurements()[t])
|
|
10811
10813
|
if("auto"===e)if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)e="end"
|
|
10812
10814
|
else{if(!(n.start<=this.scrollOffset+this.options.scrollPaddingStart))return[this.scrollOffset,e]
|
|
10813
10815
|
e="start"}const i="end"===e?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart
|
|
@@ -10820,27 +10822,27 @@ var e,i})))},this.scrollBy=(t,{behavior:e}={})=>{this.cancelScrollToIndex(),"smo
|
|
|
10820
10822
|
const e=this.getMeasurements()
|
|
10821
10823
|
let n
|
|
10822
10824
|
return n=0===e.length?this.options.paddingStart:1===this.options.lanes?(null==(t=e[e.length-1])?void 0:t.end)??0:Math.max(...e.slice(-this.options.lanes).map((t=>t.end))),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:e,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:e},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((t=>{this.itemSizeCache.set(t.key,t.size)})),this.maybeNotify()}}
|
|
10823
|
-
const
|
|
10825
|
+
const IR=(t,e,n,i)=>{for(;t<=e;){const o=(t+e)/2|0,s=n(o)
|
|
10824
10826
|
if(s<i)t=o+1
|
|
10825
10827
|
else{if(!(s>i))return o
|
|
10826
10828
|
e=o-1}}return t>0?t-1:0}
|
|
10827
|
-
class
|
|
10829
|
+
class DR{constructor(t,e){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this.table=t,this.tanStackTable=e,this.viewportResizeObserver=new ResizeObserver((t=>{const e=t[0]?.borderBoxSize[0]
|
|
10828
10830
|
if(e){const t=e.inlineSize
|
|
10829
10831
|
this.headerContainerMarginRight=t-this.table.viewport.clientWidth}}))}connect(){this.viewportResizeObserver.observe(this.table.viewport),this.updateVirtualizer(),this.table.viewport.scrollTo({top:this.virtualizer.scrollOffset})}disconnect(){this.viewportResizeObserver.disconnect()}dataChanged(){this.table.$fastController.isConnected&&this.updateVirtualizer()}updateVirtualizer(){const t=this.createVirtualizerOptions()
|
|
10830
|
-
this.virtualizer?this.virtualizer.setOptions(t):this.virtualizer=new
|
|
10831
|
-
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:e=>t,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:
|
|
10832
|
+
this.virtualizer?this.virtualizer.setOptions(t):this.virtualizer=new ER(t),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const t=parseFloat(il.getValueFor(this.table))+2*parseFloat(cl.getValueFor(this.table))
|
|
10833
|
+
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:e=>t,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:_R,observeElementOffset:$R,observeElementRect:SR,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){this.notifyFocusedCellRecycling()
|
|
10832
10834
|
const t=this.virtualizer
|
|
10833
10835
|
this.visibleItems=t.getVirtualItems(),this.scrollHeight=t.getTotalSize()
|
|
10834
10836
|
let e=0
|
|
10835
10837
|
if(this.visibleItems.length>0){e=this.visibleItems[0].start}this.rowContainerYOffset=e}notifyFocusedCellRecycling(){let t=this.table.shadowRoot.activeElement
|
|
10836
|
-
for(;null!==t&&!(t instanceof
|
|
10837
|
-
if(t instanceof
|
|
10838
|
-
t?.closeOpenActionMenus()}}}function
|
|
10839
|
-
case
|
|
10840
|
-
default:return
|
|
10841
|
-
return"string"==typeof i&&"string"==typeof o?i.localeCompare(o):i===o?0:void 0===i||null===i&&void 0!==o?-1:1}function
|
|
10842
|
-
return Object.is(i,o)?0:void 0===i?-1:void 0===o?1:null===i?-1:null===o?1:Number.isNaN(i)?-1:Number.isNaN(o)?1:0===i&&0===o?Object.is(i,-0)?-1:1:i>o?1:-1}t([g],
|
|
10843
|
-
class
|
|
10838
|
+
for(;null!==t&&!(t instanceof jO)&&t.shadowRoot;)t=t.shadowRoot.activeElement
|
|
10839
|
+
if(t instanceof jO&&t.focusedRecycleCallback(),void 0!==this.table.openActionMenuRecordId){const t=this.table.rowElements.find((t=>t.recordId===this.table.openActionMenuRecordId))
|
|
10840
|
+
t?.closeOpenActionMenus()}}}function AR(t){switch(t){case zO:return OR
|
|
10841
|
+
case VO:return TR
|
|
10842
|
+
default:return OR}}function TR(t,e,n){const i=t.getValue(n),o=e.getValue(n)
|
|
10843
|
+
return"string"==typeof i&&"string"==typeof o?i.localeCompare(o):i===o?0:void 0===i||null===i&&void 0!==o?-1:1}function OR(t,e,n){const i=t.getValue(n),o=e.getValue(n)
|
|
10844
|
+
return Object.is(i,o)?0:void 0===i?-1:void 0===o?1:null===i?-1:null===o?1:Number.isNaN(i)?-1:Number.isNaN(o)?1:0===i&&0===o?Object.is(i,-0)?-1:1:i>o?1:-1}t([g],DR.prototype,"visibleItems",void 0),t([g],DR.prototype,"scrollHeight",void 0),t([g],DR.prototype,"headerContainerMarginRight",void 0),t([g],DR.prototype,"rowContainerYOffset",void 0)
|
|
10845
|
+
class RR{constructor(t){this.table=t,this.isColumnBeingSized=!1,this.visibleColumns=[],this.currentTotalDelta=0,this.dragStart=0,this.initialColumnWidths=[],this.onDividerMouseMove=t=>{const e=t
|
|
10844
10846
|
for(let t=0;t<this.visibleColumns.length;t++)this.visibleColumns[t].columnInternals.currentPixelWidth=this.initialColumnWidths[t]?.initialPixelWidth
|
|
10845
10847
|
this.currentTotalDelta=this.getAllowedSizeDelta(e.clientX-this.dragStart),this.performCascadeSizeLeft(this.leftColumnIndex,this.currentTotalDelta),this.performCascadeSizeRight(this.rightColumnIndex,this.currentTotalDelta)
|
|
10846
10848
|
const n=this.getTotalColumnFixedWidth()-this.initialColumnTotalWidth
|
|
@@ -10864,10 +10866,10 @@ for(const t of this.visibleColumns)this.initialColumnWidths.push({initalColumnFr
|
|
|
10864
10866
|
const t=this.gridSizedColumns.reduce(((t,e)=>t+e.columnInternals.currentPixelWidth),0),e=t/this.gridSizedColumns.length
|
|
10865
10867
|
let n=0
|
|
10866
10868
|
for(let t=0;t<this.visibleColumns.length&&n<this.gridSizedColumns.length;t++){const i=this.visibleColumns[t]
|
|
10867
|
-
i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/e,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((t=>!t.columnHidden))}getLeftColumnIndexFromDivider(t){return Math.floor(t/2)}}t([g],
|
|
10868
|
-
const
|
|
10869
|
-
return!1},
|
|
10870
|
-
class
|
|
10869
|
+
i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/e,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((t=>!t.columnHidden))}getLeftColumnIndexFromDivider(t){return Math.floor(t/2)}}t([g],RR.prototype,"isColumnBeingSized",void 0),t([g],RR.prototype,"activeColumnIndex",void 0),t([g],RR.prototype,"activeColumnDivider",void 0)
|
|
10870
|
+
const FR=(t,...e)=>{for(const n of e)if(t===n)return!0
|
|
10871
|
+
return!1},NR=["rowIds","rowParentIds","groupRows","columnIds","columnSort","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
|
|
10872
|
+
class PR extends lI{constructor(t){super(NR),this.table=t,this.updateQueued=!1}get updateRowIds(){return this.isTracked("rowIds")}get updateRowParentIds(){return this.isTracked("rowParentIds")}get updateGroupRows(){return this.isTracked("groupRows")}get updateColumnIds(){return this.isTracked("columnIds")}get updateColumnSort(){return this.isTracked("columnSort")}get updateColumnWidths(){return this.isTracked("columnWidths")}get updateColumnDefinition(){return this.isTracked("columnDefinition")}get updateActionMenuSlots(){return this.isTracked("actionMenuSlots")}get updateSelectionMode(){return this.isTracked("selectionMode")}get requiresTanStackUpdate(){return this.isTracked("rowIds")||this.isTracked("rowParentIds")||this.isTracked("columnSort")||this.isTracked("columnDefinition")||this.isTracked("groupRows")||this.isTracked("selectionMode")}get requiresTanStackDataReset(){return this.isTracked("rowIds")||this.isTracked("columnDefinition")||this.isTracked("rowParentIds")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(t){FR(t,"columnId")?this.track("columnIds"):GO(t,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):FR(t,"sortingDisabled")||GO(t,"currentSortDirection","currentSortIndex")?this.track("columnSort"):FR(t,"columnHidden")||GO(t,"currentFractionalWidth","currentPixelWidth","minPixelWidth")?this.track("columnWidths"):FR(t,"actionMenuSlot")?this.track("actionMenuSlots"):GO(t,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),this.track("columnWidths"),this.track("actionMenuSlots"),this.track("groupRows"),this.queueUpdate()}trackIdFieldNameChanged(){this.track("rowIds"),this.queueUpdate()}trackParentIdFieldNameChanged(){this.track("rowParentIds"),this.queueUpdate()}trackSelectionModeChanged(){this.track("selectionMode"),this.queueUpdate()}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class LR{constructor(t){this.tanStackTable=t}reset(){}toggleIsRowSelected(t,e){t.isGroupRow&&t.selectionState===PO?this.deselectAllLeafRows(t.id):this.tanStackTable.getRow(t.id).toggleSelected(e,{selectChildren:t.isGroupRow})}selectSingleRow(t){if(t.isGroupRow)throw new Error("function not intended to select grouped rows")
|
|
10871
10873
|
const e=this.tanStackTable.getState().rowSelection,n=[]
|
|
10872
10874
|
if(Object.entries(e).forEach((([t,e])=>{e&&n.push(t)})),1===n.length&&n[0]===t.id)return!1
|
|
10873
10875
|
const i={}
|
|
@@ -10877,7 +10879,7 @@ this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(t){const e=this.tanStackT
|
|
|
10877
10879
|
return e?.getIsGrouped()?e.getLeafRows().filter((t=>!t.getIsGrouped())).map((t=>t.id)):[]}getAllOrderedRows(){const t=this.tanStackTable.getPreExpandedRowModel().rows
|
|
10878
10880
|
return this.getOrderedRows(t)}getOrderedRows(t){const e=[]
|
|
10879
10881
|
for(const n of t)e.push(n),n.subRows?.length&&e.push(...this.getOrderedRows(n.subRows))
|
|
10880
|
-
return e}}class
|
|
10882
|
+
return e}}class zR extends LR{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class VR extends LR{handleRowSelectionToggle(t,e,n){return n&&this.tryUpdateRangeSelection(t.id)||(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t,e)),!0}handleRowClick(t,e,n){return n?(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t),!0):!(!e||!this.tryUpdateRangeSelection(t.id))||(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(t))}handleActionMenuOpening(t){return t.selectionState!==PO&&this.selectSingleRow(t)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(t){if(void 0===this.shiftSelectStartRowId)return!1
|
|
10881
10883
|
const e=this.getAllOrderedRows(),n=this.getRowIndexForId(this.shiftSelectStartRowId,e)
|
|
10882
10884
|
if(-1===n)return!1
|
|
10883
10885
|
const i=this.tanStackTable.getState().rowSelection
|
|
@@ -10887,20 +10889,20 @@ this.updateSelectionStateForRange(t,n,o,i,!0)}updateSelectionStateForRange(t,e,n
|
|
|
10887
10889
|
const s=Math.min(e,n),r=Math.max(e,n)
|
|
10888
10890
|
for(let e=s;e<=r;e++){const n=i[e]
|
|
10889
10891
|
n.getIsGrouped()||this.updateSelectionStateForRow(t,n.id,o)}const a=i[n]
|
|
10890
|
-
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((e=>this.updateSelectionStateForRow(t,e,o)))}updateSelectionStateForRow(t,e,n){n?t[e]=!0:delete t[e]}getRowIndexForId(t,e){return t?e.findIndex((e=>e.id===t)):-1}}class
|
|
10892
|
+
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((e=>this.updateSelectionStateForRow(t,e,o)))}updateSelectionStateForRow(t,e,n){n?t[e]=!0:delete t[e]}getRowIndexForId(t,e){return t?e.findIndex((e=>e.id===t)):-1}}class HR extends LR{handleRowSelectionToggle(t,e,n){return this.toggleIsRowSelected(t,e),!0}handleRowClick(t,e,n){return this.selectSingleRow(t)}handleActionMenuOpening(t){return this.handleRowClick(t,!1,!1)}}class BR{constructor(t,e){this.tanStackTable=t,this.selectionManager=this.createSelectionManager(e)}handleRowSelectionToggle(t,e,n){return!!t&&this.selectionManager.handleRowSelectionToggle(t,e,n)}handleRowClick(t,e,n){return!!t&&this.selectionManager.handleRowClick(t,e,n)}handleActionMenuOpening(t){return!!t&&this.selectionManager.handleActionMenuOpening(t)}handleSelectionModeChanged(t){this.selectionManager=this.createSelectionManager(t)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const t=this.tanStackTable.options.state.rowSelection
|
|
10891
10893
|
if(!t)return[]
|
|
10892
10894
|
const e=[]
|
|
10893
|
-
return Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e}createSelectionManager(t){switch(t){case
|
|
10894
|
-
case
|
|
10895
|
-
case
|
|
10896
|
-
default:throw new Error("unknown selection mode found")}}}function
|
|
10895
|
+
return Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e}createSelectionManager(t){switch(t){case FO.multiple:return new VR(this.tanStackTable)
|
|
10896
|
+
case FO.single:return new HR(this.tanStackTable)
|
|
10897
|
+
case FO.none:return new zR(this.tanStackTable)
|
|
10898
|
+
default:throw new Error("unknown selection mode found")}}}function qR(t,e){const n=e,i=[],o={},s=new Set
|
|
10897
10899
|
for(let e=0;e<t.length;e++){const r=t[e],a=r[n.id],l=r[n.parentId]
|
|
10898
10900
|
Object.prototype.hasOwnProperty.call(o,a)||(o[a]={subRows:[],clientRecord:void 0,originalIndex:void 0}),s&&s.delete(a),o[a].clientRecord=r
|
|
10899
10901
|
const c=o[a]
|
|
10900
10902
|
c.originalIndex=e,null==l?i.push(c):(Object.prototype.hasOwnProperty.call(o,l)||(o[l]={subRows:[],clientRecord:void 0,originalIndex:void 0},s&&s.add(l)),o[l].subRows.push(c))}if(s?.size){const t=Array.from(s.values()).join(",")
|
|
10901
|
-
throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(
|
|
10902
|
-
return i}function
|
|
10903
|
-
return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class
|
|
10903
|
+
throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(UR(i)<Object.keys(o).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
|
|
10904
|
+
return i}function UR(t){return t.reduce(((t,e)=>t+1+(e.subRows&&UR(e.subRows))),0)}class jR{constructor(t,e,n){if(this.isDataFlat=!1,"string"==typeof e&&"string"==typeof n)try{this._hierarchicalData=qR(t,{id:e,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(t=!1){const e=[]
|
|
10905
|
+
return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class WR{constructor(t){this.tanStackTable=t,this.explicitExpansionStates=new Map,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1,this.parentRowsWithChildren=new Set}isRowExpanded(t){if(!this.isRowExpandable(t))return!1
|
|
10904
10906
|
return this.explicitExpansionStates.get(t.id)??this.getDefaultExpansionState(t)}toggleRowExpansion(t){if(!this.isRowExpandable(t))return
|
|
10905
10907
|
const e=this.isRowExpanded(t)
|
|
10906
10908
|
this.explicitExpansionStates.set(t.id,!e),t.toggleExpanded()}collapseAll(){this.resetExpansionState()
|
|
@@ -10913,17 +10915,17 @@ if(!s&&r&&n.set(t,r),this.isRowExpandable(o)){const n=this.explicitExpansionStat
|
|
|
10913
10915
|
if(void 0!==n&&e.set(t,n),!s){0!==o.subRows.length?i.add(t):this.parentRowsWithChildren.has(t)&&e.set(t,!1)}}}this.explicitExpansionStates=e,this.hierarchyOptions=n,this.parentRowsWithChildren=i}setHierarchyOptions(t){const e=new Map
|
|
10914
10916
|
for(const{recordId:n,options:i}of t){e.set(n,i)
|
|
10915
10917
|
const t=this.hierarchyOptions.get(n)?.delayedHierarchyState,o=i.delayedHierarchyState
|
|
10916
|
-
t!==
|
|
10918
|
+
t!==OO||o!==TO||this.parentRowsWithChildren.has(n)||this.explicitExpansionStates.delete(n)}this.hierarchyOptions=e}isRowExpandable(t){return t.subRows.length>0||this.canLoadDelayedChildren(t.id)}setHierarchyEnabled(t){this.isHierarchyEnabled=t}isLoadingChildren(t){return!!this.isHierarchyEnabled&&(this.hierarchyOptions.get(t)?.delayedHierarchyState===OO??!1)}canLoadDelayedChildren(t){if(!this.isHierarchyEnabled)return!1
|
|
10917
10919
|
const e=this.hierarchyOptions.get(t)?.delayedHierarchyState
|
|
10918
|
-
return e!==
|
|
10919
|
-
class
|
|
10920
|
+
return e!==AO}getDefaultExpansionState(t){return 0!==t.subRows.length}}class ZR extends aI{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class GR extends ZR{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}setConditionValue(t,e){e?this.track(t):this.untrack(t),this.updateColumnInternalsFlag()}updateColumnInternalsFlag(){this.isColumnValid=this.isValid()}}t([g],GR.prototype,"isColumnValid",void 0)
|
|
10921
|
+
class KR extends Ve{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===FO.multiple||this.showCollapseAll}constructor(){super(),this.selectionMode=FO.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=NO,this.showCollapseAll=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.documentShiftKeyDown=!1,this.tableValidator=new JO,this.tableUpdateTracker=new PR(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.onViewPortScroll=t=>{this.scrollX=t.target.scrollLeft},this.onKeyDown=t=>{t.key===ga&&(this.documentShiftKeyDown=!0)},this.onKeyUp=t=>{t.key===ga&&(this.documentShiftKeyDown=!1)},this.getRowCanExpand=t=>this.expansionManager.isRowExpandable(t),this.getIsRowExpanded=t=>this.expansionManager.isRowExpanded(t),this.handleRowSelectionChange=t=>{const e=t instanceof Function?t(this.table.getState().rowSelection):t
|
|
10920
10922
|
this.updateTableOptions({state:{rowSelection:e}})},this.handleExpandedChange=t=>{const e=t instanceof Function?t(this.table.getState().expanded):t
|
|
10921
|
-
this.updateTableOptions({state:{expanded:e}})},this.options={data:[],onStateChange:t=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:t=>
|
|
10923
|
+
this.updateTableOptions({state:{expanded:e}})},this.options={data:[],onStateChange:t=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:t=>zT((()=>[t.options.data]),(e=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(e,o,s){void 0===o&&(o=0)
|
|
10922
10924
|
const r=[]
|
|
10923
|
-
for(let l=0;l<e.length;l++){const c=
|
|
10925
|
+
for(let l=0;l<e.length;l++){const c=IO(t,t._getRowId(e[l],l,s),e[l],l,o,void 0,null==s?void 0:s.id)
|
|
10924
10926
|
var a
|
|
10925
10927
|
n.flatRows.push(c),n.rowsById[c.id]=c,r.push(c),t.options.getSubRows&&(c.originalSubRows=t.options.getSubRows(e[l],l),null!=(a=c.originalSubRows)&&a.length&&(c.subRows=i(c.originalSubRows,o+1,c)))}return r}
|
|
10926
|
-
return n.rows=i(e),n}),
|
|
10928
|
+
return n.rows=i(e),n}),VT(t.options,"debugTable",0,(()=>t._autoResetPageIndex()))),getSortedRowModel:t=>zT((()=>[t.getState().sorting,t.getPreSortedRowModel()]),((e,n)=>{if(!n.rows.length||null==e||!e.length)return n
|
|
10927
10929
|
const i=t.getState().sorting,o=[],s=i.filter((e=>{var n
|
|
10928
10930
|
return null==(n=t.getColumn(e.id))?void 0:n.getCanSort()})),r={}
|
|
10929
10931
|
s.forEach((e=>{const n=t.getColumn(e.id)
|
|
@@ -10934,21 +10936,21 @@ const o=s[i],a=r[o.id],l=null!=(n=null==o?void 0:o.desc)&&n
|
|
|
10934
10936
|
let c=0
|
|
10935
10937
|
if(a.sortUndefined){const n=void 0===t.getValue(o.id),i=void 0===e.getValue(o.id);(n||i)&&(c=n&&i?0:n?a.sortUndefined:-a.sortUndefined)}if(0===c&&(c=a.sortingFn(t,e,o.id)),0!==c)return l&&(c*=-1),a.invertSorting&&(c*=-1),c}return t.index-e.index})),e.forEach((t=>{var e
|
|
10936
10938
|
o.push(t),null!=(e=t.subRows)&&e.length&&(t.subRows=a(t.subRows))})),e}
|
|
10937
|
-
return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}}),
|
|
10939
|
+
return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}}),VT(t.options,"debugTable",0,(()=>t._autoResetPageIndex()))),getGroupedRowModel:DO(),getExpandedRowModel:t=>zT((()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows]),((t,e,n)=>!e.rows.length||!0!==t&&!Object.keys(null!=t?t:{}).length?e:n?function(t){const e=[],n=t=>{var i
|
|
10938
10940
|
e.push(t),null!=(i=t.subRows)&&i.length&&t.getIsExpanded()&&t.subRows.forEach(n)}
|
|
10939
|
-
return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),
|
|
10941
|
+
return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),VT(t.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:t=>t.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:t=>!t.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=EO(this.options),this.virtualizer=new DR(this,this.table),this.layoutManager=new RR(this),this.layoutManagerNotifier=m.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new BR(this.table,this.selectionMode),this.expansionManager=new WR(this.table)}async setData(t){await this.processPendingUpdates()
|
|
10940
10942
|
const e=this.calculateTanStackData(t)
|
|
10941
|
-
this.updateTableOptions(e)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(t){await this.processPendingUpdates(),this.selectionMode!==
|
|
10943
|
+
this.updateTableOptions(e)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(t){await this.processPendingUpdates(),this.selectionMode!==FO.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(t)}})}async setRecordHierarchyOptions(t){await this.processPendingUpdates()
|
|
10942
10944
|
const e=structuredClone(t),n=this.tableValidator.getOptionsWithPresentIds(e)
|
|
10943
|
-
this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof
|
|
10945
|
+
this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof KO||t instanceof ZO)&&"string"==typeof e?this.tableUpdateTracker.trackColumnPropertyChanged(e):t instanceof GR&&"isColumnValid"===e?this.tableValidator.validateColumnConfigurations(this.columns):t instanceof RR&&"isColumnBeingSized"===e&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(t,e){e.stopImmediatePropagation()
|
|
10944
10946
|
this.selectionManager.handleRowSelectionToggle(this.tableData[t],e.detail.newState,this.documentShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(t,e){return this.selectionManager.handleRowClick(this.tableData[t],e.shiftKey,e.ctrlKey||e.metaKey)&&this.emitSelectionChangeEvent(),!0}onAllRowsSelectionChange(t){t.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(t,e){e.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(t,e)}onRowActionMenuToggle(t){t.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(t)}handleCollapseAllRows(){this.expansionManager.collapseAll()}onRightDividerMouseDown(t,e){0===t.button&&this.layoutManager.beginColumnInteractiveSize(t.clientX,this.getRightDividerIndex(e))}onLeftDividerMouseDown(t,e){0===t.button&&this.layoutManager.beginColumnInteractiveSize(t.clientX,this.getLeftDividerIndex(e))}getLeftDividerIndex(t){return 2*t-1}getRightDividerIndex(t){return 2*t}handleGroupRowExpanded(t,e){this.toggleRowExpanded(t),e.stopPropagation()}handleRowExpanded(t){this.toggleRowExpanded(t)}toggleColumnSort(t,e){if(t.sortingDisabled)return
|
|
10945
10947
|
const n=this.getColumnsParticipatingInSorting().sort(((t,e)=>t.columnInternals.currentSortIndex-e.columnInternals.currentSortIndex)),i=n.indexOf(t),o=i>-1,s=t.columnInternals.currentSortDirection
|
|
10946
|
-
let r=
|
|
10947
|
-
o?s===
|
|
10948
|
+
let r=RO.ascending
|
|
10949
|
+
o?s===RO.descending?(n.splice(i,1),r=RO.none,t.columnInternals.currentSortIndex=void 0):r=RO.descending:n.push(t),t.columnInternals.currentSortDirection=r
|
|
10948
10950
|
for(let i=0;i<n.length;i++){const o=n[i]
|
|
10949
|
-
e?n[i].columnInternals.currentSortIndex=i:o===t?o.columnInternals.currentSortIndex=0:(o.columnInternals.currentSortIndex=void 0,o.columnInternals.currentSortDirection=
|
|
10950
|
-
case
|
|
10951
|
-
default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(t){this.dataHierarchyManager=new
|
|
10951
|
+
e?n[i].columnInternals.currentSortIndex=i:o===t?o.columnInternals.currentSortIndex=0:(o.columnInternals.currentSortIndex=void 0,o.columnInternals.currentSortDirection=RO.none)}this.emitColumnConfigurationChangeEvent()}update(){this.validate(),this.tableUpdateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.tableUpdateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.tableUpdateTracker.updateColumnWidths&&(this.rowGridColumns=this.layoutManager.getGridTemplateColumns(),this.visibleColumns=this.columns.filter((t=>!t.columnHidden)))}get ariaMultiSelectable(){switch(this.selectionMode){case FO.multiple:return"true"
|
|
10952
|
+
case FO.single:return"false"
|
|
10953
|
+
default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(t){this.dataHierarchyManager=new jR(t,this.idFieldName,this.parentIdFieldName)
|
|
10952
10954
|
const e=this.dataHierarchyManager.hierarchicalData
|
|
10953
10955
|
this.tableValidator.setParentIdConfigurationValidity(this.dataHierarchyManager.parentIdConfigurationValid)
|
|
10954
10956
|
const n={data:e}
|
|
@@ -10956,39 +10958,39 @@ if(this.validateWithData(t),this.tableValidator.areRecordIdsValid()){const t=thi
|
|
|
10956
10958
|
n.state={rowSelection:this.calculateTanStackSelectionState(t),expanded:!0}}return n}selectionModeChanged(t,e){this.$fastController.isConnected&&this.tableUpdateTracker.trackSelectionModeChanged()}idFieldNameChanged(t,e){this.$fastController.isConnected&&this.tableUpdateTracker.trackIdFieldNameChanged()}parentIdFieldNameChanged(t,e){this.$fastController.isConnected&&this.tableUpdateTracker.trackParentIdFieldNameChanged()}columnsChanged(t,e){this.$fastController.isConnected&&(this.observeColumns(),this.tableUpdateTracker.trackColumnInstancesChanged())}async handleActionMenuBeforeToggleEvent(t,e){this.selectionManager.handleActionMenuOpening(this.tableData[t])&&await this.emitSelectionChangeEvent(),this.openActionMenuRecordId=e.detail.recordIds[0]
|
|
10957
10959
|
const n=await this.getActionMenuToggleEventDetail(e)
|
|
10958
10960
|
this.$emit("action-menu-beforetoggle",n)}async handleRowActionMenuToggleEvent(t){const e=await this.getActionMenuToggleEventDetail(t)
|
|
10959
|
-
this.$emit("action-menu-toggle",e),t.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(t){const e=this.selectionMode===
|
|
10961
|
+
this.$emit("action-menu-toggle",e),t.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(t){const e=this.selectionMode===FO.multiple?await this.getSelectedRecordIds():[this.openActionMenuRecordId]
|
|
10960
10962
|
return{...t.detail,recordIds:e}}removeColumnObservers(){this.columnNotifiers.forEach((t=>{t.unsubscribe(this)})),this.columnNotifiers=[]}initialize(){this.isInitialized||(this.isInitialized=!0,this.$fastController.onConnectedCallback(),this.tableUpdateTracker.trackAllStateChanged(),this.observeColumns())}async processPendingUpdates(){if(this.initialize(),await u.nextUpdate(),this.tableUpdateTracker.hasPendingUpdates)throw new Error("Expected pending updates to be resolved")}observeColumns(){this.removeColumnObservers()
|
|
10961
10963
|
for(const t of this.columns){const e=m.getNotifier(t)
|
|
10962
10964
|
e.subscribe(this),this.columnNotifiers.push(e)
|
|
10963
10965
|
const n=m.getNotifier(t.columnInternals)
|
|
10964
10966
|
n.subscribe(this),this.columnNotifiers.push(n)
|
|
10965
10967
|
const i=m.getNotifier(t.columnInternals.validator)
|
|
10966
|
-
i.subscribe(this),this.columnNotifiers.push(i)}}getColumnsParticipatingInSorting(){return this.columns.filter((t=>!t.sortingDisabled&&t.columnInternals.currentSortDirection!==
|
|
10967
|
-
if(this.tableUpdateTracker.updateColumnSort&&(t.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(t.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(t.getRowId=this.calculateTanStackRowIdFunction(),t.state.rowSelection={},this.selectionManager.handleSelectionReset(),this.expansionManager.resetHierarchyOptions()),this.tableUpdateTracker.updateRowParentIds&&this.expansionManager.setHierarchyEnabled(this.isHierarchyEnabled()),this.tableUpdateTracker.updateSelectionMode&&(t.enableMultiRowSelection=this.selectionMode===
|
|
10968
|
+
i.subscribe(this),this.columnNotifiers.push(i)}}getColumnsParticipatingInSorting(){return this.columns.filter((t=>!t.sortingDisabled&&t.columnInternals.currentSortDirection!==RO.none&&"number"==typeof t.columnInternals.currentSortIndex))}getColumnsParticipatingInGrouping(){return this.columns.filter((t=>!t.columnInternals.groupingDisabled&&"number"==typeof t.columnInternals.groupIndex))}childItemsChanged(){this.updateColumnsFromChildItems()}async updateColumnsFromChildItems(){await uI(this.childItems),this.columns=this.childItems.filter((t=>t instanceof KO))}updateTanStack(){const t={state:{}}
|
|
10969
|
+
if(this.tableUpdateTracker.updateColumnSort&&(t.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(t.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(t.getRowId=this.calculateTanStackRowIdFunction(),t.state.rowSelection={},this.selectionManager.handleSelectionReset(),this.expansionManager.resetHierarchyOptions()),this.tableUpdateTracker.updateRowParentIds&&this.expansionManager.setHierarchyEnabled(this.isHierarchyEnabled()),this.tableUpdateTracker.updateSelectionMode&&(t.enableMultiRowSelection=this.selectionMode===FO.multiple,t.enableSubRowSelection=this.selectionMode===FO.multiple,t.state.rowSelection={},this.selectionManager.handleSelectionModeChanged(this.selectionMode)),this.dataHierarchyManager&&this.tableUpdateTracker.requiresTanStackDataReset)if(this.parentIdFieldName||this.tableUpdateTracker.updateRowParentIds){const e=this.dataHierarchyManager.getAllRecords(!0),n=this.calculateTanStackData(e)
|
|
10968
10970
|
n.state&&(t.state.rowSelection=n.state.rowSelection),t.data=n.data}else t.data=[...this.table.options.data]
|
|
10969
10971
|
this.tableUpdateTracker.updateGroupRows&&(t.state.grouping=this.calculateTanStackGroupingState()),(this.tableUpdateTracker.updateRowIds||this.tableUpdateTracker.updateRowParentIds||this.tableUpdateTracker.updateGroupRows)&&(t.state.expanded=!0,this.expansionManager.resetExpansionState()),this.updateTableOptions(t)}updateActionMenuSlots(){const t=new Set
|
|
10970
10972
|
for(const e of this.columns)e.actionMenuSlot&&t.add(e.actionMenuSlot)
|
|
10971
10973
|
this.actionMenuSlots=Array.from(t)}validate(){this.tableValidator.validateIdFieldConfiguration(this.selectionMode,this.idFieldName,this.parentIdFieldName),this.tableValidator.validateColumnIds(this.columns.map((t=>t.columnId))),this.tableValidator.validateColumnSortIndices(this.getColumnsParticipatingInSorting().map((t=>t.columnInternals.currentSortIndex))),this.tableValidator.validateColumnGroupIndices(this.getColumnsParticipatingInGrouping().map((t=>t.columnInternals.groupIndex))),this.tableValidator.validateColumnConfigurations(this.columns),this.dataHierarchyManager&&this.validateWithData(this.dataHierarchyManager.getAllRecords())}validateWithData(t){this.tableValidator.validateRecordIds(t,this.idFieldName),this.canRenderRows=this.checkValidity()}emitColumnConfigurationChangeEvent(){const t={columns:this.columns.map((t=>({columnId:t.columnId,sortIndex:t.columnInternals.currentSortIndex??void 0,sortDirection:t.columnInternals.currentSortDirection,groupIndex:t.columnInternals.groupIndex,hidden:t.columnHidden,fractionalWidth:t.columnInternals.currentFractionalWidth,pixelWidth:t.columnInternals.currentPixelWidth})))}
|
|
10972
10974
|
this.$emit("column-configuration-change",t)}async emitSelectionChangeEvent(){const t={selectedRecordIds:await this.getSelectedRecordIds()}
|
|
10973
|
-
this.$emit("selection-change",t)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
10975
|
+
this.$emit("selection-change",t)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===PO,this.selectionCheckbox.indeterminate=this.selectionState===LO,this.ignoreSelectionChangeEvents=!1)}isHierarchyEnabled(){return"string"==typeof this.parentIdFieldName}refreshRows(){this.selectionState=this.getTableSelectionState()
|
|
10974
10976
|
let t=!1
|
|
10975
10977
|
const e=this.table.getRowModel().rows
|
|
10976
10978
|
this.tableData=e.map((e=>{const n=e.getIsGrouped(),i=!n&&e.getParentRow(),o=!n&&this.getRowCanExpand(e),s=!n&&!o&&!i&&e.depth>0&&!this.parentIdFieldName,r={record:e.original.clientRecord,id:e.id,selectionState:this.getRowSelectionState(e),isGroupRow:n,isExpanded:e.getIsExpanded(),groupRowValue:n?e.getValue(e.groupingColumnId):void 0,nestingLevel:s?e.depth-1:e.depth,isParentRow:o,immediateChildCount:e.subRows.length,groupColumn:this.getGroupRowColumn(e),isLoadingChildren:this.expansionManager.isLoadingChildren(e.id)}
|
|
10977
|
-
return t=t||o,r})),this.showCollapseAll=t||this.getColumnsParticipatingInGrouping().length>0,this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?
|
|
10979
|
+
return t=t||o,r})),this.showCollapseAll=t||this.getColumnsParticipatingInGrouping().length>0,this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?PO:this.table.getIsSomeRowsSelected()?LO:NO}getRowSelectionState(t){return t.getIsGrouped()?this.getGroupedRowSelectionState(t):t.getIsSelected()?PO:NO}getGroupedRowSelectionState(t){const e=t.getLeafRows().filter((t=>!t.getIsGrouped()))??[]
|
|
10978
10980
|
let n=!1,i=!1
|
|
10979
|
-
for(const t of e)if(t.getIsSelected()?n=!0:i=!0,n&&i)return
|
|
10980
|
-
return n?NO
|
|
10981
|
+
for(const t of e)if(t.getIsSelected()?n=!0:i=!0,n&&i)return LO
|
|
10982
|
+
return n?PO:NO}getGroupRowColumn(t){const e=t.groupingColumnId
|
|
10981
10983
|
if(void 0!==e)return this.columns.find((t=>t.columnInternals.uniqueId===e))}updateTableOptions(t){if(this.options={...this.options,...t,state:{...this.options.state,...t.state}},this.table.setOptions(this.options),t.data&&this.tableValidator.areRecordIdsValid()){const t=this.table.getRowModel().flatRows
|
|
10982
10984
|
this.expansionManager.processDataUpdate(t)}this.refreshRows()}toggleRowExpanded(t){const e=this.table.getRowModel().rows[t]
|
|
10983
10985
|
this.expansionManager.toggleRowExpansion(e)}calculateTanStackSortState(){const t=this.getColumnsParticipatingInSorting().sort(((t,e)=>t.columnInternals.currentSortIndex-e.columnInternals.currentSortIndex))
|
|
10984
|
-
return this.firstSortedColumn=t.length?t[0]:void 0,t.map((t=>({id:t.columnInternals.uniqueId,desc:t.columnInternals.currentSortDirection===
|
|
10985
|
-
if("string"==typeof n)return e.clientRecord[n]},sortingFn:
|
|
10986
|
+
return this.firstSortedColumn=t.length?t[0]:void 0,t.map((t=>({id:t.columnInternals.uniqueId,desc:t.columnInternals.currentSortDirection===RO.descending})))}calculateTanStackGroupingState(){return this.getColumnsParticipatingInGrouping().sort(((t,e)=>t.columnInternals.groupIndex-e.columnInternals.groupIndex)).map((t=>t.columnInternals.uniqueId))}calculateTanStackRowIdFunction(){return null===this.idFieldName||void 0===this.idFieldName?void 0:t=>t.clientRecord[this.idFieldName]}calculateTanStackColumns(){return this.columns.map((t=>({id:t.columnInternals.uniqueId,accessorFn:e=>{const n=t.columnInternals.operandDataRecordFieldName
|
|
10987
|
+
if("string"==typeof n)return e.clientRecord[n]},sortingFn:AR(t.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(t){if(this.selectionMode===FO.none)return{}
|
|
10986
10988
|
const e={},n=this.tableValidator.getPresentRecordIds(t)
|
|
10987
|
-
for(const t of n)if(e[t]=!0,this.selectionMode===
|
|
10988
|
-
return e}}t([lt({attribute:"id-field-name"})],
|
|
10989
|
-
const KR
|
|
10990
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
10991
|
-
const
|
|
10989
|
+
for(const t of n)if(e[t]=!0,this.selectionMode===FO.single)break
|
|
10990
|
+
return e}}t([lt({attribute:"id-field-name"})],KR.prototype,"idFieldName",void 0),t([lt({attribute:"parent-id-field-name"})],KR.prototype,"parentIdFieldName",void 0),t([lt({attribute:"selection-mode"})],KR.prototype,"selectionMode",void 0),t([g],KR.prototype,"tableData",void 0),t([g],KR.prototype,"columns",void 0),t([g],KR.prototype,"childItems",void 0),t([g],KR.prototype,"rowElements",void 0),t([g],KR.prototype,"actionMenuSlots",void 0),t([g],KR.prototype,"openActionMenuRecordId",void 0),t([g],KR.prototype,"canRenderRows",void 0),t([g],KR.prototype,"scrollX",void 0),t([g],KR.prototype,"rowGridColumns",void 0),t([g],KR.prototype,"selectionState",void 0),t([g],KR.prototype,"selectionCheckbox",void 0),t([g],KR.prototype,"showCollapseAll",void 0),t([g],KR.prototype,"firstSortedColumn",void 0),t([g],KR.prototype,"visibleColumns",void 0),t([g],KR.prototype,"tableScrollableMinWidth",void 0),t([g],KR.prototype,"documentShiftKeyDown",void 0)
|
|
10991
|
+
const JR=KR.compose({baseName:"table",template:yR,styles:XO})
|
|
10992
|
+
wi.getOrCreate().withPrefix("nimble").register(JR())
|
|
10993
|
+
const XR=xt`
|
|
10992
10994
|
:host {
|
|
10993
10995
|
display: contents;
|
|
10994
10996
|
}
|
|
@@ -10998,14 +11000,14 @@ const JR=xt`
|
|
|
10998
11000
|
overflow: hidden;
|
|
10999
11001
|
text-overflow: ellipsis;
|
|
11000
11002
|
}
|
|
11001
|
-
`,
|
|
11003
|
+
`,YR=Z`<span
|
|
11002
11004
|
${dg("hasOverflow")}
|
|
11003
11005
|
class="header-content"
|
|
11004
11006
|
title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
|
|
11005
11007
|
>
|
|
11006
11008
|
<slot ${Pt("contentSlot")}></slot>
|
|
11007
11009
|
</span>`
|
|
11008
|
-
function
|
|
11010
|
+
function QR(t){class e extends t{fractionalWidthChanged(){"number"==typeof this.fractionalWidth?this.columnInternals.fractionalWidth=this.fractionalWidth:this.columnInternals.fractionalWidth=BO}minPixelWidthChanged(){"number"==typeof this.minPixelWidth?this.columnInternals.minPixelWidth=this.minPixelWidth:this.columnInternals.minPixelWidth=HO}}return lt({attribute:"fractional-width",converter:rt})(e.prototype,"fractionalWidth"),lt({attribute:"min-pixel-width",converter:rt})(e.prototype,"minPixelWidth"),e}function tF(t){class e extends t{constructor(){super(...arguments),this.groupingDisabled=!1,this.groupIndex=null}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){"number"==typeof this.groupIndex?this.columnInternals.groupIndex=this.groupIndex:this.columnInternals.groupIndex=void 0}}return lt({attribute:"grouping-disabled",mode:"boolean"})(e.prototype,"groupingDisabled"),lt({attribute:"group-index",converter:rt})(e.prototype,"groupIndex"),e}function eF(t){class e extends t{}return lt({attribute:"placeholder"})(e.prototype,"placeholder"),e}const nF=xt`
|
|
11009
11011
|
:host {
|
|
11010
11012
|
width: fit-content;
|
|
11011
11013
|
max-width: 100%;
|
|
@@ -11031,7 +11033,7 @@ function YR(t){class e extends t{fractionalWidthChanged(){"number"==typeof this.
|
|
|
11031
11033
|
font: ${xc};
|
|
11032
11034
|
color: ${Cc};
|
|
11033
11035
|
}
|
|
11034
|
-
`,
|
|
11036
|
+
`,iF=Z`
|
|
11035
11037
|
<template
|
|
11036
11038
|
@click="${(t,e)=>("string"==typeof t.cellRecord?.href&&e.event.stopPropagation(),!0)}"
|
|
11037
11039
|
class="${t=>t.isPlaceholder?"placeholder":""}"
|
|
@@ -11063,19 +11065,19 @@ function YR(t){class e extends t{fractionalWidthChanged(){"number"==typeof this.
|
|
|
11063
11065
|
</span>`)}
|
|
11064
11066
|
</template>
|
|
11065
11067
|
`
|
|
11066
|
-
class
|
|
11067
|
-
return null==t&&this.columnConfig?.placeholder?(this.isPlaceholder=!0,this.columnConfig.placeholder):(this.isPlaceholder=!1,"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:"")}focusedRecycleCallback(){this.anchor?.blur()}}t([g],
|
|
11068
|
-
const oF
|
|
11069
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11070
|
-
class
|
|
11071
|
-
const
|
|
11068
|
+
class oF extends jO{constructor(){super(...arguments),this.hasOverflow=!1,this.isPlaceholder=!1}get text(){const t=this.cellRecord?.label??this.cellRecord?.href
|
|
11069
|
+
return null==t&&this.columnConfig?.placeholder?(this.isPlaceholder=!0,this.columnConfig.placeholder):(this.isPlaceholder=!1,"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:"")}focusedRecycleCallback(){this.anchor?.blur()}}t([g],oF.prototype,"hasOverflow",void 0),t([g],oF.prototype,"isPlaceholder",void 0),t([v],oF.prototype,"text",null)
|
|
11070
|
+
const sF=oF.compose({baseName:"table-column-anchor-cell-view",template:iF,styles:nF})
|
|
11071
|
+
wi.getOrCreate().withPrefix("nimble").register(sF())
|
|
11072
|
+
class rF extends qO{constructor(){super(...arguments),this.hasOverflow=!1,this.text=bv.getValueFor(this),this.noValuePlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}},this.emptyPlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}}}connectedCallback(){super.connectedCallback(),bv.subscribe(this.noValuePlaceholderLabelSubscriber,this),yv.subscribe(this.emptyPlaceholderLabelSubscriber,this),this.applyPlaceholderTextIfNeeded()}disconnectedCallback(){super.disconnectedCallback(),bv.unsubscribe(this.noValuePlaceholderLabelSubscriber),yv.unsubscribe(this.emptyPlaceholderLabelSubscriber)}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}groupHeaderValueChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){return null===this.groupHeaderValue||void 0===this.groupHeaderValue?(this.text=bv.getValueFor(this),!0):""===this.groupHeaderValue&&(this.text=yv.getValueFor(this),!0)}}t([g],rF.prototype,"hasOverflow",void 0),t([g],rF.prototype,"text",void 0)
|
|
11073
|
+
const aF=Z`
|
|
11072
11074
|
<span
|
|
11073
11075
|
${dg("hasOverflow")}
|
|
11074
11076
|
title="${t=>t.hasOverflow&&t.text?t.text:null}"
|
|
11075
11077
|
>
|
|
11076
11078
|
${t=>t.text}
|
|
11077
11079
|
</span>
|
|
11078
|
-
`,
|
|
11080
|
+
`,lF=xt`
|
|
11079
11081
|
span {
|
|
11080
11082
|
font: ${Ic};
|
|
11081
11083
|
color: ${Dc};
|
|
@@ -11084,20 +11086,20 @@ const rF=Z`
|
|
|
11084
11086
|
text-overflow: ellipsis;
|
|
11085
11087
|
}
|
|
11086
11088
|
`
|
|
11087
|
-
const
|
|
11088
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11089
|
-
const
|
|
11090
|
-
class
|
|
11091
|
-
const hF
|
|
11092
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11093
|
-
class
|
|
11094
|
-
try{return t.format(e)}catch(t){return""}}t([lt({attribute:"field-name"})],
|
|
11095
|
-
const
|
|
11096
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11097
|
-
const
|
|
11089
|
+
const cF=class extends rF{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:aF,styles:lF})
|
|
11090
|
+
wi.getOrCreate().withPrefix("nimble").register(cF())
|
|
11091
|
+
const dF="nimble-table-column-text-group-header-view"
|
|
11092
|
+
class hF extends(tF(QR(eF(KO)))){constructor(){super(...arguments),this.underlineHidden=!1}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:dF,delegatedEvents:["click"],sortOperation:VO,validator:new GR([])}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download,placeholder:this.placeholder}}}t([lt({attribute:"label-field-name"})],hF.prototype,"labelFieldName",void 0),t([lt({attribute:"href-field-name"})],hF.prototype,"hrefFieldName",void 0),t([lt],hF.prototype,"appearance",void 0),t([lt({attribute:"underline-hidden",mode:"boolean"})],hF.prototype,"underlineHidden",void 0),t([lt],hF.prototype,"hreflang",void 0),t([lt],hF.prototype,"ping",void 0),t([lt],hF.prototype,"referrerpolicy",void 0),t([lt],hF.prototype,"rel",void 0),t([lt],hF.prototype,"target",void 0),t([lt],hF.prototype,"type",void 0),t([lt],hF.prototype,"download",void 0)
|
|
11093
|
+
const uF=hF.compose({baseName:"table-column-anchor",template:YR,styles:XR})
|
|
11094
|
+
wi.getOrCreate().withPrefix("nimble").register(uF())
|
|
11095
|
+
class pF extends KO{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function fF(t){return tF(QR(eF(t)))}function mF(t,e){if("number"!=typeof e)return""
|
|
11096
|
+
try{return t.format(e)}catch(t){return""}}t([lt({attribute:"field-name"})],pF.prototype,"fieldName",void 0)
|
|
11097
|
+
const gF=class extends rF{updateText(){this.columnConfig?this.text=mF(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:aF,styles:lF})
|
|
11098
|
+
wi.getOrCreate().withPrefix("nimble").register(gF())
|
|
11099
|
+
const vF="left",bF="right",yF=Z`
|
|
11098
11100
|
<template
|
|
11099
11101
|
class="
|
|
11100
|
-
${t=>t.alignment===
|
|
11102
|
+
${t=>t.alignment===bF?"right-align":""}
|
|
11101
11103
|
${t=>t.isPlaceholder?"placeholder":""}
|
|
11102
11104
|
"
|
|
11103
11105
|
>
|
|
@@ -11108,7 +11110,7 @@ const gF="left",vF="right",bF=Z`
|
|
|
11108
11110
|
${t=>t.text}
|
|
11109
11111
|
</span>
|
|
11110
11112
|
</template>
|
|
11111
|
-
`,
|
|
11113
|
+
`,wF=xt`
|
|
11112
11114
|
:host(.right-align) {
|
|
11113
11115
|
margin-left: auto;
|
|
11114
11116
|
}
|
|
@@ -11126,22 +11128,22 @@ const gF="left",vF="right",bF=Z`
|
|
|
11126
11128
|
color: ${Cc};
|
|
11127
11129
|
}
|
|
11128
11130
|
`
|
|
11129
|
-
class
|
|
11130
|
-
return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([g],
|
|
11131
|
-
const
|
|
11132
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11133
|
-
const
|
|
11134
|
-
class
|
|
11135
|
-
class
|
|
11131
|
+
class xF extends jO{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=vF,this.isPlaceholder=!1}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}cellRecordChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){const t=this.cellRecord?.value,e=this.columnConfig?.placeholder
|
|
11132
|
+
return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([g],xF.prototype,"hasOverflow",void 0),t([g],xF.prototype,"text",void 0),t([g],xF.prototype,"alignment",void 0),t([g],xF.prototype,"isPlaceholder",void 0)
|
|
11133
|
+
const CF=class extends xF{updateText(){this.columnConfig?this.text=mF(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:yF,styles:wF})
|
|
11134
|
+
wi.getOrCreate().withPrefix("nimble").register(CF())
|
|
11135
|
+
const kF=void 0,SF=["invalidCustomOptionsCombination"]
|
|
11136
|
+
class $F extends GR{constructor(){super(SF)}setCustomOptionsValidity(t){this.setConditionValue("invalidCustomOptionsCombination",!t)}}const MF={toView:t=>"boolean"==typeof t?t.toString():null,fromView:t=>"true"===t||!0===t||"false"!==t&&!1!==t&&void 0}
|
|
11137
|
+
class _F extends(fF(pF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),_a.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),_a.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:zO,validator:new $F}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.createFormatter()
|
|
11136
11138
|
if(t){const e={formatter:t,placeholder:this.placeholder}
|
|
11137
11139
|
this.columnInternals.columnConfig=e,this.columnInternals.validator.setCustomOptionsValidity(!0)}else this.columnInternals.columnConfig=void 0,this.columnInternals.validator.setCustomOptionsValidity(!1)}createFormatter(){let t
|
|
11138
|
-
t=this.format===
|
|
11139
|
-
try{return new Intl.DateTimeFormat(_a.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([lt],
|
|
11140
|
-
const _F
|
|
11141
|
-
wi.getOrCreate().withPrefix("nimble").register(_F())
|
|
11142
|
-
const EF=class extends wF{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:bF,styles:yF})
|
|
11140
|
+
t=this.format===kF?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
|
|
11141
|
+
try{return new Intl.DateTimeFormat(_a.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([lt],_F.prototype,"format",void 0),t([lt({attribute:"custom-locale-matcher"})],_F.prototype,"customLocaleMatcher",void 0),t([lt({attribute:"custom-weekday"})],_F.prototype,"customWeekday",void 0),t([lt({attribute:"custom-era"})],_F.prototype,"customEra",void 0),t([lt({attribute:"custom-year"})],_F.prototype,"customYear",void 0),t([lt({attribute:"custom-month"})],_F.prototype,"customMonth",void 0),t([lt({attribute:"custom-day"})],_F.prototype,"customDay",void 0),t([lt({attribute:"custom-hour"})],_F.prototype,"customHour",void 0),t([lt({attribute:"custom-minute"})],_F.prototype,"customMinute",void 0),t([lt({attribute:"custom-second"})],_F.prototype,"customSecond",void 0),t([lt({attribute:"custom-time-zone-name"})],_F.prototype,"customTimeZoneName",void 0),t([lt({attribute:"custom-format-matcher"})],_F.prototype,"customFormatMatcher",void 0),t([lt({attribute:"custom-hour12",converter:MF})],_F.prototype,"customHour12",void 0),t([lt({attribute:"custom-time-zone"})],_F.prototype,"customTimeZone",void 0),t([lt({attribute:"custom-calendar"})],_F.prototype,"customCalendar",void 0),t([lt({attribute:"custom-day-period"})],_F.prototype,"customDayPeriod",void 0),t([lt({attribute:"custom-numbering-system"})],_F.prototype,"customNumberingSystem",void 0),t([lt({attribute:"custom-date-style"})],_F.prototype,"customDateStyle",void 0),t([lt({attribute:"custom-time-style"})],_F.prototype,"customTimeStyle",void 0),t([lt({attribute:"custom-hour-cycle"})],_F.prototype,"customHourCycle",void 0)
|
|
11142
|
+
const EF=_F.compose({baseName:"table-column-date-text",template:YR,styles:XR})
|
|
11143
11143
|
wi.getOrCreate().withPrefix("nimble").register(EF())
|
|
11144
|
-
class
|
|
11144
|
+
const IF=class extends xF{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:yF,styles:wF})
|
|
11145
|
+
wi.getOrCreate().withPrefix("nimble").register(IF())
|
|
11146
|
+
class DF{constructor(t){this.lang=t,this.daysFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"day"}),this.hoursFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"hour"}),this.minutesFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"minute"}),this.secondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second"}),this.scientificSecondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second",notation:"scientific",maximumFractionDigits:3})}format(t){if("number"!=typeof t||t<0||!Number.isFinite(t))return""
|
|
11145
11147
|
const e=[],n=1e3,i=6e4,o=36e5,s=864e5,r=t/s
|
|
11146
11148
|
let a=t
|
|
11147
11149
|
const l=Math.floor(r)
|
|
@@ -11154,47 +11156,47 @@ if(a-=d*i,d){const t=this.minutesFormatter.format(d)
|
|
|
11154
11156
|
e.push(t)}const h=a/n,u=0===h?0:h%60
|
|
11155
11157
|
if(t<1&&0!==h)return this.scientificSecondsFormatter.format(h)
|
|
11156
11158
|
if(u>=5e-4||0===u&&0===e.length){const t=this.secondsFormatter.format(u)
|
|
11157
|
-
e.push(t)}return e.join(", ")}}const
|
|
11158
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11159
|
-
class
|
|
11160
|
-
this.columnInternals.columnConfig=t}}const TF
|
|
11161
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11162
|
-
const
|
|
11159
|
+
e.push(t)}return e.join(", ")}}const AF=class extends rF{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:aF,styles:lF})
|
|
11160
|
+
wi.getOrCreate().withPrefix("nimble").register(AF())
|
|
11161
|
+
class TF extends(fF(pF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),_a.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),_a.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:zO,validator:new GR([])}}updateColumnConfig(){const t={formatter:new DF(_a.getValueFor(this)),placeholder:this.placeholder}
|
|
11162
|
+
this.columnInternals.columnConfig=t}}const OF=TF.compose({baseName:"table-column-duration-text",template:YR,styles:XR})
|
|
11163
|
+
wi.getOrCreate().withPrefix("nimble").register(OF())
|
|
11164
|
+
const RF=(t,e)=>{if("number"===e){const e=rt.fromView(t)
|
|
11163
11165
|
return null===e?void 0:e}return"boolean"===e?!1!==t&&"false"!==t&&(!0===t||"true"===t||void 0):t?.toString()??void 0}
|
|
11164
|
-
class
|
|
11165
|
-
return this.mappings.forEach((e=>{const n=
|
|
11166
|
+
class FF extends KO{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(t,e){t instanceof _v&&"string"==typeof e&&this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.checkValidity()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const t=new Map
|
|
11167
|
+
return this.mappings.forEach((e=>{const n=RF(e.key,this.keyType)
|
|
11166
11168
|
if(void 0===n)throw Error("Key was invalid for type. Validation should have prevented this.")
|
|
11167
11169
|
const i=this.createMappingConfig(e)
|
|
11168
11170
|
t.set(n,i)})),t}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}mappingsChanged(){this.updateColumnConfig(),this.observeMappings()}keyTypeChanged(){this.updateColumnConfig()}removeMappingObservers(){this.mappingNotifiers.forEach((t=>{t.unsubscribe(this)})),this.mappingNotifiers=[]}observeMappings(){this.removeMappingObservers()
|
|
11169
11171
|
for(const t of this.mappings){const e=m.getNotifier(t)
|
|
11170
|
-
e.subscribe(this),this.mappingNotifiers.push(e)}}}t([g],
|
|
11171
|
-
const
|
|
11172
|
-
${
|
|
11172
|
+
e.subscribe(this),this.mappingNotifiers.push(e)}}}t([g],FF.prototype,"mappings",void 0),t([lt({attribute:"field-name"})],FF.prototype,"fieldName",void 0),t([lt({attribute:"key-type"})],FF.prototype,"keyType",void 0)
|
|
11173
|
+
const NF=xt`
|
|
11174
|
+
${XR}
|
|
11173
11175
|
|
|
11174
11176
|
slot[name='mapping'] {
|
|
11175
11177
|
display: none;
|
|
11176
11178
|
}
|
|
11177
|
-
`,
|
|
11178
|
-
class
|
|
11179
|
+
`,PF=Z`${YR}<slot ${Xt("mappings")} name="mapping"></slot>`,LF=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue"]
|
|
11180
|
+
class zF extends GR{constructor(t){super(t)}validate(t,e){this.untrackAll()
|
|
11179
11181
|
const n=t.map((t=>t.key))
|
|
11180
|
-
this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===
|
|
11181
|
-
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>
|
|
11182
|
+
this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===RF(t,e)))
|
|
11183
|
+
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>RF(t,e))),i=new Set(n).size!==n.length
|
|
11182
11184
|
this.setConditionValue("duplicateMappingKey",i)}validateNoMissingKeys(t){const e=t.some((t=>void 0===t.key))
|
|
11183
|
-
this.setConditionValue("missingKeyValue",e)}}const
|
|
11184
|
-
class
|
|
11185
|
-
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(
|
|
11186
|
-
this.setConditionValue("unsupportedMappingType",!e)}}class
|
|
11185
|
+
this.setConditionValue("missingKeyValue",e)}}const VF=[...LF,"unsupportedMappingType","missingTextValue"]
|
|
11186
|
+
class HF extends zF{constructor(){super(VF)}static isSupportedMappingElement(t){return t instanceof Iv}validate(t,e){super.validate(t,e),this.validateMappingTypes(t),this.validateNoMissingText(t)}validateNoMissingText(t){const e=t.filter(HF.isSupportedMappingElement).some((t=>void 0===t.text))
|
|
11187
|
+
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(HF.isSupportedMappingElement)
|
|
11188
|
+
this.setConditionValue("unsupportedMappingType",!e)}}class BF{constructor(t){this.text=t}}class qF extends BF{}const UF=class extends xF{updateText(){const t=this.cellRecord?.value
|
|
11187
11189
|
if(null==t)return void(this.text="")
|
|
11188
11190
|
const e=this.columnConfig?.mappingConfigs.get(t)
|
|
11189
|
-
this.text=e instanceof
|
|
11190
|
-
wi.getOrCreate().withPrefix("nimble").register(qF())
|
|
11191
|
-
const UF=class extends sF{updateText(){const t=this.columnConfig?.mappingConfigs.get(this.groupHeaderValue)
|
|
11192
|
-
this.text=t instanceof BF&&t.text?t.text:""}}.compose({baseName:"table-column-enum-text-group-header-view",template:rF,styles:aF})
|
|
11191
|
+
this.text=e instanceof qF&&e.text?e.text:""}}.compose({baseName:"table-column-enum-text-cell-view",template:yF,styles:wF})
|
|
11193
11192
|
wi.getOrCreate().withPrefix("nimble").register(UF())
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11197
|
-
|
|
11193
|
+
const jF=class extends rF{updateText(){const t=this.columnConfig?.mappingConfigs.get(this.groupHeaderValue)
|
|
11194
|
+
this.text=t instanceof qF&&t.text?t.text:""}}.compose({baseName:"table-column-enum-text-group-header-view",template:aF,styles:lF})
|
|
11195
|
+
wi.getOrCreate().withPrefix("nimble").register(jF())
|
|
11196
|
+
class WF extends(tF(QR(FF))){getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-enum-text-cell-view",groupHeaderViewTag:"nimble-table-column-enum-text-group-header-view",delegatedEvents:[],sortOperation:zO,validator:new HF}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof Iv)return new qF(t.text)
|
|
11197
|
+
throw new Error("Unsupported mapping")}}const ZF=WF.compose({baseName:"table-column-enum-text",template:PF,styles:NF})
|
|
11198
|
+
wi.getOrCreate().withPrefix("nimble").register(ZF())
|
|
11199
|
+
const GF=Z`<span
|
|
11198
11200
|
${dg("hasOverflow")}
|
|
11199
11201
|
class="header-content"
|
|
11200
11202
|
title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
|
|
@@ -11202,13 +11204,13 @@ const ZF=Z`<span
|
|
|
11202
11204
|
<slot ${Pt("contentSlot")}></slot>
|
|
11203
11205
|
<slot ${Xt({property:"unitElements",filter:Gt()})} name="unit"></slot>
|
|
11204
11206
|
</span>`
|
|
11205
|
-
const
|
|
11206
|
-
wi.getOrCreate().withPrefix("nimble").register(GF())
|
|
11207
|
-
const KF=class extends wF{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??gF}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:bF,styles:yF})
|
|
11207
|
+
const KF=class extends rF{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:aF,styles:lF})
|
|
11208
11208
|
wi.getOrCreate().withPrefix("nimble").register(KF())
|
|
11209
|
-
const JF={
|
|
11210
|
-
|
|
11211
|
-
|
|
11209
|
+
const JF=class extends xF{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??vF}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:yF,styles:wF})
|
|
11210
|
+
wi.getOrCreate().withPrefix("nimble").register(JF())
|
|
11211
|
+
const XF={default:void 0,decimal:"decimal"},YF="left",QF="right"
|
|
11212
|
+
class tN{format(t){if("number"!=typeof t)return""
|
|
11213
|
+
try{return this.tryFormat(t)}catch{return""}}}class eN{constructor(t){this.locale=t.locale,this.intlNumberFormatOptions=t.intlNumberFormatOptions}}class nN extends eN{constructor(t,e){super(t),this.formatter=new Intl.NumberFormat(this.locale,{...e,...this.intlNumberFormatOptions})}static createFactory(t){return e=>new nN(e,t)}format(t){return this.formatter.format(t)}}class iN{constructor(t,e){this.scaleFactor=t,this.scaledUnitFormatFactory=e}isBase(){return 1===this.scaleFactor}}class oN{constructor(t){this.supportedScaledUnits=t
|
|
11212
11214
|
const e=t.every(((t,e,n)=>0===e||n[e-1].scaleFactor<t.scaleFactor))
|
|
11213
11215
|
if(!e)throw new Error("Supported scaled units must have unique and ordered scale factors")
|
|
11214
11216
|
const n=t.find((t=>t.isBase()))
|
|
@@ -11217,39 +11219,39 @@ this.supportedScaledUnits=t,this.baseScaledUnit=n}scaleNumber(t){const e=Math.ab
|
|
|
11217
11219
|
if(1===this.supportedScaledUnits.length||0===e||e===1/0||Number.isNaN(e))return{scaledValue:t,scaledUnit:this.baseScaledUnit}
|
|
11218
11220
|
for(let n=this.supportedScaledUnits.length-1;n>=0;n-=1){const i=this.supportedScaledUnits[n]
|
|
11219
11221
|
if(e/i.scaleFactor>=1)return{scaledValue:t/i.scaleFactor,scaledUnit:i}}const n=this.supportedScaledUnits[0]
|
|
11220
|
-
return{scaledValue:t/n.scaleFactor,scaledUnit:n}}}const
|
|
11221
|
-
class
|
|
11222
|
+
return{scaledValue:t/n.scaleFactor,scaledUnit:n}}}const sN=new class extends oN{constructor(){super([new iN(1,nN.createFactory({}))])}},rN="negative"
|
|
11223
|
+
class aN extends tN{constructor(t,{unitScale:e=sN}={unitScale:sN}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:aN.maximumDigits,maximumFractionDigits:aN.maximumDigits-1,roundingPriority:"lessPrecision",signDisplay:rN},this.defaultScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:aN.maximumDigits,notation:"scientific",signDisplay:rN}
|
|
11222
11224
|
for(const n of e.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions}))
|
|
11223
11225
|
this.exponentialScaledUnitFormatter=e.baseScaledUnit.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=e}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(t){const{scaledValue:e,scaledUnit:n}=this.unitScale.scaleNumber(t),i=Math.abs(e)
|
|
11224
|
-
return 0!==i&&(i>=
|
|
11225
|
-
class
|
|
11226
|
+
return 0!==i&&(i>=aN.exponentialUpperBound||i<aN.exponentialLowerBound)?this.exponentialScaledUnitFormatter.format(t):this.defaultScaledUnitFormatters.get(n.scaleFactor).format(e)}}aN.maximumDigits=6,aN.exponentialLowerBound=995e-6,aN.exponentialUpperBound=999999.5
|
|
11227
|
+
class lN extends tN{constructor(t,{minimumFractionDigits:e=0,maximumFractionDigits:n=Math.max(3,e),unitScale:i=sN}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:sN}){super(),this.scaledUnitFormatters=new Map
|
|
11226
11228
|
const o={maximumFractionDigits:n,minimumFractionDigits:e,signDisplay:"negative"}
|
|
11227
11229
|
for(const e of i.supportedScaledUnits)this.scaledUnitFormatters.set(e.scaleFactor,e.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:o}))
|
|
11228
11230
|
this.unitScale=i,this.minimumFractionDigits=e,this.maximumFractionDigits=n}resolvedOptions(){return{unitScale:this.unitScale,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits}}tryFormat(t){const{scaledValue:e,scaledUnit:n}=this.unitScale.scaleNumber(t)
|
|
11229
|
-
return this.scaledUnitFormatters.get(n.scaleFactor).format(e)}}class
|
|
11231
|
+
return this.scaledUnitFormatters.get(n.scaleFactor).format(e)}}class cN extends tN{constructor(t,e){super(),this._resolvedOptions=this.resolveOptions(e),this.resolvedUnitFormat=this.resolveUnitFormat(t,this._resolvedOptions)}resolvedOptions(){return{...this._resolvedOptions}}optionsMatch(t){const e=this.resolveOptions(t)
|
|
11230
11232
|
return this._resolvedOptions.decimalDigits===e.decimalDigits&&this._resolvedOptions.decimalMaximumDigits===e.decimalMaximumDigits&&this._resolvedOptions.numberTextFormat===e.numberTextFormat&&this._resolvedOptions.unitScale===e.unitScale}tryFormat(t){return this.resolvedUnitFormat.format(t)}resolveUnitFormat(t,e){const{numberTextFormat:n,decimalMaximumDigits:i,decimalDigits:o,unitScale:s}=e
|
|
11231
|
-
return n===
|
|
11233
|
+
return n===XF.default?new aN(t,{unitScale:s}):new lN(t,"number"==typeof o?{minimumFractionDigits:o,maximumFractionDigits:o,unitScale:s}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:s})}resolveOptions(t){if(!t||t.numberTextFormat===XF.default)return{numberTextFormat:XF.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:t?.unitScale??sN}
|
|
11232
11234
|
const e="number"==typeof t.decimalDigits,n="number"==typeof t.decimalMaximumDigits
|
|
11233
11235
|
if(e&&n)throw new Error("decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.")
|
|
11234
|
-
return e||n?{numberTextFormat:
|
|
11235
|
-
const
|
|
11236
|
-
class
|
|
11237
|
-
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===
|
|
11238
|
-
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===
|
|
11236
|
+
return e||n?{numberTextFormat:XF.decimal,decimalDigits:t.decimalDigits,decimalMaximumDigits:t.decimalMaximumDigits,unitScale:t.unitScale??sN}:{numberTextFormat:XF.decimal,decimalDigits:cN.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:t.unitScale??sN}}}cN.defaultDecimalDigits=2
|
|
11237
|
+
const dN=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
|
|
11238
|
+
class hN extends GR{constructor(){super(dN)}validateDecimalDigits(t,e){const n=!!(t===XF.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
|
|
11239
|
+
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===XF.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
|
|
11240
|
+
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===XF.decimal)&&("number"==typeof e&&"number"==typeof n)
|
|
11239
11241
|
this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(t){const e=t.length>1
|
|
11240
|
-
this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class
|
|
11241
|
-
class
|
|
11242
|
-
t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await uI(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof
|
|
11242
|
+
this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class uN extends Ve{}t([g],uN.prototype,"resolvedUnitScale",void 0)
|
|
11243
|
+
class pN extends(fF(pF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),_a.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),_a.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:zO,validator:new hN}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const t=m.getNotifier(this.unit)
|
|
11244
|
+
t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await uI(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof uN))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.columnInternals.validator
|
|
11243
11245
|
if(t.validateDecimalDigits(this.format,this.decimalDigits),t.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),t.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),t.validateAtMostOneUnit(this.unitElements??[]),t.isValid()){const t={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment(),placeholder:this.placeholder}
|
|
11244
11246
|
this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}createFormatter(){const t=this.unit?.resolvedUnitScale
|
|
11245
|
-
return new
|
|
11246
|
-
const pN
|
|
11247
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11248
|
-
const
|
|
11249
|
-
class
|
|
11250
|
-
this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(
|
|
11251
|
-
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(
|
|
11252
|
-
this.setConditionValue("unsupportedMappingType",!e)}}const
|
|
11247
|
+
return new cN(_a.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:t})}determineCellContentAlignment(){return this.alignment===YF?vF:this.alignment===QF?bF:this.format!==XF.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?vF:bF}}t([lt],pN.prototype,"format",void 0),t([lt],pN.prototype,"alignment",void 0),t([lt({attribute:"decimal-digits",converter:rt})],pN.prototype,"decimalDigits",void 0),t([lt({attribute:"decimal-maximum-digits",converter:rt})],pN.prototype,"decimalMaximumDigits",void 0),t([g],pN.prototype,"unitElements",void 0),t([g],pN.prototype,"unit",void 0)
|
|
11248
|
+
const fN=pN.compose({baseName:"table-column-number-text",template:GF,styles:XR})
|
|
11249
|
+
wi.getOrCreate().withPrefix("nimble").register(fN())
|
|
11250
|
+
const mN=[...LF,"unsupportedMappingType","invalidIconName","missingTextValue"]
|
|
11251
|
+
class gN extends zF{constructor(){super(mN)}static isIconMappingElement(t){return t instanceof Tv}static isSupportedMappingElement(t){return t instanceof Tv||t instanceof Rv}static hasUnresolvedIcon(t){return"string"==typeof t.icon&&void 0===t.resolvedIcon}validate(t,e){super.validate(t,e),this.validateMappingTypes(t),this.validateIconNames(t),this.validateNoMissingText(t)}validateIconNames(t){const e=t.filter(gN.isIconMappingElement).some(gN.hasUnresolvedIcon)
|
|
11252
|
+
this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(gN.isSupportedMappingElement).some((t=>void 0===t.text))
|
|
11253
|
+
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(gN.isSupportedMappingElement)
|
|
11254
|
+
this.setConditionValue("unsupportedMappingType",!e)}}const vN=xt`
|
|
11253
11255
|
${Oo("inline-flex")}
|
|
11254
11256
|
|
|
11255
11257
|
:host {
|
|
@@ -11269,7 +11271,7 @@ this.setConditionValue("unsupportedMappingType",!e)}}const gN=xt`
|
|
|
11269
11271
|
overflow: hidden;
|
|
11270
11272
|
text-overflow: ellipsis;
|
|
11271
11273
|
}
|
|
11272
|
-
`,
|
|
11274
|
+
`,bN=Z`
|
|
11273
11275
|
${Ht((t=>"icon"===t.visual),Z`
|
|
11274
11276
|
${t=>t.iconTemplate}
|
|
11275
11277
|
<span
|
|
@@ -11277,11 +11279,11 @@ this.setConditionValue("unsupportedMappingType",!e)}}const gN=xt`
|
|
|
11277
11279
|
title="${t=>t.hasOverflow&&t.text?t.text:null}"
|
|
11278
11280
|
>${t=>t.text}</span>`)}
|
|
11279
11281
|
${Ht((t=>"spinner"===t.visual),Z`
|
|
11280
|
-
<${
|
|
11282
|
+
<${_T}
|
|
11281
11283
|
title="${t=>t.text}"
|
|
11282
11284
|
aria-label="${t=>t.text}"
|
|
11283
11285
|
class="no-shrink">
|
|
11284
|
-
</${
|
|
11286
|
+
</${_T}>
|
|
11285
11287
|
<span
|
|
11286
11288
|
${dg("hasOverflow")}
|
|
11287
11289
|
title="${t=>t.hasOverflow&&t.text?t.text:null}"
|
|
@@ -11293,9 +11295,9 @@ this.setConditionValue("unsupportedMappingType",!e)}}const gN=xt`
|
|
|
11293
11295
|
title="${t=>t.hasOverflow&&t.text?t.text:null}"
|
|
11294
11296
|
>${t=>t.text}</span>
|
|
11295
11297
|
`)}
|
|
11296
|
-
`,
|
|
11297
|
-
class
|
|
11298
|
-
super(n),this.severity=e,this.iconTemplate=void 0===(i=t)?
|
|
11298
|
+
`,yN=Z` `
|
|
11299
|
+
class wN extends BF{constructor(t,e,n){var i
|
|
11300
|
+
super(n),this.severity=e,this.iconTemplate=void 0===(i=t)?yN:Z`
|
|
11299
11301
|
<${i}
|
|
11300
11302
|
title="${t=>t.text}"
|
|
11301
11303
|
role="img"
|
|
@@ -11304,37 +11306,37 @@ super(n),this.severity=e,this.iconTemplate=void 0===(i=t)?bN:Z`
|
|
|
11304
11306
|
class="no-shrink"
|
|
11305
11307
|
>
|
|
11306
11308
|
</${i}>
|
|
11307
|
-
`}}class
|
|
11309
|
+
`}}class xN extends BF{constructor(t){super(t)}}class CN extends rF{updateText(){if(this.visual=void 0,!this.columnConfig)return void(this.text="")
|
|
11308
11310
|
const t=this.groupHeaderValue,e=this.columnConfig.mappingConfigs.get(t)
|
|
11309
|
-
e instanceof
|
|
11310
|
-
const CN
|
|
11311
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11312
|
-
const
|
|
11311
|
+
e instanceof wN?(this.visual="icon",this.severity=e.severity,this.text=e.text??"",this.iconTemplate=e.iconTemplate):e instanceof xN&&(this.visual="spinner",this.text=e.text??"")}}t([g],CN.prototype,"severity",void 0),t([g],CN.prototype,"iconTemplate",void 0),t([g],CN.prototype,"visual",void 0)
|
|
11312
|
+
const kN=CN.compose({baseName:"table-column-icon-group-header-view",template:bN,styles:vN})
|
|
11313
|
+
wi.getOrCreate().withPrefix("nimble").register(kN())
|
|
11314
|
+
const SN=Z`
|
|
11313
11315
|
${Ht((t=>"icon"===t.visual),(t=>t.iconTemplate))}
|
|
11314
11316
|
${Ht((t=>"spinner"===t.visual),Z`
|
|
11315
|
-
<${
|
|
11317
|
+
<${_T}
|
|
11316
11318
|
title="${t=>t.text}"
|
|
11317
11319
|
aria-label="${t=>t.text}"
|
|
11318
11320
|
class="no-shrink">
|
|
11319
|
-
</${
|
|
11321
|
+
</${_T}>
|
|
11320
11322
|
`)}
|
|
11321
11323
|
`
|
|
11322
|
-
class
|
|
11324
|
+
class $N extends jO{columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig||!this.cellRecord)return
|
|
11323
11325
|
const t=this.cellRecord.value
|
|
11324
11326
|
if(null==t)return
|
|
11325
11327
|
const e=this.columnConfig.mappingConfigs.get(t)
|
|
11326
|
-
e instanceof
|
|
11327
|
-
const
|
|
11328
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11329
|
-
class
|
|
11330
|
-
if(t instanceof Rv)return new
|
|
11331
|
-
throw new Error("Unsupported mapping")}}const _N
|
|
11332
|
-
wi.getOrCreate().withPrefix("nimble").register(_N())
|
|
11333
|
-
const EN=class extends wF{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:bF,styles:yF})
|
|
11328
|
+
e instanceof wN?(this.visual="icon",this.severity=e.severity,this.text=e.text,this.iconTemplate=e.iconTemplate):e instanceof xN&&(this.visual="spinner",this.text=e.text)}}t([g],$N.prototype,"severity",void 0),t([g],$N.prototype,"text",void 0),t([g],$N.prototype,"iconTemplate",void 0),t([g],$N.prototype,"visual",void 0)
|
|
11329
|
+
const MN=$N.compose({baseName:"table-column-icon-cell-view",template:SN})
|
|
11330
|
+
wi.getOrCreate().withPrefix("nimble").register(MN())
|
|
11331
|
+
class _N extends(tF(QR(FF))){getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-icon-cell-view",groupHeaderViewTag:"nimble-table-column-icon-group-header-view",delegatedEvents:[],sortOperation:zO,validator:new gN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof Tv)return new wN(t.resolvedIcon,t.severity,t.text)
|
|
11332
|
+
if(t instanceof Rv)return new xN(t.text)
|
|
11333
|
+
throw new Error("Unsupported mapping")}}const EN=_N.compose({baseName:"table-column-icon",template:PF,styles:NF})
|
|
11334
11334
|
wi.getOrCreate().withPrefix("nimble").register(EN())
|
|
11335
|
-
|
|
11336
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11337
|
-
const AN=
|
|
11335
|
+
const IN=class extends xF{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:yF,styles:wF})
|
|
11336
|
+
wi.getOrCreate().withPrefix("nimble").register(IN())
|
|
11337
|
+
class DN extends(fF(pF)){placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:dF,delegatedEvents:[],sortOperation:VO,validator:new GR([])}}}const AN=DN.compose({baseName:"table-column-text",template:YR,styles:XR})
|
|
11338
|
+
wi.getOrCreate().withPrefix("nimble").register(AN())
|
|
11339
|
+
const TN=xt`
|
|
11338
11340
|
${Oo("grid")}
|
|
11339
11341
|
|
|
11340
11342
|
:host {
|
|
@@ -11362,7 +11364,7 @@ const AN=xt`
|
|
|
11362
11364
|
overflow: auto;
|
|
11363
11365
|
}
|
|
11364
11366
|
`
|
|
11365
|
-
const
|
|
11367
|
+
const ON=class extends ro{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:ro,template:(t,e)=>Z`
|
|
11366
11368
|
<template class="${t=>t.orientation}">
|
|
11367
11369
|
${ne(0,e)}
|
|
11368
11370
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -11381,9 +11383,9 @@ const TN=class extends ro{constructor(){super(),this.activeindicator=!1}}.compos
|
|
|
11381
11383
|
<slot name="tabpanel" ${Xt("tabpanels")}></slot>
|
|
11382
11384
|
</div>
|
|
11383
11385
|
</template>
|
|
11384
|
-
`,styles:
|
|
11385
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11386
|
-
const
|
|
11386
|
+
`,styles:TN})
|
|
11387
|
+
wi.getOrCreate().withPrefix("nimble").register(ON())
|
|
11388
|
+
const RN=xt`
|
|
11387
11389
|
${Oo("flex")}
|
|
11388
11390
|
|
|
11389
11391
|
:host {
|
|
@@ -11401,15 +11403,15 @@ const ON=xt`
|
|
|
11401
11403
|
rgba(${Ha}, 0.3);
|
|
11402
11404
|
margin: ${sl} ${rl};
|
|
11403
11405
|
}
|
|
11404
|
-
`,
|
|
11406
|
+
`,FN=Z`
|
|
11405
11407
|
<template slot="end">
|
|
11406
11408
|
<div class="separator"></div>
|
|
11407
11409
|
<slot></slot>
|
|
11408
11410
|
</template>
|
|
11409
11411
|
`
|
|
11410
|
-
const
|
|
11411
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11412
|
-
const
|
|
11412
|
+
const NN=class extends Ve{}.compose({baseName:"tabs-toolbar",template:FN,styles:RN})
|
|
11413
|
+
wi.getOrCreate().withPrefix("nimble").register(NN())
|
|
11414
|
+
const PN="outline",LN="block",zN=xt`
|
|
11413
11415
|
${Oo("inline-flex")}
|
|
11414
11416
|
${rg}
|
|
11415
11417
|
|
|
@@ -11549,12 +11551,12 @@ const NN="outline",PN="block",LN=xt`
|
|
|
11549
11551
|
top: ${rl};
|
|
11550
11552
|
right: var(--ni-private-scrollbar-width);
|
|
11551
11553
|
}
|
|
11552
|
-
`.withBehaviors(sh(
|
|
11554
|
+
`.withBehaviors(sh(PN,xt`
|
|
11553
11555
|
.control {
|
|
11554
11556
|
border-color: rgba(${Ha}, 0.3);
|
|
11555
11557
|
background-color: transparent;
|
|
11556
11558
|
}
|
|
11557
|
-
`),sh(
|
|
11559
|
+
`),sh(LN,xt`
|
|
11558
11560
|
.control {
|
|
11559
11561
|
background-color: rgba(${Ha}, 0.1);
|
|
11560
11562
|
}
|
|
@@ -11572,8 +11574,8 @@ const NN="outline",PN="block",LN=xt`
|
|
|
11572
11574
|
border-bottom-color: ${Ba};
|
|
11573
11575
|
}
|
|
11574
11576
|
`))
|
|
11575
|
-
class
|
|
11576
|
-
const VN
|
|
11577
|
+
class VN extends ho{constructor(){super(...arguments),this.appearance=PN,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}onTextAreaInput(){this.handleTextInput(),this.queueUpdateScrollbarWidth()}placeholderChanged(){this.queueUpdateScrollbarWidth()}valueChanged(t,e){super.valueChanged(t,e),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,u.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}t([lt],VN.prototype,"appearance",void 0),t([lt({attribute:"error-text"})],VN.prototype,"errorText",void 0),t([lt({attribute:"error-visible",mode:"boolean"})],VN.prototype,"errorVisible",void 0),t([g],VN.prototype,"scrollbarWidth",void 0)
|
|
11578
|
+
const HN=VN.compose({baseName:"text-area",baseClass:ho,template:()=>Z`
|
|
11577
11579
|
<label
|
|
11578
11580
|
part="label"
|
|
11579
11581
|
for="control"
|
|
@@ -11630,9 +11632,9 @@ const VN=zN.compose({baseName:"text-area",baseClass:ho,template:()=>Z`
|
|
|
11630
11632
|
></${hm}>
|
|
11631
11633
|
${Qm}
|
|
11632
11634
|
</div>
|
|
11633
|
-
`,styles:
|
|
11634
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11635
|
-
const
|
|
11635
|
+
`,styles:zN,shadowOptions:{delegatesFocus:!0}})
|
|
11636
|
+
wi.getOrCreate().withPrefix("nimble").register(HN())
|
|
11637
|
+
const BN="underline",qN="outline",UN="block",jN="frameless",WN=xt`
|
|
11636
11638
|
${Oo("inline-block")}
|
|
11637
11639
|
${rg}
|
|
11638
11640
|
|
|
@@ -11804,12 +11806,12 @@ const HN="underline",BN="outline",qN="block",UN="frameless",jN=xt`
|
|
|
11804
11806
|
slot[name='actions']::slotted(*) {
|
|
11805
11807
|
${il.cssCustomProperty}: 24px;
|
|
11806
11808
|
}
|
|
11807
|
-
`.withBehaviors(sh(
|
|
11809
|
+
`.withBehaviors(sh(BN,xt`
|
|
11808
11810
|
.root {
|
|
11809
11811
|
border-bottom-width: ${cl};
|
|
11810
11812
|
padding-bottom: 0;
|
|
11811
11813
|
}
|
|
11812
|
-
`),sh(
|
|
11814
|
+
`),sh(UN,xt`
|
|
11813
11815
|
.root {
|
|
11814
11816
|
background-color: rgba(${Ha}, 0.1);
|
|
11815
11817
|
}
|
|
@@ -11837,12 +11839,12 @@ const HN="underline",BN="outline",qN="block",UN="frameless",jN=xt`
|
|
|
11837
11839
|
:host([disabled]) .root {
|
|
11838
11840
|
background-color: rgba(${Ha}, 0.07);
|
|
11839
11841
|
}
|
|
11840
|
-
`),sh(
|
|
11842
|
+
`),sh(qN,xt`
|
|
11841
11843
|
.root {
|
|
11842
11844
|
border-width: ${cl};
|
|
11843
11845
|
padding: 0;
|
|
11844
11846
|
}
|
|
11845
|
-
`),sh(
|
|
11847
|
+
`),sh(jN,xt`
|
|
11846
11848
|
.control {
|
|
11847
11849
|
padding-left: ${cl};
|
|
11848
11850
|
padding-right: ${cl};
|
|
@@ -11860,8 +11862,8 @@ const HN="underline",BN="outline",qN="block",UN="frameless",jN=xt`
|
|
|
11860
11862
|
filter: invert(100%);
|
|
11861
11863
|
}
|
|
11862
11864
|
`))
|
|
11863
|
-
class
|
|
11864
|
-
const ZN
|
|
11865
|
+
class ZN extends Vi{constructor(){super(...arguments),this.appearance=BN,this.errorVisible=!1,this.fullBleed=!1}}t([lt],ZN.prototype,"appearance",void 0),t([lt({attribute:"error-text"})],ZN.prototype,"errorText",void 0),t([lt({attribute:"error-visible",mode:"boolean"})],ZN.prototype,"errorVisible",void 0),t([lt({attribute:"full-bleed",mode:"boolean"})],ZN.prototype,"fullBleed",void 0)
|
|
11866
|
+
const GN=ZN.compose({baseName:"text-field",baseClass:Vi,template:(t,e)=>Z`
|
|
11865
11867
|
<template
|
|
11866
11868
|
class="
|
|
11867
11869
|
${t=>t.readOnly?"readonly":""}
|
|
@@ -11921,7 +11923,7 @@ const ZN=WN.compose({baseName:"text-field",baseClass:Vi,template:(t,e)=>Z`
|
|
|
11921
11923
|
${ee(0,e)}
|
|
11922
11924
|
</div>
|
|
11923
11925
|
</template>
|
|
11924
|
-
`,styles:
|
|
11926
|
+
`,styles:WN,shadowOptions:{delegatesFocus:!0},end:Z`
|
|
11925
11927
|
<${hm}
|
|
11926
11928
|
severity="error"
|
|
11927
11929
|
class="error-icon"
|
|
@@ -11931,8 +11933,8 @@ const ZN=WN.compose({baseName:"text-field",baseClass:Vi,template:(t,e)=>Z`
|
|
|
11931
11933
|
</span>
|
|
11932
11934
|
${Qm}
|
|
11933
11935
|
`})
|
|
11934
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
11935
|
-
const
|
|
11936
|
+
wi.getOrCreate().withPrefix("nimble").register(GN())
|
|
11937
|
+
const KN=xt`
|
|
11936
11938
|
${Oo("inline-flex")}
|
|
11937
11939
|
|
|
11938
11940
|
:host {
|
|
@@ -12017,7 +12019,7 @@ const GN=xt`
|
|
|
12017
12019
|
.status-icon {
|
|
12018
12020
|
opacity: 0.6;
|
|
12019
12021
|
}
|
|
12020
|
-
`)),
|
|
12022
|
+
`)),JN=Z`
|
|
12021
12023
|
${Ht((t=>t.tooltipVisible),Z`
|
|
12022
12024
|
<${Eh}
|
|
12023
12025
|
class="anchored-region"
|
|
@@ -12050,11 +12052,11 @@ const GN=xt`
|
|
|
12050
12052
|
</${Eh}>
|
|
12051
12053
|
`)}
|
|
12052
12054
|
`
|
|
12053
|
-
class
|
|
12054
|
-
const XN
|
|
12055
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
12056
|
-
const
|
|
12057
|
-
class
|
|
12055
|
+
class XN extends Io{constructor(){super(...arguments),this.iconVisible=!1}}t([lt],XN.prototype,"severity",void 0),t([lt({attribute:"icon-visible",mode:"boolean"})],XN.prototype,"iconVisible",void 0)
|
|
12056
|
+
const YN=XN.compose({baseName:"tooltip",baseClass:Io,template:JN,styles:KN})
|
|
12057
|
+
wi.getOrCreate().withPrefix("nimble").register(YN())
|
|
12058
|
+
const QN="group-selected",tP="all",eP="leaves-only",nP="none"
|
|
12059
|
+
class iP{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=null}handleChange({target:t,token:e}){this.attach(e.getValueFor(t))}attach(t){this.attached!==this[t]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[t],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const oP=xt`
|
|
12058
12060
|
${Oo("block")}
|
|
12059
12061
|
|
|
12060
12062
|
:host {
|
|
@@ -12075,7 +12077,7 @@ class nP{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12075
12077
|
}
|
|
12076
12078
|
|
|
12077
12079
|
${""}
|
|
12078
|
-
:host([${
|
|
12080
|
+
:host([${QN}])::after {
|
|
12079
12081
|
background: ${Wa};
|
|
12080
12082
|
border-radius: 0px;
|
|
12081
12083
|
content: '';
|
|
@@ -12097,7 +12099,7 @@ class nP{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12097
12099
|
background: ${za};
|
|
12098
12100
|
}
|
|
12099
12101
|
|
|
12100
|
-
:host([${
|
|
12102
|
+
:host([${QN}]) .positioning-region:hover {
|
|
12101
12103
|
background: ${La};
|
|
12102
12104
|
}
|
|
12103
12105
|
|
|
@@ -12203,7 +12205,7 @@ class nP{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12203
12205
|
display: block;
|
|
12204
12206
|
}
|
|
12205
12207
|
`.withBehaviors(new class{constructor(t,e){this.cache=new WeakMap,this.ltr=t,this.rtl=e}bind(t){this.attach(t)}unbind(t){const e=this.cache.get(t)
|
|
12206
|
-
e&&Ea.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new
|
|
12208
|
+
e&&Ea.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new iP(this.ltr,this.rtl,t),n=Ea.getValueFor(t)
|
|
12207
12209
|
Ea.subscribe(e),e.attach(n),this.cache.set(t,e)}}(xt`
|
|
12208
12210
|
.expand-collapse-button {
|
|
12209
12211
|
left: var(
|
|
@@ -12235,8 +12237,8 @@ Ea.subscribe(e),e.attach(n),this.cache.set(t,e)}}(xt`
|
|
|
12235
12237
|
transform: rotate(135deg);
|
|
12236
12238
|
}
|
|
12237
12239
|
`))
|
|
12238
|
-
class
|
|
12239
|
-
const sP
|
|
12240
|
+
class sP extends Ao{constructor(){super(...arguments),this.groupSelected=!1}}t([lt({attribute:"group-selected",mode:"boolean"})],sP.prototype,"groupSelected",void 0)
|
|
12241
|
+
const rP=sP.compose({baseName:"tree-item",baseClass:Ao,template:(t,e)=>Z`
|
|
12240
12242
|
<template
|
|
12241
12243
|
role="treeitem"
|
|
12242
12244
|
slot="${t=>t.isNestedItem()?"item":void 0}"
|
|
@@ -12276,9 +12278,9 @@ const sP=oP.compose({baseName:"tree-item",baseClass:Ao,template:(t,e)=>Z`
|
|
|
12276
12278
|
</div>
|
|
12277
12279
|
`)}
|
|
12278
12280
|
</template>
|
|
12279
|
-
`,styles:
|
|
12280
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
12281
|
-
const
|
|
12281
|
+
`,styles:oP,expandCollapseGlyph:qh.data})
|
|
12282
|
+
wi.getOrCreate().withPrefix("nimble").register(rP())
|
|
12283
|
+
const aP=xt`
|
|
12282
12284
|
${Oo("flex")}
|
|
12283
12285
|
|
|
12284
12286
|
:host {
|
|
@@ -12290,7 +12292,7 @@ const rP=xt`
|
|
|
12290
12292
|
:host(${No}) {
|
|
12291
12293
|
outline: none;
|
|
12292
12294
|
}
|
|
12293
|
-
`,
|
|
12295
|
+
`,lP=Z`
|
|
12294
12296
|
<template
|
|
12295
12297
|
role="tree"
|
|
12296
12298
|
${Pt("treeView")}
|
|
@@ -12304,246 +12306,246 @@ const rP=xt`
|
|
|
12304
12306
|
<slot ${Xt("slottedTreeItems")}></slot>
|
|
12305
12307
|
</template>
|
|
12306
12308
|
`
|
|
12307
|
-
class
|
|
12309
|
+
class cP extends To{constructor(){super(...arguments),this.selectionMode=tP,this.selectedItems=[]}handleClick(t){if(t.defaultPrevented)return!1
|
|
12308
12310
|
if(!(t.target instanceof Element&&Do(t.target)))return!0
|
|
12309
12311
|
const e=t.target
|
|
12310
|
-
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case
|
|
12311
|
-
case
|
|
12312
|
-
case
|
|
12313
|
-
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const t of Array.from(this.children))t instanceof
|
|
12312
|
+
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case tP:return!0
|
|
12313
|
+
case nP:return!1
|
|
12314
|
+
case eP:return!this.itemHasChildren(t)
|
|
12315
|
+
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const t of Array.from(this.children))t instanceof sP&&(t.groupSelected=!1)
|
|
12314
12316
|
for(let t of this.selectedItems){for(;null!==t.parentElement&&t.parentElement!==this;)t=t.parentElement
|
|
12315
|
-
t instanceof
|
|
12316
|
-
const cP
|
|
12317
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
12318
|
-
const
|
|
12319
|
-
class
|
|
12320
|
-
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new
|
|
12317
|
+
t instanceof sP&&(t.groupSelected=!0)}}}t([lt({attribute:"selection-mode"})],cP.prototype,"selectionMode",void 0),t([g],cP.prototype,"selectedItems",void 0)
|
|
12318
|
+
const dP=cP.compose({baseName:"tree-view",baseClass:To,template:lP,styles:aP})
|
|
12319
|
+
wi.getOrCreate().withPrefix("nimble").register(dP())
|
|
12320
|
+
const hP=Z`<template slot="unit"></template>`
|
|
12321
|
+
class uP{constructor(t,e,n){this.singular=t,this.plural=e,this.symbol=n}}class pP extends eN{constructor(t,{unitTranslations:e,scaledPrefixText:n}){if(super(t),!e.get("en"))throw new Error('English translations must exist with locale string "en"')
|
|
12322
|
+
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new pP(e,t)}format(t){const e=this.formatter.format(t)
|
|
12321
12323
|
if(""!==this.scaledPrefixText)return`${e} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
|
|
12322
12324
|
return`${e} ${"one"===this.pluralRules.select(t)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(t,e){const n=new Intl.Locale(e??"en"),i=n.language,o=n.region
|
|
12323
|
-
return(o?t.get(`${i}-${o}`):void 0)??t.get(i)??t.get("en")}}const
|
|
12324
|
-
const
|
|
12325
|
-
const
|
|
12326
|
-
class
|
|
12327
|
-
const yP
|
|
12328
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
12329
|
-
const
|
|
12330
|
-
const
|
|
12331
|
-
const
|
|
12332
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
12333
|
-
var
|
|
12334
|
-
function
|
|
12335
|
-
i[t]=[]}return new
|
|
12336
|
-
break}return null!=n&&t.push({name:e,value:n}),t}
|
|
12325
|
+
return(o?t.get(`${i}-${o}`):void 0)??t.get(i)??t.get("en")}}const fP=new Map([["en",new uP("byte","bytes","B")],["fr",new uP("octet","octets","o")],["de",new uP("Byte","Byte","B")],["ja",new uP("バイト","バイト","B")],["zh",new uP("字节","字节","B")]]),mP=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
|
|
12326
|
+
const gP=new class extends oN{constructor(){super(mP.map((([t,e])=>new iN(t,pP.createFactory({unitTranslations:fP,scaledPrefixText:e})))))}},vP=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
|
|
12327
|
+
const bP=new class extends oN{constructor(){super(vP.map((([t,e,n])=>new iN(t,nN.createFactory({style:"unit",unit:e,unitDisplay:n})))))}}
|
|
12328
|
+
class yP extends uN{constructor(){super(),this.binary=!1,this.resolvedUnitScale=bP}binaryChanged(){this.resolvedUnitScale=this.binary?gP:bP}}t([lt({mode:"boolean"})],yP.prototype,"binary",void 0)
|
|
12329
|
+
const wP=yP.compose({baseName:"unit-byte",template:hP})
|
|
12330
|
+
wi.getOrCreate().withPrefix("nimble").register(wP())
|
|
12331
|
+
const xP=[[1e-15,"f"],[1e-12,"p"],[1e-9,"n"],[10**-6,"μ"],[.001,"m"],[.01,"c"],[.1,"d"],[1,""],[1e3,"k"],[10**6,"M"],[10**9,"G"],[10**12,"T"],[10**15,"P"],[10**18,"E"]],CP=new Map([["en",new uP("volt","volts","V")],["fr",new uP("volt","volts","V")],["de",new uP("Volt","Volt","V")],["ja",new uP("ボルト","ボルト","V")],["zh",new uP("伏特","伏特","V")]])
|
|
12332
|
+
const kP=new class extends oN{constructor(){super(xP.map((([t,e])=>new iN(t,pP.createFactory({unitTranslations:CP,scaledPrefixText:e})))))}}
|
|
12333
|
+
const SP=class extends uN{constructor(){super(),this.resolvedUnitScale=kP}}.compose({baseName:"unit-volt",template:hP})
|
|
12334
|
+
wi.getOrCreate().withPrefix("nimble").register(SP())
|
|
12335
|
+
var $P={value:()=>{}}
|
|
12336
|
+
function MP(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t)
|
|
12337
|
+
i[t]=[]}return new _P(i)}function _P(t){this._=t}function EP(t,e){for(var n,i=0,o=t.length;i<o;++i)if((n=t[i]).name===e)return n.value}function IP(t,e,n){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=$P,t=t.slice(0,i).concat(t.slice(i+1))
|
|
12338
|
+
break}return null!=n&&t.push({name:e,value:n}),t}_P.prototype=MP.prototype={constructor:_P,on:function(t,e){var n,i,o=this._,s=(i=o,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
|
|
12337
12339
|
if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
12338
12340
|
return{type:t,name:e}}))),r=-1,a=s.length
|
|
12339
12341
|
if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e)
|
|
12340
|
-
for(;++r<a;)if(n=(t=s[r]).type)o[n]=
|
|
12341
|
-
else if(null==e)for(n in o)o[n]=
|
|
12342
|
-
return this}for(;++r<a;)if((n=(t=s[r]).type)&&(n=
|
|
12342
|
+
for(;++r<a;)if(n=(t=s[r]).type)o[n]=IP(o[n],t.name,e)
|
|
12343
|
+
else if(null==e)for(n in o)o[n]=IP(o[n],t.name,null)
|
|
12344
|
+
return this}for(;++r<a;)if((n=(t=s[r]).type)&&(n=EP(o[n],t.name)))return n},copy:function(){var t={},e=this._
|
|
12343
12345
|
for(var n in e)t[n]=e[n].slice()
|
|
12344
|
-
return new
|
|
12346
|
+
return new _P(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),s=0;s<n;++s)o[s]=arguments[s+2]
|
|
12345
12347
|
if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
12346
12348
|
for(s=0,n=(i=this._[t]).length;s<n;++s)i[s].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
12347
12349
|
for(var i=this._[t],o=0,s=i.length;o<s;++o)i[o].value.apply(e,n)}}
|
|
12348
|
-
var
|
|
12349
|
-
function
|
|
12350
|
-
return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),
|
|
12351
|
-
return n===
|
|
12352
|
-
return(e.local?OP
|
|
12353
|
-
var e}}function
|
|
12354
|
-
function
|
|
12355
|
-
function
|
|
12356
|
-
for(;a<l;++a)(r=e[a])&&(o[a]=r)}function
|
|
12350
|
+
var DP="http://www.w3.org/1999/xhtml",AP={svg:"http://www.w3.org/2000/svg",xhtml:DP,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
12351
|
+
function TP(t){var e=t+="",n=e.indexOf(":")
|
|
12352
|
+
return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),AP.hasOwnProperty(e)?{space:AP[e],local:t}:t}function OP(t){return function(){var e=this.ownerDocument,n=this.namespaceURI
|
|
12353
|
+
return n===DP&&e.documentElement.namespaceURI===DP?e.createElement(t):e.createElementNS(n,t)}}function RP(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function FP(t){var e=TP(t)
|
|
12354
|
+
return(e.local?RP:OP)(e)}function NP(){}function PP(t){return null==t?NP:function(){return this.querySelector(t)}}function LP(){return[]}function zP(t){return null==t?LP:function(){return this.querySelectorAll(t)}}function VP(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e)
|
|
12355
|
+
var e}}function HP(t){return function(){return this.matches(t)}}function BP(t){return function(e){return e.matches(t)}}var qP=Array.prototype.find
|
|
12356
|
+
function UP(){return this.firstElementChild}var jP=Array.prototype.filter
|
|
12357
|
+
function WP(){return Array.from(this.children)}function ZP(t){return new Array(t.length)}function GP(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function KP(t,e,n,i,o,s){for(var r,a=0,l=e.length,c=s.length;a<c;++a)(r=e[a])?(r.__data__=s[a],i[a]=r):n[a]=new GP(t,s[a])
|
|
12358
|
+
for(;a<l;++a)(r=e[a])&&(o[a]=r)}function JP(t,e,n,i,o,s,r){var a,l,c,d=new Map,h=e.length,u=s.length,p=new Array(h)
|
|
12357
12359
|
for(a=0;a<h;++a)(l=e[a])&&(p[a]=c=r.call(l,l.__data__,a,e)+"",d.has(c)?o[a]=l:d.set(c,l))
|
|
12358
|
-
for(a=0;a<u;++a)c=r.call(t,s[a],a,s)+"",(l=d.get(c))?(i[a]=l,l.__data__=s[a],d.delete(c)):n[a]=new
|
|
12359
|
-
for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(o[a]=l)}function
|
|
12360
|
-
null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function
|
|
12361
|
-
null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function
|
|
12362
|
-
null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function
|
|
12363
|
-
null==n?delete this[t]:this[t]=n}}function
|
|
12364
|
-
this.textContent=null==e?"":e}}function
|
|
12365
|
-
this.innerHTML=null==e?"":e}}function
|
|
12366
|
-
t&&t.removeChild(this)}function
|
|
12367
|
-
return e?e.insertBefore(t,this.nextSibling):t}function
|
|
12368
|
-
return e?e.insertBefore(t,this.nextSibling):t}function
|
|
12369
|
-
if(e){for(var n,i=0,o=-1,s=e.length;i<s;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?e.length=o:delete this.__on}}}function
|
|
12360
|
+
for(a=0;a<u;++a)c=r.call(t,s[a],a,s)+"",(l=d.get(c))?(i[a]=l,l.__data__=s[a],d.delete(c)):n[a]=new GP(t,s[a])
|
|
12361
|
+
for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(o[a]=l)}function XP(t){return t.__data__}function YP(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function QP(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function tL(t){return function(){this.removeAttribute(t)}}function eL(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nL(t,e){return function(){this.setAttribute(t,e)}}function iL(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function oL(t,e){return function(){var n=e.apply(this,arguments)
|
|
12362
|
+
null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function sL(t,e){return function(){var n=e.apply(this,arguments)
|
|
12363
|
+
null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function rL(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function aL(t){return function(){this.style.removeProperty(t)}}function lL(t,e,n){return function(){this.style.setProperty(t,e,n)}}function cL(t,e,n){return function(){var i=e.apply(this,arguments)
|
|
12364
|
+
null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function dL(t,e){return t.style.getPropertyValue(e)||rL(t).getComputedStyle(t,null).getPropertyValue(e)}function hL(t){return function(){delete this[t]}}function uL(t,e){return function(){this[t]=e}}function pL(t,e){return function(){var n=e.apply(this,arguments)
|
|
12365
|
+
null==n?delete this[t]:this[t]=n}}function fL(t){return t.trim().split(/^|\s+/)}function mL(t){return t.classList||new gL(t)}function gL(t){this._node=t,this._names=fL(t.getAttribute("class")||"")}function vL(t,e){for(var n=mL(t),i=-1,o=e.length;++i<o;)n.add(e[i])}function bL(t,e){for(var n=mL(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}function yL(t){return function(){vL(this,t)}}function wL(t){return function(){bL(this,t)}}function xL(t,e){return function(){(e.apply(this,arguments)?vL:bL)(this,t)}}function CL(){this.textContent=""}function kL(t){return function(){this.textContent=t}}function SL(t){return function(){var e=t.apply(this,arguments)
|
|
12366
|
+
this.textContent=null==e?"":e}}function $L(){this.innerHTML=""}function ML(t){return function(){this.innerHTML=t}}function _L(t){return function(){var e=t.apply(this,arguments)
|
|
12367
|
+
this.innerHTML=null==e?"":e}}function EL(){this.nextSibling&&this.parentNode.appendChild(this)}function IL(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function DL(){return null}function AL(){var t=this.parentNode
|
|
12368
|
+
t&&t.removeChild(this)}function TL(){var t=this.cloneNode(!1),e=this.parentNode
|
|
12369
|
+
return e?e.insertBefore(t,this.nextSibling):t}function OL(){var t=this.cloneNode(!0),e=this.parentNode
|
|
12370
|
+
return e?e.insertBefore(t,this.nextSibling):t}function RL(t){return function(){var e=this.__on
|
|
12371
|
+
if(e){for(var n,i=0,o=-1,s=e.length;i<s;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?e.length=o:delete this.__on}}}function FL(t,e,n){return function(){var i,o=this.__on,s=function(t){return function(e){t.call(this,e,this.__data__)}}(e)
|
|
12370
12372
|
if(o)for(var r=0,a=o.length;r<a;++r)if((i=o[r]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),void(i.value=e)
|
|
12371
|
-
this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},o?o.push(i):this.__on=[i]}}function
|
|
12372
|
-
"function"==typeof o?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function
|
|
12373
|
+
this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},o?o.push(i):this.__on=[i]}}function NL(t,e,n){var i=rL(t),o=i.CustomEvent
|
|
12374
|
+
"function"==typeof o?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function PL(t,e){return function(){return NL(this,t,e)}}function LL(t,e){return function(){return NL(this,t,e.apply(this,arguments))}}GP.prototype={constructor:GP,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},gL.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t)
|
|
12373
12375
|
e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}}
|
|
12374
|
-
var
|
|
12375
|
-
function
|
|
12376
|
+
var zL=[null]
|
|
12377
|
+
function VL(t,e){this._groups=t,this._parents=e}function HL(){return new VL([[document.documentElement]],zL)}function BL(t){return"string"==typeof t?new VL([[document.querySelector(t)]],[document.documentElement]):new VL([[t]],zL)}function qL(t,e){if(t=function(t){let e
|
|
12376
12378
|
for(;e=t.sourceEvent;)t=e
|
|
12377
12379
|
return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e
|
|
12378
12380
|
if(n.createSVGPoint){var i=n.createSVGPoint()
|
|
12379
12381
|
return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect()
|
|
12380
|
-
return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}
|
|
12382
|
+
return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}VL.prototype=HL.prototype={constructor:VL,select:function(t){"function"!=typeof t&&(t=PP(t))
|
|
12381
12383
|
for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var s,r,a=e[o],l=a.length,c=i[o]=new Array(l),d=0;d<l;++d)(s=a[d])&&(r=t.call(s,s.__data__,d,a))&&("__data__"in s&&(r.__data__=s.__data__),c[d]=r)
|
|
12382
|
-
return new
|
|
12384
|
+
return new VL(i,this._parents)},selectAll:function(t){t="function"==typeof t?VP(t):zP(t)
|
|
12383
12385
|
for(var e=this._groups,n=e.length,i=[],o=[],s=0;s<n;++s)for(var r,a=e[s],l=a.length,c=0;c<l;++c)(r=a[c])&&(i.push(t.call(r,r.__data__,c,a)),o.push(r))
|
|
12384
|
-
return new
|
|
12386
|
+
return new VL(i,o)},selectChild:function(t){return this.select(null==t?UP:function(t){return function(){return qP.call(this.children,t)}}("function"==typeof t?t:BP(t)))},selectChildren:function(t){return this.selectAll(null==t?WP:function(t){return function(){return jP.call(this.children,t)}}("function"==typeof t?t:BP(t)))},filter:function(t){"function"!=typeof t&&(t=HP(t))
|
|
12385
12387
|
for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var s,r=e[o],a=r.length,l=i[o]=[],c=0;c<a;++c)(s=r[c])&&t.call(s,s.__data__,c,r)&&l.push(s)
|
|
12386
|
-
return new
|
|
12387
|
-
var n,i=e?KP
|
|
12388
|
+
return new VL(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,XP)
|
|
12389
|
+
var n,i=e?JP:KP,o=this._parents,s=this._groups
|
|
12388
12390
|
"function"!=typeof t&&(n=t,t=function(){return n})
|
|
12389
|
-
for(var r=s.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=o[d],u=s[d],p=u.length,f=
|
|
12391
|
+
for(var r=s.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=o[d],u=s[d],p=u.length,f=YP(t.call(h,h&&h.__data__,d,o)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
|
|
12390
12392
|
i(h,u,g,v,c[d]=new Array(p),f,e)
|
|
12391
|
-
for(var b,y,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(y=v[x])&&++x<m;);b._next=y||null}}return(a=new
|
|
12393
|
+
for(var b,y,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(y=v[x])&&++x<m;);b._next=y||null}}return(a=new VL(a,o))._enter=l,a._exit=c,a},enter:function(){return new VL(this._enter||this._groups.map(ZP),this._parents)},exit:function(){return new VL(this._exit||this._groups.map(ZP),this._parents)},join:function(t,e,n){var i=this.enter(),o=this,s=this.exit()
|
|
12392
12394
|
return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==n?s.remove():n(s),i&&o?i.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,o=n.length,s=i.length,r=Math.min(o,s),a=new Array(o),l=0;l<r;++l)for(var c,d=n[l],h=i[l],u=d.length,p=a[l]=new Array(u),f=0;f<u;++f)(c=d[f]||h[f])&&(p[f]=c)
|
|
12393
12395
|
for(;l<o;++l)a[l]=n[l]
|
|
12394
|
-
return new
|
|
12395
|
-
return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=
|
|
12396
|
+
return new VL(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,o=t[e],s=o.length-1,r=o[s];--s>=0;)(i=o[s])&&(r&&4^i.compareDocumentPosition(r)&&r.parentNode.insertBefore(i,r),r=i)
|
|
12397
|
+
return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=QP)
|
|
12396
12398
|
for(var n=this._groups,i=n.length,o=new Array(i),s=0;s<i;++s){for(var r,a=n[s],l=a.length,c=o[s]=new Array(l),d=0;d<l;++d)(r=a[d])&&(c[d]=r)
|
|
12397
|
-
c.sort(e)}return new
|
|
12399
|
+
c.sort(e)}return new VL(o,this._parents).order()},call:function(){var t=arguments[0]
|
|
12398
12400
|
return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,s=i.length;o<s;++o){var r=i[o]
|
|
12399
12401
|
if(r)return r}return null},size:function(){let t=0
|
|
12400
12402
|
for(const e of this)++t
|
|
12401
12403
|
return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var o,s=e[n],r=0,a=s.length;r<a;++r)(o=s[r])&&t.call(o,o.__data__,r,s)
|
|
12402
|
-
return this},attr:function(t,e){var n=
|
|
12404
|
+
return this},attr:function(t,e){var n=TP(t)
|
|
12403
12405
|
if(arguments.length<2){var i=this.node()
|
|
12404
|
-
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?tL:
|
|
12405
|
-
if(arguments.length<2){for(var i=
|
|
12406
|
-
return!0}return this.each(("function"==typeof e?
|
|
12407
|
-
return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:
|
|
12408
|
-
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
12406
|
+
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?eL:tL:"function"==typeof e?n.local?sL:oL:n.local?iL:nL)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?aL:"function"==typeof e?cL:lL)(t,e,null==n?"":n)):dL(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?hL:"function"==typeof e?pL:uL)(t,e)):this.node()[t]},classed:function(t,e){var n=fL(t+"")
|
|
12407
|
+
if(arguments.length<2){for(var i=mL(this.node()),o=-1,s=n.length;++o<s;)if(!i.contains(n[o]))return!1
|
|
12408
|
+
return!0}return this.each(("function"==typeof e?xL:e?yL:wL)(n,e))},text:function(t){return arguments.length?this.each(null==t?CL:("function"==typeof t?SL:kL)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?$L:("function"==typeof t?_L:ML)(t)):this.node().innerHTML},raise:function(){return this.each(EL)},lower:function(){return this.each(IL)},append:function(t){var e="function"==typeof t?t:FP(t)
|
|
12409
|
+
return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:FP(t),i=null==e?DL:"function"==typeof e?e:PP(e)
|
|
12410
|
+
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(AL)},clone:function(t){return this.select(t?OL:TL)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,o,s=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
|
|
12409
12411
|
return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),r=s.length
|
|
12410
|
-
if(!(arguments.length<2)){for(a=e?RL
|
|
12412
|
+
if(!(arguments.length<2)){for(a=e?FL:RL,i=0;i<r;++i)this.each(a(s[i],e,n))
|
|
12411
12413
|
return this}var a=this.node().__on
|
|
12412
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((o=s[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?PL
|
|
12413
|
-
const
|
|
12414
|
-
function
|
|
12414
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((o=s[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?LL:PL)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,o=t[e],s=0,r=o.length;s<r;++s)(i=o[s])&&(yield i)}}
|
|
12415
|
+
const UL={capture:!0,passive:!1}
|
|
12416
|
+
function jL(t){t.preventDefault(),t.stopImmediatePropagation()}function WL(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ZL(t,e){var n=Object.create(t.prototype)
|
|
12415
12417
|
for(var i in e)n[i]=e[i]
|
|
12416
|
-
return n}function
|
|
12417
|
-
function
|
|
12418
|
-
return t=(t+"").trim().toLowerCase(),(e=
|
|
12419
|
-
var o}function
|
|
12420
|
-
return`${1===t?"rgb(":"rgba("}${
|
|
12421
|
-
if(t instanceof
|
|
12422
|
-
if(t instanceof
|
|
12418
|
+
return n}function GL(){}var KL=.7,JL=1/KL,XL="\\s*([+-]?\\d+)\\s*",YL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",QL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tz=/^#([0-9a-f]{3,8})$/,ez=new RegExp(`^rgb\\(${XL},${XL},${XL}\\)$`),nz=new RegExp(`^rgb\\(${QL},${QL},${QL}\\)$`),iz=new RegExp(`^rgba\\(${XL},${XL},${XL},${YL}\\)$`),oz=new RegExp(`^rgba\\(${QL},${QL},${QL},${YL}\\)$`),sz=new RegExp(`^hsl\\(${YL},${QL},${QL}\\)$`),rz=new RegExp(`^hsla\\(${YL},${QL},${QL},${YL}\\)$`),az={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}
|
|
12419
|
+
function lz(){return this.rgb().formatHex()}function cz(){return this.rgb().formatRgb()}function dz(t){var e,n
|
|
12420
|
+
return t=(t+"").trim().toLowerCase(),(e=tz.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?hz(e):3===n?new fz(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?uz(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?uz(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ez.exec(t))?new fz(e[1],e[2],e[3],1):(e=nz.exec(t))?new fz(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=iz.exec(t))?uz(e[1],e[2],e[3],e[4]):(e=oz.exec(t))?uz(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=sz.exec(t))?wz(e[1],e[2]/100,e[3]/100,1):(e=rz.exec(t))?wz(e[1],e[2]/100,e[3]/100,e[4]):az.hasOwnProperty(t)?hz(az[t]):"transparent"===t?new fz(NaN,NaN,NaN,0):null}function hz(t){return new fz(t>>16&255,t>>8&255,255&t,1)}function uz(t,e,n,i){return i<=0&&(t=e=n=NaN),new fz(t,e,n,i)}function pz(t,e,n,i){return 1===arguments.length?((o=t)instanceof GL||(o=dz(o)),o?new fz((o=o.rgb()).r,o.g,o.b,o.opacity):new fz):new fz(t,e,n,null==i?1:i)
|
|
12421
|
+
var o}function fz(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function mz(){return`#${yz(this.r)}${yz(this.g)}${yz(this.b)}`}function gz(){const t=vz(this.opacity)
|
|
12422
|
+
return`${1===t?"rgb(":"rgba("}${bz(this.r)}, ${bz(this.g)}, ${bz(this.b)}${1===t?")":`, ${t})`}`}function vz(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function bz(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yz(t){return((t=bz(t))<16?"0":"")+t.toString(16)}function wz(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Cz(t,e,n,i)}function xz(t){if(t instanceof Cz)return new Cz(t.h,t.s,t.l,t.opacity)
|
|
12423
|
+
if(t instanceof GL||(t=dz(t)),!t)return new Cz
|
|
12424
|
+
if(t instanceof Cz)return t
|
|
12423
12425
|
var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),s=Math.max(e,n,i),r=NaN,a=s-o,l=(s+o)/2
|
|
12424
|
-
return a?(r=e===s?(n-i)/a+6*(n<i):n===s?(i-e)/a+2:(e-n)/a+4,a/=l<.5?s+o:2-s-o,r*=60):a=l>0&&l<1?0:r,new
|
|
12425
|
-
return new
|
|
12426
|
-
return`${1===t?"hsl(":"hsla("}${
|
|
12427
|
-
var
|
|
12428
|
-
function
|
|
12429
|
-
return n?function(t,e){return function(n){return t+n*e}}(t,n)
|
|
12430
|
-
function i(t,e){var i=n((t=
|
|
12426
|
+
return a?(r=e===s?(n-i)/a+6*(n<i):n===s?(i-e)/a+2:(e-n)/a+4,a/=l<.5?s+o:2-s-o,r*=60):a=l>0&&l<1?0:r,new Cz(r,a,l,t.opacity)}function Cz(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function kz(t){return(t=(t||0)%360)<0?t+360:t}function Sz(t){return Math.max(0,Math.min(1,t||0))}function $z(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}WL(GL,dz,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:lz,formatHex:lz,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return xz(this).formatHsl()},formatRgb:cz,toString:cz}),WL(fz,pz,ZL(GL,{brighter(t){return t=null==t?JL:Math.pow(JL,t),new fz(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?KL:Math.pow(KL,t),new fz(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new fz(bz(this.r),bz(this.g),bz(this.b),vz(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:mz,formatHex:mz,formatHex8:function(){return`#${yz(this.r)}${yz(this.g)}${yz(this.b)}${yz(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:gz,toString:gz})),WL(Cz,(function(t,e,n,i){return 1===arguments.length?xz(t):new Cz(t,e,n,null==i?1:i)}),ZL(GL,{brighter(t){return t=null==t?JL:Math.pow(JL,t),new Cz(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?KL:Math.pow(KL,t),new Cz(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i
|
|
12427
|
+
return new fz($z(t>=240?t-240:t+120,o,i),$z(t,o,i),$z(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new Cz(kz(this.h),Sz(this.s),Sz(this.l),vz(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 t=vz(this.opacity)
|
|
12428
|
+
return`${1===t?"hsl(":"hsla("}${kz(this.h)}, ${100*Sz(this.s)}%, ${100*Sz(this.l)}%${1===t?")":`, ${t})`}`}}))
|
|
12429
|
+
var Mz=t=>()=>t
|
|
12430
|
+
function _z(t){return 1==(t=+t)?Ez:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Mz(isNaN(e)?n:e)}}function Ez(t,e){var n=e-t
|
|
12431
|
+
return n?function(t,e){return function(n){return t+n*e}}(t,n):Mz(isNaN(t)?e:t)}var Iz=function t(e){var n=_z(e)
|
|
12432
|
+
function i(t,e){var i=n((t=pz(t)).r,(e=pz(e)).r),o=n(t.g,e.g),s=n(t.b,e.b),r=Ez(t.opacity,e.opacity)
|
|
12431
12433
|
return function(e){return t.r=i(e),t.g=o(e),t.b=s(e),t.opacity=r(e),t+""}}return i.gamma=t,i}(1)
|
|
12432
|
-
function
|
|
12434
|
+
function Dz(t,e){e||(e=[])
|
|
12433
12435
|
var n,i=t?Math.min(e.length,t.length):0,o=e.slice()
|
|
12434
12436
|
return function(s){for(n=0;n<i;++n)o[n]=t[n]*(1-s)+e[n]*s
|
|
12435
|
-
return o}}function
|
|
12436
|
-
for(n=0;n<o;++n)s[n]=
|
|
12437
|
+
return o}}function Az(t,e){var n,i=e?e.length:0,o=t?Math.min(i,t.length):0,s=new Array(o),r=new Array(i)
|
|
12438
|
+
for(n=0;n<o;++n)s[n]=Lz(t[n],e[n])
|
|
12437
12439
|
for(;n<i;++n)r[n]=e[n]
|
|
12438
12440
|
return function(t){for(n=0;n<o;++n)r[n]=s[n](t)
|
|
12439
|
-
return r}}function
|
|
12440
|
-
return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function
|
|
12441
|
-
for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=
|
|
12441
|
+
return r}}function Tz(t,e){var n=new Date
|
|
12442
|
+
return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Oz(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Rz(t,e){var n,i={},o={}
|
|
12443
|
+
for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=Lz(t[n],e[n]):o[n]=e[n]
|
|
12442
12444
|
return function(t){for(n in i)o[n]=i[n](t)
|
|
12443
|
-
return o}}var
|
|
12444
|
-
function
|
|
12445
|
-
for(t+="",e+="";(n=
|
|
12445
|
+
return o}}var Fz=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Nz=new RegExp(Fz.source,"g")
|
|
12446
|
+
function Pz(t,e){var n,i,o,s=Fz.lastIndex=Nz.lastIndex=0,r=-1,a=[],l=[]
|
|
12447
|
+
for(t+="",e+="";(n=Fz.exec(t))&&(i=Nz.exec(e));)(o=i.index)>s&&(o=e.slice(s,o),a[r]?a[r]+=o:a[++r]=o),(n=n[0])===(i=i[0])?a[r]?a[r]+=i:a[++r]=i:(a[++r]=null,l.push({i:r,x:Oz(n,i)})),s=Nz.lastIndex
|
|
12446
12448
|
return s<e.length&&(o=e.slice(s),a[r]?a[r]+=o:a[++r]=o),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t)
|
|
12447
|
-
return a.join("")})}function
|
|
12448
|
-
return null==e||"boolean"===o
|
|
12449
|
-
function
|
|
12450
|
-
return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:o,translateY:s,rotate:Math.atan2(e,t)*
|
|
12449
|
+
return a.join("")})}function Lz(t,e){var n,i,o=typeof e
|
|
12450
|
+
return null==e||"boolean"===o?Mz(e):("number"===o?Oz:"string"===o?(n=dz(e))?(e=n,Iz):Pz:e instanceof dz?Iz:e instanceof Date?Tz:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?Az:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Rz:Oz:Dz))(t,e)}function zz(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Vz,Hz=180/Math.PI,Bz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
12451
|
+
function qz(t,e,n,i,o,s){var r,a,l
|
|
12452
|
+
return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:o,translateY:s,rotate:Math.atan2(e,t)*Hz,skewX:Math.atan(l)*Hz,scaleX:r,scaleY:a}}function Uz(t,e,n,i){function o(t){return t.length?t.pop()+" ":""}return function(s,r){var a=[],l=[]
|
|
12451
12453
|
return s=t(s),r=t(r),function(t,i,o,s,r,a){if(t!==o||i!==s){var l=r.push("translate(",null,e,null,n)
|
|
12452
|
-
a.push({i:l-4,x:
|
|
12453
|
-
r.push({i:a-4,x:
|
|
12454
|
-
return a.join("")}}}var Uz
|
|
12455
|
-
return e.isIdentity?
|
|
12456
|
-
function
|
|
12454
|
+
a.push({i:l-4,x:Oz(t,o)},{i:l-2,x:Oz(i,s)})}else(o||s)&&r.push("translate("+o+e+s+n)}(s.translateX,s.translateY,r.translateX,r.translateY,a,l),function(t,e,n,s){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),s.push({i:n.push(o(n)+"rotate(",null,i)-2,x:Oz(t,e)})):e&&n.push(o(n)+"rotate("+e+i)}(s.rotate,r.rotate,a,l),function(t,e,n,s){t!==e?s.push({i:n.push(o(n)+"skewX(",null,i)-2,x:Oz(t,e)}):e&&n.push(o(n)+"skewX("+e+i)}(s.skewX,r.skewX,a,l),function(t,e,n,i,s,r){if(t!==n||e!==i){var a=s.push(o(s)+"scale(",null,",",null,")")
|
|
12455
|
+
r.push({i:a-4,x:Oz(t,n)},{i:a-2,x:Oz(e,i)})}else 1===n&&1===i||s.push(o(s)+"scale("+n+","+i+")")}(s.scaleX,s.scaleY,r.scaleX,r.scaleY,a,l),s=r=null,function(t){for(var e,n=-1,i=l.length;++n<i;)a[(e=l[n]).i]=e.x(t)
|
|
12456
|
+
return a.join("")}}}var jz=Uz((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")
|
|
12457
|
+
return e.isIdentity?Bz:qz(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Wz=Uz((function(t){return null==t?Bz:(Vz||(Vz=document.createElementNS("http://www.w3.org/2000/svg","g")),Vz.setAttribute("transform",t),(t=Vz.transform.baseVal.consolidate())?qz((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Bz)}),", ",")",")")
|
|
12458
|
+
function Zz(t){return((t=Math.exp(t))+1/t)/2}var Gz,Kz,Jz=function t(e,n,i){function o(t,o){var s,r,a=t[0],l=t[1],c=t[2],d=o[0],h=o[1],u=o[2],p=d-a,f=h-l,m=p*p+f*f
|
|
12457
12459
|
if(m<1e-12)r=Math.log(u/c)/e,s=function(t){return[a+t*p,l+t*f,c*Math.exp(e*t*r)]}
|
|
12458
12460
|
else{var g=Math.sqrt(m),v=(u*u-c*c+i*m)/(2*c*n*g),b=(u*u-c*c-i*m)/(2*u*n*g),y=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(b*b+1)-b)
|
|
12459
|
-
r=(w-y)/e,s=function(t){var i,o=t*r,s=
|
|
12460
|
-
return[a+d*p,l+d*f,c*s/
|
|
12461
|
-
return t(n,i,i*i)},o}(Math.SQRT2,2,4),
|
|
12462
|
-
function
|
|
12463
|
-
return i.restart(t,e,n),i}function
|
|
12464
|
-
try{!function(){
|
|
12465
|
-
for(var t,e=
|
|
12466
|
-
for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:
|
|
12467
|
-
|
|
12468
|
-
e>
|
|
12469
|
-
return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}
|
|
12470
|
-
n=(null==n?
|
|
12471
|
-
var
|
|
12472
|
-
function
|
|
12461
|
+
r=(w-y)/e,s=function(t){var i,o=t*r,s=Zz(y),d=c/(n*g)*(s*(i=e*o+y,((i=Math.exp(2*i))-1)/(i+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y))
|
|
12462
|
+
return[a+d*p,l+d*f,c*s/Zz(e*o+y)]}}return s.duration=1e3*r*e/Math.SQRT2,s}return o.rho=function(e){var n=Math.max(.001,+e),i=n*n
|
|
12463
|
+
return t(n,i,i*i)},o}(Math.SQRT2,2,4),Xz=0,Yz=0,Qz=0,tV=1e3,eV=0,nV=0,iV=0,oV="object"==typeof performance&&performance.now?performance:Date,sV="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)}
|
|
12464
|
+
function rV(){return nV||(sV(aV),nV=oV.now()+iV)}function aV(){nV=0}function lV(){this._call=this._time=this._next=null}function cV(t,e,n){var i=new lV
|
|
12465
|
+
return i.restart(t,e,n),i}function dV(){nV=(eV=oV.now())+iV,Xz=Yz=0
|
|
12466
|
+
try{!function(){rV(),++Xz
|
|
12467
|
+
for(var t,e=Gz;e;)(t=nV-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Xz}()}finally{Xz=0,function(){var t,e,n=Gz,i=1/0
|
|
12468
|
+
for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Gz=e)
|
|
12469
|
+
Kz=t,uV(i)}(),nV=0}}function hV(){var t=oV.now(),e=t-eV
|
|
12470
|
+
e>tV&&(iV-=e,eV=t)}function uV(t){Xz||(Yz&&(Yz=clearTimeout(Yz)),t-nV>24?(t<1/0&&(Yz=setTimeout(dV,t-oV.now()-iV)),Qz&&(Qz=clearInterval(Qz))):(Qz||(eV=oV.now(),Qz=setInterval(hV,tV)),Xz=1,sV(dV)))}function pV(t,e,n){var i=new lV
|
|
12471
|
+
return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}lV.prototype=cV.prototype={constructor:lV,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function")
|
|
12472
|
+
n=(null==n?rV():+n)+(null==e?0:+e),this._next||Kz===this||(Kz?Kz._next=this:Gz=this,Kz=this),this._call=t,this._time=n,uV()},stop:function(){this._call&&(this._call=null,this._time=1/0,uV())}}
|
|
12473
|
+
var fV=MP("start","end","cancel","interrupt"),mV=[],gV=0,vV=1,bV=2,yV=3,wV=4,xV=5,CV=6
|
|
12474
|
+
function kV(t,e,n,i,o,s){var r=t.__transition
|
|
12473
12475
|
if(r){if(n in r)return}else t.__transition={}
|
|
12474
12476
|
!function(t,e,n){var i,o=t.__transition
|
|
12475
|
-
function s(t){n.state=
|
|
12476
|
-
if(n.state!==
|
|
12477
|
-
for(c in o)if((u=o[c]).name===n.name){if(u.state===
|
|
12478
|
-
u.state===
|
|
12479
|
-
i.length=d+1}}function a(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=
|
|
12480
|
-
n.state===
|
|
12481
|
-
delete t.__transition}o[e]=n,n.timer=
|
|
12482
|
-
if(n.state>
|
|
12483
|
-
return n}function
|
|
12484
|
-
if(n.state>
|
|
12485
|
-
return n}function
|
|
12477
|
+
function s(t){n.state=vV,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)}function r(s){var c,d,h,u
|
|
12478
|
+
if(n.state!==vV)return l()
|
|
12479
|
+
for(c in o)if((u=o[c]).name===n.name){if(u.state===yV)return pV(r)
|
|
12480
|
+
u.state===wV?(u.state=CV,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[c]):+c<e&&(u.state=CV,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[c])}if(pV((function(){n.state===yV&&(n.state=wV,n.timer.restart(a,n.delay,n.time),a(s))})),n.state=bV,n.on.call("start",t,t.__data__,n.index,n.group),n.state===bV){for(n.state=yV,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=u)
|
|
12481
|
+
i.length=d+1}}function a(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=xV,1),s=-1,r=i.length;++s<r;)i[s].call(t,o)
|
|
12482
|
+
n.state===xV&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=CV,n.timer.stop(),delete o[e],o)return
|
|
12483
|
+
delete t.__transition}o[e]=n,n.timer=cV(s,0,n.time)}(t,n,{name:e,index:i,group:o,on:fV,tween:mV,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:gV})}function SV(t,e){var n=MV(t,e)
|
|
12484
|
+
if(n.state>gV)throw new Error("too late; already scheduled")
|
|
12485
|
+
return n}function $V(t,e){var n=MV(t,e)
|
|
12486
|
+
if(n.state>yV)throw new Error("too late; already running")
|
|
12487
|
+
return n}function MV(t,e){var n=t.__transition
|
|
12486
12488
|
if(!n||!(n=n[e]))throw new Error("transition not found")
|
|
12487
|
-
return n}function
|
|
12488
|
-
if(s){for(o in e=null==e?null:e+"",s)(n=s[o]).name===e?(i=n.state>
|
|
12489
|
-
r&&delete t.__transition}}function
|
|
12490
|
-
return function(){var o
|
|
12489
|
+
return n}function _V(t,e){var n,i,o,s=t.__transition,r=!0
|
|
12490
|
+
if(s){for(o in e=null==e?null:e+"",s)(n=s[o]).name===e?(i=n.state>bV&&n.state<xV,n.state=CV,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete s[o]):r=!1
|
|
12491
|
+
r&&delete t.__transition}}function EV(t,e){var n,i
|
|
12492
|
+
return function(){var o=$V(this,t),s=o.tween
|
|
12491
12493
|
if(s!==n)for(var r=0,a=(i=n=s).length;r<a;++r)if(i[r].name===e){(i=i.slice()).splice(r,1)
|
|
12492
|
-
break}o.tween=i}}function
|
|
12494
|
+
break}o.tween=i}}function IV(t,e,n){var i,o
|
|
12493
12495
|
if("function"!=typeof n)throw new Error
|
|
12494
|
-
return function(){var s
|
|
12496
|
+
return function(){var s=$V(this,t),r=s.tween
|
|
12495
12497
|
if(r!==i){o=(i=r).slice()
|
|
12496
12498
|
for(var a={name:e,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===e){o[l]=a
|
|
12497
|
-
break}l===c&&o.push(a)}s.tween=o}}function
|
|
12498
|
-
return t.each((function(){var t
|
|
12499
|
-
return("number"==typeof e?
|
|
12499
|
+
break}l===c&&o.push(a)}s.tween=o}}function DV(t,e,n){var i=t._id
|
|
12500
|
+
return t.each((function(){var t=$V(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return MV(t,i).value[e]}}function AV(t,e){var n
|
|
12501
|
+
return("number"==typeof e?Oz:e instanceof dz?Iz:(n=dz(e))?(e=n,Iz):Pz)(t,e)}function TV(t){return function(){this.removeAttribute(t)}}function OV(t){return function(){this.removeAttributeNS(t.space,t.local)}}function RV(t,e,n){var i,o,s=n+""
|
|
12500
12502
|
return function(){var r=this.getAttribute(t)
|
|
12501
|
-
return r===s?null:r===i?o:o=e(i=r,n)}}function
|
|
12503
|
+
return r===s?null:r===i?o:o=e(i=r,n)}}function FV(t,e,n){var i,o,s=n+""
|
|
12502
12504
|
return function(){var r=this.getAttributeNS(t.space,t.local)
|
|
12503
|
-
return r===s?null:r===i?o:o=e(i=r,n)}}function
|
|
12505
|
+
return r===s?null:r===i?o:o=e(i=r,n)}}function NV(t,e,n){var i,o,s
|
|
12504
12506
|
return function(){var r,a,l=n(this)
|
|
12505
12507
|
if(null!=l)return(r=this.getAttribute(t))===(a=l+"")?null:r===i&&a===o?s:(o=a,s=e(i=r,l))
|
|
12506
|
-
this.removeAttribute(t)}}function
|
|
12508
|
+
this.removeAttribute(t)}}function PV(t,e,n){var i,o,s
|
|
12507
12509
|
return function(){var r,a,l=n(this)
|
|
12508
12510
|
if(null!=l)return(r=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:r===i&&a===o?s:(o=a,s=e(i=r,l))
|
|
12509
|
-
this.removeAttributeNS(t.space,t.local)}}function
|
|
12511
|
+
this.removeAttributeNS(t.space,t.local)}}function LV(t,e){var n,i
|
|
12510
12512
|
function o(){var o=e.apply(this,arguments)
|
|
12511
|
-
return o!==i&&(n=(i=o)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,o)),n}return o._value=e,o}function
|
|
12513
|
+
return o!==i&&(n=(i=o)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,o)),n}return o._value=e,o}function zV(t,e){var n,i
|
|
12512
12514
|
function o(){var o=e.apply(this,arguments)
|
|
12513
|
-
return o!==i&&(n=(i=o)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,o)),n}return o._value=e,o}function
|
|
12514
|
-
function
|
|
12515
|
-
function
|
|
12516
|
-
|
|
12517
|
-
"function"!=typeof t&&(t=
|
|
12518
|
-
for(var i=this._groups,o=i.length,s=new Array(o),r=0;r<o;++r)for(var a,l,c=i[r],d=c.length,h=s[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=t.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,
|
|
12519
|
-
return new
|
|
12520
|
-
"function"!=typeof t&&(t=
|
|
12521
|
-
for(var i=this._groups,o=i.length,s=[],r=[],a=0;a<o;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=t.call(l,l.__data__,h,c),f
|
|
12522
|
-
s.push(p),r.push(l)}return new
|
|
12515
|
+
return o!==i&&(n=(i=o)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,o)),n}return o._value=e,o}function VV(t,e){return function(){SV(this,t).delay=+e.apply(this,arguments)}}function HV(t,e){return e=+e,function(){SV(this,t).delay=e}}function BV(t,e){return function(){$V(this,t).duration=+e.apply(this,arguments)}}function qV(t,e){return e=+e,function(){$V(this,t).duration=e}}var UV=HL.prototype.constructor
|
|
12516
|
+
function jV(t){return function(){this.style.removeProperty(t)}}var WV=0
|
|
12517
|
+
function ZV(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function GV(){return++WV}var KV=HL.prototype
|
|
12518
|
+
ZV.prototype={constructor:ZV,select:function(t){var e=this._name,n=this._id
|
|
12519
|
+
"function"!=typeof t&&(t=PP(t))
|
|
12520
|
+
for(var i=this._groups,o=i.length,s=new Array(o),r=0;r<o;++r)for(var a,l,c=i[r],d=c.length,h=s[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=t.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,kV(h[u],e,n,u,h,MV(a,n)))
|
|
12521
|
+
return new ZV(s,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id
|
|
12522
|
+
"function"!=typeof t&&(t=zP(t))
|
|
12523
|
+
for(var i=this._groups,o=i.length,s=[],r=[],a=0;a<o;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=t.call(l,l.__data__,h,c),f=MV(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&kV(u,e,n,m,p,f)
|
|
12524
|
+
s.push(p),r.push(l)}return new ZV(s,r,e,n)},selectChild:KV.selectChild,selectChildren:KV.selectChildren,filter:function(t){"function"!=typeof t&&(t=HP(t))
|
|
12523
12525
|
for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var s,r=e[o],a=r.length,l=i[o]=[],c=0;c<a;++c)(s=r[c])&&t.call(s,s.__data__,c,r)&&l.push(s)
|
|
12524
|
-
return new
|
|
12526
|
+
return new ZV(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error
|
|
12525
12527
|
for(var e=this._groups,n=t._groups,i=e.length,o=n.length,s=Math.min(i,o),r=new Array(i),a=0;a<s;++a)for(var l,c=e[a],d=n[a],h=c.length,u=r[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
|
|
12526
12528
|
for(;a<i;++a)r[a]=e[a]
|
|
12527
|
-
return new
|
|
12528
|
-
|
|
12529
|
-
return arguments.length<2
|
|
12530
|
-
return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?
|
|
12529
|
+
return new ZV(r,this._parents,this._name,this._id)},selection:function(){return new UV(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=GV(),i=this._groups,o=i.length,s=0;s<o;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=MV(r,e)
|
|
12530
|
+
kV(r,t,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ZV(i,this._parents,t,n)},call:KV.call,nodes:KV.nodes,node:KV.node,size:KV.size,empty:KV.empty,each:KV.each,on:function(t,e){var n=this._id
|
|
12531
|
+
return arguments.length<2?MV(this.node(),n).on.on(t):this.each(function(t,e,n){var i,o,s=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".")
|
|
12532
|
+
return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?SV:$V
|
|
12531
12533
|
return function(){var r=s(this,t),a=r.on
|
|
12532
|
-
a!==i&&(o=(i=a).copy()).on(e,n),r.on=o}}(n,t,e))},attr:function(t,e){var n=
|
|
12533
|
-
return this.attrTween(t,"function"==typeof e?(n.local?NV
|
|
12534
|
+
a!==i&&(o=(i=a).copy()).on(e,n),r.on=o}}(n,t,e))},attr:function(t,e){var n=TP(t),i="transform"===n?Wz:AV
|
|
12535
|
+
return this.attrTween(t,"function"==typeof e?(n.local?PV:NV)(n,i,DV(this,"attr."+t,e)):null==e?(n.local?OV:TV)(n):(n.local?FV:RV)(n,i,e))},attrTween:function(t,e){var n="attr."+t
|
|
12534
12536
|
if(arguments.length<2)return(n=this.tween(n))&&n._value
|
|
12535
12537
|
if(null==e)return this.tween(n,null)
|
|
12536
12538
|
if("function"!=typeof e)throw new Error
|
|
12537
|
-
var i=
|
|
12538
|
-
return this.tween(n,(i.local?
|
|
12539
|
+
var i=TP(t)
|
|
12540
|
+
return this.tween(n,(i.local?LV:zV)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?jz:AV
|
|
12539
12541
|
return null==e?this.styleTween(t,function(t,e){var n,i,o
|
|
12540
|
-
return function(){var s=
|
|
12541
|
-
return s===r?null:s===n&&r===i?o:o=e(n=s,i=r)}}(t,i)).on("end.style."+t,
|
|
12542
|
-
return function(){var r=
|
|
12543
|
-
return null==a&&(this.style.removeProperty(t),l=a=
|
|
12544
|
-
return function(){var l
|
|
12542
|
+
return function(){var s=dL(this,t),r=(this.style.removeProperty(t),dL(this,t))
|
|
12543
|
+
return s===r?null:s===n&&r===i?o:o=e(n=s,i=r)}}(t,i)).on("end.style."+t,jV(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,o,s
|
|
12544
|
+
return function(){var r=dL(this,t),a=n(this),l=a+""
|
|
12545
|
+
return null==a&&(this.style.removeProperty(t),l=a=dL(this,t)),r===l?null:r===i&&l===o?s:(o=l,s=e(i=r,a))}}(t,i,DV(this,"style."+t,e))).each(function(t,e){var n,i,o,s,r="style."+e,a="end."+r
|
|
12546
|
+
return function(){var l=$V(this,t),c=l.on,d=null==l.value[r]?s||(s=jV(e)):void 0
|
|
12545
12547
|
c===n&&o===d||(i=(n=c).copy()).on(a,o=d),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,o,s=n+""
|
|
12546
|
-
return function(){var r=
|
|
12548
|
+
return function(){var r=dL(this,t)
|
|
12547
12549
|
return r===s?null:r===i?o:o=e(i=r,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="")
|
|
12548
12550
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
12549
12551
|
if(null==e)return this.tween(i,null)
|
|
@@ -12551,7 +12553,7 @@ if("function"!=typeof e)throw new Error
|
|
|
12551
12553
|
return this.tween(i,function(t,e,n){var i,o
|
|
12552
12554
|
function s(){var s=e.apply(this,arguments)
|
|
12553
12555
|
return s!==o&&(i=(o=s)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,s,n)),i}return s._value=e,s}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this)
|
|
12554
|
-
this.textContent=null==e?"":e}}(
|
|
12556
|
+
this.textContent=null==e?"":e}}(DV(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text"
|
|
12555
12557
|
if(arguments.length<1)return(e=this.tween(e))&&e._value
|
|
12556
12558
|
if(null==t)return this.tween(e,null)
|
|
12557
12559
|
if("function"!=typeof t)throw new Error
|
|
@@ -12560,59 +12562,59 @@ function i(){var i=t.apply(this,arguments)
|
|
|
12560
12562
|
return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode
|
|
12561
12563
|
for(var n in this.__transition)if(+n!==t)return
|
|
12562
12564
|
e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id
|
|
12563
|
-
if(t+="",arguments.length<2){for(var i,o
|
|
12564
|
-
return null}return this.each((null==e?
|
|
12565
|
-
return arguments.length?this.each(("function"==typeof t?
|
|
12566
|
-
return arguments.length?this.each(("function"==typeof t?
|
|
12565
|
+
if(t+="",arguments.length<2){for(var i,o=MV(this.node(),n).tween,s=0,r=o.length;s<r;++s)if((i=o[s]).name===t)return i.value
|
|
12566
|
+
return null}return this.each((null==e?EV:IV)(n,t,e))},delay:function(t){var e=this._id
|
|
12567
|
+
return arguments.length?this.each(("function"==typeof t?VV:HV)(e,t)):MV(this.node(),e).delay},duration:function(t){var e=this._id
|
|
12568
|
+
return arguments.length?this.each(("function"==typeof t?BV:qV)(e,t)):MV(this.node(),e).duration},ease:function(t){var e=this._id
|
|
12567
12569
|
return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error
|
|
12568
|
-
return function(){
|
|
12570
|
+
return function(){$V(this,t).ease=e}}(e,t)):MV(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error
|
|
12569
12571
|
return this.each(function(t,e){return function(){var n=e.apply(this,arguments)
|
|
12570
12572
|
if("function"!=typeof n)throw new Error
|
|
12571
|
-
|
|
12573
|
+
$V(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,o=n.size()
|
|
12572
12574
|
return new Promise((function(s,r){var a={value:r},l={value:function(){0==--o&&s()}}
|
|
12573
|
-
n.each((function(){var n
|
|
12574
|
-
o!==t&&((e=(t=o).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===o&&s()}))},[Symbol.iterator]:
|
|
12575
|
-
var
|
|
12576
|
-
function
|
|
12577
|
-
return n}
|
|
12578
|
-
t instanceof
|
|
12579
|
-
for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)(r=a[c])&&
|
|
12580
|
-
return new
|
|
12581
|
-
var
|
|
12582
|
-
function
|
|
12583
|
-
var
|
|
12584
|
-
function
|
|
12585
|
-
return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function
|
|
12586
|
-
return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}function
|
|
12587
|
-
function v(t){t.property("__zoom",
|
|
12588
|
-
return i===t.x&&o===t.y?t:new
|
|
12575
|
+
n.each((function(){var n=$V(this,i),o=n.on
|
|
12576
|
+
o!==t&&((e=(t=o).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===o&&s()}))},[Symbol.iterator]:KV[Symbol.iterator]}
|
|
12577
|
+
var JV={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}}
|
|
12578
|
+
function XV(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`)
|
|
12579
|
+
return n}HL.prototype.interrupt=function(t){return this.each((function(){_V(this,t)}))},HL.prototype.transition=function(t){var e,n
|
|
12580
|
+
t instanceof ZV?(e=t._id,t=t._name):(e=GV(),(n=JV).time=rV(),t=null==t?null:t+"")
|
|
12581
|
+
for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)(r=a[c])&&kV(r,t,e,c,a,n||XV(r,e))
|
|
12582
|
+
return new ZV(i,this._parents,t,e)}
|
|
12583
|
+
var YV=t=>()=>t
|
|
12584
|
+
function QV(t,{sourceEvent:e,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function tH(t,e,n){this.k=t,this.x=e,this.y=n}tH.prototype={constructor:tH,scale:function(t){return 1===t?this:new tH(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new tH(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
|
|
12585
|
+
var eH=new tH(1,0,0)
|
|
12586
|
+
function nH(t){t.stopImmediatePropagation()}function iH(t){t.preventDefault(),t.stopImmediatePropagation()}function oH(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function sH(){var t=this
|
|
12587
|
+
return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function rH(){return this.__zoom||eH}function aH(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function lH(){return navigator.maxTouchPoints||"ontouchstart"in this}function cH(t,e,n){var i=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],r=t.invertY(e[1][1])-n[1][1]
|
|
12588
|
+
return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}function dH(){var t,e,n,i=oH,o=sH,s=cH,r=aH,a=lH,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=Jz,u=MP("start","zoom","end"),p=500,f=150,m=0,g=10
|
|
12589
|
+
function v(t){t.property("__zoom",rH).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",M).filter(a).on("touchstart.zoom",_).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new tH(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,o=e[1]-n[1]*t.k
|
|
12590
|
+
return i===t.x&&o===t.y?t:new tH(t.k,i,o)}function w(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,i){t.on("start.zoom",(function(){C(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){C(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,s=arguments,r=C(t,s).event(i),a=o.apply(t,s),l=null==n?w(a):"function"==typeof n?n.apply(t,s):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=t.__zoom,u="function"==typeof e?e.apply(t,s):e,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
|
|
12589
12591
|
return function(t){if(1===t)t=u
|
|
12590
12592
|
else{var e=p(t),n=c/e[2]
|
|
12591
|
-
t=new
|
|
12593
|
+
t=new tH(n,l[0]-e[0]*n,l[1]-e[1]*n)}r.zoom(null,t)}}))}function C(t,e,n){return!n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=o.apply(t,e),this.taps=0}function S(t,...e){if(i.apply(this,arguments)){var n=C(this,e).event(t),o=this.__zoom,a=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,r.apply(this,arguments)))),d=qL(t)
|
|
12592
12594
|
if(n.wheel)n.mouse[0][0]===d[0]&&n.mouse[0][1]===d[1]||(n.mouse[1]=o.invert(n.mouse[0]=d)),clearTimeout(n.wheel)
|
|
12593
12595
|
else{if(o.k===a)return
|
|
12594
|
-
n.mouse=[d,o.invert(d)],
|
|
12595
|
-
r.moved=e*e+n*n>m}r.event(t).zoom("mouse",s(y(r.that.__zoom,r.mouse[0]=
|
|
12596
|
-
e&&(i.on("click.drag",UL
|
|
12597
|
-
!function(t){var e=t.document.documentElement,n=
|
|
12598
|
-
"onselectstart"in e?n.on("selectstart.drag",UL
|
|
12599
|
-
|
|
12600
|
-
for(
|
|
12601
|
-
t&&(t=clearTimeout(t)),s&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),
|
|
12602
|
-
for(
|
|
12596
|
+
n.mouse=[d,o.invert(d)],_V(this),n.start()}iH(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",s(y(b(o,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function $(t,...e){if(!n&&i.apply(this,arguments)){var o=t.currentTarget,r=C(this,e,!0).event(t),a=BL(t.view).on("mousemove.zoom",(function(t){if(iH(t),!r.moved){var e=t.clientX-d,n=t.clientY-h
|
|
12597
|
+
r.moved=e*e+n*n>m}r.event(t).zoom("mouse",s(y(r.that.__zoom,r.mouse[0]=qL(t,o),r.mouse[1]),r.extent,c))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=BL(t).on("dragstart.drag",null)
|
|
12598
|
+
e&&(i.on("click.drag",jL,UL),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,r.moved),iH(t),r.event(t).end()}),!0),l=qL(t,o),d=t.clientX,h=t.clientY
|
|
12599
|
+
!function(t){var e=t.document.documentElement,n=BL(t).on("dragstart.drag",jL,UL)
|
|
12600
|
+
"onselectstart"in e?n.on("selectstart.drag",jL,UL):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),nH(t),r.mouse=[l,this.__zoom.invert(l)],_V(this),r.start()}}function M(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,r=qL(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(r),l=n.k*(t.shiftKey?.5:2),h=s(y(b(n,l),r,a),o.apply(this,e),c)
|
|
12601
|
+
iH(t),d>0?BL(this).transition().duration(d).call(x,h,r,t):BL(this).call(v.transform,h,r,t)}}function _(n,...o){if(i.apply(this,arguments)){var s,r,a,l,c=n.touches,d=c.length,h=C(this,o,n.changedTouches.length===d).event(n)
|
|
12602
|
+
for(nH(n),r=0;r<d;++r)l=[l=qL(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+!!t)
|
|
12603
|
+
t&&(t=clearTimeout(t)),s&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),_V(this),h.start())}}function E(t,...e){if(this.__zooming){var n,i,o,r,a=C(this,e).event(t),l=t.changedTouches,d=l.length
|
|
12604
|
+
for(iH(t),n=0;n<d;++n)o=qL(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=o:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=o)
|
|
12603
12605
|
if(i=a.that.__zoom,a.touch1){var h=a.touch0[0],u=a.touch0[1],p=a.touch1[0],f=a.touch1[1],m=(m=p[0]-h[0])*m+(m=p[1]-h[1])*m,g=(g=f[0]-u[0])*g+(g=f[1]-u[1])*g
|
|
12604
12606
|
i=b(i,Math.sqrt(m/g)),o=[(h[0]+p[0])/2,(h[1]+p[1])/2],r=[(u[0]+f[0])/2,(u[1]+f[1])/2]}else{if(!a.touch0)return
|
|
12605
12607
|
o=a.touch0[0],r=a.touch0[1]}a.zoom("touch",s(y(i,o,r),a.extent,c))}}function I(t,...i){if(this.__zooming){var o,s,r=C(this,i).event(t),a=t.changedTouches,l=a.length
|
|
12606
|
-
for(
|
|
12608
|
+
for(nH(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),o=0;o<l;++o)s=a[o],r.touch0&&r.touch0[2]===s.identifier?delete r.touch0:r.touch1&&r.touch1[2]===s.identifier&&delete r.touch1
|
|
12607
12609
|
if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0])
|
|
12608
|
-
else if(r.end(),2===r.taps&&(s=
|
|
12610
|
+
else if(r.end(),2===r.taps&&(s=qL(s,this),Math.hypot(e[0]-s[0],e[1]-s[1])<g)){var c=BL(this).on("dblclick.zoom")
|
|
12609
12611
|
c&&c.apply(this,arguments)}}}return v.transform=function(t,e,n,i){var o=t.selection?t.selection():t
|
|
12610
|
-
o.property("__zoom",
|
|
12612
|
+
o.property("__zoom",rH),t!==o?x(t,e,n,i):o.interrupt().each((function(){C(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},v.scaleBy=function(t,e,n,i){v.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,i)},v.scaleTo=function(t,e,n,i){v.transform(t,(function(){var t=o.apply(this,arguments),i=this.__zoom,r=null==n?w(t):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(r),l="function"==typeof e?e.apply(this,arguments):e
|
|
12611
12613
|
return s(y(b(i,l),r,a),t,c)}),n,i)},v.translateBy=function(t,e,n,i){v.transform(t,(function(){return s(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,i)},v.translateTo=function(t,e,n,i,r){v.transform(t,(function(){var t=o.apply(this,arguments),r=this.__zoom,a=null==i?w(t):"function"==typeof i?i.apply(this,arguments):i
|
|
12612
|
-
return s(
|
|
12613
|
-
u.call(t,this.that,new
|
|
12614
|
-
return t===u?v:t},v.clickDistance=function(t){return arguments.length?(m=(t=+t)*t,v):Math.sqrt(m)},v.tapDistance=function(t){return arguments.length?(g=+t,v):g},v}
|
|
12615
|
-
const
|
|
12614
|
+
return s(eH.translate(a[0],a[1]).scale(r.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),i,r)},k.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=BL(this.that).datum()
|
|
12615
|
+
u.call(t,this.that,new QV(t,{sourceEvent:this.sourceEvent,target:v,type:t,transform:this.that.__zoom,dispatch:u}),e)}},v.wheelDelta=function(t){return arguments.length?(r="function"==typeof t?t:YV(+t),v):r},v.filter=function(t){return arguments.length?(i="function"==typeof t?t:YV(!!t),v):i},v.touchable=function(t){return arguments.length?(a="function"==typeof t?t:YV(!!t),v):a},v.extent=function(t){return arguments.length?(o="function"==typeof t?t:YV([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),v):o},v.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],v):[l[0],l[1]]},v.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(t){return arguments.length?(s=t,v):s},v.duration=function(t){return arguments.length?(d=+t,v):d},v.interpolate=function(t){return arguments.length?(h=t,v):h},v.on=function(){var t=u.on.apply(u,arguments)
|
|
12616
|
+
return t===u?v:t},v.clickDistance=function(t){return arguments.length?(m=(t=+t)*t,v):Math.sqrt(m)},v.tapDistance=function(t){return arguments.length?(g=+t,v):g},v}tH.prototype
|
|
12617
|
+
const hH=Z`
|
|
12616
12618
|
<div class="wafer-map-container">
|
|
12617
12619
|
<svg class="svg-root">
|
|
12618
12620
|
<g ${Pt("zoomContainer")} transform=${t=>t.transform.toString()}>
|
|
@@ -12642,7 +12644,7 @@ const dH=Z`
|
|
|
12642
12644
|
/>
|
|
12643
12645
|
</svg>
|
|
12644
12646
|
</div>
|
|
12645
|
-
`,
|
|
12647
|
+
`,uH=xt`
|
|
12646
12648
|
:host {
|
|
12647
12649
|
display: inline-block;
|
|
12648
12650
|
width: 500px;
|
|
@@ -12726,76 +12728,76 @@ const dH=Z`
|
|
|
12726
12728
|
outline-width: 0px;
|
|
12727
12729
|
}
|
|
12728
12730
|
`
|
|
12729
|
-
function
|
|
12731
|
+
function pH(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fH(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function mH(t){let e,n,i
|
|
12730
12732
|
function o(t,i,o=0,s=t.length){if(o<s){if(0!==e(i,i))return s
|
|
12731
12733
|
do{const e=o+s>>>1
|
|
12732
|
-
n(t[e],i)<0?o=e+1:s=e}while(o<s)}return o}return 2!==t.length?(e=
|
|
12734
|
+
n(t[e],i)<0?o=e+1:s=e}while(o<s)}return o}return 2!==t.length?(e=pH,n=(e,n)=>pH(t(e),n),i=(e,n)=>t(e)-n):(e=t===pH||t===fH?t:gH,n=t,i=t),{left:o,center:function(t,e,n=0,s=t.length){const r=o(t,e,n,s-1)
|
|
12733
12735
|
return r>n&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,i,o=0,s=t.length){if(o<s){if(0!==e(i,i))return s
|
|
12734
12736
|
do{const e=o+s>>>1
|
|
12735
|
-
n(t[e],i)<=0?o=e+1:s=e}while(o<s)}return o}}}function
|
|
12736
|
-
|
|
12737
|
-
class
|
|
12737
|
+
n(t[e],i)<=0?o=e+1:s=e}while(o<s)}return o}}}function gH(){return 0}function vH(t){return null===t?NaN:+t}const bH=mH(pH).right
|
|
12738
|
+
mH(vH).center
|
|
12739
|
+
class yH extends Map{constructor(t,e=xH){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(wH(this,t))}has(t){return super.has(wH(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const i=e(n)
|
|
12738
12740
|
return t.has(i)?t.get(i):(t.set(i,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const i=e(n)
|
|
12739
12741
|
t.has(i)&&(n=t.get(i),t.delete(i))
|
|
12740
|
-
return n}(this,t))}}function
|
|
12741
|
-
return t.has(i)?t.get(i):n}function
|
|
12742
|
-
function
|
|
12742
|
+
return n}(this,t))}}function wH({_intern:t,_key:e},n){const i=e(n)
|
|
12743
|
+
return t.has(i)?t.get(i):n}function xH(t){return null!==t&&"object"==typeof t?t.valueOf():t}const CH=Math.sqrt(50),kH=Math.sqrt(10),SH=Math.sqrt(2)
|
|
12744
|
+
function $H(t,e,n){const i=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(i)),s=i/Math.pow(10,o),r=s>=CH?10:s>=kH?5:s>=SH?2:1
|
|
12743
12745
|
let a,l,c
|
|
12744
|
-
return o<0?(c=Math.pow(10,-o)/r,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,o)*r,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2
|
|
12746
|
+
return o<0?(c=Math.pow(10,-o)/r,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,o)*r,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?$H(t,e,2*n):[a,l,c]}function MH(t,e,n){if(!((n=+n)>0))return[]
|
|
12745
12747
|
if((t=+t)===(e=+e))return[t]
|
|
12746
|
-
const i=e<t,[o,s,r]=i
|
|
12748
|
+
const i=e<t,[o,s,r]=i?$H(e,t,n):$H(t,e,n)
|
|
12747
12749
|
if(!(s>=o))return[]
|
|
12748
12750
|
const a=s-o+1,l=new Array(a)
|
|
12749
12751
|
if(i)if(r<0)for(let t=0;t<a;++t)l[t]=(s-t)/-r
|
|
12750
12752
|
else for(let t=0;t<a;++t)l[t]=(s-t)*r
|
|
12751
12753
|
else if(r<0)for(let t=0;t<a;++t)l[t]=(o+t)/-r
|
|
12752
12754
|
else for(let t=0;t<a;++t)l[t]=(o+t)*r
|
|
12753
|
-
return l}function
|
|
12755
|
+
return l}function _H(t,e,n){return $H(t=+t,e=+e,n=+n)[2]}function EH(t,e,n=vH){if((i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return+n(t[0],0,t)
|
|
12754
12756
|
if(e>=1)return+n(t[i-1],i-1,t)
|
|
12755
12757
|
var i,o=(i-1)*e,s=Math.floor(o),r=+n(t[s],s,t)
|
|
12756
|
-
return r+(+n(t[s+1],s+1,t)-r)*(o-s)}}function
|
|
12758
|
+
return r+(+n(t[s+1],s+1,t)-r)*(o-s)}}function IH(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n
|
|
12757
12759
|
for(var i=-1,o=0|Math.max(0,Math.ceil((e-t)/n)),s=new Array(o);++i<o;)s[i]=t+i*n
|
|
12758
|
-
return s}function
|
|
12760
|
+
return s}function DH(t,e){switch(arguments.length){case 0:break
|
|
12759
12761
|
case 1:this.range(t)
|
|
12760
12762
|
break
|
|
12761
|
-
default:this.range(e).domain(t)}return this}const
|
|
12762
|
-
function
|
|
12763
|
+
default:this.range(e).domain(t)}return this}const AH=Symbol("implicit")
|
|
12764
|
+
function TH(){var t=new yH,e=[],n=[],i=AH
|
|
12763
12765
|
function o(o){let s=t.get(o)
|
|
12764
|
-
if(void 0===s){if(i!==
|
|
12766
|
+
if(void 0===s){if(i!==AH)return i
|
|
12765
12767
|
t.set(o,s=e.push(o)-1)}return n[s%n.length]}return o.domain=function(n){if(!arguments.length)return e.slice()
|
|
12766
|
-
e=[],t=new
|
|
12768
|
+
e=[],t=new yH
|
|
12767
12769
|
for(const i of n)t.has(i)||t.set(i,e.push(i)-1)
|
|
12768
|
-
return o},o.range=function(t){return arguments.length?(n=Array.from(t),o):n.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return
|
|
12770
|
+
return o},o.range=function(t){return arguments.length?(n=Array.from(t),o):n.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return TH(e,n).unknown(i)},DH.apply(o,arguments),o}function OH(){var t,e,n=TH().unknown(void 0),i=n.domain,o=n.range,s=0,r=1,a=!1,l=0,c=0,d=.5
|
|
12769
12771
|
function h(){var n=i().length,h=r<s,u=h?r:s,p=h?s:r
|
|
12770
12772
|
t=(p-u)/Math.max(1,n-l+2*c),a&&(t=Math.floor(t)),u+=(p-u-t*(n-l))*d,e=t*(1-l),a&&(u=Math.round(u),e=Math.round(e))
|
|
12771
|
-
var f=
|
|
12772
|
-
return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([s,r]=t,s=+s,r=+r,h()):[s,r]},n.rangeRound=function(t){return[s,r]=t,s=+s,r=+r,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),h()):d},n.copy=function(){return
|
|
12773
|
-
function
|
|
12774
|
-
var n}function
|
|
12775
|
-
return o<i?(i=
|
|
12776
|
-
for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++r<i;)o[r]=
|
|
12777
|
-
return function(e){var n=
|
|
12778
|
-
return s[n](o[n](e))}}function
|
|
12773
|
+
var f=IH(n).map((function(e){return u+t*e}))
|
|
12774
|
+
return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([s,r]=t,s=+s,r=+r,h()):[s,r]},n.rangeRound=function(t){return[s,r]=t,s=+s,r=+r,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),h()):d},n.copy=function(){return OH(i(),[s,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},DH.apply(h(),arguments)}function RH(t){return+t}var FH=[0,1]
|
|
12775
|
+
function NH(t){return t}function PH(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n})
|
|
12776
|
+
var n}function LH(t,e,n){var i=t[0],o=t[1],s=e[0],r=e[1]
|
|
12777
|
+
return o<i?(i=PH(o,i),s=n(r,s)):(i=PH(i,o),s=n(s,r)),function(t){return s(i(t))}}function zH(t,e,n){var i=Math.min(t.length,e.length)-1,o=new Array(i),s=new Array(i),r=-1
|
|
12778
|
+
for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++r<i;)o[r]=PH(t[r],t[r+1]),s[r]=n(e[r],e[r+1])
|
|
12779
|
+
return function(e){var n=bH(t,e,1,i)-1
|
|
12780
|
+
return s[n](o[n](e))}}function VH(){var t,e,n,i,o,s,r=FH,a=FH,l=Lz,c=NH
|
|
12779
12781
|
function d(){var t,e,n,l=Math.min(r.length,a.length)
|
|
12780
|
-
return c!==
|
|
12782
|
+
return c!==NH&&(t=r[0],e=r[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=l>2?zH:LH,o=s=null,h}function h(e){return null==e||isNaN(e=+e)?n:(o||(o=i(r.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((s||(s=i(a,r.map(t),Oz)))(n)))},h.domain=function(t){return arguments.length?(r=Array.from(t,RH),d()):r.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),d()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=zz,d()},h.clamp=function(t){return arguments.length?(c=!!t||NH,d()):c!==NH},h.interpolate=function(t){return arguments.length?(l=t,d()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,d()}}function HH(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null
|
|
12781
12783
|
var n,i=t.slice(0,n)
|
|
12782
|
-
return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function
|
|
12783
|
-
function
|
|
12784
|
+
return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function BH(t){return(t=HH(Math.abs(t)))?t[1]:NaN}var qH,UH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
12785
|
+
function jH(t){if(!(e=UH.exec(t)))throw new Error("invalid format: "+t)
|
|
12784
12786
|
var e
|
|
12785
|
-
return new
|
|
12787
|
+
return new WH({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function WH(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ZH(t,e){var n=HH(t,e)
|
|
12786
12788
|
if(!n)return t+""
|
|
12787
12789
|
var i=n[0],o=n[1]
|
|
12788
|
-
return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}
|
|
12789
|
-
var
|
|
12790
|
+
return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}jH.prototype=WH.prototype,WH.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}
|
|
12791
|
+
var GH={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ZH(100*t,e),r:ZH,s:function(t,e){var n=HH(t,e)
|
|
12790
12792
|
if(!n)return t+""
|
|
12791
|
-
var i=n[0],o=n[1],s=o-(
|
|
12792
|
-
return s===r?i:s>r?i+new Array(s-r+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+
|
|
12793
|
-
function
|
|
12794
|
-
function
|
|
12795
|
-
return s.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?
|
|
12796
|
-
function h(t){var e=(t=
|
|
12797
|
-
"n"===b?(m=!0,b="g"):
|
|
12798
|
-
var y="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?s:/[%p]/.test(b)?l:"",x=
|
|
12793
|
+
var i=n[0],o=n[1],s=o-(qH=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,r=i.length
|
|
12794
|
+
return s===r?i:s>r?i+new Array(s-r+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+HH(t,Math.max(0,e+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}
|
|
12795
|
+
function KH(t){return t}var JH,XH,YH,QH=Array.prototype.map,tB=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
12796
|
+
function eB(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?KH:(e=QH.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var o=t.length,s=[],r=0,a=e[0],l=0;o>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(t.substring(o-=a,o+a)),!((l+=a+1)>i));)a=e[r=(r+1)%e.length]
|
|
12797
|
+
return s.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?KH:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(QH.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",d=void 0===t.nan?"NaN":t.nan+""
|
|
12798
|
+
function h(t){var e=(t=jH(t)).fill,n=t.align,h=t.sign,u=t.symbol,p=t.zero,f=t.width,m=t.comma,g=t.precision,v=t.trim,b=t.type
|
|
12799
|
+
"n"===b?(m=!0,b="g"):GH[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=")
|
|
12800
|
+
var y="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?s:/[%p]/.test(b)?l:"",x=GH[b],C=/[defgprs%]/.test(b)
|
|
12799
12801
|
function k(t){var o,s,l,u=y,k=w
|
|
12800
12802
|
if("c"===b)k=x(t)+k,t=""
|
|
12801
12803
|
else{var S=(t=+t)<0||1/t<0
|
|
@@ -12804,7 +12806,7 @@ break
|
|
|
12804
12806
|
case"0":0===o&&(o=i),e=i
|
|
12805
12807
|
break
|
|
12806
12808
|
default:if(!+t[i])break t
|
|
12807
|
-
o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?
|
|
12809
|
+
o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?tB[8+qH/3]:"")+k+(S&&"("===h?")":""),C)for(o=-1,s=t.length;++o<s;)if(48>(l=t.charCodeAt(o))||l>57){k=(46===l?r+t.slice(o+1):t.slice(o))+k,t=t.slice(0,o)
|
|
12808
12810
|
break}}m&&!p&&(t=i(t,1/0))
|
|
12809
12811
|
var $=u.length+t.length+k.length,M=$<f?new Array(f-$+1).join(e):""
|
|
12810
12812
|
switch(m&&p&&(t=i(M+t,M.length?f-k.length:1/0),M=""),n){case"<":t=u+t+k+M
|
|
@@ -12813,34 +12815,34 @@ case"=":t=u+M+t+k
|
|
|
12813
12815
|
break
|
|
12814
12816
|
case"^":t=M.slice(0,$=M.length>>1)+u+t+k+M.slice($)
|
|
12815
12817
|
break
|
|
12816
|
-
default:t=M+u+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=
|
|
12817
|
-
return function(t){return n(o*t)+s}}}}function
|
|
12818
|
-
const i=(e=+e)<(t=+t),o=i?
|
|
12818
|
+
default:t=M+u+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=jH(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(BH(e)/3))),o=Math.pow(10,-i),s=tB[8+i/3]
|
|
12819
|
+
return function(t){return n(o*t)+s}}}}function nB(t,e,n,i){var o,s=function(t,e,n){n=+n
|
|
12820
|
+
const i=(e=+e)<(t=+t),o=i?_H(e,t,n):_H(t,e,n)
|
|
12819
12821
|
return(i?-1:1)*(o<0?1/-o:o)}(t,e,n)
|
|
12820
|
-
switch((i=
|
|
12821
|
-
return null!=i.precision||isNaN(o=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
12822
|
-
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,
|
|
12822
|
+
switch((i=jH(null==i?",f":i)).type){case"s":var r=Math.max(Math.abs(t),Math.abs(e))
|
|
12823
|
+
return null!=i.precision||isNaN(o=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(BH(e)/3)))-BH(Math.abs(t)))}(s,r))||(i.precision=o),YH(i,r)
|
|
12824
|
+
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,BH(e)-BH(t))+1}(s,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=o-("e"===i.type))
|
|
12823
12825
|
break
|
|
12824
|
-
case"f":case"%":null!=i.precision||isNaN(o=function(t){return Math.max(0,-
|
|
12825
|
-
return t.copy=function(){return e=t,
|
|
12826
|
-
var e},
|
|
12826
|
+
case"f":case"%":null!=i.precision||isNaN(o=function(t){return Math.max(0,-BH(Math.abs(t)))}(s))||(i.precision=o-2*("%"===i.type))}return XH(i)}function iB(){var t=VH()(NH,NH)
|
|
12827
|
+
return t.copy=function(){return e=t,iB().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())
|
|
12828
|
+
var e},DH.apply(t,arguments),function(t){var e=t.domain
|
|
12827
12829
|
return t.ticks=function(t){var n=e()
|
|
12828
|
-
return
|
|
12829
|
-
return
|
|
12830
|
+
return MH(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e()
|
|
12831
|
+
return nB(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10)
|
|
12830
12832
|
var i,o,s=e(),r=0,a=s.length-1,l=s[r],c=s[a],d=10
|
|
12831
|
-
for(c<l&&(o=l,l=c,c=o,o=r,r=a,a=o);d-- >0;){if((o=
|
|
12833
|
+
for(c<l&&(o=l,l=c,c=o,o=r,r=a,a=o);d-- >0;){if((o=_H(l,c,n))===i)return s[r]=l,s[a]=c,e(s)
|
|
12832
12834
|
if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o
|
|
12833
12835
|
else{if(!(o<0))break
|
|
12834
|
-
l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return t},t}(t)}function
|
|
12836
|
+
l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return t},t}(t)}function oB(){var t,e=[],n=[],i=[]
|
|
12835
12837
|
function o(){var t=0,o=Math.max(1,n.length)
|
|
12836
|
-
for(i=new Array(o-1);++t<o;)i[t-1]=
|
|
12837
|
-
return s}function s(e){return null==e||isNaN(e=+e)?t:n[
|
|
12838
|
+
for(i=new Array(o-1);++t<o;)i[t-1]=EH(e,t/o)
|
|
12839
|
+
return s}function s(e){return null==e||isNaN(e=+e)?t:n[bH(i,e)]}return s.invertExtent=function(t){var o=n.indexOf(t)
|
|
12838
12840
|
return o<0?[NaN,NaN]:[o>0?i[o-1]:e[0],o<i.length?i[o]:e[e.length-1]]},s.domain=function(t){if(!arguments.length)return e.slice()
|
|
12839
12841
|
e=[]
|
|
12840
12842
|
for(let n of t)null==n||isNaN(n=+n)||e.push(n)
|
|
12841
|
-
return e.sort(
|
|
12842
|
-
const
|
|
12843
|
-
let
|
|
12843
|
+
return e.sort(pH),o()},s.range=function(t){return arguments.length?(n=Array.from(t),o()):n.slice()},s.unknown=function(e){return arguments.length?(t=e,s):t},s.quantiles=function(){return i.slice()},s.copy=function(){return oB().domain(e).range(n).unknown(t)},DH.apply(s,arguments)}JH=eB({thousands:",",grouping:[3],currency:["$",""]}),XH=JH.format,YH=JH.formatPrefix
|
|
12844
|
+
const sB="bottom-left",rB="bottom-right",aB="top-left",lB="top",cB="show",dB="hide",hB="linear",uB="ordinal"
|
|
12845
|
+
let pB=class{get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}constructor(t){this.wafermap=t,this.defaultPadding=0,this.baseMarginPercentage=.04}updateContainerDimensions(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
|
|
12844
12846
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(t,this._margin)
|
|
12845
12847
|
const o=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
12846
12848
|
this._radius=o/2,this.updateScales()}updateScales(){const t=Math.min(this._containerDimensions.width,this._containerDimensions.height),e=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(this.wafermap.dies),n=this.wafermap.originLocation
|
|
@@ -12848,33 +12850,33 @@ this._horizontalScale=this.createHorizontalScale(n,e,t),this._invertedHorizontal
|
|
|
12848
12850
|
return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(t.origin.x=this.wafermap.gridMinX,t.origin.y=this.wafermap.gridMinY,t.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,t.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),t}calculateGridDimensionsFromDies(t){if(0===t.length||void 0===t[0])return{origin:{x:0,y:0},rows:0,cols:0}
|
|
12849
12851
|
const e={x:t[0].x,y:t[0].y},n={x:t[0].x,y:t[0].y}
|
|
12850
12852
|
for(const i of t)i.x<e.x&&(e.x=i.x),i.y<e.y&&(e.y=i.y),i.x>n.x&&(n.x=i.x),i.y>n.y&&(n.y=i.y)
|
|
12851
|
-
return{origin:e,rows:n.y-e.y+1,cols:n.x-e.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=
|
|
12852
|
-
return t===
|
|
12853
|
-
return t===
|
|
12854
|
-
return t===
|
|
12855
|
-
return t===
|
|
12853
|
+
return{origin:e,rows:n.y-e.y+1,cols:n.x-e.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=OH().domain(IH(e.origin.x,e.origin.x+e.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
12854
|
+
return t===sB||t===aB?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(t,e,n){const i=oB().domain([0,n])
|
|
12855
|
+
return t===sB||t===aB?i.range(IH(e.origin.x,e.origin.x+e.cols)):i.range(IH(e.origin.x,e.origin.x+e.cols).reverse())}createVerticalScale(t,e,n){const i=OH().domain(IH(e.origin.y,e.origin.y+e.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
12856
|
+
return t===sB||t===rB?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(t,e,n){const i=oB().domain([0,n])
|
|
12857
|
+
return t===sB||t===rB?i.range(IH(e.origin.y,e.origin.y+e.rows).reverse()):i.range(IH(e.origin.y,e.origin.y+e.rows))}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}},fB=class{get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}constructor(t){this.wafermap=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.wafermap.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode)
|
|
12856
12858
|
this._diesRenderInfo=this.wafermap.dies.map((t=>this.computeDieRenderInfo(t))).filter((t=>null!==t))}computeDieRenderInfo(t){const e=this.wafermap.dataManager.margin,n=this.wafermap.dataManager.horizontalScale(t.x),i=this.wafermap.dataManager.verticalScale(t.y)
|
|
12857
|
-
return void 0===n||void 0===i?null:{x:n+e.right,y:i+e.top,fillStyle:this.calculateFillStyle(t.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,t.tags),text:this.buildLabel(t.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}createD3ColorScale(t,e){return this.isColorScaleLinear(e)?
|
|
12859
|
+
return void 0===n||void 0===i?null:{x:n+e.right,y:i+e.top,fillStyle:this.calculateFillStyle(t.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,t.tags),text:this.buildLabel(t.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}createD3ColorScale(t,e){return this.isColorScaleLinear(e)?iB().domain(t.values.map((t=>+t))).range(t.colors):TH().domain(t.values).range(t.colors)}dieHasData(t){return null!=t&&""!==t}buildLabel(t,e,n,i){if(n||!this.dieHasData(t))return""
|
|
12858
12860
|
const o=`${t}${i}`
|
|
12859
12861
|
return o.length>=e?`${o.substring(0,e)}…`:o}calculateOpacity(t,e){if(!e||0===e.length)return 1
|
|
12860
12862
|
const n=new Set(e)
|
|
12861
|
-
return t?.some((t=>n.has(t)))?1:this.nonHighlightedOpacity}isColorScaleLinear(t){return t===
|
|
12863
|
+
return t?.some((t=>n.has(t)))?1:this.nonHighlightedOpacity}isColorScaleLinear(t){return t===hB}isColorScaleOrdinal(t){return t===uB}calculateFillStyle(t,e,n,i){let o=this.emptyDieColor
|
|
12862
12864
|
if(this.dieHasData(t)&&(isNaN(+t)?o=this.nanDieColor:this.isColorScaleLinear(e)?o=this.d3ColorScale(+t):this.isColorScaleOrdinal(e)&&(o=this.d3ColorScale(t))),void 0===o)return this.emptyDieColor
|
|
12863
12865
|
let s=Ko(o)
|
|
12864
|
-
return null===s?this.emptyDieColor:(s=new Ho(s.r,s.g,s.b,this.calculateOpacity(i,n)),s.toStringWebRGBA())}},
|
|
12865
|
-
class
|
|
12866
|
+
return null===s?this.emptyDieColor:(s=new Ho(s.r,s.g,s.b,this.calculateOpacity(i,n)),s.toStringWebRGBA())}},mB=class{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}get data(){return this.dataMap}constructor(t){this.wafermap=t,this.computations=new pB(t),this.prerendering=new fB(t)}updateContainerDimensions(){this.computations.updateContainerDimensions(),this.updateDataMap(),this.updateLabelsFontSize()}updateScales(){this.computations.updateScales(),this.updateDataMap(),this.updateLabelsFontSize()}updateLabelsFontSize(){this.prerendering.updateLabelsFontSize()}updateDiesRenderInfo(){this.prerendering.updateDiesRenderInfo()}getWaferMapDie(t){return this.dataMap.get(`${t.x}_${t.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((t=>[`${t.x}_${t.y}`,t])))}}
|
|
12867
|
+
class gB{get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}constructor(t){this.wafermap=t,this.defaultPadding=0,this.baseMarginPercentage=.04}update(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
|
|
12866
12868
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(t,this._margin)
|
|
12867
12869
|
const o=Math.min(this._containerDimensions.width,this._containerDimensions.height),s=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(),r=this.wafermap.originLocation
|
|
12868
12870
|
this._horizontalScale=this.createHorizontalScale(r,s,o),this._verticalScale=this.createVerticalScale(r,s,o),this._dieDimensions={width:Math.abs(this._horizontalScale(0)-this._horizontalScale(1)),height:Math.abs(this._verticalScale(0)-this._verticalScale(1))}}gridDimensionsValidAndDefined(){return!this.wafermap.validity.invalidGridDimensions&&"number"==typeof this.wafermap.gridMinX&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX}calculateGridDimensionsFromBoundingBox(){const t={origin:{x:0,y:0},rows:0,cols:0}
|
|
12869
12871
|
return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(t.origin.x=this.wafermap.gridMinX,t.origin.y=this.wafermap.gridMinY,t.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,t.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),t}calculateGridDimensionsFromDies(){if(void 0===this.wafermap.diesTable)return{origin:{x:0,y:0},rows:0,cols:0}
|
|
12870
12872
|
const t=this.wafermap.diesTable.getChild("colIndex").toArray(),e=this.wafermap.diesTable.getChild("rowIndex").toArray(),n={x:t[0],y:e[0]},i={x:t[0],y:e[0]}
|
|
12871
12873
|
for(let o=0;o<t.length;o++)t[o]<n.x&&(n.x=t[o]),t[o]>i.x&&(i.x=t[o]),e[o]<n.y&&(n.y=e[o]),e[o]>i.y&&(i.y=e[o])
|
|
12872
|
-
return{origin:n,rows:i.y-n.y+1,cols:i.x-n.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=
|
|
12873
|
-
return t===
|
|
12874
|
-
return t===
|
|
12874
|
+
return{origin:n,rows:i.y-n.y+1,cols:i.x-n.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=iB()
|
|
12875
|
+
return t===sB||t===aB?i.domain([e.origin.x,e.origin.x+e.cols]).range([0,n]):i.domain([e.origin.x-1,e.origin.x+e.cols-1]).range([n,0])}createVerticalScale(t,e,n){const i=iB()
|
|
12876
|
+
return t===sB||t===rB?i.domain([e.origin.y-1,e.origin.y+e.rows-1]).range([n,0]):i.domain([e.origin.y,e.origin.y+e.rows]).range([0,n])}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}}class vB{get labelsFontSize(){return this._labelsFontSize}get colorScale(){return this._colorScale}constructor(t){this.wafermap=t,this.fontSizeFactor=.8,this.colorScaleResolution=10}update(){this._labelsFontSize=this.calculateLabelsFontSize(this.wafermap.experimentalDataManager.dieDimensions,this.wafermap.maxCharacters),this._colorScale=this.calculateColorScale()}calculateColorScale(){if(this.wafermap.colorScaleMode===hB){const t=this.wafermap.colorScale.values.map((t=>+t)),e=iB().domain(t).range(this.wafermap.colorScale.colors)
|
|
12875
12877
|
let n=t[0],i=t[0]
|
|
12876
12878
|
t.forEach((t=>{t<n&&(n=t),t>i&&(i=t)}))
|
|
12877
|
-
return
|
|
12879
|
+
return MH(n,i,t.length*this.colorScaleResolution).map((t=>({color:e(t),value:t})))}return this.wafermap.colorScale.colors.map(((t,e)=>({color:t,value:+this.wafermap.colorScale.values[e]}))).sort(((t,e)=>t.value-e.value))}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}}class bB{get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get verticalScale(){return this.computations.verticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get colorScale(){return this.prerendering.colorScale}constructor(t){this.wafermap=t,this.computations=new gB(t),this.prerendering=new vB(t)}updateComputations(){this.computations.update(),this.prerendering.update()}updatePrerendering(){this.prerendering.update()}}class yB{constructor(t){this.wafermap=t,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((t,e)=>t.fillStyle>e.fillStyle?1:e.fillStyle>t.fillStyle?-1:0)),this.drawWafer()}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?dB:cB,this.wafermap.hoverTransform=this.calculateHoverTransform()}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
|
|
12878
12880
|
if(void 0===t)return""
|
|
12879
12881
|
const e=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y)
|
|
12880
12882
|
if(void 0===e)return""
|
|
@@ -12887,70 +12889,70 @@ if(t*e*(this.wafermap.transform.k||1)>=this.minDieDim){const n=this.wafermap.dat
|
|
|
12887
12889
|
i.font=`${n.toString()}px sans-serif`,i.fillStyle="#ffffff",i.textAlign="center",i.lineCap="butt"
|
|
12888
12890
|
const o=i.measureText("M"),s=this.wafermap.transform.invert([0,0]),r=this.wafermap.transform.invert([this.wafermap.canvas.width,this.wafermap.canvas.height])
|
|
12889
12891
|
s[0]-=t,s[1]-=e
|
|
12890
|
-
for(const n of this.dies)this.isDieVisible(n,s,r)&&i.fillText(n.text,n.x+t/2,n.y+e/2+o.width/2,t-t/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}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)}isDieVisible(t,e,n){return t.x>=e[0]&&t.x<n[0]&&t.y>=e[1]&&t.y<n[1]}}const
|
|
12891
|
-
class
|
|
12892
|
-
!function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"}(
|
|
12893
|
-
class
|
|
12894
|
-
class
|
|
12895
|
-
class
|
|
12892
|
+
for(const n of this.dies)this.isDieVisible(n,s,r)&&i.fillText(n.text,n.x+t/2,n.y+e/2+o.width/2,t-t/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}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)}isDieVisible(t,e,n){return t.x>=e[0]&&t.x<n[0]&&t.y>=e[1]&&t.y<n[1]}}const wB=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
|
|
12893
|
+
class xB extends lI{constructor(t){super(wB),this.wafermap=t,this.updateQueued=!1}get requiresEventsUpdate(){return this.isTracked("highlightedTags")||this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")||this.isTracked("transform")}get requiresContainerDimensionsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresScalesUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresLabelsFontSizeUpdate(){return this.isTracked("maxCharacters")}get requiresDiesRenderInfoUpdate(){return this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresDrawnWaferUpdate(){return this.isTracked("transform")}get requiresRenderHoverUpdate(){return this.isTracked("hoverDie")}queueUpdate(){this.wafermap.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1}))))}}var CB,kB,SB,$B,MB,_B,EB,IB,DB
|
|
12894
|
+
!function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"}(CB||(CB={})),function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"}(kB||(kB={})),function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"}(SB||(SB={})),function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"}($B||($B={})),function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(MB||(MB={})),function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond"}(_B||(_B={})),function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"}(EB||(EB={}))
|
|
12895
|
+
class AB{static isNull(t){return(null==t?void 0:t.typeId)===_B.Null}static isInt(t){return(null==t?void 0:t.typeId)===_B.Int}static isFloat(t){return(null==t?void 0:t.typeId)===_B.Float}static isBinary(t){return(null==t?void 0:t.typeId)===_B.Binary}static isLargeBinary(t){return(null==t?void 0:t.typeId)===_B.LargeBinary}static isUtf8(t){return(null==t?void 0:t.typeId)===_B.Utf8}static isLargeUtf8(t){return(null==t?void 0:t.typeId)===_B.LargeUtf8}static isBool(t){return(null==t?void 0:t.typeId)===_B.Bool}static isDecimal(t){return(null==t?void 0:t.typeId)===_B.Decimal}static isDate(t){return(null==t?void 0:t.typeId)===_B.Date}static isTime(t){return(null==t?void 0:t.typeId)===_B.Time}static isTimestamp(t){return(null==t?void 0:t.typeId)===_B.Timestamp}static isInterval(t){return(null==t?void 0:t.typeId)===_B.Interval}static isDuration(t){return(null==t?void 0:t.typeId)===_B.Duration}static isList(t){return(null==t?void 0:t.typeId)===_B.List}static isStruct(t){return(null==t?void 0:t.typeId)===_B.Struct}static isUnion(t){return(null==t?void 0:t.typeId)===_B.Union}static isFixedSizeBinary(t){return(null==t?void 0:t.typeId)===_B.FixedSizeBinary}static isFixedSizeList(t){return(null==t?void 0:t.typeId)===_B.FixedSizeList}static isMap(t){return(null==t?void 0:t.typeId)===_B.Map}static isDictionary(t){return(null==t?void 0:t.typeId)===_B.Dictionary}static isDenseUnion(t){return AB.isUnion(t)&&t.mode===CB.Dense}static isSparseUnion(t){return AB.isUnion(t)&&t.mode===CB.Sparse}constructor(t){this.typeId=t}}IB=Symbol.toStringTag,AB[IB]=((DB=AB.prototype).children=null,DB.ArrayType=Array,DB.OffsetArrayType=Int32Array,DB[Symbol.toStringTag]="DataType")
|
|
12896
|
+
class TB extends AB{constructor(){super(_B.Null)}toString(){return"Null"}}TB[Symbol.toStringTag]=(t=>t[Symbol.toStringTag]="Null")(TB.prototype)
|
|
12897
|
+
class OB extends AB{constructor(t,e){super(_B.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array
|
|
12896
12898
|
case 16:return this.isSigned?Int16Array:Uint16Array
|
|
12897
12899
|
case 32:return this.isSigned?Int32Array:Uint32Array
|
|
12898
|
-
case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}
|
|
12899
|
-
class
|
|
12900
|
-
case
|
|
12901
|
-
case
|
|
12902
|
-
class
|
|
12903
|
-
class
|
|
12904
|
-
class
|
|
12905
|
-
class
|
|
12906
|
-
class
|
|
12907
|
-
class
|
|
12908
|
-
class
|
|
12909
|
-
class
|
|
12910
|
-
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}
|
|
12911
|
-
class
|
|
12912
|
-
class
|
|
12913
|
-
class
|
|
12914
|
-
class
|
|
12915
|
-
class
|
|
12916
|
-
class
|
|
12917
|
-
class
|
|
12918
|
-
class
|
|
12919
|
-
class
|
|
12920
|
-
if(super(
|
|
12900
|
+
case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}OB[Symbol.toStringTag]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(OB.prototype)
|
|
12901
|
+
class RB extends AB{constructor(t){super(_B.Float),this.precision=t}get ArrayType(){switch(this.precision){case kB.HALF:return Uint16Array
|
|
12902
|
+
case kB.SINGLE:return Float32Array
|
|
12903
|
+
case kB.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}RB[Symbol.toStringTag]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(RB.prototype)
|
|
12904
|
+
class FB extends AB{constructor(){super(_B.Binary)}toString(){return"Binary"}}FB[Symbol.toStringTag]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(FB.prototype)
|
|
12905
|
+
class NB extends AB{constructor(){super(_B.LargeBinary)}toString(){return"LargeBinary"}}NB[Symbol.toStringTag]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(NB.prototype)
|
|
12906
|
+
class PB extends AB{constructor(){super(_B.Utf8)}toString(){return"Utf8"}}PB[Symbol.toStringTag]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(PB.prototype)
|
|
12907
|
+
class LB extends AB{constructor(){super(_B.LargeUtf8)}toString(){return"LargeUtf8"}}LB[Symbol.toStringTag]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(LB.prototype)
|
|
12908
|
+
class zB extends AB{constructor(){super(_B.Bool)}toString(){return"Bool"}}zB[Symbol.toStringTag]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(zB.prototype)
|
|
12909
|
+
class VB extends AB{constructor(t,e,n=128){super(_B.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}VB[Symbol.toStringTag]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(VB.prototype)
|
|
12910
|
+
class HB extends AB{constructor(t){super(_B.Date),this.unit=t}toString(){return`Date${32*(this.unit+1)}<${SB[this.unit]}>`}}HB[Symbol.toStringTag]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Date"))(HB.prototype)
|
|
12911
|
+
class BB extends AB{constructor(t,e){super(_B.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${$B[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array
|
|
12912
|
+
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}BB[Symbol.toStringTag]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(BB.prototype)
|
|
12913
|
+
class qB extends AB{constructor(t,e){super(_B.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${$B[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}qB[Symbol.toStringTag]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Timestamp"))(qB.prototype)
|
|
12914
|
+
class UB extends AB{constructor(t){super(_B.Interval),this.unit=t}toString(){return`Interval<${MB[this.unit]}>`}}UB[Symbol.toStringTag]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(UB.prototype)
|
|
12915
|
+
class jB extends AB{constructor(t){super(_B.Duration),this.unit=t}toString(){return`Duration<${$B[this.unit]}>`}}jB[Symbol.toStringTag]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(jB.prototype)
|
|
12916
|
+
class WB extends AB{constructor(t){super(_B.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}WB[Symbol.toStringTag]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(WB.prototype)
|
|
12917
|
+
class ZB extends AB{constructor(t){super(_B.Struct),this.children=t}toString(){return`Struct<{${this.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}ZB[Symbol.toStringTag]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))(ZB.prototype)
|
|
12918
|
+
class GB extends AB{constructor(t,e,n){super(_B.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce(((t,e,n)=>(t[e]=n)&&t||t),Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map((t=>`${t.type}`)).join(" | ")}>`}}GB[Symbol.toStringTag]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(GB.prototype)
|
|
12919
|
+
class KB extends AB{constructor(t){super(_B.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}KB[Symbol.toStringTag]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(KB.prototype)
|
|
12920
|
+
class JB extends AB{constructor(t,e){super(_B.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}JB[Symbol.toStringTag]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(JB.prototype)
|
|
12921
|
+
class XB extends AB{constructor(t,e=!1){var n,i,o
|
|
12922
|
+
if(super(_B.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",null===(n=null==t?void 0:t.type)||void 0===n?void 0:n.children)){const e=null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.children[0]
|
|
12921
12923
|
e&&(e.name="key")
|
|
12922
12924
|
const n=null===(o=null==t?void 0:t.type)||void 0===o?void 0:o.children[1]
|
|
12923
|
-
n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}
|
|
12924
|
-
const
|
|
12925
|
-
var
|
|
12926
|
-
class
|
|
12927
|
-
return Number(t)}(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}
|
|
12928
|
-
class
|
|
12925
|
+
n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}XB[Symbol.toStringTag]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(XB.prototype)
|
|
12926
|
+
const YB=(QB=-1,()=>++QB)
|
|
12927
|
+
var QB
|
|
12928
|
+
class tq extends AB{constructor(t,e,n,i){super(_B.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=null==n?YB():function(t){if("bigint"==typeof t&&(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`)
|
|
12929
|
+
return Number(t)}(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}tq[Symbol.toStringTag]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(tq.prototype)
|
|
12930
|
+
class eq{constructor(t){this.wafermap=t,this.invalidGridDimensions=!1,this.invalidDiesTableSchema=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions,invalidDiesTableSchema:this.invalidDiesTableSchema}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}validateGridDimensions(){return this.invalidGridDimensions=!1,void 0===this.wafermap.gridMinX&&void 0===this.wafermap.gridMaxX&&void 0===this.wafermap.gridMinY&&void 0===this.wafermap.gridMaxY?this.invalidGridDimensions=!1:("number"!=typeof this.wafermap.gridMinX||"number"!=typeof this.wafermap.gridMaxX||"number"!=typeof this.wafermap.gridMinY||"number"!=typeof this.wafermap.gridMaxY||this.wafermap.gridMaxX<this.wafermap.gridMinX||this.wafermap.gridMaxY<this.wafermap.gridMinY)&&(this.invalidGridDimensions=!0),!this.invalidGridDimensions}validateDiesTableSchema(){if(this.invalidDiesTableSchema=!1,void 0===this.wafermap.diesTable)this.invalidDiesTableSchema=!1
|
|
12929
12931
|
else{const t=this.wafermap.diesTable.schema.fields,e=t.find((t=>"colIndex"===t.name)),n=t.find((t=>"rowIndex"===t.name)),i=t.find((t=>"value"===t.name))
|
|
12930
|
-
e&&n&&i&&
|
|
12932
|
+
e&&n&&i&&AB.isInt(e.type)&&32===e.type.bitWidth&&AB.isInt(n.type)&&32===n.type.bitWidth&&AB.isFloat(i.type)&&i.type.precision===kB.DOUBLE||(this.invalidDiesTableSchema=!0)}return!this.invalidDiesTableSchema}}class nq{constructor(t){this.wafermap=t}drawWafer(){this.renderHover()}renderHover(){this.wafermap.hoverWidth=this.wafermap.experimentalDataManager.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.experimentalDataManager.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?dB:cB,this.wafermap.hoverTransform=this.calculateHoverTransform()}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.experimentalDataManager.horizontalScale(this.wafermap.hoverDie.x)
|
|
12931
12933
|
if(void 0===t)return""
|
|
12932
12934
|
const e=this.wafermap.experimentalDataManager.verticalScale(this.wafermap.hoverDie.y)
|
|
12933
12935
|
if(void 0===e)return""
|
|
12934
12936
|
const n=this.wafermap.transform.apply([t+this.wafermap.experimentalDataManager.margin.left,e+this.wafermap.experimentalDataManager.margin.top])
|
|
12935
|
-
return`translate(${n[0]}, ${n[1]})`}return""}}let
|
|
12937
|
+
return`translate(${n[0]}, ${n[1]})`}return""}}let iq=class{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(this.wafermap.isExperimentalUpdate())return
|
|
12936
12938
|
const e={x:t.offsetX,y:t.offsetY}
|
|
12937
12939
|
if(!this.hoversOverDie(e))return void(this.wafermap.hoverDie=void 0)
|
|
12938
12940
|
const n=this.wafermap.transform.invert([e.x,e.y]),i=this.calculateDieCoordinates({x:n[0],y:n[1]})
|
|
12939
|
-
this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(!this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===
|
|
12941
|
+
this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(!this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===sB||e===aB?Math.floor:Math.ceil,i=e===sB||e===rB?Math.floor:Math.ceil
|
|
12940
12942
|
return{x:n(this.wafermap.dataManager.invertedHorizontalScale(t.x-this.wafermap.dataManager.margin.left)),y:i(this.wafermap.dataManager.invertedVerticalScale(t.y-this.wafermap.dataManager.margin.top))}}}hoversOverDie(t){const e=this.wafermap.canvasContext.getImageData(t.x,t.y,1,1).data
|
|
12941
12943
|
let n=0
|
|
12942
12944
|
for(const t of e)n+=t
|
|
12943
12945
|
return n>0}}
|
|
12944
|
-
class
|
|
12946
|
+
class oq{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(!this.wafermap.isExperimentalUpdate())return
|
|
12945
12947
|
const e=this.wafermap.transform.invert([t.offsetX,t.offsetY]),n=this.calculateDieCoordinates({x:e[0],y:e[1]})
|
|
12946
12948
|
if(void 0===n)return void(this.wafermap.hoverDie=void 0)
|
|
12947
12949
|
const i=this.wafermap.diesTable.getChild("colIndex").toArray(),o=this.wafermap.diesTable.getChild("rowIndex").toArray()
|
|
12948
12950
|
for(let t=0;t<i.length;t++)if(i[t]===n.x&&o[t]===n.y)return void(this.wafermap.hoverDie={index:t,x:n.x,y:n.y})
|
|
12949
|
-
this.wafermap.hoverDie=void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===
|
|
12950
|
-
return{x:n(this.wafermap.experimentalDataManager.horizontalScale.invert(t.x-this.wafermap.experimentalDataManager.margin.left)),y:i(this.wafermap.experimentalDataManager.verticalScale.invert(t.y-this.wafermap.experimentalDataManager.margin.top))}}}}class
|
|
12951
|
+
this.wafermap.hoverDie=void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===sB||e===aB?Math.floor:Math.ceil,i=e===sB||e===rB?Math.ceil:Math.floor
|
|
12952
|
+
return{x:n(this.wafermap.experimentalDataManager.horizontalScale.invert(t.x-this.wafermap.experimentalDataManager.margin.left)),y:i(this.wafermap.experimentalDataManager.verticalScale.invert(t.y-this.wafermap.experimentalDataManager.margin.top))}}}}class sq{constructor(t){this.wafermap=t,this.scaleExtent=[1,100],this.minExtentPoint=[0,0],this.onWheelMove=t=>{t.preventDefault()}}connect(){this.createZoomBehavior(),this.wafermap.addEventListener("wheel",this.onWheelMove,{passive:!1})}disconnect(){dH().on("zoom",null)(BL(this.wafermap)),this.wafermap.removeEventListener("wheel",this.onWheelMove)}createZoomBehavior(){dH().scaleExtent(this.scaleExtent).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth,this.wafermap.canvasHeight]]).on("zoom",(t=>{this.wafermap.transform=t.transform}))(BL(this.wafermap))}}class rq extends Ve{constructor(){super(...arguments),this.waferMapUpdateTracker=new xB(this.asRequiredFieldsWaferMap),this.originLocation=sB,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=lB,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=hB,this.experimentalDataManager=new bB(this.asRequiredFieldsWaferMap),this.dataManager=new mB(this.asRequiredFieldsWaferMap),this.workerRenderer=new nq(this.asRequiredFieldsWaferMap),this.renderer=new yB(this.asRequiredFieldsWaferMap),this.renderQueued=!1,this.transform=eH,this.hoverTransform="",this.hoverOpacity=dB,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.hoverHandler=new iq(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new oq(this.asRequiredFieldsWaferMap),this.zoomHandler=new sq(this.asRequiredFieldsWaferMap),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new eq(this.asRequiredFieldsWaferMap)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.hoverHandler.connect(),this.experimentalHoverHandler.connect(),this.zoomHandler.connect(),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.hoverHandler.disconnect(),this.experimentalHoverHandler.disconnect(),this.zoomHandler.disconnect(),this.resizeObserver.unobserve(this)}experimentalUpdate(){this.validity.invalidDiesTableSchema||(this.waferMapUpdateTracker.requiresEventsUpdate?(this.zoomHandler.disconnect(),this.waferMapUpdateTracker.requiresContainerDimensionsUpdate||this.waferMapUpdateTracker.requiresScalesUpdate?(this.experimentalDataManager.updateComputations(),this.workerRenderer.drawWafer()):this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate||this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate?(this.experimentalDataManager.updatePrerendering(),this.workerRenderer.drawWafer()):this.waferMapUpdateTracker.requiresDrawnWaferUpdate&&this.workerRenderer.drawWafer(),this.zoomHandler.connect()):this.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.workerRenderer.renderHover())}update(){this.validate(),this.isExperimentalUpdate()?this.experimentalUpdate():this.waferMapUpdateTracker.requiresEventsUpdate?(this.zoomHandler.disconnect(),this.waferMapUpdateTracker.requiresContainerDimensionsUpdate?(this.dataManager.updateContainerDimensions(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresScalesUpdate?(this.dataManager.updateScales(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate?(this.dataManager.updateLabelsFontSize(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate?(this.dataManager.updateDiesRenderInfo(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDrawnWaferUpdate&&this.renderer.drawWafer(),this.zoomHandler.connect()):this.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.renderer.renderHover()}isExperimentalUpdate(){return void 0!==this.diesTable}validate(){this.waferMapValidator.validateGridDimensions(),this.waferMapValidator.validateDiesTableSchema()}createResizeObserver(){return new ResizeObserver((t=>{const e=t[0]
|
|
12951
12953
|
if(void 0===e)return
|
|
12952
12954
|
const{height:n,width:i}=e.contentRect
|
|
12953
|
-
this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}diesTableChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}get asRequiredFieldsWaferMap(){return this}}t([lt({attribute:"origin-location"})],
|
|
12954
|
-
const rq
|
|
12955
|
-
wi.getOrCreate().withPrefix("nimble").register(
|
|
12955
|
+
this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}diesTableChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}get asRequiredFieldsWaferMap(){return this}}t([lt({attribute:"origin-location"})],rq.prototype,"originLocation",void 0),t([lt({attribute:"grid-min-x",converter:rt})],rq.prototype,"gridMinX",void 0),t([lt({attribute:"grid-max-x",converter:rt})],rq.prototype,"gridMaxX",void 0),t([lt({attribute:"grid-min-y",converter:rt})],rq.prototype,"gridMinY",void 0),t([lt({attribute:"grid-max-y",converter:rt})],rq.prototype,"gridMaxY",void 0),t([lt],rq.prototype,"orientation",void 0),t([lt({attribute:"max-characters",converter:rt})],rq.prototype,"maxCharacters",void 0),t([lt({attribute:"die-labels-hidden",mode:"boolean"})],rq.prototype,"dieLabelsHidden",void 0),t([lt({attribute:"die-labels-suffix"})],rq.prototype,"dieLabelsSuffix",void 0),t([lt({attribute:"color-scale-mode"})],rq.prototype,"colorScaleMode",void 0),t([g],rq.prototype,"renderer",void 0),t([g],rq.prototype,"canvasWidth",void 0),t([g],rq.prototype,"canvasHeight",void 0),t([g],rq.prototype,"transform",void 0),t([g],rq.prototype,"hoverTransform",void 0),t([g],rq.prototype,"hoverOpacity",void 0),t([g],rq.prototype,"hoverWidth",void 0),t([g],rq.prototype,"hoverHeight",void 0),t([g],rq.prototype,"hoverDie",void 0),t([g],rq.prototype,"highlightedTags",void 0),t([g],rq.prototype,"dies",void 0),t([g],rq.prototype,"diesTable",void 0),t([g],rq.prototype,"colorScale",void 0)
|
|
12956
|
+
const aq=rq.compose({baseName:"wafer-map",template:hH,styles:uH})
|
|
12957
|
+
wi.getOrCreate().withPrefix("nimble").register(aq())}()
|
|
12956
12958
|
//# sourceMappingURL=all-components-bundle.min.js.map
|