@ni/nimble-components 29.8.2 → 29.9.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 +142 -14
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1109 -1106
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/table-column/anchor/index.d.ts +23 -6
- package/dist/esm/table-column/anchor/index.js +14 -5
- package/dist/esm/table-column/anchor/index.js.map +1 -1
- package/dist/esm/table-column/anchor/models/table-column-anchor-validator.d.ts +8 -0
- package/dist/esm/table-column/anchor/models/table-column-anchor-validator.js +13 -0
- package/dist/esm/table-column/anchor/models/table-column-anchor-validator.js.map +1 -0
- package/dist/esm/table-column/base/models/column-validator.d.ts +1 -1
- package/dist/esm/table-column/base/models/column-validator.js +4 -4
- package/dist/esm/table-column/base/models/column-validator.js.map +1 -1
- package/dist/esm/table-column/mixins/custom-sort-order.d.ts +26 -0
- package/dist/esm/table-column/mixins/custom-sort-order.js +66 -0
- package/dist/esm/table-column/mixins/custom-sort-order.js.map +1 -0
- package/dist/esm/table-column/text/index.d.ts +24 -6
- package/dist/esm/table-column/text/index.js +20 -4
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/dist/esm/table-column/text/models/table-column-text-validator.d.ts +8 -0
- package/dist/esm/table-column/text/models/table-column-text-validator.js +13 -0
- package/dist/esm/table-column/text/models/table-column-text-validator.js.map +1 -0
- package/dist/esm/utilities/models/tracker.d.ts +1 -0
- package/dist/esm/utilities/models/tracker.js +19 -2
- package/dist/esm/utilities/models/tracker.js.map +1 -1
- package/package.json +3 -3
|
@@ -8591,7 +8591,7 @@ for(const t of this.mappingElements){const e=x.getNotifier(t)
|
|
|
8591
8591
|
e.subscribe(this),this.mappingNotifiers.push(e)}}}t([ft],mE.prototype,"pattern",void 0),t([ft({attribute:"button-label"})],mE.prototype,"buttonLabel",void 0),t([C],mE.prototype,"mappingElements",void 0)
|
|
8592
8592
|
class gE{constructor(t){this.regexPattern=new RegExp(t.pattern??""),this.mappingConfigs=t.mappingConfigs,this.viewElement=t.viewElement}isValidMentionHref(t){return this.regexPattern.test(t)}getDisplayName(t){const e=this.mappingConfigs?.get(t),n=this.extractMentionId(t)
|
|
8593
8593
|
return e?.displayName??n}extractMentionId(t){const e=this.regexPattern.exec(t)
|
|
8594
|
-
return e?.[1]??void 0}}class vE{constructor(t){this.parserMentionConfig=[],this.isValid=!0,this.isValid=t.every((t=>t.mentionInternals.validator.isValid())),this.parserMentionConfig=this.isValid?t.map((t=>new gE(t.mentionInternals))):[]}}class bE{constructor(t){this.trackedItems={},this.trackedItems=t.reduce(((t,e)=>({...t,[e]:!1})),this.trackedItems)}getTrackedItems(){return{...this.trackedItems}}isTracked(t){return this.trackedItems[t]}track(t){this.trackedItems[t]=!0}untrack(t){this.trackedItems[t]=!1}trackAll(){this.setAllKeys(!0)}untrackAll(){this.setAllKeys(!1)}allTracked(){return Object.values(this.trackedItems).every((t=>t))}anyTracked(){return Object.values(this.trackedItems).some((t=>t))}noneTracked(){return Object.values(this.trackedItems).every((t=>!t))}setAllKeys(t){this.trackedItems=Object.keys(this.trackedItems).reduce(((e,n)=>({...e,[n]:t})),this.trackedItems)}}class yE extends bE{}const wE=["pattern","mappingConfigs","buttonLabel"]
|
|
8594
|
+
return e?.[1]??void 0}}class vE{constructor(t){this.parserMentionConfig=[],this.isValid=!0,this.isValid=t.every((t=>t.mentionInternals.validator.isValid())),this.parserMentionConfig=this.isValid?t.map((t=>new gE(t.mentionInternals))):[]}}class bE{constructor(t){this.trackedItems={},this.trackedItems=t.reduce(((t,e)=>({...t,[e]:!1})),this.trackedItems)}getTrackedItems(){return{...this.trackedItems}}isTracked(t){return this.trackedItems[t]}track(t){this.trackedItems[t]||(this.trackedItems[t]=!0,this.onTrackingChange())}untrack(t){this.trackedItems[t]&&(this.trackedItems[t]=!1,this.onTrackingChange())}trackAll(){this.allTracked()||(this.setAllKeys(!0),this.onTrackingChange())}untrackAll(){this.noneTracked()||(this.setAllKeys(!1),this.onTrackingChange())}allTracked(){return Object.values(this.trackedItems).every((t=>t))}anyTracked(){return Object.values(this.trackedItems).some((t=>t))}noneTracked(){return Object.values(this.trackedItems).every((t=>!t))}onTrackingChange(){}setAllKeys(t){this.trackedItems=Object.keys(this.trackedItems).reduce(((e,n)=>({...e,[n]:t})),this.trackedItems)}}class yE extends bE{}const wE=["pattern","mappingConfigs","buttonLabel"]
|
|
8595
8595
|
class xE extends yE{constructor(t){super(wE),this.richText=t,this.updateQueued=!1}get updatePattern(){return this.isTracked("pattern")}get updateMappingConfigs(){return this.isTracked("mappingConfigs")}get updateButtonLabel(){return this.isTracked("buttonLabel")}trackMentionInternalsPropertyChanged(t){switch(t){case"mappingConfigs":this.track("mappingConfigs")
|
|
8596
8596
|
break
|
|
8597
8597
|
case"pattern":this.track("pattern")
|
|
@@ -11414,7 +11414,7 @@ for(const{recordId:n,options:i}of t){e.set(n,i)
|
|
|
11414
11414
|
const t=this.hierarchyOptions.get(n)?.delayedHierarchyState,s=i.delayedHierarchyState
|
|
11415
11415
|
t!==YO||s!==KO||this.parentRowsWithChildren.has(n)||this.explicitExpansionStates.delete(n)}this.hierarchyOptions=e}isRowExpandable(t){return t.subRows.length>0||this.canLoadDelayedChildren(t.id)}setHierarchyEnabled(t){this.isHierarchyEnabled=t}isLoadingChildren(t){return!!this.isHierarchyEnabled&&(this.hierarchyOptions.get(t)?.delayedHierarchyState===YO??!1)}canLoadDelayedChildren(t){if(!this.isHierarchyEnabled)return!1
|
|
11416
11416
|
const e=this.hierarchyOptions.get(t)?.delayedHierarchyState
|
|
11417
|
-
return e!==ZO}getDefaultExpansionState(t){return 0!==t.subRows.length}}class SF extends bE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class _F extends SF{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}setConditionValue(t,e){e?this.track(t):this.untrack(t)
|
|
11417
|
+
return e!==ZO}getDefaultExpansionState(t){return 0!==t.subRows.length}}class SF extends bE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class _F extends SF{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}onTrackingChange(){super.onTrackingChange(),this.isColumnValid=this.isValid()}setConditionValue(t,e){e?this.track(t):this.untrack(t)}}t([C],_F.prototype,"isColumnValid",void 0)
|
|
11418
11418
|
class IF{get inNavigationMode(){return this.focusType!==dR&&this.focusType!==hR}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=sR,this.headerActionIndex=-1,this.rowIndex=-1,this.cellContentIndex=-1,this.columnIndex=-1,this.focusWithinTable=!1,this.isCurrentlyFocusingElement=!1,this.visibleRowNotifiers=[],this.onTableFocusIn=t=>{this.focusWithinTable=!0,this.updateFocusStateFromActiveElement(!1)
|
|
11419
11419
|
const e=void 0!==this.table.openActionMenuRecordId
|
|
11420
11420
|
if((t.target===this.table||this.focusType===sR)&&!e){let t=!0
|
|
@@ -11738,14 +11738,16 @@ const PF=Q`
|
|
|
11738
11738
|
const VF=class extends BF{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:PF,styles:zF})
|
|
11739
11739
|
_i.getOrCreate().withPrefix("nimble").register(VF())
|
|
11740
11740
|
const HF="nimble-table-column-text-group-header-view"
|
|
11741
|
-
function UF(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=XO.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=XO.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex??void 0)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex??void 0)}}return ft({attribute:"sorting-disabled",mode:"boolean"})(e.prototype,"sortingDisabled"),ft({attribute:"sort-index",converter:ut})(e.prototype,"sortIndex"),ft({attribute:"sort-direction"})(e.prototype,"sortDirection"),e}
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
const
|
|
11741
|
+
function UF(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=XO.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=XO.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex??void 0)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex??void 0)}}return ft({attribute:"sorting-disabled",mode:"boolean"})(e.prototype,"sortingDisabled"),ft({attribute:"sort-index",converter:ut})(e.prototype,"sortIndex"),ft({attribute:"sort-direction"})(e.prototype,"sortDirection"),e}function qF(t){class e extends t{constructor(){super(...arguments),this.customSortOrderColumnChangeHandler={handleChange:this.handleCustomSortOrderColumnChange.bind(this)}}getResolvedOperandDataRecordFieldName(t){return"string"==typeof this.sortByFieldName?this.sortByFieldName:t}getResolvedSortOperation(t){return"string"==typeof this.sortByFieldName?uR:t}sortByFieldNameChanged(){this.handleSortConfigurationChange(),this.updateCustomColumnSortingValidity(),"string"!=typeof this.sortByFieldName||this.customSortOrderColumnNotifier?(this.customSortOrderColumnNotifier?.unsubscribe(this.customSortOrderColumnChangeHandler),this.customSortOrderColumnNotifier=void 0):(this.customSortOrderColumnNotifier=x.getNotifier(this.columnInternals),this.customSortOrderColumnNotifier.subscribe(this.customSortOrderColumnChangeHandler))}handleCustomSortOrderColumnChange(t,e){"groupingDisabled"===e&&this.updateCustomColumnSortingValidity()}updateCustomColumnSortingValidity(){const t="string"==typeof this.sortByFieldName
|
|
11742
|
+
!!this.columnInternals.groupingDisabled||!t?this.columnInternals.validator.untrack("invalidCustomSortWithGrouping"):this.columnInternals.validator.track("invalidCustomSortWithGrouping")}}return ft({attribute:"sort-by-field-name"})(e.prototype,"sortByFieldName"),e}const jF=["invalidCustomSortWithGrouping"]
|
|
11743
|
+
class WF extends _F{constructor(){super(jF)}}class GF extends(TF(AF(OF(UF(qF(SR)))))){constructor(){super(...arguments),this.underlineHidden=!1,this.defaultSortOperation=pR}placeholderChanged(){this.updateColumnConfig()}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:HF,delegatedEvents:["click"],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new WF}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.updateColumnInternalsSortConfiguration()}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download,placeholder:this.placeholder}}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.labelFieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}t([ft({attribute:"label-field-name"})],GF.prototype,"labelFieldName",void 0),t([ft({attribute:"href-field-name"})],GF.prototype,"hrefFieldName",void 0),t([ft],GF.prototype,"appearance",void 0),t([ft({attribute:"underline-hidden",mode:"boolean"})],GF.prototype,"underlineHidden",void 0),t([ft],GF.prototype,"hreflang",void 0),t([ft],GF.prototype,"ping",void 0),t([ft],GF.prototype,"referrerpolicy",void 0),t([ft],GF.prototype,"rel",void 0),t([ft],GF.prototype,"target",void 0),t([ft],GF.prototype,"type",void 0),t([ft],GF.prototype,"download",void 0)
|
|
11744
|
+
const ZF=GF.compose({baseName:"table-column-anchor",template:DF,styles:EF})
|
|
11745
|
+
_i.getOrCreate().withPrefix("nimble").register(ZF())
|
|
11746
|
+
class KF extends SR{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function YF(t){return TF(AF(OF(UF(t))))}function XF(t,e){if("number"!=typeof e)return""
|
|
11747
|
+
try{return t.format(e)}catch(t){return""}}t([ft({attribute:"field-name"})],KF.prototype,"fieldName",void 0)
|
|
11748
|
+
const JF=class extends BF{updateText(){this.columnConfig?this.text=XF(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:PF,styles:zF})
|
|
11749
|
+
_i.getOrCreate().withPrefix("nimble").register(JF())
|
|
11750
|
+
const QF=Q`
|
|
11749
11751
|
<template
|
|
11750
11752
|
class="
|
|
11751
11753
|
${t=>t.alignment===iR?"right-align":""}
|
|
@@ -11759,7 +11761,7 @@ const YF=Q`
|
|
|
11759
11761
|
${t=>t.text}
|
|
11760
11762
|
</span>
|
|
11761
11763
|
</template>
|
|
11762
|
-
`,
|
|
11764
|
+
`,tN=Mt`
|
|
11763
11765
|
${zs("flex")}
|
|
11764
11766
|
|
|
11765
11767
|
:host {
|
|
@@ -11783,22 +11785,22 @@ const YF=Q`
|
|
|
11783
11785
|
color: ${Oc};
|
|
11784
11786
|
}
|
|
11785
11787
|
`
|
|
11786
|
-
class
|
|
11787
|
-
return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([C],
|
|
11788
|
-
const
|
|
11789
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11790
|
-
const
|
|
11791
|
-
class
|
|
11792
|
-
class
|
|
11788
|
+
class eN extends bR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=nR,this.isPlaceholder=!1}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}cellRecordChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){const t=this.cellRecord?.value,e=this.columnConfig?.placeholder
|
|
11789
|
+
return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([C],eN.prototype,"hasOverflow",void 0),t([C],eN.prototype,"text",void 0),t([C],eN.prototype,"alignment",void 0),t([C],eN.prototype,"isPlaceholder",void 0)
|
|
11790
|
+
const nN=class extends eN{updateText(){this.columnConfig?this.text=XF(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:QF,styles:tN})
|
|
11791
|
+
_i.getOrCreate().withPrefix("nimble").register(nN())
|
|
11792
|
+
const iN=void 0,sN=["invalidCustomOptionsCombination"]
|
|
11793
|
+
class oN extends _F{constructor(){super(sN)}setCustomOptionsValidity(t){this.setConditionValue("invalidCustomOptionsCombination",!t)}}const rN={toView:t=>"boolean"==typeof t?t.toString():null,fromView:t=>"true"===t||!0===t||"false"!==t&&!1!==t&&void 0}
|
|
11794
|
+
class aN extends(YF(KF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Wa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Wa.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:uR,validator:new oN}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.createFormatter()
|
|
11793
11795
|
if(t){const e={formatter:t,placeholder:this.placeholder}
|
|
11794
11796
|
this.columnInternals.columnConfig=e,this.columnInternals.validator.setCustomOptionsValidity(!0)}else this.columnInternals.columnConfig=void 0,this.columnInternals.validator.setCustomOptionsValidity(!1)}createFormatter(){let t
|
|
11795
|
-
t=this.format===
|
|
11796
|
-
try{return new Intl.DateTimeFormat(Wa.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([ft],
|
|
11797
|
-
const
|
|
11798
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11799
|
-
const
|
|
11800
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11801
|
-
class
|
|
11797
|
+
t=this.format===iN?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
|
|
11798
|
+
try{return new Intl.DateTimeFormat(Wa.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([ft],aN.prototype,"format",void 0),t([ft({attribute:"custom-locale-matcher"})],aN.prototype,"customLocaleMatcher",void 0),t([ft({attribute:"custom-weekday"})],aN.prototype,"customWeekday",void 0),t([ft({attribute:"custom-era"})],aN.prototype,"customEra",void 0),t([ft({attribute:"custom-year"})],aN.prototype,"customYear",void 0),t([ft({attribute:"custom-month"})],aN.prototype,"customMonth",void 0),t([ft({attribute:"custom-day"})],aN.prototype,"customDay",void 0),t([ft({attribute:"custom-hour"})],aN.prototype,"customHour",void 0),t([ft({attribute:"custom-minute"})],aN.prototype,"customMinute",void 0),t([ft({attribute:"custom-second"})],aN.prototype,"customSecond",void 0),t([ft({attribute:"custom-time-zone-name"})],aN.prototype,"customTimeZoneName",void 0),t([ft({attribute:"custom-format-matcher"})],aN.prototype,"customFormatMatcher",void 0),t([ft({attribute:"custom-hour12",converter:rN})],aN.prototype,"customHour12",void 0),t([ft({attribute:"custom-time-zone"})],aN.prototype,"customTimeZone",void 0),t([ft({attribute:"custom-calendar"})],aN.prototype,"customCalendar",void 0),t([ft({attribute:"custom-day-period"})],aN.prototype,"customDayPeriod",void 0),t([ft({attribute:"custom-numbering-system"})],aN.prototype,"customNumberingSystem",void 0),t([ft({attribute:"custom-date-style"})],aN.prototype,"customDateStyle",void 0),t([ft({attribute:"custom-time-style"})],aN.prototype,"customTimeStyle",void 0),t([ft({attribute:"custom-hour-cycle"})],aN.prototype,"customHourCycle",void 0)
|
|
11799
|
+
const lN=aN.compose({baseName:"table-column-date-text",template:DF,styles:EF})
|
|
11800
|
+
_i.getOrCreate().withPrefix("nimble").register(lN())
|
|
11801
|
+
const cN=class extends eN{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:QF,styles:tN})
|
|
11802
|
+
_i.getOrCreate().withPrefix("nimble").register(cN())
|
|
11803
|
+
class dN{constructor(t){this.lang=t,this.daysFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"day"}),this.hoursFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"hour"}),this.minutesFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"minute"}),this.secondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second"}),this.scientificSecondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second",notation:"scientific",maximumFractionDigits:3})}format(t){if("number"!=typeof t||t<0||!Number.isFinite(t))return""
|
|
11802
11804
|
const e=[],n=1e3,i=6e4,s=36e5,o=864e5,r=t/o
|
|
11803
11805
|
let a=t
|
|
11804
11806
|
const l=Math.floor(r)
|
|
@@ -11811,37 +11813,37 @@ if(a-=d*i,d){const t=this.minutesFormatter.format(d)
|
|
|
11811
11813
|
e.push(t)}const h=a/n,u=0===h?0:h%60
|
|
11812
11814
|
if(t<1&&0!==h)return this.scientificSecondsFormatter.format(h)
|
|
11813
11815
|
if(u>=5e-4||0===u&&0===e.length){const t=this.secondsFormatter.format(u)
|
|
11814
|
-
e.push(t)}return e.join(", ")}}const
|
|
11815
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11816
|
-
class
|
|
11817
|
-
this.columnInternals.columnConfig=t}}const
|
|
11818
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11819
|
-
const
|
|
11816
|
+
e.push(t)}return e.join(", ")}}const hN=class extends BF{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:PF,styles:zF})
|
|
11817
|
+
_i.getOrCreate().withPrefix("nimble").register(hN())
|
|
11818
|
+
class uN extends(YF(KF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Wa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Wa.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:uR,validator:new _F([])}}updateColumnConfig(){const t={formatter:new dN(Wa.getValueFor(this)),placeholder:this.placeholder}
|
|
11819
|
+
this.columnInternals.columnConfig=t}}const pN=uN.compose({baseName:"table-column-duration-text",template:DF,styles:EF})
|
|
11820
|
+
_i.getOrCreate().withPrefix("nimble").register(pN())
|
|
11821
|
+
const fN=(t,e)=>{if("number"===e){const e=ut.fromView(t)
|
|
11820
11822
|
return null===e?void 0:e}return"boolean"===e?!1!==t&&"false"!==t&&(!0===t||"true"===t||void 0):t?.toString()??void 0}
|
|
11821
|
-
class
|
|
11822
|
-
return this.mappings.forEach((e=>{const n=
|
|
11823
|
+
class mN extends SR{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(t,e){t instanceof qv&&"string"==typeof e&&this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.checkValidity()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const t=new Map
|
|
11824
|
+
return this.mappings.forEach((e=>{const n=fN(e.key,this.keyType)
|
|
11823
11825
|
if(void 0===n)throw Error("Key was invalid for type. Validation should have prevented this.")
|
|
11824
11826
|
const i=this.createMappingConfig(e)
|
|
11825
11827
|
t.set(n,i)})),t}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}mappingsChanged(){this.updateColumnConfig(),this.observeMappings()}keyTypeChanged(){this.updateColumnConfig()}removeMappingObservers(){this.mappingNotifiers.forEach((t=>{t.unsubscribe(this)})),this.mappingNotifiers=[]}observeMappings(){this.removeMappingObservers()
|
|
11826
11828
|
for(const t of this.mappings){const e=x.getNotifier(t)
|
|
11827
|
-
e.subscribe(this),this.mappingNotifiers.push(e)}}}t([C],
|
|
11828
|
-
const
|
|
11829
|
+
e.subscribe(this),this.mappingNotifiers.push(e)}}}t([C],mN.prototype,"mappings",void 0),t([ft({attribute:"field-name"})],mN.prototype,"fieldName",void 0),t([ft({attribute:"key-type"})],mN.prototype,"keyType",void 0)
|
|
11830
|
+
const gN=Mt`
|
|
11829
11831
|
${EF}
|
|
11830
11832
|
|
|
11831
11833
|
slot[name='mapping'] {
|
|
11832
11834
|
display: none;
|
|
11833
11835
|
}
|
|
11834
|
-
`,
|
|
11835
|
-
class
|
|
11836
|
+
`,vN=Q`${DF}<slot ${ie("mappings")} name="mapping"></slot>`
|
|
11837
|
+
class bN extends _F{constructor(t){super(t)}validate(t,e){this.untrackAll()
|
|
11836
11838
|
const n=t.map((t=>t.key))
|
|
11837
|
-
this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===
|
|
11838
|
-
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>
|
|
11839
|
+
this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===fN(t,e)))
|
|
11840
|
+
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>fN(t,e))),i=new Set(n).size!==n.length
|
|
11839
11841
|
this.setConditionValue("duplicateMappingKey",i)}validateNoMissingKeys(t){const e=t.some((t=>void 0===t.key))
|
|
11840
|
-
this.setConditionValue("missingKeyValue",e)}}const
|
|
11841
|
-
class
|
|
11842
|
-
this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(
|
|
11843
|
-
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(
|
|
11844
|
-
this.setConditionValue("unsupportedMappingType",!e)}}const
|
|
11842
|
+
this.setConditionValue("missingKeyValue",e)}}const yN=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue","unsupportedMappingType","invalidIconName","missingTextValue"]
|
|
11843
|
+
class wN extends bN{constructor(){super(yN)}static isIconMappingElement(t){return t instanceof Yv}static isSupportedMappingElement(t){return t instanceof Yv||t instanceof Jv||t instanceof tb||t instanceof Gv}validate(t,e){super.validate(t,e),this.validateMappingTypes(t),this.validateIconNames(t),this.validateNoMissingText(t)}validateIconNames(t){const e=t.filter(wN.isIconMappingElement).some((t=>void 0===t.resolvedIcon))
|
|
11844
|
+
this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(wN.isSupportedMappingElement).some((t=>void 0===t.text))
|
|
11845
|
+
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(wN.isSupportedMappingElement)
|
|
11846
|
+
this.setConditionValue("unsupportedMappingType",!e)}}const xN=Mt`
|
|
11845
11847
|
${zs("inline-flex")}
|
|
11846
11848
|
|
|
11847
11849
|
:host {
|
|
@@ -11863,7 +11865,7 @@ this.setConditionValue("unsupportedMappingType",!e)}}const bN=Mt`
|
|
|
11863
11865
|
overflow: hidden;
|
|
11864
11866
|
text-overflow: ellipsis;
|
|
11865
11867
|
}
|
|
11866
|
-
`,
|
|
11868
|
+
`,CN=Q`
|
|
11867
11869
|
${Gt((t=>t.visualizationTemplate),Q`
|
|
11868
11870
|
<span class="reserve-icon-size">
|
|
11869
11871
|
${t=>t.visualizationTemplate}
|
|
@@ -11874,8 +11876,8 @@ this.setConditionValue("unsupportedMappingType",!e)}}const bN=Mt`
|
|
|
11874
11876
|
title="${t=>t.hasOverflow&&t.text?t.text:null}"
|
|
11875
11877
|
class="text"
|
|
11876
11878
|
>${t=>t.text}</span>
|
|
11877
|
-
`,
|
|
11878
|
-
class
|
|
11879
|
+
`,kN={default:void 0,error:"error",warning:"warning",success:"success",information:"information"}
|
|
11880
|
+
class SN{constructor(t){this.text=t}}class _N extends SN{constructor(t,e,n,i){var s
|
|
11879
11881
|
super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
|
|
11880
11882
|
<${s=t}
|
|
11881
11883
|
title="${t=>t.textHidden?t.text:""}"
|
|
@@ -11885,7 +11887,7 @@ super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
|
|
|
11885
11887
|
severity="${t=>t.severity}"
|
|
11886
11888
|
>
|
|
11887
11889
|
</${s}>
|
|
11888
|
-
`}}const
|
|
11890
|
+
`}}const IN=Q`
|
|
11889
11891
|
<${TT}
|
|
11890
11892
|
title="${t=>t.textHidden?t.text:""}"
|
|
11891
11893
|
aria-label="${t=>t.text}"
|
|
@@ -11893,12 +11895,12 @@ super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
|
|
|
11893
11895
|
>
|
|
11894
11896
|
</${TT}>
|
|
11895
11897
|
`
|
|
11896
|
-
class
|
|
11898
|
+
class MN extends SN{constructor(t,e){super(t),this.textHidden=e,this.spinnerTemplate=IN}}class $N extends SN{}class EN extends SN{}class DN extends gR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.textHidden=!1}columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig)return
|
|
11897
11899
|
const t=this.groupHeaderValue,e=this.columnConfig.mappingConfigs.get(t)
|
|
11898
|
-
e instanceof
|
|
11899
|
-
const
|
|
11900
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11901
|
-
const
|
|
11900
|
+
e instanceof _N?(this.severity=e.severity,this.text=e.text??"",this.visualizationTemplate=e.iconTemplate):e instanceof MN?(this.text=e.text??"",this.visualizationTemplate=e.spinnerTemplate):(e instanceof $N||e instanceof EN)&&(this.text=e.text??"")}resetState(){this.text="",this.visualizationTemplate=void 0,this.severity=kN.default}}t([C],DN.prototype,"hasOverflow",void 0),t([C],DN.prototype,"text",void 0),t([C],DN.prototype,"severity",void 0),t([C],DN.prototype,"visualizationTemplate",void 0)
|
|
11901
|
+
const AN=DN.compose({baseName:"table-column-mapping-group-header-view",template:CN,styles:xN})
|
|
11902
|
+
_i.getOrCreate().withPrefix("nimble").register(AN())
|
|
11903
|
+
const TN=Mt`
|
|
11902
11904
|
${zs("inline-flex")}
|
|
11903
11905
|
|
|
11904
11906
|
:host {
|
|
@@ -11920,7 +11922,7 @@ const EN=Mt`
|
|
|
11920
11922
|
overflow: hidden;
|
|
11921
11923
|
text-overflow: ellipsis;
|
|
11922
11924
|
}
|
|
11923
|
-
`,
|
|
11925
|
+
`,ON=Q`
|
|
11924
11926
|
${Gt((t=>t.visualizationTemplate),Q`
|
|
11925
11927
|
<span class="reserve-icon-size">
|
|
11926
11928
|
${t=>t.visualizationTemplate}
|
|
@@ -11936,26 +11938,26 @@ const EN=Mt`
|
|
|
11936
11938
|
</span>
|
|
11937
11939
|
`)}
|
|
11938
11940
|
`
|
|
11939
|
-
class
|
|
11941
|
+
class RN extends bR{constructor(){super(...arguments),this.textHidden=!1,this.hasOverflow=!1}columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig||!this.cellRecord)return
|
|
11940
11942
|
const t=this.cellRecord.value
|
|
11941
11943
|
if(null==t)return
|
|
11942
11944
|
const e=this.columnConfig.mappingConfigs.get(t)
|
|
11943
|
-
e instanceof
|
|
11944
|
-
const
|
|
11945
|
-
_i.getOrCreate().withPrefix("nimble").register(TN())
|
|
11946
|
-
const ON="icon-size"
|
|
11947
|
-
class RN extends(TF(AF(UF(uN)))){minPixelWidthChanged(){this.widthMode!==ON&&(this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-mapping-cell-view",groupHeaderViewTag:"nimble-table-column-mapping-group-header-view",delegatedEvents:[],sortOperation:uR,validator:new vN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof Yv){if(!t.resolvedIcon)throw Error("Unresolved icon")
|
|
11948
|
-
return new CN(t.resolvedIcon,t.severity,t.text,t.textHidden)}if(t instanceof Jv)return new SN(t.text,t.textHidden)
|
|
11949
|
-
if(t instanceof tb)return new _N(t.text)
|
|
11950
|
-
if(t instanceof Gv)return new IN(t.text)
|
|
11951
|
-
throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===ON?(this.columnInternals.resizingDisabled=!0,this.columnInternals.hideHeaderIndicators=!0,this.columnInternals.pixelWidth=32,this.columnInternals.minPixelWidth=32):(this.columnInternals.resizingDisabled=!1,this.columnInternals.hideHeaderIndicators=!1,this.columnInternals.pixelWidth=void 0,this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getConfiguredMinPixelWidth(){return"number"==typeof this.minPixelWidth?this.minPixelWidth:fR}}t([ft({attribute:"width-mode"})],RN.prototype,"widthMode",void 0)
|
|
11952
|
-
const FN=RN.compose({baseName:"table-column-mapping",template:fN,styles:pN})
|
|
11945
|
+
e instanceof _N?(this.severity=e.severity,this.text=e.text,this.visualizationTemplate=e.iconTemplate,this.textHidden=e.textHidden):e instanceof MN?(this.text=e.text,this.visualizationTemplate=e.spinnerTemplate,this.textHidden=e.textHidden):e instanceof $N?(this.text=e.text,this.textHidden=!1):e instanceof EN&&(this.text=e.text,this.textHidden=!0)}resetState(){this.text=void 0,this.textHidden=!1,this.visualizationTemplate=void 0,this.severity=kN.default}}t([C],RN.prototype,"severity",void 0),t([C],RN.prototype,"text",void 0),t([C],RN.prototype,"visualizationTemplate",void 0),t([C],RN.prototype,"textHidden",void 0),t([C],RN.prototype,"hasOverflow",void 0)
|
|
11946
|
+
const FN=RN.compose({baseName:"table-column-mapping-cell-view",template:ON,styles:TN})
|
|
11953
11947
|
_i.getOrCreate().withPrefix("nimble").register(FN())
|
|
11954
|
-
const NN=
|
|
11948
|
+
const NN="icon-size"
|
|
11949
|
+
class LN extends(TF(AF(UF(mN)))){minPixelWidthChanged(){this.widthMode!==NN&&(this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-mapping-cell-view",groupHeaderViewTag:"nimble-table-column-mapping-group-header-view",delegatedEvents:[],sortOperation:uR,validator:new wN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof Yv){if(!t.resolvedIcon)throw Error("Unresolved icon")
|
|
11950
|
+
return new _N(t.resolvedIcon,t.severity,t.text,t.textHidden)}if(t instanceof Jv)return new MN(t.text,t.textHidden)
|
|
11951
|
+
if(t instanceof tb)return new $N(t.text)
|
|
11952
|
+
if(t instanceof Gv)return new EN(t.text)
|
|
11953
|
+
throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===NN?(this.columnInternals.resizingDisabled=!0,this.columnInternals.hideHeaderIndicators=!0,this.columnInternals.pixelWidth=32,this.columnInternals.minPixelWidth=32):(this.columnInternals.resizingDisabled=!1,this.columnInternals.hideHeaderIndicators=!1,this.columnInternals.pixelWidth=void 0,this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getConfiguredMinPixelWidth(){return"number"==typeof this.minPixelWidth?this.minPixelWidth:fR}}t([ft({attribute:"width-mode"})],LN.prototype,"widthMode",void 0)
|
|
11954
|
+
const BN=LN.compose({baseName:"table-column-mapping",template:vN,styles:gN})
|
|
11955
|
+
_i.getOrCreate().withPrefix("nimble").register(BN())
|
|
11956
|
+
const PN=Q`
|
|
11955
11957
|
<template @delegated-event="${(t,e)=>t.onDelegatedEvent(e.event)}"
|
|
11956
11958
|
>${DF}</template
|
|
11957
11959
|
>
|
|
11958
|
-
`,
|
|
11960
|
+
`,zN="menu-button-menu",VN=Q`
|
|
11959
11961
|
${Gt((t=>t.showMenuButton),Q`
|
|
11960
11962
|
<${cb}
|
|
11961
11963
|
${Ut("menuButton")}
|
|
@@ -11969,10 +11971,10 @@ const NN=Q`
|
|
|
11969
11971
|
<span ${Ut("valueSpan")} class="value-label">${t=>t.cellRecord.value}</span>
|
|
11970
11972
|
<${ug} slot="end"></${ug}>
|
|
11971
11973
|
|
|
11972
|
-
<slot name="${
|
|
11974
|
+
<slot name="${zN}" slot="menu"></slot>
|
|
11973
11975
|
</${cb}>
|
|
11974
11976
|
`)}
|
|
11975
|
-
`,
|
|
11977
|
+
`,HN=Mt`
|
|
11976
11978
|
:host {
|
|
11977
11979
|
align-self: center;
|
|
11978
11980
|
width: 100%;
|
|
@@ -11990,18 +11992,18 @@ const NN=Q`
|
|
|
11990
11992
|
white-space: nowrap;
|
|
11991
11993
|
}
|
|
11992
11994
|
`
|
|
11993
|
-
class
|
|
11994
|
-
if(e&&t.detail.newState){const t={slots:[{name:e,slot:
|
|
11995
|
-
this.$emit("cell-view-slots-request",t)}return!0}onMenuButtonMouseOver(){this.valueSpan&&(this.hasOverflow=this.valueSpan.offsetWidth<this.valueSpan.scrollWidth)}onMenuButtonMouseOut(){this.hasOverflow=!1}onMenuButtonClick(t){t.stopPropagation()}}t([C],
|
|
11996
|
-
const
|
|
11997
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11998
|
-
class
|
|
11995
|
+
class UN extends bR{constructor(){super(...arguments),this.hasOverflow=!1}get showMenuButton(){return!!this.cellRecord?.value}get tabbableChildren(){return this.showMenuButton?[this.menuButton]:[]}onMenuButtonBeforeToggle(t){const e=this.columnConfig?.menuSlot
|
|
11996
|
+
if(e&&t.detail.newState){const t={slots:[{name:e,slot:zN}]}
|
|
11997
|
+
this.$emit("cell-view-slots-request",t)}return!0}onMenuButtonMouseOver(){this.valueSpan&&(this.hasOverflow=this.valueSpan.offsetWidth<this.valueSpan.scrollWidth)}onMenuButtonMouseOut(){this.hasOverflow=!1}onMenuButtonClick(t){t.stopPropagation()}}t([C],UN.prototype,"hasOverflow",void 0),t([k],UN.prototype,"showMenuButton",null)
|
|
11998
|
+
const qN=UN.compose({baseName:"table-column-menu-button-cell-view",template:VN,styles:HN})
|
|
11999
|
+
_i.getOrCreate().withPrefix("nimble").register(qN())
|
|
12000
|
+
class jN extends(AF(SR)){onDelegatedEvent(t){t.stopImmediatePropagation()
|
|
11999
12001
|
const e=t,n=e.detail.originalEvent
|
|
12000
12002
|
if("beforetoggle"===n.type||"toggle"===n.type){const t=`menu-button-column-${n.type}`,i={...n.detail,recordId:e.detail.recordId}
|
|
12001
|
-
this.$emit(t,i)}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-menu-button-cell-view",delegatedEvents:["beforetoggle","toggle"],slotNames:[
|
|
12002
|
-
const
|
|
12003
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12004
|
-
const
|
|
12003
|
+
this.$emit(t,i)}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-menu-button-cell-view",delegatedEvents:["beforetoggle","toggle"],slotNames:[zN],validator:new _F([])}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}menuSlotChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={menuSlot:this.menuSlot}}}t([ft({attribute:"field-name"})],jN.prototype,"fieldName",void 0),t([ft({attribute:"menu-slot"})],jN.prototype,"menuSlot",void 0)
|
|
12004
|
+
const WN=jN.compose({baseName:"table-column-menu-button",template:PN,styles:EF})
|
|
12005
|
+
_i.getOrCreate().withPrefix("nimble").register(WN())
|
|
12006
|
+
const GN=Q`<span
|
|
12005
12007
|
${Cg("hasOverflow")}
|
|
12006
12008
|
class="header-content"
|
|
12007
12009
|
title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
|
|
@@ -12009,13 +12011,13 @@ const qN=Q`<span
|
|
|
12009
12011
|
<slot ${Ut("contentSlot")}></slot>
|
|
12010
12012
|
<slot ${ie({property:"unitElements",filter:te()})} name="unit"></slot>
|
|
12011
12013
|
</span>`
|
|
12012
|
-
const
|
|
12013
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12014
|
-
const
|
|
12015
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12016
|
-
const
|
|
12017
|
-
class
|
|
12018
|
-
try{return this.tryFormat(t)}catch{return""}}}class
|
|
12014
|
+
const ZN=class extends BF{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:PF,styles:zF})
|
|
12015
|
+
_i.getOrCreate().withPrefix("nimble").register(ZN())
|
|
12016
|
+
const KN=class extends eN{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??nR}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:QF,styles:tN})
|
|
12017
|
+
_i.getOrCreate().withPrefix("nimble").register(KN())
|
|
12018
|
+
const YN={default:void 0,decimal:"decimal"},XN="left",JN="right"
|
|
12019
|
+
class QN{format(t){if("number"!=typeof t)return""
|
|
12020
|
+
try{return this.tryFormat(t)}catch{return""}}}class tL{constructor(t){this.locale=t.locale,this.intlNumberFormatOptions=t.intlNumberFormatOptions}}class eL extends tL{constructor(t,e){super(t),this.formatter=new Intl.NumberFormat(this.locale,{...e,...this.intlNumberFormatOptions})}static createFactory(t){return e=>new eL(e,t)}format(t){return this.formatter.format(t)}}class nL{constructor(t,e){this.scaleFactor=t,this.scaledUnitFormatFactory=e}isBase(){return 1===this.scaleFactor}}class iL{constructor(t){this.supportedScaledUnits=t
|
|
12019
12021
|
const e=t.every(((t,e,n)=>0===e||n[e-1].scaleFactor<t.scaleFactor))
|
|
12020
12022
|
if(!e)throw new Error("Supported scaled units must have unique and ordered scale factors")
|
|
12021
12023
|
const n=t.find((t=>t.isBase()))
|
|
@@ -12024,39 +12026,40 @@ this.supportedScaledUnits=t,this.baseScaledUnit=n}scaleNumber(t){const e=Math.ab
|
|
|
12024
12026
|
if(1===this.supportedScaledUnits.length||0===e||e===1/0||Number.isNaN(e))return{scaledValue:t,scaledUnit:this.baseScaledUnit}
|
|
12025
12027
|
for(let n=this.supportedScaledUnits.length-1;n>=0;n-=1){const i=this.supportedScaledUnits[n]
|
|
12026
12028
|
if(e/i.scaleFactor>=1)return{scaledValue:t/i.scaleFactor,scaledUnit:i}}const n=this.supportedScaledUnits[0]
|
|
12027
|
-
return{scaledValue:t/n.scaleFactor,scaledUnit:n}}}const
|
|
12028
|
-
class
|
|
12029
|
+
return{scaledValue:t/n.scaleFactor,scaledUnit:n}}}const sL=new class extends iL{constructor(){super([new nL(1,eL.createFactory({}))])}},oL="negative"
|
|
12030
|
+
class rL extends QN{constructor(t,{unitScale:e=sL}={unitScale:sL}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:rL.maximumDigits,maximumFractionDigits:rL.maximumDigits-1,roundingPriority:"lessPrecision",signDisplay:oL},this.defaultScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:rL.maximumDigits,notation:"scientific",signDisplay:oL}
|
|
12029
12031
|
for(const n of e.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions}))
|
|
12030
12032
|
this.exponentialScaledUnitFormatter=e.baseScaledUnit.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=e}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(t){const{scaledValue:e,scaledUnit:n}=this.unitScale.scaleNumber(t),i=Math.abs(e)
|
|
12031
|
-
return 0!==i&&(i>=
|
|
12032
|
-
class
|
|
12033
|
+
return 0!==i&&(i>=rL.exponentialUpperBound||i<rL.exponentialLowerBound)?this.exponentialScaledUnitFormatter.format(t):this.defaultScaledUnitFormatters.get(n.scaleFactor).format(e)}}rL.maximumDigits=6,rL.exponentialLowerBound=995e-6,rL.exponentialUpperBound=999999.5
|
|
12034
|
+
class aL extends QN{constructor(t,{minimumFractionDigits:e=0,maximumFractionDigits:n=Math.max(3,e),unitScale:i=sL}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:sL}){super(),this.scaledUnitFormatters=new Map
|
|
12033
12035
|
const s={maximumFractionDigits:n,minimumFractionDigits:e,signDisplay:"negative"}
|
|
12034
12036
|
for(const e of i.supportedScaledUnits)this.scaledUnitFormatters.set(e.scaleFactor,e.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:s}))
|
|
12035
12037
|
this.unitScale=i,this.minimumFractionDigits=e,this.maximumFractionDigits=n}resolvedOptions(){return{unitScale:this.unitScale,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits}}tryFormat(t){const{scaledValue:e,scaledUnit:n}=this.unitScale.scaleNumber(t)
|
|
12036
|
-
return this.scaledUnitFormatters.get(n.scaleFactor).format(e)}}class
|
|
12038
|
+
return this.scaledUnitFormatters.get(n.scaleFactor).format(e)}}class lL extends QN{constructor(t,e){super(),this._resolvedOptions=this.resolveOptions(e),this.resolvedUnitFormat=this.resolveUnitFormat(t,this._resolvedOptions)}resolvedOptions(){return{...this._resolvedOptions}}optionsMatch(t){const e=this.resolveOptions(t)
|
|
12037
12039
|
return this._resolvedOptions.decimalDigits===e.decimalDigits&&this._resolvedOptions.decimalMaximumDigits===e.decimalMaximumDigits&&this._resolvedOptions.numberTextFormat===e.numberTextFormat&&this._resolvedOptions.unitScale===e.unitScale}tryFormat(t){return this.resolvedUnitFormat.format(t)}resolveUnitFormat(t,e){const{numberTextFormat:n,decimalMaximumDigits:i,decimalDigits:s,unitScale:o}=e
|
|
12038
|
-
return n===
|
|
12040
|
+
return n===YN.default?new rL(t,{unitScale:o}):new aL(t,"number"==typeof s?{minimumFractionDigits:s,maximumFractionDigits:s,unitScale:o}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:o})}resolveOptions(t){if(!t||t.numberTextFormat===YN.default)return{numberTextFormat:YN.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:t?.unitScale??sL}
|
|
12039
12041
|
const e="number"==typeof t.decimalDigits,n="number"==typeof t.decimalMaximumDigits
|
|
12040
12042
|
if(e&&n)throw new Error("decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.")
|
|
12041
|
-
return e||n?{numberTextFormat:
|
|
12042
|
-
const
|
|
12043
|
-
class
|
|
12044
|
-
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===
|
|
12045
|
-
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===
|
|
12043
|
+
return e||n?{numberTextFormat:YN.decimal,decimalDigits:t.decimalDigits,decimalMaximumDigits:t.decimalMaximumDigits,unitScale:t.unitScale??sL}:{numberTextFormat:YN.decimal,decimalDigits:lL.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:t.unitScale??sL}}}lL.defaultDecimalDigits=2
|
|
12044
|
+
const cL=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
|
|
12045
|
+
class dL extends _F{constructor(){super(cL)}validateDecimalDigits(t,e){const n=!!(t===YN.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
|
|
12046
|
+
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===YN.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
|
|
12047
|
+
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===YN.decimal)&&("number"==typeof e&&"number"==typeof n)
|
|
12046
12048
|
this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(t){const e=t.length>1
|
|
12047
|
-
this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class
|
|
12048
|
-
class
|
|
12049
|
-
t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await kE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof
|
|
12049
|
+
this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class hL extends We{}t([C],hL.prototype,"resolvedUnitScale",void 0)
|
|
12050
|
+
class uL extends(YF(KF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Wa.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Wa.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:uR,validator:new dL}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const t=x.getNotifier(this.unit)
|
|
12051
|
+
t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await kE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof hL))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.columnInternals.validator
|
|
12050
12052
|
if(t.validateDecimalDigits(this.format,this.decimalDigits),t.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),t.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),t.validateAtMostOneUnit(this.unitElements??[]),t.isValid()){const t={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment(),placeholder:this.placeholder}
|
|
12051
12053
|
this.columnInternals.headerAlignment=t.alignment,this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}createFormatter(){const t=this.unit?.resolvedUnitScale
|
|
12052
|
-
return new
|
|
12053
|
-
const
|
|
12054
|
-
_i.getOrCreate().withPrefix("nimble").register(dL())
|
|
12055
|
-
const hL=class extends JF{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:YF,styles:XF})
|
|
12056
|
-
_i.getOrCreate().withPrefix("nimble").register(hL())
|
|
12057
|
-
class uL extends(GF(WF)){placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:HF,delegatedEvents:[],sortOperation:pR,validator:new _F([])}}}const pL=uL.compose({baseName:"table-column-text",template:DF,styles:EF})
|
|
12054
|
+
return new lL(Wa.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:t})}determineCellContentAlignment(){return this.alignment===XN?nR:this.alignment===JN?iR:this.format!==YN.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?nR:iR}}t([ft],uL.prototype,"format",void 0),t([ft],uL.prototype,"alignment",void 0),t([ft({attribute:"decimal-digits",converter:ut})],uL.prototype,"decimalDigits",void 0),t([ft({attribute:"decimal-maximum-digits",converter:ut})],uL.prototype,"decimalMaximumDigits",void 0),t([C],uL.prototype,"unitElements",void 0),t([C],uL.prototype,"unit",void 0)
|
|
12055
|
+
const pL=uL.compose({baseName:"table-column-number-text",template:GN,styles:EF})
|
|
12058
12056
|
_i.getOrCreate().withPrefix("nimble").register(pL())
|
|
12059
|
-
const fL=
|
|
12057
|
+
const fL=class extends eN{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:QF,styles:tN})
|
|
12058
|
+
_i.getOrCreate().withPrefix("nimble").register(fL())
|
|
12059
|
+
const mL=["invalidCustomSortWithGrouping"]
|
|
12060
|
+
class gL extends _F{constructor(){super(mL)}}class vL extends(qF(YF(KF))){constructor(){super(...arguments),this.defaultSortOperation=pR}placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:HF,delegatedEvents:[],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new gL}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.updateColumnInternalsSortConfiguration()}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.fieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}const bL=vL.compose({baseName:"table-column-text",template:DF,styles:EF})
|
|
12061
|
+
_i.getOrCreate().withPrefix("nimble").register(bL())
|
|
12062
|
+
const yL=Mt`
|
|
12060
12063
|
${zs("grid")}
|
|
12061
12064
|
|
|
12062
12065
|
:host {
|
|
@@ -12083,7 +12086,7 @@ const fL=Mt`
|
|
|
12083
12086
|
overflow: auto;
|
|
12084
12087
|
}
|
|
12085
12088
|
`
|
|
12086
|
-
const
|
|
12089
|
+
const wL=class extends us{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:us,template:(t,e)=>Q`
|
|
12087
12090
|
<template class="${t=>t.orientation}">
|
|
12088
12091
|
${le(0,e)}
|
|
12089
12092
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -12102,9 +12105,9 @@ const mL=class extends us{constructor(){super(),this.activeindicator=!1}}.compos
|
|
|
12102
12105
|
<slot name="tabpanel" ${ie("tabpanels")}></slot>
|
|
12103
12106
|
</div>
|
|
12104
12107
|
</template>
|
|
12105
|
-
`,styles:
|
|
12106
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12107
|
-
const
|
|
12108
|
+
`,styles:yL})
|
|
12109
|
+
_i.getOrCreate().withPrefix("nimble").register(wL())
|
|
12110
|
+
const xL=Mt`
|
|
12108
12111
|
${zs("flex")}
|
|
12109
12112
|
|
|
12110
12113
|
:host {
|
|
@@ -12121,15 +12124,15 @@ const gL=Mt`
|
|
|
12121
12124
|
rgba(${ol}, 0.3);
|
|
12122
12125
|
margin: ${kl} ${Sl};
|
|
12123
12126
|
}
|
|
12124
|
-
`,
|
|
12127
|
+
`,CL=Q`
|
|
12125
12128
|
<template slot="end">
|
|
12126
12129
|
<div class="separator"></div>
|
|
12127
12130
|
<slot></slot>
|
|
12128
12131
|
</template>
|
|
12129
12132
|
`
|
|
12130
|
-
const
|
|
12131
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12132
|
-
const
|
|
12133
|
+
const kL=class extends We{}.compose({baseName:"tabs-toolbar",template:CL,styles:xL})
|
|
12134
|
+
_i.getOrCreate().withPrefix("nimble").register(kL())
|
|
12135
|
+
const SL="outline",_L="block",IL=Mt`
|
|
12133
12136
|
${zs("inline-flex")}
|
|
12134
12137
|
${bg}
|
|
12135
12138
|
|
|
@@ -12268,12 +12271,12 @@ const yL="outline",wL="block",xL=Mt`
|
|
|
12268
12271
|
top: ${Sl};
|
|
12269
12272
|
right: var(--ni-private-scrollbar-width);
|
|
12270
12273
|
}
|
|
12271
|
-
`.withBehaviors(lh(
|
|
12274
|
+
`.withBehaviors(lh(SL,Mt`
|
|
12272
12275
|
.control {
|
|
12273
12276
|
border-color: rgba(${ol}, 0.3);
|
|
12274
12277
|
background-color: transparent;
|
|
12275
12278
|
}
|
|
12276
|
-
`),lh(
|
|
12279
|
+
`),lh(_L,Mt`
|
|
12277
12280
|
.control {
|
|
12278
12281
|
background-color: rgba(${ol}, 0.1);
|
|
12279
12282
|
}
|
|
@@ -12291,8 +12294,8 @@ const yL="outline",wL="block",xL=Mt`
|
|
|
12291
12294
|
border-bottom-color: ${rl};
|
|
12292
12295
|
}
|
|
12293
12296
|
`))
|
|
12294
|
-
class
|
|
12295
|
-
const
|
|
12297
|
+
class ML extends gs{constructor(){super(...arguments),this.appearance=SL,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}onTextAreaInput(){this.handleTextInput(),this.queueUpdateScrollbarWidth()}placeholderChanged(){this.queueUpdateScrollbarWidth()}valueChanged(t,e){super.valueChanged(t,e),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,b.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}t([ft],ML.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],ML.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],ML.prototype,"errorVisible",void 0),t([C],ML.prototype,"scrollbarWidth",void 0)
|
|
12298
|
+
const $L=ML.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
|
|
12296
12299
|
<label
|
|
12297
12300
|
part="label"
|
|
12298
12301
|
for="control"
|
|
@@ -12349,9 +12352,9 @@ const kL=CL.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
|
|
|
12349
12352
|
></${wm}>
|
|
12350
12353
|
${hg}
|
|
12351
12354
|
</div>
|
|
12352
|
-
`,styles:
|
|
12353
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12354
|
-
const
|
|
12355
|
+
`,styles:IL,shadowOptions:{delegatesFocus:!0}})
|
|
12356
|
+
_i.getOrCreate().withPrefix("nimble").register($L())
|
|
12357
|
+
const EL="underline",DL="outline",AL="block",TL="frameless",OL=Mt`
|
|
12355
12358
|
${zs("inline-block")}
|
|
12356
12359
|
${bg}
|
|
12357
12360
|
|
|
@@ -12526,12 +12529,12 @@ const SL="underline",_L="outline",IL="block",ML="frameless",$L=Mt`
|
|
|
12526
12529
|
slot[name='actions']::slotted(*) {
|
|
12527
12530
|
${xl.cssCustomProperty}: 24px;
|
|
12528
12531
|
}
|
|
12529
|
-
`.withBehaviors(lh(
|
|
12532
|
+
`.withBehaviors(lh(EL,Mt`
|
|
12530
12533
|
.root {
|
|
12531
12534
|
border-bottom-width: ${Ml};
|
|
12532
12535
|
padding-bottom: 0;
|
|
12533
12536
|
}
|
|
12534
|
-
`),lh(
|
|
12537
|
+
`),lh(AL,Mt`
|
|
12535
12538
|
.root {
|
|
12536
12539
|
background-color: rgba(${ol}, 0.1);
|
|
12537
12540
|
}
|
|
@@ -12559,12 +12562,12 @@ const SL="underline",_L="outline",IL="block",ML="frameless",$L=Mt`
|
|
|
12559
12562
|
:host([disabled]) .root {
|
|
12560
12563
|
background-color: rgba(${ol}, 0.07);
|
|
12561
12564
|
}
|
|
12562
|
-
`),lh(
|
|
12565
|
+
`),lh(DL,Mt`
|
|
12563
12566
|
.root {
|
|
12564
12567
|
border-width: ${Ml};
|
|
12565
12568
|
padding: 0;
|
|
12566
12569
|
}
|
|
12567
|
-
`),lh(
|
|
12570
|
+
`),lh(TL,Mt`
|
|
12568
12571
|
.control {
|
|
12569
12572
|
padding-left: ${Ml};
|
|
12570
12573
|
padding-right: ${Ml};
|
|
@@ -12582,8 +12585,8 @@ const SL="underline",_L="outline",IL="block",ML="frameless",$L=Mt`
|
|
|
12582
12585
|
filter: invert(100%);
|
|
12583
12586
|
}
|
|
12584
12587
|
`))
|
|
12585
|
-
class
|
|
12586
|
-
const
|
|
12588
|
+
class RL extends ji{constructor(){super(...arguments),this.appearance=EL,this.errorVisible=!1,this.fullBleed=!1}}t([ft],RL.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],RL.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],RL.prototype,"errorVisible",void 0),t([ft({attribute:"full-bleed",mode:"boolean"})],RL.prototype,"fullBleed",void 0)
|
|
12589
|
+
const FL=RL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
|
|
12587
12590
|
<template
|
|
12588
12591
|
class="
|
|
12589
12592
|
${t=>t.readOnly?"readonly":""}
|
|
@@ -12643,7 +12646,7 @@ const DL=EL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
|
|
|
12643
12646
|
${ae(0,e)}
|
|
12644
12647
|
</div>
|
|
12645
12648
|
</template>
|
|
12646
|
-
`,styles
|
|
12649
|
+
`,styles:OL,shadowOptions:{delegatesFocus:!0},end:Q`
|
|
12647
12650
|
<${wm}
|
|
12648
12651
|
severity="error"
|
|
12649
12652
|
class="error-icon"
|
|
@@ -12653,8 +12656,8 @@ const DL=EL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
|
|
|
12653
12656
|
</span>
|
|
12654
12657
|
${hg}
|
|
12655
12658
|
`})
|
|
12656
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12657
|
-
const
|
|
12659
|
+
_i.getOrCreate().withPrefix("nimble").register(FL())
|
|
12660
|
+
const NL=Mt`
|
|
12658
12661
|
${zs("inline-flex")}
|
|
12659
12662
|
|
|
12660
12663
|
:host {
|
|
@@ -12738,7 +12741,7 @@ const AL=Mt`
|
|
|
12738
12741
|
.status-icon {
|
|
12739
12742
|
opacity: 0.6;
|
|
12740
12743
|
}
|
|
12741
|
-
`)),
|
|
12744
|
+
`)),LL=Q`
|
|
12742
12745
|
${Gt((t=>t.tooltipVisible),Q`
|
|
12743
12746
|
<${Th}
|
|
12744
12747
|
class="anchored-region"
|
|
@@ -12771,11 +12774,11 @@ const AL=Mt`
|
|
|
12771
12774
|
</${Th}>
|
|
12772
12775
|
`)}
|
|
12773
12776
|
`
|
|
12774
|
-
class
|
|
12775
|
-
const
|
|
12776
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12777
|
-
const
|
|
12778
|
-
class
|
|
12777
|
+
class BL extends Rs{constructor(){super(...arguments),this.iconVisible=!1}}t([ft],BL.prototype,"severity",void 0),t([ft({attribute:"icon-visible",mode:"boolean"})],BL.prototype,"iconVisible",void 0)
|
|
12778
|
+
const PL=BL.compose({baseName:"tooltip",baseClass:Rs,template:LL,styles:NL})
|
|
12779
|
+
_i.getOrCreate().withPrefix("nimble").register(PL())
|
|
12780
|
+
const zL="group-selected",VL="all",HL="leaves-only",UL="none"
|
|
12781
|
+
class qL{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=null}handleChange({target:t,token:e}){this.attach(e.getValueFor(t))}attach(t){this.attached!==this[t]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[t],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const jL=Mt`
|
|
12779
12782
|
${zs("block")}
|
|
12780
12783
|
|
|
12781
12784
|
:host {
|
|
@@ -12796,7 +12799,7 @@ class PL{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12796
12799
|
}
|
|
12797
12800
|
|
|
12798
12801
|
${""}
|
|
12799
|
-
:host([${
|
|
12802
|
+
:host([${zL}])::after {
|
|
12800
12803
|
background: ${dl};
|
|
12801
12804
|
border-radius: 0px;
|
|
12802
12805
|
content: '';
|
|
@@ -12817,7 +12820,7 @@ class PL{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12817
12820
|
background: ${il};
|
|
12818
12821
|
}
|
|
12819
12822
|
|
|
12820
|
-
:host([${
|
|
12823
|
+
:host([${zL}]) .positioning-region:hover {
|
|
12821
12824
|
background: ${nl};
|
|
12822
12825
|
}
|
|
12823
12826
|
|
|
@@ -12923,7 +12926,7 @@ class PL{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12923
12926
|
display: block;
|
|
12924
12927
|
}
|
|
12925
12928
|
`.withBehaviors(new class{constructor(t,e){this.cache=new WeakMap,this.ltr=t,this.rtl=e}bind(t){this.attach(t)}unbind(t){const e=this.cache.get(t)
|
|
12926
|
-
e&&Ga.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new
|
|
12929
|
+
e&&Ga.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new qL(this.ltr,this.rtl,t),n=Ga.getValueFor(t)
|
|
12927
12930
|
Ga.subscribe(e),e.attach(n),this.cache.set(t,e)}}(Mt`
|
|
12928
12931
|
.expand-collapse-button {
|
|
12929
12932
|
left: var(
|
|
@@ -12955,8 +12958,8 @@ Ga.subscribe(e),e.attach(n),this.cache.set(t,e)}}(Mt`
|
|
|
12955
12958
|
transform: rotate(135deg);
|
|
12956
12959
|
}
|
|
12957
12960
|
`))
|
|
12958
|
-
class
|
|
12959
|
-
const
|
|
12961
|
+
class WL extends Ns{constructor(){super(...arguments),this.groupSelected=!1}}t([ft({attribute:"group-selected",mode:"boolean"})],WL.prototype,"groupSelected",void 0)
|
|
12962
|
+
const GL=WL.compose({baseName:"tree-item",baseClass:Ns,template:(t,e)=>Q`
|
|
12960
12963
|
<template
|
|
12961
12964
|
role="treeitem"
|
|
12962
12965
|
slot="${t=>t.isNestedItem()?"item":void 0}"
|
|
@@ -12996,9 +12999,9 @@ const HL=VL.compose({baseName:"tree-item",baseClass:Ns,template:(t,e)=>Q`
|
|
|
12996
12999
|
</div>
|
|
12997
13000
|
`)}
|
|
12998
13001
|
</template>
|
|
12999
|
-
`,styles:
|
|
13000
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
13001
|
-
const
|
|
13002
|
+
`,styles:jL,expandCollapseGlyph:Zh.data})
|
|
13003
|
+
_i.getOrCreate().withPrefix("nimble").register(GL())
|
|
13004
|
+
const ZL=Mt`
|
|
13002
13005
|
${zs("flex")}
|
|
13003
13006
|
|
|
13004
13007
|
:host {
|
|
@@ -13010,7 +13013,7 @@ const UL=Mt`
|
|
|
13010
13013
|
:host(${Vs}) {
|
|
13011
13014
|
outline: none;
|
|
13012
13015
|
}
|
|
13013
|
-
`,
|
|
13016
|
+
`,KL=Q`
|
|
13014
13017
|
<template
|
|
13015
13018
|
role="tree"
|
|
13016
13019
|
${Ut("treeView")}
|
|
@@ -13024,248 +13027,248 @@ const UL=Mt`
|
|
|
13024
13027
|
<slot ${ie("slottedTreeItems")}></slot>
|
|
13025
13028
|
</template>
|
|
13026
13029
|
`
|
|
13027
|
-
class
|
|
13030
|
+
class YL extends Ls{constructor(){super(...arguments),this.selectionMode=VL,this.selectedItems=[]}handleClick(t){if(t.defaultPrevented)return!1
|
|
13028
13031
|
if(!(t.target instanceof Element&&Fs(t.target)))return!0
|
|
13029
13032
|
const e=t.target
|
|
13030
|
-
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case
|
|
13031
|
-
case
|
|
13032
|
-
case
|
|
13033
|
-
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const t of Array.from(this.children))t instanceof
|
|
13033
|
+
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case VL:return!0
|
|
13034
|
+
case UL:return!1
|
|
13035
|
+
case HL:return!this.itemHasChildren(t)
|
|
13036
|
+
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const t of Array.from(this.children))t instanceof WL&&(t.groupSelected=!1)
|
|
13034
13037
|
for(let t of this.selectedItems){for(;null!==t.parentElement&&t.parentElement!==this;)t=t.parentElement
|
|
13035
|
-
t instanceof
|
|
13036
|
-
const
|
|
13037
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
13038
|
-
const
|
|
13039
|
-
class
|
|
13040
|
-
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new
|
|
13038
|
+
t instanceof WL&&(t.groupSelected=!0)}}}t([ft({attribute:"selection-mode"})],YL.prototype,"selectionMode",void 0),t([C],YL.prototype,"selectedItems",void 0)
|
|
13039
|
+
const XL=YL.compose({baseName:"tree-view",baseClass:Ls,template:KL,styles:ZL})
|
|
13040
|
+
_i.getOrCreate().withPrefix("nimble").register(XL())
|
|
13041
|
+
const JL=Q`<template slot="unit"></template>`
|
|
13042
|
+
class QL{constructor(t,e,n){this.singular=t,this.plural=e,this.symbol=n}}class tB extends tL{constructor(t,{unitTranslations:e,scaledPrefixText:n}){if(super(t),!e.get("en"))throw new Error('English translations must exist with locale string "en"')
|
|
13043
|
+
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new tB(e,t)}format(t){const e=this.formatter.format(t)
|
|
13041
13044
|
if(""!==this.scaledPrefixText)return`${e} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
|
|
13042
13045
|
return`${e} ${"one"===this.pluralRules.select(t)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(t,e){const n=new Intl.Locale(e??"en"),i=n.language,s=n.region
|
|
13043
|
-
return(s?t.get(`${i}-${s}`):void 0)??t.get(i)??t.get("en")}}const
|
|
13044
|
-
const
|
|
13045
|
-
const
|
|
13046
|
+
return(s?t.get(`${i}-${s}`):void 0)??t.get(i)??t.get("en")}}const eB=new Map([["en",new QL("byte","bytes","B")],["fr",new QL("octet","octets","o")],["de",new QL("Byte","Byte","B")],["ja",new QL("バイト","バイト","B")],["zh",new QL("字节","字节","B")]]),nB=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
|
|
13047
|
+
const iB=new class extends iL{constructor(){super(nB.map((([t,e])=>new nL(t,tB.createFactory({unitTranslations:eB,scaledPrefixText:e})))))}},sB=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
|
|
13048
|
+
const oB=new class extends iL{constructor(){super(sB.map((([t,e,n])=>new nL(t,eL.createFactory({style:"unit",unit:e,unitDisplay:n})))))}},rB=Mt`
|
|
13046
13049
|
${zs("none")}
|
|
13047
13050
|
`
|
|
13048
|
-
class
|
|
13049
|
-
const
|
|
13050
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
13051
|
-
const
|
|
13052
|
-
const
|
|
13053
|
-
const
|
|
13054
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
13055
|
-
var
|
|
13056
|
-
function
|
|
13057
|
-
i[t]=[]}return new
|
|
13058
|
-
break}return null!=n&&t.push({name:e,value:n}),t}
|
|
13051
|
+
class aB extends hL{constructor(){super(),this.binary=!1,this.resolvedUnitScale=oB}binaryChanged(){this.resolvedUnitScale=this.binary?iB:oB}}t([ft({mode:"boolean"})],aB.prototype,"binary",void 0)
|
|
13052
|
+
const lB=aB.compose({baseName:"unit-byte",template:JL,styles:rB})
|
|
13053
|
+
_i.getOrCreate().withPrefix("nimble").register(lB())
|
|
13054
|
+
const cB=[[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"]],dB=new Map([["en",new QL("volt","volts","V")],["fr",new QL("volt","volts","V")],["de",new QL("Volt","Volt","V")],["ja",new QL("ボルト","ボルト","V")],["zh",new QL("伏特","伏特","V")]])
|
|
13055
|
+
const hB=new class extends iL{constructor(){super(cB.map((([t,e])=>new nL(t,tB.createFactory({unitTranslations:dB,scaledPrefixText:e})))))}}
|
|
13056
|
+
const uB=class extends hL{constructor(){super(),this.resolvedUnitScale=hB}}.compose({baseName:"unit-volt",template:JL,styles:rB})
|
|
13057
|
+
_i.getOrCreate().withPrefix("nimble").register(uB())
|
|
13058
|
+
var pB={value:()=>{}}
|
|
13059
|
+
function fB(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t)
|
|
13060
|
+
i[t]=[]}return new mB(i)}function mB(t){this._=t}function gB(t,e){for(var n,i=0,s=t.length;i<s;++i)if((n=t[i]).name===e)return n.value}function vB(t,e,n){for(var i=0,s=t.length;i<s;++i)if(t[i].name===e){t[i]=pB,t=t.slice(0,i).concat(t.slice(i+1))
|
|
13061
|
+
break}return null!=n&&t.push({name:e,value:n}),t}mB.prototype=fB.prototype={constructor:mB,on:function(t,e){var n,i,s=this._,o=(i=s,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
|
|
13059
13062
|
if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
13060
13063
|
return{type:t,name:e}}))),r=-1,a=o.length
|
|
13061
13064
|
if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e)
|
|
13062
|
-
for(;++r<a;)if(n=(t=o[r]).type)s[n]=
|
|
13063
|
-
else if(null==e)for(n in s)s[n]=
|
|
13064
|
-
return this}for(;++r<a;)if((n=(t=o[r]).type)&&(n=
|
|
13065
|
+
for(;++r<a;)if(n=(t=o[r]).type)s[n]=vB(s[n],t.name,e)
|
|
13066
|
+
else if(null==e)for(n in s)s[n]=vB(s[n],t.name,null)
|
|
13067
|
+
return this}for(;++r<a;)if((n=(t=o[r]).type)&&(n=gB(s[n],t.name)))return n},copy:function(){var t={},e=this._
|
|
13065
13068
|
for(var n in e)t[n]=e[n].slice()
|
|
13066
|
-
return new
|
|
13069
|
+
return new mB(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,s=new Array(n),o=0;o<n;++o)s[o]=arguments[o+2]
|
|
13067
13070
|
if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
13068
13071
|
for(o=0,n=(i=this._[t]).length;o<n;++o)i[o].value.apply(e,s)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
13069
13072
|
for(var i=this._[t],s=0,o=i.length;s<o;++s)i[s].value.apply(e,n)}}
|
|
13070
|
-
var
|
|
13071
|
-
function
|
|
13072
|
-
return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),
|
|
13073
|
-
return n===
|
|
13074
|
-
return(e.local?
|
|
13075
|
-
var e}}function
|
|
13076
|
-
function
|
|
13077
|
-
function
|
|
13078
|
-
for(;a<l;++a)(r=e[a])&&(s[a]=r)}function
|
|
13073
|
+
var bB="http://www.w3.org/1999/xhtml",yB={svg:"http://www.w3.org/2000/svg",xhtml:bB,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
13074
|
+
function wB(t){var e=t+="",n=e.indexOf(":")
|
|
13075
|
+
return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),yB.hasOwnProperty(e)?{space:yB[e],local:t}:t}function xB(t){return function(){var e=this.ownerDocument,n=this.namespaceURI
|
|
13076
|
+
return n===bB&&e.documentElement.namespaceURI===bB?e.createElement(t):e.createElementNS(n,t)}}function CB(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kB(t){var e=wB(t)
|
|
13077
|
+
return(e.local?CB:xB)(e)}function SB(){}function _B(t){return null==t?SB:function(){return this.querySelector(t)}}function IB(){return[]}function MB(t){return null==t?IB:function(){return this.querySelectorAll(t)}}function $B(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e)
|
|
13078
|
+
var e}}function EB(t){return function(){return this.matches(t)}}function DB(t){return function(e){return e.matches(t)}}var AB=Array.prototype.find
|
|
13079
|
+
function TB(){return this.firstElementChild}var OB=Array.prototype.filter
|
|
13080
|
+
function RB(){return Array.from(this.children)}function FB(t){return new Array(t.length)}function NB(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function LB(t,e,n,i,s,o){for(var r,a=0,l=e.length,c=o.length;a<c;++a)(r=e[a])?(r.__data__=o[a],i[a]=r):n[a]=new NB(t,o[a])
|
|
13081
|
+
for(;a<l;++a)(r=e[a])&&(s[a]=r)}function BB(t,e,n,i,s,o,r){var a,l,c,d=new Map,h=e.length,u=o.length,p=new Array(h)
|
|
13079
13082
|
for(a=0;a<h;++a)(l=e[a])&&(p[a]=c=r.call(l,l.__data__,a,e)+"",d.has(c)?s[a]=l:d.set(c,l))
|
|
13080
|
-
for(a=0;a<u;++a)c=r.call(t,o[a],a,o)+"",(l=d.get(c))?(i[a]=l,l.__data__=o[a],d.delete(c)):n[a]=new
|
|
13081
|
-
for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(s[a]=l)}function
|
|
13082
|
-
null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function
|
|
13083
|
-
null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function
|
|
13084
|
-
null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function
|
|
13085
|
-
null==n?delete this[t]:this[t]=n}}function
|
|
13086
|
-
this.textContent=null==e?"":e}}function
|
|
13087
|
-
this.innerHTML=null==e?"":e}}function
|
|
13088
|
-
t&&t.removeChild(this)}function
|
|
13089
|
-
return e?e.insertBefore(t,this.nextSibling):t}function
|
|
13090
|
-
return e?e.insertBefore(t,this.nextSibling):t}function
|
|
13091
|
-
if(e){for(var n,i=0,s=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++s]=n:this.removeEventListener(n.type,n.listener,n.options);++s?e.length=s:delete this.__on}}}function
|
|
13083
|
+
for(a=0;a<u;++a)c=r.call(t,o[a],a,o)+"",(l=d.get(c))?(i[a]=l,l.__data__=o[a],d.delete(c)):n[a]=new NB(t,o[a])
|
|
13084
|
+
for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(s[a]=l)}function PB(t){return t.__data__}function zB(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function VB(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function HB(t){return function(){this.removeAttribute(t)}}function UB(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qB(t,e){return function(){this.setAttribute(t,e)}}function jB(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function WB(t,e){return function(){var n=e.apply(this,arguments)
|
|
13085
|
+
null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function GB(t,e){return function(){var n=e.apply(this,arguments)
|
|
13086
|
+
null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function ZB(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function KB(t){return function(){this.style.removeProperty(t)}}function YB(t,e,n){return function(){this.style.setProperty(t,e,n)}}function XB(t,e,n){return function(){var i=e.apply(this,arguments)
|
|
13087
|
+
null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function JB(t,e){return t.style.getPropertyValue(e)||ZB(t).getComputedStyle(t,null).getPropertyValue(e)}function QB(t){return function(){delete this[t]}}function tP(t,e){return function(){this[t]=e}}function eP(t,e){return function(){var n=e.apply(this,arguments)
|
|
13088
|
+
null==n?delete this[t]:this[t]=n}}function nP(t){return t.trim().split(/^|\s+/)}function iP(t){return t.classList||new sP(t)}function sP(t){this._node=t,this._names=nP(t.getAttribute("class")||"")}function oP(t,e){for(var n=iP(t),i=-1,s=e.length;++i<s;)n.add(e[i])}function rP(t,e){for(var n=iP(t),i=-1,s=e.length;++i<s;)n.remove(e[i])}function aP(t){return function(){oP(this,t)}}function lP(t){return function(){rP(this,t)}}function cP(t,e){return function(){(e.apply(this,arguments)?oP:rP)(this,t)}}function dP(){this.textContent=""}function hP(t){return function(){this.textContent=t}}function uP(t){return function(){var e=t.apply(this,arguments)
|
|
13089
|
+
this.textContent=null==e?"":e}}function pP(){this.innerHTML=""}function fP(t){return function(){this.innerHTML=t}}function mP(t){return function(){var e=t.apply(this,arguments)
|
|
13090
|
+
this.innerHTML=null==e?"":e}}function gP(){this.nextSibling&&this.parentNode.appendChild(this)}function vP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bP(){return null}function yP(){var t=this.parentNode
|
|
13091
|
+
t&&t.removeChild(this)}function wP(){var t=this.cloneNode(!1),e=this.parentNode
|
|
13092
|
+
return e?e.insertBefore(t,this.nextSibling):t}function xP(){var t=this.cloneNode(!0),e=this.parentNode
|
|
13093
|
+
return e?e.insertBefore(t,this.nextSibling):t}function CP(t){return function(){var e=this.__on
|
|
13094
|
+
if(e){for(var n,i=0,s=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++s]=n:this.removeEventListener(n.type,n.listener,n.options);++s?e.length=s:delete this.__on}}}function kP(t,e,n){return function(){var i,s=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e)
|
|
13092
13095
|
if(s)for(var r=0,a=s.length;r<a;++r)if((i=s[r]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),void(i.value=e)
|
|
13093
|
-
this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},s?s.push(i):this.__on=[i]}}function
|
|
13094
|
-
"function"==typeof s?s=new s(e,n):(s=i.document.createEvent("Event"),n?(s.initEvent(e,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function
|
|
13096
|
+
this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},s?s.push(i):this.__on=[i]}}function SP(t,e,n){var i=ZB(t),s=i.CustomEvent
|
|
13097
|
+
"function"==typeof s?s=new s(e,n):(s=i.document.createEvent("Event"),n?(s.initEvent(e,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function _P(t,e){return function(){return SP(this,t,e)}}function IP(t,e){return function(){return SP(this,t,e.apply(this,arguments))}}NB.prototype={constructor:NB,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},sP.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t)
|
|
13095
13098
|
e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}}
|
|
13096
|
-
var
|
|
13097
|
-
function
|
|
13099
|
+
var MP=[null]
|
|
13100
|
+
function $P(t,e){this._groups=t,this._parents=e}function EP(){return new $P([[document.documentElement]],MP)}function DP(t){return"string"==typeof t?new $P([[document.querySelector(t)]],[document.documentElement]):new $P([[t]],MP)}function AP(t,e){if(t=function(t){let e
|
|
13098
13101
|
for(;e=t.sourceEvent;)t=e
|
|
13099
13102
|
return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e
|
|
13100
13103
|
if(n.createSVGPoint){var i=n.createSVGPoint()
|
|
13101
13104
|
return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var s=e.getBoundingClientRect()
|
|
13102
|
-
return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}}return[t.pageX,t.pageY]}
|
|
13105
|
+
return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}}return[t.pageX,t.pageY]}$P.prototype=EP.prototype={constructor:$P,select:function(t){"function"!=typeof t&&(t=_B(t))
|
|
13103
13106
|
for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r,a=e[s],l=a.length,c=i[s]=new Array(l),d=0;d<l;++d)(o=a[d])&&(r=t.call(o,o.__data__,d,a))&&("__data__"in o&&(r.__data__=o.__data__),c[d]=r)
|
|
13104
|
-
return new
|
|
13107
|
+
return new $P(i,this._parents)},selectAll:function(t){t="function"==typeof t?$B(t):MB(t)
|
|
13105
13108
|
for(var e=this._groups,n=e.length,i=[],s=[],o=0;o<n;++o)for(var r,a=e[o],l=a.length,c=0;c<l;++c)(r=a[c])&&(i.push(t.call(r,r.__data__,c,a)),s.push(r))
|
|
13106
|
-
return new
|
|
13109
|
+
return new $P(i,s)},selectChild:function(t){return this.select(null==t?TB:function(t){return function(){return AB.call(this.children,t)}}("function"==typeof t?t:DB(t)))},selectChildren:function(t){return this.selectAll(null==t?RB:function(t){return function(){return OB.call(this.children,t)}}("function"==typeof t?t:DB(t)))},filter:function(t){"function"!=typeof t&&(t=EB(t))
|
|
13107
13110
|
for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r=e[s],a=r.length,l=i[s]=[],c=0;c<a;++c)(o=r[c])&&t.call(o,o.__data__,c,r)&&l.push(o)
|
|
13108
|
-
return new
|
|
13109
|
-
var n,i=e?
|
|
13111
|
+
return new $P(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,PB)
|
|
13112
|
+
var n,i=e?BB:LB,s=this._parents,o=this._groups
|
|
13110
13113
|
"function"!=typeof t&&(n=t,t=function(){return n})
|
|
13111
|
-
for(var r=o.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=s[d],u=o[d],p=u.length,f=
|
|
13114
|
+
for(var r=o.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=s[d],u=o[d],p=u.length,f=zB(t.call(h,h&&h.__data__,d,s)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
|
|
13112
13115
|
i(h,u,g,v,c[d]=new Array(p),f,e)
|
|
13113
|
-
for(var b,y,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(y=v[x])&&++x<m;);b._next=y||null}}return(a=new
|
|
13116
|
+
for(var b,y,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(y=v[x])&&++x<m;);b._next=y||null}}return(a=new $P(a,s))._enter=l,a._exit=c,a},enter:function(){return new $P(this._enter||this._groups.map(FB),this._parents)},exit:function(){return new $P(this._exit||this._groups.map(FB),this._parents)},join:function(t,e,n){var i=this.enter(),s=this,o=this.exit()
|
|
13114
13117
|
return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(s=e(s))&&(s=s.selection()),null==n?o.remove():n(o),i&&s?i.merge(s).order():s},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,s=n.length,o=i.length,r=Math.min(s,o),a=new Array(s),l=0;l<r;++l)for(var c,d=n[l],h=i[l],u=d.length,p=a[l]=new Array(u),f=0;f<u;++f)(c=d[f]||h[f])&&(p[f]=c)
|
|
13115
13118
|
for(;l<s;++l)a[l]=n[l]
|
|
13116
|
-
return new
|
|
13117
|
-
return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=
|
|
13119
|
+
return new $P(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,s=t[e],o=s.length-1,r=s[o];--o>=0;)(i=s[o])&&(r&&4^i.compareDocumentPosition(r)&&r.parentNode.insertBefore(i,r),r=i)
|
|
13120
|
+
return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=VB)
|
|
13118
13121
|
for(var n=this._groups,i=n.length,s=new Array(i),o=0;o<i;++o){for(var r,a=n[o],l=a.length,c=s[o]=new Array(l),d=0;d<l;++d)(r=a[d])&&(c[d]=r)
|
|
13119
|
-
c.sort(e)}return new
|
|
13122
|
+
c.sort(e)}return new $P(s,this._parents).order()},call:function(){var t=arguments[0]
|
|
13120
13123
|
return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],s=0,o=i.length;s<o;++s){var r=i[s]
|
|
13121
13124
|
if(r)return r}return null},size:function(){let t=0
|
|
13122
13125
|
for(const e of this)++t
|
|
13123
13126
|
return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var s,o=e[n],r=0,a=o.length;r<a;++r)(s=o[r])&&t.call(s,s.__data__,r,o)
|
|
13124
|
-
return this},attr:function(t,e){var n=
|
|
13127
|
+
return this},attr:function(t,e){var n=wB(t)
|
|
13125
13128
|
if(arguments.length<2){var i=this.node()
|
|
13126
|
-
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?
|
|
13127
|
-
if(arguments.length<2){for(var i=
|
|
13128
|
-
return!0}return this.each(("function"==typeof e?
|
|
13129
|
-
return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:
|
|
13130
|
-
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
13129
|
+
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?UB:HB:"function"==typeof e?n.local?GB:WB:n.local?jB:qB)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?KB:"function"==typeof e?XB:YB)(t,e,null==n?"":n)):JB(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?QB:"function"==typeof e?eP:tP)(t,e)):this.node()[t]},classed:function(t,e){var n=nP(t+"")
|
|
13130
|
+
if(arguments.length<2){for(var i=iP(this.node()),s=-1,o=n.length;++s<o;)if(!i.contains(n[s]))return!1
|
|
13131
|
+
return!0}return this.each(("function"==typeof e?cP:e?aP:lP)(n,e))},text:function(t){return arguments.length?this.each(null==t?dP:("function"==typeof t?uP:hP)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?pP:("function"==typeof t?mP:fP)(t)):this.node().innerHTML},raise:function(){return this.each(gP)},lower:function(){return this.each(vP)},append:function(t){var e="function"==typeof t?t:kB(t)
|
|
13132
|
+
return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:kB(t),i=null==e?bP:"function"==typeof e?e:_B(e)
|
|
13133
|
+
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(yP)},clone:function(t){return this.select(t?xP:wP)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,s,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
|
|
13131
13134
|
return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),r=o.length
|
|
13132
|
-
if(!(arguments.length<2)){for(a=e?
|
|
13135
|
+
if(!(arguments.length<2)){for(a=e?kP:CP,i=0;i<r;++i)this.each(a(o[i],e,n))
|
|
13133
13136
|
return this}var a=this.node().__on
|
|
13134
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((s=o[i]).type===l.type&&s.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?
|
|
13135
|
-
const
|
|
13136
|
-
function
|
|
13137
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((s=o[i]).type===l.type&&s.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?IP:_P)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,s=t[e],o=0,r=s.length;o<r;++o)(i=s[o])&&(yield i)}}
|
|
13138
|
+
const TP={capture:!0,passive:!1}
|
|
13139
|
+
function OP(t){t.preventDefault(),t.stopImmediatePropagation()}function RP(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function FP(t,e){var n=Object.create(t.prototype)
|
|
13137
13140
|
for(var i in e)n[i]=e[i]
|
|
13138
|
-
return n}function
|
|
13139
|
-
function
|
|
13140
|
-
return t=(t+"").trim().toLowerCase(),(e=
|
|
13141
|
-
var s}function
|
|
13142
|
-
return`${1===t?"rgb(":"rgba("}${
|
|
13143
|
-
if(t instanceof
|
|
13144
|
-
if(t instanceof
|
|
13141
|
+
return n}function NP(){}var LP=.7,BP=1/LP,PP="\\s*([+-]?\\d+)\\s*",zP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",VP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",HP=/^#([0-9a-f]{3,8})$/,UP=new RegExp(`^rgb\\(${PP},${PP},${PP}\\)$`),qP=new RegExp(`^rgb\\(${VP},${VP},${VP}\\)$`),jP=new RegExp(`^rgba\\(${PP},${PP},${PP},${zP}\\)$`),WP=new RegExp(`^rgba\\(${VP},${VP},${VP},${zP}\\)$`),GP=new RegExp(`^hsl\\(${zP},${VP},${VP}\\)$`),ZP=new RegExp(`^hsla\\(${zP},${VP},${VP},${zP}\\)$`),KP={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}
|
|
13142
|
+
function YP(){return this.rgb().formatHex()}function XP(){return this.rgb().formatRgb()}function JP(t){var e,n
|
|
13143
|
+
return t=(t+"").trim().toLowerCase(),(e=HP.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?QP(e):3===n?new nz(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?tz(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?tz(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=UP.exec(t))?new nz(e[1],e[2],e[3],1):(e=qP.exec(t))?new nz(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=jP.exec(t))?tz(e[1],e[2],e[3],e[4]):(e=WP.exec(t))?tz(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=GP.exec(t))?lz(e[1],e[2]/100,e[3]/100,1):(e=ZP.exec(t))?lz(e[1],e[2]/100,e[3]/100,e[4]):KP.hasOwnProperty(t)?QP(KP[t]):"transparent"===t?new nz(NaN,NaN,NaN,0):null}function QP(t){return new nz(t>>16&255,t>>8&255,255&t,1)}function tz(t,e,n,i){return i<=0&&(t=e=n=NaN),new nz(t,e,n,i)}function ez(t,e,n,i){return 1===arguments.length?((s=t)instanceof NP||(s=JP(s)),s?new nz((s=s.rgb()).r,s.g,s.b,s.opacity):new nz):new nz(t,e,n,null==i?1:i)
|
|
13144
|
+
var s}function nz(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function iz(){return`#${az(this.r)}${az(this.g)}${az(this.b)}`}function sz(){const t=oz(this.opacity)
|
|
13145
|
+
return`${1===t?"rgb(":"rgba("}${rz(this.r)}, ${rz(this.g)}, ${rz(this.b)}${1===t?")":`, ${t})`}`}function oz(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function rz(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function az(t){return((t=rz(t))<16?"0":"")+t.toString(16)}function lz(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new dz(t,e,n,i)}function cz(t){if(t instanceof dz)return new dz(t.h,t.s,t.l,t.opacity)
|
|
13146
|
+
if(t instanceof NP||(t=JP(t)),!t)return new dz
|
|
13147
|
+
if(t instanceof dz)return t
|
|
13145
13148
|
var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,s=Math.min(e,n,i),o=Math.max(e,n,i),r=NaN,a=o-s,l=(o+s)/2
|
|
13146
|
-
return a?(r=e===o?(n-i)/a+6*(n<i):n===o?(i-e)/a+2:(e-n)/a+4,a/=l<.5?o+s:2-o-s,r*=60):a=l>0&&l<1?0:r,new
|
|
13147
|
-
return new
|
|
13148
|
-
return`${1===t?"hsl(":"hsla("}${
|
|
13149
|
-
var
|
|
13150
|
-
function
|
|
13151
|
-
return n?function(t,e){return function(n){return t+n*e}}(t,n):
|
|
13152
|
-
function i(t,e){var i=n((t=
|
|
13149
|
+
return a?(r=e===o?(n-i)/a+6*(n<i):n===o?(i-e)/a+2:(e-n)/a+4,a/=l<.5?o+s:2-o-s,r*=60):a=l>0&&l<1?0:r,new dz(r,a,l,t.opacity)}function dz(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function hz(t){return(t=(t||0)%360)<0?t+360:t}function uz(t){return Math.max(0,Math.min(1,t||0))}function pz(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}RP(NP,JP,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:YP,formatHex:YP,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return cz(this).formatHsl()},formatRgb:XP,toString:XP}),RP(nz,ez,FP(NP,{brighter(t){return t=null==t?BP:Math.pow(BP,t),new nz(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?LP:Math.pow(LP,t),new nz(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new nz(rz(this.r),rz(this.g),rz(this.b),oz(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:iz,formatHex:iz,formatHex8:function(){return`#${az(this.r)}${az(this.g)}${az(this.b)}${az(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:sz,toString:sz})),RP(dz,(function(t,e,n,i){return 1===arguments.length?cz(t):new dz(t,e,n,null==i?1:i)}),FP(NP,{brighter(t){return t=null==t?BP:Math.pow(BP,t),new dz(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?LP:Math.pow(LP,t),new dz(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,s=2*n-i
|
|
13150
|
+
return new nz(pz(t>=240?t-240:t+120,s,i),pz(t,s,i),pz(t<120?t+240:t-120,s,i),this.opacity)},clamp(){return new dz(hz(this.h),uz(this.s),uz(this.l),oz(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=oz(this.opacity)
|
|
13151
|
+
return`${1===t?"hsl(":"hsla("}${hz(this.h)}, ${100*uz(this.s)}%, ${100*uz(this.l)}%${1===t?")":`, ${t})`}`}}))
|
|
13152
|
+
var fz=t=>()=>t
|
|
13153
|
+
function mz(t){return 1==(t=+t)?gz:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):fz(isNaN(e)?n:e)}}function gz(t,e){var n=e-t
|
|
13154
|
+
return n?function(t,e){return function(n){return t+n*e}}(t,n):fz(isNaN(t)?e:t)}var vz=function t(e){var n=mz(e)
|
|
13155
|
+
function i(t,e){var i=n((t=ez(t)).r,(e=ez(e)).r),s=n(t.g,e.g),o=n(t.b,e.b),r=gz(t.opacity,e.opacity)
|
|
13153
13156
|
return function(e){return t.r=i(e),t.g=s(e),t.b=o(e),t.opacity=r(e),t+""}}return i.gamma=t,i}(1)
|
|
13154
|
-
function
|
|
13157
|
+
function bz(t,e){e||(e=[])
|
|
13155
13158
|
var n,i=t?Math.min(e.length,t.length):0,s=e.slice()
|
|
13156
13159
|
return function(o){for(n=0;n<i;++n)s[n]=t[n]*(1-o)+e[n]*o
|
|
13157
|
-
return s}}function
|
|
13158
|
-
for(n=0;n<s;++n)o[n]=
|
|
13160
|
+
return s}}function yz(t,e){var n,i=e?e.length:0,s=t?Math.min(i,t.length):0,o=new Array(s),r=new Array(i)
|
|
13161
|
+
for(n=0;n<s;++n)o[n]=Iz(t[n],e[n])
|
|
13159
13162
|
for(;n<i;++n)r[n]=e[n]
|
|
13160
13163
|
return function(t){for(n=0;n<s;++n)r[n]=o[n](t)
|
|
13161
|
-
return r}}function
|
|
13162
|
-
return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function
|
|
13163
|
-
for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=
|
|
13164
|
+
return r}}function wz(t,e){var n=new Date
|
|
13165
|
+
return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function xz(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cz(t,e){var n,i={},s={}
|
|
13166
|
+
for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=Iz(t[n],e[n]):s[n]=e[n]
|
|
13164
13167
|
return function(t){for(n in i)s[n]=i[n](t)
|
|
13165
|
-
return s}}var
|
|
13166
|
-
function
|
|
13167
|
-
for(t+="",e+="";(n=
|
|
13168
|
+
return s}}var kz=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sz=new RegExp(kz.source,"g")
|
|
13169
|
+
function _z(t,e){var n,i,s,o=kz.lastIndex=Sz.lastIndex=0,r=-1,a=[],l=[]
|
|
13170
|
+
for(t+="",e+="";(n=kz.exec(t))&&(i=Sz.exec(e));)(s=i.index)>o&&(s=e.slice(o,s),a[r]?a[r]+=s:a[++r]=s),(n=n[0])===(i=i[0])?a[r]?a[r]+=i:a[++r]=i:(a[++r]=null,l.push({i:r,x:xz(n,i)})),o=Sz.lastIndex
|
|
13168
13171
|
return o<e.length&&(s=e.slice(o),a[r]?a[r]+=s:a[++r]=s),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t)
|
|
13169
|
-
return a.join("")})}function
|
|
13170
|
-
return null==e||"boolean"===s?
|
|
13171
|
-
function
|
|
13172
|
-
return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:s,translateY:o,rotate:Math.atan2(e,t)*
|
|
13172
|
+
return a.join("")})}function Iz(t,e){var n,i,s=typeof e
|
|
13173
|
+
return null==e||"boolean"===s?fz(e):("number"===s?xz:"string"===s?(n=JP(e))?(e=n,vz):_z:e instanceof JP?vz:e instanceof Date?wz:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?yz:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Cz:xz:bz))(t,e)}function Mz(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var $z,Ez=180/Math.PI,Dz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
13174
|
+
function Az(t,e,n,i,s,o){var r,a,l
|
|
13175
|
+
return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:s,translateY:o,rotate:Math.atan2(e,t)*Ez,skewX:Math.atan(l)*Ez,scaleX:r,scaleY:a}}function Tz(t,e,n,i){function s(t){return t.length?t.pop()+" ":""}return function(o,r){var a=[],l=[]
|
|
13173
13176
|
return o=t(o),r=t(r),function(t,i,s,o,r,a){if(t!==s||i!==o){var l=r.push("translate(",null,e,null,n)
|
|
13174
|
-
a.push({i:l-4,x:
|
|
13175
|
-
r.push({i:a-4,x:
|
|
13176
|
-
return a.join("")}}}var
|
|
13177
|
-
return e.isIdentity?
|
|
13178
|
-
function
|
|
13177
|
+
a.push({i:l-4,x:xz(t,s)},{i:l-2,x:xz(i,o)})}else(s||o)&&r.push("translate("+s+e+o+n)}(o.translateX,o.translateY,r.translateX,r.translateY,a,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(s(n)+"rotate(",null,i)-2,x:xz(t,e)})):e&&n.push(s(n)+"rotate("+e+i)}(o.rotate,r.rotate,a,l),function(t,e,n,o){t!==e?o.push({i:n.push(s(n)+"skewX(",null,i)-2,x:xz(t,e)}):e&&n.push(s(n)+"skewX("+e+i)}(o.skewX,r.skewX,a,l),function(t,e,n,i,o,r){if(t!==n||e!==i){var a=o.push(s(o)+"scale(",null,",",null,")")
|
|
13178
|
+
r.push({i:a-4,x:xz(t,n)},{i:a-2,x:xz(e,i)})}else 1===n&&1===i||o.push(s(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,r.scaleX,r.scaleY,a,l),o=r=null,function(t){for(var e,n=-1,i=l.length;++n<i;)a[(e=l[n]).i]=e.x(t)
|
|
13179
|
+
return a.join("")}}}var Oz=Tz((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")
|
|
13180
|
+
return e.isIdentity?Dz:Az(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Rz=Tz((function(t){return null==t?Dz:($z||($z=document.createElementNS("http://www.w3.org/2000/svg","g")),$z.setAttribute("transform",t),(t=$z.transform.baseVal.consolidate())?Az((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Dz)}),", ",")",")")
|
|
13181
|
+
function Fz(t){return((t=Math.exp(t))+1/t)/2}var Nz,Lz,Bz=function t(e,n,i){function s(t,s){var o,r,a=t[0],l=t[1],c=t[2],d=s[0],h=s[1],u=s[2],p=d-a,f=h-l,m=p*p+f*f
|
|
13179
13182
|
if(m<1e-12)r=Math.log(u/c)/e,o=function(t){return[a+t*p,l+t*f,c*Math.exp(e*t*r)]}
|
|
13180
13183
|
else{var g=Math.sqrt(m),v=(u*u-c*c+i*m)/(2*c*n*g),b=(u*u-c*c-i*m)/(2*u*n*g),y=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(b*b+1)-b)
|
|
13181
|
-
r=(w-y)/e,o=function(t){var i,s=t*r,o=
|
|
13182
|
-
return[a+d*p,l+d*f,c*o/
|
|
13183
|
-
return t(n,i,i*i)},s}(Math.SQRT2,2,4),
|
|
13184
|
-
function
|
|
13185
|
-
return i.restart(t,e,n),i}function
|
|
13186
|
-
try{!function(){
|
|
13187
|
-
for(var t,e=
|
|
13188
|
-
for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:
|
|
13189
|
-
|
|
13190
|
-
e>
|
|
13191
|
-
return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}
|
|
13192
|
-
n=(null==n?
|
|
13193
|
-
var
|
|
13194
|
-
function
|
|
13184
|
+
r=(w-y)/e,o=function(t){var i,s=t*r,o=Fz(y),d=c/(n*g)*(o*(i=e*s+y,((i=Math.exp(2*i))-1)/(i+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y))
|
|
13185
|
+
return[a+d*p,l+d*f,c*o/Fz(e*s+y)]}}return o.duration=1e3*r*e/Math.SQRT2,o}return s.rho=function(e){var n=Math.max(.001,+e),i=n*n
|
|
13186
|
+
return t(n,i,i*i)},s}(Math.SQRT2,2,4),Pz=0,zz=0,Vz=0,Hz=1e3,Uz=0,qz=0,jz=0,Wz="object"==typeof performance&&performance.now?performance:Date,Gz="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)}
|
|
13187
|
+
function Zz(){return qz||(Gz(Kz),qz=Wz.now()+jz)}function Kz(){qz=0}function Yz(){this._call=this._time=this._next=null}function Xz(t,e,n){var i=new Yz
|
|
13188
|
+
return i.restart(t,e,n),i}function Jz(){qz=(Uz=Wz.now())+jz,Pz=zz=0
|
|
13189
|
+
try{!function(){Zz(),++Pz
|
|
13190
|
+
for(var t,e=Nz;e;)(t=qz-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pz}()}finally{Pz=0,function(){var t,e,n=Nz,i=1/0
|
|
13191
|
+
for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Nz=e)
|
|
13192
|
+
Lz=t,tV(i)}(),qz=0}}function Qz(){var t=Wz.now(),e=t-Uz
|
|
13193
|
+
e>Hz&&(jz-=e,Uz=t)}function tV(t){Pz||(zz&&(zz=clearTimeout(zz)),t-qz>24?(t<1/0&&(zz=setTimeout(Jz,t-Wz.now()-jz)),Vz&&(Vz=clearInterval(Vz))):(Vz||(Uz=Wz.now(),Vz=setInterval(Qz,Hz)),Pz=1,Gz(Jz)))}function eV(t,e,n){var i=new Yz
|
|
13194
|
+
return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}Yz.prototype=Xz.prototype={constructor:Yz,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function")
|
|
13195
|
+
n=(null==n?Zz():+n)+(null==e?0:+e),this._next||Lz===this||(Lz?Lz._next=this:Nz=this,Lz=this),this._call=t,this._time=n,tV()},stop:function(){this._call&&(this._call=null,this._time=1/0,tV())}}
|
|
13196
|
+
var nV=fB("start","end","cancel","interrupt"),iV=[],sV=0,oV=1,rV=2,aV=3,lV=4,cV=5,dV=6
|
|
13197
|
+
function hV(t,e,n,i,s,o){var r=t.__transition
|
|
13195
13198
|
if(r){if(n in r)return}else t.__transition={}
|
|
13196
13199
|
!function(t,e,n){var i,s=t.__transition
|
|
13197
|
-
function o(t){n.state=
|
|
13198
|
-
if(n.state!==
|
|
13199
|
-
for(c in s)if((u=s[c]).name===n.name){if(u.state===
|
|
13200
|
-
u.state===
|
|
13201
|
-
i.length=d+1}}function a(e){for(var s=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=
|
|
13202
|
-
n.state===
|
|
13203
|
-
delete t.__transition}s[e]=n,n.timer=
|
|
13204
|
-
if(n.state>
|
|
13205
|
-
return n}function
|
|
13206
|
-
if(n.state>
|
|
13207
|
-
return n}function
|
|
13200
|
+
function o(t){n.state=oV,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)}function r(o){var c,d,h,u
|
|
13201
|
+
if(n.state!==oV)return l()
|
|
13202
|
+
for(c in s)if((u=s[c]).name===n.name){if(u.state===aV)return eV(r)
|
|
13203
|
+
u.state===lV?(u.state=dV,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete s[c]):+c<e&&(u.state=dV,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete s[c])}if(eV((function(){n.state===aV&&(n.state=lV,n.timer.restart(a,n.delay,n.time),a(o))})),n.state=rV,n.on.call("start",t,t.__data__,n.index,n.group),n.state===rV){for(n.state=aV,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=u)
|
|
13204
|
+
i.length=d+1}}function a(e){for(var s=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=cV,1),o=-1,r=i.length;++o<r;)i[o].call(t,s)
|
|
13205
|
+
n.state===cV&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=dV,n.timer.stop(),delete s[e],s)return
|
|
13206
|
+
delete t.__transition}s[e]=n,n.timer=Xz(o,0,n.time)}(t,n,{name:e,index:i,group:s,on:nV,tween:iV,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:sV})}function uV(t,e){var n=fV(t,e)
|
|
13207
|
+
if(n.state>sV)throw new Error("too late; already scheduled")
|
|
13208
|
+
return n}function pV(t,e){var n=fV(t,e)
|
|
13209
|
+
if(n.state>aV)throw new Error("too late; already running")
|
|
13210
|
+
return n}function fV(t,e){var n=t.__transition
|
|
13208
13211
|
if(!n||!(n=n[e]))throw new Error("transition not found")
|
|
13209
|
-
return n}function
|
|
13210
|
-
if(o){for(s in e=null==e?null:e+"",o)(n=o[s]).name===e?(i=n.state>
|
|
13211
|
-
r&&delete t.__transition}}function
|
|
13212
|
-
return function(){var s=
|
|
13212
|
+
return n}function mV(t,e){var n,i,s,o=t.__transition,r=!0
|
|
13213
|
+
if(o){for(s in e=null==e?null:e+"",o)(n=o[s]).name===e?(i=n.state>rV&&n.state<cV,n.state=dV,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[s]):r=!1
|
|
13214
|
+
r&&delete t.__transition}}function gV(t,e){var n,i
|
|
13215
|
+
return function(){var s=pV(this,t),o=s.tween
|
|
13213
13216
|
if(o!==n)for(var r=0,a=(i=n=o).length;r<a;++r)if(i[r].name===e){(i=i.slice()).splice(r,1)
|
|
13214
|
-
break}s.tween=i}}function
|
|
13217
|
+
break}s.tween=i}}function vV(t,e,n){var i,s
|
|
13215
13218
|
if("function"!=typeof n)throw new Error
|
|
13216
|
-
return function(){var o=
|
|
13219
|
+
return function(){var o=pV(this,t),r=o.tween
|
|
13217
13220
|
if(r!==i){s=(i=r).slice()
|
|
13218
13221
|
for(var a={name:e,value:n},l=0,c=s.length;l<c;++l)if(s[l].name===e){s[l]=a
|
|
13219
|
-
break}l===c&&s.push(a)}o.tween=s}}function
|
|
13220
|
-
return t.each((function(){var t=
|
|
13221
|
-
return("number"==typeof e?
|
|
13222
|
+
break}l===c&&s.push(a)}o.tween=s}}function bV(t,e,n){var i=t._id
|
|
13223
|
+
return t.each((function(){var t=pV(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return fV(t,i).value[e]}}function yV(t,e){var n
|
|
13224
|
+
return("number"==typeof e?xz:e instanceof JP?vz:(n=JP(e))?(e=n,vz):_z)(t,e)}function wV(t){return function(){this.removeAttribute(t)}}function xV(t){return function(){this.removeAttributeNS(t.space,t.local)}}function CV(t,e,n){var i,s,o=n+""
|
|
13222
13225
|
return function(){var r=this.getAttribute(t)
|
|
13223
|
-
return r===o?null:r===i?s:s=e(i=r,n)}}function
|
|
13226
|
+
return r===o?null:r===i?s:s=e(i=r,n)}}function kV(t,e,n){var i,s,o=n+""
|
|
13224
13227
|
return function(){var r=this.getAttributeNS(t.space,t.local)
|
|
13225
|
-
return r===o?null:r===i?s:s=e(i=r,n)}}function
|
|
13228
|
+
return r===o?null:r===i?s:s=e(i=r,n)}}function SV(t,e,n){var i,s,o
|
|
13226
13229
|
return function(){var r,a,l=n(this)
|
|
13227
13230
|
if(null!=l)return(r=this.getAttribute(t))===(a=l+"")?null:r===i&&a===s?o:(s=a,o=e(i=r,l))
|
|
13228
|
-
this.removeAttribute(t)}}function
|
|
13231
|
+
this.removeAttribute(t)}}function _V(t,e,n){var i,s,o
|
|
13229
13232
|
return function(){var r,a,l=n(this)
|
|
13230
13233
|
if(null!=l)return(r=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:r===i&&a===s?o:(s=a,o=e(i=r,l))
|
|
13231
|
-
this.removeAttributeNS(t.space,t.local)}}function
|
|
13234
|
+
this.removeAttributeNS(t.space,t.local)}}function IV(t,e){var n,i
|
|
13232
13235
|
function s(){var s=e.apply(this,arguments)
|
|
13233
|
-
return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,s)),n}return s._value=e,s}function
|
|
13236
|
+
return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,s)),n}return s._value=e,s}function MV(t,e){var n,i
|
|
13234
13237
|
function s(){var s=e.apply(this,arguments)
|
|
13235
|
-
return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,s)),n}return s._value=e,s}function
|
|
13236
|
-
function
|
|
13237
|
-
function
|
|
13238
|
-
|
|
13239
|
-
"function"!=typeof t&&(t=
|
|
13240
|
-
for(var i=this._groups,s=i.length,o=new Array(s),r=0;r<s;++r)for(var a,l,c=i[r],d=c.length,h=o[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=t.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,
|
|
13241
|
-
return new
|
|
13242
|
-
"function"!=typeof t&&(t=
|
|
13243
|
-
for(var i=this._groups,s=i.length,o=[],r=[],a=0;a<s;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=t.call(l,l.__data__,h,c),f=
|
|
13244
|
-
o.push(p),r.push(l)}return new
|
|
13238
|
+
return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,s)),n}return s._value=e,s}function $V(t,e){return function(){uV(this,t).delay=+e.apply(this,arguments)}}function EV(t,e){return e=+e,function(){uV(this,t).delay=e}}function DV(t,e){return function(){pV(this,t).duration=+e.apply(this,arguments)}}function AV(t,e){return e=+e,function(){pV(this,t).duration=e}}var TV=EP.prototype.constructor
|
|
13239
|
+
function OV(t){return function(){this.style.removeProperty(t)}}var RV=0
|
|
13240
|
+
function FV(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function NV(){return++RV}var LV=EP.prototype
|
|
13241
|
+
FV.prototype={constructor:FV,select:function(t){var e=this._name,n=this._id
|
|
13242
|
+
"function"!=typeof t&&(t=_B(t))
|
|
13243
|
+
for(var i=this._groups,s=i.length,o=new Array(s),r=0;r<s;++r)for(var a,l,c=i[r],d=c.length,h=o[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=t.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,hV(h[u],e,n,u,h,fV(a,n)))
|
|
13244
|
+
return new FV(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id
|
|
13245
|
+
"function"!=typeof t&&(t=MB(t))
|
|
13246
|
+
for(var i=this._groups,s=i.length,o=[],r=[],a=0;a<s;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=t.call(l,l.__data__,h,c),f=fV(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&hV(u,e,n,m,p,f)
|
|
13247
|
+
o.push(p),r.push(l)}return new FV(o,r,e,n)},selectChild:LV.selectChild,selectChildren:LV.selectChildren,filter:function(t){"function"!=typeof t&&(t=EB(t))
|
|
13245
13248
|
for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r=e[s],a=r.length,l=i[s]=[],c=0;c<a;++c)(o=r[c])&&t.call(o,o.__data__,c,r)&&l.push(o)
|
|
13246
|
-
return new
|
|
13249
|
+
return new FV(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error
|
|
13247
13250
|
for(var e=this._groups,n=t._groups,i=e.length,s=n.length,o=Math.min(i,s),r=new Array(i),a=0;a<o;++a)for(var l,c=e[a],d=n[a],h=c.length,u=r[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
|
|
13248
13251
|
for(;a<i;++a)r[a]=e[a]
|
|
13249
|
-
return new
|
|
13250
|
-
|
|
13251
|
-
return arguments.length<2?
|
|
13252
|
-
return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?
|
|
13252
|
+
return new FV(r,this._parents,this._name,this._id)},selection:function(){return new TV(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=NV(),i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=fV(r,e)
|
|
13253
|
+
hV(r,t,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new FV(i,this._parents,t,n)},call:LV.call,nodes:LV.nodes,node:LV.node,size:LV.size,empty:LV.empty,each:LV.each,on:function(t,e){var n=this._id
|
|
13254
|
+
return arguments.length<2?fV(this.node(),n).on.on(t):this.each(function(t,e,n){var i,s,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".")
|
|
13255
|
+
return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?uV:pV
|
|
13253
13256
|
return function(){var r=o(this,t),a=r.on
|
|
13254
|
-
a!==i&&(s=(i=a).copy()).on(e,n),r.on=s}}(n,t,e))},attr:function(t,e){var n=
|
|
13255
|
-
return this.attrTween(t,"function"==typeof e?(n.local?
|
|
13257
|
+
a!==i&&(s=(i=a).copy()).on(e,n),r.on=s}}(n,t,e))},attr:function(t,e){var n=wB(t),i="transform"===n?Rz:yV
|
|
13258
|
+
return this.attrTween(t,"function"==typeof e?(n.local?_V:SV)(n,i,bV(this,"attr."+t,e)):null==e?(n.local?xV:wV)(n):(n.local?kV:CV)(n,i,e))},attrTween:function(t,e){var n="attr."+t
|
|
13256
13259
|
if(arguments.length<2)return(n=this.tween(n))&&n._value
|
|
13257
13260
|
if(null==e)return this.tween(n,null)
|
|
13258
13261
|
if("function"!=typeof e)throw new Error
|
|
13259
|
-
var i=
|
|
13260
|
-
return this.tween(n,(i.local?
|
|
13262
|
+
var i=wB(t)
|
|
13263
|
+
return this.tween(n,(i.local?IV:MV)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Oz:yV
|
|
13261
13264
|
return null==e?this.styleTween(t,function(t,e){var n,i,s
|
|
13262
|
-
return function(){var o=
|
|
13263
|
-
return o===r?null:o===n&&r===i?s:s=e(n=o,i=r)}}(t,i)).on("end.style."+t
|
|
13264
|
-
return function(){var r=
|
|
13265
|
-
return null==a&&(this.style.removeProperty(t),l=a=
|
|
13266
|
-
return function(){var l=
|
|
13265
|
+
return function(){var o=JB(this,t),r=(this.style.removeProperty(t),JB(this,t))
|
|
13266
|
+
return o===r?null:o===n&&r===i?s:s=e(n=o,i=r)}}(t,i)).on("end.style."+t,OV(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,s,o
|
|
13267
|
+
return function(){var r=JB(this,t),a=n(this),l=a+""
|
|
13268
|
+
return null==a&&(this.style.removeProperty(t),l=a=JB(this,t)),r===l?null:r===i&&l===s?o:(s=l,o=e(i=r,a))}}(t,i,bV(this,"style."+t,e))).each(function(t,e){var n,i,s,o,r="style."+e,a="end."+r
|
|
13269
|
+
return function(){var l=pV(this,t),c=l.on,d=null==l.value[r]?o||(o=OV(e)):void 0
|
|
13267
13270
|
c===n&&s===d||(i=(n=c).copy()).on(a,s=d),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,s,o=n+""
|
|
13268
|
-
return function(){var r=
|
|
13271
|
+
return function(){var r=JB(this,t)
|
|
13269
13272
|
return r===o?null:r===i?s:s=e(i=r,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="")
|
|
13270
13273
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
13271
13274
|
if(null==e)return this.tween(i,null)
|
|
@@ -13273,7 +13276,7 @@ if("function"!=typeof e)throw new Error
|
|
|
13273
13276
|
return this.tween(i,function(t,e,n){var i,s
|
|
13274
13277
|
function o(){var o=e.apply(this,arguments)
|
|
13275
13278
|
return o!==s&&(i=(s=o)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,o,n)),i}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this)
|
|
13276
|
-
this.textContent=null==e?"":e}}(
|
|
13279
|
+
this.textContent=null==e?"":e}}(bV(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text"
|
|
13277
13280
|
if(arguments.length<1)return(e=this.tween(e))&&e._value
|
|
13278
13281
|
if(null==t)return this.tween(e,null)
|
|
13279
13282
|
if("function"!=typeof t)throw new Error
|
|
@@ -13282,108 +13285,108 @@ function i(){var i=t.apply(this,arguments)
|
|
|
13282
13285
|
return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode
|
|
13283
13286
|
for(var n in this.__transition)if(+n!==t)return
|
|
13284
13287
|
e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id
|
|
13285
|
-
if(t+="",arguments.length<2){for(var i,s=
|
|
13286
|
-
return null}return this.each((null==e?
|
|
13287
|
-
return arguments.length?this.each(("function"==typeof t
|
|
13288
|
-
return arguments.length?this.each(("function"==typeof t?
|
|
13288
|
+
if(t+="",arguments.length<2){for(var i,s=fV(this.node(),n).tween,o=0,r=s.length;o<r;++o)if((i=s[o]).name===t)return i.value
|
|
13289
|
+
return null}return this.each((null==e?gV:vV)(n,t,e))},delay:function(t){var e=this._id
|
|
13290
|
+
return arguments.length?this.each(("function"==typeof t?$V:EV)(e,t)):fV(this.node(),e).delay},duration:function(t){var e=this._id
|
|
13291
|
+
return arguments.length?this.each(("function"==typeof t?DV:AV)(e,t)):fV(this.node(),e).duration},ease:function(t){var e=this._id
|
|
13289
13292
|
return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error
|
|
13290
|
-
return function(){
|
|
13293
|
+
return function(){pV(this,t).ease=e}}(e,t)):fV(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error
|
|
13291
13294
|
return this.each(function(t,e){return function(){var n=e.apply(this,arguments)
|
|
13292
13295
|
if("function"!=typeof n)throw new Error
|
|
13293
|
-
|
|
13296
|
+
pV(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,s=n.size()
|
|
13294
13297
|
return new Promise((function(o,r){var a={value:r},l={value:function(){0==--s&&o()}}
|
|
13295
|
-
n.each((function(){var n=
|
|
13296
|
-
s!==t&&((e=(t=s).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===s&&o()}))},[Symbol.iterator]:
|
|
13297
|
-
var
|
|
13298
|
-
function
|
|
13299
|
-
return n}
|
|
13300
|
-
t instanceof
|
|
13301
|
-
for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)(r=a[c])&&
|
|
13302
|
-
return new
|
|
13303
|
-
var
|
|
13304
|
-
function
|
|
13305
|
-
var
|
|
13306
|
-
function
|
|
13307
|
-
return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function
|
|
13308
|
-
return t.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r))}function
|
|
13309
|
-
function v(t){t.property("__zoom",
|
|
13310
|
-
return i===t.x&&s===t.y?t:new
|
|
13298
|
+
n.each((function(){var n=pV(this,i),s=n.on
|
|
13299
|
+
s!==t&&((e=(t=s).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===s&&o()}))},[Symbol.iterator]:LV[Symbol.iterator]}
|
|
13300
|
+
var BV={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}}
|
|
13301
|
+
function PV(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`)
|
|
13302
|
+
return n}EP.prototype.interrupt=function(t){return this.each((function(){mV(this,t)}))},EP.prototype.transition=function(t){var e,n
|
|
13303
|
+
t instanceof FV?(e=t._id,t=t._name):(e=NV(),(n=BV).time=Zz(),t=null==t?null:t+"")
|
|
13304
|
+
for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)(r=a[c])&&hV(r,t,e,c,a,n||PV(r,e))
|
|
13305
|
+
return new FV(i,this._parents,t,e)}
|
|
13306
|
+
var zV=t=>()=>t
|
|
13307
|
+
function VV(t,{sourceEvent:e,target:n,transform:i,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function HV(t,e,n){this.k=t,this.x=e,this.y=n}HV.prototype={constructor:HV,scale:function(t){return 1===t?this:new HV(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new HV(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
|
|
13308
|
+
var UV=new HV(1,0,0)
|
|
13309
|
+
function qV(t){t.stopImmediatePropagation()}function jV(t){t.preventDefault(),t.stopImmediatePropagation()}function WV(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function GV(){var t=this
|
|
13310
|
+
return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function ZV(){return this.__zoom||UV}function KV(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function YV(){return navigator.maxTouchPoints||"ontouchstart"in this}function XV(t,e,n){var i=t.invertX(e[0][0])-n[0][0],s=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],r=t.invertY(e[1][1])-n[1][1]
|
|
13311
|
+
return t.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r))}function JV(){var t,e,n,i=WV,s=GV,o=XV,r=KV,a=YV,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=Bz,u=fB("start","zoom","end"),p=500,f=150,m=0,g=10
|
|
13312
|
+
function v(t){t.property("__zoom",ZV).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",I).filter(a).on("touchstart.zoom",M).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new HV(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,s=e[1]-n[1]*t.k
|
|
13313
|
+
return i===t.x&&s===t.y?t:new HV(t.k,i,s)}function w(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,i){t.on("start.zoom",(function(){C(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){C(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,r=C(t,o).event(i),a=s.apply(t,o),l=null==n?w(a):"function"==typeof n?n.apply(t,o):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=t.__zoom,u="function"==typeof e?e.apply(t,o):e,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
|
|
13311
13314
|
return function(t){if(1===t)t=u
|
|
13312
13315
|
else{var e=p(t),n=c/e[2]
|
|
13313
|
-
t=new
|
|
13316
|
+
t=new HV(n,l[0]-e[0]*n,l[1]-e[1]*n)}r.zoom(null,t)}}))}function C(t,e,n){return!n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=s.apply(t,e),this.taps=0}function S(t,...e){if(i.apply(this,arguments)){var n=C(this,e).event(t),s=this.__zoom,a=Math.max(l[0],Math.min(l[1],s.k*Math.pow(2,r.apply(this,arguments)))),d=AP(t)
|
|
13314
13317
|
if(n.wheel)n.mouse[0][0]===d[0]&&n.mouse[0][1]===d[1]||(n.mouse[1]=s.invert(n.mouse[0]=d)),clearTimeout(n.wheel)
|
|
13315
13318
|
else{if(s.k===a)return
|
|
13316
|
-
n.mouse=[d,s.invert(d)],
|
|
13317
|
-
r.moved=e*e+n*n>m}r.event(t).zoom("mouse",o(y(r.that.__zoom,r.mouse[0]=
|
|
13318
|
-
e&&(i.on("click.drag"
|
|
13319
|
-
!function(t){var e=t.document.documentElement,n=
|
|
13320
|
-
"onselectstart"in e?n.on("selectstart.drag"
|
|
13321
|
-
|
|
13322
|
-
for(
|
|
13323
|
-
t&&(t=clearTimeout(t)),o&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),
|
|
13324
|
-
for(
|
|
13319
|
+
n.mouse=[d,s.invert(d)],mV(this),n.start()}jV(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",o(y(b(s,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function _(t,...e){if(!n&&i.apply(this,arguments)){var s=t.currentTarget,r=C(this,e,!0).event(t),a=DP(t.view).on("mousemove.zoom",(function(t){if(jV(t),!r.moved){var e=t.clientX-d,n=t.clientY-h
|
|
13320
|
+
r.moved=e*e+n*n>m}r.event(t).zoom("mouse",o(y(r.that.__zoom,r.mouse[0]=AP(t,s),r.mouse[1]),r.extent,c))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=DP(t).on("dragstart.drag",null)
|
|
13321
|
+
e&&(i.on("click.drag",OP,TP),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,r.moved),jV(t),r.event(t).end()}),!0),l=AP(t,s),d=t.clientX,h=t.clientY
|
|
13322
|
+
!function(t){var e=t.document.documentElement,n=DP(t).on("dragstart.drag",OP,TP)
|
|
13323
|
+
"onselectstart"in e?n.on("selectstart.drag",OP,TP):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),qV(t),r.mouse=[l,this.__zoom.invert(l)],mV(this),r.start()}}function I(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,r=AP(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(r),l=n.k*(t.shiftKey?.5:2),h=o(y(b(n,l),r,a),s.apply(this,e),c)
|
|
13324
|
+
jV(t),d>0?DP(this).transition().duration(d).call(x,h,r,t):DP(this).call(v.transform,h,r,t)}}function M(n,...s){if(i.apply(this,arguments)){var o,r,a,l,c=n.touches,d=c.length,h=C(this,s,n.changedTouches.length===d).event(n)
|
|
13325
|
+
for(qV(n),r=0;r<d;++r)l=[l=AP(a=c[r],this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,o=!0,h.taps=1+!!t)
|
|
13326
|
+
t&&(t=clearTimeout(t)),o&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),mV(this),h.start())}}function $(t,...e){if(this.__zooming){var n,i,s,r,a=C(this,e).event(t),l=t.changedTouches,d=l.length
|
|
13327
|
+
for(jV(t),n=0;n<d;++n)s=AP(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=s:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=s)
|
|
13325
13328
|
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
|
|
13326
13329
|
i=b(i,Math.sqrt(m/g)),s=[(h[0]+p[0])/2,(h[1]+p[1])/2],r=[(u[0]+f[0])/2,(u[1]+f[1])/2]}else{if(!a.touch0)return
|
|
13327
13330
|
s=a.touch0[0],r=a.touch0[1]}a.zoom("touch",o(y(i,s,r),a.extent,c))}}function E(t,...i){if(this.__zooming){var s,o,r=C(this,i).event(t),a=t.changedTouches,l=a.length
|
|
13328
|
-
for(
|
|
13331
|
+
for(qV(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),s=0;s<l;++s)o=a[s],r.touch0&&r.touch0[2]===o.identifier?delete r.touch0:r.touch1&&r.touch1[2]===o.identifier&&delete r.touch1
|
|
13329
13332
|
if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0])
|
|
13330
|
-
else if(r.end(),2===r.taps&&(o=
|
|
13333
|
+
else if(r.end(),2===r.taps&&(o=AP(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<g)){var c=DP(this).on("dblclick.zoom")
|
|
13331
13334
|
c&&c.apply(this,arguments)}}}return v.transform=function(t,e,n,i){var s=t.selection?t.selection():t
|
|
13332
|
-
s.property("__zoom",
|
|
13335
|
+
s.property("__zoom",ZV),t!==s?x(t,e,n,i):s.interrupt().each((function(){C(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},v.scaleBy=function(t,e,n,i){v.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,i)},v.scaleTo=function(t,e,n,i){v.transform(t,(function(){var t=s.apply(this,arguments),i=this.__zoom,r=null==n?w(t):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(r),l="function"==typeof e?e.apply(this,arguments):e
|
|
13333
13336
|
return o(y(b(i,l),r,a),t,c)}),n,i)},v.translateBy=function(t,e,n,i){v.transform(t,(function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),s.apply(this,arguments),c)}),null,i)},v.translateTo=function(t,e,n,i,r){v.transform(t,(function(){var t=s.apply(this,arguments),r=this.__zoom,a=null==i?w(t):"function"==typeof i?i.apply(this,arguments):i
|
|
13334
|
-
return o(
|
|
13335
|
-
u.call(t,this.that,new
|
|
13336
|
-
return t===u?v:t},v.clickDistance=function(t){return arguments.length?(m=(t=+t)*t,v):Math.sqrt(m)},v.tapDistance=function(t){return arguments.length?(g=+t,v):g},v}
|
|
13337
|
-
const
|
|
13338
|
-
function
|
|
13339
|
-
return o.set(r,n),t}function
|
|
13337
|
+
return o(UV.translate(a[0],a[1]).scale(r.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),i,r)},k.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=DP(this.that).datum()
|
|
13338
|
+
u.call(t,this.that,new VV(t,{sourceEvent:this.sourceEvent,target:v,type:t,transform:this.that.__zoom,dispatch:u}),e)}},v.wheelDelta=function(t){return arguments.length?(r="function"==typeof t?t:zV(+t),v):r},v.filter=function(t){return arguments.length?(i="function"==typeof t?t:zV(!!t),v):i},v.touchable=function(t){return arguments.length?(a="function"==typeof t?t:zV(!!t),v):a},v.extent=function(t){return arguments.length?(s="function"==typeof t?t:zV([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),v):s},v.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],v):[l[0],l[1]]},v.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(t){return arguments.length?(o=t,v):o},v.duration=function(t){return arguments.length?(d=+t,v):d},v.interpolate=function(t){return arguments.length?(h=t,v):h},v.on=function(){var t=u.on.apply(u,arguments)
|
|
13339
|
+
return t===u?v:t},v.clickDistance=function(t){return arguments.length?(m=(t=+t)*t,v):Math.sqrt(m)},v.tapDistance=function(t){return arguments.length?(g=+t,v):g},v}HV.prototype
|
|
13340
|
+
const QV=new TextDecoder("utf-8"),tH=t=>QV.decode(t),eH=new TextEncoder,nH=t=>eH.encode(t),iH=t=>"function"==typeof t,sH=t=>null!=t&&Object(t)===t,oH=t=>sH(t)&&iH(t.then),rH=t=>sH(t)&&iH(t[Symbol.iterator]),aH=t=>sH(t)&&iH(t[Symbol.asyncIterator]),lH=t=>sH(t)&&sH(t.schema),cH=t=>sH(t)&&"done"in t&&"value"in t,dH=t=>sH(t)&&iH(t.stat)&&(t=>"number"==typeof t)(t.fd),hH=t=>sH(t)&&pH(t.body),uH=t=>"_getDOMStream"in t&&"_getNodeStream"in t,pH=t=>sH(t)&&iH(t.cancel)&&iH(t.getReader)&&!uH(t),fH=t=>sH(t)&&iH(t.read)&&iH(t.pipe)&&(t=>"boolean"==typeof t)(t.readable)&&!uH(t),mH=t=>sH(t)&&iH(t.clear)&&iH(t.bytes)&&iH(t.position)&&iH(t.setPosition)&&iH(t.capacity)&&iH(t.getBufferIdentifier)&&iH(t.createLong),gH="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer
|
|
13341
|
+
function vH(t,e,n=0,i=e.byteLength){const s=t.byteLength,o=new Uint8Array(t.buffer,t.byteOffset,s),r=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,s))
|
|
13342
|
+
return o.set(r,n),t}function bH(t,e){const n=function(t){const e=t[0]?[t[0]]:[]
|
|
13340
13343
|
let n,i,s,o
|
|
13341
13344
|
for(let r,a,l=0,c=0,d=t.length;++l<d;)r=e[c],a=t[l],!r||!a||r.buffer!==a.buffer||a.byteOffset<r.byteOffset?a&&(e[++c]=a):(({byteOffset:n,byteLength:s}=r),({byteOffset:i,byteLength:o}=a),n+s<i||i+o<n?a&&(e[++c]=a):e[c]=new Uint8Array(r.buffer,n,i-n+o))
|
|
13342
13345
|
return e}(t),i=n.reduce(((t,e)=>t+e.byteLength),0)
|
|
13343
13346
|
let s,o,r,a=0,l=-1
|
|
13344
13347
|
const c=Math.min(e||Number.POSITIVE_INFINITY,i)
|
|
13345
|
-
for(const t=n.length;++l<t;){if(s=n[l],o=s.subarray(0,Math.min(s.length,c-a)),c<=a+o.length){o.length<s.length?n[l]=s.subarray(o.length):o.length===s.length&&l++,r?
|
|
13346
|
-
break}
|
|
13347
|
-
return n instanceof t?t===Uint8Array?new t(n.buffer,n.byteOffset,n.byteLength):n:n?("string"==typeof n&&(n=
|
|
13348
|
-
const
|
|
13349
|
-
return yield*
|
|
13350
|
-
do{n=e.next(yield
|
|
13351
|
-
function
|
|
13352
|
-
const n=function(t){return s(this,arguments,(function*(){yield yield i(yield i(t))}))},a="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof
|
|
13353
|
-
do{e=t.next(yield null==e?void 0:e.value)}while(!e.done)}(t[Symbol.iterator]())))))}))}(e):
|
|
13354
|
-
return yield i(yield*o(r(
|
|
13355
|
-
do{n=yield i(e.next(yield yield i(
|
|
13356
|
-
var
|
|
13357
|
-
function l(){return"peek"===i?
|
|
13358
|
-
const c=
|
|
13359
|
-
try{do{if(({done:e,value:n}=Number.isNaN(s-a)?c.next():c.next(s-a)),!e&&n.byteLength>0&&(r.push(n),a+=n.byteLength),e||s<=a)do{({cmd:i,size:s}=yield l())}while(s<a)}while(!e)}catch(t){(o=!0)&&"function"==typeof c.throw&&c.throw(t)}finally{!1===o&&"function"==typeof c.return&&c.return(null)}return null}(t)),fromAsyncIterable:t
|
|
13360
|
-
function c(){return"peek"===s?
|
|
13361
|
-
const d=
|
|
13362
|
-
try{do{if(({done:e,value:n}=Number.isNaN(o-l)?yield i(d.next()):yield i(d.next(o-l))),!e&&n.byteLength>0&&(a.push(n),l+=n.byteLength),e||o<=l)do{({cmd:s,size:o}=yield yield i(c()))}while(o<l)}while(!e)}catch(t){(r=!0)&&"function"==typeof d.throw&&(yield i(d.throw(t)))}finally{!1===r&&"function"==typeof d.return&&(yield i(d.return(new Uint8Array(0))))}return yield i(null)}))}(t)),fromDOMStream:t
|
|
13363
|
-
function c(){return"peek"===n?
|
|
13364
|
-
const d=new
|
|
13365
|
-
try{do{if(({done:o,value:e}=Number.isNaN(s-l)?yield i(d.read()):yield i(d.read(s-l))),!o&&e.byteLength>0&&(a.push(
|
|
13348
|
+
for(const t=n.length;++l<t;){if(s=n[l],o=s.subarray(0,Math.min(s.length,c-a)),c<=a+o.length){o.length<s.length?n[l]=s.subarray(o.length):o.length===s.length&&l++,r?vH(r,o,a):r=o
|
|
13349
|
+
break}vH(r||(r=new Uint8Array(c)),o,a),a+=o.length}return[r||new Uint8Array(0),n.slice(l),i-(r?r.byteLength:0)]}function yH(t,e){let n=cH(e)?e.value:e
|
|
13350
|
+
return n instanceof t?t===Uint8Array?new t(n.buffer,n.byteOffset,n.byteLength):n:n?("string"==typeof n&&(n=nH(n)),n instanceof ArrayBuffer||n instanceof gH?new t(n):mH(n)?yH(t,n.bytes()):ArrayBuffer.isView(n)?n.byteLength<=0?new t(0):new t(n.buffer,n.byteOffset,n.byteLength/t.BYTES_PER_ELEMENT):t.from(n)):new t(0)}const wH=t=>yH(Int32Array,t),xH=t=>yH(BigInt64Array,t),CH=t=>yH(Uint8Array,t),kH=t=>(t.next(),t)
|
|
13351
|
+
const SH=t=>function*(t,e){const n=function*(t){yield t},i="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof gH?n(e):rH(e)?e:n(e)
|
|
13352
|
+
return yield*kH(function*(e){let n=null
|
|
13353
|
+
do{n=e.next(yield yH(t,n))}while(!n.done)}(i[Symbol.iterator]())),new t}(Uint8Array,t)
|
|
13354
|
+
function _H(t,e){return s(this,arguments,(function*(){if(oH(e))return yield i(yield i(yield*o(r(_H(t,yield i(e))))))
|
|
13355
|
+
const n=function(t){return s(this,arguments,(function*(){yield yield i(yield i(t))}))},a="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof gH?n(e):rH(e)?function(t){return s(this,arguments,(function*(){yield i(yield*o(r(kH(function*(t){let e=null
|
|
13356
|
+
do{e=t.next(yield null==e?void 0:e.value)}while(!e.done)}(t[Symbol.iterator]())))))}))}(e):aH(e)?e:n(e)
|
|
13357
|
+
return yield i(yield*o(r(kH(function(e){return s(this,arguments,(function*(){let n=null
|
|
13358
|
+
do{n=yield i(e.next(yield yield i(yH(t,n))))}while(!n.done)}))}(a[Symbol.asyncIterator]()))))),yield i(new t)}))}const IH=t=>_H(Uint8Array,t)
|
|
13359
|
+
var MH={fromIterable:t=>$H(function*(t){let e,n,i,s,o=!1,r=[],a=0
|
|
13360
|
+
function l(){return"peek"===i?bH(r,s)[0]:([n,r,a]=bH(r,s),n)}({cmd:i,size:s}=(yield null)||{cmd:"read",size:0})
|
|
13361
|
+
const c=SH(t)[Symbol.iterator]()
|
|
13362
|
+
try{do{if(({done:e,value:n}=Number.isNaN(s-a)?c.next():c.next(s-a)),!e&&n.byteLength>0&&(r.push(n),a+=n.byteLength),e||s<=a)do{({cmd:i,size:s}=yield l())}while(s<a)}while(!e)}catch(t){(o=!0)&&"function"==typeof c.throw&&c.throw(t)}finally{!1===o&&"function"==typeof c.return&&c.return(null)}return null}(t)),fromAsyncIterable:t=>$H(function(t){return s(this,arguments,(function*(){let e,n,s,o,r=!1,a=[],l=0
|
|
13363
|
+
function c(){return"peek"===s?bH(a,o)[0]:([n,a,l]=bH(a,o),n)}({cmd:s,size:o}=(yield yield i(null))||{cmd:"read",size:0})
|
|
13364
|
+
const d=IH(t)[Symbol.asyncIterator]()
|
|
13365
|
+
try{do{if(({done:e,value:n}=Number.isNaN(o-l)?yield i(d.next()):yield i(d.next(o-l))),!e&&n.byteLength>0&&(a.push(n),l+=n.byteLength),e||o<=l)do{({cmd:s,size:o}=yield yield i(c()))}while(o<l)}while(!e)}catch(t){(r=!0)&&"function"==typeof d.throw&&(yield i(d.throw(t)))}finally{!1===r&&"function"==typeof d.return&&(yield i(d.return(new Uint8Array(0))))}return yield i(null)}))}(t)),fromDOMStream:t=>$H(function(t){return s(this,arguments,(function*(){let e,n,s,o=!1,r=!1,a=[],l=0
|
|
13366
|
+
function c(){return"peek"===n?bH(a,s)[0]:([e,a,l]=bH(a,s),e)}({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0})
|
|
13367
|
+
const d=new EH(t)
|
|
13368
|
+
try{do{if(({done:o,value:e}=Number.isNaN(s-l)?yield i(d.read()):yield i(d.read(s-l))),!o&&e.byteLength>0&&(a.push(CH(e)),l+=e.byteLength),o||s<=l)do{({cmd:n,size:s}=yield yield i(c()))}while(s<l)}while(!o)}catch(t){(r=!0)&&(yield i(d.cancel(t)))}finally{!1===r?yield i(d.cancel()):t.locked&&d.releaseLock()}return yield i(null)}))}(t)),fromNodeStream:t=>$H(function(t){return s(this,arguments,(function*(){const e=[]
|
|
13366
13369
|
let n,s,o,r="error",a=!1,l=null,c=0,d=[]
|
|
13367
|
-
function h(){return"peek"===n?
|
|
13368
|
-
try{e[0]=
|
|
13369
|
-
do{if(e[2]=
|
|
13370
|
-
if((a="end"===r)||(Number.isFinite(s-c)?(o=
|
|
13370
|
+
function h(){return"peek"===n?bH(d,s)[0]:([o,d,c]=bH(d,s),o)}if(({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0}),t.isTTY)return yield yield i(new Uint8Array(0)),yield i(null)
|
|
13371
|
+
try{e[0]=DH(t,"end"),e[1]=DH(t,"error")
|
|
13372
|
+
do{if(e[2]=DH(t,"readable"),[r,l]=yield i(Promise.race(e.map((t=>t[2])))),"error"===r)break
|
|
13373
|
+
if((a="end"===r)||(Number.isFinite(s-c)?(o=CH(t.read(s-c)),o.byteLength<s-c&&(o=CH(t.read()))):o=CH(t.read()),o.byteLength>0&&(d.push(o),c+=o.byteLength)),a||s<=c)do{({cmd:n,size:s}=yield yield i(h()))}while(s<c)}while(!a)}finally{yield i(u(e,"error"===r?l:null))}return yield i(null)
|
|
13371
13374
|
function u(e,n){return o=d=null,new Promise(((i,s)=>{for(const[n,i]of e)t.off(n,i)
|
|
13372
13375
|
try{const e=t.destroy
|
|
13373
13376
|
e&&e.call(t,n),n=void 0}catch(t){n=t||n}finally{null!=n?s(n):i()}}))}}))}(t)),toDOMStream(t,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(t,e){throw new Error('"toNodeStream" not available in this environment')}}
|
|
13374
|
-
const
|
|
13375
|
-
class
|
|
13377
|
+
const $H=t=>(t.next(),t)
|
|
13378
|
+
class EH{constructor(t){this.source=t,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch((()=>{}))}get closed(){return this.reader?this.reader.closed.catch((()=>{})):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(t){return e(this,void 0,void 0,(function*(){const{reader:e,source:n}=this
|
|
13376
13379
|
e&&(yield e.cancel(t).catch((()=>{}))),n&&n.locked&&this.releaseLock()}))}read(t){return e(this,void 0,void 0,(function*(){if(0===t)return{done:null==this.reader,value:new Uint8Array(0)}
|
|
13377
13380
|
const e=yield this.reader.read()
|
|
13378
|
-
return!e.done&&(e.value=
|
|
13381
|
+
return!e.done&&(e.value=CH(e)),e}))}}const DH=(t,e)=>{const n=t=>i([e,t])
|
|
13379
13382
|
let i
|
|
13380
13383
|
return[e,n,new Promise((s=>(i=s)&&t.once(e,n)))]}
|
|
13381
|
-
var
|
|
13382
|
-
!function(t){t[t.V1=0]="V1",t[t.V2=1]="V2",t[t.V3=2]="V3",t[t.V4=3]="V4",t[t.V5=4]="V5"}(
|
|
13383
|
-
const
|
|
13384
|
-
var
|
|
13385
|
-
!function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"}(
|
|
13386
|
-
let
|
|
13384
|
+
var AH,TH,OH,RH,FH,NH
|
|
13385
|
+
!function(t){t[t.V1=0]="V1",t[t.V2=1]="V2",t[t.V3=2]="V3",t[t.V4=3]="V4",t[t.V5=4]="V5"}(AH||(AH={})),function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"}(TH||(TH={})),function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"}(OH||(OH={})),function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"}(RH||(RH={})),function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"}(FH||(FH={})),function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(NH||(NH={}))
|
|
13386
|
+
const LH=new Int32Array(2),BH=new Float32Array(LH.buffer),PH=new Float64Array(LH.buffer),zH=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0]
|
|
13387
|
+
var VH
|
|
13388
|
+
!function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"}(VH||(VH={}))
|
|
13389
|
+
let HH=class t{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new t(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<<BigInt(32)))}readUint64(t){return BigInt.asUintN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<<BigInt(32)))}readFloat32(t){return LH[0]=this.readInt32(t),BH[0]}readFloat64(t){return LH[zH?0:1]=this.readInt32(t),LH[zH?1:0]=this.readInt32(t+4),PH[0]}writeInt8(t,e){this.bytes_[t]=e}writeUint8(t,e){this.bytes_[t]=e}writeInt16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeUint16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeInt32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeUint32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeInt64(t,e){this.writeInt32(t,Number(BigInt.asIntN(32,e))),this.writeInt32(t+4,Number(BigInt.asIntN(32,e>>BigInt(32))))}writeUint64(t,e){this.writeUint32(t,Number(BigInt.asUintN(32,e))),this.writeUint32(t+4,Number(BigInt.asUintN(32,e>>BigInt(32))))}writeFloat32(t,e){BH[0]=e,this.writeInt32(t,LH[0])}writeFloat64(t,e){PH[0]=e,this.writeInt32(t,LH[zH?0:1]),this.writeInt32(t+4,LH[zH?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.")
|
|
13387
13390
|
let t=""
|
|
13388
13391
|
for(let e=0;e<4;e++)t+=String.fromCharCode(this.readInt8(this.position_+4+e))
|
|
13389
13392
|
return t}__offset(t,e){const n=t-this.readInt32(t)
|
|
@@ -13391,19 +13394,19 @@ return e<this.readInt16(n)?this.readInt16(n+e):0}__union(t,e){return t.bb_pos=e+
|
|
|
13391
13394
|
const n=this.readInt32(t)
|
|
13392
13395
|
t+=4
|
|
13393
13396
|
const i=this.bytes_.subarray(t,t+n)
|
|
13394
|
-
return e===
|
|
13397
|
+
return e===VH.UTF8_BYTES?i:this.text_decoder_.decode(i)}__union_with_string(t,e){return"string"==typeof t?this.__string(e):this.__union(t,e)}__indirect(t){return t+this.readInt32(t)}__vector(t){return t+this.readInt32(t)+4}__vector_len(t){return this.readInt32(t+this.readInt32(t))}__has_identifier(t){if(4!=t.length)throw new Error("FlatBuffers: file identifier must be length 4")
|
|
13395
13398
|
for(let e=0;e<4;e++)if(t.charCodeAt(e)!=this.readInt8(this.position()+4+e))return!1
|
|
13396
13399
|
return!0}createScalarList(t,e){const n=[]
|
|
13397
13400
|
for(let i=0;i<e;++i){const e=t(i)
|
|
13398
13401
|
null!==e&&n.push(e)}return n}createObjList(t,e){const n=[]
|
|
13399
13402
|
for(let i=0;i<e;++i){const e=t(i)
|
|
13400
|
-
null!==e&&n.push(e.unpack())}return n}},
|
|
13401
|
-
this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder,e=t||1024,this.bb=
|
|
13403
|
+
null!==e&&n.push(e.unpack())}return n}},UH=class t{constructor(t){let e
|
|
13404
|
+
this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder,e=t||1024,this.bb=HH.allocate(e),this.space=e}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(t){this.force_defaults=t}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,n){e>this.minalign&&(this.minalign=e)
|
|
13402
13405
|
const i=1+~(this.bb.capacity()-this.space+n)&e-1
|
|
13403
13406
|
for(;this.space<i+e+n;){const e=this.bb.capacity()
|
|
13404
13407
|
this.bb=t.growByteBuffer(this.bb),this.space+=this.bb.capacity()-e}this.pad(i)}pad(t){for(let e=0;e<t;e++)this.bb.writeInt8(--this.space,0)}writeInt8(t){this.bb.writeInt8(this.space-=1,t)}writeInt16(t){this.bb.writeInt16(this.space-=2,t)}writeInt32(t){this.bb.writeInt32(this.space-=4,t)}writeInt64(t){this.bb.writeInt64(this.space-=8,t)}writeFloat32(t){this.bb.writeFloat32(this.space-=4,t)}writeFloat64(t){this.bb.writeFloat64(this.space-=8,t)}addInt8(t){this.prep(1,0),this.writeInt8(t)}addInt16(t){this.prep(2,0),this.writeInt16(t)}addInt32(t){this.prep(4,0),this.writeInt32(t)}addInt64(t){this.prep(8,0),this.writeInt64(t)}addFloat32(t){this.prep(4,0),this.writeFloat32(t)}addFloat64(t){this.prep(8,0),this.writeFloat64(t)}addFieldInt8(t,e,n){(this.force_defaults||e!=n)&&(this.addInt8(e),this.slot(t))}addFieldInt16(t,e,n){(this.force_defaults||e!=n)&&(this.addInt16(e),this.slot(t))}addFieldInt32(t,e,n){(this.force_defaults||e!=n)&&(this.addInt32(e),this.slot(t))}addFieldInt64(t,e,n){(this.force_defaults||e!==n)&&(this.addInt64(e),this.slot(t))}addFieldFloat32(t,e,n){(this.force_defaults||e!=n)&&(this.addFloat32(e),this.slot(t))}addFieldFloat64(t,e,n){(this.force_defaults||e!=n)&&(this.addFloat64(e),this.slot(t))}addFieldOffset(t,e,n){(this.force_defaults||e!=n)&&(this.addOffset(e),this.slot(t))}addFieldStruct(t,e,n){e!=n&&(this.nested(e),this.slot(t))}nested(t){if(t!=this.offset())throw new TypeError("FlatBuffers: struct must be serialized inline.")}notNested(){if(this.isNested)throw new TypeError("FlatBuffers: object serialization must not be nested.")}slot(t){null!==this.vtable&&(this.vtable[t]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(t){const e=t.capacity()
|
|
13405
13408
|
if(3221225472&e)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.")
|
|
13406
|
-
const n=e<<1,i=
|
|
13409
|
+
const n=e<<1,i=HH.allocate(n)
|
|
13407
13410
|
return i.setPosition(n-e),i.bytes().set(t.bytes(),n-e),i}addOffset(t){this.prep(4,0),this.writeInt32(this.offset()-t+4)}startObject(t){this.notNested(),null==this.vtable&&(this.vtable=[]),this.vtable_in_use=t
|
|
13408
13411
|
for(let e=0;e<t;e++)this.vtable[e]=0
|
|
13409
13412
|
this.isNested=!0,this.object_start=this.offset()}endObject(){if(null==this.vtable||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject")
|
|
@@ -13433,105 +13436,105 @@ return e=t instanceof Uint8Array?t:this.text_encoder.encode(t),this.addInt8(0),t
|
|
|
13433
13436
|
for(let n=0;n<t.length;++n){const i=t[n]
|
|
13434
13437
|
if(null===i)throw new TypeError("FlatBuffers: Argument for createObjectOffsetList cannot contain null.")
|
|
13435
13438
|
e.push(this.createObjectOffset(i))}return e}createStructOffsetList(t,e){return e(this,t.length),this.createObjectOffsetList(t.slice().reverse()),this.endVector()}}
|
|
13436
|
-
var
|
|
13437
|
-
!function(t){t[t.BUFFER=0]="BUFFER"}(
|
|
13438
|
-
class
|
|
13439
|
-
return t?this.bb.readInt8(this.bb_pos+t):
|
|
13440
|
-
return t?this.bb.readInt8(this.bb_pos+t):
|
|
13439
|
+
var qH,jH
|
|
13440
|
+
!function(t){t[t.BUFFER=0]="BUFFER"}(qH||(qH={})),function(t){t[t.LZ4_FRAME=0]="LZ4_FRAME",t[t.ZSTD=1]="ZSTD"}(jH||(jH={}))
|
|
13441
|
+
class WH{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBodyCompression(t,e){return(e||new WH).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBodyCompression(t,e){return t.setPosition(t.position()+4),(e||new WH).__init(t.readInt32(t.position())+t.position(),t)}codec(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13442
|
+
return t?this.bb.readInt8(this.bb_pos+t):jH.LZ4_FRAME}method(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13443
|
+
return t?this.bb.readInt8(this.bb_pos+t):qH.BUFFER}static startBodyCompression(t){t.startObject(2)}static addCodec(t,e){t.addFieldInt8(0,e,jH.LZ4_FRAME)}static addMethod(t,e){t.addFieldInt8(1,e,qH.BUFFER)}static endBodyCompression(t){return t.endObject()}static createBodyCompression(t,e,n){return WH.startBodyCompression(t),WH.addCodec(t,e),WH.addMethod(t,n),WH.endBodyCompression(t)}}class GH{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(t,e,n){return t.prep(8,16),t.writeInt64(BigInt(null!=n?n:0)),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}}let ZH=class{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(t,e,n){return t.prep(8,16),t.writeInt64(BigInt(null!=n?n:0)),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}},KH=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsRecordBatch(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}length(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13441
13444
|
return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}nodes(t,e){const n=this.bb.__offset(this.bb_pos,6)
|
|
13442
|
-
return n?(e||new
|
|
13445
|
+
return n?(e||new ZH).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}nodesLength(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13443
13446
|
return t?this.bb.__vector_len(this.bb_pos+t):0}buffers(t,e){const n=this.bb.__offset(this.bb_pos,8)
|
|
13444
|
-
return n?(e||new
|
|
13447
|
+
return n?(e||new GH).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}buffersLength(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13445
13448
|
return t?this.bb.__vector_len(this.bb_pos+t):0}compression(t){const e=this.bb.__offset(this.bb_pos,10)
|
|
13446
|
-
return e?(t||new
|
|
13449
|
+
return e?(t||new WH).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}static startRecordBatch(t){t.startObject(4)}static addLength(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addNodes(t,e){t.addFieldOffset(1,e,0)}static startNodesVector(t,e){t.startVector(16,e,8)}static addBuffers(t,e){t.addFieldOffset(2,e,0)}static startBuffersVector(t,e){t.startVector(16,e,8)}static addCompression(t,e){t.addFieldOffset(3,e,0)}static endRecordBatch(t){return t.endObject()}},YH=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDictionaryBatch(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}id(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13447
13450
|
return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}data(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13448
|
-
return e?(t||new
|
|
13451
|
+
return e?(t||new KH).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}isDelta(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13449
13452
|
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startDictionaryBatch(t){t.startObject(3)}static addId(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addData(t,e){t.addFieldOffset(1,e,0)}static addIsDelta(t,e){t.addFieldInt8(2,+e,0)}static endDictionaryBatch(t){return t.endObject()}}
|
|
13450
|
-
var
|
|
13451
|
-
!function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"}(
|
|
13452
|
-
class
|
|
13453
|
+
var XH,JH
|
|
13454
|
+
!function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"}(XH||(XH={})),function(t){t[t.DenseArray=0]="DenseArray"}(JH||(JH={}))
|
|
13455
|
+
class QH{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsInt(t,e){return(e||new QH).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInt(t,e){return t.setPosition(t.position()+4),(e||new QH).__init(t.readInt32(t.position())+t.position(),t)}bitWidth(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13453
13456
|
return t?this.bb.readInt32(this.bb_pos+t):0}isSigned(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13454
|
-
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startInt(t){t.startObject(2)}static addBitWidth(t,e){t.addFieldInt32(0,e,0)}static addIsSigned(t,e){t.addFieldInt8(1,+e,0)}static endInt(t){return t.endObject()}static createInt(t,e,n){return
|
|
13457
|
+
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startInt(t){t.startObject(2)}static addBitWidth(t,e){t.addFieldInt32(0,e,0)}static addIsSigned(t,e){t.addFieldInt8(1,+e,0)}static endInt(t){return t.endObject()}static createInt(t,e,n){return QH.startInt(t),QH.addBitWidth(t,e),QH.addIsSigned(t,n),QH.endInt(t)}}class tU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDictionaryEncoding(t,e){return(e||new tU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryEncoding(t,e){return t.setPosition(t.position()+4),(e||new tU).__init(t.readInt32(t.position())+t.position(),t)}id(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13455
13458
|
return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}indexType(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13456
|
-
return e?(t||new
|
|
13459
|
+
return e?(t||new QH).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}isOrdered(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13457
13460
|
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}dictionaryKind(){const t=this.bb.__offset(this.bb_pos,10)
|
|
13458
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13461
|
+
return t?this.bb.readInt16(this.bb_pos+t):JH.DenseArray}static startDictionaryEncoding(t){t.startObject(4)}static addId(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addIndexType(t,e){t.addFieldOffset(1,e,0)}static addIsOrdered(t,e){t.addFieldInt8(2,+e,0)}static addDictionaryKind(t,e){t.addFieldInt16(3,e,JH.DenseArray)}static endDictionaryEncoding(t){return t.endObject()}}class eU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsKeyValue(t,e){return(e||new eU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsKeyValue(t,e){return t.setPosition(t.position()+4),(e||new eU).__init(t.readInt32(t.position())+t.position(),t)}key(t){const e=this.bb.__offset(this.bb_pos,4)
|
|
13459
13462
|
return e?this.bb.__string(this.bb_pos+e,t):null}value(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13460
|
-
return e?this.bb.__string(this.bb_pos+e,t):null}static startKeyValue(t){t.startObject(2)}static addKey(t,e){t.addFieldOffset(0,e,0)}static addValue(t,e){t.addFieldOffset(1,e,0)}static endKeyValue(t){return t.endObject()}static createKeyValue(t,e,n){return
|
|
13461
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13463
|
+
return e?this.bb.__string(this.bb_pos+e,t):null}static startKeyValue(t){t.startObject(2)}static addKey(t,e){t.addFieldOffset(0,e,0)}static addValue(t,e){t.addFieldOffset(1,e,0)}static endKeyValue(t){return t.endObject()}static createKeyValue(t,e,n){return eU.startKeyValue(t),eU.addKey(t,e),eU.addValue(t,n),eU.endKeyValue(t)}}let nU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(t){t.startObject(0)}static endBinary(t){return t.endObject()}static createBinary(e){return t.startBinary(e),t.endBinary(e)}},iU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBool(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBool(t){t.startObject(0)}static endBool(t){return t.endObject()}static createBool(e){return t.startBool(e),t.endBool(e)}},sU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDate(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13464
|
+
return t?this.bb.readInt16(this.bb_pos+t):RH.MILLISECOND}static startDate(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,RH.MILLISECOND)}static endDate(t){return t.endObject()}static createDate(e,n){return t.startDate(e),t.addUnit(e,n),t.endDate(e)}},oU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDecimal(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}precision(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13462
13465
|
return t?this.bb.readInt32(this.bb_pos+t):0}scale(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13463
13466
|
return t?this.bb.readInt32(this.bb_pos+t):0}bitWidth(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13464
|
-
return t?this.bb.readInt32(this.bb_pos+t):128}static startDecimal(t){t.startObject(3)}static addPrecision(t,e){t.addFieldInt32(0,e,0)}static addScale(t,e){t.addFieldInt32(1,e,0)}static addBitWidth(t,e){t.addFieldInt32(2,e,128)}static endDecimal(t){return t.endObject()}static createDecimal(e,n,i,s){return t.startDecimal(e),t.addPrecision(e,n),t.addScale(e,i),t.addBitWidth(e,s),t.endDecimal(e)}},
|
|
13465
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13466
|
-
return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeBinary(t){t.startObject(1)}static addByteWidth(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeBinary(t){return t.endObject()}static createFixedSizeBinary(e,n){return t.startFixedSizeBinary(e),t.addByteWidth(e,n),t.endFixedSizeBinary(e)}},
|
|
13467
|
+
return t?this.bb.readInt32(this.bb_pos+t):128}static startDecimal(t){t.startObject(3)}static addPrecision(t,e){t.addFieldInt32(0,e,0)}static addScale(t,e){t.addFieldInt32(1,e,0)}static addBitWidth(t,e){t.addFieldInt32(2,e,128)}static endDecimal(t){return t.endObject()}static createDecimal(e,n,i,s){return t.startDecimal(e),t.addPrecision(e,n),t.addScale(e,i),t.addBitWidth(e,s),t.endDecimal(e)}},rU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDuration(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13468
|
+
return t?this.bb.readInt16(this.bb_pos+t):FH.MILLISECOND}static startDuration(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,FH.MILLISECOND)}static endDuration(t){return t.endObject()}static createDuration(e,n){return t.startDuration(e),t.addUnit(e,n),t.endDuration(e)}},aU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFixedSizeBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13469
|
+
return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeBinary(t){t.startObject(1)}static addByteWidth(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeBinary(t){return t.endObject()}static createFixedSizeBinary(e,n){return t.startFixedSizeBinary(e),t.addByteWidth(e,n),t.endFixedSizeBinary(e)}},lU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFixedSizeList(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13467
13470
|
return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeList(t){t.startObject(1)}static addListSize(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeList(t){return t.endObject()}static createFixedSizeList(e,n){return t.startFixedSizeList(e),t.addListSize(e,n),t.endFixedSizeList(e)}}
|
|
13468
|
-
class
|
|
13469
|
-
return t?this.bb.readInt16(this.bb_pos+t)
|
|
13470
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13471
|
-
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startMap(t){t.startObject(1)}static addKeysSorted(t,e){t.addFieldInt8(0,+e,0)}static endMap(t){return t.endObject()}static createMap(e,n){return t.startMap(e),t.addKeysSorted(e,n),t.endMap(e)}},
|
|
13472
|
-
class
|
|
13473
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13474
|
-
return t?this.bb.readInt32(this.bb_pos+t):32}static startTime(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,
|
|
13475
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13476
|
-
return e?this.bb.__string(this.bb_pos+e,t):null}static startTimestamp(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,
|
|
13477
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13471
|
+
class cU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFloatingPoint(t,e){return(e||new cU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFloatingPoint(t,e){return t.setPosition(t.position()+4),(e||new cU).__init(t.readInt32(t.position())+t.position(),t)}precision(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13472
|
+
return t?this.bb.readInt16(this.bb_pos+t):OH.HALF}static startFloatingPoint(t){t.startObject(1)}static addPrecision(t,e){t.addFieldInt16(0,e,OH.HALF)}static endFloatingPoint(t){return t.endObject()}static createFloatingPoint(t,e){return cU.startFloatingPoint(t),cU.addPrecision(t,e),cU.endFloatingPoint(t)}}class dU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsInterval(t,e){return(e||new dU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInterval(t,e){return t.setPosition(t.position()+4),(e||new dU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13473
|
+
return t?this.bb.readInt16(this.bb_pos+t):NH.YEAR_MONTH}static startInterval(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,NH.YEAR_MONTH)}static endInterval(t){return t.endObject()}static createInterval(t,e){return dU.startInterval(t),dU.addUnit(t,e),dU.endInterval(t)}}let hU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsLargeBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(t){t.startObject(0)}static endLargeBinary(t){return t.endObject()}static createLargeBinary(e){return t.startLargeBinary(e),t.endLargeBinary(e)}},uU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsLargeUtf8(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(t){t.startObject(0)}static endLargeUtf8(t){return t.endObject()}static createLargeUtf8(e){return t.startLargeUtf8(e),t.endLargeUtf8(e)}},pU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsList(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startList(t){t.startObject(0)}static endList(t){return t.endObject()}static createList(e){return t.startList(e),t.endList(e)}},fU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMap(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13474
|
+
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startMap(t){t.startObject(1)}static addKeysSorted(t,e){t.addFieldInt8(0,+e,0)}static endMap(t){return t.endObject()}static createMap(e,n){return t.startMap(e),t.addKeysSorted(e,n),t.endMap(e)}},mU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsNull(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startNull(t){t.startObject(0)}static endNull(t){return t.endObject()}static createNull(e){return t.startNull(e),t.endNull(e)}}
|
|
13475
|
+
class gU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsStruct_(t,e){return(e||new gU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsStruct_(t,e){return t.setPosition(t.position()+4),(e||new gU).__init(t.readInt32(t.position())+t.position(),t)}static startStruct_(t){t.startObject(0)}static endStruct_(t){return t.endObject()}static createStruct_(t){return gU.startStruct_(t),gU.endStruct_(t)}}class vU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsTime(t,e){return(e||new vU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTime(t,e){return t.setPosition(t.position()+4),(e||new vU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13476
|
+
return t?this.bb.readInt16(this.bb_pos+t):FH.MILLISECOND}bitWidth(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13477
|
+
return t?this.bb.readInt32(this.bb_pos+t):32}static startTime(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,FH.MILLISECOND)}static addBitWidth(t,e){t.addFieldInt32(1,e,32)}static endTime(t){return t.endObject()}static createTime(t,e,n){return vU.startTime(t),vU.addUnit(t,e),vU.addBitWidth(t,n),vU.endTime(t)}}class bU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsTimestamp(t,e){return(e||new bU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTimestamp(t,e){return t.setPosition(t.position()+4),(e||new bU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13478
|
+
return t?this.bb.readInt16(this.bb_pos+t):FH.SECOND}timezone(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13479
|
+
return e?this.bb.__string(this.bb_pos+e,t):null}static startTimestamp(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,FH.SECOND)}static addTimezone(t,e){t.addFieldOffset(1,e,0)}static endTimestamp(t){return t.endObject()}static createTimestamp(t,e,n){return bU.startTimestamp(t),bU.addUnit(t,e),bU.addTimezone(t,n),bU.endTimestamp(t)}}class yU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUnion(t,e){return(e||new yU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUnion(t,e){return t.setPosition(t.position()+4),(e||new yU).__init(t.readInt32(t.position())+t.position(),t)}mode(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13480
|
+
return t?this.bb.readInt16(this.bb_pos+t):TH.Sparse}typeIds(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13478
13481
|
return e?this.bb.readInt32(this.bb.__vector(this.bb_pos+e)+4*t):0}typeIdsLength(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13479
13482
|
return t?this.bb.__vector_len(this.bb_pos+t):0}typeIdsArray(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13480
|
-
return t?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}static startUnion(t){t.startObject(2)}static addMode(t,e){t.addFieldInt16(0,e,
|
|
13483
|
+
return t?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}static startUnion(t){t.startObject(2)}static addMode(t,e){t.addFieldInt16(0,e,TH.Sparse)}static addTypeIds(t,e){t.addFieldOffset(1,e,0)}static createTypeIdsVector(t,e){t.startVector(4,e.length,4)
|
|
13481
13484
|
for(let n=e.length-1;n>=0;n--)t.addInt32(e[n])
|
|
13482
|
-
return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return
|
|
13483
|
-
var
|
|
13484
|
-
!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.FloatingPoint=3]="FloatingPoint",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct_=13]="Struct_",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.RunEndEncoded=22]="RunEndEncoded"}(
|
|
13485
|
-
let
|
|
13485
|
+
return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return yU.startUnion(t),yU.addMode(t,e),yU.addTypeIds(t,n),yU.endUnion(t)}}let wU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUtf8(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(e){return t.startUtf8(e),t.endUtf8(e)}}
|
|
13486
|
+
var xU
|
|
13487
|
+
!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.FloatingPoint=3]="FloatingPoint",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct_=13]="Struct_",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.RunEndEncoded=22]="RunEndEncoded"}(xU||(xU={}))
|
|
13488
|
+
let CU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsField(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}name(t){const e=this.bb.__offset(this.bb_pos,4)
|
|
13486
13489
|
return e?this.bb.__string(this.bb_pos+e,t):null}nullable(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13487
13490
|
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}typeType(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13488
|
-
return t?this.bb.readUint8(this.bb_pos+t):
|
|
13491
|
+
return t?this.bb.readUint8(this.bb_pos+t):xU.NONE}type(t){const e=this.bb.__offset(this.bb_pos,10)
|
|
13489
13492
|
return e?this.bb.__union(t,this.bb_pos+e):null}dictionary(t){const e=this.bb.__offset(this.bb_pos,12)
|
|
13490
|
-
return e?(t||new
|
|
13493
|
+
return e?(t||new tU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(e,n){const i=this.bb.__offset(this.bb_pos,14)
|
|
13491
13494
|
return i?(n||new t).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+4*e),this.bb):null}childrenLength(){const t=this.bb.__offset(this.bb_pos,14)
|
|
13492
13495
|
return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,16)
|
|
13493
|
-
return n?(e||new
|
|
13494
|
-
return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,
|
|
13496
|
+
return n?(e||new eU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16)
|
|
13497
|
+
return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,xU.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4)
|
|
13495
13498
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13496
13499
|
return t.endVector()}static startChildrenVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(6,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
|
|
13497
13500
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13498
|
-
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},
|
|
13499
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13500
|
-
return n?(e||new
|
|
13501
|
+
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},kU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsSchema(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13502
|
+
return t?this.bb.readInt16(this.bb_pos+t):XH.Little}fields(t,e){const n=this.bb.__offset(this.bb_pos,6)
|
|
13503
|
+
return n?(e||new CU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13501
13504
|
return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,8)
|
|
13502
|
-
return n?(e||new
|
|
13505
|
+
return n?(e||new eU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13503
13506
|
return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){const e=this.bb.__offset(this.bb_pos,10)
|
|
13504
13507
|
return e?this.bb.readInt64(this.bb.__vector(this.bb_pos+e)+8*t):BigInt(0)}featuresLength(){const t=this.bb.__offset(this.bb_pos,10)
|
|
13505
|
-
return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,
|
|
13508
|
+
return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,XH.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4)
|
|
13506
13509
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13507
13510
|
return t.endVector()}static startFieldsVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(2,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
|
|
13508
13511
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13509
13512
|
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static addFeatures(t,e){t.addFieldOffset(3,e,0)}static createFeaturesVector(t,e){t.startVector(8,e.length,8)
|
|
13510
13513
|
for(let n=e.length-1;n>=0;n--)t.addInt64(e[n])
|
|
13511
13514
|
return t.endVector()}static startFeaturesVector(t,e){t.startVector(8,e,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,e){t.finish(e)}static finishSizePrefixedSchemaBuffer(t,e){t.finish(e,void 0,!0)}static createSchema(e,n,i,s,o){return t.startSchema(e),t.addEndianness(e,n),t.addFields(e,i),t.addCustomMetadata(e,s),t.addFeatures(e,o),t.endSchema(e)}}
|
|
13512
|
-
var
|
|
13513
|
-
!function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"}(
|
|
13514
|
-
function
|
|
13515
|
+
var SU,_U,IU
|
|
13516
|
+
!function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"}(SU||(SU={})),function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond"}(_U||(_U={})),function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"}(IU||(IU={}))
|
|
13517
|
+
function MU(t){if(null===t)return"null"
|
|
13515
13518
|
if(undefined===t)return"undefined"
|
|
13516
13519
|
switch(typeof t){case"number":case"bigint":return`${t}`
|
|
13517
|
-
case"string":return`"${t}"`}return"function"==typeof t[Symbol.toPrimitive]?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map((t=>
|
|
13518
|
-
return Number(t)}function
|
|
13519
|
-
function
|
|
13520
|
-
case"string":return
|
|
13521
|
-
case"default":return function(t){if(8===t.byteLength){return new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}return
|
|
13522
|
-
const
|
|
13523
|
-
function
|
|
13520
|
+
case"string":return`"${t}"`}return"function"==typeof t[Symbol.toPrimitive]?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map((t=>MU(t)))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,((t,e)=>"bigint"==typeof e?`${e}`:e))}function $U(t){if("bigint"==typeof t&&(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`)
|
|
13521
|
+
return Number(t)}function EU(t,e){return $U(t/e)+$U(t%e)/$U(e)}const DU=Symbol.for("isArrowBigNum")
|
|
13522
|
+
function AU(t,...e){return 0===e.length?Object.setPrototypeOf(yH(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}function TU(...t){return AU.apply(this,t)}function OU(...t){return AU.apply(this,t)}function RU(...t){return AU.apply(this,t)}AU.prototype[DU]=!0,AU.prototype.toJSON=function(){return`"${LU(this)}"`},AU.prototype.valueOf=function(t){return NU(this,t)},AU.prototype.toString=function(){return LU(this)},AU.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return NU(this)
|
|
13523
|
+
case"string":return LU(this)
|
|
13524
|
+
case"default":return function(t){if(8===t.byteLength){return new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}return LU(t)}(this)}return LU(this)},Object.setPrototypeOf(TU.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(OU.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(RU.prototype,Object.create(Uint32Array.prototype)),Object.assign(TU.prototype,AU.prototype,{constructor:TU,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(OU.prototype,AU.prototype,{constructor:OU,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(RU.prototype,AU.prototype,{constructor:RU,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array})
|
|
13525
|
+
const FU=BigInt(4294967296)*BigInt(4294967296)-BigInt(1)
|
|
13526
|
+
function NU(t,e){const{buffer:n,byteOffset:i,byteLength:s,signed:o}=t,r=new BigUint64Array(n,i,s/8),a=o&&r.at(-1)&BigInt(1)<<BigInt(63)
|
|
13524
13527
|
let l=BigInt(0),c=0
|
|
13525
|
-
if(a){for(const t of r)l|=(t^
|
|
13528
|
+
if(a){for(const t of r)l|=(t^FU)*(BigInt(1)<<BigInt(64*c++))
|
|
13526
13529
|
l*=BigInt(-1),l-=BigInt(1)}else for(const t of r)l|=t*(BigInt(1)<<BigInt(64*c++))
|
|
13527
13530
|
if("number"==typeof e){const t=BigInt(Math.pow(10,e)),n=l%t
|
|
13528
|
-
return
|
|
13531
|
+
return $U(l/t)+$U(n)/$U(t)}return $U(l)}function LU(t){if(8===t.byteLength){return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`}if(!t.signed)return BU(t)
|
|
13529
13532
|
let e=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2)
|
|
13530
|
-
if(new Int16Array([e.at(-1)])[0]>=0)return
|
|
13533
|
+
if(new Int16Array([e.at(-1)])[0]>=0)return BU(t)
|
|
13531
13534
|
e=e.slice()
|
|
13532
13535
|
let n=1
|
|
13533
13536
|
for(let t=0;t<e.length;t++){const i=e[t],s=~i+n
|
|
13534
|
-
e[t]=s,n&=0===i?1:0}return`-${
|
|
13537
|
+
e[t]=s,n&=0===i?1:0}return`-${BU(e)}`}function BU(t){let e=""
|
|
13535
13538
|
const n=new Uint32Array(2)
|
|
13536
13539
|
let i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2)
|
|
13537
13540
|
const s=new Uint32Array((i=new Uint16Array(i).reverse()).buffer)
|
|
@@ -13539,269 +13542,269 @@ let o=-1
|
|
|
13539
13542
|
const r=i.length-1
|
|
13540
13543
|
do{for(n[0]=i[o=0];o<r;)i[o++]=n[1]=n[0]/10,n[0]=(n[0]-10*n[1]<<16)+i[o]
|
|
13541
13544
|
i[o]=n[1]=n[0]/10,n[0]=n[0]-10*n[1],e=`${n[0]}${e}`}while(s[0]||s[1]||s[2]||s[3])
|
|
13542
|
-
return null!=e?e:"0"}class
|
|
13543
|
-
case!1:return new
|
|
13544
|
-
class
|
|
13545
|
-
class
|
|
13546
|
-
class
|
|
13545
|
+
return null!=e?e:"0"}class PU{static new(t,e){switch(e){case!0:return new TU(t)
|
|
13546
|
+
case!1:return new OU(t)}switch(t.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new TU(t)}return 16===t.byteLength?new RU(t):new OU(t)}static signed(t){return new TU(t)}static unsigned(t){return new OU(t)}static decimal(t){return new RU(t)}constructor(t,e){return PU.new(t,e)}}var zU,VU,HU,UU,qU,jU,WU,GU,ZU,KU,YU,XU,JU,QU,tq,eq,nq,iq,sq,oq,rq,aq,lq
|
|
13547
|
+
class cq{static isNull(t){return(null==t?void 0:t.typeId)===_U.Null}static isInt(t){return(null==t?void 0:t.typeId)===_U.Int}static isFloat(t){return(null==t?void 0:t.typeId)===_U.Float}static isBinary(t){return(null==t?void 0:t.typeId)===_U.Binary}static isLargeBinary(t){return(null==t?void 0:t.typeId)===_U.LargeBinary}static isUtf8(t){return(null==t?void 0:t.typeId)===_U.Utf8}static isLargeUtf8(t){return(null==t?void 0:t.typeId)===_U.LargeUtf8}static isBool(t){return(null==t?void 0:t.typeId)===_U.Bool}static isDecimal(t){return(null==t?void 0:t.typeId)===_U.Decimal}static isDate(t){return(null==t?void 0:t.typeId)===_U.Date}static isTime(t){return(null==t?void 0:t.typeId)===_U.Time}static isTimestamp(t){return(null==t?void 0:t.typeId)===_U.Timestamp}static isInterval(t){return(null==t?void 0:t.typeId)===_U.Interval}static isDuration(t){return(null==t?void 0:t.typeId)===_U.Duration}static isList(t){return(null==t?void 0:t.typeId)===_U.List}static isStruct(t){return(null==t?void 0:t.typeId)===_U.Struct}static isUnion(t){return(null==t?void 0:t.typeId)===_U.Union}static isFixedSizeBinary(t){return(null==t?void 0:t.typeId)===_U.FixedSizeBinary}static isFixedSizeList(t){return(null==t?void 0:t.typeId)===_U.FixedSizeList}static isMap(t){return(null==t?void 0:t.typeId)===_U.Map}static isDictionary(t){return(null==t?void 0:t.typeId)===_U.Dictionary}static isDenseUnion(t){return cq.isUnion(t)&&t.mode===TH.Dense}static isSparseUnion(t){return cq.isUnion(t)&&t.mode===TH.Sparse}constructor(t){this.typeId=t}}zU=Symbol.toStringTag,cq[zU]=((lq=cq.prototype).children=null,lq.ArrayType=Array,lq.OffsetArrayType=Int32Array,lq[Symbol.toStringTag]="DataType")
|
|
13548
|
+
class dq extends cq{constructor(){super(_U.Null)}toString(){return"Null"}}VU=Symbol.toStringTag,dq[VU]=(t=>t[Symbol.toStringTag]="Null")(dq.prototype)
|
|
13549
|
+
class hq extends cq{constructor(t,e){super(_U.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array
|
|
13547
13550
|
case 16:return this.isSigned?Int16Array:Uint16Array
|
|
13548
13551
|
case 32:return this.isSigned?Int32Array:Uint32Array
|
|
13549
|
-
case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}
|
|
13550
|
-
class
|
|
13551
|
-
class
|
|
13552
|
-
case
|
|
13553
|
-
case
|
|
13554
|
-
class
|
|
13555
|
-
class
|
|
13556
|
-
class
|
|
13557
|
-
class
|
|
13558
|
-
class
|
|
13559
|
-
class
|
|
13560
|
-
class
|
|
13561
|
-
class
|
|
13562
|
-
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}
|
|
13563
|
-
class
|
|
13564
|
-
class
|
|
13565
|
-
class
|
|
13566
|
-
class
|
|
13567
|
-
class
|
|
13568
|
-
class
|
|
13569
|
-
class
|
|
13570
|
-
class
|
|
13571
|
-
class
|
|
13572
|
-
if(super(
|
|
13552
|
+
case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}HU=Symbol.toStringTag,hq[HU]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(hq.prototype)
|
|
13553
|
+
class uq extends hq{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(uq.prototype,"ArrayType",{value:Int32Array})
|
|
13554
|
+
class pq extends cq{constructor(t){super(_U.Float),this.precision=t}get ArrayType(){switch(this.precision){case OH.HALF:return Uint16Array
|
|
13555
|
+
case OH.SINGLE:return Float32Array
|
|
13556
|
+
case OH.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}UU=Symbol.toStringTag,pq[UU]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(pq.prototype)
|
|
13557
|
+
class fq extends cq{constructor(){super(_U.Binary)}toString(){return"Binary"}}qU=Symbol.toStringTag,fq[qU]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(fq.prototype)
|
|
13558
|
+
class mq extends cq{constructor(){super(_U.LargeBinary)}toString(){return"LargeBinary"}}jU=Symbol.toStringTag,mq[jU]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(mq.prototype)
|
|
13559
|
+
class gq extends cq{constructor(){super(_U.Utf8)}toString(){return"Utf8"}}WU=Symbol.toStringTag,gq[WU]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(gq.prototype)
|
|
13560
|
+
class vq extends cq{constructor(){super(_U.LargeUtf8)}toString(){return"LargeUtf8"}}GU=Symbol.toStringTag,vq[GU]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(vq.prototype)
|
|
13561
|
+
class bq extends cq{constructor(){super(_U.Bool)}toString(){return"Bool"}}ZU=Symbol.toStringTag,bq[ZU]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(bq.prototype)
|
|
13562
|
+
class yq extends cq{constructor(t,e,n=128){super(_U.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}KU=Symbol.toStringTag,yq[KU]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(yq.prototype)
|
|
13563
|
+
class wq extends cq{constructor(t){super(_U.Date),this.unit=t}toString(){return`Date${32*(this.unit+1)}<${RH[this.unit]}>`}get ArrayType(){return this.unit===RH.DAY?Int32Array:BigInt64Array}}YU=Symbol.toStringTag,wq[YU]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(wq.prototype)
|
|
13564
|
+
class xq extends cq{constructor(t,e){super(_U.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${FH[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array
|
|
13565
|
+
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}XU=Symbol.toStringTag,xq[XU]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(xq.prototype)
|
|
13566
|
+
class Cq extends cq{constructor(t,e){super(_U.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${FH[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}JU=Symbol.toStringTag,Cq[JU]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(Cq.prototype)
|
|
13567
|
+
class kq extends cq{constructor(t){super(_U.Interval),this.unit=t}toString(){return`Interval<${NH[this.unit]}>`}}QU=Symbol.toStringTag,kq[QU]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(kq.prototype)
|
|
13568
|
+
class Sq extends cq{constructor(t){super(_U.Duration),this.unit=t}toString(){return`Duration<${FH[this.unit]}>`}}tq=Symbol.toStringTag,Sq[tq]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(Sq.prototype)
|
|
13569
|
+
class _q extends cq{constructor(t){super(_U.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}eq=Symbol.toStringTag,_q[eq]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(_q.prototype)
|
|
13570
|
+
class Iq extends cq{constructor(t){super(_U.Struct),this.children=t}toString(){return`Struct<{${this.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}nq=Symbol.toStringTag,Iq[nq]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))(Iq.prototype)
|
|
13571
|
+
class Mq extends cq{constructor(t,e,n){super(_U.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce(((t,e,n)=>(t[e]=n)&&t||t),Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map((t=>`${t.type}`)).join(" | ")}>`}}iq=Symbol.toStringTag,Mq[iq]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(Mq.prototype)
|
|
13572
|
+
class $q extends cq{constructor(t){super(_U.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}sq=Symbol.toStringTag,$q[sq]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))($q.prototype)
|
|
13573
|
+
class Eq extends cq{constructor(t,e){super(_U.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}oq=Symbol.toStringTag,Eq[oq]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(Eq.prototype)
|
|
13574
|
+
class Dq extends cq{constructor(t,e=!1){var n,i,s
|
|
13575
|
+
if(super(_U.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",null===(n=null==t?void 0:t.type)||void 0===n?void 0:n.children)){const e=null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.children[0]
|
|
13573
13576
|
e&&(e.name="key")
|
|
13574
13577
|
const n=null===(s=null==t?void 0:t.type)||void 0===s?void 0:s.children[1]
|
|
13575
|
-
n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}
|
|
13576
|
-
const
|
|
13577
|
-
var
|
|
13578
|
-
class
|
|
13579
|
-
switch(t.typeId){case
|
|
13580
|
-
case
|
|
13581
|
-
case
|
|
13582
|
-
case
|
|
13583
|
-
default:return 1}}
|
|
13584
|
-
class
|
|
13585
|
-
if("string"==typeof e&&e in
|
|
13586
|
-
if(e&&e instanceof
|
|
13587
|
-
if((null==e?void 0:e.type)&&e.type instanceof
|
|
13588
|
-
return
|
|
13589
|
-
switch(e){case
|
|
13578
|
+
n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}rq=Symbol.toStringTag,Dq[rq]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(Dq.prototype)
|
|
13579
|
+
const Aq=(Tq=-1,()=>++Tq)
|
|
13580
|
+
var Tq
|
|
13581
|
+
class Oq extends cq{constructor(t,e,n,i){super(_U.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=null==n?Aq():$U(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}function Rq(t){const e=t
|
|
13582
|
+
switch(t.typeId){case _U.Decimal:return t.bitWidth/32
|
|
13583
|
+
case _U.Interval:return 1+e.unit
|
|
13584
|
+
case _U.FixedSizeList:return e.listSize
|
|
13585
|
+
case _U.FixedSizeBinary:return e.byteWidth
|
|
13586
|
+
default:return 1}}aq=Symbol.toStringTag,Oq[aq]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(Oq.prototype)
|
|
13587
|
+
class Fq{visitMany(t,...e){return t.map(((t,n)=>this.visit(t,...e.map((t=>t[n])))))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return function(t,e,n=!0){if("number"==typeof e)return Nq(t,e,n)
|
|
13588
|
+
if("string"==typeof e&&e in _U)return Nq(t,_U[e],n)
|
|
13589
|
+
if(e&&e instanceof cq)return Nq(t,Lq(e),n)
|
|
13590
|
+
if((null==e?void 0:e.type)&&e.type instanceof cq)return Nq(t,Lq(e.type),n)
|
|
13591
|
+
return Nq(t,_U.NONE,n)}(this,t,e)}getVisitFnByTypeId(t,e=!0){return Nq(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function Nq(t,e,n=!0){let i=null
|
|
13592
|
+
switch(e){case _U.Null:i=t.visitNull
|
|
13590
13593
|
break
|
|
13591
|
-
case
|
|
13594
|
+
case _U.Bool:i=t.visitBool
|
|
13592
13595
|
break
|
|
13593
|
-
case
|
|
13596
|
+
case _U.Int:i=t.visitInt
|
|
13594
13597
|
break
|
|
13595
|
-
case
|
|
13598
|
+
case _U.Int8:i=t.visitInt8||t.visitInt
|
|
13596
13599
|
break
|
|
13597
|
-
case
|
|
13600
|
+
case _U.Int16:i=t.visitInt16||t.visitInt
|
|
13598
13601
|
break
|
|
13599
|
-
case
|
|
13602
|
+
case _U.Int32:i=t.visitInt32||t.visitInt
|
|
13600
13603
|
break
|
|
13601
|
-
case
|
|
13604
|
+
case _U.Int64:i=t.visitInt64||t.visitInt
|
|
13602
13605
|
break
|
|
13603
|
-
case
|
|
13606
|
+
case _U.Uint8:i=t.visitUint8||t.visitInt
|
|
13604
13607
|
break
|
|
13605
|
-
case
|
|
13608
|
+
case _U.Uint16:i=t.visitUint16||t.visitInt
|
|
13606
13609
|
break
|
|
13607
|
-
case
|
|
13610
|
+
case _U.Uint32:i=t.visitUint32||t.visitInt
|
|
13608
13611
|
break
|
|
13609
|
-
case
|
|
13612
|
+
case _U.Uint64:i=t.visitUint64||t.visitInt
|
|
13610
13613
|
break
|
|
13611
|
-
case
|
|
13614
|
+
case _U.Float:i=t.visitFloat
|
|
13612
13615
|
break
|
|
13613
|
-
case
|
|
13616
|
+
case _U.Float16:i=t.visitFloat16||t.visitFloat
|
|
13614
13617
|
break
|
|
13615
|
-
case
|
|
13618
|
+
case _U.Float32:i=t.visitFloat32||t.visitFloat
|
|
13616
13619
|
break
|
|
13617
|
-
case
|
|
13620
|
+
case _U.Float64:i=t.visitFloat64||t.visitFloat
|
|
13618
13621
|
break
|
|
13619
|
-
case
|
|
13622
|
+
case _U.Utf8:i=t.visitUtf8
|
|
13620
13623
|
break
|
|
13621
|
-
case
|
|
13624
|
+
case _U.LargeUtf8:i=t.visitLargeUtf8
|
|
13622
13625
|
break
|
|
13623
|
-
case
|
|
13626
|
+
case _U.Binary:i=t.visitBinary
|
|
13624
13627
|
break
|
|
13625
|
-
case
|
|
13628
|
+
case _U.LargeBinary:i=t.visitLargeBinary
|
|
13626
13629
|
break
|
|
13627
|
-
case
|
|
13630
|
+
case _U.FixedSizeBinary:i=t.visitFixedSizeBinary
|
|
13628
13631
|
break
|
|
13629
|
-
case
|
|
13632
|
+
case _U.Date:i=t.visitDate
|
|
13630
13633
|
break
|
|
13631
|
-
case
|
|
13634
|
+
case _U.DateDay:i=t.visitDateDay||t.visitDate
|
|
13632
13635
|
break
|
|
13633
|
-
case
|
|
13636
|
+
case _U.DateMillisecond:i=t.visitDateMillisecond||t.visitDate
|
|
13634
13637
|
break
|
|
13635
|
-
case
|
|
13638
|
+
case _U.Timestamp:i=t.visitTimestamp
|
|
13636
13639
|
break
|
|
13637
|
-
case
|
|
13640
|
+
case _U.TimestampSecond:i=t.visitTimestampSecond||t.visitTimestamp
|
|
13638
13641
|
break
|
|
13639
|
-
case
|
|
13642
|
+
case _U.TimestampMillisecond:i=t.visitTimestampMillisecond||t.visitTimestamp
|
|
13640
13643
|
break
|
|
13641
|
-
case
|
|
13644
|
+
case _U.TimestampMicrosecond:i=t.visitTimestampMicrosecond||t.visitTimestamp
|
|
13642
13645
|
break
|
|
13643
|
-
case
|
|
13646
|
+
case _U.TimestampNanosecond:i=t.visitTimestampNanosecond||t.visitTimestamp
|
|
13644
13647
|
break
|
|
13645
|
-
case
|
|
13648
|
+
case _U.Time:i=t.visitTime
|
|
13646
13649
|
break
|
|
13647
|
-
case
|
|
13650
|
+
case _U.TimeSecond:i=t.visitTimeSecond||t.visitTime
|
|
13648
13651
|
break
|
|
13649
|
-
case
|
|
13652
|
+
case _U.TimeMillisecond:i=t.visitTimeMillisecond||t.visitTime
|
|
13650
13653
|
break
|
|
13651
|
-
case
|
|
13654
|
+
case _U.TimeMicrosecond:i=t.visitTimeMicrosecond||t.visitTime
|
|
13652
13655
|
break
|
|
13653
|
-
case
|
|
13656
|
+
case _U.TimeNanosecond:i=t.visitTimeNanosecond||t.visitTime
|
|
13654
13657
|
break
|
|
13655
|
-
case
|
|
13658
|
+
case _U.Decimal:i=t.visitDecimal
|
|
13656
13659
|
break
|
|
13657
|
-
case
|
|
13660
|
+
case _U.List:i=t.visitList
|
|
13658
13661
|
break
|
|
13659
|
-
case
|
|
13662
|
+
case _U.Struct:i=t.visitStruct
|
|
13660
13663
|
break
|
|
13661
|
-
case
|
|
13664
|
+
case _U.Union:i=t.visitUnion
|
|
13662
13665
|
break
|
|
13663
|
-
case
|
|
13666
|
+
case _U.DenseUnion:i=t.visitDenseUnion||t.visitUnion
|
|
13664
13667
|
break
|
|
13665
|
-
case
|
|
13668
|
+
case _U.SparseUnion:i=t.visitSparseUnion||t.visitUnion
|
|
13666
13669
|
break
|
|
13667
|
-
case
|
|
13670
|
+
case _U.Dictionary:i=t.visitDictionary
|
|
13668
13671
|
break
|
|
13669
|
-
case
|
|
13672
|
+
case _U.Interval:i=t.visitInterval
|
|
13670
13673
|
break
|
|
13671
|
-
case
|
|
13674
|
+
case _U.IntervalDayTime:i=t.visitIntervalDayTime||t.visitInterval
|
|
13672
13675
|
break
|
|
13673
|
-
case
|
|
13676
|
+
case _U.IntervalYearMonth:i=t.visitIntervalYearMonth||t.visitInterval
|
|
13674
13677
|
break
|
|
13675
|
-
case
|
|
13678
|
+
case _U.Duration:i=t.visitDuration
|
|
13676
13679
|
break
|
|
13677
|
-
case
|
|
13680
|
+
case _U.DurationSecond:i=t.visitDurationSecond||t.visitDuration
|
|
13678
13681
|
break
|
|
13679
|
-
case
|
|
13682
|
+
case _U.DurationMillisecond:i=t.visitDurationMillisecond||t.visitDuration
|
|
13680
13683
|
break
|
|
13681
|
-
case
|
|
13684
|
+
case _U.DurationMicrosecond:i=t.visitDurationMicrosecond||t.visitDuration
|
|
13682
13685
|
break
|
|
13683
|
-
case
|
|
13686
|
+
case _U.DurationNanosecond:i=t.visitDurationNanosecond||t.visitDuration
|
|
13684
13687
|
break
|
|
13685
|
-
case
|
|
13688
|
+
case _U.FixedSizeList:i=t.visitFixedSizeList
|
|
13686
13689
|
break
|
|
13687
|
-
case
|
|
13690
|
+
case _U.Map:i=t.visitMap}if("function"==typeof i)return i
|
|
13688
13691
|
if(!n)return()=>null
|
|
13689
|
-
throw new Error(`Unrecognized type '${
|
|
13690
|
-
case
|
|
13691
|
-
switch(e){case 8:return n?
|
|
13692
|
-
case 16:return n?
|
|
13693
|
-
case 32:return n?
|
|
13694
|
-
case 64:return n?
|
|
13695
|
-
case
|
|
13696
|
-
case
|
|
13697
|
-
case
|
|
13698
|
-
case
|
|
13699
|
-
case
|
|
13700
|
-
case
|
|
13701
|
-
case
|
|
13702
|
-
case
|
|
13703
|
-
case
|
|
13704
|
-
case
|
|
13705
|
-
case
|
|
13706
|
-
case
|
|
13707
|
-
case
|
|
13708
|
-
case
|
|
13709
|
-
case
|
|
13710
|
-
case
|
|
13711
|
-
case
|
|
13712
|
-
case
|
|
13713
|
-
case
|
|
13714
|
-
case
|
|
13715
|
-
case
|
|
13716
|
-
case
|
|
13717
|
-
case
|
|
13718
|
-
case
|
|
13719
|
-
case
|
|
13720
|
-
case
|
|
13721
|
-
case
|
|
13722
|
-
case
|
|
13723
|
-
case
|
|
13724
|
-
case
|
|
13725
|
-
case
|
|
13726
|
-
case
|
|
13727
|
-
const
|
|
13728
|
-
function
|
|
13692
|
+
throw new Error(`Unrecognized type '${_U[e]}'`)}function Lq(t){switch(t.typeId){case _U.Null:return _U.Null
|
|
13693
|
+
case _U.Int:{const{bitWidth:e,isSigned:n}=t
|
|
13694
|
+
switch(e){case 8:return n?_U.Int8:_U.Uint8
|
|
13695
|
+
case 16:return n?_U.Int16:_U.Uint16
|
|
13696
|
+
case 32:return n?_U.Int32:_U.Uint32
|
|
13697
|
+
case 64:return n?_U.Int64:_U.Uint64}return _U.Int}case _U.Float:switch(t.precision){case OH.HALF:return _U.Float16
|
|
13698
|
+
case OH.SINGLE:return _U.Float32
|
|
13699
|
+
case OH.DOUBLE:return _U.Float64}return _U.Float
|
|
13700
|
+
case _U.Binary:return _U.Binary
|
|
13701
|
+
case _U.LargeBinary:return _U.LargeBinary
|
|
13702
|
+
case _U.Utf8:return _U.Utf8
|
|
13703
|
+
case _U.LargeUtf8:return _U.LargeUtf8
|
|
13704
|
+
case _U.Bool:return _U.Bool
|
|
13705
|
+
case _U.Decimal:return _U.Decimal
|
|
13706
|
+
case _U.Time:switch(t.unit){case FH.SECOND:return _U.TimeSecond
|
|
13707
|
+
case FH.MILLISECOND:return _U.TimeMillisecond
|
|
13708
|
+
case FH.MICROSECOND:return _U.TimeMicrosecond
|
|
13709
|
+
case FH.NANOSECOND:return _U.TimeNanosecond}return _U.Time
|
|
13710
|
+
case _U.Timestamp:switch(t.unit){case FH.SECOND:return _U.TimestampSecond
|
|
13711
|
+
case FH.MILLISECOND:return _U.TimestampMillisecond
|
|
13712
|
+
case FH.MICROSECOND:return _U.TimestampMicrosecond
|
|
13713
|
+
case FH.NANOSECOND:return _U.TimestampNanosecond}return _U.Timestamp
|
|
13714
|
+
case _U.Date:switch(t.unit){case RH.DAY:return _U.DateDay
|
|
13715
|
+
case RH.MILLISECOND:return _U.DateMillisecond}return _U.Date
|
|
13716
|
+
case _U.Interval:switch(t.unit){case NH.DAY_TIME:return _U.IntervalDayTime
|
|
13717
|
+
case NH.YEAR_MONTH:return _U.IntervalYearMonth}return _U.Interval
|
|
13718
|
+
case _U.Duration:switch(t.unit){case FH.SECOND:return _U.DurationSecond
|
|
13719
|
+
case FH.MILLISECOND:return _U.DurationMillisecond
|
|
13720
|
+
case FH.MICROSECOND:return _U.DurationMicrosecond
|
|
13721
|
+
case FH.NANOSECOND:return _U.DurationNanosecond}return _U.Duration
|
|
13722
|
+
case _U.Map:return _U.Map
|
|
13723
|
+
case _U.List:return _U.List
|
|
13724
|
+
case _U.Struct:return _U.Struct
|
|
13725
|
+
case _U.Union:switch(t.mode){case TH.Dense:return _U.DenseUnion
|
|
13726
|
+
case TH.Sparse:return _U.SparseUnion}return _U.Union
|
|
13727
|
+
case _U.FixedSizeBinary:return _U.FixedSizeBinary
|
|
13728
|
+
case _U.FixedSizeList:return _U.FixedSizeList
|
|
13729
|
+
case _U.Dictionary:return _U.Dictionary}throw new Error(`Unrecognized type '${_U[t.typeId]}'`)}Fq.prototype.visitInt8=null,Fq.prototype.visitInt16=null,Fq.prototype.visitInt32=null,Fq.prototype.visitInt64=null,Fq.prototype.visitUint8=null,Fq.prototype.visitUint16=null,Fq.prototype.visitUint32=null,Fq.prototype.visitUint64=null,Fq.prototype.visitFloat16=null,Fq.prototype.visitFloat32=null,Fq.prototype.visitFloat64=null,Fq.prototype.visitDateDay=null,Fq.prototype.visitDateMillisecond=null,Fq.prototype.visitTimestampSecond=null,Fq.prototype.visitTimestampMillisecond=null,Fq.prototype.visitTimestampMicrosecond=null,Fq.prototype.visitTimestampNanosecond=null,Fq.prototype.visitTimeSecond=null,Fq.prototype.visitTimeMillisecond=null,Fq.prototype.visitTimeMicrosecond=null,Fq.prototype.visitTimeNanosecond=null,Fq.prototype.visitDenseUnion=null,Fq.prototype.visitSparseUnion=null,Fq.prototype.visitIntervalDayTime=null,Fq.prototype.visitIntervalYearMonth=null,Fq.prototype.visitDuration=null,Fq.prototype.visitDurationSecond=null,Fq.prototype.visitDurationMillisecond=null,Fq.prototype.visitDurationMicrosecond=null,Fq.prototype.visitDurationNanosecond=null
|
|
13730
|
+
const Bq=new Float64Array(1),Pq=new Uint32Array(Bq.buffer)
|
|
13731
|
+
function zq(t){const e=(31744&t)>>10,n=(1023&t)/1024,i=Math.pow(-1,(32768&t)>>15)
|
|
13729
13732
|
switch(e){case 31:return i*(n?Number.NaN:1/0)
|
|
13730
|
-
case 0:return i*(n?6103515625e-14*n:0)}return i*Math.pow(2,e-15)*(1+n)}class
|
|
13731
|
-
t.set(i.subarray(0,o-s),s)}},
|
|
13732
|
-
|
|
13733
|
-
const e=(2147483648&
|
|
13734
|
-
let n=2146435072&
|
|
13735
|
-
return n>=1089470464?
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
i?e[s>>3]|=1<<s%8:e[s>>3]&=~(1<<s%8)})),
|
|
13740
|
-
case
|
|
13741
|
-
case
|
|
13742
|
-
case
|
|
13743
|
-
case
|
|
13744
|
-
case
|
|
13745
|
-
case
|
|
13746
|
-
case
|
|
13733
|
+
case 0:return i*(n?6103515625e-14*n:0)}return i*Math.pow(2,e-15)*(1+n)}class Vq extends Fq{}function Hq(t){return(e,n,i)=>{if(e.setValid(n,null!=i))return t(e,n,i)}}const Uq=(t,e,n,i)=>{if(n+1<e.length){const s=$U(e[n]),o=$U(e[n+1])
|
|
13734
|
+
t.set(i.subarray(0,o-s),s)}},qq=({values:t},e,n)=>{t[e]=n},jq=({values:t},e,n)=>{t[e]=n},Wq=({values:t},e,n)=>{t[e]=function(t){if(t!=t)return 32256
|
|
13735
|
+
Bq[0]=t
|
|
13736
|
+
const e=(2147483648&Pq[1])>>16&65535
|
|
13737
|
+
let n=2146435072&Pq[1],i=0
|
|
13738
|
+
return n>=1089470464?Pq[0]>0?n=31744:(n=(2080374784&n)>>16,i=(1048575&Pq[1])>>10):n<=1056964608?(i=1048576+(1048575&Pq[1]),i=1048576+(i<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,i=512+(1048575&Pq[1])>>10),e|n|65535&i}(n)},Gq=({values:t},e,n)=>{((t,e,n)=>{t[e]=Math.floor(n/864e5)})(t,e,n.valueOf())},Zq=({values:t},e,n)=>{t[e]=BigInt(n)},Kq=({values:t,valueOffsets:e},n,i)=>Uq(t,e,n,i),Yq=({values:t,valueOffsets:e},n,i)=>Uq(t,e,n,nH(i)),Xq=({values:t},e,n)=>{t[e]=BigInt(n/1e3)},Jq=({values:t},e,n)=>{t[e]=BigInt(n)},Qq=({values:t},e,n)=>{t[e]=BigInt(1e3*n)},tj=({values:t},e,n)=>{t[e]=BigInt(1e6*n)},ej=({values:t},e,n)=>{t[e]=n},nj=({values:t},e,n)=>{t[e]=n},ij=({values:t},e,n)=>{t[e]=n},sj=({values:t},e,n)=>{t[e]=n},oj=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
|
|
13739
|
+
pj.visit(s,t.valueOffsets[e],n)},rj=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
|
|
13740
|
+
pj.visit(s,e,n)},aj=({values:t},e,n)=>{t.set(n.subarray(0,2),2*e)},lj=({values:t},e,n)=>{t[e]=12*n[0]+n[1]%12},cj=({values:t},e,n)=>{t[e]=n},dj=({values:t},e,n)=>{t[e]=n},hj=({values:t},e,n)=>{t[e]=n},uj=({values:t},e,n)=>{t[e]=n}
|
|
13741
|
+
Vq.prototype.visitBool=Hq((({offset:t,values:e},n,i)=>{const s=t+n
|
|
13742
|
+
i?e[s>>3]|=1<<s%8:e[s>>3]&=~(1<<s%8)})),Vq.prototype.visitInt=Hq(qq),Vq.prototype.visitInt8=Hq(qq),Vq.prototype.visitInt16=Hq(qq),Vq.prototype.visitInt32=Hq(qq),Vq.prototype.visitInt64=Hq(qq),Vq.prototype.visitUint8=Hq(qq),Vq.prototype.visitUint16=Hq(qq),Vq.prototype.visitUint32=Hq(qq),Vq.prototype.visitUint64=Hq(qq),Vq.prototype.visitFloat=Hq(((t,e,n)=>{switch(t.type.precision){case OH.HALF:return Wq(t,e,n)
|
|
13743
|
+
case OH.SINGLE:case OH.DOUBLE:return jq(t,e,n)}})),Vq.prototype.visitFloat16=Hq(Wq),Vq.prototype.visitFloat32=Hq(jq),Vq.prototype.visitFloat64=Hq(jq),Vq.prototype.visitUtf8=Hq(Yq),Vq.prototype.visitLargeUtf8=Hq(Yq),Vq.prototype.visitBinary=Hq(Kq),Vq.prototype.visitLargeBinary=Hq(Kq),Vq.prototype.visitFixedSizeBinary=Hq((({stride:t,values:e},n,i)=>{e.set(i.subarray(0,t),t*n)})),Vq.prototype.visitDate=Hq(((t,e,n)=>{t.type.unit===RH.DAY?Gq(t,e,n):Zq(t,e,n)})),Vq.prototype.visitDateDay=Hq(Gq),Vq.prototype.visitDateMillisecond=Hq(Zq),Vq.prototype.visitTimestamp=Hq(((t,e,n)=>{switch(t.type.unit){case FH.SECOND:return Xq(t,e,n)
|
|
13744
|
+
case FH.MILLISECOND:return Jq(t,e,n)
|
|
13745
|
+
case FH.MICROSECOND:return Qq(t,e,n)
|
|
13746
|
+
case FH.NANOSECOND:return tj(t,e,n)}})),Vq.prototype.visitTimestampSecond=Hq(Xq),Vq.prototype.visitTimestampMillisecond=Hq(Jq),Vq.prototype.visitTimestampMicrosecond=Hq(Qq),Vq.prototype.visitTimestampNanosecond=Hq(tj),Vq.prototype.visitTime=Hq(((t,e,n)=>{switch(t.type.unit){case FH.SECOND:return ej(t,e,n)
|
|
13747
|
+
case FH.MILLISECOND:return nj(t,e,n)
|
|
13748
|
+
case FH.MICROSECOND:return ij(t,e,n)
|
|
13749
|
+
case FH.NANOSECOND:return sj(t,e,n)}})),Vq.prototype.visitTimeSecond=Hq(ej),Vq.prototype.visitTimeMillisecond=Hq(nj),Vq.prototype.visitTimeMicrosecond=Hq(ij),Vq.prototype.visitTimeNanosecond=Hq(sj),Vq.prototype.visitDecimal=Hq((({values:t,stride:e},n,i)=>{t.set(i.subarray(0,e),e*n)})),Vq.prototype.visitList=Hq(((t,e,n)=>{const i=t.children[0],s=t.valueOffsets,o=pj.getVisitFn(i)
|
|
13747
13750
|
if(Array.isArray(n))for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n[++t])
|
|
13748
|
-
else for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n.get(++t))})),
|
|
13751
|
+
else for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n.get(++t))})),Vq.prototype.visitStruct=Hq(((t,e,n)=>{const i=t.type.children.map((t=>pj.getVisitFn(t.type))),s=n instanceof Map?(o=e,r=n,(t,e,n,i)=>e&&t(e,o,r.get(n.name))):n instanceof NW?((t,e)=>(n,i,s,o)=>i&&n(i,t,e.get(o)))(e,n):Array.isArray(n)?((t,e)=>(n,i,s,o)=>i&&n(i,t,e[o]))(e,n):((t,e)=>(n,i,s,o)=>i&&n(i,t,e[s.name]))(e,n)
|
|
13749
13752
|
var o,r
|
|
13750
|
-
t.type.children.forEach(((e,n)=>s(i[n],t.children[n],e,n)))})),
|
|
13751
|
-
null===(i=t.dictionary)||void 0===i||i.set(t.values[e],n)})),
|
|
13752
|
-
case
|
|
13753
|
-
case
|
|
13754
|
-
case
|
|
13753
|
+
t.type.children.forEach(((e,n)=>s(i[n],t.children[n],e,n)))})),Vq.prototype.visitUnion=Hq(((t,e,n)=>{t.type.mode===TH.Dense?oj(t,e,n):rj(t,e,n)})),Vq.prototype.visitDenseUnion=Hq(oj),Vq.prototype.visitSparseUnion=Hq(rj),Vq.prototype.visitDictionary=Hq(((t,e,n)=>{var i
|
|
13754
|
+
null===(i=t.dictionary)||void 0===i||i.set(t.values[e],n)})),Vq.prototype.visitInterval=Hq(((t,e,n)=>{t.type.unit===NH.DAY_TIME?aj(t,e,n):lj(t,e,n)})),Vq.prototype.visitIntervalDayTime=Hq(aj),Vq.prototype.visitIntervalYearMonth=Hq(lj),Vq.prototype.visitDuration=Hq(((t,e,n)=>{switch(t.type.unit){case FH.SECOND:return cj(t,e,n)
|
|
13755
|
+
case FH.MILLISECOND:return dj(t,e,n)
|
|
13756
|
+
case FH.MICROSECOND:return hj(t,e,n)
|
|
13757
|
+
case FH.NANOSECOND:return uj(t,e,n)}})),Vq.prototype.visitDurationSecond=Hq(cj),Vq.prototype.visitDurationMillisecond=Hq(dj),Vq.prototype.visitDurationMicrosecond=Hq(hj),Vq.prototype.visitDurationNanosecond=Hq(uj),Vq.prototype.visitFixedSizeList=Hq(((t,e,n)=>{const{stride:i}=t,s=t.children[0],o=pj.getVisitFn(s)
|
|
13755
13758
|
if(Array.isArray(n))for(let t=-1,r=e*i;++t<i;)o(s,r+t,n[t])
|
|
13756
|
-
else for(let t=-1,r=e*i;++t<i;)o(s,r+t,n.get(t))})),
|
|
13759
|
+
else for(let t=-1,r=e*i;++t<i;)o(s,r+t,n.get(t))})),Vq.prototype.visitMap=Hq(((t,e,n)=>{const i=t.children[0],{valueOffsets:s}=t,o=pj.getVisitFn(i)
|
|
13757
13760
|
let{[e]:r,[e+1]:a}=s
|
|
13758
13761
|
const l=n instanceof Map?n.entries():Object.entries(n)
|
|
13759
13762
|
for(const t of l)if(o(i,r,t),++r>=a)break}))
|
|
13760
|
-
const
|
|
13761
|
-
class
|
|
13762
|
-
for(let s=-1,o=n.length;++s<o;)i[n[s].name]=
|
|
13763
|
-
return i}toString(){return`{${[...this].map((([t,e])=>`${
|
|
13764
|
-
return t<this.numChildren?(this.childIndex=t+1,{done:!1,value:[this.childFields[t].name,
|
|
13765
|
-
class
|
|
13766
|
-
const n=t[
|
|
13767
|
-
if(-1!==n){const i=
|
|
13768
|
-
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[
|
|
13769
|
-
return-1!==i?(
|
|
13770
|
-
const i
|
|
13771
|
-
return t.subarray(i,s)},
|
|
13772
|
-
return null!==i?
|
|
13773
|
-
return
|
|
13774
|
-
return
|
|
13775
|
-
return i[0]=Math.trunc(n/12),i[1]=Math.trunc(n%12),i},
|
|
13776
|
-
|
|
13777
|
-
return 0!=(e[i>>3]&1<<i%8)})),
|
|
13778
|
-
case
|
|
13779
|
-
case
|
|
13780
|
-
case
|
|
13781
|
-
case
|
|
13782
|
-
case
|
|
13783
|
-
case
|
|
13784
|
-
return new
|
|
13785
|
-
return null===(n=t.dictionary)||void 0===n?void 0:n.get(t.values[e])})),
|
|
13786
|
-
case
|
|
13787
|
-
case
|
|
13788
|
-
case
|
|
13789
|
-
return new
|
|
13790
|
-
return new
|
|
13791
|
-
const
|
|
13792
|
-
class
|
|
13793
|
-
for(let i=-1,s=t.length;++i<s;)n[t.get(i)]=
|
|
13794
|
-
return n}toString(){return`{${[...this].map((([t,e])=>`${
|
|
13795
|
-
return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),
|
|
13796
|
-
const n=t[
|
|
13797
|
-
if(-1!==n){const i=
|
|
13798
|
-
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[
|
|
13799
|
-
return-1!==i?(
|
|
13800
|
-
function
|
|
13763
|
+
const pj=new Vq,fj=Symbol.for("parent"),mj=Symbol.for("rowIndex")
|
|
13764
|
+
class gj{constructor(t,e){return this[fj]=t,this[mj]=e,new Proxy(this,new bj)}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[mj],e=this[fj],n=e.type.children,i={}
|
|
13765
|
+
for(let s=-1,o=n.length;++s<o;)i[n[s].name]=qj.visit(e.children[s],t)
|
|
13766
|
+
return i}toString(){return`{${[...this].map((([t,e])=>`${MU(t)}: ${MU(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new vj(this[fj],this[mj])}}class vj{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex
|
|
13767
|
+
return t<this.numChildren?(this.childIndex=t+1,{done:!1,value:[this.childFields[t].name,qj.visit(this.children[t],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(gj.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[fj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[mj]:{writable:!0,enumerable:!1,configurable:!1,value:-1}})
|
|
13768
|
+
class bj{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[fj].type.children.map((t=>t.name))}has(t,e){return-1!==t[fj].type.children.findIndex((t=>t.name===e))}getOwnPropertyDescriptor(t,e){if(-1!==t[fj].type.children.findIndex((t=>t.name===e)))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
|
|
13769
|
+
const n=t[fj].type.children.findIndex((t=>t.name===e))
|
|
13770
|
+
if(-1!==n){const i=qj.visit(t[fj].children[n],t[mj])
|
|
13771
|
+
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[fj].type.children.findIndex((t=>t.name===e))
|
|
13772
|
+
return-1!==i?(pj.visit(t[fj].children[i],t[mj],n),Reflect.set(t,e,n)):!(!Reflect.has(t,e)&&"symbol"!=typeof e)&&Reflect.set(t,e,n)}}class yj extends Fq{}function wj(t){return(e,n)=>e.getValid(n)?t(e,n):null}const xj=(t,e,n)=>{if(n+1>=e.length)return null
|
|
13773
|
+
const i=$U(e[n]),s=$U(e[n+1])
|
|
13774
|
+
return t.subarray(i,s)},Cj=({values:t},e)=>((t,e)=>864e5*t[e])(t,e),kj=({values:t},e)=>$U(t[e]),Sj=({stride:t,values:e},n)=>e[t*n],_j=({values:t},e)=>t[e],Ij=({values:t,valueOffsets:e},n)=>xj(t,e,n),Mj=({values:t,valueOffsets:e},n)=>{const i=xj(t,e,n)
|
|
13775
|
+
return null!==i?tH(i):null},$j=({values:t},e)=>1e3*$U(t[e]),Ej=({values:t},e)=>$U(t[e]),Dj=({values:t},e)=>EU(t[e],BigInt(1e3)),Aj=({values:t},e)=>EU(t[e],BigInt(1e6)),Tj=({values:t},e)=>t[e],Oj=({values:t},e)=>t[e],Rj=({values:t},e)=>t[e],Fj=({values:t},e)=>t[e],Nj=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
|
|
13776
|
+
return qj.visit(i,t.valueOffsets[e])},Lj=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
|
|
13777
|
+
return qj.visit(i,e)},Bj=({values:t},e)=>t.subarray(2*e,2*(e+1)),Pj=({values:t},e)=>{const n=t[e],i=new Int32Array(2)
|
|
13778
|
+
return i[0]=Math.trunc(n/12),i[1]=Math.trunc(n%12),i},zj=({values:t},e)=>t[e],Vj=({values:t},e)=>t[e],Hj=({values:t},e)=>t[e],Uj=({values:t},e)=>t[e]
|
|
13779
|
+
yj.prototype.visitNull=wj(((t,e)=>null)),yj.prototype.visitBool=wj((({offset:t,values:e},n)=>{const i=t+n
|
|
13780
|
+
return 0!=(e[i>>3]&1<<i%8)})),yj.prototype.visitInt=wj((({values:t},e)=>t[e])),yj.prototype.visitInt8=wj(Sj),yj.prototype.visitInt16=wj(Sj),yj.prototype.visitInt32=wj(Sj),yj.prototype.visitInt64=wj(_j),yj.prototype.visitUint8=wj(Sj),yj.prototype.visitUint16=wj(Sj),yj.prototype.visitUint32=wj(Sj),yj.prototype.visitUint64=wj(_j),yj.prototype.visitFloat=wj((({type:t,values:e},n)=>t.precision!==OH.HALF?e[n]:zq(e[n]))),yj.prototype.visitFloat16=wj((({stride:t,values:e},n)=>zq(e[t*n]))),yj.prototype.visitFloat32=wj(Sj),yj.prototype.visitFloat64=wj(Sj),yj.prototype.visitUtf8=wj(Mj),yj.prototype.visitLargeUtf8=wj(Mj),yj.prototype.visitBinary=wj(Ij),yj.prototype.visitLargeBinary=wj(Ij),yj.prototype.visitFixedSizeBinary=wj((({stride:t,values:e},n)=>e.subarray(t*n,t*(n+1)))),yj.prototype.visitDate=wj(((t,e)=>t.type.unit===RH.DAY?Cj(t,e):kj(t,e))),yj.prototype.visitDateDay=wj(Cj),yj.prototype.visitDateMillisecond=wj(kj),yj.prototype.visitTimestamp=wj(((t,e)=>{switch(t.type.unit){case FH.SECOND:return $j(t,e)
|
|
13781
|
+
case FH.MILLISECOND:return Ej(t,e)
|
|
13782
|
+
case FH.MICROSECOND:return Dj(t,e)
|
|
13783
|
+
case FH.NANOSECOND:return Aj(t,e)}})),yj.prototype.visitTimestampSecond=wj($j),yj.prototype.visitTimestampMillisecond=wj(Ej),yj.prototype.visitTimestampMicrosecond=wj(Dj),yj.prototype.visitTimestampNanosecond=wj(Aj),yj.prototype.visitTime=wj(((t,e)=>{switch(t.type.unit){case FH.SECOND:return Tj(t,e)
|
|
13784
|
+
case FH.MILLISECOND:return Oj(t,e)
|
|
13785
|
+
case FH.MICROSECOND:return Rj(t,e)
|
|
13786
|
+
case FH.NANOSECOND:return Fj(t,e)}})),yj.prototype.visitTimeSecond=wj(Tj),yj.prototype.visitTimeMillisecond=wj(Oj),yj.prototype.visitTimeMicrosecond=wj(Rj),yj.prototype.visitTimeNanosecond=wj(Fj),yj.prototype.visitDecimal=wj((({values:t,stride:e},n)=>PU.decimal(t.subarray(e*n,e*(n+1))))),yj.prototype.visitList=wj(((t,e)=>{const{valueOffsets:n,stride:i,children:s}=t,{[e*i]:o,[e*i+1]:r}=n,a=s[0].slice(o,r-o)
|
|
13787
|
+
return new NW([a])})),yj.prototype.visitStruct=wj(((t,e)=>new gj(t,e))),yj.prototype.visitUnion=wj(((t,e)=>t.type.mode===TH.Dense?Nj(t,e):Lj(t,e))),yj.prototype.visitDenseUnion=wj(Nj),yj.prototype.visitSparseUnion=wj(Lj),yj.prototype.visitDictionary=wj(((t,e)=>{var n
|
|
13788
|
+
return null===(n=t.dictionary)||void 0===n?void 0:n.get(t.values[e])})),yj.prototype.visitInterval=wj(((t,e)=>t.type.unit===NH.DAY_TIME?Bj(t,e):Pj(t,e))),yj.prototype.visitIntervalDayTime=wj(Bj),yj.prototype.visitIntervalYearMonth=wj(Pj),yj.prototype.visitDuration=wj(((t,e)=>{switch(t.type.unit){case FH.SECOND:return zj(t,e)
|
|
13789
|
+
case FH.MILLISECOND:return Vj(t,e)
|
|
13790
|
+
case FH.MICROSECOND:return Hj(t,e)
|
|
13791
|
+
case FH.NANOSECOND:return Uj(t,e)}})),yj.prototype.visitDurationSecond=wj(zj),yj.prototype.visitDurationMillisecond=wj(Vj),yj.prototype.visitDurationMicrosecond=wj(Hj),yj.prototype.visitDurationNanosecond=wj(Uj),yj.prototype.visitFixedSizeList=wj(((t,e)=>{const{stride:n,children:i}=t,s=i[0].slice(e*n,n)
|
|
13792
|
+
return new NW([s])})),yj.prototype.visitMap=wj(((t,e)=>{const{valueOffsets:n,children:i}=t,{[e]:s,[e+1]:o}=n,r=i[0]
|
|
13793
|
+
return new Kj(r.slice(s,o-s))}))
|
|
13794
|
+
const qj=new yj,jj=Symbol.for("keys"),Wj=Symbol.for("vals"),Gj=Symbol.for("kKeysAsStrings"),Zj=Symbol.for("_kKeysAsStrings")
|
|
13795
|
+
class Kj{constructor(t){return this[jj]=new NW([t.children[0]]).memoize(),this[Wj]=t.children[1],new Proxy(this,new Xj)}get[Gj](){return this[Zj]||(this[Zj]=Array.from(this[jj].toArray(),String))}[Symbol.iterator](){return new Yj(this[jj],this[Wj])}get size(){return this[jj].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[jj],e=this[Wj],n={}
|
|
13796
|
+
for(let i=-1,s=t.length;++i<s;)n[t.get(i)]=qj.visit(e,i)
|
|
13797
|
+
return n}toString(){return`{${[...this].map((([t,e])=>`${MU(t)}: ${MU(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class Yj{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex
|
|
13798
|
+
return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),qj.visit(this.vals,t)]})}}class Xj{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Gj]}has(t,e){return t[Gj].includes(e)}getOwnPropertyDescriptor(t,e){if(-1!==t[Gj].indexOf(e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
|
|
13799
|
+
const n=t[Gj].indexOf(e)
|
|
13800
|
+
if(-1!==n){const i=qj.visit(Reflect.get(t,Wj),n)
|
|
13801
|
+
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[Gj].indexOf(e)
|
|
13802
|
+
return-1!==i?(pj.visit(Reflect.get(t,Wj),i,n),Reflect.set(t,e,n)):!!Reflect.has(t,e)&&Reflect.set(t,e,n)}}let Jj
|
|
13803
|
+
function Qj(t,e,n,i){const{length:s=0}=t
|
|
13801
13804
|
let o="number"!=typeof e?0:e,r="number"!=typeof n?s:n
|
|
13802
|
-
return o<0&&(o=(o%s+s)%s),r<0&&(r=(r%s+s)%s),r<o&&(
|
|
13803
|
-
const
|
|
13804
|
-
function
|
|
13805
|
+
return o<0&&(o=(o%s+s)%s),r<0&&(r=(r%s+s)%s),r<o&&(Jj=o,o=r,r=Jj),r>s&&(r=s),i?i(t,o,r):[o,r]}Object.defineProperties(Kj.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[jj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Wj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Zj]:{writable:!0,enumerable:!1,configurable:!1,value:null}})
|
|
13806
|
+
const tW=(t,e)=>t<0?e+t:t,eW=t=>t!=t
|
|
13807
|
+
function nW(t){if("object"!==typeof t||null===t)return eW(t)?eW:e=>e===t
|
|
13805
13808
|
if(t instanceof Date){const e=t.valueOf()
|
|
13806
13809
|
return t=>t instanceof Date&&t.valueOf()===e}return ArrayBuffer.isView(t)?e=>!!e&&function(t,e){let n=0
|
|
13807
13810
|
const i=t.length
|
|
@@ -13809,203 +13812,203 @@ if(i!==e.length)return!1
|
|
|
13809
13812
|
if(i>0)do{if(t[n]!==e[n])return!1}while(++n<i)
|
|
13810
13813
|
return!0}(t,e):t instanceof Map?function(t){let e=-1
|
|
13811
13814
|
const n=[]
|
|
13812
|
-
for(const i of t.values())n[++e]=
|
|
13813
|
-
return
|
|
13814
|
-
for(let n=-1,i=t.length;++n<i;)e[n]=
|
|
13815
|
-
return
|
|
13816
|
-
for(let n=-1,i=t.length;++n<i;)e[n]=
|
|
13817
|
-
return
|
|
13815
|
+
for(const i of t.values())n[++e]=nW(i)
|
|
13816
|
+
return iW(n)}(t):Array.isArray(t)?function(t){const e=[]
|
|
13817
|
+
for(let n=-1,i=t.length;++n<i;)e[n]=nW(t[n])
|
|
13818
|
+
return iW(e)}(t):t instanceof NW?function(t){const e=[]
|
|
13819
|
+
for(let n=-1,i=t.length;++n<i;)e[n]=nW(t.get(n))
|
|
13820
|
+
return iW(e)}(t):function(t,e=!1){const n=Object.keys(t)
|
|
13818
13821
|
if(!e&&0===n.length)return()=>!1
|
|
13819
13822
|
const i=[]
|
|
13820
|
-
for(let e=-1,s=n.length;++e<s;)i[e]=
|
|
13821
|
-
return
|
|
13823
|
+
for(let e=-1,s=n.length;++e<s;)i[e]=nW(t[n[e]])
|
|
13824
|
+
return iW(i,n)}(t,!0)}function iW(t,e){return n=>{if(!n||"object"!=typeof n)return!1
|
|
13822
13825
|
switch(n.constructor){case Array:return function(t,e){const n=t.length
|
|
13823
13826
|
if(e.length!==n)return!1
|
|
13824
13827
|
for(let i=-1;++i<n;)if(!t[i](e[i]))return!1
|
|
13825
13828
|
return!0}(t,n)
|
|
13826
|
-
case Map:return
|
|
13827
|
-
case
|
|
13829
|
+
case Map:return sW(t,n,n.keys())
|
|
13830
|
+
case Kj:case gj:case Object:case void 0:return sW(t,n,e||Object.keys(n))}return n instanceof NW&&function(t,e){const n=t.length
|
|
13828
13831
|
if(e.length!==n)return!1
|
|
13829
13832
|
for(let i=-1;++i<n;)if(!t[i](e.get(i)))return!1
|
|
13830
|
-
return!0}(t,n)}}function
|
|
13833
|
+
return!0}(t,n)}}function sW(t,e,n){const i=n[Symbol.iterator](),s=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),o=e instanceof Map?e.values():Object.values(e)[Symbol.iterator]()
|
|
13831
13834
|
let r=0
|
|
13832
13835
|
const a=t.length
|
|
13833
13836
|
let l=o.next(),c=i.next(),d=s.next()
|
|
13834
|
-
for(;r<a&&!c.done&&!d.done&&!l.done&&(c.value===d.value&&t[r](l.value));++r,c=i.next(),d=s.next(),l=o.next());return!!(r===a&&c.done&&d.done&&l.done)||(i.return&&i.return(),s.return&&s.return(),o.return&&o.return(),!1)}function
|
|
13837
|
+
for(;r<a&&!c.done&&!d.done&&!l.done&&(c.value===d.value&&t[r](l.value));++r,c=i.next(),d=s.next(),l=o.next());return!!(r===a&&c.done&&d.done&&l.done)||(i.return&&i.return(),s.return&&s.return(),o.return&&o.return(),!1)}function oW(t,e,n,i){return 0!=(n&1<<i)}function rW(t,e,n,i){return(n&1<<i)>>i}function aW(t,e,n){const i=n.byteLength+7&-8
|
|
13835
13838
|
if(t>0||n.byteLength<i){const s=new Uint8Array(i)
|
|
13836
|
-
return s.set(t%8==0?n.subarray(t>>3):
|
|
13839
|
+
return s.set(t%8==0?n.subarray(t>>3):lW(new cW(n,t,e,null,oW)).subarray(0,i)),s}return n}function lW(t){const e=[]
|
|
13837
13840
|
let n=0,i=0,s=0
|
|
13838
13841
|
for(const o of t)o&&(s|=1<<i),8==++i&&(e[n++]=s,s=i=0);(0===n||i>0)&&(e[n++]=s)
|
|
13839
13842
|
const o=new Uint8Array(e.length+7&-8)
|
|
13840
|
-
return o.set(e),o}class
|
|
13843
|
+
return o.set(e),o}class cW{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index<this.length?(8===this.bit&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function dW(t,e,n){if(n-e<=0)return 0
|
|
13841
13844
|
if(n-e<8){let i=0
|
|
13842
|
-
for(const s of new
|
|
13845
|
+
for(const s of new cW(t,e,n-e,t,rW))i+=s
|
|
13843
13846
|
return i}const i=n>>3<<3,s=e+(e%8==0?0:8-e%8)
|
|
13844
|
-
return
|
|
13847
|
+
return dW(t,e,s)+dW(t,i,n)+function(t,e,n){let i=0,s=Math.trunc(e)
|
|
13845
13848
|
const o=new DataView(t.buffer,t.byteOffset,t.byteLength),r=void 0===n?t.byteLength:s+n
|
|
13846
|
-
for(;r-s>=4;)i+=
|
|
13847
|
-
for(;r-s>=2;)i+=
|
|
13848
|
-
for(;r-s>=1;)i+=
|
|
13849
|
-
return i}(t,s>>3,i-s>>3)}function
|
|
13850
|
-
return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24}class
|
|
13851
|
-
return
|
|
13849
|
+
for(;r-s>=4;)i+=hW(o.getUint32(s)),s+=4
|
|
13850
|
+
for(;r-s>=2;)i+=hW(o.getUint16(s)),s+=2
|
|
13851
|
+
for(;r-s>=1;)i+=hW(o.getUint8(s)),s+=1
|
|
13852
|
+
return i}(t,s>>3,i-s>>3)}function hW(t){let e=Math.trunc(t)
|
|
13853
|
+
return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24}class uW{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(0!==this._nullCount){const{type:t}=this
|
|
13854
|
+
return cq.isSparseUnion(t)||cq.isDenseUnion(t)?this.children.some((t=>t.nullable)):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0
|
|
13852
13855
|
const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this
|
|
13853
|
-
return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce(((t,e)=>t+e.byteLength),t)}get nullCount(){if(
|
|
13856
|
+
return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce(((t,e)=>t+e.byteLength),t)}get nullCount(){if(cq.isUnion(this.type))return this.children.reduce(((t,e)=>t+e.nullCount),0)
|
|
13854
13857
|
let t,e=this._nullCount
|
|
13855
|
-
return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=0===t.length?0:this.length-
|
|
13856
|
-
this.type=t,this.children=o,this.dictionary=r,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),s instanceof
|
|
13857
|
-
if(
|
|
13858
|
+
return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=0===t.length?0:this.length-dW(t,this.offset,this.offset+this.length)),e}constructor(t,e,n,i,s,o=[],r){let a
|
|
13859
|
+
this.type=t,this.children=o,this.dictionary=r,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),s instanceof uW?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=Rq(t),s&&((a=s[0])&&(this.valueOffsets=a),(a=s[1])&&(this.values=a),(a=s[2])&&(this.nullBitmap=a),(a=s[3])&&(this.typeIds=a)))}getValid(t){const{type:e}=this
|
|
13860
|
+
if(cq.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===TH.Dense?this.valueOffsets[t]:t
|
|
13858
13861
|
return i.getValid(s)}if(this.nullable&&this.nullCount>0){const e=this.offset+t
|
|
13859
13862
|
return 0!=(this.nullBitmap[e>>3]&1<<e%8)}return!0}setValid(t,e){let n
|
|
13860
13863
|
const{type:i}=this
|
|
13861
|
-
if(
|
|
13864
|
+
if(cq.isUnion(i)){const s=i,o=this.children[s.typeIdToChildIndex[this.typeIds[t]]],r=s.mode===TH.Dense?this.valueOffsets[t]:t
|
|
13862
13865
|
n=o.getValid(r),o.setValid(r,e)}else{let{nullBitmap:i}=this
|
|
13863
|
-
const{offset:s,length:o}=this,r=s+t,a=1<<r%8,l=r>>3;(!i||i.byteLength<=l)&&(i=new Uint8Array((s+o+63&-64)>>3).fill(255),this.nullCount>0?(i.set(
|
|
13866
|
+
const{offset:s,length:o}=this,r=s+t,a=1<<r%8,l=r>>3;(!i||i.byteLength<=l)&&(i=new Uint8Array((s+o+63&-64)>>3).fill(255),this.nullCount>0?(i.set(aW(s,o,this.nullBitmap),0),Object.assign(this,{nullBitmap:i})):Object.assign(this,{nullBitmap:i,_nullCount:0}))
|
|
13864
13867
|
const c=i[l]
|
|
13865
|
-
n=0!=(c&a),i[l]=e?c|a:c&~a}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new
|
|
13866
|
-
return this.clone(this.type,this.offset+t,e,o,a,0===s.length||this.valueOffsets?s:this._sliceChildren(s,r*t,r*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===
|
|
13868
|
+
n=0!=(c&a),i[l]=e?c|a:c&~a}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new uW(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(0===this._nullCount)-1,r=16===i?n:1,a=this._sliceBuffers(t,e,n,i)
|
|
13869
|
+
return this.clone(this.type,this.offset+t,e,o,a,0===s.length||this.valueOffsets?s:this._sliceChildren(s,r*t,r*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===_U.Null)return this.clone(this.type,0,t,0)
|
|
13867
13870
|
const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3)
|
|
13868
|
-
i[e>>3]=(1<<e-(-8&e))-1,n>0&&i.set(
|
|
13871
|
+
i[e>>3]=(1<<e-(-8&e))-1,n>0&&i.set(aW(this.offset,e,this.nullBitmap),0)
|
|
13869
13872
|
const s=this.buffers
|
|
13870
|
-
return s[
|
|
13873
|
+
return s[IU.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s
|
|
13871
13874
|
const{buffers:o}=this
|
|
13872
|
-
return(s=o[
|
|
13873
|
-
class
|
|
13874
|
-
return new
|
|
13875
|
-
return new
|
|
13876
|
-
return new
|
|
13877
|
-
return new
|
|
13878
|
-
return new
|
|
13879
|
-
return new
|
|
13880
|
-
return new
|
|
13881
|
-
return new
|
|
13882
|
-
return new
|
|
13883
|
-
return new
|
|
13884
|
-
return new
|
|
13885
|
-
return new
|
|
13886
|
-
return new
|
|
13887
|
-
return new
|
|
13888
|
-
return new
|
|
13889
|
-
if(
|
|
13890
|
-
const a=
|
|
13891
|
-
return new
|
|
13892
|
-
return new
|
|
13893
|
-
return new
|
|
13894
|
-
return new
|
|
13895
|
-
return new
|
|
13896
|
-
return new
|
|
13897
|
-
function
|
|
13898
|
-
if(!t.done)return t;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function
|
|
13875
|
+
return(s=o[IU.TYPE])&&(o[IU.TYPE]=s.subarray(t,t+e)),(s=o[IU.OFFSET])&&(o[IU.OFFSET]=s.subarray(t,t+e+1))||(s=o[IU.DATA])&&(o[IU.DATA]=6===i?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map((t=>t.slice(e,n)))}}uW.prototype.children=Object.freeze([])
|
|
13876
|
+
class pW extends Fq{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{type:e,offset:n=0,length:i=0}=t
|
|
13877
|
+
return new uW(e,n,i,i)}visitBool(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length>>3,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13878
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitInt(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13879
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitFloat(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13880
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitUtf8(t){const{type:e,offset:n=0}=t,i=CH(t.data),s=CH(t.nullBitmap),o=wH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13881
|
+
return new uW(e,n,r,a,[o,i,s])}visitLargeUtf8(t){const{type:e,offset:n=0}=t,i=CH(t.data),s=CH(t.nullBitmap),o=xH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13882
|
+
return new uW(e,n,r,a,[o,i,s])}visitBinary(t){const{type:e,offset:n=0}=t,i=CH(t.data),s=CH(t.nullBitmap),o=wH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13883
|
+
return new uW(e,n,r,a,[o,i,s])}visitLargeBinary(t){const{type:e,offset:n=0}=t,i=CH(t.data),s=CH(t.nullBitmap),o=xH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13884
|
+
return new uW(e,n,r,a,[o,i,s])}visitFixedSizeBinary(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length/Rq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13885
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitDate(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length/Rq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13886
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitTimestamp(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length/Rq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13887
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitTime(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length/Rq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13888
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitDecimal(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length/Rq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13889
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitList(t){const{type:e,offset:n=0,child:i}=t,s=CH(t.nullBitmap),o=wH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13890
|
+
return new uW(e,n,r,a,[o,void 0,s],[i])}visitStruct(t){const{type:e,offset:n=0,children:i=[]}=t,s=CH(t.nullBitmap),{length:o=i.reduce(((t,{length:e})=>Math.max(t,e)),0),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13891
|
+
return new uW(e,n,o,r,[void 0,void 0,s],i)}visitUnion(t){const{type:e,offset:n=0,children:i=[]}=t,s=yH(e.ArrayType,t.typeIds),{length:o=s.length,nullCount:r=-1}=t
|
|
13892
|
+
if(cq.isSparseUnion(e))return new uW(e,n,o,r,[void 0,void 0,void 0,s],i)
|
|
13893
|
+
const a=wH(t.valueOffsets)
|
|
13894
|
+
return new uW(e,n,o,r,[a,void 0,void 0,s],i)}visitDictionary(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.indices.ArrayType,t.data),{dictionary:o=new NW([(new pW).visit({type:e.dictionary})])}=t,{length:r=s.length,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13895
|
+
return new uW(e,n,r,a,[void 0,s,i],[],o)}visitInterval(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length/Rq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13896
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitDuration(t){const{type:e,offset:n=0}=t,i=CH(t.nullBitmap),s=yH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13897
|
+
return new uW(e,n,o,r,[void 0,s,i])}visitFixedSizeList(t){const{type:e,offset:n=0,child:i=(new pW).visit({type:e.valueType})}=t,s=CH(t.nullBitmap),{length:o=i.length/Rq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13898
|
+
return new uW(e,n,o,r,[void 0,void 0,s],[i])}visitMap(t){const{type:e,offset:n=0,child:i=(new pW).visit({type:e.childType})}=t,s=CH(t.nullBitmap),o=wH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13899
|
+
return new uW(e,n,r,a,[o,void 0,s],[i])}}const fW=new pW
|
|
13900
|
+
function mW(t){return fW.visit(t)}class gW{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const t=this.chunkIterator.next()
|
|
13901
|
+
if(!t.done)return t;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function vW(t){return t.reduce(((t,e)=>t+e.nullCount),0)}function bW(t){return t.reduce(((t,e,n)=>(t[n+1]=t[n]+e.length,t)),new Uint32Array(t.length+1))}function yW(t,e,n,i){const s=[]
|
|
13899
13902
|
for(let o=-1,r=t.length;++o<r;){const r=t[o],a=e[o],{length:l}=r
|
|
13900
13903
|
if(a>=i)break
|
|
13901
13904
|
if(n>=a+l)continue
|
|
13902
13905
|
if(a>=n&&a+l<=i){s.push(r)
|
|
13903
13906
|
continue}const c=Math.max(0,n-a),d=Math.min(i-a,l)
|
|
13904
|
-
s.push(r.slice(c,d-c))}return 0===s.length&&s.push(t[0].slice(0,0)),s}function
|
|
13907
|
+
s.push(r.slice(c,d-c))}return 0===s.length&&s.push(t[0].slice(0,0)),s}function wW(t,e,n,i){let s=0,o=0,r=e.length-1
|
|
13905
13908
|
do{if(s>=r-1)return n<e[r]?i(t,s,n-e[s]):null
|
|
13906
|
-
o=s+Math.trunc(.5*(r-s)),n<e[o]?r=o:s=o}while(s<r)}function
|
|
13909
|
+
o=s+Math.trunc(.5*(r-s)),n<e[o]?r=o:s=o}while(s<r)}function xW(t,e){return t.getValid(e)}function CW(t){function e(e,n,i){return t(e[n],i)}return function(t){return wW(this.data,this._offsets,t,e)}}function kW(t){let e
|
|
13907
13910
|
function n(n,i,s){return t(n[i],s,e)}return function(t,i){const s=this.data
|
|
13908
13911
|
e=i
|
|
13909
|
-
const o=
|
|
13910
|
-
return e=void 0,o}}function
|
|
13912
|
+
const o=wW(s,this._offsets,t,n)
|
|
13913
|
+
return e=void 0,o}}function SW(t){let e
|
|
13911
13914
|
function n(n,i,s){let o=s,r=0,a=0
|
|
13912
13915
|
for(let s=i-1,l=n.length;++s<l;){const i=n[s]
|
|
13913
13916
|
if(~(r=t(i,e,o)))return a+r
|
|
13914
13917
|
o=0,a+=i.length}return-1}return function(t,i){e=t
|
|
13915
|
-
const s=this.data,o="number"!=typeof i?n(s,0,0):
|
|
13916
|
-
return e=void 0,o}}class
|
|
13917
|
-
if(null===e)switch(t.typeId){case
|
|
13918
|
+
const s=this.data,o="number"!=typeof i?n(s,0,0):wW(s,this._offsets,i,n)
|
|
13919
|
+
return e=void 0,o}}class _W extends Fq{}function IW(t,e,n){if(void 0===e)return-1
|
|
13920
|
+
if(null===e)switch(t.typeId){case _U.Union:case _U.Dictionary:break
|
|
13918
13921
|
default:return function(t,e){const{nullBitmap:n}=t
|
|
13919
13922
|
if(!n||t.nullCount<=0)return-1
|
|
13920
13923
|
let i=0
|
|
13921
|
-
for(const s of new
|
|
13924
|
+
for(const s of new cW(n,t.offset+(e||0),t.length,n,oW)){if(!s)return i;++i}return-1}(t,n)}const i=qj.getVisitFn(t),s=nW(e)
|
|
13922
13925
|
for(let e=(n||0)-1,o=t.length;++e<o;)if(s(i(t,e)))return e
|
|
13923
|
-
return-1}function
|
|
13926
|
+
return-1}function MW(t,e,n){const i=qj.getVisitFn(t),s=nW(e)
|
|
13924
13927
|
for(let e=(n||0)-1,o=t.length;++e<o;)if(s(i(t,e)))return e
|
|
13925
|
-
return-1}
|
|
13926
|
-
const
|
|
13927
|
-
class
|
|
13928
|
-
if(0===t.nullCount&&1===t.stride&&(
|
|
13928
|
+
return-1}_W.prototype.visitNull=function(t,e){return null===e&&t.length>0?0:-1},_W.prototype.visitBool=IW,_W.prototype.visitInt=IW,_W.prototype.visitInt8=IW,_W.prototype.visitInt16=IW,_W.prototype.visitInt32=IW,_W.prototype.visitInt64=IW,_W.prototype.visitUint8=IW,_W.prototype.visitUint16=IW,_W.prototype.visitUint32=IW,_W.prototype.visitUint64=IW,_W.prototype.visitFloat=IW,_W.prototype.visitFloat16=IW,_W.prototype.visitFloat32=IW,_W.prototype.visitFloat64=IW,_W.prototype.visitUtf8=IW,_W.prototype.visitLargeUtf8=IW,_W.prototype.visitBinary=IW,_W.prototype.visitLargeBinary=IW,_W.prototype.visitFixedSizeBinary=IW,_W.prototype.visitDate=IW,_W.prototype.visitDateDay=IW,_W.prototype.visitDateMillisecond=IW,_W.prototype.visitTimestamp=IW,_W.prototype.visitTimestampSecond=IW,_W.prototype.visitTimestampMillisecond=IW,_W.prototype.visitTimestampMicrosecond=IW,_W.prototype.visitTimestampNanosecond=IW,_W.prototype.visitTime=IW,_W.prototype.visitTimeSecond=IW,_W.prototype.visitTimeMillisecond=IW,_W.prototype.visitTimeMicrosecond=IW,_W.prototype.visitTimeNanosecond=IW,_W.prototype.visitDecimal=IW,_W.prototype.visitList=IW,_W.prototype.visitStruct=IW,_W.prototype.visitUnion=IW,_W.prototype.visitDenseUnion=MW,_W.prototype.visitSparseUnion=MW,_W.prototype.visitDictionary=IW,_W.prototype.visitInterval=IW,_W.prototype.visitIntervalDayTime=IW,_W.prototype.visitIntervalYearMonth=IW,_W.prototype.visitDuration=IW,_W.prototype.visitDurationSecond=IW,_W.prototype.visitDurationMillisecond=IW,_W.prototype.visitDurationMicrosecond=IW,_W.prototype.visitDurationNanosecond=IW,_W.prototype.visitFixedSizeList=IW,_W.prototype.visitMap=IW
|
|
13929
|
+
const $W=new _W
|
|
13930
|
+
class EW extends Fq{}function DW(t){const{type:e}=t
|
|
13931
|
+
if(0===t.nullCount&&1===t.stride&&(cq.isInt(e)&&64!==e.bitWidth||cq.isTime(e)&&64!==e.bitWidth||cq.isFloat(e)&&e.precision!==OH.HALF))return new gW(t.data.length,(e=>{const n=t.data[e]
|
|
13929
13932
|
return n.values.subarray(0,n.length)[Symbol.iterator]()}))
|
|
13930
13933
|
let n=0
|
|
13931
|
-
return new
|
|
13932
|
-
return n+=i,new
|
|
13933
|
-
const
|
|
13934
|
-
var
|
|
13935
|
-
const
|
|
13936
|
-
class
|
|
13937
|
-
const s=t[0]instanceof
|
|
13938
|
-
if(0===s.length||s.some((t=>!(t instanceof
|
|
13934
|
+
return new gW(t.data.length,(e=>{const i=t.data[e].length,s=t.slice(n,n+i)
|
|
13935
|
+
return n+=i,new AW(s)}))}class AW{constructor(t){this.vector=t,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}EW.prototype.visitNull=DW,EW.prototype.visitBool=DW,EW.prototype.visitInt=DW,EW.prototype.visitInt8=DW,EW.prototype.visitInt16=DW,EW.prototype.visitInt32=DW,EW.prototype.visitInt64=DW,EW.prototype.visitUint8=DW,EW.prototype.visitUint16=DW,EW.prototype.visitUint32=DW,EW.prototype.visitUint64=DW,EW.prototype.visitFloat=DW,EW.prototype.visitFloat16=DW,EW.prototype.visitFloat32=DW,EW.prototype.visitFloat64=DW,EW.prototype.visitUtf8=DW,EW.prototype.visitLargeUtf8=DW,EW.prototype.visitBinary=DW,EW.prototype.visitLargeBinary=DW,EW.prototype.visitFixedSizeBinary=DW,EW.prototype.visitDate=DW,EW.prototype.visitDateDay=DW,EW.prototype.visitDateMillisecond=DW,EW.prototype.visitTimestamp=DW,EW.prototype.visitTimestampSecond=DW,EW.prototype.visitTimestampMillisecond=DW,EW.prototype.visitTimestampMicrosecond=DW,EW.prototype.visitTimestampNanosecond=DW,EW.prototype.visitTime=DW,EW.prototype.visitTimeSecond=DW,EW.prototype.visitTimeMillisecond=DW,EW.prototype.visitTimeMicrosecond=DW,EW.prototype.visitTimeNanosecond=DW,EW.prototype.visitDecimal=DW,EW.prototype.visitList=DW,EW.prototype.visitStruct=DW,EW.prototype.visitUnion=DW,EW.prototype.visitDenseUnion=DW,EW.prototype.visitSparseUnion=DW,EW.prototype.visitDictionary=DW,EW.prototype.visitInterval=DW,EW.prototype.visitIntervalDayTime=DW,EW.prototype.visitIntervalYearMonth=DW,EW.prototype.visitDuration=DW,EW.prototype.visitDurationSecond=DW,EW.prototype.visitDurationMillisecond=DW,EW.prototype.visitDurationMicrosecond=DW,EW.prototype.visitDurationNanosecond=DW,EW.prototype.visitFixedSizeList=DW,EW.prototype.visitMap=DW
|
|
13936
|
+
const TW=new EW
|
|
13937
|
+
var OW
|
|
13938
|
+
const RW={},FW={}
|
|
13939
|
+
class NW{constructor(t){var e,n,i
|
|
13940
|
+
const s=t[0]instanceof NW?t.flatMap((t=>t.data)):t
|
|
13941
|
+
if(0===s.length||s.some((t=>!(t instanceof uW))))throw new TypeError("Vector constructor expects an Array of Data instances.")
|
|
13939
13942
|
const o=null===(e=s[0])||void 0===e?void 0:e.type
|
|
13940
13943
|
switch(s.length){case 0:this._offsets=[0]
|
|
13941
13944
|
break
|
|
13942
|
-
case 1:{const{get:t,set:e,indexOf:n}=
|
|
13943
|
-
this.isValid=t=>
|
|
13944
|
-
break}default:Object.setPrototypeOf(this,
|
|
13945
|
-
switch(t.typeId){case
|
|
13945
|
+
case 1:{const{get:t,set:e,indexOf:n}=RW[o.typeId],i=s[0]
|
|
13946
|
+
this.isValid=t=>xW(i,t),this.get=e=>t(i,e),this.set=(t,n)=>e(i,t,n),this.indexOf=t=>n(i,t),this._offsets=[0,i.length]
|
|
13947
|
+
break}default:Object.setPrototypeOf(this,FW[o.typeId]),this._offsets=bW(s)}this.data=s,this.type=o,this.stride=Rq(o),this.numChildren=null!==(i=null===(n=o.children)||void 0===n?void 0:n.length)&&void 0!==i?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce(((t,e)=>t+e.byteLength),0)}get nullable(){return this.data.some((t=>t.nullable))}get nullCount(){return vW(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${_U[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(tW(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return TW.visit(this)}concat(...t){return new NW(this.data.concat(t.flatMap((t=>t.data)).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new NW(Qj(this,t,e,(({data:t,_offsets:e},n,i)=>yW(t,e,n,i))))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this
|
|
13948
|
+
switch(t.typeId){case _U.Int:case _U.Float:case _U.Decimal:case _U.Time:case _U.Timestamp:switch(e.length){case 0:return new s
|
|
13946
13949
|
case 1:return e[0].values.subarray(0,n*i)
|
|
13947
13950
|
default:return e.reduce(((t,{values:e,length:n})=>(t.array.set(e.subarray(0,n*i),t.offset),t.offset+=n*i,t)),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e
|
|
13948
|
-
return this.getChildAt(null===(e=this.type.children)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.numChildren?new
|
|
13951
|
+
return this.getChildAt(null===(e=this.type.children)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.numChildren?new NW(this.data.map((({children:e})=>e[t]))):null}get isMemoized(){return!!cq.isDictionary(this.type)&&this.data[0].dictionary.isMemoized}memoize(){if(cq.isDictionary(this.type)){const t=new LW(this.data[0].dictionary),e=this.data.map((e=>{const n=e.clone()
|
|
13949
13952
|
return n.dictionary=t,n}))
|
|
13950
|
-
return new
|
|
13953
|
+
return new NW(e)}return new LW(this)}unmemoize(){if(cq.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map((e=>{const n=e.clone()
|
|
13951
13954
|
return n.dictionary=t,n}))
|
|
13952
|
-
return new
|
|
13953
|
-
const e=Object.keys(
|
|
13954
|
-
for(const n of e){const e=
|
|
13955
|
-
|
|
13956
|
-
class
|
|
13955
|
+
return new NW(e)}return this}}OW=Symbol.toStringTag,NW[OW]=(t=>{t.type=cq.prototype,t.data=[],t.length=0,t.stride=1,t.numChildren=0,t._offsets=new Uint32Array([0]),t[Symbol.isConcatSpreadable]=!0
|
|
13956
|
+
const e=Object.keys(_U).map((t=>_U[t])).filter((t=>"number"==typeof t&&t!==_U.NONE))
|
|
13957
|
+
for(const n of e){const e=qj.getVisitFnByTypeId(n),i=pj.getVisitFnByTypeId(n),s=$W.getVisitFnByTypeId(n)
|
|
13958
|
+
RW[n]={get:e,set:i,indexOf:s},FW[n]=Object.create(t,{isValid:{value:CW(xW)},get:{value:CW(qj.getVisitFnByTypeId(n))},set:{value:kW(pj.getVisitFnByTypeId(n))},indexOf:{value:SW($W.getVisitFnByTypeId(n))}})}return"Vector"})(NW.prototype)
|
|
13959
|
+
class LW extends NW{constructor(t){super(t.data)
|
|
13957
13960
|
const e=this.get,n=this.set,i=this.slice,s=new Array(this.length)
|
|
13958
13961
|
Object.defineProperty(this,"get",{value(t){const n=s[t]
|
|
13959
13962
|
if(void 0!==n)return n
|
|
13960
13963
|
const i=e.call(this,t)
|
|
13961
|
-
return s[t]=i,i}}),Object.defineProperty(this,"set",{value(t,e){n.call(this,t,e),s[t]=e}}),Object.defineProperty(this,"slice",{value:(t,e)=>new
|
|
13962
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13963
|
-
return e?(t||new
|
|
13964
|
-
return n?(e||new
|
|
13964
|
+
return s[t]=i,i}}),Object.defineProperty(this,"set",{value(t,e){n.call(this,t,e),s[t]=e}}),Object.defineProperty(this,"slice",{value:(t,e)=>new LW(i.call(this,t,e))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new NW(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class BW{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,n,i){return t.prep(8,24),t.writeInt64(BigInt(null!=i?i:0)),t.pad(4),t.writeInt32(n),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}}class PW{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFooter(t,e){return(e||new PW).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+4),(e||new PW).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13965
|
+
return t?this.bb.readInt16(this.bb_pos+t):AH.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13966
|
+
return e?(t||new kU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const n=this.bb.__offset(this.bb_pos,8)
|
|
13967
|
+
return n?(e||new BW).__init(this.bb.__vector(this.bb_pos+n)+24*t,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13965
13968
|
return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){const n=this.bb.__offset(this.bb_pos,10)
|
|
13966
|
-
return n?(e||new
|
|
13969
|
+
return n?(e||new BW).__init(this.bb.__vector(this.bb_pos+n)+24*t,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10)
|
|
13967
13970
|
return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12)
|
|
13968
|
-
return n?(e||new
|
|
13969
|
-
return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,
|
|
13971
|
+
return n?(e||new eU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
|
|
13972
|
+
return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,AH.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
|
|
13970
13973
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13971
|
-
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class
|
|
13972
|
-
return new
|
|
13973
|
-
return new
|
|
13974
|
-
return!~e||(n[e]=t.clone({metadata:
|
|
13975
|
-
return new
|
|
13976
|
-
class
|
|
13977
|
-
return t[0]&&"object"==typeof t[0]&&(({name:e}=t[0]),void 0===n&&(n=t[0].type),void 0===i&&(i=t[0].nullable),void 0===s&&(s=t[0].metadata)),new
|
|
13978
|
-
return t[0]&&"object"==typeof t[0]?({name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0]):[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t,
|
|
13979
|
-
if(
|
|
13980
|
-
i.children&&i.children.length>0&&
|
|
13981
|
-
var
|
|
13982
|
-
class
|
|
13983
|
-
const e=
|
|
13984
|
-
return new
|
|
13985
|
-
|
|
13986
|
-
for(const n of[...t.recordBatches()].slice().reverse())
|
|
13974
|
+
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class zW{constructor(t=[],e,n,i=AH.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=UW(t)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map((t=>t.name))}toString(){return`Schema<{ ${this.fields.map(((t,e)=>`${e}: ${t}`)).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter((t=>e.has(t.name)))
|
|
13975
|
+
return new zW(n,this.metadata)}selectAt(t){const e=t.map((t=>this.fields[t])).filter(Boolean)
|
|
13976
|
+
return new zW(e,this.metadata)}assign(...t){const e=t[0]instanceof zW?t[0]:Array.isArray(t[0])?new zW(t[0]):new zW(t),n=[...this.fields],i=HW(HW(new Map,this.metadata),e.metadata),s=e.fields.filter((t=>{const e=n.findIndex((e=>e.name===t.name))
|
|
13977
|
+
return!~e||(n[e]=t.clone({metadata:HW(HW(new Map,n[e].metadata),t.metadata)}))&&!1})),o=UW(s,new Map)
|
|
13978
|
+
return new zW([...n,...s],i,new Map([...this.dictionaries,...o]))}}zW.prototype.fields=null,zW.prototype.metadata=null,zW.prototype.dictionaries=null
|
|
13979
|
+
class VW{static new(...t){let[e,n,i,s]=t
|
|
13980
|
+
return t[0]&&"object"==typeof t[0]&&(({name:e}=t[0]),void 0===n&&(n=t[0].type),void 0===i&&(i=t[0].nullable),void 0===s&&(s=t[0].metadata)),new VW(`${e}`,n,i,s)}constructor(t,e,n=!1,i){this.name=t,this.type=e,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,n,i,s]=t
|
|
13981
|
+
return t[0]&&"object"==typeof t[0]?({name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0]):[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t,VW.new(e,n,i,s)}}function HW(t,e){return new Map([...t||new Map,...e||new Map])}function UW(t,e=new Map){for(let n=-1,i=t.length;++n<i;){const i=t[n].type
|
|
13982
|
+
if(cq.isDictionary(i))if(e.has(i.id)){if(e.get(i.id)!==i.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else e.set(i.id,i.dictionary)
|
|
13983
|
+
i.children&&i.children.length>0&&UW(i.children,e)}return e}VW.prototype.type=null,VW.prototype.name=null,VW.prototype.nullable=null,VW.prototype.metadata=null
|
|
13984
|
+
var qW=UH,jW=HH
|
|
13985
|
+
class WW{static decode(t){t=new jW(CH(t))
|
|
13986
|
+
const e=PW.getRootAsFooter(t),n=zW.decode(e.schema(),new Map,e.version())
|
|
13987
|
+
return new GW(n,e)}static encode(t){const e=new qW,n=zW.encode(e,t.schema)
|
|
13988
|
+
PW.startRecordBatchesVector(e,t.numRecordBatches)
|
|
13989
|
+
for(const n of[...t.recordBatches()].slice().reverse())ZW.encode(e,n)
|
|
13987
13990
|
const i=e.endVector()
|
|
13988
|
-
|
|
13989
|
-
for(const n of[...t.dictionaryBatches()].slice().reverse())
|
|
13991
|
+
PW.startDictionariesVector(e,t.numDictionaries)
|
|
13992
|
+
for(const n of[...t.dictionaryBatches()].slice().reverse())ZW.encode(e,n)
|
|
13990
13993
|
const s=e.endVector()
|
|
13991
|
-
return
|
|
13992
|
-
if(e)return
|
|
13993
|
-
if(e)return
|
|
13994
|
-
return
|
|
13995
|
-
class
|
|
13996
|
-
for(;t.length>0;)t.shift().resolve(
|
|
13997
|
-
this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return
|
|
13998
|
-
throw new Error("AsyncQueue is closed")}}class
|
|
13994
|
+
return PW.startFooter(e),PW.addSchema(e,n),PW.addVersion(e,AH.V5),PW.addRecordBatches(e,i),PW.addDictionaries(e,s),PW.finishFooterBuffer(e,PW.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=AH.V5,n,i){this.schema=t,this.version=e,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let t,e=-1,n=this.numRecordBatches;++e<n;)(t=this.getRecordBatch(e))&&(yield t)}*dictionaryBatches(){for(let t,e=-1,n=this.numDictionaries;++e<n;)(t=this.getDictionaryBatch(e))&&(yield t)}getRecordBatch(t){return t>=0&&t<this.numRecordBatches&&this._recordBatches[t]||null}getDictionaryBatch(t){return t>=0&&t<this.numDictionaries&&this._dictionaryBatches[t]||null}}class GW extends WW{get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}constructor(t,e){super(t,e.version()),this._footer=e}getRecordBatch(t){if(t>=0&&t<this.numRecordBatches){const e=this._footer.recordBatches(t)
|
|
13995
|
+
if(e)return ZW.decode(e)}return null}getDictionaryBatch(t){if(t>=0&&t<this.numDictionaries){const e=this._footer.dictionaries(t)
|
|
13996
|
+
if(e)return ZW.decode(e)}return null}}class ZW{static decode(t){return new ZW(t.metaDataLength(),t.bodyLength(),t.offset())}static encode(t,e){const{metaDataLength:n}=e,i=BigInt(e.offset),s=BigInt(e.bodyLength)
|
|
13997
|
+
return BW.createBlock(t,i,n,s)}constructor(t,e,n){this.metaDataLength=t,this.offset=$U(n),this.bodyLength=$U(e)}}const KW=Object.freeze({done:!0,value:void 0})
|
|
13998
|
+
class YW{constructor(t){this._json=t}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class XW{tee(){return this._getDOMStream().tee()}pipe(t,e){return this._getNodeStream().pipe(t,e)}pipeTo(t,e){return this._getDOMStream().pipeTo(t,e)}pipeThrough(t,e){return this._getDOMStream().pipeThrough(t,e)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class JW extends XW{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise((t=>this._closedPromiseResolve=t))}get closed(){return this._closedPromise}cancel(t){return e(this,void 0,void 0,(function*(){yield this.return(t)}))}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){const{resolvers:t}=this
|
|
13999
|
+
for(;t.length>0;)t.shift().resolve(KW)
|
|
14000
|
+
this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return MH.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return MH.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return e(this,void 0,void 0,(function*(){return yield this.abort(t),KW}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),KW}))}read(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"read")).value}))}peek(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"peek")).value}))}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise(((t,e)=>{this.resolvers.push({resolve:t,reject:e})})):Promise.resolve(KW)}_ensureOpen(){if(this._closedPromiseResolve)return!0
|
|
14001
|
+
throw new Error("AsyncQueue is closed")}}class QW extends JW{write(t){if((t=CH(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?tH(this.toUint8Array(!0)):this.toUint8Array(!1).then(tH)}toUint8Array(t=!1){return t?bH(this._values)[0]:(()=>e(this,void 0,void 0,(function*(){var t,e,n,i
|
|
13999
14002
|
const s=[]
|
|
14000
14003
|
let o=0
|
|
14001
14004
|
try{for(var a,l=!0,c=r(this);!(t=(a=yield c.next()).done);l=!0){i=a.value,l=!1
|
|
14002
14005
|
const t=i
|
|
14003
|
-
s.push(t),o+=t.byteLength}}catch(t){e={error:t}}finally{try{l||t||!(n=c.return)||(yield n.call(c))}finally{if(e)throw e.error}}return
|
|
14004
|
-
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}return(t){return e(this,void 0,void 0,(function*(){const e=this.source.return&&(yield this.source.return(t))||
|
|
14005
|
-
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}}class
|
|
14006
|
+
s.push(t),o+=t.byteLength}}catch(t){e={error:t}}finally{try{l||t||!(n=c.return)||(yield n.call(c))}finally{if(e)throw e.error}}return bH(s,o)[0]})))()}}class tG{constructor(t){t&&(this.source=new nG(MH.fromIterable(t)))}[Symbol.iterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class eG{constructor(t){t instanceof eG?this.source=t.source:t instanceof QW?this.source=new iG(MH.fromAsyncIterable(t)):fH(t)?this.source=new iG(MH.fromNodeStream(t)):pH(t)?this.source=new iG(MH.fromDOMStream(t)):hH(t)?this.source=new iG(MH.fromDOMStream(t.body)):rH(t)?this.source=new iG(MH.fromIterable(t)):(oH(t)||aH(t))&&(this.source=new iG(MH.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class nG{constructor(t){this.source=t}cancel(t){this.return(t)}peek(t){return this.next(t,"peek").value}read(t){return this.next(t,"read").value}next(t,e="read"){return this.source.next({cmd:e,size:t})}throw(t){return Object.create(this.source.throw&&this.source.throw(t)||KW)}return(t){return Object.create(this.source.return&&this.source.return(t)||KW)}}class iG{constructor(t){this.source=t,this._closedPromise=new Promise((t=>this._closedPromiseResolve=t))}cancel(t){return e(this,void 0,void 0,(function*(){yield this.return(t)}))}get closed(){return this._closedPromise}read(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"read")).value}))}peek(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"peek")).value}))}next(t){return e(this,arguments,void 0,(function*(t,e="read"){return yield this.source.next({cmd:e,size:t})}))}throw(t){return e(this,void 0,void 0,(function*(){const e=this.source.throw&&(yield this.source.throw(t))||KW
|
|
14007
|
+
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}return(t){return e(this,void 0,void 0,(function*(){const e=this.source.return&&(yield this.source.return(t))||KW
|
|
14008
|
+
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}}class sG extends tG{constructor(t,e){super(),this.position=0,this.buffer=CH(t),this.size=void 0===e?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:n}=this.readAt(t,4)
|
|
14006
14009
|
return new DataView(e,n).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t<this.size}read(t){const{buffer:e,size:n,position:i}=this
|
|
14007
14010
|
return e&&i<n?("number"!=typeof t&&(t=Number.POSITIVE_INFINITY),this.position=Math.min(n,i+Math.min(n-i,t)),e.subarray(i,this.position)):null}readAt(t,e){const n=this.buffer,i=Math.min(this.size,t+e)
|
|
14008
|
-
return n?n.subarray(t,i):new Uint8Array(e)}close(){this.buffer&&(this.buffer=null)}throw(t){return this.close(),{done:!0,value:t}}return(t){return this.close(),{done:!0,value:t}}}class
|
|
14011
|
+
return n?n.subarray(t,i):new Uint8Array(e)}close(){this.buffer&&(this.buffer=null)}throw(t){return this.close(),{done:!0,value:t}}return(t){return this.close(),{done:!0,value:t}}}class oG extends eG{constructor(t,n){super(),this.position=0,this._handle=t,"number"==typeof n?this.size=n:this._pending=(()=>e(this,void 0,void 0,(function*(){this.size=(yield t.stat()).size,delete this._pending})))()}readInt32(t){return e(this,void 0,void 0,(function*(){const{buffer:e,byteOffset:n}=yield this.readAt(t,4)
|
|
14009
14012
|
return new DataView(e,n).getInt32(0,!0)}))}seek(t){return e(this,void 0,void 0,(function*(){return this._pending&&(yield this._pending),this.position=Math.min(t,this.size),t<this.size}))}read(t){return e(this,void 0,void 0,(function*(){this._pending&&(yield this._pending)
|
|
14010
14013
|
const{_handle:e,size:n,position:i}=this
|
|
14011
14014
|
if(e&&i<n){"number"!=typeof t&&(t=Number.POSITIVE_INFINITY)
|
|
@@ -14016,255 +14019,255 @@ return l}return null}))}readAt(t,n){return e(this,void 0,void 0,(function*(){thi
|
|
|
14016
14019
|
const{_handle:e,size:i}=this
|
|
14017
14020
|
if(e&&t+n<i){const s=Math.min(i,t+n),o=new Uint8Array(s-t)
|
|
14018
14021
|
return(yield e.read(o,0,n,t)).buffer}return new Uint8Array(n)}))}close(){return e(this,void 0,void 0,(function*(){const t=this._handle
|
|
14019
|
-
this._handle=null,t&&(yield t.close())}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}}function
|
|
14020
|
-
class
|
|
14022
|
+
this._handle=null,t&&(yield t.close())}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}}function rG(t){return t<0&&(t=4294967295+t+1),`0x${t.toString(16)}`}const aG=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8]
|
|
14023
|
+
class lG{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([t.buffer[1]>>>16,65535&t.buffer[1],t.buffer[0]>>>16,65535&t.buffer[0]])
|
|
14021
14024
|
let i=e[3]*n[3]
|
|
14022
14025
|
this.buffer[0]=65535&i
|
|
14023
14026
|
let s=i>>>16
|
|
14024
14027
|
return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<i?65536:0,this.buffer[1]+=s>>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0
|
|
14025
|
-
this.buffer[1]+=t.buffer[1],e<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]<t.buffer[1]||this.buffer[1]===t.buffer[1]&&this.buffer[0]<t.buffer[0]}equals(t){return this.buffer[1]===t.buffer[1]&&this.buffer[0]==t.buffer[0]}greaterThan(t){return t.lessThan(this)}hex(){return`${
|
|
14026
|
-
for(let e=0;e<n;){const s=8<n-e?8:n-e,o=new
|
|
14028
|
+
this.buffer[1]+=t.buffer[1],e<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]<t.buffer[1]||this.buffer[1]===t.buffer[1]&&this.buffer[0]<t.buffer[0]}equals(t){return this.buffer[1]===t.buffer[1]&&this.buffer[0]==t.buffer[0]}greaterThan(t){return t.lessThan(this)}hex(){return`${rG(this.buffer[1])} ${rG(this.buffer[0])}`}}class cG extends lG{times(t){return this._times(t),this}plus(t){return this._plus(t),this}static from(t,e=new Uint32Array(2)){return cG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return cG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.length,i=new cG(e)
|
|
14029
|
+
for(let e=0;e<n;){const s=8<n-e?8:n-e,o=new cG(new Uint32Array([Number.parseInt(t.slice(e,e+s),10),0])),r=new cG(new Uint32Array([aG[s],0]))
|
|
14027
14030
|
i.times(r),i.plus(o),e+=s}return i}static convertArray(t){const e=new Uint32Array(2*t.length)
|
|
14028
|
-
for(let n=-1,i=t.length;++n<i;)
|
|
14029
|
-
return e}static multiply(t,e){return new
|
|
14030
|
-
return e<n||e===n&&this.buffer[0]<t.buffer[0]}static from(t,e=new Uint32Array(2)){return
|
|
14031
|
-
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new
|
|
14031
|
+
for(let n=-1,i=t.length;++n<i;)cG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
|
|
14032
|
+
return e}static multiply(t,e){return new cG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new cG(new Uint32Array(t.buffer)).plus(e)}}class dG extends lG{negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],0==this.buffer[0]&&++this.buffer[1],this}times(t){return this._times(t),this}plus(t){return this._plus(t),this}lessThan(t){const e=this.buffer[1]<<0,n=t.buffer[1]<<0
|
|
14033
|
+
return e<n||e===n&&this.buffer[0]<t.buffer[0]}static from(t,e=new Uint32Array(2)){return dG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return dG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.startsWith("-"),i=t.length,s=new dG(e)
|
|
14034
|
+
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new dG(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0])),r=new dG(new Uint32Array([aG[n],0]))
|
|
14032
14035
|
s.times(r),s.plus(o),e+=n}return n?s.negate():s}static convertArray(t){const e=new Uint32Array(2*t.length)
|
|
14033
|
-
for(let n=-1,i=t.length;++n<i;)
|
|
14034
|
-
return e}static multiply(t,e){return new
|
|
14035
|
-
let c=
|
|
14036
|
+
for(let n=-1,i=t.length;++n<i;)dG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
|
|
14037
|
+
return e}static multiply(t,e){return new dG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new dG(new Uint32Array(t.buffer)).plus(e)}}class hG{constructor(t){this.buffer=t}high(){return new dG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new dG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],0==this.buffer[0]&&++this.buffer[1],0==this.buffer[1]&&++this.buffer[2],0==this.buffer[2]&&++this.buffer[3],this}times(t){const e=new cG(new Uint32Array([this.buffer[3],0])),n=new cG(new Uint32Array([this.buffer[2],0])),i=new cG(new Uint32Array([this.buffer[1],0])),s=new cG(new Uint32Array([this.buffer[0],0])),o=new cG(new Uint32Array([t.buffer[3],0])),r=new cG(new Uint32Array([t.buffer[2],0])),a=new cG(new Uint32Array([t.buffer[1],0])),l=new cG(new Uint32Array([t.buffer[0],0]))
|
|
14038
|
+
let c=cG.multiply(s,l)
|
|
14036
14039
|
this.buffer[0]=c.low()
|
|
14037
|
-
const d=new
|
|
14038
|
-
c=
|
|
14039
|
-
return new
|
|
14040
|
-
return e[3]=this.buffer[3]+t.buffer[3]>>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]<this.buffer[0]>>>0&&++e[1],e[1]<this.buffer[1]>>>0&&++e[2],e[2]<this.buffer[2]>>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${
|
|
14041
|
-
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new
|
|
14040
|
+
const d=new cG(new Uint32Array([c.high(),0]))
|
|
14041
|
+
c=cG.multiply(i,l),d.plus(c),c=cG.multiply(s,a),d.plus(c),this.buffer[1]=d.low(),this.buffer[3]=d.lessThan(c)?1:0,this.buffer[2]=d.high()
|
|
14042
|
+
return new cG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(cG.multiply(n,l)).plus(cG.multiply(i,a)).plus(cG.multiply(s,r)),this.buffer[3]+=cG.multiply(e,l).plus(cG.multiply(n,a)).plus(cG.multiply(i,r)).plus(cG.multiply(s,o)).low(),this}plus(t){const e=new Uint32Array(4)
|
|
14043
|
+
return e[3]=this.buffer[3]+t.buffer[3]>>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]<this.buffer[0]>>>0&&++e[1],e[1]<this.buffer[1]>>>0&&++e[2],e[2]<this.buffer[2]>>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${rG(this.buffer[3])} ${rG(this.buffer[2])} ${rG(this.buffer[1])} ${rG(this.buffer[0])}`}static multiply(t,e){return new hG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new hG(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return hG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return hG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new hG(e)
|
|
14044
|
+
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new hG(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0,0,0])),r=new hG(new Uint32Array([aG[n],0,0,0]))
|
|
14042
14045
|
s.times(r),s.plus(o),e+=n}return n?s.negate():s}static convertArray(t){const e=new Uint32Array(4*t.length)
|
|
14043
|
-
for(let n=-1,i=t.length;++n<i;)
|
|
14044
|
-
return e}}class
|
|
14045
|
-
return
|
|
14046
|
+
for(let n=-1,i=t.length;++n<i;)hG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+16*n,4))
|
|
14047
|
+
return e}}class uG extends Fq{constructor(t,e,n,i,s=AH.V5){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=t,this.nodes=e,this.buffers=n,this.dictionaries=i,this.metadataVersion=s}visit(t){return super.visit(t instanceof VW?t.type:t)}visitNull(t,{length:e}=this.nextFieldNode()){return mW({type:t,length:e})}visitBool(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitInt(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFloat(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitFixedSizeBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDate(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTimestamp(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTime(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDecimal(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitList(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}visitStruct(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),children:this.visitMany(t.children)})}visitUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return this.metadataVersion<AH.V5&&this.readNullBitmap(t,n),t.mode===TH.Sparse?this.visitSparseUnion(t,{length:e,nullCount:n}):this.visitDenseUnion(t,{length:e,nullCount:n})}visitDenseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),valueOffsets:this.readOffsets(t),children:this.visitMany(t.children)})}visitSparseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),children:this.visitMany(t.children)})}visitDictionary(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t.indices),dictionary:this.readDictionary(t)})}visitInterval(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDuration(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFixedSizeList(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),child:this.visit(t.children[0])})}visitMap(t,{length:e,nullCount:n}=this.nextFieldNode()){return mW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(t,e,n=this.nextBufferRange()){return e>0&&this.readData(t,n)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class pG extends uG{constructor(t,e,n,i,s){super(new Uint8Array(0),e,n,i,s),this.sources=t}readNullBitmap(t,e,{offset:n}=this.nextBufferRange()){return e<=0?new Uint8Array(0):lW(this.sources[n])}readOffsets(t,{offset:e}=this.nextBufferRange()){return yH(Uint8Array,yH(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return yH(Uint8Array,yH(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:n}=this
|
|
14048
|
+
return cq.isTimestamp(t)||(cq.isInt(t)||cq.isTime(t))&&64===t.bitWidth||cq.isDuration(t)||cq.isDate(t)&&t.unit===RH.MILLISECOND?yH(Uint8Array,dG.convertArray(n[e])):cq.isDecimal(t)?yH(Uint8Array,hG.convertArray(n[e])):cq.isBinary(t)||cq.isLargeBinary(t)||cq.isFixedSizeBinary(t)?function(t){const e=t.join(""),n=new Uint8Array(e.length/2)
|
|
14046
14049
|
for(let t=0;t<e.length;t+=2)n[t>>1]=Number.parseInt(e.slice(t,t+2),16)
|
|
14047
|
-
return n}(n[e]):
|
|
14048
|
-
const
|
|
14049
|
-
function
|
|
14050
|
+
return n}(n[e]):cq.isBool(t)?lW(n[e]):cq.isUtf8(t)||cq.isLargeUtf8(t)?nH(n[e].join("")):yH(Uint8Array,yH(t.ArrayType,n[e].map((t=>+t))))}}class fG extends Fq{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every(((t,n)=>this.compareFields(t,e[n])))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function mG(t,e){return e instanceof t.constructor}function gG(t,e){return t===e||mG(t,e)}function vG(t,e){return t===e||mG(t,e)&&t.bitWidth===e.bitWidth&&t.isSigned===e.isSigned}function bG(t,e){return t===e||mG(t,e)&&t.precision===e.precision}function yG(t,e){return t===e||mG(t,e)&&t.unit===e.unit}function wG(t,e){return t===e||mG(t,e)&&t.unit===e.unit&&t.timezone===e.timezone}function xG(t,e){return t===e||mG(t,e)&&t.unit===e.unit&&t.bitWidth===e.bitWidth}function CG(t,e){return t===e||mG(t,e)&&t.mode===e.mode&&t.typeIds.every(((t,n)=>t===e.typeIds[n]))&&_G.compareManyFields(t.children,e.children)}function kG(t,e){return t===e||mG(t,e)&&t.unit===e.unit}function SG(t,e){return t===e||mG(t,e)&&t.unit===e.unit}fG.prototype.visitNull=gG,fG.prototype.visitBool=gG,fG.prototype.visitInt=vG,fG.prototype.visitInt8=vG,fG.prototype.visitInt16=vG,fG.prototype.visitInt32=vG,fG.prototype.visitInt64=vG,fG.prototype.visitUint8=vG,fG.prototype.visitUint16=vG,fG.prototype.visitUint32=vG,fG.prototype.visitUint64=vG,fG.prototype.visitFloat=bG,fG.prototype.visitFloat16=bG,fG.prototype.visitFloat32=bG,fG.prototype.visitFloat64=bG,fG.prototype.visitUtf8=gG,fG.prototype.visitLargeUtf8=gG,fG.prototype.visitBinary=gG,fG.prototype.visitLargeBinary=gG,fG.prototype.visitFixedSizeBinary=function(t,e){return t===e||mG(t,e)&&t.byteWidth===e.byteWidth},fG.prototype.visitDate=yG,fG.prototype.visitDateDay=yG,fG.prototype.visitDateMillisecond=yG,fG.prototype.visitTimestamp=wG,fG.prototype.visitTimestampSecond=wG,fG.prototype.visitTimestampMillisecond=wG,fG.prototype.visitTimestampMicrosecond=wG,fG.prototype.visitTimestampNanosecond=wG,fG.prototype.visitTime=xG,fG.prototype.visitTimeSecond=xG,fG.prototype.visitTimeMillisecond=xG,fG.prototype.visitTimeMicrosecond=xG,fG.prototype.visitTimeNanosecond=xG,fG.prototype.visitDecimal=gG,fG.prototype.visitList=function(t,e){return t===e||mG(t,e)&&t.children.length===e.children.length&&_G.compareManyFields(t.children,e.children)},fG.prototype.visitStruct=function(t,e){return t===e||mG(t,e)&&t.children.length===e.children.length&&_G.compareManyFields(t.children,e.children)},fG.prototype.visitUnion=CG,fG.prototype.visitDenseUnion=CG,fG.prototype.visitSparseUnion=CG,fG.prototype.visitDictionary=function(t,e){return t===e||mG(t,e)&&t.id===e.id&&t.isOrdered===e.isOrdered&&_G.visit(t.indices,e.indices)&&_G.visit(t.dictionary,e.dictionary)},fG.prototype.visitInterval=kG,fG.prototype.visitIntervalDayTime=kG,fG.prototype.visitIntervalYearMonth=kG,fG.prototype.visitDuration=SG,fG.prototype.visitDurationSecond=SG,fG.prototype.visitDurationMillisecond=SG,fG.prototype.visitDurationMicrosecond=SG,fG.prototype.visitDurationNanosecond=SG,fG.prototype.visitFixedSizeList=function(t,e){return t===e||mG(t,e)&&t.listSize===e.listSize&&t.children.length===e.children.length&&_G.compareManyFields(t.children,e.children)},fG.prototype.visitMap=function(t,e){return t===e||mG(t,e)&&t.keysSorted===e.keysSorted&&t.children.length===e.children.length&&_G.compareManyFields(t.children,e.children)}
|
|
14051
|
+
const _G=new fG
|
|
14052
|
+
function IG(t,e){return _G.compareSchemas(t,e)}function MG(t,e){return function(t,e){const n=[...t.fields],i=[],s={numBatches:e.reduce(((t,e)=>Math.max(t,e.length)),0)}
|
|
14050
14053
|
let o=0,r=0,a=-1
|
|
14051
14054
|
const l=e.length
|
|
14052
14055
|
let c,d=[]
|
|
14053
14056
|
for(;s.numBatches-- >0;){for(r=Number.POSITIVE_INFINITY,a=-1;++a<l;)d[a]=c=e[a].shift(),r=Math.min(r,c?c.length:r)
|
|
14054
|
-
Number.isFinite(r)&&(d
|
|
14057
|
+
Number.isFinite(r)&&(d=$G(n,r,d,e,s),r>0&&(i[o++]=mW({type:new Iq(n),length:r,nullCount:0,children:d.slice()})))}return[t=t.assign(n),i.map((e=>new TG(t,e)))]}(t,e.map((t=>t.data.concat())))}function $G(t,e,n,i,s){var o
|
|
14055
14058
|
const r=(e+63&-64)>>3
|
|
14056
14059
|
for(let a=-1,l=i.length;++a<l;){const l=n[a],c=null==l?void 0:l.length
|
|
14057
14060
|
if(c>=e)c===e?n[a]=l:(n[a]=l.slice(0,e),s.numBatches=Math.max(s.numBatches,i[a].unshift(l.slice(e,c-e))))
|
|
14058
14061
|
else{const i=t[a]
|
|
14059
|
-
t[a]=i.clone({nullable:!0}),n[a]=null!==(o=null==l?void 0:l._changeLengthAndBackfillNullBitmap(e))&&void 0!==o?o:
|
|
14060
|
-
class
|
|
14061
|
-
if(0===t.length)return this.batches=[],this.schema=new
|
|
14062
|
+
t[a]=i.clone({nullable:!0}),n[a]=null!==(o=null==l?void 0:l._changeLengthAndBackfillNullBitmap(e))&&void 0!==o?o:mW({type:i.type,length:e,nullCount:e,nullBitmap:new Uint8Array(r)})}}return n}var EG,DG
|
|
14063
|
+
class AG{constructor(...t){var e,n
|
|
14064
|
+
if(0===t.length)return this.batches=[],this.schema=new zW([]),this._offsets=[0],this
|
|
14062
14065
|
let i,s
|
|
14063
|
-
t[0]instanceof
|
|
14064
|
-
const o=t=>{if(t){if(t instanceof
|
|
14065
|
-
if(t instanceof
|
|
14066
|
-
if(t instanceof
|
|
14066
|
+
t[0]instanceof zW&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop())
|
|
14067
|
+
const o=t=>{if(t){if(t instanceof TG)return[t]
|
|
14068
|
+
if(t instanceof AG)return t.batches
|
|
14069
|
+
if(t instanceof uW){if(t.type instanceof Iq)return[new TG(new zW(t.type.children),t)]}else{if(Array.isArray(t))return t.flatMap((t=>o(t)))
|
|
14067
14070
|
if("function"==typeof t[Symbol.iterator])return[...t].flatMap((t=>o(t)))
|
|
14068
|
-
if("object"==typeof t){const e=Object.keys(t),n=e.map((e=>new
|
|
14069
|
-
return 0===o.length?[new
|
|
14070
|
-
if(i=null!==(n=null!=i?i:null===(e=r[0])||void 0===e?void 0:e.schema)&&void 0!==n?n:new
|
|
14071
|
-
for(const t of r){if(!(t instanceof
|
|
14072
|
-
if(!
|
|
14073
|
-
return new
|
|
14074
|
-
const i=
|
|
14075
|
-
return new
|
|
14076
|
-
if(0===e.length){const{type:n}=this.schema.fields[t],i=
|
|
14077
|
-
e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new
|
|
14071
|
+
if("object"==typeof t){const e=Object.keys(t),n=e.map((e=>new NW([t[e]]))),s=null!=i?i:new zW(e.map(((t,e)=>new VW(String(t),n[e].type,n[e].nullable)))),[,o]=MG(s,n)
|
|
14072
|
+
return 0===o.length?[new TG(t)]:o}}}return[]},r=t.flatMap((t=>o(t)))
|
|
14073
|
+
if(i=null!==(n=null!=i?i:null===(e=r[0])||void 0===e?void 0:e.schema)&&void 0!==n?n:new zW([]),!(i instanceof zW))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
|
|
14074
|
+
for(const t of r){if(!(t instanceof TG))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
|
|
14075
|
+
if(!IG(i,t.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=r,this._offsets=null!=s?s:bW(this.data)}get data(){return this.batches.map((({data:t})=>t))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce(((t,e)=>t+e.length),0)}get nullCount(){return-1===this._nullCount&&(this._nullCount=vW(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(tW(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?TW.visit(new NW(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(",\n ")}\n]`}concat(...t){const e=this.schema,n=this.data.concat(t.flatMap((({data:t})=>t)))
|
|
14076
|
+
return new AG(e,n.map((t=>new TG(e,t))))}slice(t,e){const n=this.schema;[t,e]=Qj({length:this.numRows},t,e)
|
|
14077
|
+
const i=yW(this.data,this._offsets,t,e)
|
|
14078
|
+
return new AG(n,i.map((t=>new TG(n,t))))}getChild(t){return this.getChildAt(this.schema.fields.findIndex((e=>e.name===t)))}getChildAt(t){if(t>-1&&t<this.schema.fields.length){const e=this.data.map((e=>e.children[t]))
|
|
14079
|
+
if(0===e.length){const{type:n}=this.schema.fields[t],i=mW({type:n,length:0,nullCount:0})
|
|
14080
|
+
e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new NW(e)}return null}setChild(t,e){var n
|
|
14078
14081
|
return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex((e=>e.name===t)),e)}setChildAt(t,e){let n=this.schema,i=[...this.batches]
|
|
14079
|
-
if(t>-1&&t<this.numCols){e||(e=new
|
|
14080
|
-
const s=n.fields.slice(),o=s[t].clone({type:e.type}),r=this.schema.fields.map(((t,e)=>this.getChildAt(e)));[s[t],r[t]]=[o,e],[n,i]=
|
|
14082
|
+
if(t>-1&&t<this.numCols){e||(e=new NW([mW({type:new dq,length:this.numRows})]))
|
|
14083
|
+
const s=n.fields.slice(),o=s[t].clone({type:e.type}),r=this.schema.fields.map(((t,e)=>this.getChildAt(e)));[s[t],r[t]]=[o,e],[n,i]=MG(n,r)}return new AG(n,i)}select(t){const e=this.schema.fields.reduce(((t,e,n)=>t.set(e.name,n)),new Map)
|
|
14081
14084
|
return this.selectAt(t.map((t=>e.get(t))).filter((t=>t>-1)))}selectAt(t){const e=this.schema.selectAt(t),n=this.batches.map((e=>e.selectAt(t)))
|
|
14082
|
-
return new
|
|
14085
|
+
return new AG(e,n)}assign(t){const e=this.schema.fields,[n,i]=t.schema.fields.reduce(((t,n,i)=>{const[s,o]=t,r=e.findIndex((t=>t.name===n.name))
|
|
14083
14086
|
return~r?o[r]=i:s.push(i),t}),[[],[]]),s=this.schema.assign(t.schema),o=[...e.map(((t,e)=>[e,i[e]])).map((([e,n])=>void 0===n?this.getChildAt(e):t.getChildAt(n))),...n.map((e=>t.getChildAt(e)))].filter(Boolean)
|
|
14084
|
-
return new
|
|
14085
|
-
let
|
|
14086
|
-
if([,this.data=
|
|
14087
|
+
return new AG(...MG(s,o))}}EG=Symbol.toStringTag,AG[EG]=(t=>(t.schema=null,t.batches=[],t._offsets=new Uint32Array([0]),t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,t.isValid=CW(xW),t.get=CW(qj.getVisitFn(_U.Struct)),t.set=kW(pj.getVisitFn(_U.Struct)),t.indexOf=SW($W.getVisitFn(_U.Struct)),"Table"))(AG.prototype)
|
|
14088
|
+
let TG=class t{constructor(...t){switch(t.length){case 2:if([this.schema]=t,!(this.schema instanceof zW))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.")
|
|
14089
|
+
if([,this.data=mW({nullCount:0,type:new Iq(this.schema.fields),children:this.schema.fields.map((t=>mW({type:t.type,nullCount:0})))})]=t,!(this.data instanceof uW))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=OG(this.schema,this.data.children)
|
|
14087
14090
|
break
|
|
14088
|
-
case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce(((t,n,i)=>(t.children[i]=e[n],t.length=Math.max(t.length,e[n].length),t.fields[i]=
|
|
14089
|
-
break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=
|
|
14091
|
+
case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce(((t,n,i)=>(t.children[i]=e[n],t.length=Math.max(t.length,e[n].length),t.fields[i]=VW.new({name:n,type:e[n].type,nullable:!0}),t)),{length:0,fields:new Array,children:new Array}),o=new zW(n),r=mW({type:new Iq(n),length:s,children:i,nullCount:0});[this.schema,this.data]=OG(o,r.children,s)
|
|
14092
|
+
break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=RG(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return qj.visit(this.data,t)}at(t){return this.get(tW(t,this.numRows))}set(t,e){return pj.visit(this.data,t,e)}indexOf(t,e){return $W.visit(this.data,t,e)}[Symbol.iterator](){return TW.visit(new NW([this.data]))}toArray(){return[...this]}concat(...t){return new AG(this.schema,[this,...t])}slice(e,n){const[i]=new NW([this.data]).slice(e,n).data
|
|
14090
14093
|
return new t(this.schema,i)}getChild(t){var e
|
|
14091
|
-
return this.getChildAt(null===(e=this.schema.fields)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.schema.fields.length?new
|
|
14094
|
+
return this.getChildAt(null===(e=this.schema.fields)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.schema.fields.length?new NW([this.data.children[t]]):null}setChild(t,e){var n
|
|
14092
14095
|
return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex((e=>e.name===t)),e)}setChildAt(e,n){let i=this.schema,s=this.data
|
|
14093
|
-
if(e>-1&&e<this.numCols){n||(n=new
|
|
14094
|
-
const t=i.fields.slice(),o=s.children.slice(),r=t[e].clone({type:n.type});[t[e],o[e]]=[r,n.data[0]],i=new
|
|
14096
|
+
if(e>-1&&e<this.numCols){n||(n=new NW([mW({type:new dq,length:this.numRows})]))
|
|
14097
|
+
const t=i.fields.slice(),o=s.children.slice(),r=t[e].clone({type:n.type});[t[e],o[e]]=[r,n.data[0]],i=new zW(t,new Map(this.schema.metadata)),s=mW({type:new Iq(t),children:o})}return new t(i,s)}select(e){const n=this.schema.select(e),i=new Iq(n.fields),s=[]
|
|
14095
14098
|
for(const t of e){const e=this.schema.fields.findIndex((e=>e.name===t))
|
|
14096
|
-
~e&&(s[e]=this.data.children[e])}return new t(n,
|
|
14099
|
+
~e&&(s[e]=this.data.children[e])}return new t(n,mW({type:i,length:this.numRows,children:s}))}selectAt(e){const n=this.schema.selectAt(e),i=e.map((t=>this.data.children[t])).filter(Boolean),s=mW({type:new Iq(n.fields),length:this.numRows,children:i})
|
|
14097
14100
|
return new t(n,s)}}
|
|
14098
|
-
function
|
|
14101
|
+
function OG(t,e,n=e.reduce(((t,e)=>Math.max(t,e.length)),0)){var i
|
|
14099
14102
|
const s=[...t.fields],o=[...e],r=(n+63&-64)>>3
|
|
14100
14103
|
for(const[a,l]of t.fields.entries()){const t=e[a]
|
|
14101
|
-
t&&t.length===n||(s[a]=l.clone({nullable:!0}),o[a]=null!==(i=null==t?void 0:t._changeLengthAndBackfillNullBitmap(n))&&void 0!==i?i:
|
|
14104
|
+
t&&t.length===n||(s[a]=l.clone({nullable:!0}),o[a]=null!==(i=null==t?void 0:t._changeLengthAndBackfillNullBitmap(n))&&void 0!==i?i:mW({type:l.type,length:n,nullCount:n,nullBitmap:new Uint8Array(r)}))}return[t.assign(s),mW({type:new Iq(s),length:n,children:o})]}function RG(t,e,n=new Map){var i,s
|
|
14102
14105
|
if((null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0)>0&&(null==t?void 0:t.length)===(null==e?void 0:e.length))for(let i=-1,o=t.length;++i<o;){const{type:o}=t[i],r=e[i]
|
|
14103
|
-
for(const t of[r,...(null===(s=null==r?void 0:r.dictionary)||void 0===s?void 0:s.data)||[]])
|
|
14104
|
-
if(
|
|
14105
|
-
if(n.has(t)){if(n.get(t)!==r.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else(null==r?void 0:r.dictionary)&&n.set(t,r.dictionary)}}return n}
|
|
14106
|
-
class
|
|
14107
|
-
super(t,
|
|
14108
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
14109
|
-
return t?this.bb.readUint8(this.bb_pos+t):
|
|
14106
|
+
for(const t of[r,...(null===(s=null==r?void 0:r.dictionary)||void 0===s?void 0:s.data)||[]])RG(o.children,null==t?void 0:t.children,n)
|
|
14107
|
+
if(cq.isDictionary(o)){const{id:t}=o
|
|
14108
|
+
if(n.has(t)){if(n.get(t)!==r.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else(null==r?void 0:r.dictionary)&&n.set(t,r.dictionary)}}return n}DG=Symbol.toStringTag,TG[DG]=(t=>(t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(TG.prototype)
|
|
14109
|
+
class FG extends TG{constructor(t){const e=t.fields.map((t=>mW({type:t.type})))
|
|
14110
|
+
super(t,mW({type:new Iq(t.fields),nullCount:0,children:e}))}}let NG=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}version(){const t=this.bb.__offset(this.bb_pos,4)
|
|
14111
|
+
return t?this.bb.readInt16(this.bb_pos+t):AH.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6)
|
|
14112
|
+
return t?this.bb.readUint8(this.bb_pos+t):SU.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8)
|
|
14110
14113
|
return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10)
|
|
14111
14114
|
return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12)
|
|
14112
|
-
return n?(e||new
|
|
14113
|
-
return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,
|
|
14115
|
+
return n?(e||new eU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
|
|
14116
|
+
return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,AH.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,SU.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
|
|
14114
14117
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
14115
14118
|
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(e,n,i,s,o,r){return t.startMessage(e),t.addVersion(e,n),t.addHeaderType(e,i),t.addHeader(e,s),t.addBodyLength(e,o),t.addCustomMetadata(e,r),t.endMessage(e)}}
|
|
14116
|
-
const
|
|
14117
|
-
return
|
|
14118
|
-
const n=
|
|
14119
|
-
return
|
|
14120
|
-
return
|
|
14121
|
-
function
|
|
14122
|
-
var n}),[])}function
|
|
14123
|
-
i.VALIDITY&&e.push(new
|
|
14124
|
-
switch(n){case"NONE":case"null":return new
|
|
14125
|
-
case"binary":return new
|
|
14126
|
-
case"largebinary":return new
|
|
14127
|
-
case"utf8":return new
|
|
14128
|
-
case"largeutf8":return new
|
|
14129
|
-
case"bool":return new
|
|
14130
|
-
case"list":return new
|
|
14131
|
-
case"struct":case"struct_":return new
|
|
14132
|
-
return new
|
|
14133
|
-
return new
|
|
14134
|
-
return new
|
|
14135
|
-
return new
|
|
14136
|
-
return new
|
|
14137
|
-
return new
|
|
14138
|
-
return new
|
|
14139
|
-
return new
|
|
14140
|
-
return new
|
|
14141
|
-
return new
|
|
14142
|
-
return new
|
|
14143
|
-
return new
|
|
14144
|
-
class
|
|
14145
|
-
return n._createHeader=function(t,e){return()=>{switch(e){case
|
|
14146
|
-
case
|
|
14147
|
-
case
|
|
14148
|
-
const e=
|
|
14149
|
-
return o._createHeader=function(t,e){return()=>{switch(e){case
|
|
14150
|
-
case
|
|
14151
|
-
case
|
|
14119
|
+
const LG=new class extends Fq{visit(t,e){return null==t||null==e?void 0:super.visit(t,e)}visitNull(t,e){return mU.startNull(e),mU.endNull(e)}visitInt(t,e){return QH.startInt(e),QH.addBitWidth(e,t.bitWidth),QH.addIsSigned(e,t.isSigned),QH.endInt(e)}visitFloat(t,e){return cU.startFloatingPoint(e),cU.addPrecision(e,t.precision),cU.endFloatingPoint(e)}visitBinary(t,e){return nU.startBinary(e),nU.endBinary(e)}visitLargeBinary(t,e){return hU.startLargeBinary(e),hU.endLargeBinary(e)}visitBool(t,e){return iU.startBool(e),iU.endBool(e)}visitUtf8(t,e){return wU.startUtf8(e),wU.endUtf8(e)}visitLargeUtf8(t,e){return uU.startLargeUtf8(e),uU.endLargeUtf8(e)}visitDecimal(t,e){return oU.startDecimal(e),oU.addScale(e,t.scale),oU.addPrecision(e,t.precision),oU.addBitWidth(e,t.bitWidth),oU.endDecimal(e)}visitDate(t,e){return sU.startDate(e),sU.addUnit(e,t.unit),sU.endDate(e)}visitTime(t,e){return vU.startTime(e),vU.addUnit(e,t.unit),vU.addBitWidth(e,t.bitWidth),vU.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0
|
|
14120
|
+
return bU.startTimestamp(e),bU.addUnit(e,t.unit),void 0!==n&&bU.addTimezone(e,n),bU.endTimestamp(e)}visitInterval(t,e){return dU.startInterval(e),dU.addUnit(e,t.unit),dU.endInterval(e)}visitDuration(t,e){return rU.startDuration(e),rU.addUnit(e,t.unit),rU.endDuration(e)}visitList(t,e){return pU.startList(e),pU.endList(e)}visitStruct(t,e){return gU.startStruct_(e),gU.endStruct_(e)}visitUnion(t,e){yU.startTypeIdsVector(e,t.typeIds.length)
|
|
14121
|
+
const n=yU.createTypeIdsVector(e,t.typeIds)
|
|
14122
|
+
return yU.startUnion(e),yU.addMode(e,t.mode),yU.addTypeIds(e,n),yU.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e)
|
|
14123
|
+
return tU.startDictionaryEncoding(e),tU.addId(e,BigInt(t.id)),tU.addIsOrdered(e,t.isOrdered),void 0!==n&&tU.addIndexType(e,n),tU.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return aU.startFixedSizeBinary(e),aU.addByteWidth(e,t.byteWidth),aU.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return lU.startFixedSizeList(e),lU.addListSize(e,t.listSize),lU.endFixedSizeList(e)}visitMap(t,e){return fU.startMap(e),fU.addKeysSorted(e,t.keysSorted),fU.endMap(e)}}
|
|
14124
|
+
function BG(t){return new ZG(t.count,zG(t.columns),VG(t.columns))}function PG(t,e){return(t.children||[]).filter(Boolean).map((t=>VW.fromJSON(t,e)))}function zG(t){return(t||[]).reduce(((t,e)=>{return[...t,new XG(e.count,(n=e.VALIDITY,(n||[]).reduce(((t,e)=>t+ +(0===e)),0))),...zG(e.children)]
|
|
14125
|
+
var n}),[])}function VG(t,e=[]){for(let n=-1,i=(t||[]).length;++n<i;){const i=t[n]
|
|
14126
|
+
i.VALIDITY&&e.push(new YG(e.length,i.VALIDITY.length)),i.TYPE_ID&&e.push(new YG(e.length,i.TYPE_ID.length)),i.OFFSET&&e.push(new YG(e.length,i.OFFSET.length)),i.DATA&&e.push(new YG(e.length,i.DATA.length)),e=VG(i.children,e)}return e}function HG(t=[]){return new Map(t.map((({key:t,value:e})=>[t,e])))}function UG(t){return new hq(t.isSigned,t.bitWidth)}function qG(t,e){const n=t.type.name
|
|
14127
|
+
switch(n){case"NONE":case"null":return new dq
|
|
14128
|
+
case"binary":return new fq
|
|
14129
|
+
case"largebinary":return new mq
|
|
14130
|
+
case"utf8":return new gq
|
|
14131
|
+
case"largeutf8":return new vq
|
|
14132
|
+
case"bool":return new bq
|
|
14133
|
+
case"list":return new _q((e||[])[0])
|
|
14134
|
+
case"struct":case"struct_":return new Iq(e||[])}switch(n){case"int":{const e=t.type
|
|
14135
|
+
return new hq(e.isSigned,e.bitWidth)}case"floatingpoint":{const e=t.type
|
|
14136
|
+
return new pq(OH[e.precision])}case"decimal":{const e=t.type
|
|
14137
|
+
return new yq(e.scale,e.precision,e.bitWidth)}case"date":{const e=t.type
|
|
14138
|
+
return new wq(RH[e.unit])}case"time":{const e=t.type
|
|
14139
|
+
return new xq(FH[e.unit],e.bitWidth)}case"timestamp":{const e=t.type
|
|
14140
|
+
return new Cq(FH[e.unit],e.timezone)}case"interval":{const e=t.type
|
|
14141
|
+
return new kq(NH[e.unit])}case"duration":{const e=t.type
|
|
14142
|
+
return new Sq(FH[e.unit])}case"union":{const n=t.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("")
|
|
14143
|
+
return new Mq(TH[o],n.typeIds||[],e||[])}case"fixedsizebinary":{const e=t.type
|
|
14144
|
+
return new $q(e.byteWidth)}case"fixedsizelist":{const n=t.type
|
|
14145
|
+
return new Eq(n.listSize,(e||[])[0])}case"map":{const n=t.type
|
|
14146
|
+
return new Dq((e||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}var jG=UH,WG=HH
|
|
14147
|
+
class GG{static fromJSON(t,e){const n=new GG(0,AH.V5,e)
|
|
14148
|
+
return n._createHeader=function(t,e){return()=>{switch(e){case SU.Schema:return zW.fromJSON(t)
|
|
14149
|
+
case SU.RecordBatch:return ZG.fromJSON(t)
|
|
14150
|
+
case SU.DictionaryBatch:return KG.fromJSON(t)}throw new Error(`Unrecognized Message type: { name: ${SU[e]}, type: ${e} }`)}}(t,e),n}static decode(t){t=new WG(CH(t))
|
|
14151
|
+
const e=NG.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new GG(n,i,s)
|
|
14152
|
+
return o._createHeader=function(t,e){return()=>{switch(e){case SU.Schema:return zW.decode(t.header(new kU),new Map,t.version())
|
|
14153
|
+
case SU.RecordBatch:return ZG.decode(t.header(new KH),t.version())
|
|
14154
|
+
case SU.DictionaryBatch:return KG.decode(t.header(new YH),t.version())}throw new Error(`Unrecognized Message type: { name: ${SU[e]}, type: ${e} }`)}}(e,s),o}static encode(t){const e=new jG
|
|
14152
14155
|
let n=-1
|
|
14153
|
-
return t.isSchema()?n=
|
|
14154
|
-
if(t instanceof
|
|
14155
|
-
if(t instanceof
|
|
14156
|
-
throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===
|
|
14157
|
-
for(let i,s=-1,o=-1,r=t.childrenLength();++s<r;)(i=t.children(s))&&(n[++o]=
|
|
14158
|
-
return n}function
|
|
14156
|
+
return t.isSchema()?n=zW.encode(e,t.header()):t.isRecordBatch()?n=ZG.encode(e,t.header()):t.isDictionaryBatch()&&(n=KG.encode(e,t.header())),NG.startMessage(e),NG.addVersion(e,AH.V5),NG.addHeader(e,n),NG.addHeaderType(e,t.headerType),NG.addBodyLength(e,BigInt(t.bodyLength)),NG.finishMessageBuffer(e,NG.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof zW)return new GG(0,AH.V5,SU.Schema,t)
|
|
14157
|
+
if(t instanceof ZG)return new GG(e,AH.V5,SU.RecordBatch,t)
|
|
14158
|
+
if(t instanceof KG)return new GG(e,AH.V5,SU.DictionaryBatch,t)
|
|
14159
|
+
throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===SU.Schema}isRecordBatch(){return this.headerType===SU.RecordBatch}isDictionaryBatch(){return this.headerType===SU.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=$U(t)}}class ZG{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,n){this._nodes=e,this._buffers=n,this._length=$U(t)}}class KG{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,n=!1){this._data=t,this._isDelta=n,this._id=$U(e)}}class YG{constructor(t,e){this.offset=$U(t),this.length=$U(e)}}class XG{constructor(t,e){this.length=$U(t),this.nullCount=$U(e)}}function JG(t,e){const n=[]
|
|
14160
|
+
for(let i,s=-1,o=-1,r=t.childrenLength();++s<r;)(i=t.children(s))&&(n[++o]=VW.decode(i,e))
|
|
14161
|
+
return n}function QG(t){const e=new Map
|
|
14159
14162
|
if(t)for(let n,i,s=-1,o=Math.trunc(t.customMetadataLength());++s<o;)(n=t.customMetadata(s))&&null!=(i=n.key())&&e.set(i,n.value())
|
|
14160
|
-
return e}function
|
|
14161
|
-
switch(n){case
|
|
14162
|
-
case
|
|
14163
|
-
case
|
|
14164
|
-
case
|
|
14165
|
-
case
|
|
14166
|
-
case
|
|
14167
|
-
case
|
|
14168
|
-
case
|
|
14169
|
-
return new
|
|
14170
|
-
return new
|
|
14171
|
-
return new
|
|
14172
|
-
return new
|
|
14173
|
-
return new
|
|
14174
|
-
return new
|
|
14175
|
-
return new
|
|
14176
|
-
return new
|
|
14177
|
-
return new
|
|
14178
|
-
return new
|
|
14179
|
-
return new
|
|
14180
|
-
return new
|
|
14163
|
+
return e}function tZ(t){return new hq(t.isSigned(),t.bitWidth())}function eZ(t,e){const n=t.typeType()
|
|
14164
|
+
switch(n){case xU.NONE:case xU.Null:return new dq
|
|
14165
|
+
case xU.Binary:return new fq
|
|
14166
|
+
case xU.LargeBinary:return new mq
|
|
14167
|
+
case xU.Utf8:return new gq
|
|
14168
|
+
case xU.LargeUtf8:return new vq
|
|
14169
|
+
case xU.Bool:return new bq
|
|
14170
|
+
case xU.List:return new _q((e||[])[0])
|
|
14171
|
+
case xU.Struct_:return new Iq(e||[])}switch(n){case xU.Int:{const e=t.type(new QH)
|
|
14172
|
+
return new hq(e.isSigned(),e.bitWidth())}case xU.FloatingPoint:{const e=t.type(new cU)
|
|
14173
|
+
return new pq(e.precision())}case xU.Decimal:{const e=t.type(new oU)
|
|
14174
|
+
return new yq(e.scale(),e.precision(),e.bitWidth())}case xU.Date:{const e=t.type(new sU)
|
|
14175
|
+
return new wq(e.unit())}case xU.Time:{const e=t.type(new vU)
|
|
14176
|
+
return new xq(e.unit(),e.bitWidth())}case xU.Timestamp:{const e=t.type(new bU)
|
|
14177
|
+
return new Cq(e.unit(),e.timezone())}case xU.Interval:{const e=t.type(new dU)
|
|
14178
|
+
return new kq(e.unit())}case xU.Duration:{const e=t.type(new rU)
|
|
14179
|
+
return new Sq(e.unit())}case xU.Union:{const n=t.type(new yU)
|
|
14180
|
+
return new Mq(n.mode(),n.typeIdsArray()||[],e||[])}case xU.FixedSizeBinary:{const e=t.type(new aU)
|
|
14181
|
+
return new $q(e.byteWidth())}case xU.FixedSizeList:{const n=t.type(new lU)
|
|
14182
|
+
return new Eq(n.listSize(),(e||[])[0])}case xU.Map:{const n=t.type(new fU)
|
|
14183
|
+
return new Dq((e||[])[0],n.keysSorted())}}throw new Error(`Unrecognized type: "${xU[n]}" (${n})`)}VW.encode=function(t,e){let n=-1,i=-1,s=-1
|
|
14181
14184
|
const o=e.type
|
|
14182
14185
|
let r=e.typeId
|
|
14183
|
-
|
|
14184
|
-
const a=(o.children||[]).map((e=>
|
|
14185
|
-
return
|
|
14186
|
+
cq.isDictionary(o)?(r=o.dictionary.typeId,s=LG.visit(o,t),i=LG.visit(o.dictionary,t)):i=LG.visit(o,t)
|
|
14187
|
+
const a=(o.children||[]).map((e=>VW.encode(t,e))),l=CU.createChildrenVector(t,a),c=e.metadata&&e.metadata.size>0?CU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
|
|
14188
|
+
return eU.startKeyValue(t),eU.addKey(t,i),eU.addValue(t,s),eU.endKeyValue(t)}))):-1
|
|
14186
14189
|
e.name&&(n=t.createString(e.name))
|
|
14187
|
-
|
|
14188
|
-
return
|
|
14189
|
-
e&&(a=t.dictionary())?e.has(n
|
|
14190
|
-
return i||null},
|
|
14191
|
-
return e&&(o=t.dictionary)?e.has(n=o.id)?(i=(i=o.indexType)?
|
|
14192
|
-
|
|
14193
|
-
const i=
|
|
14194
|
-
return
|
|
14195
|
-
|
|
14196
|
-
return
|
|
14197
|
-
for(let i,s=-1,o=-1,r=t.fieldsLength();++s<r;)(i=t.fields(s))&&(n[++o]=
|
|
14190
|
+
CU.startField(t),CU.addType(t,i),CU.addTypeType(t,r),CU.addChildren(t,l),CU.addNullable(t,!!e.nullable),-1!==n&&CU.addName(t,n);-1!==s&&CU.addDictionary(t,s);-1!==c&&CU.addCustomMetadata(t,c)
|
|
14191
|
+
return CU.endField(t)},VW.decode=function(t,e){let n,i,s,o,r,a
|
|
14192
|
+
e&&(a=t.dictionary())?e.has(n=$U(a.id()))?(o=(o=a.indexType())?tZ(o):new uq,r=new Oq(e.get(n),o,n,a.isOrdered()),i=new VW(t.name(),r,t.nullable(),QG(t))):(o=(o=a.indexType())?tZ(o):new uq,e.set(n,s=eZ(t,JG(t,e))),r=new Oq(s,o,n,a.isOrdered()),i=new VW(t.name(),r,t.nullable(),QG(t))):(s=eZ(t,JG(t,e)),i=new VW(t.name(),s,t.nullable(),QG(t)))
|
|
14193
|
+
return i||null},VW.fromJSON=function(t,e){let n,i,s,o,r,a
|
|
14194
|
+
return e&&(o=t.dictionary)?e.has(n=o.id)?(i=(i=o.indexType)?UG(i):new uq,a=new Oq(e.get(n),i,n,o.isOrdered),s=new VW(t.name,a,t.nullable,HG(t.metadata))):(i=(i=o.indexType)?UG(i):new uq,e.set(n,r=qG(t,PG(t,e))),a=new Oq(r,i,n,o.isOrdered),s=new VW(t.name,a,t.nullable,HG(t.metadata))):(r=qG(t,PG(t,e)),s=new VW(t.name,r,t.nullable,HG(t.metadata))),s||null},zW.encode=function(t,e){const n=e.fields.map((e=>VW.encode(t,e)))
|
|
14195
|
+
kU.startFieldsVector(t,n.length)
|
|
14196
|
+
const i=kU.createFieldsVector(t,n),s=e.metadata&&e.metadata.size>0?kU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
|
|
14197
|
+
return eU.startKeyValue(t),eU.addKey(t,i),eU.addValue(t,s),eU.endKeyValue(t)}))):-1
|
|
14198
|
+
kU.startSchema(t),kU.addFields(t,i),kU.addEndianness(t,nZ?XH.Little:XH.Big),-1!==s&&kU.addCustomMetadata(t,s)
|
|
14199
|
+
return kU.endSchema(t)},zW.decode=function(t,e=new Map,n=AH.V5){const i=function(t,e){const n=[]
|
|
14200
|
+
for(let i,s=-1,o=-1,r=t.fieldsLength();++s<r;)(i=t.fields(s))&&(n[++o]=VW.decode(i,e))
|
|
14198
14201
|
return n}(t,e)
|
|
14199
|
-
return new
|
|
14200
|
-
|
|
14201
|
-
for(const e of n.slice().reverse())
|
|
14202
|
+
return new zW(i,QG(t),e,n)},zW.fromJSON=function(t,e=new Map){return new zW(function(t,e){return(t.fields||[]).filter(Boolean).map((t=>VW.fromJSON(t,e)))}(t,e),HG(t.metadata),e)},ZG.encode=function(t,e){const n=e.nodes||[],i=e.buffers||[]
|
|
14203
|
+
KH.startNodesVector(t,n.length)
|
|
14204
|
+
for(const e of n.slice().reverse())XG.encode(t,e)
|
|
14202
14205
|
const s=t.endVector()
|
|
14203
|
-
|
|
14204
|
-
for(const e of i.slice().reverse())
|
|
14206
|
+
KH.startBuffersVector(t,i.length)
|
|
14207
|
+
for(const e of i.slice().reverse())YG.encode(t,e)
|
|
14205
14208
|
const o=t.endVector()
|
|
14206
|
-
return
|
|
14207
|
-
return new
|
|
14208
|
-
for(let n,i=-1,s=-1,o=t.nodesLength();++i<o;)(n=t.nodes(i))&&(e[++s]=
|
|
14209
|
+
return KH.startRecordBatch(t),KH.addLength(t,BigInt(e.length)),KH.addNodes(t,s),KH.addBuffers(t,o),KH.endRecordBatch(t)},ZG.decode=function(t,e=AH.V5){if(null!==t.compression())throw new Error("Record batch compression not implemented")
|
|
14210
|
+
return new ZG(t.length(),function(t){const e=[]
|
|
14211
|
+
for(let n,i=-1,s=-1,o=t.nodesLength();++i<o;)(n=t.nodes(i))&&(e[++s]=XG.decode(n))
|
|
14209
14212
|
return e}(t),function(t,e){const n=[]
|
|
14210
|
-
for(let i,s=-1,o=-1,r=t.buffersLength();++s<r;)(i=t.buffers(s))&&(e<
|
|
14211
|
-
return n}(t,e))},
|
|
14212
|
-
return
|
|
14213
|
-
const
|
|
14214
|
-
return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]})(),
|
|
14215
|
-
class
|
|
14216
|
-
return(t=this.readMetadataLength()).done||-1===t.value&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?
|
|
14213
|
+
for(let i,s=-1,o=-1,r=t.buffersLength();++s<r;)(i=t.buffers(s))&&(e<AH.V4&&(i.bb_pos+=8*(s+1)),n[++o]=YG.decode(i))
|
|
14214
|
+
return n}(t,e))},ZG.fromJSON=BG,KG.encode=function(t,e){const n=ZG.encode(t,e.data)
|
|
14215
|
+
return YH.startDictionaryBatch(t),YH.addId(t,BigInt(e.id)),YH.addIsDelta(t,e.isDelta),YH.addData(t,n),YH.endDictionaryBatch(t)},KG.decode=function(t,e=AH.V5){return new KG(ZG.decode(t.data(),e),t.id(),t.isDelta())},KG.fromJSON=function(t){return new KG(BG(t.data),t.id,t.isDelta)},XG.encode=function(t,e){return ZH.createFieldNode(t,BigInt(e.length),BigInt(e.nullCount))},XG.decode=function(t){return new XG(t.length(),t.nullCount())},YG.encode=function(t,e){return GH.createBuffer(t,BigInt(e.offset),BigInt(e.length))},YG.decode=function(t){return new YG(t.offset(),t.length())}
|
|
14216
|
+
const nZ=(()=>{const t=new ArrayBuffer(2)
|
|
14217
|
+
return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]})(),iZ=t=>`Expected ${SU[t]} Message in stream, but was null or length 0.`,sZ=t=>`Header pointer of flatbuffer-encoded ${SU[t]} Message is null or length 0.`,oZ=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,rZ=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`
|
|
14218
|
+
class aZ{constructor(t){this.source=t instanceof tG?t:new tG(t)}[Symbol.iterator](){return this}next(){let t
|
|
14219
|
+
return(t=this.readMetadataLength()).done||-1===t.value&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?KW:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e
|
|
14217
14220
|
if((e=this.next()).done)return null
|
|
14218
|
-
if(null!=t&&e.value.headerType!==t)throw new Error(
|
|
14221
|
+
if(null!=t&&e.value.headerType!==t)throw new Error(iZ(t))
|
|
14219
14222
|
return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0)
|
|
14220
|
-
const e=
|
|
14221
|
-
if(e.byteLength<t)throw new Error(
|
|
14222
|
-
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){const e=
|
|
14223
|
-
if(t&&!i)throw new Error(
|
|
14224
|
-
return i}readMetadataLength(){const t=this.source.read(
|
|
14223
|
+
const e=CH(this.source.read(t))
|
|
14224
|
+
if(e.byteLength<t)throw new Error(rZ(t,e.byteLength))
|
|
14225
|
+
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){const e=SU.Schema,n=this.readMessage(e),i=null==n?void 0:n.header()
|
|
14226
|
+
if(t&&!i)throw new Error(sZ(e))
|
|
14227
|
+
return i}readMetadataLength(){const t=this.source.read(dZ),e=t&&new HH(t),n=(null==e?void 0:e.readInt32(0))||0
|
|
14225
14228
|
return{done:0===n,value:n}}readMetadata(t){const e=this.source.read(t)
|
|
14226
|
-
if(!e)return
|
|
14227
|
-
if(e.byteLength<t)throw new Error(
|
|
14228
|
-
return{done:!1,value:
|
|
14229
|
-
return(t=yield this.readMetadataLength()).done||-1===t.value&&(t=yield this.readMetadataLength()).done||(t=yield this.readMetadata(t.value)).done?
|
|
14229
|
+
if(!e)return KW
|
|
14230
|
+
if(e.byteLength<t)throw new Error(oZ(t,e.byteLength))
|
|
14231
|
+
return{done:!1,value:GG.decode(e)}}}class lZ{constructor(t,e){this.source=t instanceof eG?t:dH(t)?new oG(t,e):new eG(t)}[Symbol.asyncIterator](){return this}next(){return e(this,void 0,void 0,(function*(){let t
|
|
14232
|
+
return(t=yield this.readMetadataLength()).done||-1===t.value&&(t=yield this.readMetadataLength()).done||(t=yield this.readMetadata(t.value)).done?KW:t}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.source.throw(t)}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.source.return(t)}))}readMessage(t){return e(this,void 0,void 0,(function*(){let e
|
|
14230
14233
|
if((e=yield this.next()).done)return null
|
|
14231
|
-
if(null!=t&&e.value.headerType!==t)throw new Error(
|
|
14234
|
+
if(null!=t&&e.value.headerType!==t)throw new Error(iZ(t))
|
|
14232
14235
|
return e.value}))}readMessageBody(t){return e(this,void 0,void 0,(function*(){if(t<=0)return new Uint8Array(0)
|
|
14233
|
-
const e=
|
|
14234
|
-
if(e.byteLength<t)throw new Error(
|
|
14235
|
-
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}))}readSchema(){return e(this,arguments,void 0,(function*(t=!1){const e=
|
|
14236
|
-
if(t&&!i)throw new Error(
|
|
14237
|
-
return i}))}readMetadataLength(){return e(this,void 0,void 0,(function*(){const t=yield this.source.read(
|
|
14236
|
+
const e=CH(yield this.source.read(t))
|
|
14237
|
+
if(e.byteLength<t)throw new Error(rZ(t,e.byteLength))
|
|
14238
|
+
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}))}readSchema(){return e(this,arguments,void 0,(function*(t=!1){const e=SU.Schema,n=yield this.readMessage(e),i=null==n?void 0:n.header()
|
|
14239
|
+
if(t&&!i)throw new Error(sZ(e))
|
|
14240
|
+
return i}))}readMetadataLength(){return e(this,void 0,void 0,(function*(){const t=yield this.source.read(dZ),e=t&&new HH(t),n=(null==e?void 0:e.readInt32(0))||0
|
|
14238
14241
|
return{done:0===n,value:n}}))}readMetadata(t){return e(this,void 0,void 0,(function*(){const e=yield this.source.read(t)
|
|
14239
|
-
if(!e)return
|
|
14240
|
-
if(e.byteLength<t)throw new Error(
|
|
14241
|
-
return{done:!1,value:
|
|
14242
|
+
if(!e)return KW
|
|
14243
|
+
if(e.byteLength<t)throw new Error(oZ(t,e.byteLength))
|
|
14244
|
+
return{done:!1,value:GG.decode(e)}}))}}class cZ extends aZ{constructor(t){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=t instanceof YW?t:new YW(t)}next(){const{_json:t}=this
|
|
14242
14245
|
if(!this._schema){this._schema=!0
|
|
14243
|
-
return{done:!1,value:
|
|
14246
|
+
return{done:!1,value:GG.fromJSON(t.schema,SU.Schema)}}if(this._dictionaryIndex<t.dictionaries.length){const e=t.dictionaries[this._dictionaryIndex++]
|
|
14244
14247
|
this._body=e.data.columns
|
|
14245
|
-
return{done:!1,value:
|
|
14248
|
+
return{done:!1,value:GG.fromJSON(e,SU.DictionaryBatch)}}if(this._batchIndex<t.batches.length){const e=t.batches[this._batchIndex++]
|
|
14246
14249
|
this._body=e.columns
|
|
14247
|
-
return{done:!1,value:
|
|
14250
|
+
return{done:!1,value:GG.fromJSON(e,SU.RecordBatch)}}return this._body=[],KW}readMessageBody(t){return function t(e){return(e||[]).reduce(((e,n)=>[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)]),[])}(this._body)}readMessage(t){let e
|
|
14248
14251
|
if((e=this.next()).done)return null
|
|
14249
|
-
if(null!=t&&e.value.headerType!==t)throw new Error(
|
|
14250
|
-
return e.value}readSchema(){const t=
|
|
14251
|
-
if(!e||!n)throw new Error(
|
|
14252
|
-
return n}}const
|
|
14253
|
-
for(let t=0;t<6;t+=1)
|
|
14254
|
-
function
|
|
14255
|
-
return!0}const
|
|
14256
|
-
class
|
|
14257
|
-
return
|
|
14258
|
-
return e>=
|
|
14259
|
-
return e&&e.byteLength>=4?
|
|
14260
|
-
return e&&e.byteLength>=4?
|
|
14252
|
+
if(null!=t&&e.value.headerType!==t)throw new Error(iZ(t))
|
|
14253
|
+
return e.value}readSchema(){const t=SU.Schema,e=this.readMessage(t),n=null==e?void 0:e.header()
|
|
14254
|
+
if(!e||!n)throw new Error(sZ(t))
|
|
14255
|
+
return n}}const dZ=4,hZ="ARROW1",uZ=new Uint8Array(6)
|
|
14256
|
+
for(let t=0;t<6;t+=1)uZ[t]=hZ.codePointAt(t)
|
|
14257
|
+
function pZ(t,e=0){for(let n=-1,i=uZ.length;++n<i;)if(uZ[n]!==t[e+n])return!1
|
|
14258
|
+
return!0}const fZ=uZ.length,mZ=fZ+dZ,gZ=2*fZ+dZ
|
|
14259
|
+
class vZ extends XW{constructor(t){super(),this._impl=t}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(t){return this._impl.throw(t)}return(t){return this._impl.return(t)}cancel(){return this._impl.cancel()}reset(t){return this._impl.reset(t),this._DOMStream=void 0,this._nodeStream=void 0,this}open(t){const e=this._impl.open(t)
|
|
14260
|
+
return oH(e)?e.then((()=>this)):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return MH.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return MH.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof vZ?t:lH(t)?function(t){return new bZ(new MZ(t))}(t):dH(t)?function(t){return e(this,void 0,void 0,(function*(){const{size:e}=yield t.stat(),n=new oG(t,e)
|
|
14261
|
+
return e>=gZ&&pZ(yield n.readAt(0,fZ+7&-8))?new xZ(new IZ(n)):new yZ(new SZ(n))}))}(t):oH(t)?(()=>e(this,void 0,void 0,(function*(){return yield vZ.from(yield t)})))():hH(t)||pH(t)||fH(t)||aH(t)?function(t){return e(this,void 0,void 0,(function*(){const e=yield t.peek(fZ+7&-8)
|
|
14262
|
+
return e&&e.byteLength>=4?pZ(e)?new wZ(new _Z(yield t.read())):new yZ(new SZ(t)):new yZ(new SZ(function(){return s(this,arguments,(function*(){}))}()))}))}(new eG(t)):function(t){const e=t.peek(fZ+7&-8)
|
|
14263
|
+
return e&&e.byteLength>=4?pZ(e)?new wZ(new _Z(t.read())):new bZ(new kZ(t)):new bZ(new kZ(function*(){}()))}(new tG(t))}static readAll(t){return t instanceof vZ?t.isSync()?EZ(t):DZ(t):lH(t)||ArrayBuffer.isView(t)||rH(t)||cH(t)?EZ(t):DZ(t)}}class bZ extends vZ{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return s(this,arguments,(function*(){yield i(yield*o(r(this[Symbol.iterator]())))}))}}class yZ extends vZ{constructor(t){super(t),this._impl=t}readAll(){return e(this,void 0,void 0,(function*(){var t,e,n,i
|
|
14261
14264
|
const s=new Array
|
|
14262
14265
|
try{for(var o,a=!0,l=r(this);!(t=(o=yield l.next()).done);a=!0){i=o.value,a=!1
|
|
14263
14266
|
const t=i
|
|
14264
|
-
s.push(t)}}catch(t){e={error:t}}finally{try{a||t||!(n=l.return)||(yield n.call(l))}finally{if(e)throw e.error}}return s}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class
|
|
14265
|
-
return new
|
|
14267
|
+
s.push(t)}}catch(t){e={error:t}}finally{try{a||t||!(n=l.return)||(yield n.call(l))}finally{if(e)throw e.error}}return s}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class wZ extends bZ{constructor(t){super(t),this._impl=t}}class xZ extends yZ{constructor(t){super(t),this._impl=t}}class CZ{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=mW({type:new Iq(this.schema.fields),length:t.length,children:n})
|
|
14268
|
+
return new TG(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,r=s.get(n)
|
|
14266
14269
|
if(i||!r){const s=o.dictionaries.get(n),a=this._loadVectors(t.data,e,[s])
|
|
14267
|
-
return(r&&i?r.concat(new
|
|
14270
|
+
return(r&&i?r.concat(new NW(a)):new NW(a)).memoize()}return r.memoize()}_loadVectors(t,e,n){return new uG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class kZ extends CZ{constructor(t,e){super(e),this._reader=lH(t)?new cZ(this._handle=t):new aZ(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=$Z(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):KW}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):KW}next(){if(this.closed)return KW
|
|
14268
14271
|
let t
|
|
14269
14272
|
const{_reader:e}=this
|
|
14270
14273
|
for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header())
|
|
@@ -14272,7 +14275,7 @@ else{if(t.isRecordBatch()){this._recordBatchIndex++
|
|
|
14272
14275
|
const n=t.header(),i=e.readMessageBody(t.bodyLength)
|
|
14273
14276
|
return{done:!1,value:this._loadRecordBatch(n,i)}}if(t.isDictionaryBatch()){this._dictionaryIndex++
|
|
14274
14277
|
const n=t.header(),i=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i)
|
|
14275
|
-
this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new
|
|
14278
|
+
this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new FG(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class SZ extends CZ{constructor(t,e){super(e),this._reader=new lZ(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return e(this,void 0,void 0,(function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}))}open(t){return e(this,void 0,void 0,(function*(){return this.closed||(this.autoDestroy=$Z(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this}))}throw(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):KW}))}return(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):KW}))}next(){return e(this,void 0,void 0,(function*(){if(this.closed)return KW
|
|
14276
14279
|
let t
|
|
14277
14280
|
const{_reader:e}=this
|
|
14278
14281
|
for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header())
|
|
@@ -14280,40 +14283,40 @@ else{if(t.isRecordBatch()){this._recordBatchIndex++
|
|
|
14280
14283
|
const n=t.header(),i=yield e.readMessageBody(t.bodyLength)
|
|
14281
14284
|
return{done:!1,value:this._loadRecordBatch(n,i)}}if(t.isDictionaryBatch()){this._dictionaryIndex++
|
|
14282
14285
|
const n=t.header(),i=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i)
|
|
14283
|
-
this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new
|
|
14286
|
+
this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new FG(this.schema)}):yield this.return()}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){return yield this._reader.readMessage(t)}))}}class _Z extends kZ{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof sG?t:new sG(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema
|
|
14284
14287
|
for(const t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e
|
|
14285
14288
|
if(this.closed)return null
|
|
14286
14289
|
this._footer||this.open()
|
|
14287
14290
|
const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(t)
|
|
14288
|
-
if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(
|
|
14291
|
+
if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(SU.RecordBatch)
|
|
14289
14292
|
if(null==t?void 0:t.isRecordBatch()){const e=t.header(),n=this._reader.readMessageBody(t.bodyLength)
|
|
14290
14293
|
return this._loadRecordBatch(e,n)}}return null}_readDictionaryBatch(t){var e
|
|
14291
14294
|
const n=null===(e=this._footer)||void 0===e?void 0:e.getDictionaryBatch(t)
|
|
14292
|
-
if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(
|
|
14295
|
+
if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(SU.DictionaryBatch)
|
|
14293
14296
|
if(null==t?void 0:t.isDictionaryBatch()){const e=t.header(),n=this._reader.readMessageBody(t.bodyLength),i=this._loadDictionaryBatch(e,n)
|
|
14294
|
-
this.dictionaries.set(e.id,i)}}}_readFooter(){const{_handle:t}=this,e=t.size-
|
|
14295
|
-
return
|
|
14297
|
+
this.dictionaries.set(e.id,i)}}}_readFooter(){const{_handle:t}=this,e=t.size-mZ,n=t.readInt32(e),i=t.readAt(e-n,n)
|
|
14298
|
+
return WW.decode(i)}_readNextMessageAndValidate(t){var e
|
|
14296
14299
|
if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(this._recordBatchIndex)
|
|
14297
|
-
if(n&&this._handle.seek(n.offset))return this._reader.readMessage(t)}return null}}class
|
|
14298
|
-
super(t instanceof
|
|
14300
|
+
if(n&&this._handle.seek(n.offset))return this._reader.readMessage(t)}return null}}class IZ extends SZ{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,...e){const n="number"!=typeof e[0]?e.shift():void 0,i=e[0]instanceof Map?e.shift():void 0
|
|
14301
|
+
super(t instanceof oG?t:new oG(t,n),i)}isFile(){return!0}isAsync(){return!0}open(t){const n=Object.create(null,{open:{get:()=>super.open}})
|
|
14299
14302
|
return e(this,void 0,void 0,(function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema
|
|
14300
14303
|
for(const t of this._footer.dictionaryBatches())t&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield n.open.call(this,t)}))}readRecordBatch(t){return e(this,void 0,void 0,(function*(){var e
|
|
14301
14304
|
if(this.closed)return null
|
|
14302
14305
|
this._footer||(yield this.open())
|
|
14303
14306
|
const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(t)
|
|
14304
|
-
if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(
|
|
14307
|
+
if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(SU.RecordBatch)
|
|
14305
14308
|
if(null==t?void 0:t.isRecordBatch()){const e=t.header(),n=yield this._reader.readMessageBody(t.bodyLength)
|
|
14306
14309
|
return this._loadRecordBatch(e,n)}}return null}))}_readDictionaryBatch(t){return e(this,void 0,void 0,(function*(){var e
|
|
14307
14310
|
const n=null===(e=this._footer)||void 0===e?void 0:e.getDictionaryBatch(t)
|
|
14308
|
-
if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(
|
|
14311
|
+
if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(SU.DictionaryBatch)
|
|
14309
14312
|
if(null==t?void 0:t.isDictionaryBatch()){const e=t.header(),n=yield this._reader.readMessageBody(t.bodyLength),i=this._loadDictionaryBatch(e,n)
|
|
14310
14313
|
this.dictionaries.set(e.id,i)}}}))}_readFooter(){return e(this,void 0,void 0,(function*(){const{_handle:t}=this
|
|
14311
14314
|
t._pending&&(yield t._pending)
|
|
14312
|
-
const e=t.size-
|
|
14313
|
-
return
|
|
14314
|
-
if(e&&(yield this._handle.seek(e.offset)))return yield this._reader.readMessage(t)}return null}))}}class
|
|
14315
|
-
try{if(!e.open({autoDestroy:!1}).closed)do{yield e}while(!e.reset().open().closed)}finally{e.cancel()}}function
|
|
14316
|
-
try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(yield i(e.reset().open())).closed)}finally{yield i(e.cancel())}}))}const
|
|
14315
|
+
const e=t.size-mZ,n=yield t.readInt32(e),i=yield t.readAt(e-n,n)
|
|
14316
|
+
return WW.decode(i)}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const e=this._footer.getRecordBatch(this._recordBatchIndex)
|
|
14317
|
+
if(e&&(yield this._handle.seek(e.offset)))return yield this._reader.readMessage(t)}return null}))}}class MZ extends kZ{constructor(t,e){super(t,e)}_loadVectors(t,e,n){return new pG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}function $Z(t,e){return e&&"boolean"==typeof e.autoDestroy?e.autoDestroy:t.autoDestroy}function*EZ(t){const e=vZ.from(t)
|
|
14318
|
+
try{if(!e.open({autoDestroy:!1}).closed)do{yield e}while(!e.reset().open().closed)}finally{e.cancel()}}function DZ(t){return s(this,arguments,(function*(){const e=yield i(vZ.from(t))
|
|
14319
|
+
try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(yield i(e.reset().open())).closed)}finally{yield i(e.cancel())}}))}const AZ=Q`
|
|
14317
14320
|
<div class="wafer-map-container">
|
|
14318
14321
|
<svg class="svg-root">
|
|
14319
14322
|
<g ${Ut("zoomContainer")} transform=${t=>t.transform.toString()}>
|
|
@@ -14344,7 +14347,7 @@ try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(y
|
|
|
14344
14347
|
/>
|
|
14345
14348
|
</svg>
|
|
14346
14349
|
</div>
|
|
14347
|
-
`,
|
|
14350
|
+
`,TZ=Mt`
|
|
14348
14351
|
${zs("inline-block")}
|
|
14349
14352
|
|
|
14350
14353
|
:host {
|
|
@@ -14434,67 +14437,67 @@ try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(y
|
|
|
14434
14437
|
outline-width: 0px;
|
|
14435
14438
|
}
|
|
14436
14439
|
`
|
|
14437
|
-
function
|
|
14440
|
+
function OZ(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function RZ(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function FZ(t){let e,n,i
|
|
14438
14441
|
function s(t,i,s=0,o=t.length){if(s<o){if(0!==e(i,i))return o
|
|
14439
14442
|
do{const e=s+o>>>1
|
|
14440
|
-
n(t[e],i)<0?s=e+1:o=e}while(s<o)}return s}return 2!==t.length?(e
|
|
14443
|
+
n(t[e],i)<0?s=e+1:o=e}while(s<o)}return s}return 2!==t.length?(e=OZ,n=(e,n)=>OZ(t(e),n),i=(e,n)=>t(e)-n):(e=t===OZ||t===RZ?t:NZ,n=t,i=t),{left:s,center:function(t,e,n=0,o=t.length){const r=s(t,e,n,o-1)
|
|
14441
14444
|
return r>n&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,i,s=0,o=t.length){if(s<o){if(0!==e(i,i))return o
|
|
14442
14445
|
do{const e=s+o>>>1
|
|
14443
|
-
n(t[e],i)<=0?s=e+1:o=e}while(s<o)}return s}}}function
|
|
14444
|
-
|
|
14445
|
-
class
|
|
14446
|
+
n(t[e],i)<=0?s=e+1:o=e}while(s<o)}return s}}}function NZ(){return 0}function LZ(t){return null===t?NaN:+t}const BZ=FZ(OZ).right
|
|
14447
|
+
FZ(LZ).center
|
|
14448
|
+
class PZ extends Map{constructor(t,e=VZ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(zZ(this,t))}has(t){return super.has(zZ(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const i=e(n)
|
|
14446
14449
|
return t.has(i)?t.get(i):(t.set(i,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const i=e(n)
|
|
14447
14450
|
t.has(i)&&(n=t.get(i),t.delete(i))
|
|
14448
|
-
return n}(this,t))}}function
|
|
14449
|
-
return t.has(i)?t.get(i):n}function
|
|
14450
|
-
function
|
|
14451
|
+
return n}(this,t))}}function zZ({_intern:t,_key:e},n){const i=e(n)
|
|
14452
|
+
return t.has(i)?t.get(i):n}function VZ(t){return null!==t&&"object"==typeof t?t.valueOf():t}const HZ=Math.sqrt(50),UZ=Math.sqrt(10),qZ=Math.sqrt(2)
|
|
14453
|
+
function jZ(t,e,n){const i=(e-t)/Math.max(0,n),s=Math.floor(Math.log10(i)),o=i/Math.pow(10,s),r=o>=HZ?10:o>=UZ?5:o>=qZ?2:1
|
|
14451
14454
|
let a,l,c
|
|
14452
|
-
return s<0?(c=Math.pow(10,-s)/r,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,s)*r,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?
|
|
14455
|
+
return s<0?(c=Math.pow(10,-s)/r,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,s)*r,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?jZ(t,e,2*n):[a,l,c]}function WZ(t,e,n){return jZ(t=+t,e=+e,n=+n)[2]}function GZ(t,e,n=LZ){if((i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return+n(t[0],0,t)
|
|
14453
14456
|
if(e>=1)return+n(t[i-1],i-1,t)
|
|
14454
14457
|
var i,s=(i-1)*e,o=Math.floor(s),r=+n(t[o],o,t)
|
|
14455
|
-
return r+(+n(t[o+1],o+1,t)-r)*(s-o)}}function
|
|
14458
|
+
return r+(+n(t[o+1],o+1,t)-r)*(s-o)}}function ZZ(t,e,n){t=+t,e=+e,n=(s=arguments.length)<2?(e=t,t=0,1):s<3?1:+n
|
|
14456
14459
|
for(var i=-1,s=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(s);++i<s;)o[i]=t+i*n
|
|
14457
|
-
return o}function
|
|
14460
|
+
return o}function KZ(t,e){switch(arguments.length){case 0:break
|
|
14458
14461
|
case 1:this.range(t)
|
|
14459
14462
|
break
|
|
14460
|
-
default:this.range(e).domain(t)}return this}const
|
|
14461
|
-
function
|
|
14463
|
+
default:this.range(e).domain(t)}return this}const YZ=Symbol("implicit")
|
|
14464
|
+
function XZ(){var t=new PZ,e=[],n=[],i=YZ
|
|
14462
14465
|
function s(s){let o=t.get(s)
|
|
14463
|
-
if(void 0===o){if(i!==
|
|
14466
|
+
if(void 0===o){if(i!==YZ)return i
|
|
14464
14467
|
t.set(s,o=e.push(s)-1)}return n[o%n.length]}return s.domain=function(n){if(!arguments.length)return e.slice()
|
|
14465
|
-
e=[],t=new
|
|
14468
|
+
e=[],t=new PZ
|
|
14466
14469
|
for(const i of n)t.has(i)||t.set(i,e.push(i)-1)
|
|
14467
|
-
return s},s.range=function(t){return arguments.length?(n=Array.from(t),s):n.slice()},s.unknown=function(t){return arguments.length?(i=t,s):i},s.copy=function(){return
|
|
14470
|
+
return s},s.range=function(t){return arguments.length?(n=Array.from(t),s):n.slice()},s.unknown=function(t){return arguments.length?(i=t,s):i},s.copy=function(){return XZ(e,n).unknown(i)},KZ.apply(s,arguments),s}function JZ(){var t,e,n=XZ().unknown(void 0),i=n.domain,s=n.range,o=0,r=1,a=!1,l=0,c=0,d=.5
|
|
14468
14471
|
function h(){var n=i().length,h=r<o,u=h?r:o,p=h?o:r
|
|
14469
14472
|
t=(p-u)/Math.max(1,n-l+2*c),a&&(t=Math.floor(t)),u+=(p-u-t*(n-l))*d,e=t*(1-l),a&&(u=Math.round(u),e=Math.round(e))
|
|
14470
|
-
var f=
|
|
14471
|
-
return s(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,r]=t,o=+o,r=+r,h()):[o,r]},n.rangeRound=function(t){return[o,r]=t,o=+o,r=+r,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),h()):d},n.copy=function(){return
|
|
14472
|
-
function
|
|
14473
|
-
var n}function
|
|
14474
|
-
return s<i?(i=
|
|
14475
|
-
for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++r<i;)s[r]=
|
|
14476
|
-
return function(e){var n=
|
|
14477
|
-
return o[n](s[n](e))}}function
|
|
14473
|
+
var f=ZZ(n).map((function(e){return u+t*e}))
|
|
14474
|
+
return s(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,r]=t,o=+o,r=+r,h()):[o,r]},n.rangeRound=function(t){return[o,r]=t,o=+o,r=+r,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),h()):d},n.copy=function(){return JZ(i(),[o,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},KZ.apply(h(),arguments)}function QZ(t){return+t}var tK=[0,1]
|
|
14475
|
+
function eK(t){return t}function nK(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n})
|
|
14476
|
+
var n}function iK(t,e,n){var i=t[0],s=t[1],o=e[0],r=e[1]
|
|
14477
|
+
return s<i?(i=nK(s,i),o=n(r,o)):(i=nK(i,s),o=n(o,r)),function(t){return o(i(t))}}function sK(t,e,n){var i=Math.min(t.length,e.length)-1,s=new Array(i),o=new Array(i),r=-1
|
|
14478
|
+
for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++r<i;)s[r]=nK(t[r],t[r+1]),o[r]=n(e[r],e[r+1])
|
|
14479
|
+
return function(e){var n=BZ(t,e,1,i)-1
|
|
14480
|
+
return o[n](s[n](e))}}function oK(){var t,e,n,i,s,o,r=tK,a=tK,l=Iz,c=eK
|
|
14478
14481
|
function d(){var t,e,n,l=Math.min(r.length,a.length)
|
|
14479
|
-
return c!==
|
|
14482
|
+
return c!==eK&&(t=r[0],e=r[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=l>2?sK:iK,s=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(s||(s=i(r.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=i(a,r.map(t),xz)))(n)))},h.domain=function(t){return arguments.length?(r=Array.from(t,QZ),d()):r.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),d()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=Mz,d()},h.clamp=function(t){return arguments.length?(c=!!t||eK,d()):c!==eK},h.interpolate=function(t){return arguments.length?(l=t,d()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,d()}}function rK(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null
|
|
14480
14483
|
var n,i=t.slice(0,n)
|
|
14481
|
-
return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function
|
|
14482
|
-
function
|
|
14484
|
+
return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function aK(t){return(t=rK(Math.abs(t)))?t[1]:NaN}var lK,cK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
14485
|
+
function dK(t){if(!(e=cK.exec(t)))throw new Error("invalid format: "+t)
|
|
14483
14486
|
var e
|
|
14484
|
-
return new
|
|
14487
|
+
return new hK({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function hK(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function uK(t,e){var n=rK(t,e)
|
|
14485
14488
|
if(!n)return t+""
|
|
14486
14489
|
var i=n[0],s=n[1]
|
|
14487
|
-
return s<0?"0."+new Array(-s).join("0")+i:i.length>s+1?i.slice(0,s+1)+"."+i.slice(s+1):i+new Array(s-i.length+2).join("0")}
|
|
14488
|
-
var
|
|
14490
|
+
return s<0?"0."+new Array(-s).join("0")+i:i.length>s+1?i.slice(0,s+1)+"."+i.slice(s+1):i+new Array(s-i.length+2).join("0")}dK.prototype=hK.prototype,hK.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}
|
|
14491
|
+
var pK={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>uK(100*t,e),r:uK,s:function(t,e){var n=rK(t,e)
|
|
14489
14492
|
if(!n)return t+""
|
|
14490
|
-
var i=n[0],s=n[1],o=s-(
|
|
14491
|
-
return o===r?i:o>r?i+new Array(o-r+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+
|
|
14492
|
-
function
|
|
14493
|
-
function
|
|
14494
|
-
return o.reverse().join(n)}),s=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?
|
|
14495
|
-
function h(t){var e=(t=
|
|
14496
|
-
"n"===b?(m=!0,b="g"):
|
|
14497
|
-
var y="$"===u?s:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?o:/[%p]/.test(b)?l:"",x=
|
|
14493
|
+
var i=n[0],s=n[1],o=s-(lK=3*Math.max(-8,Math.min(8,Math.floor(s/3))))+1,r=i.length
|
|
14494
|
+
return o===r?i:o>r?i+new Array(o-r+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+rK(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}
|
|
14495
|
+
function fK(t){return t}var mK,gK,vK,bK=Array.prototype.map,yK=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
14496
|
+
function wK(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?fK:(e=bK.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var s=t.length,o=[],r=0,a=e[0],l=0;s>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(t.substring(s-=a,s+a)),!((l+=a+1)>i));)a=e[r=(r+1)%e.length]
|
|
14497
|
+
return o.reverse().join(n)}),s=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?fK:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(bK.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",d=void 0===t.nan?"NaN":t.nan+""
|
|
14498
|
+
function h(t){var e=(t=dK(t)).fill,n=t.align,h=t.sign,u=t.symbol,p=t.zero,f=t.width,m=t.comma,g=t.precision,v=t.trim,b=t.type
|
|
14499
|
+
"n"===b?(m=!0,b="g"):pK[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=")
|
|
14500
|
+
var y="$"===u?s:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?o:/[%p]/.test(b)?l:"",x=pK[b],C=/[defgprs%]/.test(b)
|
|
14498
14501
|
function k(t){var s,o,l,u=y,k=w
|
|
14499
14502
|
if("c"===b)k=x(t)+k,t=""
|
|
14500
14503
|
else{var S=(t=+t)<0||1/t<0
|
|
@@ -14503,7 +14506,7 @@ break
|
|
|
14503
14506
|
case"0":0===s&&(s=i),e=i
|
|
14504
14507
|
break
|
|
14505
14508
|
default:if(!+t[i])break t
|
|
14506
|
-
s>0&&(s=0)}return s>0?t.slice(0,s)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?
|
|
14509
|
+
s>0&&(s=0)}return s>0?t.slice(0,s)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?yK[8+lK/3]:"")+k+(S&&"("===h?")":""),C)for(s=-1,o=t.length;++s<o;)if(48>(l=t.charCodeAt(s))||l>57){k=(46===l?r+t.slice(s+1):t.slice(s))+k,t=t.slice(0,s)
|
|
14507
14510
|
break}}m&&!p&&(t=i(t,1/0))
|
|
14508
14511
|
var _=u.length+t.length+k.length,I=_<f?new Array(f-_+1).join(e):""
|
|
14509
14512
|
switch(m&&p&&(t=i(I+t,I.length?f-k.length:1/0),I=""),n){case"<":t=u+t+k+I
|
|
@@ -14512,19 +14515,19 @@ case"=":t=u+I+t+k
|
|
|
14512
14515
|
break
|
|
14513
14516
|
case"^":t=I.slice(0,_=I.length>>1)+u+t+k+I.slice(_)
|
|
14514
14517
|
break
|
|
14515
|
-
default:t=I+u+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=
|
|
14516
|
-
return function(t){return n(s*t)+o}}}}function
|
|
14517
|
-
const i=(e=+e)<(t=+t),s=i?
|
|
14518
|
+
default:t=I+u+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=dK(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(aK(e)/3))),s=Math.pow(10,-i),o=yK[8+i/3]
|
|
14519
|
+
return function(t){return n(s*t)+o}}}}function xK(t,e,n,i){var s,o=function(t,e,n){n=+n
|
|
14520
|
+
const i=(e=+e)<(t=+t),s=i?WZ(e,t,n):WZ(t,e,n)
|
|
14518
14521
|
return(i?-1:1)*(s<0?1/-s:s)}(t,e,n)
|
|
14519
|
-
switch((i=
|
|
14520
|
-
return null!=i.precision||isNaN(s=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
14521
|
-
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(s=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,
|
|
14522
|
+
switch((i=dK(null==i?",f":i)).type){case"s":var r=Math.max(Math.abs(t),Math.abs(e))
|
|
14523
|
+
return null!=i.precision||isNaN(s=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(aK(e)/3)))-aK(Math.abs(t)))}(o,r))||(i.precision=s),vK(i,r)
|
|
14524
|
+
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(s=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,aK(e)-aK(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=s-("e"===i.type))
|
|
14522
14525
|
break
|
|
14523
|
-
case"f":case"%":null!=i.precision||isNaN(s=function(t){return Math.max(0,-
|
|
14526
|
+
case"f":case"%":null!=i.precision||isNaN(s=function(t){return Math.max(0,-aK(Math.abs(t)))}(o))||(i.precision=s-2*("%"===i.type))}return gK(i)}function CK(t){var e=t.domain
|
|
14524
14527
|
return t.ticks=function(t){var n=e()
|
|
14525
14528
|
return function(t,e,n){if(!((n=+n)>0))return[]
|
|
14526
14529
|
if((t=+t)==(e=+e))return[t]
|
|
14527
|
-
const i=e<t,[s,o,r]=i?
|
|
14530
|
+
const i=e<t,[s,o,r]=i?jZ(e,t,n):jZ(t,e,n)
|
|
14528
14531
|
if(!(o>=s))return[]
|
|
14529
14532
|
const a=o-s+1,l=new Array(a)
|
|
14530
14533
|
if(i)if(r<0)for(let t=0;t<a;++t)l[t]=(o-t)/-r
|
|
@@ -14532,33 +14535,33 @@ else for(let t=0;t<a;++t)l[t]=(o-t)*r
|
|
|
14532
14535
|
else if(r<0)for(let t=0;t<a;++t)l[t]=(s+t)/-r
|
|
14533
14536
|
else for(let t=0;t<a;++t)l[t]=(s+t)*r
|
|
14534
14537
|
return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e()
|
|
14535
|
-
return
|
|
14538
|
+
return xK(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10)
|
|
14536
14539
|
var i,s,o=e(),r=0,a=o.length-1,l=o[r],c=o[a],d=10
|
|
14537
|
-
for(c<l&&(s=l,l=c,c=s,s=r,r=a,a=s);d-- >0;){if((s=
|
|
14540
|
+
for(c<l&&(s=l,l=c,c=s,s=r,r=a,a=s);d-- >0;){if((s=WZ(l,c,n))===i)return o[r]=l,o[a]=c,e(o)
|
|
14538
14541
|
if(s>0)l=Math.floor(l/s)*s,c=Math.ceil(c/s)*s
|
|
14539
14542
|
else{if(!(s<0))break
|
|
14540
|
-
l=Math.ceil(l*s)/s,c=Math.floor(c*s)/s}i=s}return t},t}function
|
|
14541
|
-
return t.copy=function(){return e=t,
|
|
14542
|
-
var e},
|
|
14543
|
+
l=Math.ceil(l*s)/s,c=Math.floor(c*s)/s}i=s}return t},t}function kK(){var t=oK()(eK,eK)
|
|
14544
|
+
return t.copy=function(){return e=t,kK().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())
|
|
14545
|
+
var e},KZ.apply(t,arguments),CK(t)}function SK(){var t,e=[],n=[],i=[]
|
|
14543
14546
|
function s(){var t=0,s=Math.max(1,n.length)
|
|
14544
|
-
for(i=new Array(s-1);++t<s;)i[t-1]=
|
|
14545
|
-
return o}function o(e){return null==e||isNaN(e=+e)?t:n[
|
|
14547
|
+
for(i=new Array(s-1);++t<s;)i[t-1]=GZ(e,t/s)
|
|
14548
|
+
return o}function o(e){return null==e||isNaN(e=+e)?t:n[BZ(i,e)]}return o.invertExtent=function(t){var s=n.indexOf(t)
|
|
14546
14549
|
return s<0?[NaN,NaN]:[s>0?i[s-1]:e[0],s<i.length?i[s]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice()
|
|
14547
14550
|
e=[]
|
|
14548
14551
|
for(let n of t)null==n||isNaN(n=+n)||e.push(n)
|
|
14549
|
-
return e.sort(
|
|
14550
|
-
const
|
|
14551
|
-
class
|
|
14552
|
+
return e.sort(OZ),s()},o.range=function(t){return arguments.length?(n=Array.from(t),s()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return SK().domain(e).range(n).unknown(t)},KZ.apply(o,arguments)}mK=wK({thousands:",",grouping:[3],currency:["$",""]}),gK=mK.format,vK=mK.formatPrefix
|
|
14553
|
+
const _K="bottom-left",IK="bottom-right",MK="top-left",$K="top",EK="show",DK="hide",AK="linear",TK="ordinal"
|
|
14554
|
+
class OK{get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}constructor(t){this.wafermap=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.wafermap.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode)
|
|
14552
14555
|
const t=t=>null!==t
|
|
14553
14556
|
void 0===this.wafermap.diesTable&&(this._diesRenderInfo=this.wafermap.dies.map((t=>this.computeDieRenderInfo(t))).filter(t))}computeDieRenderInfo(t){const e=this.wafermap.dataManager.margin,n=this.wafermap.dataManager.horizontalScale(t.x),i=this.wafermap.dataManager.verticalScale(t.y)
|
|
14554
|
-
return void 0===n||void 0===i?null:{x:n+e.right,y:i+e.top,fillStyle:this.calculateFillStyle(t.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,t.tags),text:this.buildLabel(t.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}createD3ColorScale(t,e){return this.isColorScaleLinear(e)?
|
|
14557
|
+
return void 0===n||void 0===i?null:{x:n+e.right,y:i+e.top,fillStyle:this.calculateFillStyle(t.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,t.tags),text:this.buildLabel(t.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}createD3ColorScale(t,e){return this.isColorScaleLinear(e)?kK().domain(t.values.map((t=>+t))).range(t.colors):XZ().domain(t.values).range(t.colors)}dieHasData(t){return null!=t&&""!==t}buildLabel(t,e,n,i){if(n||!this.dieHasData(t))return""
|
|
14555
14558
|
const s=`${t}${i}`
|
|
14556
14559
|
return s.length>=e?`${s.substring(0,e)}…`:s}calculateOpacity(t,e){if(!e||0===e.length)return 1
|
|
14557
14560
|
const n=new Set(e)
|
|
14558
|
-
return t?.some((t=>n.has(t)))?1:this.nonHighlightedOpacity}isColorScaleLinear(t){return t===
|
|
14561
|
+
return t?.some((t=>n.has(t)))?1:this.nonHighlightedOpacity}isColorScaleLinear(t){return t===AK}isColorScaleOrdinal(t){return t===TK}calculateFillStyle(t,e,n,i){let s=this.emptyDieColor
|
|
14559
14562
|
if(this.dieHasData(t)&&(isNaN(+t)?s=this.nanDieColor:this.isColorScaleLinear(e)?s=this.d3ColorScale(+t):this.isColorScaleOrdinal(e)&&(s=this.d3ColorScale(t))),void 0===s)return this.emptyDieColor
|
|
14560
14563
|
let o=to(s)
|
|
14561
|
-
return null===o?this.emptyDieColor:(o=new Ws(o.r,o.g,o.b,this.calculateOpacity(i,n)),o.toStringWebRGBA())}}class
|
|
14564
|
+
return null===o?this.emptyDieColor:(o=new Ws(o.r,o.g,o.b,this.calculateOpacity(i,n)),o.toStringWebRGBA())}}class RK{get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}get data(){return this.dataMap}constructor(t){this.wafermap=t,this.computations=new class{get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}constructor(t){this.wafermap=t,this.defaultPadding=0,this.baseMarginPercentage=.04}updateContainerDimensions(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
|
|
14562
14565
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(t,this._margin)
|
|
14563
14566
|
const s=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
14564
14567
|
this._radius=s/2,this.updateScales()}updateScales(){const t=Math.min(this._containerDimensions.width,this._containerDimensions.height),e=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(this.wafermap.dies),n=this.wafermap.originLocation
|
|
@@ -14568,11 +14571,11 @@ this._dieDimensions={width:isNaN(i)?0:i,height:isNaN(s)?0:s}}gridDimensionsValid
|
|
|
14568
14571
|
return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(t.origin.x=this.wafermap.gridMinX,t.origin.y=this.wafermap.gridMinY,t.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,t.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),t}calculateGridDimensionsFromDies(t){if(0===t.length||void 0===t[0])return{origin:{x:0,y:0},rows:0,cols:0}
|
|
14569
14572
|
const e={x:t[0].x,y:t[0].y},n={x:t[0].x,y:t[0].y}
|
|
14570
14573
|
for(const i of t)i.x<e.x&&(e.x=i.x),i.y<e.y&&(e.y=i.y),i.x>n.x&&(n.x=i.x),i.y>n.y&&(n.y=i.y)
|
|
14571
|
-
return{origin:e,rows:n.y-e.y+1,cols:n.x-e.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=
|
|
14572
|
-
return t===
|
|
14573
|
-
return t===
|
|
14574
|
-
return t===
|
|
14575
|
-
return t===
|
|
14574
|
+
return{origin:e,rows:n.y-e.y+1,cols:n.x-e.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=JZ().domain(ZZ(e.origin.x,e.origin.x+e.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
14575
|
+
return t===_K||t===MK?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(t,e,n){const i=SK().domain([0,n])
|
|
14576
|
+
return t===_K||t===MK?i.range(ZZ(e.origin.x,e.origin.x+e.cols)):i.range(ZZ(e.origin.x,e.origin.x+e.cols).reverse())}createVerticalScale(t,e,n){const i=JZ().domain(ZZ(e.origin.y,e.origin.y+e.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
14577
|
+
return t===_K||t===IK?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(t,e,n){const i=SK().domain([0,n])
|
|
14578
|
+
return t===_K||t===IK?i.range(ZZ(e.origin.y,e.origin.y+e.rows).reverse()):i.range(ZZ(e.origin.y,e.origin.y+e.rows))}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}}(t),this.prerendering=new OK(t)}updateContainerDimensions(){this.computations.updateContainerDimensions(),this.updateDataMap(),this.updateLabelsFontSize()}updateScales(){this.computations.updateScales(),this.updateDataMap(),this.updateLabelsFontSize()}updateLabelsFontSize(){this.prerendering.updateLabelsFontSize()}updateDiesRenderInfo(){this.prerendering.updateDiesRenderInfo()}getWaferMapDie(t){return this.dataMap.get(`${t.x}_${t.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((t=>[`${t.x}_${t.y}`,t])))}}class FK{constructor(t){this.wafermap=t,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((t,e)=>t.fillStyle>e.fillStyle?1:e.fillStyle>t.fillStyle?-1:0)),this.drawWafer()}drawWafer(){this.wafermap.canvasContext.save(),this.clearCanvas(),this.scaleCanvas(),this.renderDies(),this.renderText(),this.wafermap.canvasContext.restore(),this.renderHover()}renderHover(){void 0!==this.wafermap.dataManager.dieDimensions&&void 0!==this.wafermap.transform&&(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?DK:EK,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
|
|
14576
14579
|
if(void 0===t)return""
|
|
14577
14580
|
const e=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y)
|
|
14578
14581
|
if(void 0===e)return""
|
|
@@ -14585,80 +14588,80 @@ if(t*e*(this.wafermap.transform.k||1)>=this.minDieDim){const n=this.wafermap.dat
|
|
|
14585
14588
|
i.font=`${n.toString()}px sans-serif`,i.fillStyle="#ffffff",i.textAlign="center",i.lineCap="butt"
|
|
14586
14589
|
const s=i.measureText("M"),o=this.wafermap.transform.invert([0,0]),r=this.wafermap.transform.invert([this.wafermap.canvas.width,this.wafermap.canvas.height])
|
|
14587
14590
|
o[0]-=t,o[1]-=e
|
|
14588
|
-
for(const n of this.dies)this.isDieVisible(n,o,r)&&i.fillText(n.text,n.x+t/2,n.y+e/2+s.width/2,t-t/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(t,e,n){return t.x>=e[0]&&t.x<n[0]&&t.y>=e[1]&&t.y<n[1]}}const
|
|
14589
|
-
class
|
|
14591
|
+
for(const n of this.dies)this.isDieVisible(n,o,r)&&i.fillText(n.text,n.x+t/2,n.y+e/2+s.width/2,t-t/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(t,e,n){return t.x>=e[0]&&t.x<n[0]&&t.y>=e[1]&&t.y<n[1]}}const NK=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
|
|
14592
|
+
class LK extends yE{constructor(t){super(NK),this.wafermap=t,this.updateQueued=!1}get requiresEventsUpdate(){return 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("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")||this.isTracked("transform")}get requiresWorkerWaferSetup(){return 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("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresContainerDimensionsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresComponentResizeUpdate(){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 requiresInputDataUpdate(){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 requiresColorAndTextUpdate(){return this.isTracked("maxCharacters")||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,void 0===this.wafermap.currentTask?b.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1})):(async()=>{await this.wafermap.currentTask,b.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1,this.wafermap.currentTask=void 0}))})())}}class BK{constructor(t){this.wafermap=t,this.invalidGridDimensions=!1,this.invalidDiesTableSchema=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions,invalidDiesTableSchema:this.invalidDiesTableSchema}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}validateGridDimensions(){return this.invalidGridDimensions=!1,void 0===this.wafermap.gridMinX&&void 0===this.wafermap.gridMaxX&&void 0===this.wafermap.gridMinY&&void 0===this.wafermap.gridMaxY?this.invalidGridDimensions=!1:("number"!=typeof this.wafermap.gridMinX||"number"!=typeof this.wafermap.gridMaxX||"number"!=typeof this.wafermap.gridMinY||"number"!=typeof this.wafermap.gridMaxY||this.wafermap.gridMaxX<this.wafermap.gridMinX||this.wafermap.gridMaxY<this.wafermap.gridMinY)&&(this.invalidGridDimensions=!0),!this.invalidGridDimensions}validateDiesTableSchema(){if(this.invalidDiesTableSchema=!1,void 0===this.wafermap.diesTable)this.invalidDiesTableSchema=!1
|
|
14590
14593
|
else{const t=this.wafermap.diesTable.schema.fields,e=t.find((t=>"colIndex"===t.name)),n=t.find((t=>"rowIndex"===t.name)),i=t.find((t=>"value"===t.name))
|
|
14591
|
-
e&&n&&i&&
|
|
14594
|
+
e&&n&&i&&cq.isInt(e.type)&&32===e.type.bitWidth&&cq.isInt(n.type)&&32===n.type.bitWidth&&cq.isFloat(i.type)&&i.type.precision===OH.DOUBLE||(this.invalidDiesTableSchema=!0)}return!this.invalidDiesTableSchema}}
|
|
14592
14595
|
/**
|
|
14593
14596
|
* @license
|
|
14594
14597
|
* Copyright 2019 Google LLC
|
|
14595
14598
|
* SPDX-License-Identifier: Apache-2.0
|
|
14596
|
-
*/const
|
|
14597
|
-
return
|
|
14599
|
+
*/const PK=Symbol("Comlink.proxy"),zK=Symbol("Comlink.endpoint"),VK=Symbol("Comlink.releaseProxy"),HK=Symbol("Comlink.finalizer"),UK=Symbol("Comlink.thrown"),qK=t=>"object"==typeof t&&null!==t||"function"==typeof t,jK=new Map([["proxy",{canHandle:t=>qK(t)&&t[PK],serialize(t){const{port1:e,port2:n}=new MessageChannel
|
|
14600
|
+
return WK(t,e),[n,[n]]},deserialize:t=>(t.start(),ZK(t))}],["throw",{canHandle:t=>qK(t)&&UK in t,serialize({value:t}){let e
|
|
14598
14601
|
return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value)
|
|
14599
14602
|
throw t.value}}]])
|
|
14600
|
-
function
|
|
14603
|
+
function WK(t,e=globalThis,n=["*"]){e.addEventListener("message",(function i(s){if(!s||!s.data)return
|
|
14601
14604
|
if(!function(t,e){for(const n of t){if(e===n||"*"===n)return!0
|
|
14602
14605
|
if(n instanceof RegExp&&n.test(e))return!0}return!1}(n,s.origin))return void console.warn(`Invalid origin '${s.origin}' for comlink proxy`)
|
|
14603
|
-
const{id:o,type:r,path:a}=Object.assign({path:[]},s.data),l=(s.data.argumentList||[]).map(
|
|
14606
|
+
const{id:o,type:r,path:a}=Object.assign({path:[]},s.data),l=(s.data.argumentList||[]).map(sY)
|
|
14604
14607
|
let c
|
|
14605
14608
|
try{const e=a.slice(0,-1).reduce(((t,e)=>t[e]),t),n=a.reduce(((t,e)=>t[e]),t)
|
|
14606
14609
|
switch(r){case"GET":c=n
|
|
14607
14610
|
break
|
|
14608
|
-
case"SET":e[a.slice(-1)[0]]=
|
|
14611
|
+
case"SET":e[a.slice(-1)[0]]=sY(s.data.value),c=!0
|
|
14609
14612
|
break
|
|
14610
14613
|
case"APPLY":c=n.apply(e,l)
|
|
14611
14614
|
break
|
|
14612
|
-
case"CONSTRUCT":c=function(t){return Object.assign(t,{[
|
|
14615
|
+
case"CONSTRUCT":c=function(t){return Object.assign(t,{[PK]:!0})}(new n(...l))
|
|
14613
14616
|
break
|
|
14614
14617
|
case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel
|
|
14615
|
-
|
|
14618
|
+
WK(t,n),c=nY(e,[e])}break
|
|
14616
14619
|
case"RELEASE":c=void 0
|
|
14617
14620
|
break
|
|
14618
|
-
default:return}}catch(t){c={value:t,[
|
|
14619
|
-
e.postMessage(Object.assign(Object.assign({},s),{id:o}),a),"RELEASE"===r&&(e.removeEventListener("message",i),
|
|
14620
|
-
e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function
|
|
14621
|
-
|
|
14622
|
-
function
|
|
14623
|
-
const s=new Proxy(n,{get(n,o){if(
|
|
14621
|
+
default:return}}catch(t){c={value:t,[UK]:0}}Promise.resolve(c).catch((t=>({value:t,[UK]:0}))).then((n=>{const[s,a]=iY(n)
|
|
14622
|
+
e.postMessage(Object.assign(Object.assign({},s),{id:o}),a),"RELEASE"===r&&(e.removeEventListener("message",i),GK(e),HK in t&&"function"==typeof t[HK]&&t[HK]())})).catch((t=>{const[n,i]=iY({value:new TypeError("Unserializable return value"),[UK]:0})
|
|
14623
|
+
e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function GK(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function ZK(t,e){return QK(t,[],e)}function KK(t){if(t)throw new Error("Proxy has been released and is not useable")}function YK(t){return oY(t,{type:"RELEASE"}).then((()=>{GK(t)}))}const XK=new WeakMap,JK="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(XK.get(t)||0)-1
|
|
14624
|
+
XK.set(t,e),0===e&&YK(t)}))
|
|
14625
|
+
function QK(t,e=[],n=function(){}){let i=!1
|
|
14626
|
+
const s=new Proxy(n,{get(n,o){if(KK(i),o===VK)return()=>{!function(t){JK&&JK.unregister(t)}(s),YK(t),i=!0}
|
|
14624
14627
|
if("then"===o){if(0===e.length)return{then:()=>s}
|
|
14625
|
-
const n=
|
|
14626
|
-
return n.then.bind(n)}return
|
|
14627
|
-
const[r,a]=
|
|
14628
|
-
return
|
|
14628
|
+
const n=oY(t,{type:"GET",path:e.map((t=>t.toString()))}).then(sY)
|
|
14629
|
+
return n.then.bind(n)}return QK(t,[...e,o])},set(n,s,o){KK(i)
|
|
14630
|
+
const[r,a]=iY(o)
|
|
14631
|
+
return oY(t,{type:"SET",path:[...e,s].map((t=>t.toString())),value:r},a).then(sY)},apply(n,s,o){KK(i)
|
|
14629
14632
|
const r=e[e.length-1]
|
|
14630
|
-
if(r===
|
|
14631
|
-
if("bind"===r)return
|
|
14632
|
-
const[a,l]=
|
|
14633
|
-
return
|
|
14634
|
-
const[o,r]=
|
|
14635
|
-
return
|
|
14636
|
-
return function(t,e){const n=(
|
|
14637
|
-
|
|
14633
|
+
if(r===zK)return oY(t,{type:"ENDPOINT"}).then(sY)
|
|
14634
|
+
if("bind"===r)return QK(t,e.slice(0,-1))
|
|
14635
|
+
const[a,l]=tY(o)
|
|
14636
|
+
return oY(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:a},l).then(sY)},construct(n,s){KK(i)
|
|
14637
|
+
const[o,r]=tY(s)
|
|
14638
|
+
return oY(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:o},r).then(sY)}})
|
|
14639
|
+
return function(t,e){const n=(XK.get(e)||0)+1
|
|
14640
|
+
XK.set(e,n),JK&&JK.register(t,e,t)}(s,t),s}function tY(t){const e=t.map(iY)
|
|
14638
14641
|
return[e.map((t=>t[0])),(n=e.map((t=>t[1])),Array.prototype.concat.apply([],n))]
|
|
14639
|
-
var n}const
|
|
14640
|
-
function
|
|
14641
|
-
return[{type:"HANDLER",name:e,value:i},s]}return[{type:"RAW",value:t},
|
|
14642
|
-
case"RAW":return t.value}}function
|
|
14643
|
-
t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===s&&(t.removeEventListener("message",e),i(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:s},e),n)}))}let
|
|
14644
|
-
class nY{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===eY){const t=new Blob(['var MatrixRenderer = (function (exports) {\n \'use strict\';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol("Comlink.proxy");\n const createEndpoint = Symbol("Comlink.endpoint");\n const releaseProxy = Symbol("Comlink.releaseProxy");\n const finalizer = Symbol("Comlink.finalizer");\n const throwMarker = Symbol("Comlink.thrown");\n const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n ["proxy", proxyTransferHandler],\n ["throw", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === "*") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {\n ep.addEventListener("message", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin \'${ev.origin}\' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case "GET" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case "SET" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case "APPLY" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case "CONSTRUCT" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case "ENDPOINT" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case "RELEASE" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === "RELEASE" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener("message", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === "function") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError("Unserializable return value"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === "MessagePort";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error("Proxy has been released and is not useable");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: "RELEASE" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = "FinalizationRegistry" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === "then") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: "GET" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: "SET" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: "ENDPOINT" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === "bind") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "APPLY" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "CONSTRUCT" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: "HANDLER" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: "RAW" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case "HANDLER" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case "RAW" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener("message", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener("message", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join("-");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink\'s `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = \'rgba(218,223,236,1)\';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: \'\',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext(\'2d\');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = \'#ffffff\';\n this.context.textAlign = \'center\';\n this.context.lineCap = \'butt\';\n const approximateTextHeight = this.context.measureText(\'M\');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || \'NaN\'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n'],{type:"text/javascript"})
|
|
14645
|
-
|
|
14642
|
+
var n}const eY=new WeakMap
|
|
14643
|
+
function nY(t,e){return eY.set(t,e),t}function iY(t){for(const[e,n]of jK)if(n.canHandle(t)){const[i,s]=n.serialize(t)
|
|
14644
|
+
return[{type:"HANDLER",name:e,value:i},s]}return[{type:"RAW",value:t},eY.get(t)||[]]}function sY(t){switch(t.type){case"HANDLER":return jK.get(t.name).deserialize(t.value)
|
|
14645
|
+
case"RAW":return t.value}}function oY(t,e,n){return new Promise((i=>{const s=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-")
|
|
14646
|
+
t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===s&&(t.removeEventListener("message",e),i(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:s},e),n)}))}let rY
|
|
14647
|
+
class aY{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===rY){const t=new Blob(['var MatrixRenderer = (function (exports) {\n \'use strict\';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol("Comlink.proxy");\n const createEndpoint = Symbol("Comlink.endpoint");\n const releaseProxy = Symbol("Comlink.releaseProxy");\n const finalizer = Symbol("Comlink.finalizer");\n const throwMarker = Symbol("Comlink.thrown");\n const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n ["proxy", proxyTransferHandler],\n ["throw", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === "*") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {\n ep.addEventListener("message", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin \'${ev.origin}\' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case "GET" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case "SET" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case "APPLY" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case "CONSTRUCT" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case "ENDPOINT" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case "RELEASE" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === "RELEASE" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener("message", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === "function") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError("Unserializable return value"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === "MessagePort";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error("Proxy has been released and is not useable");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: "RELEASE" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = "FinalizationRegistry" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === "then") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: "GET" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: "SET" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: "ENDPOINT" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === "bind") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "APPLY" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "CONSTRUCT" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: "HANDLER" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: "RAW" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case "HANDLER" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case "RAW" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener("message", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener("message", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join("-");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink\'s `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = \'rgba(218,223,236,1)\';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: \'\',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext(\'2d\');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = \'#ffffff\';\n this.context.textAlign = \'center\';\n this.context.lineCap = \'butt\';\n const approximateTextHeight = this.context.measureText(\'M\');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || \'NaN\'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n'],{type:"text/javascript"})
|
|
14648
|
+
rY=URL.createObjectURL(t)}const t=new Worker(rY),e=ZK(t)
|
|
14646
14649
|
return{matrixRenderer:await new e,terminate:()=>t.terminate()}})()
|
|
14647
14650
|
this.matrixRenderer=t
|
|
14648
14651
|
const e=this.wafermap.workerCanvas.transferControlToOffscreen()
|
|
14649
|
-
await this.matrixRenderer.setCanvas(
|
|
14650
|
-
await this.matrixRenderer.setTransformConfig({transform:t.transform,topLeftCanvasCorner:{x:e[0]-t.dieDimensions.width,y:e[1]-t.dieDimensions.height},bottomRightCanvasCorner:{x:n[0],y:n[1]}}),await this.matrixRenderer.drawWafer(),!t.dieLabelsHidden&&t.dieDimensions&&t.dieDimensions.width*t.dieDimensions.height*(t.transform.k||1)>=this.minDieDim&&await this.matrixRenderer.drawText()}renderHover(){void 0!==this.wafermap.computations.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.computations.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.computations.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?
|
|
14652
|
+
await this.matrixRenderer.setCanvas(nY(e,[e]))}await this.matrixRenderer.setCanvasDimensions(t.canvasDimensions),await this.matrixRenderer.setRenderConfig(t.renderConfig),await this.matrixRenderer.setMatrixData(t.columnIndices,t.rowIndices,t.values)}async drawWafer(t){const e=t.transform.invert([0,0]),n=t.transform.invert([t.canvasDimensions.width,t.canvasDimensions.height])
|
|
14653
|
+
await this.matrixRenderer.setTransformConfig({transform:t.transform,topLeftCanvasCorner:{x:e[0]-t.dieDimensions.width,y:e[1]-t.dieDimensions.height},bottomRightCanvasCorner:{x:n[0],y:n[1]}}),await this.matrixRenderer.drawWafer(),!t.dieLabelsHidden&&t.dieDimensions&&t.dieDimensions.width*t.dieDimensions.height*(t.transform.k||1)>=this.minDieDim&&await this.matrixRenderer.drawText()}renderHover(){void 0!==this.wafermap.computations.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.computations.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.computations.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?DK:EK,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.computations.horizontalScale(this.wafermap.hoverDie.x)
|
|
14651
14654
|
if(void 0===t)return""
|
|
14652
14655
|
const e=this.wafermap.computations.verticalScale(this.wafermap.hoverDie.y)
|
|
14653
14656
|
if(void 0===e)return""
|
|
14654
14657
|
const n=this.wafermap.transform.apply([t+this.wafermap.computations.margin.left,e+this.wafermap.computations.margin.top])
|
|
14655
|
-
return`translate(${n[0]}, ${n[1]})`}return""}}class
|
|
14658
|
+
return`translate(${n[0]}, ${n[1]})`}return""}}class lY{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(!this.wafermap.isExperimentalUpdate())return
|
|
14656
14659
|
const e=this.wafermap.transform.invert([t.offsetX,t.offsetY]),n=this.calculateDieCoordinates({x:e[0],y:e[1]})
|
|
14657
14660
|
if(void 0===n||!this.isDieInGrid(n.x,n.y))return void(this.wafermap.hoverDie=void 0)
|
|
14658
14661
|
const i=this.wafermap.diesTable.getChild("colIndex").toArray(),s=this.wafermap.diesTable.getChild("rowIndex").toArray()
|
|
14659
14662
|
for(let t=0;t<i.length;t++)if(i[t]===n.x&&s[t]===n.y)return void(this.wafermap.hoverDie={index:t,x:n.x,y:n.y})
|
|
14660
|
-
this.wafermap.hoverDie=void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===
|
|
14661
|
-
return{x:n(this.wafermap.computations.horizontalScale.invert(t.x-this.wafermap.computations.margin.left)),y:i(this.wafermap.computations.verticalScale.invert(t.y-this.wafermap.computations.margin.top))}}}isDieInGrid(t,e){return t>=this.wafermap.computations.gridMinX&&t<=this.wafermap.computations.gridMaxX&&e>=this.wafermap.computations.gridMinY&&e<=this.wafermap.computations.gridMaxY}}class
|
|
14663
|
+
this.wafermap.hoverDie=void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===_K||e===MK?Math.floor:Math.ceil,i=e===_K||e===IK?Math.ceil:Math.floor
|
|
14664
|
+
return{x:n(this.wafermap.computations.horizontalScale.invert(t.x-this.wafermap.computations.margin.left)),y:i(this.wafermap.computations.verticalScale.invert(t.y-this.wafermap.computations.margin.top))}}}isDieInGrid(t,e){return t>=this.wafermap.computations.gridMinX&&t<=this.wafermap.computations.gridMaxX&&e>=this.wafermap.computations.gridMinY&&e<=this.wafermap.computations.gridMaxY}}class cY{constructor(t){this.wafermap=t,this.scaleExtent=[1,100],this.minExtentPoint=[0,0],this.onWheelMove=t=>{t.preventDefault()},this.wafermapNotifier=x.getNotifier(this.wafermap),this.wafermapNotifier.subscribe(this,"canvasWidth"),this.wafermapNotifier.subscribe(this,"canvasHeight")}connect(){this.createZoomBehavior(),this.wafermap.addEventListener("wheel",this.onWheelMove,{passive:!1})}disconnect(){JV().on("zoom",null)(DP(this.wafermap)),this.wafermap.removeEventListener("wheel",this.onWheelMove)}handleChange(t,e){t!==this.wafermap||"canvasWidth"!==e&&"canvasHeight"!==e||this.createZoomBehavior()}createZoomBehavior(){JV().scaleExtent(this.scaleExtent).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth,this.wafermap.canvasHeight]]).on("zoom",(t=>{this.wafermap.transform=t.transform}))(DP(this.wafermap))}}class dY{get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get margin(){return this._margin}get verticalCoefficient(){return this._verticalCoefficient}get horizontalCoefficient(){return this._horizontalCoefficient}get horizontalConstant(){return this._horizontalConstant}get verticalConstant(){return this._verticalConstant}get gridMinX(){return this._gridMinX}get gridMaxX(){return this._gridMaxX}get gridMinY(){return this._gridMinY}get gridMaxY(){return this._gridMaxY}get labelsFontSize(){return this._labelsFontSize}get colorScale(){return this._colorScale}constructor(t){this.wafermap=t,this.baseMarginPercentage=.04,this.fontSizeFactor=.8,this.colorScaleResolution=10}componentResizeUpdate(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
|
|
14662
14665
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(t,this.margin),this.inputDataUpdate()}inputDataUpdate(){if(void 0===this._containerDimensions)return void this.componentResizeUpdate()
|
|
14663
14666
|
const t=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
14664
14667
|
this.gridDimensionsValidAndDefined()?this.setGridDimensionsFromBoundingBox():this.setGridDimensionsFromDies()
|
|
@@ -14666,28 +14669,28 @@ const e=this.wafermap.originLocation
|
|
|
14666
14669
|
this._horizontalScale=this.createHorizontalScale(e,t),this._verticalScale=this.createVerticalScale(e,t),this._horizontalCoefficient=this._horizontalScale(1)-this._horizontalScale(0),this._verticalCoefficient=this._verticalScale(1)-this._verticalScale(0),this._horizontalConstant=this._horizontalScale(0),this._verticalConstant=this._verticalScale(0),this._dieDimensions={width:Math.abs(this._horizontalScale(0)-this._horizontalScale(1)),height:Math.abs(this._verticalScale(0)-this._verticalScale(1))},this.colorAndTextUpdate()}colorAndTextUpdate(){void 0!==this._dieDimensions?(this._labelsFontSize=this.calculateLabelsFontSize(this._dieDimensions,this.wafermap.maxCharacters),this._colorScale=this.calculateColorScale()):this.inputDataUpdate()}gridDimensionsValidAndDefined(){return!this.wafermap.validity.invalidGridDimensions&&"number"==typeof this.wafermap.gridMinX&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX}setGridDimensionsFromBoundingBox(){this._gridMinX=this.wafermap.gridMinX,this._gridMinY=this.wafermap.gridMinY,this._gridMaxX=this.wafermap.gridMaxX,this._gridMaxY=this.wafermap.gridMaxY}setGridDimensionsFromDies(){if(void 0===this.wafermap.diesTable)return
|
|
14667
14670
|
const t=this.wafermap.diesTable.getChild("colIndex").toArray(),e=this.wafermap.diesTable.getChild("rowIndex").toArray(),n={x:t[0],y:e[0]},i={x:t[0],y:e[0]}
|
|
14668
14671
|
for(let s=0;s<t.length;s++)t[s]<n.x&&(n.x=t[s]),t[s]>i.x&&(i.x=t[s]),e[s]<n.y&&(n.y=e[s]),e[s]>i.y&&(i.y=e[s])
|
|
14669
|
-
this._gridMinX=n.x,this._gridMinY=n.y,this._gridMaxX=i.x,this._gridMaxY=i.y}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e){const n=
|
|
14670
|
-
return t===
|
|
14671
|
-
return t===
|
|
14672
|
+
this._gridMinX=n.x,this._gridMinY=n.y,this._gridMaxX=i.x,this._gridMaxY=i.y}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e){const n=kK()
|
|
14673
|
+
return t===_K||t===MK?n.domain([this._gridMinX,this._gridMaxX+1]).range([0,e]):n.domain([this._gridMinX-1,this._gridMaxX]).range([e,0])}createVerticalScale(t,e){const n=kK()
|
|
14674
|
+
return t===_K||t===IK?n.domain([this._gridMinY-1,this._gridMaxY]).range([e,0]):n.domain([this._gridMinY,this._gridMaxY+1]).range([0,e])}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}calculateColorScale(){if(this.wafermap.colorScaleMode===AK){const t=this.wafermap.colorScale.values.map((t=>+t)),e=kK().domain(t).range(this.wafermap.colorScale.colors)
|
|
14672
14675
|
let n=t[0],i=t[0]
|
|
14673
14676
|
t.forEach((t=>{t<n&&(n=t),t>i&&(i=t)}))
|
|
14674
|
-
return
|
|
14677
|
+
return ZZ(n,i,(i-n)/(t.length*this.colorScaleResolution)).concat(i).map((t=>({color:e(t),value:t})))}return this.wafermap.colorScale.colors.map(((t,e)=>({color:t,value:+this.wafermap.colorScale.values[e]}))).sort(((t,e)=>t.value-e.value))}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}}class hY extends We{constructor(){super(...arguments),this.waferMapUpdateTracker=new LK(this.asRequiredFieldsWaferMap),this.originLocation=_K,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=$K,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=AK,this.computations=new dY(this.asRequiredFieldsWaferMap),this.dataManager=new RK(this.asRequiredFieldsWaferMap),this.workerRenderer=new aY(this.asRequiredFieldsWaferMap),this.renderer=new FK(this.asRequiredFieldsWaferMap),this.renderQueued=!1,this.transform=UV,this.hoverTransform="",this.hoverOpacity=DK,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.hoverHandler=new class{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(this.wafermap.isExperimentalUpdate())return
|
|
14675
14678
|
const e={x:t.offsetX,y:t.offsetY}
|
|
14676
14679
|
if(!this.hoversOverDie(e))return void(this.wafermap.hoverDie=void 0)
|
|
14677
14680
|
const n=this.wafermap.transform.invert([e.x,e.y]),i=this.calculateDieCoordinates({x:n[0],y:n[1]})
|
|
14678
|
-
this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(!this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===
|
|
14681
|
+
this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(!this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===_K||e===MK?Math.floor:Math.ceil,i=e===_K||e===IK?Math.floor:Math.ceil
|
|
14679
14682
|
return{x:n(this.wafermap.dataManager.invertedHorizontalScale(t.x-this.wafermap.dataManager.margin.left)),y:i(this.wafermap.dataManager.invertedVerticalScale(t.y-this.wafermap.dataManager.margin.top))}}}hoversOverDie(t){const e=this.wafermap.canvasContext.getImageData(t.x,t.y,1,1).data
|
|
14680
14683
|
let n=0
|
|
14681
14684
|
for(const t of e)n+=t
|
|
14682
|
-
return n>0}}(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new
|
|
14685
|
+
return n>0}}(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new lY(this.asRequiredFieldsWaferMap),this.zoomHandler=new cY(this.asRequiredFieldsWaferMap),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new BK(this.asRequiredFieldsWaferMap)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.hoverHandler.connect(),this.experimentalHoverHandler.connect(),this.zoomHandler.connect(),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.hoverHandler.disconnect(),this.experimentalHoverHandler.disconnect(),this.zoomHandler.disconnect(),this.resizeObserver.unobserve(this)}async experimentalUpdate(){if(!this.validity.invalidDiesTableSchema){if(this.waferMapUpdateTracker.requiresEventsUpdate){this.waferMapUpdateTracker.requiresComponentResizeUpdate?this.computations.componentResizeUpdate():this.waferMapUpdateTracker.requiresInputDataUpdate?this.computations.inputDataUpdate():this.waferMapUpdateTracker.requiresColorAndTextUpdate&&this.computations.colorAndTextUpdate()
|
|
14683
14686
|
const t=this.createSnapshot()
|
|
14684
14687
|
this.waferMapUpdateTracker.requiresWorkerWaferSetup&&await this.workerRenderer.setupWafer(t),await this.workerRenderer.drawWafer(t)}this.workerRenderer.renderHover()}}update(){this.validate(),this.isExperimentalUpdate()?this.currentTask=this.experimentalUpdate():this.waferMapUpdateTracker.requiresEventsUpdate?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.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.renderer.renderHover()}isExperimentalUpdate(){return void 0!==this.diesTable}async setData(t){Array.isArray(t)?this.dies=t:this.diesTable=t,await b.nextUpdate(),void 0!==this.currentTask&&await this.currentTask}createSnapshot(){const t={width:this.canvasWidth??0,height:this.canvasHeight??0},e={dieDimensions:this.computations.dieDimensions,margin:this.computations.margin,verticalCoefficient:this.computations.verticalCoefficient,horizontalCoefficient:this.computations.horizontalCoefficient,horizontalConstant:this.computations.horizontalConstant,verticalConstant:this.computations.verticalConstant,gridMinX:this.computations.gridMinX,gridMaxX:this.computations.gridMaxX,gridMinY:this.computations.gridMinY,gridMaxY:this.computations.gridMaxY,labelsFontSize:this.computations.labelsFontSize,colorScale:this.computations.colorScale,dieLabelsSuffix:this.dieLabelsSuffix,maxCharacters:this.maxCharacters},n=this.computations.dieDimensions,i=this.transform,s=this.dieLabelsHidden
|
|
14685
14688
|
if(void 0===this.diesTable)return{canvasDimensions:t,renderConfig:e,dieDimensions:n,transform:i,dieLabelsHidden:s,columnIndices:Int32Array.from([]),rowIndices:Int32Array.from([]),values:Float64Array.from([])}
|
|
14686
14689
|
return{canvasDimensions:t,renderConfig:e,columnIndices:this.diesTable.getChild("colIndex").toArray(),rowIndices:this.diesTable.getChild("rowIndex").toArray(),values:this.diesTable.getChild("value").toArray(),dieDimensions:n,transform:i,dieLabelsHidden:s}}validate(){this.waferMapValidator.validateGridDimensions(),this.waferMapValidator.validateDiesTableSchema()}createResizeObserver(){return new ResizeObserver((t=>{const e=t[0]
|
|
14687
14690
|
if(void 0===e)return
|
|
14688
14691
|
const{height:n,width:i}=e.contentRect
|
|
14689
|
-
this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}diesTableChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}get asRequiredFieldsWaferMap(){return this}}
|
|
14690
|
-
return
|
|
14691
|
-
const
|
|
14692
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
14692
|
+
this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}diesTableChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}get asRequiredFieldsWaferMap(){return this}}hY.Arrow={tableFromIPC:function t(e){const n=vZ.from(e)
|
|
14693
|
+
return oH(n)?n.then((e=>t(e))):n.isAsync()?n.readAll().then((t=>new AG(t))):new AG(n.readAll())}},t([ft({attribute:"origin-location"})],hY.prototype,"originLocation",void 0),t([ft({attribute:"grid-min-x",converter:ut})],hY.prototype,"gridMinX",void 0),t([ft({attribute:"grid-max-x",converter:ut})],hY.prototype,"gridMaxX",void 0),t([ft({attribute:"grid-min-y",converter:ut})],hY.prototype,"gridMinY",void 0),t([ft({attribute:"grid-max-y",converter:ut})],hY.prototype,"gridMaxY",void 0),t([ft],hY.prototype,"orientation",void 0),t([ft({attribute:"max-characters",converter:ut})],hY.prototype,"maxCharacters",void 0),t([ft({attribute:"die-labels-hidden",mode:"boolean"})],hY.prototype,"dieLabelsHidden",void 0),t([ft({attribute:"die-labels-suffix"})],hY.prototype,"dieLabelsSuffix",void 0),t([ft({attribute:"color-scale-mode"})],hY.prototype,"colorScaleMode",void 0),t([C],hY.prototype,"renderer",void 0),t([C],hY.prototype,"canvasWidth",void 0),t([C],hY.prototype,"canvasHeight",void 0),t([C],hY.prototype,"transform",void 0),t([C],hY.prototype,"hoverTransform",void 0),t([C],hY.prototype,"hoverOpacity",void 0),t([C],hY.prototype,"hoverWidth",void 0),t([C],hY.prototype,"hoverHeight",void 0),t([C],hY.prototype,"hoverDie",void 0),t([C],hY.prototype,"highlightedTags",void 0),t([C],hY.prototype,"dies",void 0),t([C],hY.prototype,"diesTable",void 0),t([C],hY.prototype,"colorScale",void 0)
|
|
14694
|
+
const uY=hY.compose({baseName:"wafer-map",template:AZ,styles:TZ})
|
|
14695
|
+
_i.getOrCreate().withPrefix("nimble").register(uY())}()
|
|
14693
14696
|
//# sourceMappingURL=all-components-bundle.min.js.map
|