@ni/nimble-components 21.2.1 → 21.3.0
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 +65 -13
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +573 -568
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/table/index.d.ts +4 -1
- package/dist/esm/table/index.js +21 -6
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/models/expansion-manager.d.ts +11 -5
- package/dist/esm/table/models/expansion-manager.js +37 -6
- package/dist/esm/table/models/expansion-manager.js.map +1 -1
- package/dist/esm/table/models/table-validator.d.ts +2 -1
- package/dist/esm/table/models/table-validator.js +3 -0
- package/dist/esm/table/models/table-validator.js.map +1 -1
- package/dist/esm/table/types.d.ts +20 -0
- package/dist/esm/table/types.js +4 -0
- package/dist/esm/table/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -9653,10 +9653,10 @@ const o=e.getColumn(t),r=null==o?void 0:o.getAggregationFn()
|
|
|
9653
9653
|
return r?(m._groupingValuesCache[t]=r(t,f,h),m._groupingValuesCache[t]):void 0}}),p.forEach((e=>{o.push(e),r[e.id]=e})),m}))
|
|
9654
9654
|
return d},a=s(n.rows,0)
|
|
9655
9655
|
return a.forEach((e=>{o.push(e),r[e.id]=e})),{rows:a,flatRows:o,rowsById:r}}),{key:!1,debug:()=>{var t
|
|
9656
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})}const VT={none:void 0,ascending:"ascending",descending:"descending"},
|
|
9657
|
-
class
|
|
9658
|
-
const
|
|
9659
|
-
try{t=document.createElement(e)}catch(e){}if(!(t instanceof
|
|
9656
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})}const VT="canLoadChildren",HT={none:void 0,ascending:"ascending",descending:"descending"},BT={none:void 0,single:"single",multiple:"multiple"},qT="notSelected",UT="selected",jT="partiallySelected",WT="basic",ZT="localeAwareCaseSensitive"
|
|
9657
|
+
class GT extends Ft{}e([g],GT.prototype,"groupHeaderValue",void 0),e([g],GT.prototype,"columnConfig",void 0)
|
|
9658
|
+
const KT=e=>((e=>{let t
|
|
9659
|
+
try{t=document.createElement(e)}catch(e){}if(!(t instanceof GT))throw new Error(`Group header view tag name (${e}) must evaluate to an element extending TableGroupHeaderView`)})(e),Z`
|
|
9660
9660
|
<${e}
|
|
9661
9661
|
:groupHeaderValue="${e=>e.groupRowValue}"
|
|
9662
9662
|
:columnConfig="${e=>e.groupColumn?.columnInternals.columnConfig}"
|
|
@@ -9664,11 +9664,11 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof ZT))throw new Error(
|
|
|
9664
9664
|
>
|
|
9665
9665
|
</${e}>
|
|
9666
9666
|
`)
|
|
9667
|
-
class
|
|
9667
|
+
class JT extends Ft{constructor(){super(...arguments),this.delegatedEvents=[],this.delegatedEventHandler=()=>{}}focusedRecycleCallback(){}columnChanged(){for(const e of this.delegatedEvents)this.removeEventListener(e,this.delegatedEventHandler)
|
|
9668
9668
|
if(this.delegatedEvents=[],this.delegatedEventHandler=()=>{},this.column){this.delegatedEvents=this.column.columnInternals.delegatedEvents,this.delegatedEventHandler=e=>{this.recordId&&this.column?.dispatchEvent(new CustomEvent("delegated-event",{detail:{originalEvent:e,recordId:this.recordId}}))}
|
|
9669
|
-
for(const e of this.delegatedEvents)this.addEventListener(e,this.delegatedEventHandler)}}}e([g],
|
|
9670
|
-
const
|
|
9671
|
-
try{t=document.createElement(e)}catch(e){}if(!(t instanceof
|
|
9669
|
+
for(const e of this.delegatedEvents)this.addEventListener(e,this.delegatedEventHandler)}}}e([g],JT.prototype,"cellRecord",void 0),e([g],JT.prototype,"columnConfig",void 0),e([g],JT.prototype,"column",void 0),e([g],JT.prototype,"recordId",void 0)
|
|
9670
|
+
const XT=e=>((e=>{let t
|
|
9671
|
+
try{t=document.createElement(e)}catch(e){}if(!(t instanceof JT))throw new Error(`Cell view tag name (${e}) must evaluate to an element extending TableCellView`)})(e),Z`
|
|
9672
9672
|
<${e}
|
|
9673
9673
|
:cellRecord="${e=>e.cellState?.cellRecord}"
|
|
9674
9674
|
:columnConfig="${e=>e.cellState?.columnConfig}"
|
|
@@ -9678,11 +9678,11 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof KT))throw new Error(
|
|
|
9678
9678
|
>
|
|
9679
9679
|
</${e}>
|
|
9680
9680
|
`)
|
|
9681
|
-
class
|
|
9682
|
-
return!1}e([g],
|
|
9683
|
-
class
|
|
9684
|
-
class
|
|
9685
|
-
return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateIdFieldConfiguration(e,t,n){const i=e!==
|
|
9681
|
+
class YT{constructor(e){this.uniqueId=ma("table-column-slot"),this.validConfiguration=!0,this.sortOperation=WT,this.dataRecordFieldNames=[],this.groupingDisabled=!1,this.fractionalWidth=1,this.minPixelWidth=117,this.currentFractionalWidth=1,this.currentSortDirection=HT.none,this.cellRecordFieldNames=e.cellRecordFieldNames,this.cellViewTemplate=XT(e.cellViewTag),this.groupHeaderViewTemplate=KT(e.groupHeaderViewTag),this.delegatedEvents=e.delegatedEvents,this.sortOperation=e.sortOperation??WT}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}function QT(e,...t){for(const n of t)if(e===n)return!0
|
|
9682
|
+
return!1}e([g],YT.prototype,"columnConfig",void 0),e([g],YT.prototype,"validConfiguration",void 0),e([g],YT.prototype,"operandDataRecordFieldName",void 0),e([g],YT.prototype,"sortOperation",void 0),e([g],YT.prototype,"dataRecordFieldNames",void 0),e([g],YT.prototype,"groupingDisabled",void 0),e([g],YT.prototype,"groupIndex",void 0),e([g],YT.prototype,"pixelWidth",void 0),e([g],YT.prototype,"fractionalWidth",void 0),e([g],YT.prototype,"minPixelWidth",void 0),e([g],YT.prototype,"currentFractionalWidth",void 0),e([g],YT.prototype,"currentPixelWidth",void 0),e([g],YT.prototype,"currentSortIndex",void 0),e([g],YT.prototype,"currentSortDirection",void 0)
|
|
9683
|
+
class eR extends Ft{constructor(){super(...arguments),this.columnInternals=new YT(this.getColumnInternalsOptions()),this.columnHidden=!1,this.sortDirection=HT.none,this.sortingDisabled=!1,this.hasOverflow=!1}checkValidity(){return this.columnInternals.validConfiguration}get validity(){return{}}get headerTextContent(){return this.contentSlot.assignedNodes().map((e=>e.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=HT.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex)}}e([se({attribute:"column-id"})],eR.prototype,"columnId",void 0),e([se({attribute:"action-menu-slot"})],eR.prototype,"actionMenuSlot",void 0),e([se({attribute:"action-menu-label"})],eR.prototype,"actionMenuLabel",void 0),e([se({attribute:"column-hidden",mode:"boolean"})],eR.prototype,"columnHidden",void 0),e([se({attribute:"sort-index",converter:oe})],eR.prototype,"sortIndex",void 0),e([se({attribute:"sort-direction"})],eR.prototype,"sortDirection",void 0),e([se({attribute:"sorting-disabled",mode:"boolean"})],eR.prototype,"sortingDisabled",void 0),e([g],eR.prototype,"hasOverflow",void 0)
|
|
9684
|
+
class tR{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((e=>!1===e))}areRecordIdsValid(){const e=this.getValidity()
|
|
9685
|
+
return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateIdFieldConfiguration(e,t,n){const i=e!==BT.none||"string"==typeof n
|
|
9686
9686
|
return this.idFieldNameNotConfigured=!!i&&"string"!=typeof t,!this.idFieldNameNotConfigured}validateRecordIds(e,t){if(this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.recordIds.clear(),"string"!=typeof t)return!0
|
|
9687
9687
|
for(const n of e){if(!Object.prototype.hasOwnProperty.call(n,t)){this.missingRecordId=!0
|
|
9688
9688
|
continue}const e=n[t]
|
|
@@ -9691,7 +9691,7 @@ const t=e.some((e=>e))
|
|
|
9691
9691
|
if(!t)return!0
|
|
9692
9692
|
const n=new Set
|
|
9693
9693
|
for(const t of e)t?(n.has(t)&&(this.duplicateColumnId=!0),n.add(t)):this.missingColumnId=!0
|
|
9694
|
-
return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e){return this.duplicateSortIndex=!this.validateIndicesAreUnique(e),!this.duplicateSortIndex}validateColumnGroupIndices(e){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(e),!this.duplicateGroupIndex}validateColumnConfigurations(e){return this.invalidColumnConfiguration=e.some((e=>!e.columnInternals.validConfiguration)),!this.invalidColumnConfiguration}getPresentRecordIds(e){return e.filter((e=>this.recordIds.has(e)))}setParentIdConfigurationValidity(e){this.invalidParentIdConfiguration=!e}validateIndicesAreUnique(e){return new Set(e).size===e.length}}const
|
|
9694
|
+
return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e){return this.duplicateSortIndex=!this.validateIndicesAreUnique(e),!this.duplicateSortIndex}validateColumnGroupIndices(e){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(e),!this.duplicateGroupIndex}validateColumnConfigurations(e){return this.invalidColumnConfiguration=e.some((e=>!e.columnInternals.validConfiguration)),!this.invalidColumnConfiguration}getPresentRecordIds(e){return e.filter((e=>this.recordIds.has(e)))}getOptionsWithPresentIds(e){return e.filter((e=>this.recordIds.has(e.recordId)))}setParentIdConfigurationValidity(e){this.invalidParentIdConfiguration=!e}validateIndicesAreUnique(e){return new Set(e).size===e.length}}const nR=we`
|
|
9695
9695
|
${Oo("flex")}
|
|
9696
9696
|
|
|
9697
9697
|
:host {
|
|
@@ -9873,7 +9873,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
9873
9873
|
background-color: ${Cr(ir,.1)};
|
|
9874
9874
|
position: absolute;
|
|
9875
9875
|
}
|
|
9876
|
-
`)),
|
|
9876
|
+
`)),iR=we`
|
|
9877
9877
|
${Oo("flex")}
|
|
9878
9878
|
|
|
9879
9879
|
:host {
|
|
@@ -9892,7 +9892,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
9892
9892
|
.grouped-indicator {
|
|
9893
9893
|
flex: 0 0 auto;
|
|
9894
9894
|
}
|
|
9895
|
-
`,
|
|
9895
|
+
`,oR=Z`
|
|
9896
9896
|
<template role="columnheader"
|
|
9897
9897
|
aria-sort="${e=>e.ariaSort}"
|
|
9898
9898
|
${""}
|
|
@@ -9900,14 +9900,14 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
9900
9900
|
>
|
|
9901
9901
|
<slot></slot>
|
|
9902
9902
|
${""}
|
|
9903
|
-
${Le((e=>e.sortDirection===
|
|
9903
|
+
${Le((e=>e.sortDirection===HT.ascending),Z`
|
|
9904
9904
|
<${ug}
|
|
9905
9905
|
class="sort-indicator"
|
|
9906
9906
|
title="${e=>jg.getValueFor(e)}"
|
|
9907
9907
|
aria-hidden="true"
|
|
9908
9908
|
></${ug}>
|
|
9909
9909
|
`)}
|
|
9910
|
-
${Le((e=>e.sortDirection===
|
|
9910
|
+
${Le((e=>e.sortDirection===HT.descending),Z`
|
|
9911
9911
|
<${dg}
|
|
9912
9912
|
class="sort-indicator"
|
|
9913
9913
|
title="${e=>Wg.getValueFor(e)}"
|
|
@@ -9924,10 +9924,10 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
9924
9924
|
`)}
|
|
9925
9925
|
</template>
|
|
9926
9926
|
`
|
|
9927
|
-
class
|
|
9928
|
-
const rR
|
|
9929
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
9930
|
-
const
|
|
9927
|
+
class rR extends Ft{constructor(){super(...arguments),this.sortDirection=HT.none,this.firstSortedColumn=!1,this.isGrouped=!1}sortDirectionChanged(e,t){this.updateAriaSort()}firstSortedColumnChanged(e,t){this.updateAriaSort()}updateAriaSort(){this.firstSortedColumn&&this.sortDirection!==HT.none?this.sortDirection===HT.ascending?this.ariaSort="ascending":this.ariaSort="descending":this.ariaSort=null}}e([se({attribute:"sort-direction"})],rR.prototype,"sortDirection",void 0),e([se({attribute:"first-sorted-column",mode:"boolean"})],rR.prototype,"firstSortedColumn",void 0),e([g],rR.prototype,"isGrouped",void 0)
|
|
9928
|
+
const sR=rR.compose({baseName:"table-header",template:oR,styles:iR})
|
|
9929
|
+
bi.getOrCreate().withPrefix("nimble").register(sR())
|
|
9930
|
+
const aR="nimble-table-header",lR=we`
|
|
9931
9931
|
:host .animating {
|
|
9932
9932
|
transition: ${zd} ease-in;
|
|
9933
9933
|
}
|
|
@@ -9950,8 +9950,8 @@ const sR="nimble-table-header",aR=we`
|
|
|
9950
9950
|
transition-duration: 0s;
|
|
9951
9951
|
}
|
|
9952
9952
|
}
|
|
9953
|
-
`,
|
|
9954
|
-
${
|
|
9953
|
+
`,cR=we`
|
|
9954
|
+
${lR}
|
|
9955
9955
|
${Oo("flex")}
|
|
9956
9956
|
|
|
9957
9957
|
:host {
|
|
@@ -10055,7 +10055,7 @@ const sR="nimble-table-header",aR=we`
|
|
|
10055
10055
|
:host([selected]:hover)::before {
|
|
10056
10056
|
background-color: ${Cr(ir,.2)};
|
|
10057
10057
|
}
|
|
10058
|
-
`)),
|
|
10058
|
+
`)),dR=we`
|
|
10059
10059
|
${Oo("flex")}
|
|
10060
10060
|
|
|
10061
10061
|
:host {
|
|
@@ -10085,7 +10085,7 @@ const sR="nimble-table-header",aR=we`
|
|
|
10085
10085
|
height: ${el};
|
|
10086
10086
|
align-self: center;
|
|
10087
10087
|
}
|
|
10088
|
-
`,
|
|
10088
|
+
`,hR=Z`
|
|
10089
10089
|
<template role="cell" style="--ni-private-table-cell-nesting-level: ${e=>e.nestingLevel}">
|
|
10090
10090
|
${e=>e.cellViewTemplate}
|
|
10091
10091
|
${Le((e=>e.hasActionMenu),Z`
|
|
@@ -10105,10 +10105,10 @@ const sR="nimble-table-header",aR=we`
|
|
|
10105
10105
|
`)}
|
|
10106
10106
|
</template>
|
|
10107
10107
|
`
|
|
10108
|
-
class
|
|
10109
|
-
const uR
|
|
10110
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10111
|
-
const
|
|
10108
|
+
class uR extends Ft{constructor(){super(...arguments),this.hasActionMenu=!1,this.menuOpen=!1,this.nestingLevel=0}onActionMenuBeforeToggle(e){this.$emit("cell-action-menu-beforetoggle",e.detail)}onActionMenuToggle(e){this.menuOpen=e.detail.newState,this.$emit("cell-action-menu-toggle",e.detail)}}e([g],uR.prototype,"cellState",void 0),e([g],uR.prototype,"column",void 0),e([g],uR.prototype,"recordId",void 0),e([se({attribute:"column-id"})],uR.prototype,"columnId",void 0),e([se({attribute:"has-action-menu",mode:"boolean"})],uR.prototype,"hasActionMenu",void 0),e([se({attribute:"menu-open",mode:"boolean"})],uR.prototype,"menuOpen",void 0),e([se({attribute:"action-menu-label"})],uR.prototype,"actionMenuLabel",void 0),e([g],uR.prototype,"cellViewTemplate",void 0),e([g],uR.prototype,"nestingLevel",void 0)
|
|
10109
|
+
const pR=uR.compose({baseName:"table-cell",template:hR,styles:dR})
|
|
10110
|
+
bi.getOrCreate().withPrefix("nimble").register(pR())
|
|
10111
|
+
const fR="nimble-table-cell",mR=Z`
|
|
10112
10112
|
<template
|
|
10113
10113
|
role="row"
|
|
10114
10114
|
aria-selected=${e=>e.ariaSelected}
|
|
@@ -10150,7 +10150,7 @@ const pR="nimble-table-cell",fR=Z`
|
|
|
10150
10150
|
>
|
|
10151
10151
|
${je((e=>e.columns),Z`
|
|
10152
10152
|
${Le((e=>!e.columnHidden),Z`
|
|
10153
|
-
<${
|
|
10153
|
+
<${fR}
|
|
10154
10154
|
class="cell"
|
|
10155
10155
|
:cellState="${(e,t)=>t.parent.cellStates[t.index]}"
|
|
10156
10156
|
:cellViewTemplate="${e=>e.columnInternals.cellViewTemplate}"
|
|
@@ -10170,29 +10170,29 @@ const pR="nimble-table-cell",fR=Z`
|
|
|
10170
10170
|
slot="cellActionMenu"
|
|
10171
10171
|
></slot>
|
|
10172
10172
|
`)}
|
|
10173
|
-
</${
|
|
10173
|
+
</${fR}>
|
|
10174
10174
|
`)}
|
|
10175
10175
|
`,{recycle:!1,positioning:!0})}
|
|
10176
10176
|
</span>
|
|
10177
10177
|
</template>
|
|
10178
10178
|
`
|
|
10179
|
-
class
|
|
10179
|
+
class gR extends Ft{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.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 ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionChange(e){if(this.ignoreSelectionChangeEvents)return
|
|
10180
10180
|
const t=e.target.checked
|
|
10181
10181
|
this.selected=t
|
|
10182
10182
|
const n={oldState:!t,newState:t}
|
|
10183
|
-
this.$emit("row-selection-toggle",n)}onCellActionMenuBeforeToggle(e,t){this.currentActionMenuColumn=t,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",e.detail,t)}onCellActionMenuToggle(e,t){this.menuOpen=e.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",e.detail,t)}closeOpenActionMenus(){if(this.menuOpen){const e=Array.from(this.cellContainer.children).find((e=>e instanceof
|
|
10184
|
-
e?.actionMenuButton?.open&&e.actionMenuButton.toggleButton.control.click()}}handleChange(e,t){e instanceof
|
|
10183
|
+
this.$emit("row-selection-toggle",n)}onCellActionMenuBeforeToggle(e,t){this.currentActionMenuColumn=t,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",e.detail,t)}onCellActionMenuToggle(e,t){this.menuOpen=e.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",e.detail,t)}closeOpenActionMenus(){if(this.menuOpen){const e=Array.from(this.cellContainer.children).find((e=>e instanceof uR&&e.menuOpen))
|
|
10184
|
+
e?.actionMenuButton?.open&&e.actionMenuButton.toggleButton.control.click()}}handleChange(e,t){e instanceof YT&&"string"==typeof t&&(QT(t,"columnConfig")||QT(t,"dataRecordFieldNames"))&&this.updateCellStates()}onRowExpandToggle(e){const t={oldState:this.expanded,newState:!this.expanded,recordId:this.recordId}
|
|
10185
10185
|
this.$emit("row-expand-toggle",t),e.stopImmediatePropagation(),this.animationClass="animating",this.expandIcon?.addEventListener("transitionend",this.removeAnimatingClass)}emitActionMenuToggleEvent(e,t,n){const i={newState:t.newState,oldState:t.oldState,recordIds:[this.recordId],columnId:n.columnId}
|
|
10186
10186
|
this.$emit(e,i)}columnsChanged(){this.updateCellIndentLevels(),this.updateCellStates(),this.observeColumns()}dataRecordChanged(){this.updateCellStates()}nestingLevelChanged(){this.updateCellIndentLevels()}updateCellIndentLevels(){this.cellIndentLevels=this.columns.map(((e,t)=>0===t?this.nestingLevel:0))}removeColumnObservers(){this.columnNotifiers.forEach((e=>{e.unsubscribe(this)})),this.columnNotifiers=[]}observeColumns(){this.removeColumnObservers(),this.columnNotifiers=this.columns.map((e=>{const t=m.getNotifier(e.columnInternals)
|
|
10187
10187
|
return t.subscribe(this),t}))}updateCellStates(){this.cellStates=this.columns.map((e=>{const t=e.columnInternals.dataRecordFieldNames
|
|
10188
10188
|
let n
|
|
10189
10189
|
if(this.hasValidFieldNames(t)&&this.dataRecord){const i=t.map((e=>this.dataRecord[e]))
|
|
10190
|
-
n={cellRecord:Object.fromEntries(e.columnInternals.cellRecordFieldNames.map(((e,t)=>[e,i[t]]))),columnConfig:e.columnInternals.columnConfig}}return n}))}hasValidFieldNames(e){return e.every((e=>void 0!==e))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}e([se({attribute:"record-id"})],
|
|
10191
|
-
const gR
|
|
10192
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10193
|
-
const
|
|
10190
|
+
n={cellRecord:Object.fromEntries(e.columnInternals.cellRecordFieldNames.map(((e,t)=>[e,i[t]]))),columnConfig:e.columnInternals.columnConfig}}return n}))}hasValidFieldNames(e){return e.every((e=>void 0!==e))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}e([se({attribute:"record-id"})],gR.prototype,"recordId",void 0),e([se({mode:"boolean"})],gR.prototype,"selectable",void 0),e([se({mode:"boolean"})],gR.prototype,"selected",void 0),e([se({attribute:"hide-selection",mode:"boolean"})],gR.prototype,"hideSelection",void 0),e([se({mode:"boolean"})],gR.prototype,"expanded",void 0),e([g],gR.prototype,"dataRecord",void 0),e([g],gR.prototype,"columns",void 0),e([g],gR.prototype,"currentActionMenuColumn",void 0),e([g],gR.prototype,"nestingLevel",void 0),e([se({attribute:"is-parent-row",mode:"boolean"})],gR.prototype,"isParentRow",void 0),e([se({attribute:"menu-open",mode:"boolean"})],gR.prototype,"menuOpen",void 0),e([se({attribute:"row-operation-grid-cell-hidden",mode:"boolean"})],gR.prototype,"rowOperationGridCellHidden",void 0),e([g],gR.prototype,"cellIndentLevels",void 0),e([g],gR.prototype,"cellStates",void 0),e([g],gR.prototype,"selectionCheckbox",void 0),e([g],gR.prototype,"animationClass",void 0),e([v],gR.prototype,"isTopLevelParentRow",null),e([v],gR.prototype,"ariaSelected",null)
|
|
10191
|
+
const vR=gR.compose({baseName:"table-row",template:mR,styles:cR})
|
|
10192
|
+
bi.getOrCreate().withPrefix("nimble").register(vR())
|
|
10193
|
+
const bR="nimble-table-row",wR=we`
|
|
10194
10194
|
${Oo("grid")}
|
|
10195
|
-
${
|
|
10195
|
+
${lR}
|
|
10196
10196
|
|
|
10197
10197
|
:host {
|
|
10198
10198
|
align-items: center;
|
|
@@ -10275,7 +10275,7 @@ const vR="nimble-table-row",bR=we`
|
|
|
10275
10275
|
:host(:hover)::before {
|
|
10276
10276
|
background-color: ${Cr(ir,.1)};
|
|
10277
10277
|
}
|
|
10278
|
-
`)),
|
|
10278
|
+
`)),yR=Z`
|
|
10279
10279
|
<template
|
|
10280
10280
|
role="row"
|
|
10281
10281
|
@click=${e=>e.onGroupExpandToggle()}
|
|
@@ -10315,14 +10315,14 @@ const vR="nimble-table-row",bR=we`
|
|
|
10315
10315
|
</div>
|
|
10316
10316
|
</template>
|
|
10317
10317
|
`
|
|
10318
|
-
class
|
|
10318
|
+
class xR extends Ft{constructor(){super(...arguments),this.nestingLevel=0,this.expanded=!1,this.selectable=!1,this.selectionState=qT,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(e){if(this.ignoreSelectionChangeEvents)return
|
|
10319
10319
|
const t=e.target.checked
|
|
10320
|
-
this.selectionState=t?qT
|
|
10320
|
+
this.selectionState=t?UT:qT
|
|
10321
10321
|
const n={oldState:!t,newState:t}
|
|
10322
|
-
this.$emit("group-selection-toggle",n)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
10323
|
-
const xR
|
|
10324
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10325
|
-
const
|
|
10322
|
+
this.$emit("group-selection-toggle",n)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===UT,this.selectionCheckbox.indeterminate=this.selectionState===jT,this.ignoreSelectionChangeEvents=!1)}}e([g],xR.prototype,"groupRowValue",void 0),e([g],xR.prototype,"nestingLevel",void 0),e([g],xR.prototype,"immediateChildCount",void 0),e([g],xR.prototype,"groupColumn",void 0),e([se({mode:"boolean"})],xR.prototype,"expanded",void 0),e([se({mode:"boolean"})],xR.prototype,"selectable",void 0),e([se({attribute:"selection-state"})],xR.prototype,"selectionState",void 0),e([g],xR.prototype,"selectionCheckbox",void 0),e([g],xR.prototype,"animationClass",void 0)
|
|
10323
|
+
const kR=xR.compose({baseName:"table-group-row",template:yR,styles:wR})
|
|
10324
|
+
bi.getOrCreate().withPrefix("nimble").register(kR())
|
|
10325
|
+
const CR="nimble-table-group-row",SR=Z`
|
|
10326
10326
|
<template
|
|
10327
10327
|
role="treegrid"
|
|
10328
10328
|
aria-multiselectable="${e=>e.ariaMultiSelectable}"
|
|
@@ -10348,7 +10348,7 @@ const kR="nimble-table-group-row",CR=Z`
|
|
|
10348
10348
|
${e=>Jg.getValueFor(e)}
|
|
10349
10349
|
</span>
|
|
10350
10350
|
`)}
|
|
10351
|
-
${Le((e=>e.selectionMode===
|
|
10351
|
+
${Le((e=>e.selectionMode===BT.multiple),Z`
|
|
10352
10352
|
<span class="checkbox-container">
|
|
10353
10353
|
<${Nm}
|
|
10354
10354
|
${Ne("selectionCheckbox")}
|
|
@@ -10379,15 +10379,15 @@ const kR="nimble-table-group-row",CR=Z`
|
|
|
10379
10379
|
@mousedown="${(e,t)=>t.parent.onLeftDividerMouseDown(t.event,t.index)}">
|
|
10380
10380
|
</div>
|
|
10381
10381
|
`)}
|
|
10382
|
-
<${
|
|
10382
|
+
<${aR}
|
|
10383
10383
|
class="header"
|
|
10384
|
-
sort-direction="${e=>"number"==typeof e.columnInternals.currentSortIndex?e.columnInternals.currentSortDirection:
|
|
10384
|
+
sort-direction="${e=>"number"==typeof e.columnInternals.currentSortIndex?e.columnInternals.currentSortDirection:HT.none}"
|
|
10385
10385
|
?first-sorted-column="${(e,t)=>e===t.parent.firstSortedColumn}"
|
|
10386
10386
|
@click="${(e,t)=>t.parent.toggleColumnSort(e,t.event.shiftKey)}"
|
|
10387
10387
|
:isGrouped=${e=>"number"==typeof e.columnInternals.groupIndex&&!e.columnInternals.groupingDisabled}
|
|
10388
10388
|
>
|
|
10389
10389
|
<slot name="${e=>e.slot}"></slot>
|
|
10390
|
-
</${
|
|
10390
|
+
</${aR}>
|
|
10391
10391
|
${Le(((e,t)=>t.index<t.length-1),Z`
|
|
10392
10392
|
<div class="column-divider right ${(e,t)=>""+(t.parent.layoutManager.activeColumnIndex===t.index?"active":"")}"
|
|
10393
10393
|
@mousedown="${(e,t)=>t.parent.onRightDividerMouseDown(t.event,t.index)}">
|
|
@@ -10401,33 +10401,33 @@ const kR="nimble-table-group-row",CR=Z`
|
|
|
10401
10401
|
</div>
|
|
10402
10402
|
<div class="table-viewport" ${Ne("viewport")}>
|
|
10403
10403
|
<div class="table-scroll"></div>
|
|
10404
|
-
<div class="table-row-container" ${Xe({property:"rowElements",filter:We(
|
|
10404
|
+
<div class="table-row-container" ${Xe({property:"rowElements",filter:We(bR)})}
|
|
10405
10405
|
role="rowgroup">
|
|
10406
10406
|
${Le((e=>e.columns.length>0&&e.canRenderRows),Z`
|
|
10407
10407
|
${je((e=>e.virtualizer.visibleItems),Z`
|
|
10408
10408
|
${Le(((e,t)=>t.parent.tableData[e.index]?.isGroupRow),Z`
|
|
10409
|
-
<${
|
|
10409
|
+
<${CR}
|
|
10410
10410
|
class="group-row"
|
|
10411
10411
|
:groupRowValue="${(e,t)=>t.parent.tableData[e.index]?.groupRowValue}"
|
|
10412
10412
|
?expanded="${(e,t)=>t.parent.tableData[e.index]?.isExpanded}"
|
|
10413
10413
|
:nestingLevel="${(e,t)=>t.parent.tableData[e.index]?.nestingLevel}"
|
|
10414
10414
|
:immediateChildCount="${(e,t)=>t.parent.tableData[e.index]?.immediateChildCount}"
|
|
10415
10415
|
:groupColumn="${(e,t)=>t.parent.tableData[e.index]?.groupColumn}"
|
|
10416
|
-
?selectable="${(e,t)=>t.parent.selectionMode===
|
|
10416
|
+
?selectable="${(e,t)=>t.parent.selectionMode===BT.multiple}"
|
|
10417
10417
|
selection-state="${(e,t)=>t.parent.tableData[e.index]?.selectionState}"
|
|
10418
10418
|
@group-selection-toggle="${(e,t)=>t.parent.onRowSelectionToggle(e.index,t.event)}"
|
|
10419
10419
|
@group-expand-toggle="${(e,t)=>t.parent.handleGroupRowExpanded(e.index,t.event)}"
|
|
10420
10420
|
>
|
|
10421
|
-
</${
|
|
10421
|
+
</${CR}>
|
|
10422
10422
|
`)}
|
|
10423
10423
|
${Le(((e,t)=>!t.parent.tableData[e.index]?.isGroupRow),Z`
|
|
10424
|
-
<${
|
|
10424
|
+
<${bR}
|
|
10425
10425
|
class="row"
|
|
10426
10426
|
record-id="${(e,t)=>t.parent.tableData[e.index]?.id}"
|
|
10427
|
-
?selectable="${(e,t)=>t.parent.selectionMode!==
|
|
10428
|
-
?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===
|
|
10427
|
+
?selectable="${(e,t)=>t.parent.selectionMode!==BT.none}"
|
|
10428
|
+
?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===UT}"
|
|
10429
10429
|
?expanded="${(e,t)=>t.parent.tableData[e.index]?.isExpanded}"
|
|
10430
|
-
?hide-selection="${(e,t)=>t.parent.selectionMode!==
|
|
10430
|
+
?hide-selection="${(e,t)=>t.parent.selectionMode!==BT.multiple}"
|
|
10431
10431
|
:dataRecord="${(e,t)=>t.parent.tableData[e.index]?.record}"
|
|
10432
10432
|
:columns="${(e,t)=>t.parent.columns}"
|
|
10433
10433
|
:isParentRow="${(e,t)=>t.parent.tableData[e.index]?.isParentRow}"
|
|
@@ -10448,7 +10448,7 @@ const kR="nimble-table-group-row",CR=Z`
|
|
|
10448
10448
|
</slot>
|
|
10449
10449
|
`)}
|
|
10450
10450
|
`)}
|
|
10451
|
-
</${
|
|
10451
|
+
</${bR}>
|
|
10452
10452
|
`)}
|
|
10453
10453
|
`)}
|
|
10454
10454
|
`)}
|
|
@@ -10468,8 +10468,8 @@ const kR="nimble-table-group-row",CR=Z`
|
|
|
10468
10468
|
*
|
|
10469
10469
|
* @license MIT
|
|
10470
10470
|
*/
|
|
10471
|
-
function
|
|
10472
|
-
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}
|
|
10471
|
+
function $R(){return $R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]
|
|
10472
|
+
for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},$R.apply(this,arguments)}
|
|
10473
10473
|
/**
|
|
10474
10474
|
* virtual-core
|
|
10475
10475
|
*
|
|
@@ -10479,53 +10479,53 @@ for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},
|
|
|
10479
10479
|
* LICENSE.md file in the root directory of this source tree.
|
|
10480
10480
|
*
|
|
10481
10481
|
* @license MIT
|
|
10482
|
-
*/function
|
|
10482
|
+
*/function MR(e,t,n){var i,o,r=null!=(i=n.initialDeps)?i:[]
|
|
10483
10483
|
return function(){var i
|
|
10484
10484
|
n.key&&null!=n.debug&&n.debug()&&(i=Date.now())
|
|
10485
10485
|
var s,a=e()
|
|
10486
10486
|
if(!(a.length!==r.length||a.some((function(e,t){return r[t]!==e}))))return o
|
|
10487
10487
|
if(r=a,n.key&&null!=n.debug&&n.debug()&&(s=Date.now()),o=t.apply(void 0,a),n.key&&null!=n.debug&&n.debug()){var l=Math.round(100*(Date.now()-i))/100,c=Math.round(100*(Date.now()-s))/100,d=c/16,h=function(e,t){for(e=String(e);e.length<t;)e=" "+e
|
|
10488
10488
|
return e}
|
|
10489
|
-
console.info("%c⏱ "+h(c,5)+" /"+h(l,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*d,120))+"deg 100% 31%);",null==n?void 0:n.key)}return null==n||null==n.onChange||n.onChange(o),o}}function
|
|
10490
|
-
return e}var
|
|
10491
|
-
return i},
|
|
10489
|
+
console.info("%c⏱ "+h(c,5)+" /"+h(l,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*d,120))+"deg 100% 31%);",null==n?void 0:n.key)}return null==n||null==n.onChange||n.onChange(o),o}}function _R(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?": "+t:""))
|
|
10490
|
+
return e}var ER=function(e){return e},IR=function(e){for(var t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[],o=t;o<=n;o++)i.push(o)
|
|
10491
|
+
return i},AR=function(e,t){var n=e.scrollElement
|
|
10492
10492
|
if(n){var i=function(e){var n=e.width,i=e.height
|
|
10493
10493
|
t({width:Math.round(n),height:Math.round(i)})}
|
|
10494
10494
|
i(n.getBoundingClientRect())
|
|
10495
10495
|
var o=new ResizeObserver((function(e){var t=e[0]
|
|
10496
10496
|
if(null!=t&&t.borderBoxSize){var o=t.borderBoxSize[0]
|
|
10497
10497
|
if(o)return void i({width:o.inlineSize,height:o.blockSize})}i(n.getBoundingClientRect())}))
|
|
10498
|
-
return o.observe(n,{box:"border-box"}),function(){o.unobserve(n)}}},
|
|
10498
|
+
return o.observe(n,{box:"border-box"}),function(){o.unobserve(n)}}},OR=function(e,t){var n=e.scrollElement
|
|
10499
10499
|
if(n){var i=function(){t(n[e.options.horizontal?"scrollLeft":"scrollTop"])}
|
|
10500
|
-
return i(),n.addEventListener("scroll",i,{passive:!0}),function(){n.removeEventListener("scroll",i)}}},
|
|
10501
|
-
if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},
|
|
10502
|
-
null==(i=n.scrollElement)||null==i.scrollTo||i.scrollTo(((o={})[n.options.horizontal?"left":"top"]=l,o.behavior=a,o))},
|
|
10500
|
+
return i(),n.addEventListener("scroll",i,{passive:!0}),function(){n.removeEventListener("scroll",i)}}},TR=function(e,t,n){if(null!=t&&t.borderBoxSize){var i=t.borderBoxSize[0]
|
|
10501
|
+
if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},RR=function(e,t,n){var i,o,r=t.adjustments,s=void 0===r?0:r,a=t.behavior,l=e+s
|
|
10502
|
+
null==(i=n.scrollElement)||null==i.scrollTo||i.scrollTo(((o={})[n.options.horizontal?"left":"top"]=l,o.behavior=a,o))},DR=function(e){var t=this
|
|
10503
10503
|
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=function(){var e=null,n=function(){return e||("undefined"!=typeof ResizeObserver?e=new ResizeObserver((function(e){e.forEach((function(e){t._measureElement(e.target,e)}))})):null)}
|
|
10504
10504
|
return{disconnect:function(){var e
|
|
10505
10505
|
return null==(e=n())?void 0:e.disconnect()},observe:function(e){var t
|
|
10506
10506
|
return null==(t=n())?void 0:t.observe(e,{box:"border-box"})},unobserve:function(e){var t
|
|
10507
10507
|
return null==(t=n())?void 0:t.unobserve(e)}}}(),this.range=null,this.setOptions=function(e){Object.entries(e).forEach((function(t){var n=t[0]
|
|
10508
|
-
void 0===t[1]&&delete e[n]})),t.options
|
|
10509
|
-
t.scrollElement!==e&&(t.cleanup(),t.scrollElement=e,t._scrollToOffset(t.scrollOffset,{adjustments:void 0,behavior:void 0}),t.unsubs.push(t.options.observeElementRect(t,(function(e){t.scrollRect=e,t.maybeNotify()}))),t.unsubs.push(t.options.observeElementOffset(t,(function(e){t.scrollAdjustments=0,t.scrollOffset!==e&&(null!==t.isScrollingTimeoutId&&(clearTimeout(t.isScrollingTimeoutId),t.isScrollingTimeoutId=null),t.isScrolling=!0,t.scrollDirection=t.scrollOffset<e?"forward":"backward",t.scrollOffset=e,t.maybeNotify(),t.isScrollingTimeoutId=setTimeout((function(){t.isScrollingTimeoutId=null,t.isScrolling=!1,t.scrollDirection=null,t.maybeNotify()}),t.options.scrollingDelay))}))))},this.getSize=function(){return t.scrollRect[t.options.horizontal?"width":"height"]},this.memoOptions
|
|
10508
|
+
void 0===t[1]&&delete e[n]})),t.options=$R({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ER,rangeExtractor:IR,onChange:function(){},measureElement:TR,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},e)},this.notify=function(e){null==t.options.onChange||t.options.onChange(t,e)},this.maybeNotify=MR((function(){return t.calculateRange(),[t.isScrolling,t.range?t.range.startIndex:null,t.range?t.range.endIndex:null]}),(function(e){t.notify(e)}),{key:!1,debug:function(){return t.options.debug},initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=function(){t.unsubs.filter(Boolean).forEach((function(e){return e()})),t.unsubs=[],t.scrollElement=null},this._didMount=function(){return t.measureElementCache.forEach(t.observer.observe),function(){t.observer.disconnect(),t.cleanup()}},this._willUpdate=function(){var e=t.options.getScrollElement()
|
|
10509
|
+
t.scrollElement!==e&&(t.cleanup(),t.scrollElement=e,t._scrollToOffset(t.scrollOffset,{adjustments:void 0,behavior:void 0}),t.unsubs.push(t.options.observeElementRect(t,(function(e){t.scrollRect=e,t.maybeNotify()}))),t.unsubs.push(t.options.observeElementOffset(t,(function(e){t.scrollAdjustments=0,t.scrollOffset!==e&&(null!==t.isScrollingTimeoutId&&(clearTimeout(t.isScrollingTimeoutId),t.isScrollingTimeoutId=null),t.isScrolling=!0,t.scrollDirection=t.scrollOffset<e?"forward":"backward",t.scrollOffset=e,t.maybeNotify(),t.isScrollingTimeoutId=setTimeout((function(){t.isScrollingTimeoutId=null,t.isScrolling=!1,t.scrollDirection=null,t.maybeNotify()}),t.options.scrollingDelay))}))))},this.getSize=function(){return t.scrollRect[t.options.horizontal?"width":"height"]},this.memoOptions=MR((function(){return[t.options.count,t.options.paddingStart,t.options.scrollMargin,t.options.getItemKey]}),(function(e,n,i,o){return t.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:n,scrollMargin:i,getItemKey:o}}),{key:!1}),this.getFurthestMeasurement=function(e,n){for(var i=new Map,o=new Map,r=n-1;r>=0;r--){var s=e[r]
|
|
10510
10510
|
if(!i.has(s.lane)){var a=o.get(s.lane)
|
|
10511
|
-
if(null==a||s.end>a.end?o.set(s.lane,s):s.end<a.end&&i.set(s.lane,!0),i.size===t.options.lanes)break}}return o.size===t.options.lanes?Array.from(o.values()).sort((function(e,t){return e.end-t.end}))[0]:void 0},this.getMeasurements
|
|
10511
|
+
if(null==a||s.end>a.end?o.set(s.lane,s):s.end<a.end&&i.set(s.lane,!0),i.size===t.options.lanes)break}}return o.size===t.options.lanes?Array.from(o.values()).sort((function(e,t){return e.end-t.end}))[0]:void 0},this.getMeasurements=MR((function(){return[t.memoOptions(),t.itemSizeCache]}),(function(e,n){var i=e.count,o=e.paddingStart,r=e.scrollMargin,s=e.getItemKey,a=t.pendingMeasuredCacheIndexes.length>0?Math.min.apply(Math,t.pendingMeasuredCacheIndexes):0
|
|
10512
10512
|
t.pendingMeasuredCacheIndexes=[]
|
|
10513
10513
|
for(var l=t.measurementsCache.slice(0,a),c=a;c<i;c++){var d=s(c),h=1===t.options.lanes?l[c-1]:t.getFurthestMeasurement(l,c),u=h?h.end:o+r,p=n.get(d),f="number"==typeof p?p:t.options.estimateSize(c),m=u+f,g=h?h.lane:c%t.options.lanes
|
|
10514
|
-
l[c]={index:c,start:u,size:f,end:m,key:d,lane:g}}return t.measurementsCache=l,l}),{key:!1,debug:function(){return t.options.debug}}),this.calculateRange
|
|
10514
|
+
l[c]={index:c,start:u,size:f,end:m,key:d,lane:g}}return t.measurementsCache=l,l}),{key:!1,debug:function(){return t.options.debug}}),this.calculateRange=MR((function(){return[t.getMeasurements(),t.getSize(),t.scrollOffset]}),(function(e,n,i){return t.range=e.length>0&&n>0?function(e){var t=e.measurements,n=e.outerSize,i=e.scrollOffset,o=t.length-1,r=function(e){return t[e].start},s=NR(0,o,r,i),a=s
|
|
10515
10515
|
for(;a<o&&t[a].end<i+n;)a++
|
|
10516
|
-
return{startIndex:s,endIndex:a}}({measurements:e,outerSize:n,scrollOffset:i}):null}),{key:!1,debug:function(){return t.options.debug}}),this.getIndexes
|
|
10516
|
+
return{startIndex:s,endIndex:a}}({measurements:e,outerSize:n,scrollOffset:i}):null}),{key:!1,debug:function(){return t.options.debug}}),this.getIndexes=MR((function(){return[t.options.rangeExtractor,t.calculateRange(),t.options.overscan,t.options.count]}),(function(e,t,n,i){return null===t?[]:e($R({},t,{overscan:n,count:i}))}),{key:!1,debug:function(){return t.options.debug}}),this.indexFromElement=function(e){var n=t.options.indexAttribute,i=e.getAttribute(n)
|
|
10517
10517
|
return i?parseInt(i,10):(console.warn("Missing attribute name '"+n+"={index}' on measured element."),-1)},this._measureElement=function(e,n){var i=t.measurementsCache[t.indexFromElement(e)]
|
|
10518
10518
|
if(i&&e.isConnected){var o=t.measureElementCache.get(i.key)
|
|
10519
10519
|
o!==e&&(o&&t.observer.unobserve(o),t.observer.observe(e),t.measureElementCache.set(i.key,e))
|
|
10520
10520
|
var r=t.options.measureElement(e,n,t)
|
|
10521
10521
|
t.resizeItem(i,r)}else t.measureElementCache.forEach((function(n,i){n===e&&(t.observer.unobserve(e),t.measureElementCache.delete(i))}))},this.resizeItem=function(e,n){var i,o=n-(null!=(i=t.itemSizeCache.get(e.key))?i:e.size)
|
|
10522
|
-
0!==o&&(e.start<t.scrollOffset&&t._scrollToOffset(t.scrollOffset,{adjustments:t.scrollAdjustments+=o,behavior:void 0}),t.pendingMeasuredCacheIndexes.push(e.index),t.itemSizeCache=new Map(t.itemSizeCache.set(e.key,n)),t.notify(!1))},this.measureElement=function(e){e&&t._measureElement(e,void 0)},this.getVirtualItems
|
|
10522
|
+
0!==o&&(e.start<t.scrollOffset&&t._scrollToOffset(t.scrollOffset,{adjustments:t.scrollAdjustments+=o,behavior:void 0}),t.pendingMeasuredCacheIndexes.push(e.index),t.itemSizeCache=new Map(t.itemSizeCache.set(e.key,n)),t.notify(!1))},this.measureElement=function(e){e&&t._measureElement(e,void 0)},this.getVirtualItems=MR((function(){return[t.getIndexes(),t.getMeasurements()]}),(function(e,t){for(var n=[],i=0,o=e.length;i<o;i++){var r=t[e[i]]
|
|
10523
10523
|
n.push(r)}return n}),{key:!1,debug:function(){return t.options.debug}}),this.getVirtualItemForOffset=function(e){var n=t.getMeasurements()
|
|
10524
|
-
return
|
|
10524
|
+
return _R(n[NR(0,n.length-1,(function(e){return _R(n[e]).start}),e)])},this.getOffsetForAlignment=function(e,n){var i=t.getSize()
|
|
10525
10525
|
"auto"===n&&(n=e<=t.scrollOffset?"start":e>=t.scrollOffset+i?"end":"start"),"start"===n||("end"===n?e-=i:"center"===n&&(e-=i/2))
|
|
10526
10526
|
var o=t.options.horizontal?"scrollWidth":"scrollHeight",r=(t.scrollElement?"document"in t.scrollElement?t.scrollElement.document.documentElement[o]:t.scrollElement[o]:0)-t.getSize()
|
|
10527
10527
|
return Math.max(Math.min(r,e),0)},this.getOffsetForIndex=function(e,n){void 0===n&&(n="auto"),e=Math.max(0,Math.min(e,t.options.count-1))
|
|
10528
|
-
var i=
|
|
10528
|
+
var i=_R(t.getMeasurements()[e])
|
|
10529
10529
|
if("auto"===n)if(i.end>=t.scrollOffset+t.getSize()-t.options.scrollPaddingEnd)n="end"
|
|
10530
10530
|
else{if(!(i.start<=t.scrollOffset+t.options.scrollPaddingStart))return[t.scrollOffset,n]
|
|
10531
10531
|
n="start"}var o="end"===n?i.end+t.options.scrollPaddingEnd:i.start-t.options.scrollPaddingStart
|
|
@@ -10538,7 +10538,7 @@ if(t.scrollToIndexTimeoutId=null,t.measureElementCache.has(t.options.getItemKey(
|
|
|
10538
10538
|
n=o,i=t.scrollOffset,Math.abs(n-i)<1||t.scrollToIndex(e,{align:c,behavior:s})}else t.scrollToIndex(e,{align:c,behavior:s})})))},this.scrollBy=function(e,n){var i=(void 0===n?{}:n).behavior
|
|
10539
10539
|
t.cancelScrollToIndex(),"smooth"===i&&t.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t._scrollToOffset(t.scrollOffset+e,{adjustments:void 0,behavior:i})},this.getTotalSize=function(){var e
|
|
10540
10540
|
return((null==(e=t.getMeasurements()[t.options.count-1])?void 0:e.end)||t.options.paddingStart)-t.options.scrollMargin+t.options.paddingEnd},this._scrollToOffset=function(e,n){var i=n.adjustments,o=n.behavior
|
|
10541
|
-
t.options.scrollToFn(e,{behavior:o,adjustments:i},t)},this.measure=function(){t.itemSizeCache=new Map,t.notify(!1)},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((function(e){t.itemSizeCache.set(e.key,e.size)})),this.maybeNotify()},
|
|
10541
|
+
t.options.scrollToFn(e,{behavior:o,adjustments:i},t)},this.measure=function(){t.itemSizeCache=new Map,t.notify(!1)},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((function(e){t.itemSizeCache.set(e.key,e.size)})),this.maybeNotify()},NR=function(e,t,n,i){for(;e<=t;){var o=(e+t)/2|0,r=n(o)
|
|
10542
10542
|
if(r<i)e=o+1
|
|
10543
10543
|
else{if(!(r>i))return o
|
|
10544
10544
|
t=o-1}}return e>0?e-1:0}
|
|
@@ -10552,23 +10552,23 @@ t=o-1}}return e>0?e-1:0}
|
|
|
10552
10552
|
* LICENSE.md file in the root directory of this source tree.
|
|
10553
10553
|
*
|
|
10554
10554
|
* @license MIT
|
|
10555
|
-
*/class
|
|
10555
|
+
*/class PR{constructor(e,t){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this.table=e,this.tanStackTable=t,this.viewportResizeObserver=new ResizeObserver((e=>{const t=e[0]?.borderBoxSize[0]
|
|
10556
10556
|
if(t){const e=t.inlineSize
|
|
10557
10557
|
this.headerContainerMarginRight=e-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 e=this.createVirtualizerOptions()
|
|
10558
|
-
this.virtualizer?this.virtualizer.setOptions(e):this.virtualizer=new
|
|
10559
|
-
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:t=>e,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:
|
|
10558
|
+
this.virtualizer?this.virtualizer.setOptions(e):this.virtualizer=new DR(e),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const e=parseFloat(Qa.getValueFor(this.table))+2*parseFloat(rl.getValueFor(this.table))
|
|
10559
|
+
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:t=>e,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:RR,observeElementOffset:OR,observeElementRect:AR,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){this.notifyFocusedCellRecycling()
|
|
10560
10560
|
const e=this.virtualizer
|
|
10561
10561
|
this.visibleItems=e.getVirtualItems(),this.scrollHeight=e.getTotalSize()
|
|
10562
10562
|
let t=0
|
|
10563
10563
|
if(this.visibleItems.length>0){t=this.visibleItems[0].start}this.rowContainerYOffset=t}notifyFocusedCellRecycling(){let e=this.table.shadowRoot.activeElement
|
|
10564
|
-
for(;null!==e&&!(e instanceof
|
|
10565
|
-
if(e instanceof
|
|
10566
|
-
e?.closeOpenActionMenus()}}}function
|
|
10567
|
-
case
|
|
10568
|
-
default:return
|
|
10569
|
-
return"string"==typeof i&&"string"==typeof o?i.localeCompare(o):i===o?0:void 0===i||null===i&&void 0!==o?-1:1}function
|
|
10570
|
-
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}e([g],
|
|
10571
|
-
class
|
|
10564
|
+
for(;null!==e&&!(e instanceof JT)&&e.shadowRoot;)e=e.shadowRoot.activeElement
|
|
10565
|
+
if(e instanceof JT&&e.focusedRecycleCallback(),void 0!==this.table.openActionMenuRecordId){const e=this.table.rowElements.find((e=>e.recordId===this.table.openActionMenuRecordId))
|
|
10566
|
+
e?.closeOpenActionMenus()}}}function zR(e){switch(e){case WT:return LR
|
|
10567
|
+
case ZT:return FR
|
|
10568
|
+
default:return LR}}function FR(e,t,n){const i=e.getValue(n),o=t.getValue(n)
|
|
10569
|
+
return"string"==typeof i&&"string"==typeof o?i.localeCompare(o):i===o?0:void 0===i||null===i&&void 0!==o?-1:1}function LR(e,t,n){const i=e.getValue(n),o=t.getValue(n)
|
|
10570
|
+
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}e([g],PR.prototype,"visibleItems",void 0),e([g],PR.prototype,"scrollHeight",void 0),e([g],PR.prototype,"headerContainerMarginRight",void 0),e([g],PR.prototype,"rowContainerYOffset",void 0)
|
|
10571
|
+
class VR{constructor(e){this.table=e,this.isColumnBeingSized=!1,this.visibleColumns=[],this.currentTotalDelta=0,this.dragStart=0,this.initialColumnWidths=[],this.onDividerMouseMove=e=>{const t=e
|
|
10572
10572
|
for(let e=0;e<this.visibleColumns.length;e++)this.visibleColumns[e].columnInternals.currentPixelWidth=this.initialColumnWidths[e]?.initialPixelWidth
|
|
10573
10573
|
this.currentTotalDelta=this.getAllowedSizeDelta(t.clientX-this.dragStart),this.performCascadeSizeLeft(this.leftColumnIndex,this.currentTotalDelta),this.performCascadeSizeRight(this.rightColumnIndex,this.currentTotalDelta)
|
|
10574
10574
|
const n=this.getTotalColumnFixedWidth()-this.initialColumnTotalWidth
|
|
@@ -10592,10 +10592,10 @@ for(const e of this.visibleColumns)this.initialColumnWidths.push({initalColumnFr
|
|
|
10592
10592
|
const e=this.gridSizedColumns.reduce(((e,t)=>e+t.columnInternals.currentPixelWidth),0),t=e/this.gridSizedColumns.length
|
|
10593
10593
|
let n=0
|
|
10594
10594
|
for(let e=0;e<this.visibleColumns.length&&n<this.gridSizedColumns.length;e++){const i=this.visibleColumns[e]
|
|
10595
|
-
i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/t,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((e=>!e.columnHidden))}getLeftColumnIndexFromDivider(e){return Math.floor(e/2)}}e([g],
|
|
10596
|
-
const
|
|
10597
|
-
return!1},
|
|
10598
|
-
class
|
|
10595
|
+
i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/t,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((e=>!e.columnHidden))}getLeftColumnIndexFromDivider(e){return Math.floor(e/2)}}e([g],VR.prototype,"isColumnBeingSized",void 0),e([g],VR.prototype,"activeColumnIndex",void 0)
|
|
10596
|
+
const HR=(e,...t)=>{for(const n of t)if(e===n)return!0
|
|
10597
|
+
return!1},BR=["rowIds","rowParentIds","groupRows","columnIds","columnSort","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
|
|
10598
|
+
class qR extends RE{constructor(e){super(BR),this.table=e,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(e){HR(e,"columnId")?this.track("columnIds"):QT(e,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):HR(e,"sortingDisabled")||QT(e,"currentSortDirection","currentSortIndex")?this.track("columnSort"):HR(e,"columnHidden")||QT(e,"currentFractionalWidth","currentPixelWidth","minPixelWidth")?this.track("columnWidths"):HR(e,"actionMenuSlot")?this.track("actionMenuSlots"):QT(e,"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 UR{constructor(e){this.tanStackTable=e}reset(){}toggleIsRowSelected(e,t){e.isGroupRow&&e.selectionState===UT?this.deselectAllLeafRows(e.id):this.tanStackTable.getRow(e.id).toggleSelected(t,{selectChildren:e.isGroupRow})}selectSingleRow(e){if(e.isGroupRow)throw new Error("function not intended to select grouped rows")
|
|
10599
10599
|
const t=this.tanStackTable.getState().rowSelection,n=[]
|
|
10600
10600
|
if(Object.entries(t).forEach((([e,t])=>{t&&n.push(e)})),1===n.length&&n[0]===e.id)return!1
|
|
10601
10601
|
const i={}
|
|
@@ -10605,7 +10605,7 @@ this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(e){const t=this.tanStackT
|
|
|
10605
10605
|
return t?.getIsGrouped()?t.getLeafRows().filter((e=>!e.getIsGrouped())).map((e=>e.id)):[]}getAllOrderedRows(){const e=this.tanStackTable.getPreExpandedRowModel().rows
|
|
10606
10606
|
return this.getOrderedRows(e)}getOrderedRows(e){const t=[]
|
|
10607
10607
|
for(const n of e)t.push(n),n.subRows?.length&&t.push(...this.getOrderedRows(n.subRows))
|
|
10608
|
-
return t}}class
|
|
10608
|
+
return t}}class jR extends UR{handleRowSelectionToggle(e,t,n){return!1}handleRowClick(e,t,n){return!1}handleActionMenuOpening(e){return!1}}class WR extends UR{handleRowSelectionToggle(e,t,n){return n&&this.tryUpdateRangeSelection(e.id)||(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(e,t)),!0}handleRowClick(e,t,n){return n?(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(e),!0):!(!t||!this.tryUpdateRangeSelection(e.id))||(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(e))}handleActionMenuOpening(e){return e.selectionState!==UT&&this.selectSingleRow(e)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(e){if(void 0===this.shiftSelectStartRowId)return!1
|
|
10609
10609
|
const t=this.getAllOrderedRows(),n=this.getRowIndexForId(this.shiftSelectStartRowId,t)
|
|
10610
10610
|
if(-1===n)return!1
|
|
10611
10611
|
const i=this.tanStackTable.getState().rowSelection
|
|
@@ -10615,28 +10615,31 @@ this.updateSelectionStateForRange(e,n,o,i,!0)}updateSelectionStateForRange(e,t,n
|
|
|
10615
10615
|
const r=Math.min(t,n),s=Math.max(t,n)
|
|
10616
10616
|
for(let t=r;t<=s;t++){const n=i[t]
|
|
10617
10617
|
n.getIsGrouped()||this.updateSelectionStateForRow(e,n.id,o)}const a=i[n]
|
|
10618
|
-
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((t=>this.updateSelectionStateForRow(e,t,o)))}updateSelectionStateForRow(e,t,n){n?e[t]=!0:delete e[t]}getRowIndexForId(e,t){return e?t.findIndex((t=>t.id===e)):-1}}class
|
|
10618
|
+
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((t=>this.updateSelectionStateForRow(e,t,o)))}updateSelectionStateForRow(e,t,n){n?e[t]=!0:delete e[t]}getRowIndexForId(e,t){return e?t.findIndex((t=>t.id===e)):-1}}class ZR extends UR{handleRowSelectionToggle(e,t,n){return this.toggleIsRowSelected(e,t),!0}handleRowClick(e,t,n){return this.selectSingleRow(e)}handleActionMenuOpening(e){return this.handleRowClick(e,!1,!1)}}class GR{constructor(e,t){this.tanStackTable=e,this.selectionManager=this.createSelectionManager(t)}handleRowSelectionToggle(e,t,n){return!!e&&this.selectionManager.handleRowSelectionToggle(e,t,n)}handleRowClick(e,t,n){return!!e&&this.selectionManager.handleRowClick(e,t,n)}handleActionMenuOpening(e){return!!e&&this.selectionManager.handleActionMenuOpening(e)}handleSelectionModeChanged(e){this.selectionManager=this.createSelectionManager(e)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const e=this.tanStackTable.options.state.rowSelection
|
|
10619
10619
|
if(!e)return[]
|
|
10620
10620
|
const t=[]
|
|
10621
|
-
return Object.entries(e).forEach((([e,n])=>{n&&t.push(e)})),t}createSelectionManager(e){switch(e){case
|
|
10622
|
-
case
|
|
10623
|
-
case
|
|
10624
|
-
default:throw new Error("unknown selection mode found")}}}function
|
|
10621
|
+
return Object.entries(e).forEach((([e,n])=>{n&&t.push(e)})),t}createSelectionManager(e){switch(e){case BT.multiple:return new WR(this.tanStackTable)
|
|
10622
|
+
case BT.single:return new ZR(this.tanStackTable)
|
|
10623
|
+
case BT.none:return new jR(this.tanStackTable)
|
|
10624
|
+
default:throw new Error("unknown selection mode found")}}}function KR(e,t){const n=t,i=[],o={},r=new Set
|
|
10625
10625
|
for(let t=0;t<e.length;t++){const s=e[t],a=s[n.id],l=s[n.parentId]
|
|
10626
10626
|
Object.prototype.hasOwnProperty.call(o,a)||(o[a]={subRows:[],clientRecord:void 0,originalIndex:void 0}),r&&r.delete(a),o[a].clientRecord=s
|
|
10627
10627
|
const c=o[a]
|
|
10628
10628
|
c.originalIndex=t,null==l?i.push(c):(Object.prototype.hasOwnProperty.call(o,l)||(o[l]={subRows:[],clientRecord:void 0,originalIndex:void 0},r&&r.add(l)),o[l].subRows.push(c))}if(r?.size){const e=Array.from(r.values()).join(",")
|
|
10629
|
-
throw new Error(`The items array contains orphans that point to the following parentIds: [${e}]. These parentIds do not exist in the items array.`)}if(
|
|
10630
|
-
return i}function
|
|
10631
|
-
return this.getAllNodes(this._hierarchicalData,t),this.isDataFlat||!e?t.map((e=>e.clientRecord)):t.sort(((e,t)=>e.originalIndex-t.originalIndex)).map((e=>e.clientRecord))}getAllNodes(e,t){for(const n of e)t.push(n),n.subRows&&this.getAllNodes(n.subRows,t)}}class
|
|
10629
|
+
throw new Error(`The items array contains orphans that point to the following parentIds: [${e}]. These parentIds do not exist in the items array.`)}if(JR(i)<Object.keys(o).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
|
|
10630
|
+
return i}function JR(e){return e.reduce(((e,t)=>e+1+(t.subRows&&JR(t.subRows))),0)}class XR{constructor(e,t,n){if(this.isDataFlat=!1,"string"==typeof t&&"string"==typeof n)try{this._hierarchicalData=KR(e,{id:t,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=e.map(((e,t)=>({clientRecord:{...e},originalIndex:t}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=e.map(((e,t)=>({clientRecord:{...e},originalIndex:t}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(e=!1){const t=[]
|
|
10631
|
+
return this.getAllNodes(this._hierarchicalData,t),this.isDataFlat||!e?t.map((e=>e.clientRecord)):t.sort(((e,t)=>e.originalIndex-t.originalIndex)).map((e=>e.clientRecord))}getAllNodes(e,t){for(const n of e)t.push(n),n.subRows&&this.getAllNodes(n.subRows,t)}}class YR{constructor(e){this.tanStackTable=e,this.isInDefaultState=!0,this.collapsedRows=new Set,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1}isRowExpanded(e){return!!this.isRowExpandable(e)&&(0!==e.subRows.length&&(this.isInDefaultState||!this.collapsedRows.has(e.id)))}toggleRowExpansion(e){if(!this.isRowExpandable(e))return
|
|
10632
10632
|
const t=this.isRowExpanded(e)
|
|
10633
|
-
this.isInDefaultState=!1,t?this.collapsedRows.add(e.id):this.collapsedRows.delete(e.id),e.toggleExpanded()}collapseAll(){this.
|
|
10633
|
+
this.isInDefaultState=!1,t?this.collapsedRows.add(e.id):this.collapsedRows.delete(e.id),e.toggleExpanded()}collapseAll(){this.resetExpansionState(),this.isInDefaultState=!1
|
|
10634
10634
|
const e=this.tanStackTable.getRowModel().flatRows
|
|
10635
10635
|
for(const t of e)this.isRowExpandable(t)&&this.collapsedRows.add(t.id)
|
|
10636
|
-
this.tanStackTable.toggleAllRowsExpanded(!1)}
|
|
10637
|
-
const t=new Set
|
|
10638
|
-
for(const
|
|
10639
|
-
this.collapsedRows.has(e)&&t.add(e)
|
|
10636
|
+
this.tanStackTable.toggleAllRowsExpanded(!1)}resetExpansionState(){this.collapsedRows.clear(),this.isInDefaultState=!0}resetHierarchyOptions(){this.hierarchyOptions.clear()}processDataUpdate(e){if(0===this.collapsedRows.size&&0===this.hierarchyOptions.size)return
|
|
10637
|
+
const t=new Set,n=new Map
|
|
10638
|
+
for(const i of e){const e=i.id
|
|
10639
|
+
this.collapsedRows.has(e)&&t.add(e)
|
|
10640
|
+
const o=this.hierarchyOptions.get(e)
|
|
10641
|
+
!i.getIsGrouped()&&o&&n.set(e,o)}this.collapsedRows=t,this.hierarchyOptions=n}setHierarchyOptions(e){this.hierarchyOptions.clear()
|
|
10642
|
+
for(const{recordId:t,options:n}of e)this.hierarchyOptions.set(t,n)}isRowExpandable(e){return e.subRows.length>0||this.canLoadDelayedChildren(e.id)}setHierarchyEnabled(e){this.isHierarchyEnabled=e}canLoadDelayedChildren(e){return!!this.isHierarchyEnabled&&(this.hierarchyOptions.get(e)?.delayedHierarchyState===VT??!1)}}class QR extends Ft{constructor(){super(),this.selectionMode=BT.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=qT,this.showCollapseAll=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.documentShiftKeyDown=!1,this.tableValidator=new tR,this.tableUpdateTracker=new qR(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.onViewPortScroll=e=>{this.scrollX=e.target.scrollLeft},this.onKeyDown=e=>{e.key===ua&&(this.documentShiftKeyDown=!0)},this.onKeyUp=e=>{e.key===ua&&(this.documentShiftKeyDown=!1)},this.getRowCanExpand=e=>this.expansionManager.isRowExpandable(e),this.getIsRowExpanded=e=>this.expansionManager.isRowExpanded(e),this.handleRowSelectionChange=e=>{const t=e instanceof Function?e(this.table.getState().rowSelection):e
|
|
10640
10643
|
this.updateTableOptions({state:{rowSelection:t}})},this.handleExpandedChange=e=>{const t=e instanceof Function?e(this.table.getState().expanded):e
|
|
10641
10644
|
this.updateTableOptions({state:{expanded:t}})},this.options={data:[],onStateChange:e=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:e=>XO((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(t,o,r){void 0===o&&(o=0)
|
|
10642
10645
|
const s=[]
|
|
@@ -10659,17 +10662,19 @@ return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t
|
|
|
10659
10662
|
return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getGroupedRowModel:LT(),getExpandedRowModel:e=>XO((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>!t.rows.length||!0!==e&&!Object.keys(null!=e?e:{}).length?t:n?function(e){const t=[],n=e=>{var i
|
|
10660
10663
|
t.push(e),null!=(i=e.subRows)&&i.length&&e.getIsExpanded()&&e.subRows.forEach(n)}
|
|
10661
10664
|
return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),{key:!1,debug:()=>{var t
|
|
10662
|
-
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsRowExpanded:this.getIsRowExpanded,getSubRows:e=>e.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:e=>!e.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=zT(this.options),this.virtualizer=new
|
|
10665
|
+
return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:e=>e.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:e=>!e.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=zT(this.options),this.virtualizer=new PR(this,this.table),this.layoutManager=new VR(this),this.layoutManagerNotifier=m.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new GR(this.table,this.selectionMode),this.expansionManager=new YR(this.table)}get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===BT.multiple||this.showCollapseAll}async setData(e){await this.processPendingUpdates()
|
|
10663
10666
|
const t=this.calculateTanStackData(e)
|
|
10664
|
-
this.updateTableOptions(t)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==
|
|
10667
|
+
this.updateTableOptions(t)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==BT.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(e)}})}async setRecordHierarchyOptions(e){await this.processPendingUpdates()
|
|
10668
|
+
const t=structuredClone(e),n=this.tableValidator.getOptionsWithPresentIds(t)
|
|
10669
|
+
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(e,t){(e instanceof eR||e instanceof YT)&&"string"==typeof t?"validConfiguration"===t?this.tableValidator.validateColumnConfigurations(this.columns):this.tableUpdateTracker.trackColumnPropertyChanged(t):e instanceof VR&&"isColumnBeingSized"===t&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(e,t){t.stopImmediatePropagation()
|
|
10665
10670
|
this.selectionManager.handleRowSelectionToggle(this.tableData[e],t.detail.newState,this.documentShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(e,t){return this.selectionManager.handleRowClick(this.tableData[e],t.shiftKey,t.ctrlKey||t.metaKey)&&this.emitSelectionChangeEvent(),!0}onAllRowsSelectionChange(e){e.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(e,t){t.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(e,t)}onRowActionMenuToggle(e){e.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(e)}handleCollapseAllRows(){this.expansionManager.collapseAll()}onRightDividerMouseDown(e,t){0===e.button&&this.layoutManager.beginColumnInteractiveSize(e.clientX,2*t)}onLeftDividerMouseDown(e,t){0===e.button&&this.layoutManager.beginColumnInteractiveSize(e.clientX,2*t-1)}handleGroupRowExpanded(e,t){this.toggleRowExpanded(e),t.stopPropagation()}handleRowExpanded(e){this.toggleRowExpanded(e)}toggleColumnSort(e,t){if(e.sortingDisabled)return
|
|
10666
10671
|
const n=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.columnInternals.currentSortIndex-t.columnInternals.currentSortIndex)),i=n.indexOf(e),o=i>-1,r=e.columnInternals.currentSortDirection
|
|
10667
|
-
let s=
|
|
10668
|
-
o?r===
|
|
10672
|
+
let s=HT.ascending
|
|
10673
|
+
o?r===HT.descending?(n.splice(i,1),s=HT.none,e.columnInternals.currentSortIndex=void 0):s=HT.descending:n.push(e),e.columnInternals.currentSortDirection=s
|
|
10669
10674
|
for(let i=0;i<n.length;i++){const o=n[i]
|
|
10670
|
-
t?n[i].columnInternals.currentSortIndex=i:o===e?o.columnInternals.currentSortIndex=0:(o.columnInternals.currentSortIndex=void 0,o.columnInternals.currentSortDirection=
|
|
10671
|
-
case
|
|
10672
|
-
default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(e){this.dataHierarchyManager=new
|
|
10675
|
+
t?n[i].columnInternals.currentSortIndex=i:o===e?o.columnInternals.currentSortIndex=0:(o.columnInternals.currentSortIndex=void 0,o.columnInternals.currentSortDirection=HT.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((e=>!e.columnHidden)))}get ariaMultiSelectable(){switch(this.selectionMode){case BT.multiple:return"true"
|
|
10676
|
+
case BT.single:return"false"
|
|
10677
|
+
default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(e){this.dataHierarchyManager=new XR(e,this.idFieldName,this.parentIdFieldName)
|
|
10673
10678
|
const t=this.dataHierarchyManager.hierarchicalData
|
|
10674
10679
|
this.tableValidator.setParentIdConfigurationValidity(this.dataHierarchyManager.parentIdConfigurationValid)
|
|
10675
10680
|
const n={data:t}
|
|
@@ -10677,41 +10682,41 @@ if(this.validateWithData(e),this.tableValidator.areRecordIdsValid()){const e=thi
|
|
|
10677
10682
|
n.state={rowSelection:this.calculateTanStackSelectionState(e),expanded:!0}}return n}selectionModeChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackSelectionModeChanged()}idFieldNameChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackIdFieldNameChanged()}parentIdFieldNameChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackParentIdFieldNameChanged()}columnsChanged(e,t){this.$fastController.isConnected&&(this.observeColumns(),this.tableUpdateTracker.trackColumnInstancesChanged())}async handleActionMenuBeforeToggleEvent(e,t){this.selectionManager.handleActionMenuOpening(this.tableData[e])&&await this.emitSelectionChangeEvent(),this.openActionMenuRecordId=t.detail.recordIds[0]
|
|
10678
10683
|
const n=await this.getActionMenuToggleEventDetail(t)
|
|
10679
10684
|
this.$emit("action-menu-beforetoggle",n)}async handleRowActionMenuToggleEvent(e){const t=await this.getActionMenuToggleEventDetail(e)
|
|
10680
|
-
this.$emit("action-menu-toggle",t),e.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(e){const t=this.selectionMode===
|
|
10685
|
+
this.$emit("action-menu-toggle",t),e.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(e){const t=this.selectionMode===BT.multiple?await this.getSelectedRecordIds():[this.openActionMenuRecordId]
|
|
10681
10686
|
return{...e.detail,recordIds:t}}removeColumnObservers(){this.columnNotifiers.forEach((e=>{e.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()
|
|
10682
10687
|
for(const e of this.columns){const t=m.getNotifier(e)
|
|
10683
10688
|
t.subscribe(this),this.columnNotifiers.push(t)
|
|
10684
10689
|
const n=m.getNotifier(e.columnInternals)
|
|
10685
|
-
n.subscribe(this),this.columnNotifiers.push(n)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>!e.sortingDisabled&&e.columnInternals.currentSortDirection!==
|
|
10686
|
-
if(this.tableUpdateTracker.updateColumnSort&&(e.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(e.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(e.getRowId=this.calculateTanStackRowIdFunction(),e.state.rowSelection={},this.selectionManager.handleSelectionReset()),this.tableUpdateTracker.updateSelectionMode&&(e.enableMultiRowSelection=this.selectionMode===
|
|
10690
|
+
n.subscribe(this),this.columnNotifiers.push(n)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>!e.sortingDisabled&&e.columnInternals.currentSortDirection!==HT.none&&"number"==typeof e.columnInternals.currentSortIndex))}getColumnsParticipatingInGrouping(){return this.columns.filter((e=>!e.columnInternals.groupingDisabled&&"number"==typeof e.columnInternals.groupIndex))}childItemsChanged(){this.updateColumnsFromChildItems()}async updateColumnsFromChildItems(){await zE(this.childItems),this.columns=this.childItems.filter((e=>e instanceof eR))}updateTanStack(){const e={state:{}}
|
|
10691
|
+
if(this.tableUpdateTracker.updateColumnSort&&(e.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(e.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(e.getRowId=this.calculateTanStackRowIdFunction(),e.state.rowSelection={},this.selectionManager.handleSelectionReset(),this.expansionManager.resetHierarchyOptions()),this.tableUpdateTracker.updateRowParentIds&&this.expansionManager.setHierarchyEnabled(this.isHierarchyEnabled()),this.tableUpdateTracker.updateSelectionMode&&(e.enableMultiRowSelection=this.selectionMode===BT.multiple,e.enableSubRowSelection=this.selectionMode===BT.multiple,e.state.rowSelection={},this.selectionManager.handleSelectionModeChanged(this.selectionMode)),this.dataHierarchyManager&&this.tableUpdateTracker.requiresTanStackDataReset)if(this.parentIdFieldName||this.tableUpdateTracker.updateRowParentIds){const t=this.dataHierarchyManager.getAllRecords(!0),n=this.calculateTanStackData(t)
|
|
10687
10692
|
n.state&&(e.state.rowSelection=n.state.rowSelection),e.data=n.data}else e.data=[...this.table.options.data]
|
|
10688
|
-
this.tableUpdateTracker.updateGroupRows&&(e.state.grouping=this.calculateTanStackGroupingState()),(this.tableUpdateTracker.updateRowIds||this.tableUpdateTracker.updateRowParentIds||this.tableUpdateTracker.updateGroupRows)&&(e.state.expanded=!0,this.expansionManager.
|
|
10693
|
+
this.tableUpdateTracker.updateGroupRows&&(e.state.grouping=this.calculateTanStackGroupingState()),(this.tableUpdateTracker.updateRowIds||this.tableUpdateTracker.updateRowParentIds||this.tableUpdateTracker.updateGroupRows)&&(e.state.expanded=!0,this.expansionManager.resetExpansionState()),this.updateTableOptions(e)}updateActionMenuSlots(){const e=new Set
|
|
10689
10694
|
for(const t of this.columns)t.actionMenuSlot&&e.add(t.actionMenuSlot)
|
|
10690
10695
|
this.actionMenuSlots=Array.from(e)}validate(){this.tableValidator.validateIdFieldConfiguration(this.selectionMode,this.idFieldName,this.parentIdFieldName),this.tableValidator.validateColumnIds(this.columns.map((e=>e.columnId))),this.tableValidator.validateColumnSortIndices(this.getColumnsParticipatingInSorting().map((e=>e.columnInternals.currentSortIndex))),this.tableValidator.validateColumnGroupIndices(this.getColumnsParticipatingInGrouping().map((e=>e.columnInternals.groupIndex))),this.tableValidator.validateColumnConfigurations(this.columns),this.dataHierarchyManager&&this.validateWithData(this.dataHierarchyManager.getAllRecords())}validateWithData(e){this.tableValidator.validateRecordIds(e,this.idFieldName),this.canRenderRows=this.checkValidity()}emitColumnConfigurationChangeEvent(){const e={columns:this.columns.map((e=>({columnId:e.columnId,sortIndex:e.columnInternals.currentSortIndex??void 0,sortDirection:e.columnInternals.currentSortDirection,groupIndex:e.columnInternals.groupIndex,hidden:e.columnHidden,fractionalWidth:e.columnInternals.currentFractionalWidth,pixelWidth:e.columnInternals.currentPixelWidth})))}
|
|
10691
10696
|
this.$emit("column-configuration-change",e)}async emitSelectionChangeEvent(){const e={selectedRecordIds:await this.getSelectedRecordIds()}
|
|
10692
|
-
this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
10697
|
+
this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===UT,this.selectionCheckbox.indeterminate=this.selectionState===jT,this.ignoreSelectionChangeEvents=!1)}isHierarchyEnabled(){return"string"==typeof this.parentIdFieldName}refreshRows(){this.selectionState=this.getTableSelectionState()
|
|
10693
10698
|
let e=!1
|
|
10694
10699
|
const t=this.table.getRowModel().rows
|
|
10695
|
-
this.tableData=t.map((t=>{const n=t.getIsGrouped(),i=!n&&t.getParentRow(),o
|
|
10696
|
-
return e=e||o,s})),this.showCollapseAll=e||this.getColumnsParticipatingInGrouping().length>0,this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?
|
|
10700
|
+
this.tableData=t.map((t=>{const n=t.getIsGrouped(),i=!n&&t.getParentRow(),o=!n&&this.getRowCanExpand(t),r=!n&&!o&&!i&&t.depth>0&&!this.parentIdFieldName,s={record:t.original.clientRecord,id:t.id,selectionState:this.getRowSelectionState(t),isGroupRow:n,isExpanded:t.getIsExpanded(),groupRowValue:n?t.getValue(t.groupingColumnId):void 0,nestingLevel:r?t.depth-1:t.depth,isParentRow:o,immediateChildCount:t.subRows.length,groupColumn:this.getGroupRowColumn(t)}
|
|
10701
|
+
return e=e||o,s})),this.showCollapseAll=e||this.getColumnsParticipatingInGrouping().length>0,this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?UT:this.table.getIsSomeRowsSelected()?jT:qT}getRowSelectionState(e){return e.getIsGrouped()?this.getGroupedRowSelectionState(e):e.getIsSelected()?UT:qT}getGroupedRowSelectionState(e){const t=e.getLeafRows()??[]
|
|
10697
10702
|
let n=!1,i=!1
|
|
10698
|
-
for(const e of t){if(e.getIsGrouped()){switch(this.getGroupedRowSelectionState(e)){case
|
|
10703
|
+
for(const e of t){if(e.getIsGrouped()){switch(this.getGroupedRowSelectionState(e)){case qT:i=!0
|
|
10699
10704
|
break
|
|
10700
|
-
case
|
|
10705
|
+
case UT:n=!0
|
|
10701
10706
|
break
|
|
10702
|
-
default:return
|
|
10703
|
-
if(n&&i)return
|
|
10704
|
-
if(void 0!==t)return this.columns.find((e=>e.columnInternals.uniqueId===t))}updateTableOptions(e){if(this.options={...this.options,...e,state:{...this.options.state,...e.state}},this.table.setOptions(this.options),e.data){const e=this.table.getRowModel().flatRows
|
|
10707
|
+
default:return jT}}else e.getIsSelected()?n=!0:i=!0
|
|
10708
|
+
if(n&&i)return jT}return n?UT:qT}getGroupRowColumn(e){const t=e.groupingColumnId
|
|
10709
|
+
if(void 0!==t)return this.columns.find((e=>e.columnInternals.uniqueId===t))}updateTableOptions(e){if(this.options={...this.options,...e,state:{...this.options.state,...e.state}},this.table.setOptions(this.options),e.data&&this.tableValidator.areRecordIdsValid()){const e=this.table.getRowModel().flatRows
|
|
10705
10710
|
this.expansionManager.processDataUpdate(e)}this.refreshRows()}toggleRowExpanded(e){const t=this.table.getRowModel().rows[e]
|
|
10706
10711
|
this.expansionManager.toggleRowExpansion(t)}calculateTanStackSortState(){const e=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.columnInternals.currentSortIndex-t.columnInternals.currentSortIndex))
|
|
10707
|
-
return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.columnInternals.currentSortDirection===
|
|
10708
|
-
if("string"==typeof n)return t.clientRecord[n]},sortingFn:
|
|
10712
|
+
return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.columnInternals.currentSortDirection===HT.descending})))}calculateTanStackGroupingState(){return this.getColumnsParticipatingInGrouping().sort(((e,t)=>e.columnInternals.groupIndex-t.columnInternals.groupIndex)).map((e=>e.columnInternals.uniqueId))}calculateTanStackRowIdFunction(){return null===this.idFieldName||void 0===this.idFieldName?void 0:e=>e.clientRecord[this.idFieldName]}calculateTanStackColumns(){return this.columns.map((e=>({id:e.columnInternals.uniqueId,accessorFn:t=>{const n=e.columnInternals.operandDataRecordFieldName
|
|
10713
|
+
if("string"==typeof n)return t.clientRecord[n]},sortingFn:zR(e.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(e){if(this.selectionMode===BT.none)return{}
|
|
10709
10714
|
const t={},n=this.tableValidator.getPresentRecordIds(e)
|
|
10710
|
-
for(const e of n)if(t[e]=!0,this.selectionMode===
|
|
10711
|
-
return t}}e([se({attribute:"id-field-name"})],
|
|
10712
|
-
const QR
|
|
10713
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10714
|
-
const
|
|
10715
|
+
for(const e of n)if(t[e]=!0,this.selectionMode===BT.single)break
|
|
10716
|
+
return t}}e([se({attribute:"id-field-name"})],QR.prototype,"idFieldName",void 0),e([se({attribute:"parent-id-field-name"})],QR.prototype,"parentIdFieldName",void 0),e([se({attribute:"selection-mode"})],QR.prototype,"selectionMode",void 0),e([g],QR.prototype,"tableData",void 0),e([g],QR.prototype,"columns",void 0),e([g],QR.prototype,"childItems",void 0),e([g],QR.prototype,"rowElements",void 0),e([g],QR.prototype,"actionMenuSlots",void 0),e([g],QR.prototype,"openActionMenuRecordId",void 0),e([g],QR.prototype,"canRenderRows",void 0),e([g],QR.prototype,"scrollX",void 0),e([g],QR.prototype,"rowGridColumns",void 0),e([g],QR.prototype,"selectionState",void 0),e([g],QR.prototype,"selectionCheckbox",void 0),e([g],QR.prototype,"showCollapseAll",void 0),e([g],QR.prototype,"firstSortedColumn",void 0),e([g],QR.prototype,"visibleColumns",void 0),e([g],QR.prototype,"tableScrollableMinWidth",void 0),e([g],QR.prototype,"documentShiftKeyDown",void 0)
|
|
10717
|
+
const eD=QR.compose({baseName:"table",template:SR,styles:nR})
|
|
10718
|
+
bi.getOrCreate().withPrefix("nimble").register(eD())
|
|
10719
|
+
const tD=we`
|
|
10715
10720
|
:host {
|
|
10716
10721
|
display: contents;
|
|
10717
10722
|
}
|
|
@@ -10721,14 +10726,14 @@ const eD=we`
|
|
|
10721
10726
|
overflow: hidden;
|
|
10722
10727
|
text-overflow: ellipsis;
|
|
10723
10728
|
}
|
|
10724
|
-
`,
|
|
10729
|
+
`,nD=Z`<span
|
|
10725
10730
|
${Jm("hasOverflow")}
|
|
10726
10731
|
class="header-content"
|
|
10727
10732
|
title=${e=>e.hasOverflow&&e.headerTextContent?e.headerTextContent:null}
|
|
10728
10733
|
>
|
|
10729
10734
|
<slot ${Ne("contentSlot")}></slot>
|
|
10730
10735
|
</span>`
|
|
10731
|
-
function
|
|
10736
|
+
function iD(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.fractionalWidth?this.columnInternals.fractionalWidth=this.fractionalWidth:this.columnInternals.fractionalWidth=1}minPixelWidthChanged(){"number"==typeof this.minPixelWidth?this.columnInternals.minPixelWidth=this.minPixelWidth:this.columnInternals.minPixelWidth=117}}return se({attribute:"fractional-width",converter:oe})(t.prototype,"fractionalWidth"),se({attribute:"min-pixel-width",converter:oe})(t.prototype,"minPixelWidth"),t}function oD(e){class t extends e{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 se({attribute:"grouping-disabled",mode:"boolean"})(t.prototype,"groupingDisabled"),se({attribute:"group-index",converter:oe})(t.prototype,"groupIndex"),t}const rD=we`
|
|
10732
10737
|
:host {
|
|
10733
10738
|
width: fit-content;
|
|
10734
10739
|
max-width: 100%;
|
|
@@ -10749,7 +10754,7 @@ function nD(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.
|
|
|
10749
10754
|
overflow: hidden;
|
|
10750
10755
|
text-overflow: ellipsis;
|
|
10751
10756
|
}
|
|
10752
|
-
`,
|
|
10757
|
+
`,sD=Z`
|
|
10753
10758
|
<template
|
|
10754
10759
|
@click="${(e,t)=>("string"==typeof e.cellRecord?.href&&t.event.stopPropagation(),!0)}"
|
|
10755
10760
|
>
|
|
@@ -10780,18 +10785,18 @@ function nD(e){class t extends e{fractionalWidthChanged(){"number"==typeof this.
|
|
|
10780
10785
|
</span>`)}
|
|
10781
10786
|
</template>
|
|
10782
10787
|
`
|
|
10783
|
-
class
|
|
10784
|
-
const aD
|
|
10785
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10786
|
-
class
|
|
10787
|
-
const
|
|
10788
|
+
class aD extends JT{constructor(){super(...arguments),this.hasOverflow=!1}get text(){return"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:""}focusedRecycleCallback(){this.anchor?.blur()}}e([g],aD.prototype,"hasOverflow",void 0),e([v],aD.prototype,"text",null)
|
|
10789
|
+
const lD=aD.compose({baseName:"table-column-anchor-cell-view",template:sD,styles:rD})
|
|
10790
|
+
bi.getOrCreate().withPrefix("nimble").register(lD())
|
|
10791
|
+
class cD extends GT{constructor(){super(...arguments),this.hasOverflow=!1,this.text=""}}e([g],cD.prototype,"hasOverflow",void 0),e([g],cD.prototype,"text",void 0)
|
|
10792
|
+
const dD=Z`
|
|
10788
10793
|
<span
|
|
10789
10794
|
${Jm("hasOverflow")}
|
|
10790
10795
|
title="${e=>e.hasOverflow&&e.text?e.text:null}"
|
|
10791
10796
|
>
|
|
10792
10797
|
${e=>e.text}
|
|
10793
10798
|
</span>
|
|
10794
|
-
`,
|
|
10799
|
+
`,hD=we`
|
|
10795
10800
|
span {
|
|
10796
10801
|
font: ${Rc};
|
|
10797
10802
|
color: ${Dc};
|
|
@@ -10800,19 +10805,19 @@ const cD=Z`
|
|
|
10800
10805
|
text-overflow: ellipsis;
|
|
10801
10806
|
}
|
|
10802
10807
|
`
|
|
10803
|
-
const
|
|
10804
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10805
|
-
const
|
|
10806
|
-
class
|
|
10807
|
-
const fD
|
|
10808
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10809
|
-
class
|
|
10810
|
-
try{return e.format(t)}catch(e){return""}}e([se({attribute:"field-name"})],
|
|
10811
|
-
const
|
|
10812
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10813
|
-
const
|
|
10808
|
+
const uD=class extends cD{groupHeaderValueChanged(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:dD,styles:hD})
|
|
10809
|
+
bi.getOrCreate().withPrefix("nimble").register(uD())
|
|
10810
|
+
const pD="nimble-table-column-text-group-header-view"
|
|
10811
|
+
class fD extends(oD(iD(eR))){constructor(){super(...arguments),this.underlineHidden=!1}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:pD,delegatedEvents:["click"],sortOperation:ZT}}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}}}e([se({attribute:"label-field-name"})],fD.prototype,"labelFieldName",void 0),e([se({attribute:"href-field-name"})],fD.prototype,"hrefFieldName",void 0),e([se],fD.prototype,"appearance",void 0),e([se({attribute:"underline-hidden",mode:"boolean"})],fD.prototype,"underlineHidden",void 0),e([se],fD.prototype,"hreflang",void 0),e([se],fD.prototype,"ping",void 0),e([se],fD.prototype,"referrerpolicy",void 0),e([se],fD.prototype,"rel",void 0),e([se],fD.prototype,"target",void 0),e([se],fD.prototype,"type",void 0),e([se],fD.prototype,"download",void 0)
|
|
10812
|
+
const mD=fD.compose({baseName:"table-column-anchor",template:nD,styles:tD})
|
|
10813
|
+
bi.getOrCreate().withPrefix("nimble").register(mD())
|
|
10814
|
+
class gD extends(oD(iD(eR))){fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function vD(e,t){if("number"!=typeof t)return""
|
|
10815
|
+
try{return e.format(t)}catch(e){return""}}e([se({attribute:"field-name"})],gD.prototype,"fieldName",void 0)
|
|
10816
|
+
const bD=class extends cD{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.columnConfig?this.text=vD(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:dD,styles:hD})
|
|
10817
|
+
bi.getOrCreate().withPrefix("nimble").register(bD())
|
|
10818
|
+
const wD="left",yD="right",xD=Z`
|
|
10814
10819
|
<template
|
|
10815
|
-
class="${e=>e.alignment===
|
|
10820
|
+
class="${e=>e.alignment===yD?"right-align":""}"
|
|
10816
10821
|
>
|
|
10817
10822
|
<span
|
|
10818
10823
|
${Jm("hasOverflow")}
|
|
@@ -10821,7 +10826,7 @@ const bD="left",wD="right",yD=Z`
|
|
|
10821
10826
|
${e=>e.text}
|
|
10822
10827
|
</span>
|
|
10823
10828
|
</template>
|
|
10824
|
-
`,
|
|
10829
|
+
`,kD=we`
|
|
10825
10830
|
:host(.right-align) {
|
|
10826
10831
|
margin-left: auto;
|
|
10827
10832
|
}
|
|
@@ -10834,22 +10839,22 @@ const bD="left",wD="right",yD=Z`
|
|
|
10834
10839
|
text-overflow: ellipsis;
|
|
10835
10840
|
}
|
|
10836
10841
|
`
|
|
10837
|
-
class
|
|
10838
|
-
const
|
|
10839
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10840
|
-
const
|
|
10841
|
-
class
|
|
10842
|
-
class
|
|
10843
|
-
class
|
|
10842
|
+
class CD extends JT{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=wD}}e([g],CD.prototype,"hasOverflow",void 0),e([g],CD.prototype,"text",void 0),e([g],CD.prototype,"alignment",void 0)
|
|
10843
|
+
const SD=class extends CD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){this.columnConfig?this.text=vD(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:xD,styles:kD})
|
|
10844
|
+
bi.getOrCreate().withPrefix("nimble").register(SD())
|
|
10845
|
+
const $D=void 0
|
|
10846
|
+
class MD extends TE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class _D extends MD{constructor(e,t){super(t),this.columnInternals=e}getValidity(){return this.getValidationFlags()}setConditionValue(e,t){t?this.track(e):this.untrack(e),this.updateColumnInternalsFlag()}updateColumnInternalsFlag(){this.columnInternals.validConfiguration=this.isValid()}}const ED=["invalidCustomOptionsCombination"]
|
|
10847
|
+
class ID extends _D{constructor(e){super(e,ED)}setCustomOptionsValidity(e){this.setConditionValue("invalidCustomOptionsCombination",!e)}}const AD={toView:e=>"boolean"==typeof e?e.toString():null,fromView:e=>"true"===e||!0===e||"false"!==e&&!1!==e&&void 0}
|
|
10848
|
+
class OD extends gD{constructor(){super(...arguments),this.validator=new ID(this.columnInternals),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:WT}}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 e=this.createFormatter()
|
|
10844
10849
|
if(e){const t={formatter:e}
|
|
10845
10850
|
this.columnInternals.columnConfig=t,this.validator.setCustomOptionsValidity(!0)}else this.columnInternals.columnConfig=void 0,this.validator.setCustomOptionsValidity(!1)}createFormatter(){let e
|
|
10846
|
-
e=this.format
|
|
10847
|
-
try{return new Intl.DateTimeFormat(xa.getValueFor(this),e)}catch(e){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}}}e([se],
|
|
10848
|
-
const OD
|
|
10849
|
-
bi.getOrCreate().withPrefix("nimble").register(OD())
|
|
10850
|
-
const TD=class extends kD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:yD,styles:xD})
|
|
10851
|
+
e=this.format===$D?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
|
|
10852
|
+
try{return new Intl.DateTimeFormat(xa.getValueFor(this),e)}catch(e){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}}}e([se],OD.prototype,"format",void 0),e([se({attribute:"custom-locale-matcher"})],OD.prototype,"customLocaleMatcher",void 0),e([se({attribute:"custom-weekday"})],OD.prototype,"customWeekday",void 0),e([se({attribute:"custom-era"})],OD.prototype,"customEra",void 0),e([se({attribute:"custom-year"})],OD.prototype,"customYear",void 0),e([se({attribute:"custom-month"})],OD.prototype,"customMonth",void 0),e([se({attribute:"custom-day"})],OD.prototype,"customDay",void 0),e([se({attribute:"custom-hour"})],OD.prototype,"customHour",void 0),e([se({attribute:"custom-minute"})],OD.prototype,"customMinute",void 0),e([se({attribute:"custom-second"})],OD.prototype,"customSecond",void 0),e([se({attribute:"custom-time-zone-name"})],OD.prototype,"customTimeZoneName",void 0),e([se({attribute:"custom-format-matcher"})],OD.prototype,"customFormatMatcher",void 0),e([se({attribute:"custom-hour12",converter:AD})],OD.prototype,"customHour12",void 0),e([se({attribute:"custom-time-zone"})],OD.prototype,"customTimeZone",void 0),e([se({attribute:"custom-calendar"})],OD.prototype,"customCalendar",void 0),e([se({attribute:"custom-day-period"})],OD.prototype,"customDayPeriod",void 0),e([se({attribute:"custom-numbering-system"})],OD.prototype,"customNumberingSystem",void 0),e([se({attribute:"custom-date-style"})],OD.prototype,"customDateStyle",void 0),e([se({attribute:"custom-time-style"})],OD.prototype,"customTimeStyle",void 0),e([se({attribute:"custom-hour-cycle"})],OD.prototype,"customHourCycle",void 0)
|
|
10853
|
+
const TD=OD.compose({baseName:"table-column-date-text",template:nD,styles:tD})
|
|
10851
10854
|
bi.getOrCreate().withPrefix("nimble").register(TD())
|
|
10852
|
-
class
|
|
10855
|
+
const RD=class extends CD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:xD,styles:kD})
|
|
10856
|
+
bi.getOrCreate().withPrefix("nimble").register(RD())
|
|
10857
|
+
class DD{constructor(e){this.lang=e,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(e){if("number"!=typeof e||e<0||!Number.isFinite(e))return""
|
|
10853
10858
|
const t=[],n=1e3,i=6e4,o=36e5,r=864e5,s=e/r
|
|
10854
10859
|
let a=e
|
|
10855
10860
|
const l=Math.floor(s)
|
|
@@ -10862,50 +10867,50 @@ if(a-=d*i,d){const e=this.minutesFormatter.format(d)
|
|
|
10862
10867
|
t.push(e)}const h=a/n,u=0===h?0:h%60
|
|
10863
10868
|
if(e<1&&0!==h)return this.scientificSecondsFormatter.format(h)
|
|
10864
10869
|
if(u>=5e-4||0===u&&0===t.length){const e=this.secondsFormatter.format(u)
|
|
10865
|
-
t.push(e)}return t.join(", ")}}const
|
|
10866
|
-
bi.getOrCreate().withPrefix("nimble").register(DD())
|
|
10867
|
-
const ND=class extends mD{constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:jT}}updateColumnConfig(){const e=new RD(xa.getValueFor(this))
|
|
10868
|
-
if(e){const t={formatter:e}
|
|
10869
|
-
this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}}.compose({baseName:"table-column-duration-text",template:tD,styles:eD})
|
|
10870
|
+
t.push(e)}return t.join(", ")}}const ND=class extends cD{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:dD,styles:hD})
|
|
10870
10871
|
bi.getOrCreate().withPrefix("nimble").register(ND())
|
|
10871
|
-
const PD=(
|
|
10872
|
+
const PD=class extends gD{constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:WT}}updateColumnConfig(){const e=new DD(xa.getValueFor(this))
|
|
10873
|
+
if(e){const t={formatter:e}
|
|
10874
|
+
this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}}.compose({baseName:"table-column-duration-text",template:nD,styles:tD})
|
|
10875
|
+
bi.getOrCreate().withPrefix("nimble").register(PD())
|
|
10876
|
+
const zD=(e,t)=>{if("number"===t){const t=oe.fromView(e)
|
|
10872
10877
|
return null===t?void 0:t}return"boolean"===t?!1!==e&&"false"!==e&&(!0===e||"true"===e||void 0):e?.toString()??void 0}
|
|
10873
|
-
class
|
|
10874
|
-
return this.mappings.forEach((t=>{const n=
|
|
10878
|
+
class FD extends eR{constructor(){super(...arguments),this.validator=this.createValidator(),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(e,t){e instanceof ov&&"string"==typeof t&&this.updateColumnConfig()}updateColumnConfig(){this.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.validator.isValid()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const e=new Map
|
|
10879
|
+
return this.mappings.forEach((t=>{const n=zD(t.key,this.keyType)
|
|
10875
10880
|
if(void 0===n)throw Error("Key was invalid for type. Validation should have prevented this.")
|
|
10876
10881
|
const i=this.createMappingConfig(t)
|
|
10877
10882
|
e.set(n,i)})),e}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}mappingsChanged(){this.updateColumnConfig(),this.observeMappings()}keyTypeChanged(){this.updateColumnConfig()}removeMappingObservers(){this.mappingNotifiers.forEach((e=>{e.unsubscribe(this)})),this.mappingNotifiers=[]}observeMappings(){this.removeMappingObservers()
|
|
10878
10883
|
for(const e of this.mappings){const t=m.getNotifier(e)
|
|
10879
|
-
t.subscribe(this),this.mappingNotifiers.push(t)}}}e([g],
|
|
10880
|
-
const
|
|
10881
|
-
${
|
|
10884
|
+
t.subscribe(this),this.mappingNotifiers.push(t)}}}e([g],FD.prototype,"mappings",void 0),e([se({attribute:"field-name"})],FD.prototype,"fieldName",void 0),e([se({attribute:"key-type"})],FD.prototype,"keyType",void 0)
|
|
10885
|
+
const LD=we`
|
|
10886
|
+
${tD}
|
|
10882
10887
|
|
|
10883
10888
|
slot[name='mapping'] {
|
|
10884
10889
|
display: none;
|
|
10885
10890
|
}
|
|
10886
|
-
`,
|
|
10887
|
-
class
|
|
10891
|
+
`,VD=Z`${nD}<slot ${Ke("mappings")} name="mapping"></slot>`,HD=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue"]
|
|
10892
|
+
class BD extends _D{constructor(e,t){super(e,t)}validate(e,t){this.untrackAll()
|
|
10888
10893
|
const n=e.map((e=>e.key))
|
|
10889
|
-
this.validateKeyValuesForType(n,t),this.validateUniqueKeys(n,t),this.validateNoMissingKeys(e)}validateKeyValuesForType(e,t){const n=e.some((e=>void 0!==e&&void 0===
|
|
10890
|
-
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(e,t){const n=e.map((e=>
|
|
10894
|
+
this.validateKeyValuesForType(n,t),this.validateUniqueKeys(n,t),this.validateNoMissingKeys(e)}validateKeyValuesForType(e,t){const n=e.some((e=>void 0!==e&&void 0===zD(e,t)))
|
|
10895
|
+
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(e,t){const n=e.map((e=>zD(e,t))),i=new Set(n).size!==n.length
|
|
10891
10896
|
this.setConditionValue("duplicateMappingKey",i)}validateNoMissingKeys(e){const t=e.some((e=>void 0===e.key))
|
|
10892
|
-
this.setConditionValue("missingKeyValue",t)}}const
|
|
10893
|
-
class
|
|
10894
|
-
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(
|
|
10895
|
-
this.setConditionValue("unsupportedMappingType",!t)}}class
|
|
10897
|
+
this.setConditionValue("missingKeyValue",t)}}const qD=[...HD,"unsupportedMappingType","missingTextValue"]
|
|
10898
|
+
class UD extends BD{constructor(e){super(e,qD)}static isSupportedMappingElement(e){return e instanceof sv}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateNoMissingText(e)}validateNoMissingText(e){const t=e.filter(UD.isSupportedMappingElement).some((e=>void 0===e.text))
|
|
10899
|
+
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(UD.isSupportedMappingElement)
|
|
10900
|
+
this.setConditionValue("unsupportedMappingType",!t)}}class jD{constructor(e){this.text=e}}class WD extends jD{}const ZD=class extends CD{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){const e=this.cellRecord?.value
|
|
10896
10901
|
if(null==e)return void(this.text="")
|
|
10897
10902
|
const t=this.columnConfig?.mappingConfigs.get(e)
|
|
10898
|
-
this.text=t instanceof
|
|
10899
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10900
|
-
const
|
|
10903
|
+
this.text=t instanceof WD&&t.text?t.text:""}}.compose({baseName:"table-column-enum-text-cell-view",template:xD,styles:kD})
|
|
10904
|
+
bi.getOrCreate().withPrefix("nimble").register(ZD())
|
|
10905
|
+
const GD=class extends cD{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){const e=this.groupHeaderValue
|
|
10901
10906
|
if(null==e)return void(this.text="")
|
|
10902
10907
|
const t=this.columnConfig?.mappingConfigs.get(e)
|
|
10903
|
-
this.text=t instanceof
|
|
10904
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10905
|
-
class
|
|
10906
|
-
throw new Error("Unsupported mapping")}}const KD
|
|
10907
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10908
|
-
const
|
|
10908
|
+
this.text=t instanceof WD&&t.text?t.text:""}}.compose({baseName:"table-column-enum-text-group-header-view",template:dD,styles:hD})
|
|
10909
|
+
bi.getOrCreate().withPrefix("nimble").register(GD())
|
|
10910
|
+
class KD extends(oD(iD(FD))){createValidator(){return new UD(this.columnInternals)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-enum-text-cell-view",groupHeaderViewTag:"nimble-table-column-enum-text-group-header-view",delegatedEvents:[],sortOperation:WT}}createColumnConfig(e){return{mappingConfigs:e}}createMappingConfig(e){if(e instanceof sv)return new WD(e.text)
|
|
10911
|
+
throw new Error("Unsupported mapping")}}const JD=KD.compose({baseName:"table-column-enum-text",template:VD,styles:LD})
|
|
10912
|
+
bi.getOrCreate().withPrefix("nimble").register(JD())
|
|
10913
|
+
const XD=Z`<span
|
|
10909
10914
|
${Jm("hasOverflow")}
|
|
10910
10915
|
class="header-content"
|
|
10911
10916
|
title=${e=>e.hasOverflow&&e.headerTextContent?e.headerTextContent:null}
|
|
@@ -10913,13 +10918,13 @@ const JD=Z`<span
|
|
|
10913
10918
|
<slot ${Ne("contentSlot")}></slot>
|
|
10914
10919
|
<slot ${Ke({property:"unitElements",filter:We()})} name="unit"></slot>
|
|
10915
10920
|
</span>`
|
|
10916
|
-
const
|
|
10917
|
-
bi.getOrCreate().withPrefix("nimble").register(XD())
|
|
10918
|
-
const YD=class extends kD{columnConfigChanged(){this.updateText(),this.alignment=this.columnConfig?.alignment??bD}cellRecordChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:yD,styles:xD})
|
|
10921
|
+
const YD=class extends cD{columnConfigChanged(){this.updateText()}groupHeaderValueChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:dD,styles:hD})
|
|
10919
10922
|
bi.getOrCreate().withPrefix("nimble").register(YD())
|
|
10920
|
-
const QD={
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
+
const QD=class extends CD{columnConfigChanged(){this.updateText(),this.alignment=this.columnConfig?.alignment??wD}cellRecordChanged(){this.updateText()}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:xD,styles:kD})
|
|
10924
|
+
bi.getOrCreate().withPrefix("nimble").register(QD())
|
|
10925
|
+
const eN={default:void 0,decimal:"decimal"},tN="left",nN="right"
|
|
10926
|
+
class iN{format(e){if("number"!=typeof e)return""
|
|
10927
|
+
try{return this.tryFormat(e)}catch{return""}}}class oN{constructor(e){this.locale=e.locale,this.intlNumberFormatOptions=e.intlNumberFormatOptions}}class rN extends oN{constructor(e,t){super(e),this.formatter=new Intl.NumberFormat(this.locale,{...t,...this.intlNumberFormatOptions})}static createFactory(e){return t=>new rN(t,e)}format(e){return this.formatter.format(e)}}class sN{constructor(e,t){this.scaleFactor=e,this.scaledUnitFormatFactory=t}isBase(){return 1===this.scaleFactor}}class aN{constructor(e){this.supportedScaledUnits=e
|
|
10923
10928
|
const t=e.every(((e,t,n)=>0===t||n[t-1].scaleFactor<e.scaleFactor))
|
|
10924
10929
|
if(!t)throw new Error("Supported scaled units must have unique and ordered scale factors")
|
|
10925
10930
|
const n=e.find((e=>e.isBase()))
|
|
@@ -10928,8 +10933,8 @@ this.supportedScaledUnits=e,this.baseScaledUnit=n}scaleNumber(e){const t=Math.ab
|
|
|
10928
10933
|
if(1===this.supportedScaledUnits.length||0===t||t===1/0||Number.isNaN(t))return{scaledValue:e,scaledUnit:this.baseScaledUnit}
|
|
10929
10934
|
for(let n=this.supportedScaledUnits.length-1;n>=0;n-=1){const i=this.supportedScaledUnits[n]
|
|
10930
10935
|
if(t/i.scaleFactor>=1)return{scaledValue:e/i.scaleFactor,scaledUnit:i}}const n=this.supportedScaledUnits[0]
|
|
10931
|
-
return{scaledValue:e/n.scaleFactor,scaledUnit:n}}}const
|
|
10932
|
-
class
|
|
10936
|
+
return{scaledValue:e/n.scaleFactor,scaledUnit:n}}}const lN=new class extends aN{constructor(){super([new sN(1,rN.createFactory({}))])}}
|
|
10937
|
+
class cN extends iN{constructor(e,{unitScale:t=lN}={unitScale:lN}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:cN.maximumDigits,useGrouping:!0},this.defaultScaledUnitFormatters=new Map,this.leadingZeroIntlNumberFormatOptions={maximumFractionDigits:cN.maximumDigits-1,useGrouping:!0},this.leadingZeroScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:cN.maximumDigits,notation:"scientific"}
|
|
10933
10938
|
for(const n of t.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions})),this.leadingZeroScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.leadingZeroIntlNumberFormatOptions}))
|
|
10934
10939
|
this.exponentialScaledUnitFormatter=t.baseScaledUnit.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=t}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(e){const t=0===e?0:e,{scaledValue:n,scaledUnit:i}=this.unitScale.scaleNumber(t)
|
|
10935
10940
|
switch(this.resolveNumberStyle(n)){case"default":return this.defaultScaledUnitFormatters.get(i.scaleFactor).format(n)
|
|
@@ -10937,34 +10942,34 @@ case"leadingZero":return this.leadingZeroScaledUnitFormatters.get(i.scaleFactor)
|
|
|
10937
10942
|
case"exponential":return this.exponentialScaledUnitFormatter.format(t)
|
|
10938
10943
|
default:throw new Error("Unexpected number format style")}}resolveNumberStyle(e){if(0===e)return"default"
|
|
10939
10944
|
const t=Math.abs(e)
|
|
10940
|
-
return t>=
|
|
10941
|
-
class
|
|
10945
|
+
return t>=cN.exponentialUpperBound||t<cN.exponentialLowerBound?"exponential":t<1?"leadingZero":"default"}}cN.maximumDigits=6,cN.exponentialLowerBound=995e-6,cN.exponentialUpperBound=999999.5
|
|
10946
|
+
class dN extends iN{constructor(e,{minimumFractionDigits:t=0,maximumFractionDigits:n=Math.max(3,t),unitScale:i=lN}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:lN}){super(),this.scaledUnitFormatters=new Map
|
|
10942
10947
|
const o={maximumFractionDigits:n,minimumFractionDigits:t,useGrouping:!0}
|
|
10943
10948
|
for(const t of i.supportedScaledUnits)this.scaledUnitFormatters.set(t.scaleFactor,t.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:o}))
|
|
10944
10949
|
this.tenPowDecimalDigits=10**n,this.unitScale=i,this.minimumFractionDigits=t,this.maximumFractionDigits=n}resolvedOptions(){return{unitScale:this.unitScale,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits}}tryFormat(e){const{scaledValue:t,scaledUnit:n}=this.unitScale.scaleNumber(e),i=this.willRoundToZero(t)?0:t
|
|
10945
|
-
return this.scaledUnitFormatters.get(n.scaleFactor).format(i)}willRoundToZero(e){return 0===Math.round(e*this.tenPowDecimalDigits)}}class
|
|
10950
|
+
return this.scaledUnitFormatters.get(n.scaleFactor).format(i)}willRoundToZero(e){return 0===Math.round(e*this.tenPowDecimalDigits)}}class hN extends iN{constructor(e,t){super(),this._resolvedOptions=this.resolveOptions(t),this.resolvedUnitFormat=this.resolveUnitFormat(e,this._resolvedOptions)}resolvedOptions(){return{...this._resolvedOptions}}optionsMatch(e){const t=this.resolveOptions(e)
|
|
10946
10951
|
return this._resolvedOptions.decimalDigits===t.decimalDigits&&this._resolvedOptions.decimalMaximumDigits===t.decimalMaximumDigits&&this._resolvedOptions.numberTextFormat===t.numberTextFormat&&this._resolvedOptions.unitScale===t.unitScale}tryFormat(e){return this.resolvedUnitFormat.format(e)}resolveUnitFormat(e,t){const{numberTextFormat:n,decimalMaximumDigits:i,decimalDigits:o,unitScale:r}=t
|
|
10947
|
-
return n===
|
|
10952
|
+
return n===eN.default?new cN(e,{unitScale:r}):new dN(e,"number"==typeof o?{minimumFractionDigits:o,maximumFractionDigits:o,unitScale:r}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:r})}resolveOptions(e){if(!e||e.numberTextFormat===eN.default)return{numberTextFormat:eN.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:e?.unitScale??lN}
|
|
10948
10953
|
const t="number"==typeof e.decimalDigits,n="number"==typeof e.decimalMaximumDigits
|
|
10949
10954
|
if(t&&n)throw new Error("decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.")
|
|
10950
|
-
return t||n?{numberTextFormat:
|
|
10951
|
-
const
|
|
10952
|
-
class
|
|
10953
|
-
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(e,t){const n=!!(e===
|
|
10954
|
-
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(e,t,n){const i=!!(e===
|
|
10955
|
+
return t||n?{numberTextFormat:eN.decimal,decimalDigits:e.decimalDigits,decimalMaximumDigits:e.decimalMaximumDigits,unitScale:e.unitScale??lN}:{numberTextFormat:eN.decimal,decimalDigits:hN.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:e.unitScale??lN}}}hN.defaultDecimalDigits=2
|
|
10956
|
+
const uN=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
|
|
10957
|
+
class pN extends _D{constructor(e){super(e,uN)}validateDecimalDigits(e,t){const n=!!(e===eN.decimal&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
|
|
10958
|
+
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(e,t){const n=!!(e===eN.decimal&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
|
|
10959
|
+
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(e,t,n){const i=!!(e===eN.decimal)&&("number"==typeof t&&"number"==typeof n)
|
|
10955
10960
|
this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(e){const t=e.length>1
|
|
10956
|
-
this.setConditionValue("moreThanOneUnitSpecified",t)}isInvalidDecimalDigitsValue(e){return e<0||e>20}}class
|
|
10957
|
-
class
|
|
10958
|
-
e.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=e}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await zE(this.unitElements),this.unit=this.unitElements.find((e=>e instanceof
|
|
10961
|
+
this.setConditionValue("moreThanOneUnitSpecified",t)}isInvalidDecimalDigitsValue(e){return e<0||e>20}}class fN extends Ft{}e([g],fN.prototype,"resolvedUnitScale",void 0)
|
|
10962
|
+
class mN extends gD{constructor(){super(...arguments),this.validator=new pN(this.columnInternals),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),xa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),xa.unsubscribe(this.langSubscriber,this)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:WT}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const e=m.getNotifier(this.unit)
|
|
10963
|
+
e.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=e}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await zE(this.unitElements),this.unit=this.unitElements.find((e=>e instanceof fN))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){if(this.validator.validateDecimalDigits(this.format,this.decimalDigits),this.validator.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),this.validator.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),this.validator.validateAtMostOneUnit(this.unitElements??[]),this.validator.isValid()){const e={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment()}
|
|
10959
10964
|
this.columnInternals.columnConfig=e}else this.columnInternals.columnConfig=void 0}createFormatter(){const e=this.unit?.resolvedUnitScale
|
|
10960
|
-
return new
|
|
10961
|
-
const mN
|
|
10962
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
10963
|
-
const
|
|
10964
|
-
class
|
|
10965
|
-
this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(
|
|
10966
|
-
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(
|
|
10967
|
-
this.setConditionValue("unsupportedMappingType",!t)}}const
|
|
10965
|
+
return new hN(xa.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:e})}determineCellContentAlignment(){return this.alignment===tN?wD:this.alignment===nN?yD:this.format!==eN.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?wD:yD}}e([se],mN.prototype,"format",void 0),e([se],mN.prototype,"alignment",void 0),e([se({attribute:"decimal-digits",converter:oe})],mN.prototype,"decimalDigits",void 0),e([se({attribute:"decimal-maximum-digits",converter:oe})],mN.prototype,"decimalMaximumDigits",void 0),e([g],mN.prototype,"unitElements",void 0),e([g],mN.prototype,"unit",void 0)
|
|
10966
|
+
const gN=mN.compose({baseName:"table-column-number-text",template:XD,styles:tD})
|
|
10967
|
+
bi.getOrCreate().withPrefix("nimble").register(gN())
|
|
10968
|
+
const vN=[...HD,"unsupportedMappingType","invalidIconName","missingTextValue"]
|
|
10969
|
+
class bN extends BD{constructor(e){super(e,vN)}static isIconMappingElement(e){return e instanceof cv}static isSupportedMappingElement(e){return e instanceof cv||e instanceof hv}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateIconNames(e),this.validateNoMissingText(e)}validateIconNames(e){const t=e.filter(bN.isIconMappingElement).some((e=>void 0===e.resolvedIcon))
|
|
10970
|
+
this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(bN.isSupportedMappingElement).some((e=>void 0===e.text))
|
|
10971
|
+
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(bN.isSupportedMappingElement)
|
|
10972
|
+
this.setConditionValue("unsupportedMappingType",!t)}}const wN=we`
|
|
10968
10973
|
${Oo("inline-flex")}
|
|
10969
10974
|
|
|
10970
10975
|
:host {
|
|
@@ -10984,7 +10989,7 @@ this.setConditionValue("unsupportedMappingType",!t)}}const bN=we`
|
|
|
10984
10989
|
overflow: hidden;
|
|
10985
10990
|
text-overflow: ellipsis;
|
|
10986
10991
|
}
|
|
10987
|
-
`,
|
|
10992
|
+
`,yN=Z`
|
|
10988
10993
|
${Le((e=>"icon"===e.visual),Z`
|
|
10989
10994
|
${e=>e.iconTemplate}
|
|
10990
10995
|
<span
|
|
@@ -11003,7 +11008,7 @@ this.setConditionValue("unsupportedMappingType",!t)}}const bN=we`
|
|
|
11003
11008
|
>${e=>e.text}</span>
|
|
11004
11009
|
`)}
|
|
11005
11010
|
`
|
|
11006
|
-
class
|
|
11011
|
+
class xN extends jD{constructor(e,t,n){var i
|
|
11007
11012
|
super(n),this.severity=t,this.iconTemplate=Z`
|
|
11008
11013
|
<${i=e}
|
|
11009
11014
|
title="${e=>e.text}"
|
|
@@ -11012,14 +11017,14 @@ super(n),this.severity=t,this.iconTemplate=Z`
|
|
|
11012
11017
|
severity="${e=>e.severity}"
|
|
11013
11018
|
class="no-shrink"
|
|
11014
11019
|
>
|
|
11015
|
-
</${i}>`}}class
|
|
11020
|
+
</${i}>`}}class kN extends jD{constructor(e){super(e)}}class CN extends cD{columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig)return
|
|
11016
11021
|
const e=this.groupHeaderValue
|
|
11017
11022
|
if(null==e)return
|
|
11018
11023
|
const t=this.columnConfig.mappingConfigs.get(e)
|
|
11019
|
-
t instanceof
|
|
11020
|
-
const CN
|
|
11021
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11022
|
-
const
|
|
11024
|
+
t instanceof xN?(this.visual="icon",this.severity=t.severity,this.text=t.text??"",this.iconTemplate=t.iconTemplate):t instanceof kN&&(this.visual="spinner",this.text=t.text??"")}}e([g],CN.prototype,"severity",void 0),e([g],CN.prototype,"iconTemplate",void 0),e([g],CN.prototype,"visual",void 0)
|
|
11025
|
+
const SN=CN.compose({baseName:"table-column-icon-group-header-view",template:yN,styles:wN})
|
|
11026
|
+
bi.getOrCreate().withPrefix("nimble").register(SN())
|
|
11027
|
+
const $N=Z`
|
|
11023
11028
|
${Le((e=>"icon"===e.visual),(e=>e.iconTemplate))}
|
|
11024
11029
|
${Le((e=>"spinner"===e.visual),Z`
|
|
11025
11030
|
<${LO}
|
|
@@ -11029,22 +11034,22 @@ const SN=Z`
|
|
|
11029
11034
|
</${LO}>
|
|
11030
11035
|
`)}
|
|
11031
11036
|
`
|
|
11032
|
-
class
|
|
11037
|
+
class MN extends JT{columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.visual=void 0,!this.columnConfig||!this.cellRecord)return
|
|
11033
11038
|
const e=this.cellRecord.value
|
|
11034
11039
|
if(null==e)return
|
|
11035
11040
|
const t=this.columnConfig.mappingConfigs.get(e)
|
|
11036
|
-
t instanceof
|
|
11037
|
-
const MN
|
|
11038
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11039
|
-
class
|
|
11040
|
-
return new
|
|
11041
|
-
throw new Error("Unsupported mapping")}}const EN
|
|
11042
|
-
bi.getOrCreate().withPrefix("nimble").register(EN())
|
|
11043
|
-
const IN=class extends kD{cellRecordChanged(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:yD,styles:xD})
|
|
11041
|
+
t instanceof xN?(this.visual="icon",this.severity=t.severity,this.text=t.text,this.iconTemplate=t.iconTemplate):t instanceof kN&&(this.visual="spinner",this.text=t.text)}}e([g],MN.prototype,"severity",void 0),e([g],MN.prototype,"text",void 0),e([g],MN.prototype,"iconTemplate",void 0),e([g],MN.prototype,"visual",void 0)
|
|
11042
|
+
const _N=MN.compose({baseName:"table-column-icon-cell-view",template:$N})
|
|
11043
|
+
bi.getOrCreate().withPrefix("nimble").register(_N())
|
|
11044
|
+
class EN extends(oD(iD(FD))){createValidator(){return new bN(this.columnInternals)}get validity(){return this.validator.getValidity()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-icon-cell-view",groupHeaderViewTag:"nimble-table-column-icon-group-header-view",delegatedEvents:[],sortOperation:WT}}createColumnConfig(e){return{mappingConfigs:e}}createMappingConfig(e){if(e instanceof cv){if(!e.resolvedIcon)throw Error("Unresolved icon")
|
|
11045
|
+
return new xN(e.resolvedIcon,e.severity,e.text)}if(e instanceof hv)return new kN(e.text)
|
|
11046
|
+
throw new Error("Unsupported mapping")}}const IN=EN.compose({baseName:"table-column-icon",template:VD,styles:LD})
|
|
11044
11047
|
bi.getOrCreate().withPrefix("nimble").register(IN())
|
|
11045
|
-
const AN=class extends
|
|
11048
|
+
const AN=class extends CD{cellRecordChanged(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:xD,styles:kD})
|
|
11046
11049
|
bi.getOrCreate().withPrefix("nimble").register(AN())
|
|
11047
|
-
const ON=
|
|
11050
|
+
const ON=class extends gD{getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:pD,delegatedEvents:[],sortOperation:ZT}}}.compose({baseName:"table-column-text",template:nD,styles:tD})
|
|
11051
|
+
bi.getOrCreate().withPrefix("nimble").register(ON())
|
|
11052
|
+
const TN=we`
|
|
11048
11053
|
${Oo("grid")}
|
|
11049
11054
|
|
|
11050
11055
|
:host {
|
|
@@ -11072,7 +11077,7 @@ const ON=we`
|
|
|
11072
11077
|
overflow: auto;
|
|
11073
11078
|
}
|
|
11074
11079
|
`
|
|
11075
|
-
const
|
|
11080
|
+
const RN=class extends oo{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:oo,template:(e,t)=>Z`
|
|
11076
11081
|
<template class="${e=>e.orientation}">
|
|
11077
11082
|
${et(0,t)}
|
|
11078
11083
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -11091,9 +11096,9 @@ const TN=class extends oo{constructor(){super(),this.activeindicator=!1}}.compos
|
|
|
11091
11096
|
<slot name="tabpanel" ${Ke("tabpanels")}></slot>
|
|
11092
11097
|
</div>
|
|
11093
11098
|
</template>
|
|
11094
|
-
`,styles:
|
|
11095
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11096
|
-
const
|
|
11099
|
+
`,styles:TN})
|
|
11100
|
+
bi.getOrCreate().withPrefix("nimble").register(RN())
|
|
11101
|
+
const DN=we`
|
|
11097
11102
|
${Oo("flex")}
|
|
11098
11103
|
|
|
11099
11104
|
:host {
|
|
@@ -11111,15 +11116,15 @@ const RN=we`
|
|
|
11111
11116
|
rgba(${Na}, 0.3);
|
|
11112
11117
|
margin: ${tl} ${nl};
|
|
11113
11118
|
}
|
|
11114
|
-
`,
|
|
11119
|
+
`,NN=Z`
|
|
11115
11120
|
<template slot="end">
|
|
11116
11121
|
<div class="separator"></div>
|
|
11117
11122
|
<slot></slot>
|
|
11118
11123
|
</template>
|
|
11119
11124
|
`
|
|
11120
|
-
const
|
|
11121
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11122
|
-
const
|
|
11125
|
+
const PN=class extends Ft{}.compose({baseName:"tabs-toolbar",template:NN,styles:DN})
|
|
11126
|
+
bi.getOrCreate().withPrefix("nimble").register(PN())
|
|
11127
|
+
const zN="outline",FN="block",LN=we`
|
|
11123
11128
|
${Oo("inline-flex")}
|
|
11124
11129
|
${Zm}
|
|
11125
11130
|
|
|
@@ -11259,12 +11264,12 @@ const PN="outline",zN="block",FN=we`
|
|
|
11259
11264
|
top: ${nl};
|
|
11260
11265
|
right: var(--ni-private-scrollbar-width);
|
|
11261
11266
|
}
|
|
11262
|
-
`.withBehaviors(th(
|
|
11267
|
+
`.withBehaviors(th(zN,we`
|
|
11263
11268
|
.control {
|
|
11264
11269
|
border-color: rgba(${Na}, 0.3);
|
|
11265
11270
|
background-color: transparent;
|
|
11266
11271
|
}
|
|
11267
|
-
`),th(
|
|
11272
|
+
`),th(FN,we`
|
|
11268
11273
|
.control {
|
|
11269
11274
|
background-color: rgba(${Na}, 0.1);
|
|
11270
11275
|
}
|
|
@@ -11282,8 +11287,8 @@ const PN="outline",zN="block",FN=we`
|
|
|
11282
11287
|
border-bottom-color: ${Pa};
|
|
11283
11288
|
}
|
|
11284
11289
|
`))
|
|
11285
|
-
class
|
|
11286
|
-
const VN
|
|
11290
|
+
class VN extends lo{constructor(){super(...arguments),this.appearance=zN,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(e,t){super.valueChanged(e,t),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}}e([se],VN.prototype,"appearance",void 0),e([se({attribute:"error-text"})],VN.prototype,"errorText",void 0),e([se({attribute:"error-visible",mode:"boolean"})],VN.prototype,"errorVisible",void 0),e([g],VN.prototype,"scrollbarWidth",void 0)
|
|
11291
|
+
const HN=VN.compose({baseName:"text-area",baseClass:lo,template:()=>Z`
|
|
11287
11292
|
<label
|
|
11288
11293
|
part="label"
|
|
11289
11294
|
for="control"
|
|
@@ -11340,9 +11345,9 @@ const VN=LN.compose({baseName:"text-area",baseClass:lo,template:()=>Z`
|
|
|
11340
11345
|
></${nm}>
|
|
11341
11346
|
${Vm}
|
|
11342
11347
|
</div>
|
|
11343
|
-
`,styles:
|
|
11344
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11345
|
-
const
|
|
11348
|
+
`,styles:LN,shadowOptions:{delegatesFocus:!0}})
|
|
11349
|
+
bi.getOrCreate().withPrefix("nimble").register(HN())
|
|
11350
|
+
const BN="underline",qN="outline",UN="block",jN="frameless",WN=we`
|
|
11346
11351
|
${Oo("inline-block")}
|
|
11347
11352
|
${Zm}
|
|
11348
11353
|
|
|
@@ -11514,12 +11519,12 @@ const HN="underline",BN="outline",qN="block",UN="frameless",jN=we`
|
|
|
11514
11519
|
slot[name='actions']::slotted(*) {
|
|
11515
11520
|
${Qa.cssCustomProperty}: 24px;
|
|
11516
11521
|
}
|
|
11517
|
-
`.withBehaviors(th(
|
|
11522
|
+
`.withBehaviors(th(BN,we`
|
|
11518
11523
|
.root {
|
|
11519
11524
|
border-bottom-width: ${rl};
|
|
11520
11525
|
padding-bottom: 0;
|
|
11521
11526
|
}
|
|
11522
|
-
`),th(
|
|
11527
|
+
`),th(UN,we`
|
|
11523
11528
|
.root {
|
|
11524
11529
|
background-color: rgba(${Na}, 0.1);
|
|
11525
11530
|
}
|
|
@@ -11547,12 +11552,12 @@ const HN="underline",BN="outline",qN="block",UN="frameless",jN=we`
|
|
|
11547
11552
|
:host([disabled]) .root {
|
|
11548
11553
|
background-color: rgba(${Na}, 0.07);
|
|
11549
11554
|
}
|
|
11550
|
-
`),th(
|
|
11555
|
+
`),th(qN,we`
|
|
11551
11556
|
.root {
|
|
11552
11557
|
border-width: ${rl};
|
|
11553
11558
|
padding: 0;
|
|
11554
11559
|
}
|
|
11555
|
-
`),th(
|
|
11560
|
+
`),th(jN,we`
|
|
11556
11561
|
.control {
|
|
11557
11562
|
padding-left: ${rl};
|
|
11558
11563
|
padding-right: ${rl};
|
|
@@ -11570,8 +11575,8 @@ const HN="underline",BN="outline",qN="block",UN="frameless",jN=we`
|
|
|
11570
11575
|
filter: invert(100%);
|
|
11571
11576
|
}
|
|
11572
11577
|
`))
|
|
11573
|
-
class
|
|
11574
|
-
const ZN
|
|
11578
|
+
class ZN extends Fi{constructor(){super(...arguments),this.appearance=BN,this.errorVisible=!1,this.fullBleed=!1}}e([se],ZN.prototype,"appearance",void 0),e([se({attribute:"error-text"})],ZN.prototype,"errorText",void 0),e([se({attribute:"error-visible",mode:"boolean"})],ZN.prototype,"errorVisible",void 0),e([se({attribute:"full-bleed",mode:"boolean"})],ZN.prototype,"fullBleed",void 0)
|
|
11579
|
+
const GN=ZN.compose({baseName:"text-field",baseClass:Fi,template:(e,t)=>Z`
|
|
11575
11580
|
<template
|
|
11576
11581
|
class="
|
|
11577
11582
|
${e=>e.readOnly?"readonly":""}
|
|
@@ -11631,7 +11636,7 @@ const ZN=WN.compose({baseName:"text-field",baseClass:Fi,template:(e,t)=>Z`
|
|
|
11631
11636
|
${Qe(0,t)}
|
|
11632
11637
|
</div>
|
|
11633
11638
|
</template>
|
|
11634
|
-
`,styles:
|
|
11639
|
+
`,styles:WN,shadowOptions:{delegatesFocus:!0},end:Z`
|
|
11635
11640
|
<${nm}
|
|
11636
11641
|
severity="error"
|
|
11637
11642
|
class="error-icon"
|
|
@@ -11641,8 +11646,8 @@ const ZN=WN.compose({baseName:"text-field",baseClass:Fi,template:(e,t)=>Z`
|
|
|
11641
11646
|
</span>
|
|
11642
11647
|
${Vm}
|
|
11643
11648
|
`})
|
|
11644
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11645
|
-
const
|
|
11649
|
+
bi.getOrCreate().withPrefix("nimble").register(GN())
|
|
11650
|
+
const KN=we`
|
|
11646
11651
|
${Oo("inline-flex")}
|
|
11647
11652
|
|
|
11648
11653
|
:host {
|
|
@@ -11727,7 +11732,7 @@ const GN=we`
|
|
|
11727
11732
|
.status-icon {
|
|
11728
11733
|
opacity: 0.6;
|
|
11729
11734
|
}
|
|
11730
|
-
`)),
|
|
11735
|
+
`)),JN=Z`
|
|
11731
11736
|
${Le((e=>e.tooltipVisible),Z`
|
|
11732
11737
|
<${$h}
|
|
11733
11738
|
class="anchored-region"
|
|
@@ -11760,11 +11765,11 @@ const GN=we`
|
|
|
11760
11765
|
</${$h}>
|
|
11761
11766
|
`)}
|
|
11762
11767
|
`
|
|
11763
|
-
class
|
|
11764
|
-
const XN
|
|
11765
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11766
|
-
const
|
|
11767
|
-
class
|
|
11768
|
+
class XN extends _o{constructor(){super(...arguments),this.iconVisible=!1}}e([se],XN.prototype,"severity",void 0),e([se({attribute:"icon-visible",mode:"boolean"})],XN.prototype,"iconVisible",void 0)
|
|
11769
|
+
const YN=XN.compose({baseName:"tooltip",baseClass:_o,template:JN,styles:KN})
|
|
11770
|
+
bi.getOrCreate().withPrefix("nimble").register(YN())
|
|
11771
|
+
const QN="group-selected",eP="all",tP="leaves-only",nP="none"
|
|
11772
|
+
class iP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=null}handleChange({target:e,token:t}){this.attach(t.getValueFor(e))}attach(e){this.attached!==this[e]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[e],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const oP=we`
|
|
11768
11773
|
${Oo("block")}
|
|
11769
11774
|
|
|
11770
11775
|
:host {
|
|
@@ -11785,7 +11790,7 @@ class nP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
11785
11790
|
}
|
|
11786
11791
|
|
|
11787
11792
|
${""}
|
|
11788
|
-
:host([${
|
|
11793
|
+
:host([${QN}])::after {
|
|
11789
11794
|
background: ${Va};
|
|
11790
11795
|
border-radius: 0px;
|
|
11791
11796
|
content: '';
|
|
@@ -11807,7 +11812,7 @@ class nP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
11807
11812
|
background: ${Ra};
|
|
11808
11813
|
}
|
|
11809
11814
|
|
|
11810
|
-
:host([${
|
|
11815
|
+
:host([${QN}]) .positioning-region:hover {
|
|
11811
11816
|
background: ${Ta};
|
|
11812
11817
|
}
|
|
11813
11818
|
|
|
@@ -11913,7 +11918,7 @@ class nP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
11913
11918
|
display: block;
|
|
11914
11919
|
}
|
|
11915
11920
|
`.withBehaviors(new class{constructor(e,t){this.cache=new WeakMap,this.ltr=e,this.rtl=t}bind(e){this.attach(e)}unbind(e){const t=this.cache.get(e)
|
|
11916
|
-
t&&ka.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new
|
|
11921
|
+
t&&ka.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new iP(this.ltr,this.rtl,e),n=ka.getValueFor(e)
|
|
11917
11922
|
ka.subscribe(t),t.attach(n),this.cache.set(e,t)}}(we`
|
|
11918
11923
|
.expand-collapse-button {
|
|
11919
11924
|
left: var(
|
|
@@ -11945,8 +11950,8 @@ ka.subscribe(t),t.attach(n),this.cache.set(e,t)}}(we`
|
|
|
11945
11950
|
transform: rotate(135deg);
|
|
11946
11951
|
}
|
|
11947
11952
|
`))
|
|
11948
|
-
class
|
|
11949
|
-
const rP
|
|
11953
|
+
class rP extends Io{constructor(){super(...arguments),this.groupSelected=!1}}e([se({attribute:"group-selected",mode:"boolean"})],rP.prototype,"groupSelected",void 0)
|
|
11954
|
+
const sP=rP.compose({baseName:"tree-item",baseClass:Io,template:(e,t)=>Z`
|
|
11950
11955
|
<template
|
|
11951
11956
|
role="treeitem"
|
|
11952
11957
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
@@ -11986,9 +11991,9 @@ const rP=oP.compose({baseName:"tree-item",baseClass:Io,template:(e,t)=>Z`
|
|
|
11986
11991
|
</div>
|
|
11987
11992
|
`)}
|
|
11988
11993
|
</template>
|
|
11989
|
-
`,styles:
|
|
11990
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
11991
|
-
const
|
|
11994
|
+
`,styles:oP,expandCollapseGlyph:Vh.data})
|
|
11995
|
+
bi.getOrCreate().withPrefix("nimble").register(sP())
|
|
11996
|
+
const aP=we`
|
|
11992
11997
|
${Oo("flex")}
|
|
11993
11998
|
|
|
11994
11999
|
:host {
|
|
@@ -12000,7 +12005,7 @@ const sP=we`
|
|
|
12000
12005
|
:host(${Do}) {
|
|
12001
12006
|
outline: none;
|
|
12002
12007
|
}
|
|
12003
|
-
`,
|
|
12008
|
+
`,lP=Z`
|
|
12004
12009
|
<template
|
|
12005
12010
|
role="tree"
|
|
12006
12011
|
${Ne("treeView")}
|
|
@@ -12014,246 +12019,246 @@ const sP=we`
|
|
|
12014
12019
|
<slot ${Ke("slottedTreeItems")}></slot>
|
|
12015
12020
|
</template>
|
|
12016
12021
|
`
|
|
12017
|
-
class
|
|
12022
|
+
class cP extends Ao{constructor(){super(...arguments),this.selectionMode=eP,this.selectedItems=[]}handleClick(e){if(e.defaultPrevented)return!1
|
|
12018
12023
|
if(!(e.target instanceof Element&&Eo(e.target)))return!0
|
|
12019
12024
|
const t=e.target
|
|
12020
|
-
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case
|
|
12021
|
-
case
|
|
12022
|
-
case
|
|
12023
|
-
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof
|
|
12025
|
+
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case eP:return!0
|
|
12026
|
+
case nP:return!1
|
|
12027
|
+
case tP:return!this.itemHasChildren(e)
|
|
12028
|
+
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof rP&&(e.groupSelected=!1)
|
|
12024
12029
|
for(let e of this.selectedItems){for(;null!==e.parentElement&&e.parentElement!==this;)e=e.parentElement
|
|
12025
|
-
e instanceof
|
|
12026
|
-
const cP
|
|
12027
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12028
|
-
const
|
|
12029
|
-
class
|
|
12030
|
-
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(t,this.locale),this.scaledPrefixText=n}static createFactory(e){return t=>new
|
|
12030
|
+
e instanceof rP&&(e.groupSelected=!0)}}}e([se({attribute:"selection-mode"})],cP.prototype,"selectionMode",void 0),e([g],cP.prototype,"selectedItems",void 0)
|
|
12031
|
+
const dP=cP.compose({baseName:"tree-view",baseClass:Ao,template:lP,styles:aP})
|
|
12032
|
+
bi.getOrCreate().withPrefix("nimble").register(dP())
|
|
12033
|
+
const hP=Z`<template slot="unit"></template>`
|
|
12034
|
+
class uP{constructor(e,t,n){this.singular=e,this.plural=t,this.symbol=n}}class pP extends oN{constructor(e,{unitTranslations:t,scaledPrefixText:n}){if(super(e),!t.get("en"))throw new Error('English translations must exist with locale string "en"')
|
|
12035
|
+
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(t,this.locale),this.scaledPrefixText=n}static createFactory(e){return t=>new pP(t,e)}format(e){const t=this.formatter.format(e)
|
|
12031
12036
|
if(""!==this.scaledPrefixText)return`${t} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
|
|
12032
12037
|
return`${t} ${"one"===this.pluralRules.select(e)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(e,t){const n=new Intl.Locale(t??"en"),i=n.language,o=n.region
|
|
12033
|
-
return(o?e.get(`${i}-${o}`):void 0)??e.get(i)??e.get("en")}}const
|
|
12034
|
-
const
|
|
12035
|
-
const
|
|
12036
|
-
class
|
|
12037
|
-
const wP
|
|
12038
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12039
|
-
const
|
|
12040
|
-
const
|
|
12041
|
-
const
|
|
12042
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12043
|
-
var
|
|
12044
|
-
function
|
|
12045
|
-
i[e]=[]}return new
|
|
12046
|
-
break}return null!=n&&e.push({name:t,value:n}),e}
|
|
12038
|
+
return(o?e.get(`${i}-${o}`):void 0)??e.get(i)??e.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"]]
|
|
12039
|
+
const gP=new class extends aN{constructor(){super(mP.map((([e,t])=>new sN(e,pP.createFactory({unitTranslations:fP,scaledPrefixText:t})))))}},vP=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
|
|
12040
|
+
const bP=new class extends aN{constructor(){super(vP.map((([e,t,n])=>new sN(e,rN.createFactory({style:"unit",unit:t,unitDisplay:n})))))}}
|
|
12041
|
+
class wP extends fN{constructor(){super(),this.binary=!1,this.resolvedUnitScale=bP}binaryChanged(){this.resolvedUnitScale=this.binary?gP:bP}}e([se({mode:"boolean"})],wP.prototype,"binary",void 0)
|
|
12042
|
+
const yP=wP.compose({baseName:"unit-byte",template:hP})
|
|
12043
|
+
bi.getOrCreate().withPrefix("nimble").register(yP())
|
|
12044
|
+
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"]],kP=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")]])
|
|
12045
|
+
const CP=new class extends aN{constructor(){super(xP.map((([e,t])=>new sN(e,pP.createFactory({unitTranslations:kP,scaledPrefixText:t})))))}}
|
|
12046
|
+
const SP=class extends fN{constructor(){super(),this.resolvedUnitScale=CP}}.compose({baseName:"unit-volt",template:hP})
|
|
12047
|
+
bi.getOrCreate().withPrefix("nimble").register(SP())
|
|
12048
|
+
var $P={value:()=>{}}
|
|
12049
|
+
function MP(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e)
|
|
12050
|
+
i[e]=[]}return new _P(i)}function _P(e){this._=e}function EP(e,t){for(var n,i=0,o=e.length;i<o;++i)if((n=e[i]).name===t)return n.value}function IP(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=$P,e=e.slice(0,i).concat(e.slice(i+1))
|
|
12051
|
+
break}return null!=n&&e.push({name:t,value:n}),e}_P.prototype=MP.prototype={constructor:_P,on:function(e,t){var n,i,o=this._,r=(i=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
|
|
12047
12052
|
if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12048
12053
|
return{type:e,name:t}}))),s=-1,a=r.length
|
|
12049
12054
|
if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t)
|
|
12050
|
-
for(;++s<a;)if(n=(e=r[s]).type)o[n]=
|
|
12051
|
-
else if(null==t)for(n in o)o[n]=
|
|
12052
|
-
return this}for(;++s<a;)if((n=(e=r[s]).type)&&(n=
|
|
12055
|
+
for(;++s<a;)if(n=(e=r[s]).type)o[n]=IP(o[n],e.name,t)
|
|
12056
|
+
else if(null==t)for(n in o)o[n]=IP(o[n],e.name,null)
|
|
12057
|
+
return this}for(;++s<a;)if((n=(e=r[s]).type)&&(n=EP(o[n],e.name)))return n},copy:function(){var e={},t=this._
|
|
12053
12058
|
for(var n in t)e[n]=t[n].slice()
|
|
12054
|
-
return new
|
|
12059
|
+
return new _P(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),r=0;r<n;++r)o[r]=arguments[r+2]
|
|
12055
12060
|
if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12056
12061
|
for(r=0,n=(i=this._[e]).length;r<n;++r)i[r].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12057
12062
|
for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}}
|
|
12058
|
-
var
|
|
12059
|
-
function
|
|
12060
|
-
return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),
|
|
12061
|
-
return n===
|
|
12062
|
-
return(t.local?RP
|
|
12063
|
-
var t}}function
|
|
12064
|
-
function
|
|
12065
|
-
function
|
|
12066
|
-
for(;a<l;++a)(s=t[a])&&(o[a]=s)}function
|
|
12063
|
+
var AP="http://www.w3.org/1999/xhtml",OP={svg:"http://www.w3.org/2000/svg",xhtml:AP,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
12064
|
+
function TP(e){var t=e+="",n=t.indexOf(":")
|
|
12065
|
+
return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),OP.hasOwnProperty(t)?{space:OP[t],local:e}:e}function RP(e){return function(){var t=this.ownerDocument,n=this.namespaceURI
|
|
12066
|
+
return n===AP&&t.documentElement.namespaceURI===AP?t.createElement(e):t.createElementNS(n,e)}}function DP(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function NP(e){var t=TP(e)
|
|
12067
|
+
return(t.local?DP:RP)(t)}function PP(){}function zP(e){return null==e?PP:function(){return this.querySelector(e)}}function FP(){return[]}function LP(e){return null==e?FP:function(){return this.querySelectorAll(e)}}function VP(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t)
|
|
12068
|
+
var t}}function HP(e){return function(){return this.matches(e)}}function BP(e){return function(t){return t.matches(e)}}var qP=Array.prototype.find
|
|
12069
|
+
function UP(){return this.firstElementChild}var jP=Array.prototype.filter
|
|
12070
|
+
function WP(){return Array.from(this.children)}function ZP(e){return new Array(e.length)}function GP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function KP(e,t,n,i,o,r){for(var s,a=0,l=t.length,c=r.length;a<c;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new GP(e,r[a])
|
|
12071
|
+
for(;a<l;++a)(s=t[a])&&(o[a]=s)}function JP(e,t,n,i,o,r,s){var a,l,c,d=new Map,h=t.length,u=r.length,p=new Array(h)
|
|
12067
12072
|
for(a=0;a<h;++a)(l=t[a])&&(p[a]=c=s.call(l,l.__data__,a,t)+"",d.has(c)?o[a]=l:d.set(c,l))
|
|
12068
|
-
for(a=0;a<u;++a)c=s.call(e,r[a],a,r)+"",(l=d.get(c))?(i[a]=l,l.__data__=r[a],d.delete(c)):n[a]=new
|
|
12069
|
-
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(o[a]=l)}function
|
|
12070
|
-
null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function
|
|
12071
|
-
null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function
|
|
12072
|
-
null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function
|
|
12073
|
-
null==n?delete this[e]:this[e]=n}}function
|
|
12074
|
-
this.textContent=null==t?"":t}}function
|
|
12075
|
-
this.innerHTML=null==t?"":t}}function
|
|
12076
|
-
e&&e.removeChild(this)}function
|
|
12077
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
12078
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
12079
|
-
if(t){for(var n,i=0,o=-1,r=t.length;i<r;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function
|
|
12073
|
+
for(a=0;a<u;++a)c=s.call(e,r[a],a,r)+"",(l=d.get(c))?(i[a]=l,l.__data__=r[a],d.delete(c)):n[a]=new GP(e,r[a])
|
|
12074
|
+
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(o[a]=l)}function XP(e){return e.__data__}function YP(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function QP(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ez(e){return function(){this.removeAttribute(e)}}function tz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nz(e,t){return function(){this.setAttribute(e,t)}}function iz(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function oz(e,t){return function(){var n=t.apply(this,arguments)
|
|
12075
|
+
null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function rz(e,t){return function(){var n=t.apply(this,arguments)
|
|
12076
|
+
null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function sz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function az(e){return function(){this.style.removeProperty(e)}}function lz(e,t,n){return function(){this.style.setProperty(e,t,n)}}function cz(e,t,n){return function(){var i=t.apply(this,arguments)
|
|
12077
|
+
null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function dz(e,t){return e.style.getPropertyValue(t)||sz(e).getComputedStyle(e,null).getPropertyValue(t)}function hz(e){return function(){delete this[e]}}function uz(e,t){return function(){this[e]=t}}function pz(e,t){return function(){var n=t.apply(this,arguments)
|
|
12078
|
+
null==n?delete this[e]:this[e]=n}}function fz(e){return e.trim().split(/^|\s+/)}function mz(e){return e.classList||new gz(e)}function gz(e){this._node=e,this._names=fz(e.getAttribute("class")||"")}function vz(e,t){for(var n=mz(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function bz(e,t){for(var n=mz(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function wz(e){return function(){vz(this,e)}}function yz(e){return function(){bz(this,e)}}function xz(e,t){return function(){(t.apply(this,arguments)?vz:bz)(this,e)}}function kz(){this.textContent=""}function Cz(e){return function(){this.textContent=e}}function Sz(e){return function(){var t=e.apply(this,arguments)
|
|
12079
|
+
this.textContent=null==t?"":t}}function $z(){this.innerHTML=""}function Mz(e){return function(){this.innerHTML=e}}function _z(e){return function(){var t=e.apply(this,arguments)
|
|
12080
|
+
this.innerHTML=null==t?"":t}}function Ez(){this.nextSibling&&this.parentNode.appendChild(this)}function Iz(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Az(){return null}function Oz(){var e=this.parentNode
|
|
12081
|
+
e&&e.removeChild(this)}function Tz(){var e=this.cloneNode(!1),t=this.parentNode
|
|
12082
|
+
return t?t.insertBefore(e,this.nextSibling):e}function Rz(){var e=this.cloneNode(!0),t=this.parentNode
|
|
12083
|
+
return t?t.insertBefore(e,this.nextSibling):e}function Dz(e){return function(){var t=this.__on
|
|
12084
|
+
if(t){for(var n,i=0,o=-1,r=t.length;i<r;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function Nz(e,t,n){return function(){var i,o=this.__on,r=function(e){return function(t){e.call(this,t,this.__data__)}}(t)
|
|
12080
12085
|
if(o)for(var s=0,a=o.length;s<a;++s)if((i=o[s]).type===e.type&&i.name===e.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),void(i.value=t)
|
|
12081
|
-
this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function
|
|
12082
|
-
"function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function
|
|
12086
|
+
this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function Pz(e,t,n){var i=sz(e),o=i.CustomEvent
|
|
12087
|
+
"function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function zz(e,t){return function(){return Pz(this,e,t)}}function Fz(e,t){return function(){return Pz(this,e,t.apply(this,arguments))}}GP.prototype={constructor:GP,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},gz.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e)
|
|
12083
12088
|
t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}
|
|
12084
|
-
var
|
|
12085
|
-
function
|
|
12089
|
+
var Lz=[null]
|
|
12090
|
+
function Vz(e,t){this._groups=e,this._parents=t}function Hz(){return new Vz([[document.documentElement]],Lz)}function Bz(e){return"string"==typeof e?new Vz([[document.querySelector(e)]],[document.documentElement]):new Vz([[e]],Lz)}function qz(e,t){if(e=function(e){let t
|
|
12086
12091
|
for(;t=e.sourceEvent;)e=t
|
|
12087
12092
|
return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t
|
|
12088
12093
|
if(n.createSVGPoint){var i=n.createSVGPoint()
|
|
12089
12094
|
return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect()
|
|
12090
|
-
return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}
|
|
12095
|
+
return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}Vz.prototype=Hz.prototype={constructor:Vz,select:function(e){"function"!=typeof e&&(e=zP(e))
|
|
12091
12096
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s,a=t[o],l=a.length,c=i[o]=new Array(l),d=0;d<l;++d)(r=a[d])&&(s=e.call(r,r.__data__,d,a))&&("__data__"in r&&(s.__data__=r.__data__),c[d]=s)
|
|
12092
|
-
return new
|
|
12097
|
+
return new Vz(i,this._parents)},selectAll:function(e){e="function"==typeof e?VP(e):LP(e)
|
|
12093
12098
|
for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var s,a=t[r],l=a.length,c=0;c<l;++c)(s=a[c])&&(i.push(e.call(s,s.__data__,c,a)),o.push(s))
|
|
12094
|
-
return new
|
|
12099
|
+
return new Vz(i,o)},selectChild:function(e){return this.select(null==e?UP:function(e){return function(){return qP.call(this.children,e)}}("function"==typeof e?e:BP(e)))},selectChildren:function(e){return this.selectAll(null==e?WP:function(e){return function(){return jP.call(this.children,e)}}("function"==typeof e?e:BP(e)))},filter:function(e){"function"!=typeof e&&(e=HP(e))
|
|
12095
12100
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s=t[o],a=s.length,l=i[o]=[],c=0;c<a;++c)(r=s[c])&&e.call(r,r.__data__,c,s)&&l.push(r)
|
|
12096
|
-
return new
|
|
12097
|
-
var n,i=t?KP
|
|
12101
|
+
return new Vz(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,XP)
|
|
12102
|
+
var n,i=t?JP:KP,o=this._parents,r=this._groups
|
|
12098
12103
|
"function"!=typeof e&&(n=e,e=function(){return n})
|
|
12099
|
-
for(var s=r.length,a=new Array(s),l=new Array(s),c=new Array(s),d=0;d<s;++d){var h=o[d],u=r[d],p=u.length,f=
|
|
12104
|
+
for(var s=r.length,a=new Array(s),l=new Array(s),c=new Array(s),d=0;d<s;++d){var h=o[d],u=r[d],p=u.length,f=YP(e.call(h,h&&h.__data__,d,o)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
|
|
12100
12105
|
i(h,u,g,v,c[d]=new Array(p),f,t)
|
|
12101
|
-
for(var b,w,y=0,x=0;y<m;++y)if(b=g[y]){for(y>=x&&(x=y+1);!(w=v[x])&&++x<m;);b._next=w||null}}return(a=new
|
|
12106
|
+
for(var b,w,y=0,x=0;y<m;++y)if(b=g[y]){for(y>=x&&(x=y+1);!(w=v[x])&&++x<m;);b._next=w||null}}return(a=new Vz(a,o))._enter=l,a._exit=c,a},enter:function(){return new Vz(this._enter||this._groups.map(ZP),this._parents)},exit:function(){return new Vz(this._exit||this._groups.map(ZP),this._parents)},join:function(e,t,n){var i=this.enter(),o=this,r=this.exit()
|
|
12102
12107
|
return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?r.remove():n(r),i&&o?i.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,s=Math.min(o,r),a=new Array(o),l=0;l<s;++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)
|
|
12103
12108
|
for(;l<o;++l)a[l]=n[l]
|
|
12104
|
-
return new
|
|
12105
|
-
return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=
|
|
12109
|
+
return new Vz(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i,o=e[t],r=o.length-1,s=o[r];--r>=0;)(i=o[r])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i)
|
|
12110
|
+
return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=QP)
|
|
12106
12111
|
for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var s,a=n[r],l=a.length,c=o[r]=new Array(l),d=0;d<l;++d)(s=a[d])&&(c[d]=s)
|
|
12107
|
-
c.sort(t)}return new
|
|
12112
|
+
c.sort(t)}return new Vz(o,this._parents).order()},call:function(){var e=arguments[0]
|
|
12108
12113
|
return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var s=i[o]
|
|
12109
12114
|
if(s)return s}return null},size:function(){let e=0
|
|
12110
12115
|
for(const t of this)++e
|
|
12111
12116
|
return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o,r=t[n],s=0,a=r.length;s<a;++s)(o=r[s])&&e.call(o,o.__data__,s,r)
|
|
12112
|
-
return this},attr:function(e,t){var n=
|
|
12117
|
+
return this},attr:function(e,t){var n=TP(e)
|
|
12113
12118
|
if(arguments.length<2){var i=this.node()
|
|
12114
|
-
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?ez:
|
|
12115
|
-
if(arguments.length<2){for(var i=
|
|
12116
|
-
return!0}return this.each(("function"==typeof t?
|
|
12117
|
-
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:
|
|
12118
|
-
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
12119
|
+
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?tz:ez:"function"==typeof t?n.local?rz:oz:n.local?iz:nz)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?az:"function"==typeof t?cz:lz)(e,t,null==n?"":n)):dz(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?hz:"function"==typeof t?pz:uz)(e,t)):this.node()[e]},classed:function(e,t){var n=fz(e+"")
|
|
12120
|
+
if(arguments.length<2){for(var i=mz(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1
|
|
12121
|
+
return!0}return this.each(("function"==typeof t?xz:t?wz:yz)(n,t))},text:function(e){return arguments.length?this.each(null==e?kz:("function"==typeof e?Sz:Cz)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?$z:("function"==typeof e?_z:Mz)(e)):this.node().innerHTML},raise:function(){return this.each(Ez)},lower:function(){return this.each(Iz)},append:function(e){var t="function"==typeof e?e:NP(e)
|
|
12122
|
+
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:NP(e),i=null==t?Az:"function"==typeof t?t:zP(t)
|
|
12123
|
+
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(Oz)},clone:function(e){return this.select(e?Rz:Tz)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var i,o,r=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
|
|
12119
12124
|
return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),s=r.length
|
|
12120
|
-
if(!(arguments.length<2)){for(a=t?Dz
|
|
12125
|
+
if(!(arguments.length<2)){for(a=t?Nz:Dz,i=0;i<s;++i)this.each(a(r[i],t,n))
|
|
12121
12126
|
return this}var a=this.node().__on
|
|
12122
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<s;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?zz
|
|
12123
|
-
const
|
|
12124
|
-
function
|
|
12127
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<s;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Fz:zz)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i,o=e[t],r=0,s=o.length;r<s;++r)(i=o[r])&&(yield i)}}
|
|
12128
|
+
const Uz={capture:!0,passive:!1}
|
|
12129
|
+
function jz(e){e.preventDefault(),e.stopImmediatePropagation()}function Wz(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zz(e,t){var n=Object.create(e.prototype)
|
|
12125
12130
|
for(var i in t)n[i]=t[i]
|
|
12126
|
-
return n}function
|
|
12127
|
-
function
|
|
12128
|
-
return e=(e+"").trim().toLowerCase(),(t=
|
|
12129
|
-
var o}function
|
|
12130
|
-
return`${1===e?"rgb(":"rgba("}${
|
|
12131
|
-
if(e instanceof
|
|
12132
|
-
if(e instanceof
|
|
12131
|
+
return n}function Gz(){}var Kz=.7,Jz=1/Kz,Xz="\\s*([+-]?\\d+)\\s*",Yz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",eF=/^#([0-9a-f]{3,8})$/,tF=new RegExp(`^rgb\\(${Xz},${Xz},${Xz}\\)$`),nF=new RegExp(`^rgb\\(${Qz},${Qz},${Qz}\\)$`),iF=new RegExp(`^rgba\\(${Xz},${Xz},${Xz},${Yz}\\)$`),oF=new RegExp(`^rgba\\(${Qz},${Qz},${Qz},${Yz}\\)$`),rF=new RegExp(`^hsl\\(${Yz},${Qz},${Qz}\\)$`),sF=new RegExp(`^hsla\\(${Yz},${Qz},${Qz},${Yz}\\)$`),aF={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}
|
|
12132
|
+
function lF(){return this.rgb().formatHex()}function cF(){return this.rgb().formatRgb()}function dF(e){var t,n
|
|
12133
|
+
return e=(e+"").trim().toLowerCase(),(t=eF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?hF(t):3===n?new fF(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?uF(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?uF(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=tF.exec(e))?new fF(t[1],t[2],t[3],1):(t=nF.exec(e))?new fF(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=iF.exec(e))?uF(t[1],t[2],t[3],t[4]):(t=oF.exec(e))?uF(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=rF.exec(e))?yF(t[1],t[2]/100,t[3]/100,1):(t=sF.exec(e))?yF(t[1],t[2]/100,t[3]/100,t[4]):aF.hasOwnProperty(e)?hF(aF[e]):"transparent"===e?new fF(NaN,NaN,NaN,0):null}function hF(e){return new fF(e>>16&255,e>>8&255,255&e,1)}function uF(e,t,n,i){return i<=0&&(e=t=n=NaN),new fF(e,t,n,i)}function pF(e,t,n,i){return 1===arguments.length?((o=e)instanceof Gz||(o=dF(o)),o?new fF((o=o.rgb()).r,o.g,o.b,o.opacity):new fF):new fF(e,t,n,null==i?1:i)
|
|
12134
|
+
var o}function fF(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function mF(){return`#${wF(this.r)}${wF(this.g)}${wF(this.b)}`}function gF(){const e=vF(this.opacity)
|
|
12135
|
+
return`${1===e?"rgb(":"rgba("}${bF(this.r)}, ${bF(this.g)}, ${bF(this.b)}${1===e?")":`, ${e})`}`}function vF(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function bF(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wF(e){return((e=bF(e))<16?"0":"")+e.toString(16)}function yF(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kF(e,t,n,i)}function xF(e){if(e instanceof kF)return new kF(e.h,e.s,e.l,e.opacity)
|
|
12136
|
+
if(e instanceof Gz||(e=dF(e)),!e)return new kF
|
|
12137
|
+
if(e instanceof kF)return e
|
|
12133
12138
|
var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),s=NaN,a=r-o,l=(r+o)/2
|
|
12134
|
-
return a?(s=t===r?(n-i)/a+6*(n<i):n===r?(i-t)/a+2:(t-n)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new
|
|
12135
|
-
return new
|
|
12136
|
-
return`${1===e?"hsl(":"hsla("}${
|
|
12137
|
-
var
|
|
12138
|
-
function
|
|
12139
|
-
return n?function(e,t){return function(n){return e+n*t}}(e,n)
|
|
12140
|
-
function i(e,t){var i=n((e=
|
|
12139
|
+
return a?(s=t===r?(n-i)/a+6*(n<i):n===r?(i-t)/a+2:(t-n)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new kF(s,a,l,e.opacity)}function kF(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function CF(e){return(e=(e||0)%360)<0?e+360:e}function SF(e){return Math.max(0,Math.min(1,e||0))}function $F(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Wz(Gz,dF,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:lF,formatHex:lF,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return xF(this).formatHsl()},formatRgb:cF,toString:cF}),Wz(fF,pF,Zz(Gz,{brighter(e){return e=null==e?Jz:Math.pow(Jz,e),new fF(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Kz:Math.pow(Kz,e),new fF(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fF(bF(this.r),bF(this.g),bF(this.b),vF(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:mF,formatHex:mF,formatHex8:function(){return`#${wF(this.r)}${wF(this.g)}${wF(this.b)}${wF(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:gF,toString:gF})),Wz(kF,(function(e,t,n,i){return 1===arguments.length?xF(e):new kF(e,t,n,null==i?1:i)}),Zz(Gz,{brighter(e){return e=null==e?Jz:Math.pow(Jz,e),new kF(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Kz:Math.pow(Kz,e),new kF(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i
|
|
12140
|
+
return new fF($F(e>=240?e-240:e+120,o,i),$F(e,o,i),$F(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new kF(CF(this.h),SF(this.s),SF(this.l),vF(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=vF(this.opacity)
|
|
12141
|
+
return`${1===e?"hsl(":"hsla("}${CF(this.h)}, ${100*SF(this.s)}%, ${100*SF(this.l)}%${1===e?")":`, ${e})`}`}}))
|
|
12142
|
+
var MF=e=>()=>e
|
|
12143
|
+
function _F(e){return 1==(e=+e)?EF:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):MF(isNaN(t)?n:t)}}function EF(e,t){var n=t-e
|
|
12144
|
+
return n?function(e,t){return function(n){return e+n*t}}(e,n):MF(isNaN(e)?t:e)}var IF=function e(t){var n=_F(t)
|
|
12145
|
+
function i(e,t){var i=n((e=pF(e)).r,(t=pF(t)).r),o=n(e.g,t.g),r=n(e.b,t.b),s=EF(e.opacity,t.opacity)
|
|
12141
12146
|
return function(t){return e.r=i(t),e.g=o(t),e.b=r(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1)
|
|
12142
|
-
function
|
|
12147
|
+
function AF(e,t){t||(t=[])
|
|
12143
12148
|
var n,i=e?Math.min(t.length,e.length):0,o=t.slice()
|
|
12144
12149
|
return function(r){for(n=0;n<i;++n)o[n]=e[n]*(1-r)+t[n]*r
|
|
12145
|
-
return o}}function
|
|
12146
|
-
for(n=0;n<o;++n)r[n]=
|
|
12150
|
+
return o}}function OF(e,t){var n,i=t?t.length:0,o=e?Math.min(i,e.length):0,r=new Array(o),s=new Array(i)
|
|
12151
|
+
for(n=0;n<o;++n)r[n]=FF(e[n],t[n])
|
|
12147
12152
|
for(;n<i;++n)s[n]=t[n]
|
|
12148
12153
|
return function(e){for(n=0;n<o;++n)s[n]=r[n](e)
|
|
12149
|
-
return s}}function
|
|
12150
|
-
return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function
|
|
12151
|
-
for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=
|
|
12154
|
+
return s}}function TF(e,t){var n=new Date
|
|
12155
|
+
return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function RF(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function DF(e,t){var n,i={},o={}
|
|
12156
|
+
for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=FF(e[n],t[n]):o[n]=t[n]
|
|
12152
12157
|
return function(e){for(n in i)o[n]=i[n](e)
|
|
12153
|
-
return o}}var
|
|
12154
|
-
function
|
|
12155
|
-
for(e+="",t+="";(n=
|
|
12158
|
+
return o}}var NF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,PF=new RegExp(NF.source,"g")
|
|
12159
|
+
function zF(e,t){var n,i,o,r=NF.lastIndex=PF.lastIndex=0,s=-1,a=[],l=[]
|
|
12160
|
+
for(e+="",t+="";(n=NF.exec(e))&&(i=PF.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:RF(n,i)})),r=PF.lastIndex
|
|
12156
12161
|
return r<t.length&&(o=t.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)a[(n=l[i]).i]=n.x(e)
|
|
12157
|
-
return a.join("")})}function
|
|
12158
|
-
return null==t||"boolean"===o
|
|
12159
|
-
function
|
|
12160
|
-
return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*
|
|
12162
|
+
return a.join("")})}function FF(e,t){var n,i,o=typeof t
|
|
12163
|
+
return null==t||"boolean"===o?MF(t):("number"===o?RF:"string"===o?(n=dF(t))?(t=n,IF):zF:t instanceof dF?IF:t instanceof Date?TF:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?OF:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?DF:RF:AF))(e,t)}function LF(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var VF,HF=180/Math.PI,BF={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
12164
|
+
function qF(e,t,n,i,o,r){var s,a,l
|
|
12165
|
+
return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*HF,skewX:Math.atan(l)*HF,scaleX:s,scaleY:a}}function UF(e,t,n,i){function o(e){return e.length?e.pop()+" ":""}return function(r,s){var a=[],l=[]
|
|
12161
12166
|
return r=e(r),s=e(s),function(e,i,o,r,s,a){if(e!==o||i!==r){var l=s.push("translate(",null,t,null,n)
|
|
12162
|
-
a.push({i:l-4,x:
|
|
12163
|
-
s.push({i:a-4,x:
|
|
12164
|
-
return a.join("")}}}var UF
|
|
12165
|
-
return t.isIdentity?
|
|
12166
|
-
function
|
|
12167
|
+
a.push({i:l-4,x:RF(e,o)},{i:l-2,x:RF(i,r)})}else(o||r)&&s.push("translate("+o+t+r+n)}(r.translateX,r.translateY,s.translateX,s.translateY,a,l),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(o(n)+"rotate(",null,i)-2,x:RF(e,t)})):t&&n.push(o(n)+"rotate("+t+i)}(r.rotate,s.rotate,a,l),function(e,t,n,r){e!==t?r.push({i:n.push(o(n)+"skewX(",null,i)-2,x:RF(e,t)}):t&&n.push(o(n)+"skewX("+t+i)}(r.skewX,s.skewX,a,l),function(e,t,n,i,r,s){if(e!==n||t!==i){var a=r.push(o(r)+"scale(",null,",",null,")")
|
|
12168
|
+
s.push({i:a-4,x:RF(e,n)},{i:a-2,x:RF(t,i)})}else 1===n&&1===i||r.push(o(r)+"scale("+n+","+i+")")}(r.scaleX,r.scaleY,s.scaleX,s.scaleY,a,l),r=s=null,function(e){for(var t,n=-1,i=l.length;++n<i;)a[(t=l[n]).i]=t.x(e)
|
|
12169
|
+
return a.join("")}}}var jF=UF((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")
|
|
12170
|
+
return t.isIdentity?BF:qF(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),WF=UF((function(e){return null==e?BF:(VF||(VF=document.createElementNS("http://www.w3.org/2000/svg","g")),VF.setAttribute("transform",e),(e=VF.transform.baseVal.consolidate())?qF((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):BF)}),", ",")",")")
|
|
12171
|
+
function ZF(e){return((e=Math.exp(e))+1/e)/2}var GF,KF,JF=function e(t,n,i){function o(e,o){var r,s,a=e[0],l=e[1],c=e[2],d=o[0],h=o[1],u=o[2],p=d-a,f=h-l,m=p*p+f*f
|
|
12167
12172
|
if(m<1e-12)s=Math.log(u/c)/t,r=function(e){return[a+e*p,l+e*f,c*Math.exp(t*e*s)]}
|
|
12168
12173
|
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),w=Math.log(Math.sqrt(v*v+1)-v),y=Math.log(Math.sqrt(b*b+1)-b)
|
|
12169
|
-
s=(y-w)/t,r=function(e){var i,o=e*s,r=
|
|
12170
|
-
return[a+d*p,l+d*f,c*r/
|
|
12171
|
-
return e(n,i,i*i)},o}(Math.SQRT2,2,4),
|
|
12172
|
-
function
|
|
12173
|
-
return i.restart(e,t,n),i}function
|
|
12174
|
-
try{!function(){
|
|
12175
|
-
for(var e,t=
|
|
12176
|
-
for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:
|
|
12177
|
-
|
|
12178
|
-
t>
|
|
12179
|
-
return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}
|
|
12180
|
-
n=(null==n?
|
|
12181
|
-
var
|
|
12182
|
-
function
|
|
12174
|
+
s=(y-w)/t,r=function(e){var i,o=e*s,r=ZF(w),d=c/(n*g)*(r*(i=t*o+w,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w))
|
|
12175
|
+
return[a+d*p,l+d*f,c*r/ZF(t*o+w)]}}return r.duration=1e3*s*t/Math.SQRT2,r}return o.rho=function(t){var n=Math.max(.001,+t),i=n*n
|
|
12176
|
+
return e(n,i,i*i)},o}(Math.SQRT2,2,4),XF=0,YF=0,QF=0,eL=1e3,tL=0,nL=0,iL=0,oL="object"==typeof performance&&performance.now?performance:Date,rL="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)}
|
|
12177
|
+
function sL(){return nL||(rL(aL),nL=oL.now()+iL)}function aL(){nL=0}function lL(){this._call=this._time=this._next=null}function cL(e,t,n){var i=new lL
|
|
12178
|
+
return i.restart(e,t,n),i}function dL(){nL=(tL=oL.now())+iL,XF=YF=0
|
|
12179
|
+
try{!function(){sL(),++XF
|
|
12180
|
+
for(var e,t=GF;t;)(e=nL-t._time)>=0&&t._call.call(void 0,e),t=t._next;--XF}()}finally{XF=0,function(){var e,t,n=GF,i=1/0
|
|
12181
|
+
for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:GF=t)
|
|
12182
|
+
KF=e,uL(i)}(),nL=0}}function hL(){var e=oL.now(),t=e-tL
|
|
12183
|
+
t>eL&&(iL-=t,tL=e)}function uL(e){XF||(YF&&(YF=clearTimeout(YF)),e-nL>24?(e<1/0&&(YF=setTimeout(dL,e-oL.now()-iL)),QF&&(QF=clearInterval(QF))):(QF||(tL=oL.now(),QF=setInterval(hL,eL)),XF=1,rL(dL)))}function pL(e,t,n){var i=new lL
|
|
12184
|
+
return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}lL.prototype=cL.prototype={constructor:lL,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function")
|
|
12185
|
+
n=(null==n?sL():+n)+(null==t?0:+t),this._next||KF===this||(KF?KF._next=this:GF=this,KF=this),this._call=e,this._time=n,uL()},stop:function(){this._call&&(this._call=null,this._time=1/0,uL())}}
|
|
12186
|
+
var fL=MP("start","end","cancel","interrupt"),mL=[],gL=0,vL=1,bL=2,wL=3,yL=4,xL=5,kL=6
|
|
12187
|
+
function CL(e,t,n,i,o,r){var s=e.__transition
|
|
12183
12188
|
if(s){if(n in s)return}else e.__transition={}
|
|
12184
12189
|
!function(e,t,n){var i,o=e.__transition
|
|
12185
|
-
function r(e){n.state=
|
|
12186
|
-
if(n.state!==
|
|
12187
|
-
for(c in o)if((u=o[c]).name===n.name){if(u.state===
|
|
12188
|
-
u.state===
|
|
12189
|
-
i.length=d+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=
|
|
12190
|
-
n.state===
|
|
12191
|
-
delete e.__transition}o[t]=n,n.timer=
|
|
12192
|
-
if(n.state>
|
|
12193
|
-
return n}function
|
|
12194
|
-
if(n.state>
|
|
12195
|
-
return n}function
|
|
12190
|
+
function r(e){n.state=vL,n.timer.restart(s,n.delay,n.time),n.delay<=e&&s(e-n.delay)}function s(r){var c,d,h,u
|
|
12191
|
+
if(n.state!==vL)return l()
|
|
12192
|
+
for(c in o)if((u=o[c]).name===n.name){if(u.state===wL)return pL(s)
|
|
12193
|
+
u.state===yL?(u.state=kL,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete o[c]):+c<t&&(u.state=kL,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete o[c])}if(pL((function(){n.state===wL&&(n.state=yL,n.timer.restart(a,n.delay,n.time),a(r))})),n.state=bL,n.on.call("start",e,e.__data__,n.index,n.group),n.state===bL){for(n.state=wL,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=u)
|
|
12194
|
+
i.length=d+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=xL,1),r=-1,s=i.length;++r<s;)i[r].call(e,o)
|
|
12195
|
+
n.state===xL&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var i in n.state=kL,n.timer.stop(),delete o[t],o)return
|
|
12196
|
+
delete e.__transition}o[t]=n,n.timer=cL(r,0,n.time)}(e,n,{name:t,index:i,group:o,on:fL,tween:mL,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:gL})}function SL(e,t){var n=ML(e,t)
|
|
12197
|
+
if(n.state>gL)throw new Error("too late; already scheduled")
|
|
12198
|
+
return n}function $L(e,t){var n=ML(e,t)
|
|
12199
|
+
if(n.state>wL)throw new Error("too late; already running")
|
|
12200
|
+
return n}function ML(e,t){var n=e.__transition
|
|
12196
12201
|
if(!n||!(n=n[t]))throw new Error("transition not found")
|
|
12197
|
-
return n}function
|
|
12198
|
-
if(r){for(o in t=null==t?null:t+"",r)(n=r[o]).name===t?(i=n.state>
|
|
12199
|
-
s&&delete e.__transition}}function
|
|
12200
|
-
return function(){var o
|
|
12202
|
+
return n}function _L(e,t){var n,i,o,r=e.__transition,s=!0
|
|
12203
|
+
if(r){for(o in t=null==t?null:t+"",r)(n=r[o]).name===t?(i=n.state>bL&&n.state<xL,n.state=kL,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[o]):s=!1
|
|
12204
|
+
s&&delete e.__transition}}function EL(e,t){var n,i
|
|
12205
|
+
return function(){var o=$L(this,e),r=o.tween
|
|
12201
12206
|
if(r!==n)for(var s=0,a=(i=n=r).length;s<a;++s)if(i[s].name===t){(i=i.slice()).splice(s,1)
|
|
12202
|
-
break}o.tween=i}}function
|
|
12207
|
+
break}o.tween=i}}function IL(e,t,n){var i,o
|
|
12203
12208
|
if("function"!=typeof n)throw new Error
|
|
12204
|
-
return function(){var r
|
|
12209
|
+
return function(){var r=$L(this,e),s=r.tween
|
|
12205
12210
|
if(s!==i){o=(i=s).slice()
|
|
12206
12211
|
for(var a={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=a
|
|
12207
|
-
break}l===c&&o.push(a)}r.tween=o}}function
|
|
12208
|
-
return e.each((function(){var e
|
|
12209
|
-
return("number"==typeof t?
|
|
12212
|
+
break}l===c&&o.push(a)}r.tween=o}}function AL(e,t,n){var i=e._id
|
|
12213
|
+
return e.each((function(){var e=$L(this,i);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return ML(e,i).value[t]}}function OL(e,t){var n
|
|
12214
|
+
return("number"==typeof t?RF:t instanceof dF?IF:(n=dF(t))?(t=n,IF):zF)(e,t)}function TL(e){return function(){this.removeAttribute(e)}}function RL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function DL(e,t,n){var i,o,r=n+""
|
|
12210
12215
|
return function(){var s=this.getAttribute(e)
|
|
12211
|
-
return s===r?null:s===i?o:o=t(i=s,n)}}function
|
|
12216
|
+
return s===r?null:s===i?o:o=t(i=s,n)}}function NL(e,t,n){var i,o,r=n+""
|
|
12212
12217
|
return function(){var s=this.getAttributeNS(e.space,e.local)
|
|
12213
|
-
return s===r?null:s===i?o:o=t(i=s,n)}}function
|
|
12218
|
+
return s===r?null:s===i?o:o=t(i=s,n)}}function PL(e,t,n){var i,o,r
|
|
12214
12219
|
return function(){var s,a,l=n(this)
|
|
12215
12220
|
if(null!=l)return(s=this.getAttribute(e))===(a=l+"")?null:s===i&&a===o?r:(o=a,r=t(i=s,l))
|
|
12216
|
-
this.removeAttribute(e)}}function
|
|
12221
|
+
this.removeAttribute(e)}}function zL(e,t,n){var i,o,r
|
|
12217
12222
|
return function(){var s,a,l=n(this)
|
|
12218
12223
|
if(null!=l)return(s=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:s===i&&a===o?r:(o=a,r=t(i=s,l))
|
|
12219
|
-
this.removeAttributeNS(e.space,e.local)}}function
|
|
12224
|
+
this.removeAttributeNS(e.space,e.local)}}function FL(e,t){var n,i
|
|
12220
12225
|
function o(){var o=t.apply(this,arguments)
|
|
12221
|
-
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function
|
|
12226
|
+
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function LL(e,t){var n,i
|
|
12222
12227
|
function o(){var o=t.apply(this,arguments)
|
|
12223
|
-
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function
|
|
12224
|
-
function
|
|
12225
|
-
function
|
|
12226
|
-
|
|
12227
|
-
"function"!=typeof e&&(e=
|
|
12228
|
-
for(var i=this._groups,o=i.length,r=new Array(o),s=0;s<o;++s)for(var a,l,c=i[s],d=c.length,h=r[s]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,
|
|
12229
|
-
return new
|
|
12230
|
-
"function"!=typeof e&&(e=
|
|
12231
|
-
for(var i=this._groups,o=i.length,r=[],s=[],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=e.call(l,l.__data__,h,c),f
|
|
12232
|
-
r.push(p),s.push(l)}return new
|
|
12228
|
+
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function VL(e,t){return function(){SL(this,e).delay=+t.apply(this,arguments)}}function HL(e,t){return t=+t,function(){SL(this,e).delay=t}}function BL(e,t){return function(){$L(this,e).duration=+t.apply(this,arguments)}}function qL(e,t){return t=+t,function(){$L(this,e).duration=t}}var UL=Hz.prototype.constructor
|
|
12229
|
+
function jL(e){return function(){this.style.removeProperty(e)}}var WL=0
|
|
12230
|
+
function ZL(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function GL(){return++WL}var KL=Hz.prototype
|
|
12231
|
+
ZL.prototype={constructor:ZL,select:function(e){var t=this._name,n=this._id
|
|
12232
|
+
"function"!=typeof e&&(e=zP(e))
|
|
12233
|
+
for(var i=this._groups,o=i.length,r=new Array(o),s=0;s<o;++s)for(var a,l,c=i[s],d=c.length,h=r[s]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,CL(h[u],t,n,u,h,ML(a,n)))
|
|
12234
|
+
return new ZL(r,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id
|
|
12235
|
+
"function"!=typeof e&&(e=LP(e))
|
|
12236
|
+
for(var i=this._groups,o=i.length,r=[],s=[],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=e.call(l,l.__data__,h,c),f=ML(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&CL(u,t,n,m,p,f)
|
|
12237
|
+
r.push(p),s.push(l)}return new ZL(r,s,t,n)},selectChild:KL.selectChild,selectChildren:KL.selectChildren,filter:function(e){"function"!=typeof e&&(e=HP(e))
|
|
12233
12238
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,s=t[o],a=s.length,l=i[o]=[],c=0;c<a;++c)(r=s[c])&&e.call(r,r.__data__,c,s)&&l.push(r)
|
|
12234
|
-
return new
|
|
12239
|
+
return new ZL(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error
|
|
12235
12240
|
for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),s=new Array(i),a=0;a<r;++a)for(var l,c=t[a],d=n[a],h=c.length,u=s[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
|
|
12236
12241
|
for(;a<i;++a)s[a]=t[a]
|
|
12237
|
-
return new
|
|
12238
|
-
|
|
12239
|
-
return arguments.length<2
|
|
12240
|
-
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?
|
|
12242
|
+
return new ZL(s,this._parents,this._name,this._id)},selection:function(){return new UL(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=GL(),i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)if(s=a[c]){var d=ML(s,t)
|
|
12243
|
+
CL(s,e,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ZL(i,this._parents,e,n)},call:KL.call,nodes:KL.nodes,node:KL.node,size:KL.size,empty:KL.empty,each:KL.each,on:function(e,t){var n=this._id
|
|
12244
|
+
return arguments.length<2?ML(this.node(),n).on.on(e):this.each(function(e,t,n){var i,o,r=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".")
|
|
12245
|
+
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?SL:$L
|
|
12241
12246
|
return function(){var s=r(this,e),a=s.on
|
|
12242
|
-
a!==i&&(o=(i=a).copy()).on(t,n),s.on=o}}(n,e,t))},attr:function(e,t){var n=
|
|
12243
|
-
return this.attrTween(e,"function"==typeof t?(n.local?PL
|
|
12247
|
+
a!==i&&(o=(i=a).copy()).on(t,n),s.on=o}}(n,e,t))},attr:function(e,t){var n=TP(e),i="transform"===n?WF:OL
|
|
12248
|
+
return this.attrTween(e,"function"==typeof t?(n.local?zL:PL)(n,i,AL(this,"attr."+e,t)):null==t?(n.local?RL:TL)(n):(n.local?NL:DL)(n,i,t))},attrTween:function(e,t){var n="attr."+e
|
|
12244
12249
|
if(arguments.length<2)return(n=this.tween(n))&&n._value
|
|
12245
12250
|
if(null==t)return this.tween(n,null)
|
|
12246
12251
|
if("function"!=typeof t)throw new Error
|
|
12247
|
-
var i=
|
|
12248
|
-
return this.tween(n,(i.local?
|
|
12252
|
+
var i=TP(e)
|
|
12253
|
+
return this.tween(n,(i.local?FL:LL)(i,t))},style:function(e,t,n){var i="transform"==(e+="")?jF:OL
|
|
12249
12254
|
return null==t?this.styleTween(e,function(e,t){var n,i,o
|
|
12250
|
-
return function(){var r=
|
|
12251
|
-
return r===s?null:r===n&&s===i?o:o=t(n=r,i=s)}}(e,i)).on("end.style."+e,
|
|
12252
|
-
return function(){var s=
|
|
12253
|
-
return null==a&&(this.style.removeProperty(e),l=a=
|
|
12254
|
-
return function(){var l
|
|
12255
|
+
return function(){var r=dz(this,e),s=(this.style.removeProperty(e),dz(this,e))
|
|
12256
|
+
return r===s?null:r===n&&s===i?o:o=t(n=r,i=s)}}(e,i)).on("end.style."+e,jL(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var i,o,r
|
|
12257
|
+
return function(){var s=dz(this,e),a=n(this),l=a+""
|
|
12258
|
+
return null==a&&(this.style.removeProperty(e),l=a=dz(this,e)),s===l?null:s===i&&l===o?r:(o=l,r=t(i=s,a))}}(e,i,AL(this,"style."+e,t))).each(function(e,t){var n,i,o,r,s="style."+t,a="end."+s
|
|
12259
|
+
return function(){var l=$L(this,e),c=l.on,d=null==l.value[s]?r||(r=jL(t)):void 0
|
|
12255
12260
|
c===n&&o===d||(i=(n=c).copy()).on(a,o=d),l.on=i}}(this._id,e)):this.styleTween(e,function(e,t,n){var i,o,r=n+""
|
|
12256
|
-
return function(){var s=
|
|
12261
|
+
return function(){var s=dz(this,e)
|
|
12257
12262
|
return s===r?null:s===i?o:o=t(i=s,n)}}(e,i,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var i="style."+(e+="")
|
|
12258
12263
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
12259
12264
|
if(null==t)return this.tween(i,null)
|
|
@@ -12261,7 +12266,7 @@ if("function"!=typeof t)throw new Error
|
|
|
12261
12266
|
return this.tween(i,function(e,t,n){var i,o
|
|
12262
12267
|
function r(){var r=t.apply(this,arguments)
|
|
12263
12268
|
return r!==o&&(i=(o=r)&&function(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}(e,r,n)),i}return r._value=t,r}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this)
|
|
12264
|
-
this.textContent=null==t?"":t}}(
|
|
12269
|
+
this.textContent=null==t?"":t}}(AL(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text"
|
|
12265
12270
|
if(arguments.length<1)return(t=this.tween(t))&&t._value
|
|
12266
12271
|
if(null==e)return this.tween(t,null)
|
|
12267
12272
|
if("function"!=typeof e)throw new Error
|
|
@@ -12270,60 +12275,60 @@ function i(){var i=e.apply(this,arguments)
|
|
|
12270
12275
|
return i!==n&&(t=(n=i)&&function(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return i._value=e,i}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode
|
|
12271
12276
|
for(var n in this.__transition)if(+n!==e)return
|
|
12272
12277
|
t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id
|
|
12273
|
-
if(e+="",arguments.length<2){for(var i,o
|
|
12274
|
-
return null}return this.each((null==t?
|
|
12275
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
12276
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
12278
|
+
if(e+="",arguments.length<2){for(var i,o=ML(this.node(),n).tween,r=0,s=o.length;r<s;++r)if((i=o[r]).name===e)return i.value
|
|
12279
|
+
return null}return this.each((null==t?EL:IL)(n,e,t))},delay:function(e){var t=this._id
|
|
12280
|
+
return arguments.length?this.each(("function"==typeof e?VL:HL)(t,e)):ML(this.node(),t).delay},duration:function(e){var t=this._id
|
|
12281
|
+
return arguments.length?this.each(("function"==typeof e?BL:qL)(t,e)):ML(this.node(),t).duration},ease:function(e){var t=this._id
|
|
12277
12282
|
return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error
|
|
12278
|
-
return function(){
|
|
12283
|
+
return function(){$L(this,e).ease=t}}(t,e)):ML(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error
|
|
12279
12284
|
return this.each(function(e,t){return function(){var n=t.apply(this,arguments)
|
|
12280
12285
|
if("function"!=typeof n)throw new Error
|
|
12281
|
-
|
|
12286
|
+
$L(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,i=n._id,o=n.size()
|
|
12282
12287
|
return new Promise((function(r,s){var a={value:s},l={value:function(){0==--o&&r()}}
|
|
12283
|
-
n.each((function(){var n
|
|
12284
|
-
o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&r()}))},[Symbol.iterator]:
|
|
12285
|
-
var
|
|
12286
|
-
function
|
|
12287
|
-
return n}
|
|
12288
|
-
e instanceof
|
|
12289
|
-
for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)(s=a[c])&&
|
|
12290
|
-
return new
|
|
12291
|
-
var
|
|
12292
|
-
function
|
|
12293
|
-
var
|
|
12294
|
-
function
|
|
12295
|
-
return e.__zoom}function
|
|
12296
|
-
return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function
|
|
12297
|
-
return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function
|
|
12298
|
-
function v(e){e.property("__zoom",
|
|
12299
|
-
return i===e.x&&o===e.y?e:new
|
|
12288
|
+
n.each((function(){var n=$L(this,i),o=n.on
|
|
12289
|
+
o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&r()}))},[Symbol.iterator]:KL[Symbol.iterator]}
|
|
12290
|
+
var JL={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}}
|
|
12291
|
+
function XL(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`)
|
|
12292
|
+
return n}Hz.prototype.interrupt=function(e){return this.each((function(){_L(this,e)}))},Hz.prototype.transition=function(e){var t,n
|
|
12293
|
+
e instanceof ZL?(t=e._id,e=e._name):(t=GL(),(n=JL).time=sL(),e=null==e?null:e+"")
|
|
12294
|
+
for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var s,a=i[r],l=a.length,c=0;c<l;++c)(s=a[c])&&CL(s,e,t,c,a,n||XL(s,t))
|
|
12295
|
+
return new ZL(i,this._parents,e,t)}
|
|
12296
|
+
var YL=e=>()=>e
|
|
12297
|
+
function QL(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function eV(e,t,n){this.k=e,this.x=t,this.y=n}eV.prototype={constructor:eV,scale:function(e){return 1===e?this:new eV(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new eV(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
|
|
12298
|
+
var tV=new eV(1,0,0)
|
|
12299
|
+
function nV(e){for(;!e.__zoom;)if(!(e=e.parentNode))return tV
|
|
12300
|
+
return e.__zoom}function iV(e){e.stopImmediatePropagation()}function oV(e){e.preventDefault(),e.stopImmediatePropagation()}function rV(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function sV(){var e=this
|
|
12301
|
+
return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function aV(){return this.__zoom||tV}function lV(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function cV(){return navigator.maxTouchPoints||"ontouchstart"in this}function dV(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1]
|
|
12302
|
+
return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function hV(){var e,t,n,i=rV,o=sV,r=dV,s=lV,a=cV,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=JF,u=MP("start","zoom","end"),p=500,f=150,m=0,g=10
|
|
12303
|
+
function v(e){e.property("__zoom",aV).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(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new eV(t,e.x,e.y)}function w(e,t,n){var i=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k
|
|
12304
|
+
return i===e.x&&o===e.y?e:new eV(e.k,i,o)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,n,i){e.on("start.zoom",(function(){k(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){k(this,arguments).event(i).end()})).tween("zoom",(function(){var e=this,r=arguments,s=k(e,r).event(i),a=o.apply(e,r),l=null==n?y(a):"function"==typeof n?n.apply(e,r):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=e.__zoom,u="function"==typeof t?t.apply(e,r):t,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
|
|
12300
12305
|
return function(e){if(1===e)e=u
|
|
12301
12306
|
else{var t=p(e),n=c/t[2]
|
|
12302
|
-
e=new
|
|
12307
|
+
e=new eV(n,l[0]-t[0]*n,l[1]-t[1]*n)}s.zoom(null,e)}}))}function k(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function S(e,...t){if(i.apply(this,arguments)){var n=k(this,t).event(e),o=this.__zoom,a=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,s.apply(this,arguments)))),d=qz(e)
|
|
12303
12308
|
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)
|
|
12304
12309
|
else{if(o.k===a)return
|
|
12305
|
-
n.mouse=[d,o.invert(d)],
|
|
12306
|
-
s.moved=t*t+n*n>m}s.event(e).zoom("mouse",r(w(s.that.__zoom,s.mouse[0]=
|
|
12307
|
-
t&&(i.on("click.drag",Uz
|
|
12308
|
-
!function(e){var t=e.document.documentElement,n=
|
|
12309
|
-
"onselectstart"in t?n.on("selectstart.drag",Uz
|
|
12310
|
-
|
|
12311
|
-
for(
|
|
12312
|
-
e&&(e=clearTimeout(e)),r&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),
|
|
12313
|
-
for(
|
|
12310
|
+
n.mouse=[d,o.invert(d)],_L(this),n.start()}oV(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",r(w(b(o,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function $(e,...t){if(!n&&i.apply(this,arguments)){var o=e.currentTarget,s=k(this,t,!0).event(e),a=Bz(e.view).on("mousemove.zoom",(function(e){if(oV(e),!s.moved){var t=e.clientX-d,n=e.clientY-h
|
|
12311
|
+
s.moved=t*t+n*n>m}s.event(e).zoom("mouse",r(w(s.that.__zoom,s.mouse[0]=qz(e,o),s.mouse[1]),s.extent,c))}),!0).on("mouseup.zoom",(function(e){a.on("mousemove.zoom mouseup.zoom",null),function(e,t){var n=e.document.documentElement,i=Bz(e).on("dragstart.drag",null)
|
|
12312
|
+
t&&(i.on("click.drag",jz,Uz),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,s.moved),oV(e),s.event(e).end()}),!0),l=qz(e,o),d=e.clientX,h=e.clientY
|
|
12313
|
+
!function(e){var t=e.document.documentElement,n=Bz(e).on("dragstart.drag",jz,Uz)
|
|
12314
|
+
"onselectstart"in t?n.on("selectstart.drag",jz,Uz):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(e.view),iV(e),s.mouse=[l,this.__zoom.invert(l)],_L(this),s.start()}}function M(e,...t){if(i.apply(this,arguments)){var n=this.__zoom,s=qz(e.changedTouches?e.changedTouches[0]:e,this),a=n.invert(s),l=n.k*(e.shiftKey?.5:2),h=r(w(b(n,l),s,a),o.apply(this,t),c)
|
|
12315
|
+
oV(e),d>0?Bz(this).transition().duration(d).call(x,h,s,e):Bz(this).call(v.transform,h,s,e)}}function _(n,...o){if(i.apply(this,arguments)){var r,s,a,l,c=n.touches,d=c.length,h=k(this,o,n.changedTouches.length===d).event(n)
|
|
12316
|
+
for(iV(n),s=0;s<d;++s)l=[l=qz(a=c[s],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,r=!0,h.taps=1+!!e)
|
|
12317
|
+
e&&(e=clearTimeout(e)),r&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),_L(this),h.start())}}function E(e,...t){if(this.__zooming){var n,i,o,s,a=k(this,t).event(e),l=e.changedTouches,d=l.length
|
|
12318
|
+
for(oV(e),n=0;n<d;++n)o=qz(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)
|
|
12314
12319
|
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
|
|
12315
12320
|
i=b(i,Math.sqrt(m/g)),o=[(h[0]+p[0])/2,(h[1]+p[1])/2],s=[(u[0]+f[0])/2,(u[1]+f[1])/2]}else{if(!a.touch0)return
|
|
12316
12321
|
o=a.touch0[0],s=a.touch0[1]}a.zoom("touch",r(w(i,o,s),a.extent,c))}}function I(e,...i){if(this.__zooming){var o,r,s=k(this,i).event(e),a=e.changedTouches,l=a.length
|
|
12317
|
-
for(
|
|
12322
|
+
for(iV(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),o=0;o<l;++o)r=a[o],s.touch0&&s.touch0[2]===r.identifier?delete s.touch0:s.touch1&&s.touch1[2]===r.identifier&&delete s.touch1
|
|
12318
12323
|
if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0])
|
|
12319
|
-
else if(s.end(),2===s.taps&&(r=
|
|
12324
|
+
else if(s.end(),2===s.taps&&(r=qz(r,this),Math.hypot(t[0]-r[0],t[1]-r[1])<g)){var c=Bz(this).on("dblclick.zoom")
|
|
12320
12325
|
c&&c.apply(this,arguments)}}}return v.transform=function(e,t,n,i){var o=e.selection?e.selection():e
|
|
12321
|
-
o.property("__zoom",
|
|
12326
|
+
o.property("__zoom",aV),e!==o?x(e,t,n,i):o.interrupt().each((function(){k(this,arguments).event(i).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},v.scaleBy=function(e,t,n,i){v.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,i)},v.scaleTo=function(e,t,n,i){v.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,s=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(s),l="function"==typeof t?t.apply(this,arguments):t
|
|
12322
12327
|
return r(w(b(i,l),s,a),e,c)}),n,i)},v.translateBy=function(e,t,n,i){v.transform(e,(function(){return r(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,i)},v.translateTo=function(e,t,n,i,s){v.transform(e,(function(){var e=o.apply(this,arguments),s=this.__zoom,a=null==i?y(e):"function"==typeof i?i.apply(this,arguments):i
|
|
12323
|
-
return r(
|
|
12324
|
-
u.call(e,this.that,new
|
|
12325
|
-
return e===u?v:e},v.clickDistance=function(e){return arguments.length?(m=(e=+e)*e,v):Math.sqrt(m)},v.tapDistance=function(e){return arguments.length?(g=+e,v):g},v}
|
|
12326
|
-
const
|
|
12328
|
+
return r(tV.translate(a[0],a[1]).scale(s.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),i,s)},C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=Bz(this.that).datum()
|
|
12329
|
+
u.call(e,this.that,new QL(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),t)}},v.wheelDelta=function(e){return arguments.length?(s="function"==typeof e?e:YL(+e),v):s},v.filter=function(e){return arguments.length?(i="function"==typeof e?e:YL(!!e),v):i},v.touchable=function(e){return arguments.length?(a="function"==typeof e?e:YL(!!e),v):a},v.extent=function(e){return arguments.length?(o="function"==typeof e?e:YL([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):o},v.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],v):[l[0],l[1]]},v.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(e){return arguments.length?(r=e,v):r},v.duration=function(e){return arguments.length?(d=+e,v):d},v.interpolate=function(e){return arguments.length?(h=e,v):h},v.on=function(){var e=u.on.apply(u,arguments)
|
|
12330
|
+
return e===u?v:e},v.clickDistance=function(e){return arguments.length?(m=(e=+e)*e,v):Math.sqrt(m)},v.tapDistance=function(e){return arguments.length?(g=+e,v):g},v}nV.prototype=eV.prototype
|
|
12331
|
+
const uV=Z`
|
|
12327
12332
|
<div class="wafer-map-container">
|
|
12328
12333
|
<svg class="svg-root">
|
|
12329
12334
|
<g ${Ne("zoomContainer")} transform=${e=>e.transform.toString()}>
|
|
@@ -12353,7 +12358,7 @@ const hV=Z`
|
|
|
12353
12358
|
/>
|
|
12354
12359
|
</svg>
|
|
12355
12360
|
</div>
|
|
12356
|
-
`,
|
|
12361
|
+
`,pV=we`
|
|
12357
12362
|
:host {
|
|
12358
12363
|
display: inline-block;
|
|
12359
12364
|
width: 500px;
|
|
@@ -12437,68 +12442,68 @@ const hV=Z`
|
|
|
12437
12442
|
outline-width: 0px;
|
|
12438
12443
|
}
|
|
12439
12444
|
`
|
|
12440
|
-
function
|
|
12445
|
+
function fV(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function mV(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gV(e){let t,n,i
|
|
12441
12446
|
function o(e,i,o=0,r=e.length){if(o<r){if(0!==t(i,i))return r
|
|
12442
12447
|
do{const t=o+r>>>1
|
|
12443
|
-
n(e[t],i)<0?o=t+1:r=t}while(o<r)}return o}return 2!==e.length?(t=
|
|
12448
|
+
n(e[t],i)<0?o=t+1:r=t}while(o<r)}return o}return 2!==e.length?(t=fV,n=(t,n)=>fV(e(t),n),i=(t,n)=>e(t)-n):(t=e===fV||e===mV?e:vV,n=e,i=e),{left:o,center:function(e,t,n=0,r=e.length){const s=o(e,t,n,r-1)
|
|
12444
12449
|
return s>n&&i(e[s-1],t)>-i(e[s],t)?s-1:s},right:function(e,i,o=0,r=e.length){if(o<r){if(0!==t(i,i))return r
|
|
12445
12450
|
do{const t=o+r>>>1
|
|
12446
|
-
n(e[t],i)<=0?o=t+1:r=t}while(o<r)}return o}}}function
|
|
12447
|
-
|
|
12448
|
-
var wV
|
|
12449
|
-
class
|
|
12451
|
+
n(e[t],i)<=0?o=t+1:r=t}while(o<r)}return o}}}function vV(){return 0}function bV(e){return null===e?NaN:+e}const wV=gV(fV).right
|
|
12452
|
+
gV(bV).center
|
|
12453
|
+
var yV=wV
|
|
12454
|
+
class xV extends Map{constructor(e,t=CV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(kV(this,e))}has(e){return super.has(kV(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const i=t(n)
|
|
12450
12455
|
return e.has(i)?e.get(i):(e.set(i,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const i=t(n)
|
|
12451
12456
|
e.has(i)&&(n=e.get(i),e.delete(i))
|
|
12452
|
-
return n}(this,e))}}function
|
|
12453
|
-
return e.has(i)?e.get(i):n}function
|
|
12454
|
-
function
|
|
12457
|
+
return n}(this,e))}}function kV({_intern:e,_key:t},n){const i=t(n)
|
|
12458
|
+
return e.has(i)?e.get(i):n}function CV(e){return null!==e&&"object"==typeof e?e.valueOf():e}const SV=Math.sqrt(50),$V=Math.sqrt(10),MV=Math.sqrt(2)
|
|
12459
|
+
function _V(e,t,n){const i=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(i)),r=i/Math.pow(10,o),s=r>=SV?10:r>=$V?5:r>=MV?2:1
|
|
12455
12460
|
let a,l,c
|
|
12456
|
-
return o<0?(c=Math.pow(10,-o)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?
|
|
12461
|
+
return o<0?(c=Math.pow(10,-o)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?_V(e,t,2*n):[a,l,c]}function EV(e,t,n){return _V(e=+e,t=+t,n=+n)[2]}function IV(e,t,n=bV){if((i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return+n(e[0],0,e)
|
|
12457
12462
|
if(t>=1)return+n(e[i-1],i-1,e)
|
|
12458
12463
|
var i,o=(i-1)*t,r=Math.floor(o),s=+n(e[r],r,e)
|
|
12459
|
-
return s+(+n(e[r+1],r+1,e)-s)*(o-r)}}function
|
|
12464
|
+
return s+(+n(e[r+1],r+1,e)-s)*(o-r)}}function AV(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n
|
|
12460
12465
|
for(var i=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),r=new Array(o);++i<o;)r[i]=e+i*n
|
|
12461
|
-
return r}function
|
|
12466
|
+
return r}function OV(e,t){switch(arguments.length){case 0:break
|
|
12462
12467
|
case 1:this.range(e)
|
|
12463
12468
|
break
|
|
12464
|
-
default:this.range(t).domain(e)}return this}const
|
|
12465
|
-
function
|
|
12469
|
+
default:this.range(t).domain(e)}return this}const TV=Symbol("implicit")
|
|
12470
|
+
function RV(){var e=new xV,t=[],n=[],i=TV
|
|
12466
12471
|
function o(o){let r=e.get(o)
|
|
12467
|
-
if(void 0===r){if(i!==
|
|
12472
|
+
if(void 0===r){if(i!==TV)return i
|
|
12468
12473
|
e.set(o,r=t.push(o)-1)}return n[r%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice()
|
|
12469
|
-
t=[],e=new
|
|
12474
|
+
t=[],e=new xV
|
|
12470
12475
|
for(const i of n)e.has(i)||e.set(i,t.push(i)-1)
|
|
12471
|
-
return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return
|
|
12476
|
+
return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return RV(t,n).unknown(i)},OV.apply(o,arguments),o}function DV(){var e,t,n=RV().unknown(void 0),i=n.domain,o=n.range,r=0,s=1,a=!1,l=0,c=0,d=.5
|
|
12472
12477
|
function h(){var n=i().length,h=s<r,u=h?s:r,p=h?r:s
|
|
12473
12478
|
e=(p-u)/Math.max(1,n-l+2*c),a&&(e=Math.floor(e)),u+=(p-u-e*(n-l))*d,t=e*(1-l),a&&(u=Math.round(u),t=Math.round(t))
|
|
12474
|
-
var f=
|
|
12475
|
-
return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([r,s]=e,r=+r,s=+s,h()):[r,s]},n.rangeRound=function(e){return[r,s]=e,r=+r,s=+s,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},n.copy=function(){return
|
|
12476
|
-
function
|
|
12477
|
-
var n}function
|
|
12478
|
-
return o<i?(i=
|
|
12479
|
-
for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)o[s]=
|
|
12480
|
-
return function(t){var n=
|
|
12481
|
-
return r[n](o[n](t))}}function
|
|
12479
|
+
var f=AV(n).map((function(t){return u+e*t}))
|
|
12480
|
+
return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([r,s]=e,r=+r,s=+s,h()):[r,s]},n.rangeRound=function(e){return[r,s]=e,r=+r,s=+s,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},n.copy=function(){return DV(i(),[r,s]).round(a).paddingInner(l).paddingOuter(c).align(d)},OV.apply(h(),arguments)}function NV(e){return+e}var PV=[0,1]
|
|
12481
|
+
function zV(e){return e}function FV(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n})
|
|
12482
|
+
var n}function LV(e,t,n){var i=e[0],o=e[1],r=t[0],s=t[1]
|
|
12483
|
+
return o<i?(i=FV(o,i),r=n(s,r)):(i=FV(i,o),r=n(r,s)),function(e){return r(i(e))}}function VV(e,t,n){var i=Math.min(e.length,t.length)-1,o=new Array(i),r=new Array(i),s=-1
|
|
12484
|
+
for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)o[s]=FV(e[s],e[s+1]),r[s]=n(t[s],t[s+1])
|
|
12485
|
+
return function(t){var n=yV(e,t,1,i)-1
|
|
12486
|
+
return r[n](o[n](t))}}function HV(){var e,t,n,i,o,r,s=PV,a=PV,l=FF,c=zV
|
|
12482
12487
|
function d(){var e,t,n,l=Math.min(s.length,a.length)
|
|
12483
|
-
return c!==
|
|
12488
|
+
return c!==zV&&(e=s[0],t=s[l-1],e>t&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),i=l>2?VV:LV,o=r=null,h}function h(t){return null==t||isNaN(t=+t)?n:(o||(o=i(s.map(e),a,l)))(e(c(t)))}return h.invert=function(n){return c(t((r||(r=i(a,s.map(e),RF)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,NV),d()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),d()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=LF,d()},h.clamp=function(e){return arguments.length?(c=!!e||zV,d()):c!==zV},h.interpolate=function(e){return arguments.length?(l=e,d()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,i){return e=n,t=i,d()}}function BV(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null
|
|
12484
12489
|
var n,i=e.slice(0,n)
|
|
12485
|
-
return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function
|
|
12486
|
-
function
|
|
12490
|
+
return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function qV(e){return(e=BV(Math.abs(e)))?e[1]:NaN}var UV,jV=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
12491
|
+
function WV(e){if(!(t=jV.exec(e)))throw new Error("invalid format: "+e)
|
|
12487
12492
|
var t
|
|
12488
|
-
return new
|
|
12493
|
+
return new ZV({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function ZV(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function GV(e,t){var n=BV(e,t)
|
|
12489
12494
|
if(!n)return e+""
|
|
12490
12495
|
var i=n[0],o=n[1]
|
|
12491
|
-
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")}
|
|
12492
|
-
var
|
|
12496
|
+
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")}WV.prototype=ZV.prototype,ZV.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}
|
|
12497
|
+
var KV={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>GV(100*e,t),r:GV,s:function(e,t){var n=BV(e,t)
|
|
12493
12498
|
if(!n)return e+""
|
|
12494
|
-
var i=n[0],o=n[1],r=o-(
|
|
12495
|
-
return r===s?i:r>s?i+new Array(r-s+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+
|
|
12496
|
-
function
|
|
12497
|
-
function
|
|
12498
|
-
return r.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?
|
|
12499
|
-
function h(e){var t=(e=
|
|
12500
|
-
"n"===b?(m=!0,b="g"):
|
|
12501
|
-
var w="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===u?r:/[%p]/.test(b)?l:"",x=
|
|
12499
|
+
var i=n[0],o=n[1],r=o-(UV=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length
|
|
12500
|
+
return r===s?i:r>s?i+new Array(r-s+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+BV(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}
|
|
12501
|
+
function JV(e){return e}var XV,YV,QV,eH=Array.prototype.map,tH=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
12502
|
+
function nH(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?JV:(t=eH.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var o=e.length,r=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),r.push(e.substring(o-=a,o+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length]
|
|
12503
|
+
return r.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?JV:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(eH.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",d=void 0===e.nan?"NaN":e.nan+""
|
|
12504
|
+
function h(e){var t=(e=WV(e)).fill,n=e.align,h=e.sign,u=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,v=e.trim,b=e.type
|
|
12505
|
+
"n"===b?(m=!0,b="g"):KV[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=")
|
|
12506
|
+
var w="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===u?r:/[%p]/.test(b)?l:"",x=KV[b],k=/[defgprs%]/.test(b)
|
|
12502
12507
|
function C(e){var o,r,l,u=w,C=y
|
|
12503
12508
|
if("c"===b)C=x(e)+C,e=""
|
|
12504
12509
|
else{var S=(e=+e)<0||1/e<0
|
|
@@ -12507,7 +12512,7 @@ break
|
|
|
12507
12512
|
case"0":0===o&&(o=i),t=i
|
|
12508
12513
|
break
|
|
12509
12514
|
default:if(!+e[i])break e
|
|
12510
|
-
o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?
|
|
12515
|
+
o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,C=("s"===b?tH[8+UV/3]:"")+C+(S&&"("===h?")":""),k)for(o=-1,r=e.length;++o<r;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?s+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o)
|
|
12511
12516
|
break}}m&&!p&&(e=i(e,1/0))
|
|
12512
12517
|
var $=u.length+e.length+C.length,M=$<f?new Array(f-$+1).join(t):""
|
|
12513
12518
|
switch(m&&p&&(e=i(M+e,M.length?f-C.length:1/0),M=""),n){case"<":e=u+e+C+M
|
|
@@ -12516,19 +12521,19 @@ case"=":e=u+M+e+C
|
|
|
12516
12521
|
break
|
|
12517
12522
|
case"^":e=M.slice(0,$=M.length>>1)+u+e+C+M.slice($)
|
|
12518
12523
|
break
|
|
12519
|
-
default:e=M+u+e+C}return a(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var n=h(((e=
|
|
12520
|
-
return function(e){return n(o*e)+r}}}}function
|
|
12521
|
-
const i=(t=+t)<(e=+e),o=i?
|
|
12524
|
+
default:e=M+u+e+C}return a(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:h,formatPrefix:function(e,t){var n=h(((e=WV(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(qV(t)/3))),o=Math.pow(10,-i),r=tH[8+i/3]
|
|
12525
|
+
return function(e){return n(o*e)+r}}}}function iH(e,t,n,i){var o,r=function(e,t,n){n=+n
|
|
12526
|
+
const i=(t=+t)<(e=+e),o=i?EV(t,e,n):EV(e,t,n)
|
|
12522
12527
|
return(i?-1:1)*(o<0?1/-o:o)}(e,t,n)
|
|
12523
|
-
switch((i=
|
|
12524
|
-
return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
12525
|
-
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,
|
|
12528
|
+
switch((i=WV(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t))
|
|
12529
|
+
return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qV(t)/3)))-qV(Math.abs(e)))}(r,s))||(i.precision=o),QV(i,s)
|
|
12530
|
+
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qV(t)-qV(e))+1}(r,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=o-("e"===i.type))
|
|
12526
12531
|
break
|
|
12527
|
-
case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-
|
|
12532
|
+
case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-qV(Math.abs(e)))}(r))||(i.precision=o-2*("%"===i.type))}return YV(i)}function oH(e){var t=e.domain
|
|
12528
12533
|
return e.ticks=function(e){var n=t()
|
|
12529
12534
|
return function(e,t,n){if(!((n=+n)>0))return[]
|
|
12530
12535
|
if((e=+e)==(t=+t))return[e]
|
|
12531
|
-
const i=t<e,[o,r,s]=i?
|
|
12536
|
+
const i=t<e,[o,r,s]=i?_V(t,e,n):_V(e,t,n)
|
|
12532
12537
|
if(!(r>=o))return[]
|
|
12533
12538
|
const a=r-o+1,l=new Array(a)
|
|
12534
12539
|
if(i)if(s<0)for(let e=0;e<a;++e)l[e]=(r-e)/-s
|
|
@@ -12536,23 +12541,23 @@ else for(let e=0;e<a;++e)l[e]=(r-e)*s
|
|
|
12536
12541
|
else if(s<0)for(let e=0;e<a;++e)l[e]=(o+e)/-s
|
|
12537
12542
|
else for(let e=0;e<a;++e)l[e]=(o+e)*s
|
|
12538
12543
|
return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t()
|
|
12539
|
-
return
|
|
12544
|
+
return iH(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10)
|
|
12540
12545
|
var i,o,r=t(),s=0,a=r.length-1,l=r[s],c=r[a],d=10
|
|
12541
|
-
for(c<l&&(o=l,l=c,c=o,o=s,s=a,a=o);d-- >0;){if((o=
|
|
12546
|
+
for(c<l&&(o=l,l=c,c=o,o=s,s=a,a=o);d-- >0;){if((o=EV(l,c,n))===i)return r[s]=l,r[a]=c,t(r)
|
|
12542
12547
|
if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o
|
|
12543
12548
|
else{if(!(o<0))break
|
|
12544
|
-
l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function
|
|
12545
|
-
return e.copy=function(){return t=e,
|
|
12546
|
-
var t},
|
|
12549
|
+
l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function rH(){var e=HV()(zV,zV)
|
|
12550
|
+
return e.copy=function(){return t=e,rH().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())
|
|
12551
|
+
var t},OV.apply(e,arguments),oH(e)}function sH(){var e,t=[],n=[],i=[]
|
|
12547
12552
|
function o(){var e=0,o=Math.max(1,n.length)
|
|
12548
|
-
for(i=new Array(o-1);++e<o;)i[e-1]=
|
|
12549
|
-
return r}function r(t){return null==t||isNaN(t=+t)?e:n[
|
|
12553
|
+
for(i=new Array(o-1);++e<o;)i[e-1]=IV(t,e/o)
|
|
12554
|
+
return r}function r(t){return null==t||isNaN(t=+t)?e:n[yV(i,t)]}return r.invertExtent=function(e){var o=n.indexOf(e)
|
|
12550
12555
|
return o<0?[NaN,NaN]:[o>0?i[o-1]:t[0],o<i.length?i[o]:t[t.length-1]]},r.domain=function(e){if(!arguments.length)return t.slice()
|
|
12551
12556
|
t=[]
|
|
12552
12557
|
for(let n of e)null==n||isNaN(n=+n)||t.push(n)
|
|
12553
|
-
return t.sort(
|
|
12554
|
-
const
|
|
12555
|
-
class
|
|
12558
|
+
return t.sort(fV),o()},r.range=function(e){return arguments.length?(n=Array.from(e),o()):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.quantiles=function(){return i.slice()},r.copy=function(){return sH().domain(t).range(n).unknown(e)},OV.apply(r,arguments)}XV=nH({thousands:",",grouping:[3],currency:["$",""]}),YV=XV.format,QV=XV.formatPrefix
|
|
12559
|
+
const aH="bottom-left",lH="bottom-right",cH="top-left",dH="top",hH="show",uH="hide",pH="linear",fH="ordinal"
|
|
12560
|
+
class mH{constructor(e){this.wafermap=e,this.defaultPadding=0,this.baseMarginPercentage=.04}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}updateContainerDimensions(){const e={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},t=Math.min(e.width,e.height),n={top:(e.height-t)/2,right:(e.width-t)/2,bottom:(e.height-t)/2,left:(e.width-t)/2},i={top:t*this.baseMarginPercentage,right:t*this.baseMarginPercentage,bottom:t*this.baseMarginPercentage,left:t*this.baseMarginPercentage}
|
|
12556
12561
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(e,this._margin)
|
|
12557
12562
|
const o=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
12558
12563
|
this._radius=o/2,this.updateScales()}updateScales(){const e=Math.min(this._containerDimensions.width,this._containerDimensions.height),t=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(this.wafermap.dies),n=this.wafermap.originLocation
|
|
@@ -12560,19 +12565,19 @@ this._horizontalScale=this.createHorizontalScale(n,t,e),this._invertedHorizontal
|
|
|
12560
12565
|
return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(e.origin.x=this.wafermap.gridMinX,e.origin.y=this.wafermap.gridMinY,e.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,e.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),e}calculateGridDimensionsFromDies(e){if(0===e.length||void 0===e[0])return{origin:{x:0,y:0},rows:0,cols:0}
|
|
12561
12566
|
const t={x:e[0].x,y:e[0].y},n={x:e[0].x,y:e[0].y}
|
|
12562
12567
|
for(const i of e)i.x<t.x&&(t.x=i.x),i.y<t.y&&(t.y=i.y),i.x>n.x&&(n.x=i.x),i.y>n.y&&(n.y=i.y)
|
|
12563
|
-
return{origin:t,rows:n.y-t.y+1,cols:n.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,n){const i=
|
|
12564
|
-
return e===
|
|
12565
|
-
return e===
|
|
12566
|
-
return e===
|
|
12567
|
-
return e===
|
|
12568
|
-
return void 0===n||void 0===i?null:{x:n+t.right,y:i+t.top,fillStyle:this.calculateFillStyle(e.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,e.tags),text:this.buildLabel(e.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?
|
|
12568
|
+
return{origin:t,rows:n.y-t.y+1,cols:n.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,n){const i=DV().domain(AV(t.origin.x,t.origin.x+t.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
12569
|
+
return e===aH||e===cH?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(e,t,n){const i=sH().domain([0,n])
|
|
12570
|
+
return e===aH||e===cH?i.range(AV(t.origin.x,t.origin.x+t.cols)):i.range(AV(t.origin.x,t.origin.x+t.cols).reverse())}createVerticalScale(e,t,n){const i=DV().domain(AV(t.origin.y,t.origin.y+t.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
12571
|
+
return e===aH||e===lH?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(e,t,n){const i=sH().domain([0,n])
|
|
12572
|
+
return e===aH||e===lH?i.range(AV(t.origin.y,t.origin.y+t.rows).reverse()):i.range(AV(t.origin.y,t.origin.y+t.rows))}calculateMarginAddition(e,t){return{top:e.top+t.top,right:e.right+t.right,bottom:e.bottom+t.bottom,left:e.left+t.left}}}class gH{constructor(e,t){this.wafermap=e,this.dataManager=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode),this._diesRenderInfo=this.wafermap.dies.map((e=>this.computeDieRenderInfo(e))).filter((e=>null!==e))}computeDieRenderInfo(e){const t=this.dataManager.margin,n=this.dataManager.horizontalScale(e.x),i=this.dataManager.verticalScale(e.y)
|
|
12573
|
+
return void 0===n||void 0===i?null:{x:n+t.right,y:i+t.top,fillStyle:this.calculateFillStyle(e.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,e.tags),text:this.buildLabel(e.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?rH().domain(e.values.map((e=>+e))).range(e.colors):RV().domain(e.values).range(e.colors)}dieHasData(e){return null!=e&&""!==e}buildLabel(e,t,n,i){if(n||!this.dieHasData(e))return""
|
|
12569
12574
|
const o=`${e}${i}`
|
|
12570
12575
|
return o.length>t?`${o.substring(0,t)}…`:o}calculateOpacity(e,t){if(!t||0===t.length)return 1
|
|
12571
12576
|
const n=new Set(t)
|
|
12572
|
-
return e?.some((e=>n.has(e)))?1:this.nonHighlightedOpacity}isColorScaleLinear(e){return e===
|
|
12577
|
+
return e?.some((e=>n.has(e)))?1:this.nonHighlightedOpacity}isColorScaleLinear(e){return e===pH}isColorScaleOrdinal(e){return e===fH}calculateFillStyle(e,t,n,i){let o=this.emptyDieColor
|
|
12573
12578
|
if(this.dieHasData(e)&&(isNaN(+e)?o=this.nanDieColor:this.isColorScaleLinear(t)?o=this.d3ColorScale(+e):this.isColorScaleOrdinal(t)&&(o=this.d3ColorScale(e))),void 0===o)return this.emptyDieColor
|
|
12574
12579
|
let r=Zo(o)
|
|
12575
|
-
return null===r?this.emptyDieColor:(r=new Lo(r.r,r.g,r.b,this.calculateOpacity(i,n)),r.toStringWebRGBA())}}class
|
|
12580
|
+
return null===r?this.emptyDieColor:(r=new Lo(r.r,r.g,r.b,this.calculateOpacity(i,n)),r.toStringWebRGBA())}}class vH{constructor(e){this.wafermap=e,this.computations=new mH(e),this.prerendering=new gH(e,this)}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}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(e){return this.dataMap.get(`${e.x}_${e.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((e=>[`${e.x}_${e.y}`,e])))}}class bH{constructor(e){this.wafermap=e,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((e,t)=>e.fillStyle>t.fillStyle?1:t.fillStyle>e.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?uH:hH,this.wafermap.hoverTransform=this.calculateHoverTransform()}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const e=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
|
|
12576
12581
|
if(void 0===e)return""
|
|
12577
12582
|
const t=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y)
|
|
12578
12583
|
if(void 0===t)return""
|
|
@@ -12585,19 +12590,19 @@ if(e*t*(this.wafermap.transform.k||1)>=this.minDieDim){const n=this.wafermap.dat
|
|
|
12585
12590
|
i.font=`${n.toString()}px sans-serif`,i.fillStyle="#ffffff",i.textAlign="center",i.lineCap="butt"
|
|
12586
12591
|
const o=i.measureText("M"),r=this.wafermap.transform.invert([0,0]),s=this.wafermap.transform.invert([this.wafermap.canvas.width,this.wafermap.canvas.height])
|
|
12587
12592
|
r[0]-=e,r[1]-=t
|
|
12588
|
-
for(const n of this.dies)this.isDieVisible(n,r,s)&&i.fillText(n.text,n.x+e/2,n.y+t/2+o.width/2,e-e/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(e,t,n){return e.x>=t[0]&&e.x<n[0]&&e.y>=t[1]&&e.y<n[1]}}class
|
|
12589
|
-
t.k===this.minScale?(this.zoomTransform=
|
|
12593
|
+
for(const n of this.dies)this.isDieVisible(n,r,s)&&i.fillText(n.text,n.x+e/2,n.y+t/2+o.width/2,e-e/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(e,t,n){return e.x>=t[0]&&e.x<n[0]&&e.y>=t[1]&&e.y<n[1]}}class wH{constructor(e){this.wafermap=e,this.zoomTransform=tV,this.minScale=1.1,this.minExtentPoint=[-100,-100],this.extentPadding=100}createZoomBehavior(){this.zoomBehavior=hV().scaleExtent([1.1,this.getZoomMax(this.wafermap.canvasWidth*this.wafermap.canvasHeight,this.wafermap.dataManager.containerDimensions.width*this.wafermap.dataManager.containerDimensions.height)]).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth+this.extentPadding,this.wafermap.canvasHeight+this.extentPadding]]).filter((e=>nV(this.wafermap.canvas).k>=this.minScale||"wheel"===e.type)).on("zoom",(e=>{this.rescale(e)})),this.zoomBehavior(Bz(this.wafermap.canvas))}rescale(e){const t=e.transform
|
|
12594
|
+
t.k===this.minScale?(this.zoomTransform=tV,this.zoomBehavior.transform(Bz(this.wafermap.canvas),tV)):this.zoomTransform=t,this.wafermap.transform=this.zoomTransform}getZoomMax(e,t){return Math.ceil(t/e*100)}}class yH{constructor(e){this.wafermap=e}mousemove(e){const t={x:e.offsetX,y:e.offsetY}
|
|
12590
12595
|
if(!this.hoversOverDie(this.wafermap,t))return void(this.wafermap.hoverDie=void 0)
|
|
12591
12596
|
const n=this.wafermap.transform.invert([t.x,t.y]),i=this.calculateDieCoordinates(this.wafermap,{x:n[0],y:n[1]})
|
|
12592
|
-
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(i)}mouseout(){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e,t){const n=e.originLocation,i=n===
|
|
12597
|
+
this.wafermap.hoverDie=this.wafermap.dataManager.getWaferMapDie(i)}mouseout(){this.wafermap.hoverDie=void 0}calculateDieCoordinates(e,t){const n=e.originLocation,i=n===aH||n===cH?Math.floor:Math.ceil,o=n===aH||n===lH?Math.floor:Math.ceil
|
|
12593
12598
|
return{x:i(e.dataManager.invertedHorizontalScale(t.x-e.dataManager.margin.left)),y:o(e.dataManager.invertedVerticalScale(t.y-e.dataManager.margin.top))}}hoversOverDie(e,t){const n=e.canvasContext.getImageData(t.x,t.y,1,1).data
|
|
12594
12599
|
let i=0
|
|
12595
12600
|
for(const e of n)i+=e
|
|
12596
|
-
return i>0}}class
|
|
12597
|
-
class
|
|
12601
|
+
return i>0}}class xH{constructor(e){this.wafermap=e,this.onWheelMove=e=>{e.preventDefault()},this.onMouseMove=e=>{this.hoverHandler.mousemove(e)},this.onMouseOut=()=>{this.hoverHandler.mouseout()},this.zoomHandler=new wH(e),this.hoverHandler=new yH(e)}attachEvents(){this.zoomHandler.createZoomBehavior(),this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.addEventListener("wheel",this.onWheelMove,{passive:!1})}detachEvents(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut),this.wafermap.canvas.removeEventListener("wheel",this.onWheelMove)}}const kH=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
|
|
12602
|
+
class CH extends RE{constructor(e){super(kH),this.wafermap=e,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}))))}}class SH{constructor(e){this.wafermap=e,this.invalidGridDimensions=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}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}}class $H extends Ft{constructor(){super(...arguments),this.waferMapUpdateTracker=new CH(this),this.originLocation=aH,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=dH,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=pH,this.dataManager=new vH(this),this.renderer=new bH(this),this.renderQueued=!1,this.transform=tV,this.hoverTransform="",this.hoverOpacity=uH,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.eventCoordinator=new xH(this),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new SH(this)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}update(){this.waferMapUpdateTracker.requiresEventsUpdate?(this.eventCoordinator.detachEvents(),this.waferMapValidator.validateGridDimensions(),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.eventCoordinator.attachEvents()):this.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.renderer.renderHover()}createResizeObserver(){return new ResizeObserver((e=>{const t=e[0]
|
|
12598
12603
|
if(void 0===t)return
|
|
12599
12604
|
const{height:n,width:i}=t.contentRect
|
|
12600
|
-
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()}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()}}e([se({attribute:"origin-location"})]
|
|
12601
|
-
const
|
|
12602
|
-
bi.getOrCreate().withPrefix("nimble").register(
|
|
12605
|
+
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()}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()}}e([se({attribute:"origin-location"})],$H.prototype,"originLocation",void 0),e([se({attribute:"grid-min-x",converter:oe})],$H.prototype,"gridMinX",void 0),e([se({attribute:"grid-max-x",converter:oe})],$H.prototype,"gridMaxX",void 0),e([se({attribute:"grid-min-y",converter:oe})],$H.prototype,"gridMinY",void 0),e([se({attribute:"grid-max-y",converter:oe})],$H.prototype,"gridMaxY",void 0),e([se],$H.prototype,"orientation",void 0),e([se({attribute:"max-characters",converter:oe})],$H.prototype,"maxCharacters",void 0),e([se({attribute:"die-labels-hidden",mode:"boolean"})],$H.prototype,"dieLabelsHidden",void 0),e([se({attribute:"die-labels-suffix"})],$H.prototype,"dieLabelsSuffix",void 0),e([se({attribute:"color-scale-mode"})],$H.prototype,"colorScaleMode",void 0),e([g],$H.prototype,"canvasWidth",void 0),e([g],$H.prototype,"canvasHeight",void 0),e([g],$H.prototype,"transform",void 0),e([g],$H.prototype,"hoverTransform",void 0),e([g],$H.prototype,"hoverOpacity",void 0),e([g],$H.prototype,"hoverWidth",void 0),e([g],$H.prototype,"hoverHeight",void 0),e([g],$H.prototype,"hoverDie",void 0),e([g],$H.prototype,"highlightedTags",void 0),e([g],$H.prototype,"dies",void 0),e([g],$H.prototype,"colorScale",void 0)
|
|
12606
|
+
const MH=$H.compose({baseName:"wafer-map",template:uV,styles:pV})
|
|
12607
|
+
bi.getOrCreate().withPrefix("nimble").register(MH())}()
|
|
12603
12608
|
//# sourceMappingURL=all-components-bundle.min.js.map
|