@ni/spright-components 1.0.39 → 1.0.40
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.
|
@@ -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],gE.prototype,"pattern",void 0),t([ft({attribute:"button-label"})],gE.prototype,"buttonLabel",void 0),t([C],gE.prototype,"mappingElements",void 0)
|
|
8592
8592
|
class vE{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 bE{constructor(t){this.parserMentionConfig=[],this.isValid=!0,this.isValid=t.every((t=>t.mentionInternals.validator.isValid())),this.parserMentionConfig=this.isValid?t.map((t=>new vE(t.mentionInternals))):[]}}class yE{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 wE extends yE{}const xE=["pattern","mappingConfigs","buttonLabel"]
|
|
8594
|
+
return e?.[1]??void 0}}class bE{constructor(t){this.parserMentionConfig=[],this.isValid=!0,this.isValid=t.every((t=>t.mentionInternals.validator.isValid())),this.parserMentionConfig=this.isValid?t.map((t=>new vE(t.mentionInternals))):[]}}class yE{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 wE extends yE{}const xE=["pattern","mappingConfigs","buttonLabel"]
|
|
8595
8595
|
class CE extends wE{constructor(t){super(xE),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!==XO||s!==YO||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===XO??!1)}canLoadDelayedChildren(t){if(!this.isHierarchyEnabled)return!1
|
|
11416
11416
|
const e=this.hierarchyOptions.get(t)?.delayedHierarchyState
|
|
11417
|
-
return e!==KO}getDefaultExpansionState(t){return 0!==t.subRows.length}}class _F extends yE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class IF extends _F{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}setConditionValue(t,e){e?this.track(t):this.untrack(t)
|
|
11417
|
+
return e!==KO}getDefaultExpansionState(t){return 0!==t.subRows.length}}class _F extends yE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class IF extends _F{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],IF.prototype,"isColumnValid",void 0)
|
|
11418
11418
|
class MF{get inNavigationMode(){return this.focusType!==hR&&this.focusType!==uR}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=oR,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===oR)&&!e){let t=!0
|
|
@@ -11738,14 +11738,16 @@ const zF=Q`
|
|
|
11738
11738
|
const HF=class extends PF{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:zF,styles:VF})
|
|
11739
11739
|
_i.getOrCreate().withPrefix("nimble").register(HF())
|
|
11740
11740
|
const UF="nimble-table-column-text-group-header-view"
|
|
11741
|
-
function qF(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=JO.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=JO.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 qF(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=JO.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=JO.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 jF(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?pR: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 WF=["invalidCustomSortWithGrouping"]
|
|
11743
|
+
class GF extends IF{constructor(){super(WF)}}class ZF extends(OF(TF(RF(qF(jF(_R)))))){constructor(){super(...arguments),this.underlineHidden=!1,this.defaultSortOperation=fR}placeholderChanged(){this.updateColumnConfig()}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:UF,delegatedEvents:["click"],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new GF}}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"})],ZF.prototype,"labelFieldName",void 0),t([ft({attribute:"href-field-name"})],ZF.prototype,"hrefFieldName",void 0),t([ft],ZF.prototype,"appearance",void 0),t([ft({attribute:"underline-hidden",mode:"boolean"})],ZF.prototype,"underlineHidden",void 0),t([ft],ZF.prototype,"hreflang",void 0),t([ft],ZF.prototype,"ping",void 0),t([ft],ZF.prototype,"referrerpolicy",void 0),t([ft],ZF.prototype,"rel",void 0),t([ft],ZF.prototype,"target",void 0),t([ft],ZF.prototype,"type",void 0),t([ft],ZF.prototype,"download",void 0)
|
|
11744
|
+
const KF=ZF.compose({baseName:"table-column-anchor",template:AF,styles:DF})
|
|
11745
|
+
_i.getOrCreate().withPrefix("nimble").register(KF())
|
|
11746
|
+
class YF extends _R{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function XF(t){return OF(TF(RF(qF(t))))}function JF(t,e){if("number"!=typeof e)return""
|
|
11747
|
+
try{return t.format(e)}catch(t){return""}}t([ft({attribute:"field-name"})],YF.prototype,"fieldName",void 0)
|
|
11748
|
+
const QF=class extends PF{updateText(){this.columnConfig?this.text=JF(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:zF,styles:VF})
|
|
11749
|
+
_i.getOrCreate().withPrefix("nimble").register(QF())
|
|
11750
|
+
const tN=Q`
|
|
11749
11751
|
<template
|
|
11750
11752
|
class="
|
|
11751
11753
|
${t=>t.alignment===sR?"right-align":""}
|
|
@@ -11759,7 +11761,7 @@ const XF=Q`
|
|
|
11759
11761
|
${t=>t.text}
|
|
11760
11762
|
</span>
|
|
11761
11763
|
</template>
|
|
11762
|
-
`,
|
|
11764
|
+
`,eN=Mt`
|
|
11763
11765
|
${Vs("flex")}
|
|
11764
11766
|
|
|
11765
11767
|
:host {
|
|
@@ -11783,22 +11785,22 @@ const XF=Q`
|
|
|
11783
11785
|
color: ${Rc};
|
|
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 nN extends yR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=iR,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],nN.prototype,"hasOverflow",void 0),t([C],nN.prototype,"text",void 0),t([C],nN.prototype,"alignment",void 0),t([C],nN.prototype,"isPlaceholder",void 0)
|
|
11790
|
+
const iN=class extends nN{updateText(){this.columnConfig?this.text=JF(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:tN,styles:eN})
|
|
11791
|
+
_i.getOrCreate().withPrefix("nimble").register(iN())
|
|
11792
|
+
const sN=void 0,oN=["invalidCustomOptionsCombination"]
|
|
11793
|
+
class rN extends IF{constructor(){super(oN)}setCustomOptionsValidity(t){this.setConditionValue("invalidCustomOptionsCombination",!t)}}const aN={toView:t=>"boolean"==typeof t?t.toString():null,fromView:t=>"true"===t||!0===t||"false"!==t&&!1!==t&&void 0}
|
|
11794
|
+
class lN extends(XF(YF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.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:pR,validator:new rN}}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(Ga.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===sN?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
|
|
11798
|
+
try{return new Intl.DateTimeFormat(Ga.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],lN.prototype,"format",void 0),t([ft({attribute:"custom-locale-matcher"})],lN.prototype,"customLocaleMatcher",void 0),t([ft({attribute:"custom-weekday"})],lN.prototype,"customWeekday",void 0),t([ft({attribute:"custom-era"})],lN.prototype,"customEra",void 0),t([ft({attribute:"custom-year"})],lN.prototype,"customYear",void 0),t([ft({attribute:"custom-month"})],lN.prototype,"customMonth",void 0),t([ft({attribute:"custom-day"})],lN.prototype,"customDay",void 0),t([ft({attribute:"custom-hour"})],lN.prototype,"customHour",void 0),t([ft({attribute:"custom-minute"})],lN.prototype,"customMinute",void 0),t([ft({attribute:"custom-second"})],lN.prototype,"customSecond",void 0),t([ft({attribute:"custom-time-zone-name"})],lN.prototype,"customTimeZoneName",void 0),t([ft({attribute:"custom-format-matcher"})],lN.prototype,"customFormatMatcher",void 0),t([ft({attribute:"custom-hour12",converter:aN})],lN.prototype,"customHour12",void 0),t([ft({attribute:"custom-time-zone"})],lN.prototype,"customTimeZone",void 0),t([ft({attribute:"custom-calendar"})],lN.prototype,"customCalendar",void 0),t([ft({attribute:"custom-day-period"})],lN.prototype,"customDayPeriod",void 0),t([ft({attribute:"custom-numbering-system"})],lN.prototype,"customNumberingSystem",void 0),t([ft({attribute:"custom-date-style"})],lN.prototype,"customDateStyle",void 0),t([ft({attribute:"custom-time-style"})],lN.prototype,"customTimeStyle",void 0),t([ft({attribute:"custom-hour-cycle"})],lN.prototype,"customHourCycle",void 0)
|
|
11799
|
+
const cN=lN.compose({baseName:"table-column-date-text",template:AF,styles:DF})
|
|
11800
|
+
_i.getOrCreate().withPrefix("nimble").register(cN())
|
|
11801
|
+
const dN=class extends nN{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:tN,styles:eN})
|
|
11802
|
+
_i.getOrCreate().withPrefix("nimble").register(dN())
|
|
11803
|
+
class hN{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 uN=class extends PF{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:zF,styles:VF})
|
|
11817
|
+
_i.getOrCreate().withPrefix("nimble").register(uN())
|
|
11818
|
+
class pN extends(XF(YF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.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:pR,validator:new IF([])}}updateColumnConfig(){const t={formatter:new hN(Ga.getValueFor(this)),placeholder:this.placeholder}
|
|
11819
|
+
this.columnInternals.columnConfig=t}}const fN=pN.compose({baseName:"table-column-duration-text",template:AF,styles:DF})
|
|
11820
|
+
_i.getOrCreate().withPrefix("nimble").register(fN())
|
|
11821
|
+
const mN=(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 gN extends _R{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(t,e){t instanceof jv&&"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=mN(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],gN.prototype,"mappings",void 0),t([ft({attribute:"field-name"})],gN.prototype,"fieldName",void 0),t([ft({attribute:"key-type"})],gN.prototype,"keyType",void 0)
|
|
11830
|
+
const vN=Mt`
|
|
11829
11831
|
${DF}
|
|
11830
11832
|
|
|
11831
11833
|
slot[name='mapping'] {
|
|
11832
11834
|
display: none;
|
|
11833
11835
|
}
|
|
11834
|
-
`,
|
|
11835
|
-
class
|
|
11836
|
+
`,bN=Q`${AF}<slot ${ie("mappings")} name="mapping"></slot>`
|
|
11837
|
+
class yN extends IF{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===mN(t,e)))
|
|
11840
|
+
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>mN(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 wN=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue","unsupportedMappingType","invalidIconName","missingTextValue"]
|
|
11843
|
+
class xN extends yN{constructor(){super(wN)}static isIconMappingElement(t){return t instanceof Xv}static isSupportedMappingElement(t){return t instanceof Xv||t instanceof Qv||t instanceof eb||t instanceof Zv}validate(t,e){super.validate(t,e),this.validateMappingTypes(t),this.validateIconNames(t),this.validateNoMissingText(t)}validateIconNames(t){const e=t.filter(xN.isIconMappingElement).some((t=>void 0===t.resolvedIcon))
|
|
11844
|
+
this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(xN.isSupportedMappingElement).some((t=>void 0===t.text))
|
|
11845
|
+
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(xN.isSupportedMappingElement)
|
|
11846
|
+
this.setConditionValue("unsupportedMappingType",!e)}}const CN=Mt`
|
|
11845
11847
|
${Vs("inline-flex")}
|
|
11846
11848
|
|
|
11847
11849
|
:host {
|
|
@@ -11863,7 +11865,7 @@ this.setConditionValue("unsupportedMappingType",!e)}}const yN=Mt`
|
|
|
11863
11865
|
overflow: hidden;
|
|
11864
11866
|
text-overflow: ellipsis;
|
|
11865
11867
|
}
|
|
11866
|
-
`,
|
|
11868
|
+
`,kN=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 yN=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
|
+
`,SN={default:void 0,error:"error",warning:"warning",success:"success",information:"information"}
|
|
11880
|
+
class _N{constructor(t){this.text=t}}class IN extends _N{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 MN=Q`
|
|
11889
11891
|
<${OT}
|
|
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
|
</${OT}>
|
|
11895
11897
|
`
|
|
11896
|
-
class
|
|
11898
|
+
class $N extends _N{constructor(t,e){super(t),this.textHidden=e,this.spinnerTemplate=MN}}class EN extends _N{}class DN extends _N{}class AN extends vR{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 IN?(this.severity=e.severity,this.text=e.text??"",this.visualizationTemplate=e.iconTemplate):e instanceof $N?(this.text=e.text??"",this.visualizationTemplate=e.spinnerTemplate):(e instanceof EN||e instanceof DN)&&(this.text=e.text??"")}resetState(){this.text="",this.visualizationTemplate=void 0,this.severity=SN.default}}t([C],AN.prototype,"hasOverflow",void 0),t([C],AN.prototype,"text",void 0),t([C],AN.prototype,"severity",void 0),t([C],AN.prototype,"visualizationTemplate",void 0)
|
|
11901
|
+
const TN=AN.compose({baseName:"table-column-mapping-group-header-view",template:kN,styles:CN})
|
|
11902
|
+
_i.getOrCreate().withPrefix("nimble").register(TN())
|
|
11903
|
+
const ON=Mt`
|
|
11902
11904
|
${Vs("inline-flex")}
|
|
11903
11905
|
|
|
11904
11906
|
:host {
|
|
@@ -11920,7 +11922,7 @@ const DN=Mt`
|
|
|
11920
11922
|
overflow: hidden;
|
|
11921
11923
|
text-overflow: ellipsis;
|
|
11922
11924
|
}
|
|
11923
|
-
`,
|
|
11925
|
+
`,RN=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 DN=Mt`
|
|
|
11936
11938
|
</span>
|
|
11937
11939
|
`)}
|
|
11938
11940
|
`
|
|
11939
|
-
class
|
|
11941
|
+
class FN extends yR{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(ON())
|
|
11946
|
-
const RN="icon-size"
|
|
11947
|
-
class FN extends(OF(TF(qF(pN)))){minPixelWidthChanged(){this.widthMode!==RN&&(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:pR,validator:new bN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof Xv){if(!t.resolvedIcon)throw Error("Unresolved icon")
|
|
11948
|
-
return new kN(t.resolvedIcon,t.severity,t.text,t.textHidden)}if(t instanceof Qv)return new _N(t.text,t.textHidden)
|
|
11949
|
-
if(t instanceof eb)return new IN(t.text)
|
|
11950
|
-
if(t instanceof Zv)return new MN(t.text)
|
|
11951
|
-
throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===RN?(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:mR}}t([ft({attribute:"width-mode"})],FN.prototype,"widthMode",void 0)
|
|
11952
|
-
const NN=FN.compose({baseName:"table-column-mapping",template:mN,styles:fN})
|
|
11945
|
+
e instanceof IN?(this.severity=e.severity,this.text=e.text,this.visualizationTemplate=e.iconTemplate,this.textHidden=e.textHidden):e instanceof $N?(this.text=e.text,this.visualizationTemplate=e.spinnerTemplate,this.textHidden=e.textHidden):e instanceof EN?(this.text=e.text,this.textHidden=!1):e instanceof DN&&(this.text=e.text,this.textHidden=!0)}resetState(){this.text=void 0,this.textHidden=!1,this.visualizationTemplate=void 0,this.severity=SN.default}}t([C],FN.prototype,"severity",void 0),t([C],FN.prototype,"text",void 0),t([C],FN.prototype,"visualizationTemplate",void 0),t([C],FN.prototype,"textHidden",void 0),t([C],FN.prototype,"hasOverflow",void 0)
|
|
11946
|
+
const NN=FN.compose({baseName:"table-column-mapping-cell-view",template:RN,styles:ON})
|
|
11953
11947
|
_i.getOrCreate().withPrefix("nimble").register(NN())
|
|
11954
|
-
const LN=
|
|
11948
|
+
const LN="icon-size"
|
|
11949
|
+
class BN extends(OF(TF(qF(gN)))){minPixelWidthChanged(){this.widthMode!==LN&&(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:pR,validator:new xN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof Xv){if(!t.resolvedIcon)throw Error("Unresolved icon")
|
|
11950
|
+
return new IN(t.resolvedIcon,t.severity,t.text,t.textHidden)}if(t instanceof Qv)return new $N(t.text,t.textHidden)
|
|
11951
|
+
if(t instanceof eb)return new EN(t.text)
|
|
11952
|
+
if(t instanceof Zv)return new DN(t.text)
|
|
11953
|
+
throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===LN?(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:mR}}t([ft({attribute:"width-mode"})],BN.prototype,"widthMode",void 0)
|
|
11954
|
+
const PN=BN.compose({baseName:"table-column-mapping",template:bN,styles:vN})
|
|
11955
|
+
_i.getOrCreate().withPrefix("nimble").register(PN())
|
|
11956
|
+
const zN=Q`
|
|
11955
11957
|
<template @delegated-event="${(t,e)=>t.onDelegatedEvent(e.event)}"
|
|
11956
11958
|
>${AF}</template
|
|
11957
11959
|
>
|
|
11958
|
-
`,
|
|
11960
|
+
`,VN="menu-button-menu",HN=Q`
|
|
11959
11961
|
${Gt((t=>t.showMenuButton),Q`
|
|
11960
11962
|
<${db}
|
|
11961
11963
|
${Ut("menuButton")}
|
|
@@ -11969,10 +11971,10 @@ const LN=Q`
|
|
|
11969
11971
|
<span ${Ut("valueSpan")} class="value-label">${t=>t.cellRecord.value}</span>
|
|
11970
11972
|
<${pg} slot="end"></${pg}>
|
|
11971
11973
|
|
|
11972
|
-
<slot name="${
|
|
11974
|
+
<slot name="${VN}" slot="menu"></slot>
|
|
11973
11975
|
</${db}>
|
|
11974
11976
|
`)}
|
|
11975
|
-
`,
|
|
11977
|
+
`,UN=Mt`
|
|
11976
11978
|
:host {
|
|
11977
11979
|
align-self: center;
|
|
11978
11980
|
width: 100%;
|
|
@@ -11990,18 +11992,18 @@ const LN=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 qN extends yR{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:VN}]}
|
|
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],qN.prototype,"hasOverflow",void 0),t([k],qN.prototype,"showMenuButton",null)
|
|
11998
|
+
const jN=qN.compose({baseName:"table-column-menu-button-cell-view",template:HN,styles:UN})
|
|
11999
|
+
_i.getOrCreate().withPrefix("nimble").register(jN())
|
|
12000
|
+
class WN extends(TF(_R)){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:[VN],validator:new IF([])}}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"})],WN.prototype,"fieldName",void 0),t([ft({attribute:"menu-slot"})],WN.prototype,"menuSlot",void 0)
|
|
12004
|
+
const GN=WN.compose({baseName:"table-column-menu-button",template:zN,styles:DF})
|
|
12005
|
+
_i.getOrCreate().withPrefix("nimble").register(GN())
|
|
12006
|
+
const ZN=Q`<span
|
|
12005
12007
|
${kg("hasOverflow")}
|
|
12006
12008
|
class="header-content"
|
|
12007
12009
|
title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
|
|
@@ -12009,13 +12011,13 @@ const jN=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 KN=class extends PF{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:zF,styles:VF})
|
|
12015
|
+
_i.getOrCreate().withPrefix("nimble").register(KN())
|
|
12016
|
+
const YN=class extends nN{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??iR}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:tN,styles:eN})
|
|
12017
|
+
_i.getOrCreate().withPrefix("nimble").register(YN())
|
|
12018
|
+
const XN={default:void 0,decimal:"decimal"},JN="left",QN="right"
|
|
12019
|
+
class tL{format(t){if("number"!=typeof t)return""
|
|
12020
|
+
try{return this.tryFormat(t)}catch{return""}}}class eL{constructor(t){this.locale=t.locale,this.intlNumberFormatOptions=t.intlNumberFormatOptions}}class nL extends eL{constructor(t,e){super(t),this.formatter=new Intl.NumberFormat(this.locale,{...e,...this.intlNumberFormatOptions})}static createFactory(t){return e=>new nL(e,t)}format(t){return this.formatter.format(t)}}class iL{constructor(t,e){this.scaleFactor=t,this.scaledUnitFormatFactory=e}isBase(){return 1===this.scaleFactor}}class sL{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 oL=new class extends sL{constructor(){super([new iL(1,nL.createFactory({}))])}},rL="negative"
|
|
12030
|
+
class aL extends tL{constructor(t,{unitScale:e=oL}={unitScale:oL}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:aL.maximumDigits,maximumFractionDigits:aL.maximumDigits-1,roundingPriority:"lessPrecision",signDisplay:rL},this.defaultScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:aL.maximumDigits,notation:"scientific",signDisplay:rL}
|
|
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>=aL.exponentialUpperBound||i<aL.exponentialLowerBound)?this.exponentialScaledUnitFormatter.format(t):this.defaultScaledUnitFormatters.get(n.scaleFactor).format(e)}}aL.maximumDigits=6,aL.exponentialLowerBound=995e-6,aL.exponentialUpperBound=999999.5
|
|
12034
|
+
class lL extends tL{constructor(t,{minimumFractionDigits:e=0,maximumFractionDigits:n=Math.max(3,e),unitScale:i=oL}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:oL}){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 cL extends tL{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===XN.default?new aL(t,{unitScale:o}):new lL(t,"number"==typeof s?{minimumFractionDigits:s,maximumFractionDigits:s,unitScale:o}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:o})}resolveOptions(t){if(!t||t.numberTextFormat===XN.default)return{numberTextFormat:XN.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:t?.unitScale??oL}
|
|
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:XN.decimal,decimalDigits:t.decimalDigits,decimalMaximumDigits:t.decimalMaximumDigits,unitScale:t.unitScale??oL}:{numberTextFormat:XN.decimal,decimalDigits:cL.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:t.unitScale??oL}}}cL.defaultDecimalDigits=2
|
|
12044
|
+
const dL=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
|
|
12045
|
+
class hL extends IF{constructor(){super(dL)}validateDecimalDigits(t,e){const n=!!(t===XN.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
|
|
12046
|
+
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===XN.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
|
|
12047
|
+
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===XN.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 SE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof
|
|
12049
|
+
this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class uL extends We{}t([C],uL.prototype,"resolvedUnitScale",void 0)
|
|
12050
|
+
class pL extends(XF(YF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.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:pR,validator:new hL}}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 SE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof uL))),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(hL())
|
|
12055
|
-
const uL=class extends QF{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:XF,styles:JF})
|
|
12056
|
-
_i.getOrCreate().withPrefix("nimble").register(uL())
|
|
12057
|
-
class pL extends(ZF(GF)){placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:UF,delegatedEvents:[],sortOperation:fR,validator:new IF([])}}}const fL=pL.compose({baseName:"table-column-text",template:AF,styles:DF})
|
|
12054
|
+
return new cL(Ga.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:t})}determineCellContentAlignment(){return this.alignment===JN?iR:this.alignment===QN?sR:this.format!==XN.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?iR:sR}}t([ft],pL.prototype,"format",void 0),t([ft],pL.prototype,"alignment",void 0),t([ft({attribute:"decimal-digits",converter:ut})],pL.prototype,"decimalDigits",void 0),t([ft({attribute:"decimal-maximum-digits",converter:ut})],pL.prototype,"decimalMaximumDigits",void 0),t([C],pL.prototype,"unitElements",void 0),t([C],pL.prototype,"unit",void 0)
|
|
12055
|
+
const fL=pL.compose({baseName:"table-column-number-text",template:ZN,styles:DF})
|
|
12058
12056
|
_i.getOrCreate().withPrefix("nimble").register(fL())
|
|
12059
|
-
const mL=
|
|
12057
|
+
const mL=class extends nN{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:tN,styles:eN})
|
|
12058
|
+
_i.getOrCreate().withPrefix("nimble").register(mL())
|
|
12059
|
+
const gL=["invalidCustomSortWithGrouping"]
|
|
12060
|
+
class vL extends IF{constructor(){super(gL)}}class bL extends(jF(XF(YF))){constructor(){super(...arguments),this.defaultSortOperation=fR}placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:UF,delegatedEvents:[],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new vL}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.updateColumnInternalsSortConfiguration()}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.fieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}const yL=bL.compose({baseName:"table-column-text",template:AF,styles:DF})
|
|
12061
|
+
_i.getOrCreate().withPrefix("nimble").register(yL())
|
|
12062
|
+
const wL=Mt`
|
|
12060
12063
|
${Vs("grid")}
|
|
12061
12064
|
|
|
12062
12065
|
:host {
|
|
@@ -12083,7 +12086,7 @@ const mL=Mt`
|
|
|
12083
12086
|
overflow: auto;
|
|
12084
12087
|
}
|
|
12085
12088
|
`
|
|
12086
|
-
const
|
|
12089
|
+
const xL=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 gL=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:wL})
|
|
12109
|
+
_i.getOrCreate().withPrefix("nimble").register(xL())
|
|
12110
|
+
const CL=Mt`
|
|
12108
12111
|
${Vs("flex")}
|
|
12109
12112
|
|
|
12110
12113
|
:host {
|
|
@@ -12121,15 +12124,15 @@ const vL=Mt`
|
|
|
12121
12124
|
rgba(${rl}, 0.3);
|
|
12122
12125
|
margin: ${Sl} ${_l};
|
|
12123
12126
|
}
|
|
12124
|
-
`,
|
|
12127
|
+
`,kL=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 SL=class extends We{}.compose({baseName:"tabs-toolbar",template:kL,styles:CL})
|
|
12134
|
+
_i.getOrCreate().withPrefix("nimble").register(SL())
|
|
12135
|
+
const _L="outline",IL="block",ML=Mt`
|
|
12133
12136
|
${Vs("inline-flex")}
|
|
12134
12137
|
${yg}
|
|
12135
12138
|
|
|
@@ -12268,12 +12271,12 @@ const wL="outline",xL="block",CL=Mt`
|
|
|
12268
12271
|
top: ${_l};
|
|
12269
12272
|
right: var(--ni-private-scrollbar-width);
|
|
12270
12273
|
}
|
|
12271
|
-
`.withBehaviors(ch(
|
|
12274
|
+
`.withBehaviors(ch(_L,Mt`
|
|
12272
12275
|
.control {
|
|
12273
12276
|
border-color: rgba(${rl}, 0.3);
|
|
12274
12277
|
background-color: transparent;
|
|
12275
12278
|
}
|
|
12276
|
-
`),ch(
|
|
12279
|
+
`),ch(IL,Mt`
|
|
12277
12280
|
.control {
|
|
12278
12281
|
background-color: rgba(${rl}, 0.1);
|
|
12279
12282
|
}
|
|
@@ -12291,8 +12294,8 @@ const wL="outline",xL="block",CL=Mt`
|
|
|
12291
12294
|
border-bottom-color: ${al};
|
|
12292
12295
|
}
|
|
12293
12296
|
`))
|
|
12294
|
-
class
|
|
12295
|
-
const
|
|
12297
|
+
class $L extends gs{constructor(){super(...arguments),this.appearance=_L,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],$L.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],$L.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],$L.prototype,"errorVisible",void 0),t([C],$L.prototype,"scrollbarWidth",void 0)
|
|
12298
|
+
const EL=$L.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
|
|
12296
12299
|
<label
|
|
12297
12300
|
part="label"
|
|
12298
12301
|
for="control"
|
|
@@ -12349,9 +12352,9 @@ const SL=kL.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
|
|
|
12349
12352
|
></${xm}>
|
|
12350
12353
|
${ug}
|
|
12351
12354
|
</div>
|
|
12352
|
-
`,styles:
|
|
12353
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12354
|
-
const
|
|
12355
|
+
`,styles:ML,shadowOptions:{delegatesFocus:!0}})
|
|
12356
|
+
_i.getOrCreate().withPrefix("nimble").register(EL())
|
|
12357
|
+
const DL="underline",AL="outline",TL="block",OL="frameless",RL=Mt`
|
|
12355
12358
|
${Vs("inline-block")}
|
|
12356
12359
|
${yg}
|
|
12357
12360
|
|
|
@@ -12526,12 +12529,12 @@ const _L="underline",IL="outline",ML="block",$L="frameless",EL=Mt`
|
|
|
12526
12529
|
slot[name='actions']::slotted(*) {
|
|
12527
12530
|
${Cl.cssCustomProperty}: 24px;
|
|
12528
12531
|
}
|
|
12529
|
-
`.withBehaviors(ch(
|
|
12532
|
+
`.withBehaviors(ch(DL,Mt`
|
|
12530
12533
|
.root {
|
|
12531
12534
|
border-bottom-width: ${$l};
|
|
12532
12535
|
padding-bottom: 0;
|
|
12533
12536
|
}
|
|
12534
|
-
`),ch(
|
|
12537
|
+
`),ch(TL,Mt`
|
|
12535
12538
|
.root {
|
|
12536
12539
|
background-color: rgba(${rl}, 0.1);
|
|
12537
12540
|
}
|
|
@@ -12559,12 +12562,12 @@ const _L="underline",IL="outline",ML="block",$L="frameless",EL=Mt`
|
|
|
12559
12562
|
:host([disabled]) .root {
|
|
12560
12563
|
background-color: rgba(${rl}, 0.07);
|
|
12561
12564
|
}
|
|
12562
|
-
`),ch(
|
|
12565
|
+
`),ch(AL,Mt`
|
|
12563
12566
|
.root {
|
|
12564
12567
|
border-width: ${$l};
|
|
12565
12568
|
padding: 0;
|
|
12566
12569
|
}
|
|
12567
|
-
`),ch(
|
|
12570
|
+
`),ch(OL,Mt`
|
|
12568
12571
|
.control {
|
|
12569
12572
|
padding-left: ${$l};
|
|
12570
12573
|
padding-right: ${$l};
|
|
@@ -12582,8 +12585,8 @@ const _L="underline",IL="outline",ML="block",$L="frameless",EL=Mt`
|
|
|
12582
12585
|
filter: invert(100%);
|
|
12583
12586
|
}
|
|
12584
12587
|
`))
|
|
12585
|
-
class
|
|
12586
|
-
const
|
|
12588
|
+
class FL extends ji{constructor(){super(...arguments),this.appearance=DL,this.errorVisible=!1,this.fullBleed=!1}}t([ft],FL.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],FL.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],FL.prototype,"errorVisible",void 0),t([ft({attribute:"full-bleed",mode:"boolean"})],FL.prototype,"fullBleed",void 0)
|
|
12589
|
+
const NL=FL.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 AL=DL.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:RL,shadowOptions:{delegatesFocus:!0},end:Q`
|
|
12647
12650
|
<${xm}
|
|
12648
12651
|
severity="error"
|
|
12649
12652
|
class="error-icon"
|
|
@@ -12653,8 +12656,8 @@ const AL=DL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
|
|
|
12653
12656
|
</span>
|
|
12654
12657
|
${ug}
|
|
12655
12658
|
`})
|
|
12656
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12657
|
-
const
|
|
12659
|
+
_i.getOrCreate().withPrefix("nimble").register(NL())
|
|
12660
|
+
const LL=Mt`
|
|
12658
12661
|
${Vs("inline-flex")}
|
|
12659
12662
|
|
|
12660
12663
|
:host {
|
|
@@ -12738,7 +12741,7 @@ const TL=Mt`
|
|
|
12738
12741
|
.status-icon {
|
|
12739
12742
|
opacity: 0.6;
|
|
12740
12743
|
}
|
|
12741
|
-
`)),
|
|
12744
|
+
`)),BL=Q`
|
|
12742
12745
|
${Gt((t=>t.tooltipVisible),Q`
|
|
12743
12746
|
<${Oh}
|
|
12744
12747
|
class="anchored-region"
|
|
@@ -12771,11 +12774,11 @@ const TL=Mt`
|
|
|
12771
12774
|
</${Oh}>
|
|
12772
12775
|
`)}
|
|
12773
12776
|
`
|
|
12774
|
-
class
|
|
12775
|
-
const
|
|
12776
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12777
|
-
const
|
|
12778
|
-
class
|
|
12777
|
+
class PL extends Rs{constructor(){super(...arguments),this.iconVisible=!1}}t([ft],PL.prototype,"severity",void 0),t([ft({attribute:"icon-visible",mode:"boolean"})],PL.prototype,"iconVisible",void 0)
|
|
12778
|
+
const zL=PL.compose({baseName:"tooltip",baseClass:Rs,template:BL,styles:LL})
|
|
12779
|
+
_i.getOrCreate().withPrefix("nimble").register(zL())
|
|
12780
|
+
const VL="group-selected",HL="all",UL="leaves-only",qL="none"
|
|
12781
|
+
class jL{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 WL=Mt`
|
|
12779
12782
|
${Vs("block")}
|
|
12780
12783
|
|
|
12781
12784
|
:host {
|
|
@@ -12796,7 +12799,7 @@ class zL{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([${VL}])::after {
|
|
12800
12803
|
background: ${hl};
|
|
12801
12804
|
border-radius: 0px;
|
|
12802
12805
|
content: '';
|
|
@@ -12817,7 +12820,7 @@ class zL{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12817
12820
|
background: ${sl};
|
|
12818
12821
|
}
|
|
12819
12822
|
|
|
12820
|
-
:host([${
|
|
12823
|
+
:host([${VL}]) .positioning-region:hover {
|
|
12821
12824
|
background: ${il};
|
|
12822
12825
|
}
|
|
12823
12826
|
|
|
@@ -12923,7 +12926,7 @@ class zL{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&&Za.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new
|
|
12929
|
+
e&&Za.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new jL(this.ltr,this.rtl,t),n=Za.getValueFor(t)
|
|
12927
12930
|
Za.subscribe(e),e.attach(n),this.cache.set(t,e)}}(Mt`
|
|
12928
12931
|
.expand-collapse-button {
|
|
12929
12932
|
left: var(
|
|
@@ -12955,8 +12958,8 @@ Za.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 GL extends Ns{constructor(){super(...arguments),this.groupSelected=!1}}t([ft({attribute:"group-selected",mode:"boolean"})],GL.prototype,"groupSelected",void 0)
|
|
12962
|
+
const ZL=GL.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 UL=HL.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:WL,expandCollapseGlyph:Kh.data})
|
|
13003
|
+
_i.getOrCreate().withPrefix("nimble").register(ZL())
|
|
13004
|
+
const KL=Mt`
|
|
13002
13005
|
${Vs("flex")}
|
|
13003
13006
|
|
|
13004
13007
|
:host {
|
|
@@ -13010,7 +13013,7 @@ const qL=Mt`
|
|
|
13010
13013
|
:host(${Hs}) {
|
|
13011
13014
|
outline: none;
|
|
13012
13015
|
}
|
|
13013
|
-
`,
|
|
13016
|
+
`,YL=Q`
|
|
13014
13017
|
<template
|
|
13015
13018
|
role="tree"
|
|
13016
13019
|
${Ut("treeView")}
|
|
@@ -13024,248 +13027,248 @@ const qL=Mt`
|
|
|
13024
13027
|
<slot ${ie("slottedTreeItems")}></slot>
|
|
13025
13028
|
</template>
|
|
13026
13029
|
`
|
|
13027
|
-
class
|
|
13030
|
+
class XL extends Ls{constructor(){super(...arguments),this.selectionMode=HL,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 HL:return!0
|
|
13034
|
+
case qL:return!1
|
|
13035
|
+
case UL: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 GL&&(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 GL&&(t.groupSelected=!0)}}}t([ft({attribute:"selection-mode"})],XL.prototype,"selectionMode",void 0),t([C],XL.prototype,"selectedItems",void 0)
|
|
13039
|
+
const JL=XL.compose({baseName:"tree-view",baseClass:Ls,template:YL,styles:KL})
|
|
13040
|
+
_i.getOrCreate().withPrefix("nimble").register(JL())
|
|
13041
|
+
const QL=Q`<template slot="unit"></template>`
|
|
13042
|
+
class tB{constructor(t,e,n){this.singular=t,this.plural=e,this.symbol=n}}class eB extends eL{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 eB(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 nB=new Map([["en",new tB("byte","bytes","B")],["fr",new tB("octet","octets","o")],["de",new tB("Byte","Byte","B")],["ja",new tB("バイト","バイト","B")],["zh",new tB("字节","字节","B")]]),iB=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
|
|
13047
|
+
const sB=new class extends sL{constructor(){super(iB.map((([t,e])=>new iL(t,eB.createFactory({unitTranslations:nB,scaledPrefixText:e})))))}},oB=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
|
|
13048
|
+
const rB=new class extends sL{constructor(){super(oB.map((([t,e,n])=>new iL(t,nL.createFactory({style:"unit",unit:e,unitDisplay:n})))))}},aB=Mt`
|
|
13046
13049
|
${Vs("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 lB extends uL{constructor(){super(),this.binary=!1,this.resolvedUnitScale=rB}binaryChanged(){this.resolvedUnitScale=this.binary?sB:rB}}t([ft({mode:"boolean"})],lB.prototype,"binary",void 0)
|
|
13052
|
+
const cB=lB.compose({baseName:"unit-byte",template:QL,styles:aB})
|
|
13053
|
+
_i.getOrCreate().withPrefix("nimble").register(cB())
|
|
13054
|
+
const dB=[[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"]],hB=new Map([["en",new tB("volt","volts","V")],["fr",new tB("volt","volts","V")],["de",new tB("Volt","Volt","V")],["ja",new tB("ボルト","ボルト","V")],["zh",new tB("伏特","伏特","V")]])
|
|
13055
|
+
const uB=new class extends sL{constructor(){super(dB.map((([t,e])=>new iL(t,eB.createFactory({unitTranslations:hB,scaledPrefixText:e})))))}}
|
|
13056
|
+
const pB=class extends uL{constructor(){super(),this.resolvedUnitScale=uB}}.compose({baseName:"unit-volt",template:QL,styles:aB})
|
|
13057
|
+
_i.getOrCreate().withPrefix("nimble").register(pB())
|
|
13058
|
+
var fB={value:()=>{}}
|
|
13059
|
+
function mB(){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 gB(i)}function gB(t){this._=t}function vB(t,e){for(var n,i=0,s=t.length;i<s;++i)if((n=t[i]).name===e)return n.value}function bB(t,e,n){for(var i=0,s=t.length;i<s;++i)if(t[i].name===e){t[i]=fB,t=t.slice(0,i).concat(t.slice(i+1))
|
|
13061
|
+
break}return null!=n&&t.push({name:e,value:n}),t}gB.prototype=mB.prototype={constructor:gB,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]=bB(s[n],t.name,e)
|
|
13066
|
+
else if(null==e)for(n in s)s[n]=bB(s[n],t.name,null)
|
|
13067
|
+
return this}for(;++r<a;)if((n=(t=o[r]).type)&&(n=vB(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 gB(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 yB="http://www.w3.org/1999/xhtml",wB={svg:"http://www.w3.org/2000/svg",xhtml:yB,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
13074
|
+
function xB(t){var e=t+="",n=e.indexOf(":")
|
|
13075
|
+
return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),wB.hasOwnProperty(e)?{space:wB[e],local:t}:t}function CB(t){return function(){var e=this.ownerDocument,n=this.namespaceURI
|
|
13076
|
+
return n===yB&&e.documentElement.namespaceURI===yB?e.createElement(t):e.createElementNS(n,t)}}function kB(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function SB(t){var e=xB(t)
|
|
13077
|
+
return(e.local?kB:CB)(e)}function _B(){}function IB(t){return null==t?_B:function(){return this.querySelector(t)}}function MB(){return[]}function $B(t){return null==t?MB:function(){return this.querySelectorAll(t)}}function EB(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e)
|
|
13078
|
+
var e}}function DB(t){return function(){return this.matches(t)}}function AB(t){return function(e){return e.matches(t)}}var TB=Array.prototype.find
|
|
13079
|
+
function OB(){return this.firstElementChild}var RB=Array.prototype.filter
|
|
13080
|
+
function FB(){return Array.from(this.children)}function NB(t){return new Array(t.length)}function LB(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function BB(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 LB(t,o[a])
|
|
13081
|
+
for(;a<l;++a)(r=e[a])&&(s[a]=r)}function PB(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 LB(t,o[a])
|
|
13084
|
+
for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(s[a]=l)}function zB(t){return t.__data__}function VB(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function HB(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function UB(t){return function(){this.removeAttribute(t)}}function qB(t){return function(){this.removeAttributeNS(t.space,t.local)}}function jB(t,e){return function(){this.setAttribute(t,e)}}function WB(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function GB(t,e){return function(){var n=e.apply(this,arguments)
|
|
13085
|
+
null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ZB(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 KB(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function YB(t){return function(){this.style.removeProperty(t)}}function XB(t,e,n){return function(){this.style.setProperty(t,e,n)}}function JB(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 QB(t,e){return t.style.getPropertyValue(e)||KB(t).getComputedStyle(t,null).getPropertyValue(e)}function tP(t){return function(){delete this[t]}}function eP(t,e){return function(){this[t]=e}}function nP(t,e){return function(){var n=e.apply(this,arguments)
|
|
13088
|
+
null==n?delete this[t]:this[t]=n}}function iP(t){return t.trim().split(/^|\s+/)}function sP(t){return t.classList||new oP(t)}function oP(t){this._node=t,this._names=iP(t.getAttribute("class")||"")}function rP(t,e){for(var n=sP(t),i=-1,s=e.length;++i<s;)n.add(e[i])}function aP(t,e){for(var n=sP(t),i=-1,s=e.length;++i<s;)n.remove(e[i])}function lP(t){return function(){rP(this,t)}}function cP(t){return function(){aP(this,t)}}function dP(t,e){return function(){(e.apply(this,arguments)?rP:aP)(this,t)}}function hP(){this.textContent=""}function uP(t){return function(){this.textContent=t}}function pP(t){return function(){var e=t.apply(this,arguments)
|
|
13089
|
+
this.textContent=null==e?"":e}}function fP(){this.innerHTML=""}function mP(t){return function(){this.innerHTML=t}}function gP(t){return function(){var e=t.apply(this,arguments)
|
|
13090
|
+
this.innerHTML=null==e?"":e}}function vP(){this.nextSibling&&this.parentNode.appendChild(this)}function bP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yP(){return null}function wP(){var t=this.parentNode
|
|
13091
|
+
t&&t.removeChild(this)}function xP(){var t=this.cloneNode(!1),e=this.parentNode
|
|
13092
|
+
return e?e.insertBefore(t,this.nextSibling):t}function CP(){var t=this.cloneNode(!0),e=this.parentNode
|
|
13093
|
+
return e?e.insertBefore(t,this.nextSibling):t}function kP(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 SP(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 _P(t,e,n){var i=KB(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 IP(t,e){return function(){return _P(this,t,e)}}function MP(t,e){return function(){return _P(this,t,e.apply(this,arguments))}}LB.prototype={constructor:LB,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)}},oP.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 $P=[null]
|
|
13100
|
+
function EP(t,e){this._groups=t,this._parents=e}function DP(){return new EP([[document.documentElement]],$P)}function AP(t){return"string"==typeof t?new EP([[document.querySelector(t)]],[document.documentElement]):new EP([[t]],$P)}function TP(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]}EP.prototype=DP.prototype={constructor:EP,select:function(t){"function"!=typeof t&&(t=IB(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 EP(i,this._parents)},selectAll:function(t){t="function"==typeof t?EB(t):$B(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 EP(i,s)},selectChild:function(t){return this.select(null==t?OB:function(t){return function(){return TB.call(this.children,t)}}("function"==typeof t?t:AB(t)))},selectChildren:function(t){return this.selectAll(null==t?FB:function(t){return function(){return RB.call(this.children,t)}}("function"==typeof t?t:AB(t)))},filter:function(t){"function"!=typeof t&&(t=DB(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 EP(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,zB)
|
|
13112
|
+
var n,i=e?PB:BB,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=VB(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 EP(a,s))._enter=l,a._exit=c,a},enter:function(){return new EP(this._enter||this._groups.map(NB),this._parents)},exit:function(){return new EP(this._exit||this._groups.map(NB),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 EP(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=HB)
|
|
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 EP(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=xB(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?qB:UB:"function"==typeof e?n.local?ZB:GB:n.local?WB:jB)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?YB:"function"==typeof e?JB:XB)(t,e,null==n?"":n)):QB(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?tP:"function"==typeof e?nP:eP)(t,e)):this.node()[t]},classed:function(t,e){var n=iP(t+"")
|
|
13130
|
+
if(arguments.length<2){for(var i=sP(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?dP:e?lP:cP)(n,e))},text:function(t){return arguments.length?this.each(null==t?hP:("function"==typeof t?pP:uP)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?fP:("function"==typeof t?gP:mP)(t)):this.node().innerHTML},raise:function(){return this.each(vP)},lower:function(){return this.each(bP)},append:function(t){var e="function"==typeof t?t:SB(t)
|
|
13132
|
+
return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:SB(t),i=null==e?yP:"function"==typeof e?e:IB(e)
|
|
13133
|
+
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(wP)},clone:function(t){return this.select(t?CP:xP)},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?SP:kP,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?MP:IP)(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 OP={capture:!0,passive:!1}
|
|
13139
|
+
function RP(t){t.preventDefault(),t.stopImmediatePropagation()}function FP(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function NP(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 LP(){}var BP=.7,PP=1/BP,zP="\\s*([+-]?\\d+)\\s*",VP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",HP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",UP=/^#([0-9a-f]{3,8})$/,qP=new RegExp(`^rgb\\(${zP},${zP},${zP}\\)$`),jP=new RegExp(`^rgb\\(${HP},${HP},${HP}\\)$`),WP=new RegExp(`^rgba\\(${zP},${zP},${zP},${VP}\\)$`),GP=new RegExp(`^rgba\\(${HP},${HP},${HP},${VP}\\)$`),ZP=new RegExp(`^hsl\\(${VP},${HP},${HP}\\)$`),KP=new RegExp(`^hsla\\(${VP},${HP},${HP},${VP}\\)$`),YP={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 XP(){return this.rgb().formatHex()}function JP(){return this.rgb().formatRgb()}function QP(t){var e,n
|
|
13143
|
+
return t=(t+"").trim().toLowerCase(),(e=UP.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tz(e):3===n?new iz(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ez(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ez(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=qP.exec(t))?new iz(e[1],e[2],e[3],1):(e=jP.exec(t))?new iz(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=WP.exec(t))?ez(e[1],e[2],e[3],e[4]):(e=GP.exec(t))?ez(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ZP.exec(t))?cz(e[1],e[2]/100,e[3]/100,1):(e=KP.exec(t))?cz(e[1],e[2]/100,e[3]/100,e[4]):YP.hasOwnProperty(t)?tz(YP[t]):"transparent"===t?new iz(NaN,NaN,NaN,0):null}function tz(t){return new iz(t>>16&255,t>>8&255,255&t,1)}function ez(t,e,n,i){return i<=0&&(t=e=n=NaN),new iz(t,e,n,i)}function nz(t,e,n,i){return 1===arguments.length?((s=t)instanceof LP||(s=QP(s)),s?new iz((s=s.rgb()).r,s.g,s.b,s.opacity):new iz):new iz(t,e,n,null==i?1:i)
|
|
13144
|
+
var s}function iz(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function sz(){return`#${lz(this.r)}${lz(this.g)}${lz(this.b)}`}function oz(){const t=rz(this.opacity)
|
|
13145
|
+
return`${1===t?"rgb(":"rgba("}${az(this.r)}, ${az(this.g)}, ${az(this.b)}${1===t?")":`, ${t})`}`}function rz(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function az(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function lz(t){return((t=az(t))<16?"0":"")+t.toString(16)}function cz(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new hz(t,e,n,i)}function dz(t){if(t instanceof hz)return new hz(t.h,t.s,t.l,t.opacity)
|
|
13146
|
+
if(t instanceof LP||(t=QP(t)),!t)return new hz
|
|
13147
|
+
if(t instanceof hz)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 hz(r,a,l,t.opacity)}function hz(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function uz(t){return(t=(t||0)%360)<0?t+360:t}function pz(t){return Math.max(0,Math.min(1,t||0))}function fz(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}FP(LP,QP,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:XP,formatHex:XP,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return dz(this).formatHsl()},formatRgb:JP,toString:JP}),FP(iz,nz,NP(LP,{brighter(t){return t=null==t?PP:Math.pow(PP,t),new iz(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?BP:Math.pow(BP,t),new iz(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new iz(az(this.r),az(this.g),az(this.b),rz(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:sz,formatHex:sz,formatHex8:function(){return`#${lz(this.r)}${lz(this.g)}${lz(this.b)}${lz(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:oz,toString:oz})),FP(hz,(function(t,e,n,i){return 1===arguments.length?dz(t):new hz(t,e,n,null==i?1:i)}),NP(LP,{brighter(t){return t=null==t?PP:Math.pow(PP,t),new hz(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?BP:Math.pow(BP,t),new hz(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 iz(fz(t>=240?t-240:t+120,s,i),fz(t,s,i),fz(t<120?t+240:t-120,s,i),this.opacity)},clamp(){return new hz(uz(this.h),pz(this.s),pz(this.l),rz(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=rz(this.opacity)
|
|
13151
|
+
return`${1===t?"hsl(":"hsla("}${uz(this.h)}, ${100*pz(this.s)}%, ${100*pz(this.l)}%${1===t?")":`, ${t})`}`}}))
|
|
13152
|
+
var mz=t=>()=>t
|
|
13153
|
+
function gz(t){return 1==(t=+t)?vz:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):mz(isNaN(e)?n:e)}}function vz(t,e){var n=e-t
|
|
13154
|
+
return n?function(t,e){return function(n){return t+n*e}}(t,n):mz(isNaN(t)?e:t)}var bz=function t(e){var n=gz(e)
|
|
13155
|
+
function i(t,e){var i=n((t=nz(t)).r,(e=nz(e)).r),s=n(t.g,e.g),o=n(t.b,e.b),r=vz(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 yz(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 wz(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]=Mz(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 xz(t,e){var n=new Date
|
|
13165
|
+
return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Cz(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function kz(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]=Mz(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 Sz=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_z=new RegExp(Sz.source,"g")
|
|
13169
|
+
function Iz(t,e){var n,i,s,o=Sz.lastIndex=_z.lastIndex=0,r=-1,a=[],l=[]
|
|
13170
|
+
for(t+="",e+="";(n=Sz.exec(t))&&(i=_z.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:Cz(n,i)})),o=_z.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 Mz(t,e){var n,i,s=typeof e
|
|
13173
|
+
return null==e||"boolean"===s?mz(e):("number"===s?Cz:"string"===s?(n=QP(e))?(e=n,bz):Iz:e instanceof QP?bz:e instanceof Date?xz:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?wz:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?kz:Cz:yz))(t,e)}function $z(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ez,Dz=180/Math.PI,Az={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
13174
|
+
function Tz(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)*Dz,skewX:Math.atan(l)*Dz,scaleX:r,scaleY:a}}function Oz(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:Cz(t,s)},{i:l-2,x:Cz(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:Cz(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:Cz(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:Cz(t,n)},{i:a-2,x:Cz(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 Rz=Oz((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")
|
|
13180
|
+
return e.isIdentity?Az:Tz(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Fz=Oz((function(t){return null==t?Az:(Ez||(Ez=document.createElementNS("http://www.w3.org/2000/svg","g")),Ez.setAttribute("transform",t),(t=Ez.transform.baseVal.consolidate())?Tz((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Az)}),", ",")",")")
|
|
13181
|
+
function Nz(t){return((t=Math.exp(t))+1/t)/2}var Lz,Bz,Pz=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=Nz(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/Nz(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),zz=0,Vz=0,Hz=0,Uz=1e3,qz=0,jz=0,Wz=0,Gz="object"==typeof performance&&performance.now?performance:Date,Zz="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)}
|
|
13187
|
+
function Kz(){return jz||(Zz(Yz),jz=Gz.now()+Wz)}function Yz(){jz=0}function Xz(){this._call=this._time=this._next=null}function Jz(t,e,n){var i=new Xz
|
|
13188
|
+
return i.restart(t,e,n),i}function Qz(){jz=(qz=Gz.now())+Wz,zz=Vz=0
|
|
13189
|
+
try{!function(){Kz(),++zz
|
|
13190
|
+
for(var t,e=Lz;e;)(t=jz-e._time)>=0&&e._call.call(void 0,t),e=e._next;--zz}()}finally{zz=0,function(){var t,e,n=Lz,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:Lz=e)
|
|
13192
|
+
Bz=t,eV(i)}(),jz=0}}function tV(){var t=Gz.now(),e=t-qz
|
|
13193
|
+
e>Uz&&(Wz-=e,qz=t)}function eV(t){zz||(Vz&&(Vz=clearTimeout(Vz)),t-jz>24?(t<1/0&&(Vz=setTimeout(Qz,t-Gz.now()-Wz)),Hz&&(Hz=clearInterval(Hz))):(Hz||(qz=Gz.now(),Hz=setInterval(tV,Uz)),zz=1,Zz(Qz)))}function nV(t,e,n){var i=new Xz
|
|
13194
|
+
return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}Xz.prototype=Jz.prototype={constructor:Xz,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function")
|
|
13195
|
+
n=(null==n?Kz():+n)+(null==e?0:+e),this._next||Bz===this||(Bz?Bz._next=this:Lz=this,Bz=this),this._call=t,this._time=n,eV()},stop:function(){this._call&&(this._call=null,this._time=1/0,eV())}}
|
|
13196
|
+
var iV=mB("start","end","cancel","interrupt"),sV=[],oV=0,rV=1,aV=2,lV=3,cV=4,dV=5,hV=6
|
|
13197
|
+
function uV(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=rV,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!==rV)return l()
|
|
13202
|
+
for(c in s)if((u=s[c]).name===n.name){if(u.state===lV)return nV(r)
|
|
13203
|
+
u.state===cV?(u.state=hV,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete s[c]):+c<e&&(u.state=hV,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete s[c])}if(nV((function(){n.state===lV&&(n.state=cV,n.timer.restart(a,n.delay,n.time),a(o))})),n.state=aV,n.on.call("start",t,t.__data__,n.index,n.group),n.state===aV){for(n.state=lV,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=dV,1),o=-1,r=i.length;++o<r;)i[o].call(t,s)
|
|
13205
|
+
n.state===dV&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=hV,n.timer.stop(),delete s[e],s)return
|
|
13206
|
+
delete t.__transition}s[e]=n,n.timer=Jz(o,0,n.time)}(t,n,{name:e,index:i,group:s,on:iV,tween:sV,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:oV})}function pV(t,e){var n=mV(t,e)
|
|
13207
|
+
if(n.state>oV)throw new Error("too late; already scheduled")
|
|
13208
|
+
return n}function fV(t,e){var n=mV(t,e)
|
|
13209
|
+
if(n.state>lV)throw new Error("too late; already running")
|
|
13210
|
+
return n}function mV(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 gV(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>aV&&n.state<dV,n.state=hV,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 vV(t,e){var n,i
|
|
13215
|
+
return function(){var s=fV(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 bV(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=fV(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 yV(t,e,n){var i=t._id
|
|
13223
|
+
return t.each((function(){var t=fV(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return mV(t,i).value[e]}}function wV(t,e){var n
|
|
13224
|
+
return("number"==typeof e?Cz:e instanceof QP?bz:(n=QP(e))?(e=n,bz):Iz)(t,e)}function xV(t){return function(){this.removeAttribute(t)}}function CV(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kV(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 SV(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 _V(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 IV(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 MV(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 $V(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 EV(t,e){return function(){pV(this,t).delay=+e.apply(this,arguments)}}function DV(t,e){return e=+e,function(){pV(this,t).delay=e}}function AV(t,e){return function(){fV(this,t).duration=+e.apply(this,arguments)}}function TV(t,e){return e=+e,function(){fV(this,t).duration=e}}var OV=DP.prototype.constructor
|
|
13239
|
+
function RV(t){return function(){this.style.removeProperty(t)}}var FV=0
|
|
13240
|
+
function NV(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function LV(){return++FV}var BV=DP.prototype
|
|
13241
|
+
NV.prototype={constructor:NV,select:function(t){var e=this._name,n=this._id
|
|
13242
|
+
"function"!=typeof t&&(t=IB(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,uV(h[u],e,n,u,h,mV(a,n)))
|
|
13244
|
+
return new NV(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id
|
|
13245
|
+
"function"!=typeof t&&(t=$B(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=mV(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&uV(u,e,n,m,p,f)
|
|
13247
|
+
o.push(p),r.push(l)}return new NV(o,r,e,n)},selectChild:BV.selectChild,selectChildren:BV.selectChildren,filter:function(t){"function"!=typeof t&&(t=DB(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 NV(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 NV(r,this._parents,this._name,this._id)},selection:function(){return new OV(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=LV(),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=mV(r,e)
|
|
13253
|
+
uV(r,t,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new NV(i,this._parents,t,n)},call:BV.call,nodes:BV.nodes,node:BV.node,size:BV.size,empty:BV.empty,each:BV.each,on:function(t,e){var n=this._id
|
|
13254
|
+
return arguments.length<2?mV(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)?pV:fV
|
|
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=xB(t),i="transform"===n?Fz:wV
|
|
13258
|
+
return this.attrTween(t,"function"==typeof e?(n.local?IV:_V)(n,i,yV(this,"attr."+t,e)):null==e?(n.local?CV:xV)(n):(n.local?SV:kV)(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=xB(t)
|
|
13263
|
+
return this.tween(n,(i.local?MV:$V)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Rz:wV
|
|
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=QB(this,t),r=(this.style.removeProperty(t),QB(this,t))
|
|
13266
|
+
return o===r?null:o===n&&r===i?s:s=e(n=o,i=r)}}(t,i)).on("end.style."+t,RV(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,s,o
|
|
13267
|
+
return function(){var r=QB(this,t),a=n(this),l=a+""
|
|
13268
|
+
return null==a&&(this.style.removeProperty(t),l=a=QB(this,t)),r===l?null:r===i&&l===s?o:(s=l,o=e(i=r,a))}}(t,i,yV(this,"style."+t,e))).each(function(t,e){var n,i,s,o,r="style."+e,a="end."+r
|
|
13269
|
+
return function(){var l=fV(this,t),c=l.on,d=null==l.value[r]?o||(o=RV(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=QB(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}}(yV(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=mV(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?vV:bV)(n,t,e))},delay:function(t){var e=this._id
|
|
13290
|
+
return arguments.length?this.each(("function"==typeof t?EV:DV)(e,t)):mV(this.node(),e).delay},duration:function(t){var e=this._id
|
|
13291
|
+
return arguments.length?this.each(("function"==typeof t?AV:TV)(e,t)):mV(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(){fV(this,t).ease=e}}(e,t)):mV(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
|
+
fV(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=fV(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]:BV[Symbol.iterator]}
|
|
13300
|
+
var PV={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}}
|
|
13301
|
+
function zV(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}DP.prototype.interrupt=function(t){return this.each((function(){gV(this,t)}))},DP.prototype.transition=function(t){var e,n
|
|
13303
|
+
t instanceof NV?(e=t._id,t=t._name):(e=LV(),(n=PV).time=Kz(),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])&&uV(r,t,e,c,a,n||zV(r,e))
|
|
13305
|
+
return new NV(i,this._parents,t,e)}
|
|
13306
|
+
var VV=t=>()=>t
|
|
13307
|
+
function HV(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 UV(t,e,n){this.k=t,this.x=e,this.y=n}UV.prototype={constructor:UV,scale:function(t){return 1===t?this:new UV(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new UV(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 qV=new UV(1,0,0)
|
|
13309
|
+
function jV(t){t.stopImmediatePropagation()}function WV(t){t.preventDefault(),t.stopImmediatePropagation()}function GV(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function ZV(){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 KV(){return this.__zoom||qV}function YV(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function XV(){return navigator.maxTouchPoints||"ontouchstart"in this}function JV(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 QV(){var t,e,n,i=GV,s=ZV,o=JV,r=YV,a=XV,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=Pz,u=mB("start","zoom","end"),p=500,f=150,m=0,g=10
|
|
13312
|
+
function v(t){t.property("__zoom",KV).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 UV(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 UV(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 UV(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=TP(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)],gV(this),n.start()}WV(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=AP(t.view).on("mousemove.zoom",(function(t){if(WV(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]=TP(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=AP(t).on("dragstart.drag",null)
|
|
13321
|
+
e&&(i.on("click.drag",RP,OP),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),WV(t),r.event(t).end()}),!0),l=TP(t,s),d=t.clientX,h=t.clientY
|
|
13322
|
+
!function(t){var e=t.document.documentElement,n=AP(t).on("dragstart.drag",RP,OP)
|
|
13323
|
+
"onselectstart"in e?n.on("selectstart.drag",RP,OP):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),jV(t),r.mouse=[l,this.__zoom.invert(l)],gV(this),r.start()}}function I(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,r=TP(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
|
+
WV(t),d>0?AP(this).transition().duration(d).call(x,h,r,t):AP(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(jV(n),r=0;r<d;++r)l=[l=TP(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)),gV(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(WV(t),n=0;n<d;++n)s=TP(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(jV(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=TP(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<g)){var c=AP(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",KV),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(qV.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=AP(this.that).datum()
|
|
13338
|
+
u.call(t,this.that,new HV(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:VV(+t),v):r},v.filter=function(t){return arguments.length?(i="function"==typeof t?t:VV(!!t),v):i},v.touchable=function(t){return arguments.length?(a="function"==typeof t?t:VV(!!t),v):a},v.extent=function(t){return arguments.length?(s="function"==typeof t?t:VV([[+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}UV.prototype
|
|
13340
|
+
const tH=new TextDecoder("utf-8"),eH=t=>tH.decode(t),nH=new TextEncoder,iH=t=>nH.encode(t),sH=t=>"function"==typeof t,oH=t=>null!=t&&Object(t)===t,rH=t=>oH(t)&&sH(t.then),aH=t=>oH(t)&&sH(t[Symbol.iterator]),lH=t=>oH(t)&&sH(t[Symbol.asyncIterator]),cH=t=>oH(t)&&oH(t.schema),dH=t=>oH(t)&&"done"in t&&"value"in t,hH=t=>oH(t)&&sH(t.stat)&&(t=>"number"==typeof t)(t.fd),uH=t=>oH(t)&&fH(t.body),pH=t=>"_getDOMStream"in t&&"_getNodeStream"in t,fH=t=>oH(t)&&sH(t.cancel)&&sH(t.getReader)&&!pH(t),mH=t=>oH(t)&&sH(t.read)&&sH(t.pipe)&&(t=>"boolean"==typeof t)(t.readable)&&!pH(t),gH=t=>oH(t)&&sH(t.clear)&&sH(t.bytes)&&sH(t.position)&&sH(t.setPosition)&&sH(t.capacity)&&sH(t.getBufferIdentifier)&&sH(t.createLong),vH="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer
|
|
13341
|
+
function bH(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 yH(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?bH(r,o,a):r=o
|
|
13349
|
+
break}bH(r||(r=new Uint8Array(c)),o,a),a+=o.length}return[r||new Uint8Array(0),n.slice(l),i-(r?r.byteLength:0)]}function wH(t,e){let n=dH(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=iH(n)),n instanceof ArrayBuffer||n instanceof vH?new t(n):gH(n)?wH(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 xH=t=>wH(Int32Array,t),CH=t=>wH(BigInt64Array,t),kH=t=>wH(Uint8Array,t),SH=t=>(t.next(),t)
|
|
13351
|
+
const _H=t=>function*(t,e){const n=function*(t){yield t},i="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof vH?n(e):aH(e)?e:n(e)
|
|
13352
|
+
return yield*SH(function*(e){let n=null
|
|
13353
|
+
do{n=e.next(yield wH(t,n))}while(!n.done)}(i[Symbol.iterator]())),new t}(Uint8Array,t)
|
|
13354
|
+
function IH(t,e){return s(this,arguments,(function*(){if(rH(e))return yield i(yield i(yield*o(r(IH(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 vH?n(e):aH(e)?function(t){return s(this,arguments,(function*(){yield i(yield*o(r(SH(function*(t){let e=null
|
|
13356
|
+
do{e=t.next(yield null==e?void 0:e.value)}while(!e.done)}(t[Symbol.iterator]())))))}))}(e):lH(e)?e:n(e)
|
|
13357
|
+
return yield i(yield*o(r(SH(function(e){return s(this,arguments,(function*(){let n=null
|
|
13358
|
+
do{n=yield i(e.next(yield yield i(wH(t,n))))}while(!n.done)}))}(a[Symbol.asyncIterator]()))))),yield i(new t)}))}const MH=t=>IH(Uint8Array,t)
|
|
13359
|
+
var $H={fromIterable:t=>EH(function*(t){let e,n,i,s,o=!1,r=[],a=0
|
|
13360
|
+
function l(){return"peek"===i?yH(r,s)[0]:([n,r,a]=yH(r,s),n)}({cmd:i,size:s}=(yield null)||{cmd:"read",size:0})
|
|
13361
|
+
const c=_H(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=>EH(function(t){return s(this,arguments,(function*(){let e,n,s,o,r=!1,a=[],l=0
|
|
13363
|
+
function c(){return"peek"===s?yH(a,o)[0]:([n,a,l]=yH(a,o),n)}({cmd:s,size:o}=(yield yield i(null))||{cmd:"read",size:0})
|
|
13364
|
+
const d=MH(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=>EH(function(t){return s(this,arguments,(function*(){let e,n,s,o=!1,r=!1,a=[],l=0
|
|
13366
|
+
function c(){return"peek"===n?yH(a,s)[0]:([e,a,l]=yH(a,s),e)}({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0})
|
|
13367
|
+
const d=new DH(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(kH(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=>EH(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?yH(d,s)[0]:([o,d,c]=yH(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]=AH(t,"end"),e[1]=AH(t,"error")
|
|
13372
|
+
do{if(e[2]=AH(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=kH(t.read(s-c)),o.byteLength<s-c&&(o=kH(t.read()))):o=kH(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 EH=t=>(t.next(),t)
|
|
13378
|
+
class DH{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=kH(e)),e}))}}const AH=(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 TH,OH,RH,FH,NH,LH
|
|
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"}(TH||(TH={})),function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"}(OH||(OH={})),function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"}(RH||(RH={})),function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"}(FH||(FH={})),function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"}(NH||(NH={})),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"}(LH||(LH={}))
|
|
13386
|
+
const BH=new Int32Array(2),PH=new Float32Array(BH.buffer),zH=new Float64Array(BH.buffer),VH=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0]
|
|
13387
|
+
var HH
|
|
13388
|
+
!function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"}(HH||(HH={}))
|
|
13389
|
+
let UH=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 BH[0]=this.readInt32(t),PH[0]}readFloat64(t){return BH[VH?0:1]=this.readInt32(t),BH[VH?1:0]=this.readInt32(t+4),zH[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){PH[0]=e,this.writeInt32(t,BH[0])}writeFloat64(t,e){zH[0]=e,this.writeInt32(t,BH[VH?0:1]),this.writeInt32(t+4,BH[VH?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===HH.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}},qH=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=UH.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=UH.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 jH,WH
|
|
13440
|
+
!function(t){t[t.BUFFER=0]="BUFFER"}(jH||(jH={})),function(t){t[t.LZ4_FRAME=0]="LZ4_FRAME",t[t.ZSTD=1]="ZSTD"}(WH||(WH={}))
|
|
13441
|
+
class GH{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 GH).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBodyCompression(t,e){return t.setPosition(t.position()+4),(e||new GH).__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):WH.LZ4_FRAME}method(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13443
|
+
return t?this.bb.readInt8(this.bb_pos+t):jH.BUFFER}static startBodyCompression(t){t.startObject(2)}static addCodec(t,e){t.addFieldInt8(0,e,WH.LZ4_FRAME)}static addMethod(t,e){t.addFieldInt8(1,e,jH.BUFFER)}static endBodyCompression(t){return t.endObject()}static createBodyCompression(t,e,n){return GH.startBodyCompression(t),GH.addCodec(t,e),GH.addMethod(t,n),GH.endBodyCompression(t)}}class ZH{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 KH=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()}},YH=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 KH).__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 ZH).__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 GH).__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()}},XH=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 YH).__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 JH,QH
|
|
13454
|
+
!function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"}(JH||(JH={})),function(t){t[t.DenseArray=0]="DenseArray"}(QH||(QH={}))
|
|
13455
|
+
class tU{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 tU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInt(t,e){return t.setPosition(t.position()+4),(e||new tU).__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 tU.startInt(t),tU.addBitWidth(t,e),tU.addIsSigned(t,n),tU.endInt(t)}}class eU{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 eU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryEncoding(t,e){return t.setPosition(t.position()+4),(e||new eU).__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 tU).__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):QH.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,QH.DenseArray)}static endDictionaryEncoding(t){return t.endObject()}}class nU{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 nU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsKeyValue(t,e){return t.setPosition(t.position()+4),(e||new nU).__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 nU.startKeyValue(t),nU.addKey(t,e),nU.addValue(t,n),nU.endKeyValue(t)}}let iU=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)}},sU=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)}},oU=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):FH.MILLISECOND}static startDate(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,FH.MILLISECOND)}static endDate(t){return t.endObject()}static createDate(e,n){return t.startDate(e),t.addUnit(e,n),t.endDate(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 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)}},aU=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):NH.MILLISECOND}static startDuration(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,NH.MILLISECOND)}static endDuration(t){return t.endObject()}static createDuration(e,n){return t.startDuration(e),t.addUnit(e,n),t.endDuration(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 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)}},cU=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 dU{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 dU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFloatingPoint(t,e){return t.setPosition(t.position()+4),(e||new dU).__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):RH.HALF}static startFloatingPoint(t){t.startObject(1)}static addPrecision(t,e){t.addFieldInt16(0,e,RH.HALF)}static endFloatingPoint(t){return t.endObject()}static createFloatingPoint(t,e){return dU.startFloatingPoint(t),dU.addPrecision(t,e),dU.endFloatingPoint(t)}}class hU{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 hU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInterval(t,e){return t.setPosition(t.position()+4),(e||new hU).__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):LH.YEAR_MONTH}static startInterval(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,LH.YEAR_MONTH)}static endInterval(t){return t.endObject()}static createInterval(t,e){return hU.startInterval(t),hU.addUnit(t,e),hU.endInterval(t)}}let uU=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)}},pU=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)}},fU=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)}},mU=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)}},gU=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 vU{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 vU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsStruct_(t,e){return t.setPosition(t.position()+4),(e||new vU).__init(t.readInt32(t.position())+t.position(),t)}static startStruct_(t){t.startObject(0)}static endStruct_(t){return t.endObject()}static createStruct_(t){return vU.startStruct_(t),vU.endStruct_(t)}}class bU{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 bU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTime(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)
|
|
13476
|
+
return t?this.bb.readInt16(this.bb_pos+t):NH.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,NH.MILLISECOND)}static addBitWidth(t,e){t.addFieldInt32(1,e,32)}static endTime(t){return t.endObject()}static createTime(t,e,n){return bU.startTime(t),bU.addUnit(t,e),bU.addBitWidth(t,n),bU.endTime(t)}}class yU{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 yU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTimestamp(t,e){return t.setPosition(t.position()+4),(e||new yU).__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):NH.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,NH.SECOND)}static addTimezone(t,e){t.addFieldOffset(1,e,0)}static endTimestamp(t){return t.endObject()}static createTimestamp(t,e,n){return yU.startTimestamp(t),yU.addUnit(t,e),yU.addTimezone(t,n),yU.endTimestamp(t)}}class wU{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 wU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUnion(t,e){return t.setPosition(t.position()+4),(e||new wU).__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):OH.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,OH.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 wU.startUnion(t),wU.addMode(t,e),wU.addTypeIds(t,n),wU.endUnion(t)}}let xU=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 CU
|
|
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"}(CU||(CU={}))
|
|
13488
|
+
let kU=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):CU.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 eU).__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 nU).__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,CU.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()}},SU=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):JH.Little}fields(t,e){const n=this.bb.__offset(this.bb_pos,6)
|
|
13503
|
+
return n?(e||new kU).__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 nU).__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,JH.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 _U,IU,MU
|
|
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"}(_U||(_U={})),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"}(IU||(IU={})),function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"}(MU||(MU={}))
|
|
13517
|
+
function $U(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=>$U(t)))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,((t,e)=>"bigint"==typeof e?`${e}`:e))}function EU(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 DU(t,e){return EU(t/e)+EU(t%e)/EU(e)}const AU=Symbol.for("isArrowBigNum")
|
|
13522
|
+
function TU(t,...e){return 0===e.length?Object.setPrototypeOf(wH(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}function OU(...t){return TU.apply(this,t)}function RU(...t){return TU.apply(this,t)}function FU(...t){return TU.apply(this,t)}TU.prototype[AU]=!0,TU.prototype.toJSON=function(){return`"${BU(this)}"`},TU.prototype.valueOf=function(t){return LU(this,t)},TU.prototype.toString=function(){return BU(this)},TU.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return LU(this)
|
|
13523
|
+
case"string":return BU(this)
|
|
13524
|
+
case"default":return function(t){if(8===t.byteLength){return new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}return BU(t)}(this)}return BU(this)},Object.setPrototypeOf(OU.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(RU.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(FU.prototype,Object.create(Uint32Array.prototype)),Object.assign(OU.prototype,TU.prototype,{constructor:OU,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(RU.prototype,TU.prototype,{constructor:RU,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(FU.prototype,TU.prototype,{constructor:FU,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array})
|
|
13525
|
+
const NU=BigInt(4294967296)*BigInt(4294967296)-BigInt(1)
|
|
13526
|
+
function LU(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^NU)*(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 EU(l/t)+EU(n)/EU(t)}return EU(l)}function BU(t){if(8===t.byteLength){return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`}if(!t.signed)return PU(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 PU(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`-${PU(e)}`}function PU(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 zU{static new(t,e){switch(e){case!0:return new OU(t)
|
|
13546
|
+
case!1:return new RU(t)}switch(t.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new OU(t)}return 16===t.byteLength?new FU(t):new RU(t)}static signed(t){return new OU(t)}static unsigned(t){return new RU(t)}static decimal(t){return new FU(t)}constructor(t,e){return zU.new(t,e)}}var VU,HU,UU,qU,jU,WU,GU,ZU,KU,YU,XU,JU,QU,tq,eq,nq,iq,sq,oq,rq,aq,lq,cq
|
|
13547
|
+
class dq{static isNull(t){return(null==t?void 0:t.typeId)===IU.Null}static isInt(t){return(null==t?void 0:t.typeId)===IU.Int}static isFloat(t){return(null==t?void 0:t.typeId)===IU.Float}static isBinary(t){return(null==t?void 0:t.typeId)===IU.Binary}static isLargeBinary(t){return(null==t?void 0:t.typeId)===IU.LargeBinary}static isUtf8(t){return(null==t?void 0:t.typeId)===IU.Utf8}static isLargeUtf8(t){return(null==t?void 0:t.typeId)===IU.LargeUtf8}static isBool(t){return(null==t?void 0:t.typeId)===IU.Bool}static isDecimal(t){return(null==t?void 0:t.typeId)===IU.Decimal}static isDate(t){return(null==t?void 0:t.typeId)===IU.Date}static isTime(t){return(null==t?void 0:t.typeId)===IU.Time}static isTimestamp(t){return(null==t?void 0:t.typeId)===IU.Timestamp}static isInterval(t){return(null==t?void 0:t.typeId)===IU.Interval}static isDuration(t){return(null==t?void 0:t.typeId)===IU.Duration}static isList(t){return(null==t?void 0:t.typeId)===IU.List}static isStruct(t){return(null==t?void 0:t.typeId)===IU.Struct}static isUnion(t){return(null==t?void 0:t.typeId)===IU.Union}static isFixedSizeBinary(t){return(null==t?void 0:t.typeId)===IU.FixedSizeBinary}static isFixedSizeList(t){return(null==t?void 0:t.typeId)===IU.FixedSizeList}static isMap(t){return(null==t?void 0:t.typeId)===IU.Map}static isDictionary(t){return(null==t?void 0:t.typeId)===IU.Dictionary}static isDenseUnion(t){return dq.isUnion(t)&&t.mode===OH.Dense}static isSparseUnion(t){return dq.isUnion(t)&&t.mode===OH.Sparse}constructor(t){this.typeId=t}}VU=Symbol.toStringTag,dq[VU]=((cq=dq.prototype).children=null,cq.ArrayType=Array,cq.OffsetArrayType=Int32Array,cq[Symbol.toStringTag]="DataType")
|
|
13548
|
+
class hq extends dq{constructor(){super(IU.Null)}toString(){return"Null"}}HU=Symbol.toStringTag,hq[HU]=(t=>t[Symbol.toStringTag]="Null")(hq.prototype)
|
|
13549
|
+
class uq extends dq{constructor(t,e){super(IU.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}`}}UU=Symbol.toStringTag,uq[UU]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(uq.prototype)
|
|
13553
|
+
class pq extends uq{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(pq.prototype,"ArrayType",{value:Int32Array})
|
|
13554
|
+
class fq extends dq{constructor(t){super(IU.Float),this.precision=t}get ArrayType(){switch(this.precision){case RH.HALF:return Uint16Array
|
|
13555
|
+
case RH.SINGLE:return Float32Array
|
|
13556
|
+
case RH.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}qU=Symbol.toStringTag,fq[qU]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(fq.prototype)
|
|
13557
|
+
class mq extends dq{constructor(){super(IU.Binary)}toString(){return"Binary"}}jU=Symbol.toStringTag,mq[jU]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(mq.prototype)
|
|
13558
|
+
class gq extends dq{constructor(){super(IU.LargeBinary)}toString(){return"LargeBinary"}}WU=Symbol.toStringTag,gq[WU]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(gq.prototype)
|
|
13559
|
+
class vq extends dq{constructor(){super(IU.Utf8)}toString(){return"Utf8"}}GU=Symbol.toStringTag,vq[GU]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(vq.prototype)
|
|
13560
|
+
class bq extends dq{constructor(){super(IU.LargeUtf8)}toString(){return"LargeUtf8"}}ZU=Symbol.toStringTag,bq[ZU]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(bq.prototype)
|
|
13561
|
+
class yq extends dq{constructor(){super(IU.Bool)}toString(){return"Bool"}}KU=Symbol.toStringTag,yq[KU]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(yq.prototype)
|
|
13562
|
+
class wq extends dq{constructor(t,e,n=128){super(IU.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}YU=Symbol.toStringTag,wq[YU]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(wq.prototype)
|
|
13563
|
+
class xq extends dq{constructor(t){super(IU.Date),this.unit=t}toString(){return`Date${32*(this.unit+1)}<${FH[this.unit]}>`}get ArrayType(){return this.unit===FH.DAY?Int32Array:BigInt64Array}}XU=Symbol.toStringTag,xq[XU]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(xq.prototype)
|
|
13564
|
+
class Cq extends dq{constructor(t,e){super(IU.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${NH[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array
|
|
13565
|
+
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}JU=Symbol.toStringTag,Cq[JU]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(Cq.prototype)
|
|
13566
|
+
class kq extends dq{constructor(t,e){super(IU.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${NH[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}QU=Symbol.toStringTag,kq[QU]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(kq.prototype)
|
|
13567
|
+
class Sq extends dq{constructor(t){super(IU.Interval),this.unit=t}toString(){return`Interval<${LH[this.unit]}>`}}tq=Symbol.toStringTag,Sq[tq]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(Sq.prototype)
|
|
13568
|
+
class _q extends dq{constructor(t){super(IU.Duration),this.unit=t}toString(){return`Duration<${NH[this.unit]}>`}}eq=Symbol.toStringTag,_q[eq]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(_q.prototype)
|
|
13569
|
+
class Iq extends dq{constructor(t){super(IU.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}}nq=Symbol.toStringTag,Iq[nq]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(Iq.prototype)
|
|
13570
|
+
class Mq extends dq{constructor(t){super(IU.Struct),this.children=t}toString(){return`Struct<{${this.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}iq=Symbol.toStringTag,Mq[iq]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))(Mq.prototype)
|
|
13571
|
+
class $q extends dq{constructor(t,e,n){super(IU.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(" | ")}>`}}sq=Symbol.toStringTag,$q[sq]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))($q.prototype)
|
|
13572
|
+
class Eq extends dq{constructor(t){super(IU.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}oq=Symbol.toStringTag,Eq[oq]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(Eq.prototype)
|
|
13573
|
+
class Dq extends dq{constructor(t,e){super(IU.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}>`}}rq=Symbol.toStringTag,Dq[rq]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(Dq.prototype)
|
|
13574
|
+
class Aq extends dq{constructor(t,e=!1){var n,i,s
|
|
13575
|
+
if(super(IU.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(", ")}}>`}}aq=Symbol.toStringTag,Aq[aq]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(Aq.prototype)
|
|
13579
|
+
const Tq=(Oq=-1,()=>++Oq)
|
|
13580
|
+
var Oq
|
|
13581
|
+
class Rq extends dq{constructor(t,e,n,i){super(IU.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=null==n?Tq():EU(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 Fq(t){const e=t
|
|
13582
|
+
switch(t.typeId){case IU.Decimal:return t.bitWidth/32
|
|
13583
|
+
case IU.Interval:return 1+e.unit
|
|
13584
|
+
case IU.FixedSizeList:return e.listSize
|
|
13585
|
+
case IU.FixedSizeBinary:return e.byteWidth
|
|
13586
|
+
default:return 1}}lq=Symbol.toStringTag,Rq[lq]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(Rq.prototype)
|
|
13587
|
+
class Nq{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 Lq(t,e,n)
|
|
13588
|
+
if("string"==typeof e&&e in IU)return Lq(t,IU[e],n)
|
|
13589
|
+
if(e&&e instanceof dq)return Lq(t,Bq(e),n)
|
|
13590
|
+
if((null==e?void 0:e.type)&&e.type instanceof dq)return Lq(t,Bq(e.type),n)
|
|
13591
|
+
return Lq(t,IU.NONE,n)}(this,t,e)}getVisitFnByTypeId(t,e=!0){return Lq(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 Lq(t,e,n=!0){let i=null
|
|
13592
|
+
switch(e){case IU.Null:i=t.visitNull
|
|
13590
13593
|
break
|
|
13591
|
-
case
|
|
13594
|
+
case IU.Bool:i=t.visitBool
|
|
13592
13595
|
break
|
|
13593
|
-
case
|
|
13596
|
+
case IU.Int:i=t.visitInt
|
|
13594
13597
|
break
|
|
13595
|
-
case
|
|
13598
|
+
case IU.Int8:i=t.visitInt8||t.visitInt
|
|
13596
13599
|
break
|
|
13597
|
-
case
|
|
13600
|
+
case IU.Int16:i=t.visitInt16||t.visitInt
|
|
13598
13601
|
break
|
|
13599
|
-
case
|
|
13602
|
+
case IU.Int32:i=t.visitInt32||t.visitInt
|
|
13600
13603
|
break
|
|
13601
|
-
case
|
|
13604
|
+
case IU.Int64:i=t.visitInt64||t.visitInt
|
|
13602
13605
|
break
|
|
13603
|
-
case
|
|
13606
|
+
case IU.Uint8:i=t.visitUint8||t.visitInt
|
|
13604
13607
|
break
|
|
13605
|
-
case
|
|
13608
|
+
case IU.Uint16:i=t.visitUint16||t.visitInt
|
|
13606
13609
|
break
|
|
13607
|
-
case
|
|
13610
|
+
case IU.Uint32:i=t.visitUint32||t.visitInt
|
|
13608
13611
|
break
|
|
13609
|
-
case
|
|
13612
|
+
case IU.Uint64:i=t.visitUint64||t.visitInt
|
|
13610
13613
|
break
|
|
13611
|
-
case
|
|
13614
|
+
case IU.Float:i=t.visitFloat
|
|
13612
13615
|
break
|
|
13613
|
-
case
|
|
13616
|
+
case IU.Float16:i=t.visitFloat16||t.visitFloat
|
|
13614
13617
|
break
|
|
13615
|
-
case
|
|
13618
|
+
case IU.Float32:i=t.visitFloat32||t.visitFloat
|
|
13616
13619
|
break
|
|
13617
|
-
case
|
|
13620
|
+
case IU.Float64:i=t.visitFloat64||t.visitFloat
|
|
13618
13621
|
break
|
|
13619
|
-
case
|
|
13622
|
+
case IU.Utf8:i=t.visitUtf8
|
|
13620
13623
|
break
|
|
13621
|
-
case
|
|
13624
|
+
case IU.LargeUtf8:i=t.visitLargeUtf8
|
|
13622
13625
|
break
|
|
13623
|
-
case
|
|
13626
|
+
case IU.Binary:i=t.visitBinary
|
|
13624
13627
|
break
|
|
13625
|
-
case
|
|
13628
|
+
case IU.LargeBinary:i=t.visitLargeBinary
|
|
13626
13629
|
break
|
|
13627
|
-
case
|
|
13630
|
+
case IU.FixedSizeBinary:i=t.visitFixedSizeBinary
|
|
13628
13631
|
break
|
|
13629
|
-
case
|
|
13632
|
+
case IU.Date:i=t.visitDate
|
|
13630
13633
|
break
|
|
13631
|
-
case
|
|
13634
|
+
case IU.DateDay:i=t.visitDateDay||t.visitDate
|
|
13632
13635
|
break
|
|
13633
|
-
case
|
|
13636
|
+
case IU.DateMillisecond:i=t.visitDateMillisecond||t.visitDate
|
|
13634
13637
|
break
|
|
13635
|
-
case
|
|
13638
|
+
case IU.Timestamp:i=t.visitTimestamp
|
|
13636
13639
|
break
|
|
13637
|
-
case
|
|
13640
|
+
case IU.TimestampSecond:i=t.visitTimestampSecond||t.visitTimestamp
|
|
13638
13641
|
break
|
|
13639
|
-
case
|
|
13642
|
+
case IU.TimestampMillisecond:i=t.visitTimestampMillisecond||t.visitTimestamp
|
|
13640
13643
|
break
|
|
13641
|
-
case
|
|
13644
|
+
case IU.TimestampMicrosecond:i=t.visitTimestampMicrosecond||t.visitTimestamp
|
|
13642
13645
|
break
|
|
13643
|
-
case
|
|
13646
|
+
case IU.TimestampNanosecond:i=t.visitTimestampNanosecond||t.visitTimestamp
|
|
13644
13647
|
break
|
|
13645
|
-
case
|
|
13648
|
+
case IU.Time:i=t.visitTime
|
|
13646
13649
|
break
|
|
13647
|
-
case
|
|
13650
|
+
case IU.TimeSecond:i=t.visitTimeSecond||t.visitTime
|
|
13648
13651
|
break
|
|
13649
|
-
case
|
|
13652
|
+
case IU.TimeMillisecond:i=t.visitTimeMillisecond||t.visitTime
|
|
13650
13653
|
break
|
|
13651
|
-
case
|
|
13654
|
+
case IU.TimeMicrosecond:i=t.visitTimeMicrosecond||t.visitTime
|
|
13652
13655
|
break
|
|
13653
|
-
case
|
|
13656
|
+
case IU.TimeNanosecond:i=t.visitTimeNanosecond||t.visitTime
|
|
13654
13657
|
break
|
|
13655
|
-
case
|
|
13658
|
+
case IU.Decimal:i=t.visitDecimal
|
|
13656
13659
|
break
|
|
13657
|
-
case
|
|
13660
|
+
case IU.List:i=t.visitList
|
|
13658
13661
|
break
|
|
13659
|
-
case
|
|
13662
|
+
case IU.Struct:i=t.visitStruct
|
|
13660
13663
|
break
|
|
13661
|
-
case
|
|
13664
|
+
case IU.Union:i=t.visitUnion
|
|
13662
13665
|
break
|
|
13663
|
-
case
|
|
13666
|
+
case IU.DenseUnion:i=t.visitDenseUnion||t.visitUnion
|
|
13664
13667
|
break
|
|
13665
|
-
case
|
|
13668
|
+
case IU.SparseUnion:i=t.visitSparseUnion||t.visitUnion
|
|
13666
13669
|
break
|
|
13667
|
-
case
|
|
13670
|
+
case IU.Dictionary:i=t.visitDictionary
|
|
13668
13671
|
break
|
|
13669
|
-
case
|
|
13672
|
+
case IU.Interval:i=t.visitInterval
|
|
13670
13673
|
break
|
|
13671
|
-
case
|
|
13674
|
+
case IU.IntervalDayTime:i=t.visitIntervalDayTime||t.visitInterval
|
|
13672
13675
|
break
|
|
13673
|
-
case
|
|
13676
|
+
case IU.IntervalYearMonth:i=t.visitIntervalYearMonth||t.visitInterval
|
|
13674
13677
|
break
|
|
13675
|
-
case
|
|
13678
|
+
case IU.Duration:i=t.visitDuration
|
|
13676
13679
|
break
|
|
13677
|
-
case
|
|
13680
|
+
case IU.DurationSecond:i=t.visitDurationSecond||t.visitDuration
|
|
13678
13681
|
break
|
|
13679
|
-
case
|
|
13682
|
+
case IU.DurationMillisecond:i=t.visitDurationMillisecond||t.visitDuration
|
|
13680
13683
|
break
|
|
13681
|
-
case
|
|
13684
|
+
case IU.DurationMicrosecond:i=t.visitDurationMicrosecond||t.visitDuration
|
|
13682
13685
|
break
|
|
13683
|
-
case
|
|
13686
|
+
case IU.DurationNanosecond:i=t.visitDurationNanosecond||t.visitDuration
|
|
13684
13687
|
break
|
|
13685
|
-
case
|
|
13688
|
+
case IU.FixedSizeList:i=t.visitFixedSizeList
|
|
13686
13689
|
break
|
|
13687
|
-
case
|
|
13690
|
+
case IU.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 '${IU[e]}'`)}function Bq(t){switch(t.typeId){case IU.Null:return IU.Null
|
|
13693
|
+
case IU.Int:{const{bitWidth:e,isSigned:n}=t
|
|
13694
|
+
switch(e){case 8:return n?IU.Int8:IU.Uint8
|
|
13695
|
+
case 16:return n?IU.Int16:IU.Uint16
|
|
13696
|
+
case 32:return n?IU.Int32:IU.Uint32
|
|
13697
|
+
case 64:return n?IU.Int64:IU.Uint64}return IU.Int}case IU.Float:switch(t.precision){case RH.HALF:return IU.Float16
|
|
13698
|
+
case RH.SINGLE:return IU.Float32
|
|
13699
|
+
case RH.DOUBLE:return IU.Float64}return IU.Float
|
|
13700
|
+
case IU.Binary:return IU.Binary
|
|
13701
|
+
case IU.LargeBinary:return IU.LargeBinary
|
|
13702
|
+
case IU.Utf8:return IU.Utf8
|
|
13703
|
+
case IU.LargeUtf8:return IU.LargeUtf8
|
|
13704
|
+
case IU.Bool:return IU.Bool
|
|
13705
|
+
case IU.Decimal:return IU.Decimal
|
|
13706
|
+
case IU.Time:switch(t.unit){case NH.SECOND:return IU.TimeSecond
|
|
13707
|
+
case NH.MILLISECOND:return IU.TimeMillisecond
|
|
13708
|
+
case NH.MICROSECOND:return IU.TimeMicrosecond
|
|
13709
|
+
case NH.NANOSECOND:return IU.TimeNanosecond}return IU.Time
|
|
13710
|
+
case IU.Timestamp:switch(t.unit){case NH.SECOND:return IU.TimestampSecond
|
|
13711
|
+
case NH.MILLISECOND:return IU.TimestampMillisecond
|
|
13712
|
+
case NH.MICROSECOND:return IU.TimestampMicrosecond
|
|
13713
|
+
case NH.NANOSECOND:return IU.TimestampNanosecond}return IU.Timestamp
|
|
13714
|
+
case IU.Date:switch(t.unit){case FH.DAY:return IU.DateDay
|
|
13715
|
+
case FH.MILLISECOND:return IU.DateMillisecond}return IU.Date
|
|
13716
|
+
case IU.Interval:switch(t.unit){case LH.DAY_TIME:return IU.IntervalDayTime
|
|
13717
|
+
case LH.YEAR_MONTH:return IU.IntervalYearMonth}return IU.Interval
|
|
13718
|
+
case IU.Duration:switch(t.unit){case NH.SECOND:return IU.DurationSecond
|
|
13719
|
+
case NH.MILLISECOND:return IU.DurationMillisecond
|
|
13720
|
+
case NH.MICROSECOND:return IU.DurationMicrosecond
|
|
13721
|
+
case NH.NANOSECOND:return IU.DurationNanosecond}return IU.Duration
|
|
13722
|
+
case IU.Map:return IU.Map
|
|
13723
|
+
case IU.List:return IU.List
|
|
13724
|
+
case IU.Struct:return IU.Struct
|
|
13725
|
+
case IU.Union:switch(t.mode){case OH.Dense:return IU.DenseUnion
|
|
13726
|
+
case OH.Sparse:return IU.SparseUnion}return IU.Union
|
|
13727
|
+
case IU.FixedSizeBinary:return IU.FixedSizeBinary
|
|
13728
|
+
case IU.FixedSizeList:return IU.FixedSizeList
|
|
13729
|
+
case IU.Dictionary:return IU.Dictionary}throw new Error(`Unrecognized type '${IU[t.typeId]}'`)}Nq.prototype.visitInt8=null,Nq.prototype.visitInt16=null,Nq.prototype.visitInt32=null,Nq.prototype.visitInt64=null,Nq.prototype.visitUint8=null,Nq.prototype.visitUint16=null,Nq.prototype.visitUint32=null,Nq.prototype.visitUint64=null,Nq.prototype.visitFloat16=null,Nq.prototype.visitFloat32=null,Nq.prototype.visitFloat64=null,Nq.prototype.visitDateDay=null,Nq.prototype.visitDateMillisecond=null,Nq.prototype.visitTimestampSecond=null,Nq.prototype.visitTimestampMillisecond=null,Nq.prototype.visitTimestampMicrosecond=null,Nq.prototype.visitTimestampNanosecond=null,Nq.prototype.visitTimeSecond=null,Nq.prototype.visitTimeMillisecond=null,Nq.prototype.visitTimeMicrosecond=null,Nq.prototype.visitTimeNanosecond=null,Nq.prototype.visitDenseUnion=null,Nq.prototype.visitSparseUnion=null,Nq.prototype.visitIntervalDayTime=null,Nq.prototype.visitIntervalYearMonth=null,Nq.prototype.visitDuration=null,Nq.prototype.visitDurationSecond=null,Nq.prototype.visitDurationMillisecond=null,Nq.prototype.visitDurationMicrosecond=null,Nq.prototype.visitDurationNanosecond=null
|
|
13730
|
+
const Pq=new Float64Array(1),zq=new Uint32Array(Pq.buffer)
|
|
13731
|
+
function Vq(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 Hq extends Nq{}function Uq(t){return(e,n,i)=>{if(e.setValid(n,null!=i))return t(e,n,i)}}const qq=(t,e,n,i)=>{if(n+1<e.length){const s=EU(e[n]),o=EU(e[n+1])
|
|
13734
|
+
t.set(i.subarray(0,o-s),s)}},jq=({values:t},e,n)=>{t[e]=n},Wq=({values:t},e,n)=>{t[e]=n},Gq=({values:t},e,n)=>{t[e]=function(t){if(t!=t)return 32256
|
|
13735
|
+
Pq[0]=t
|
|
13736
|
+
const e=(2147483648&zq[1])>>16&65535
|
|
13737
|
+
let n=2146435072&zq[1],i=0
|
|
13738
|
+
return n>=1089470464?zq[0]>0?n=31744:(n=(2080374784&n)>>16,i=(1048575&zq[1])>>10):n<=1056964608?(i=1048576+(1048575&zq[1]),i=1048576+(i<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,i=512+(1048575&zq[1])>>10),e|n|65535&i}(n)},Zq=({values:t},e,n)=>{((t,e,n)=>{t[e]=Math.floor(n/864e5)})(t,e,n.valueOf())},Kq=({values:t},e,n)=>{t[e]=BigInt(n)},Yq=({values:t,valueOffsets:e},n,i)=>qq(t,e,n,i),Xq=({values:t,valueOffsets:e},n,i)=>qq(t,e,n,iH(i)),Jq=({values:t},e,n)=>{t[e]=BigInt(n/1e3)},Qq=({values:t},e,n)=>{t[e]=BigInt(n)},tj=({values:t},e,n)=>{t[e]=BigInt(1e3*n)},ej=({values:t},e,n)=>{t[e]=BigInt(1e6*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=({values:t},e,n)=>{t[e]=n},rj=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
|
|
13739
|
+
fj.visit(s,t.valueOffsets[e],n)},aj=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
|
|
13740
|
+
fj.visit(s,e,n)},lj=({values:t},e,n)=>{t.set(n.subarray(0,2),2*e)},cj=({values:t},e,n)=>{t[e]=12*n[0]+n[1]%12},dj=({values:t},e,n)=>{t[e]=n},hj=({values:t},e,n)=>{t[e]=n},uj=({values:t},e,n)=>{t[e]=n},pj=({values:t},e,n)=>{t[e]=n}
|
|
13741
|
+
Hq.prototype.visitBool=Uq((({offset:t,values:e},n,i)=>{const s=t+n
|
|
13742
|
+
i?e[s>>3]|=1<<s%8:e[s>>3]&=~(1<<s%8)})),Hq.prototype.visitInt=Uq(jq),Hq.prototype.visitInt8=Uq(jq),Hq.prototype.visitInt16=Uq(jq),Hq.prototype.visitInt32=Uq(jq),Hq.prototype.visitInt64=Uq(jq),Hq.prototype.visitUint8=Uq(jq),Hq.prototype.visitUint16=Uq(jq),Hq.prototype.visitUint32=Uq(jq),Hq.prototype.visitUint64=Uq(jq),Hq.prototype.visitFloat=Uq(((t,e,n)=>{switch(t.type.precision){case RH.HALF:return Gq(t,e,n)
|
|
13743
|
+
case RH.SINGLE:case RH.DOUBLE:return Wq(t,e,n)}})),Hq.prototype.visitFloat16=Uq(Gq),Hq.prototype.visitFloat32=Uq(Wq),Hq.prototype.visitFloat64=Uq(Wq),Hq.prototype.visitUtf8=Uq(Xq),Hq.prototype.visitLargeUtf8=Uq(Xq),Hq.prototype.visitBinary=Uq(Yq),Hq.prototype.visitLargeBinary=Uq(Yq),Hq.prototype.visitFixedSizeBinary=Uq((({stride:t,values:e},n,i)=>{e.set(i.subarray(0,t),t*n)})),Hq.prototype.visitDate=Uq(((t,e,n)=>{t.type.unit===FH.DAY?Zq(t,e,n):Kq(t,e,n)})),Hq.prototype.visitDateDay=Uq(Zq),Hq.prototype.visitDateMillisecond=Uq(Kq),Hq.prototype.visitTimestamp=Uq(((t,e,n)=>{switch(t.type.unit){case NH.SECOND:return Jq(t,e,n)
|
|
13744
|
+
case NH.MILLISECOND:return Qq(t,e,n)
|
|
13745
|
+
case NH.MICROSECOND:return tj(t,e,n)
|
|
13746
|
+
case NH.NANOSECOND:return ej(t,e,n)}})),Hq.prototype.visitTimestampSecond=Uq(Jq),Hq.prototype.visitTimestampMillisecond=Uq(Qq),Hq.prototype.visitTimestampMicrosecond=Uq(tj),Hq.prototype.visitTimestampNanosecond=Uq(ej),Hq.prototype.visitTime=Uq(((t,e,n)=>{switch(t.type.unit){case NH.SECOND:return nj(t,e,n)
|
|
13747
|
+
case NH.MILLISECOND:return ij(t,e,n)
|
|
13748
|
+
case NH.MICROSECOND:return sj(t,e,n)
|
|
13749
|
+
case NH.NANOSECOND:return oj(t,e,n)}})),Hq.prototype.visitTimeSecond=Uq(nj),Hq.prototype.visitTimeMillisecond=Uq(ij),Hq.prototype.visitTimeMicrosecond=Uq(sj),Hq.prototype.visitTimeNanosecond=Uq(oj),Hq.prototype.visitDecimal=Uq((({values:t,stride:e},n,i)=>{t.set(i.subarray(0,e),e*n)})),Hq.prototype.visitList=Uq(((t,e,n)=>{const i=t.children[0],s=t.valueOffsets,o=fj.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))})),Hq.prototype.visitStruct=Uq(((t,e,n)=>{const i=t.type.children.map((t=>fj.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 LW?((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)))})),Hq.prototype.visitUnion=Uq(((t,e,n)=>{t.type.mode===OH.Dense?rj(t,e,n):aj(t,e,n)})),Hq.prototype.visitDenseUnion=Uq(rj),Hq.prototype.visitSparseUnion=Uq(aj),Hq.prototype.visitDictionary=Uq(((t,e,n)=>{var i
|
|
13754
|
+
null===(i=t.dictionary)||void 0===i||i.set(t.values[e],n)})),Hq.prototype.visitInterval=Uq(((t,e,n)=>{t.type.unit===LH.DAY_TIME?lj(t,e,n):cj(t,e,n)})),Hq.prototype.visitIntervalDayTime=Uq(lj),Hq.prototype.visitIntervalYearMonth=Uq(cj),Hq.prototype.visitDuration=Uq(((t,e,n)=>{switch(t.type.unit){case NH.SECOND:return dj(t,e,n)
|
|
13755
|
+
case NH.MILLISECOND:return hj(t,e,n)
|
|
13756
|
+
case NH.MICROSECOND:return uj(t,e,n)
|
|
13757
|
+
case NH.NANOSECOND:return pj(t,e,n)}})),Hq.prototype.visitDurationSecond=Uq(dj),Hq.prototype.visitDurationMillisecond=Uq(hj),Hq.prototype.visitDurationMicrosecond=Uq(uj),Hq.prototype.visitDurationNanosecond=Uq(pj),Hq.prototype.visitFixedSizeList=Uq(((t,e,n)=>{const{stride:i}=t,s=t.children[0],o=fj.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))})),Hq.prototype.visitMap=Uq(((t,e,n)=>{const i=t.children[0],{valueOffsets:s}=t,o=fj.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 fj=new Hq,mj=Symbol.for("parent"),gj=Symbol.for("rowIndex")
|
|
13764
|
+
class vj{constructor(t,e){return this[mj]=t,this[gj]=e,new Proxy(this,new yj)}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[gj],e=this[mj],n=e.type.children,i={}
|
|
13765
|
+
for(let s=-1,o=n.length;++s<o;)i[n[s].name]=jj.visit(e.children[s],t)
|
|
13766
|
+
return i}toString(){return`{${[...this].map((([t,e])=>`${$U(t)}: ${$U(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new bj(this[mj],this[gj])}}class bj{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,jj.visit(this.children[t],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(vj.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[mj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[gj]:{writable:!0,enumerable:!1,configurable:!1,value:-1}})
|
|
13768
|
+
class yj{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[mj].type.children.map((t=>t.name))}has(t,e){return-1!==t[mj].type.children.findIndex((t=>t.name===e))}getOwnPropertyDescriptor(t,e){if(-1!==t[mj].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[mj].type.children.findIndex((t=>t.name===e))
|
|
13770
|
+
if(-1!==n){const i=jj.visit(t[mj].children[n],t[gj])
|
|
13771
|
+
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[mj].type.children.findIndex((t=>t.name===e))
|
|
13772
|
+
return-1!==i?(fj.visit(t[mj].children[i],t[gj],n),Reflect.set(t,e,n)):!(!Reflect.has(t,e)&&"symbol"!=typeof e)&&Reflect.set(t,e,n)}}class wj extends Nq{}function xj(t){return(e,n)=>e.getValid(n)?t(e,n):null}const Cj=(t,e,n)=>{if(n+1>=e.length)return null
|
|
13773
|
+
const i=EU(e[n]),s=EU(e[n+1])
|
|
13774
|
+
return t.subarray(i,s)},kj=({values:t},e)=>((t,e)=>864e5*t[e])(t,e),Sj=({values:t},e)=>EU(t[e]),_j=({stride:t,values:e},n)=>e[t*n],Ij=({values:t},e)=>t[e],Mj=({values:t,valueOffsets:e},n)=>Cj(t,e,n),$j=({values:t,valueOffsets:e},n)=>{const i=Cj(t,e,n)
|
|
13775
|
+
return null!==i?eH(i):null},Ej=({values:t},e)=>1e3*EU(t[e]),Dj=({values:t},e)=>EU(t[e]),Aj=({values:t},e)=>DU(t[e],BigInt(1e3)),Tj=({values:t},e)=>DU(t[e],BigInt(1e6)),Oj=({values:t},e)=>t[e],Rj=({values:t},e)=>t[e],Fj=({values:t},e)=>t[e],Nj=({values:t},e)=>t[e],Lj=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
|
|
13776
|
+
return jj.visit(i,t.valueOffsets[e])},Bj=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
|
|
13777
|
+
return jj.visit(i,e)},Pj=({values:t},e)=>t.subarray(2*e,2*(e+1)),zj=({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},Vj=({values:t},e)=>t[e],Hj=({values:t},e)=>t[e],Uj=({values:t},e)=>t[e],qj=({values:t},e)=>t[e]
|
|
13779
|
+
wj.prototype.visitNull=xj(((t,e)=>null)),wj.prototype.visitBool=xj((({offset:t,values:e},n)=>{const i=t+n
|
|
13780
|
+
return 0!=(e[i>>3]&1<<i%8)})),wj.prototype.visitInt=xj((({values:t},e)=>t[e])),wj.prototype.visitInt8=xj(_j),wj.prototype.visitInt16=xj(_j),wj.prototype.visitInt32=xj(_j),wj.prototype.visitInt64=xj(Ij),wj.prototype.visitUint8=xj(_j),wj.prototype.visitUint16=xj(_j),wj.prototype.visitUint32=xj(_j),wj.prototype.visitUint64=xj(Ij),wj.prototype.visitFloat=xj((({type:t,values:e},n)=>t.precision!==RH.HALF?e[n]:Vq(e[n]))),wj.prototype.visitFloat16=xj((({stride:t,values:e},n)=>Vq(e[t*n]))),wj.prototype.visitFloat32=xj(_j),wj.prototype.visitFloat64=xj(_j),wj.prototype.visitUtf8=xj($j),wj.prototype.visitLargeUtf8=xj($j),wj.prototype.visitBinary=xj(Mj),wj.prototype.visitLargeBinary=xj(Mj),wj.prototype.visitFixedSizeBinary=xj((({stride:t,values:e},n)=>e.subarray(t*n,t*(n+1)))),wj.prototype.visitDate=xj(((t,e)=>t.type.unit===FH.DAY?kj(t,e):Sj(t,e))),wj.prototype.visitDateDay=xj(kj),wj.prototype.visitDateMillisecond=xj(Sj),wj.prototype.visitTimestamp=xj(((t,e)=>{switch(t.type.unit){case NH.SECOND:return Ej(t,e)
|
|
13781
|
+
case NH.MILLISECOND:return Dj(t,e)
|
|
13782
|
+
case NH.MICROSECOND:return Aj(t,e)
|
|
13783
|
+
case NH.NANOSECOND:return Tj(t,e)}})),wj.prototype.visitTimestampSecond=xj(Ej),wj.prototype.visitTimestampMillisecond=xj(Dj),wj.prototype.visitTimestampMicrosecond=xj(Aj),wj.prototype.visitTimestampNanosecond=xj(Tj),wj.prototype.visitTime=xj(((t,e)=>{switch(t.type.unit){case NH.SECOND:return Oj(t,e)
|
|
13784
|
+
case NH.MILLISECOND:return Rj(t,e)
|
|
13785
|
+
case NH.MICROSECOND:return Fj(t,e)
|
|
13786
|
+
case NH.NANOSECOND:return Nj(t,e)}})),wj.prototype.visitTimeSecond=xj(Oj),wj.prototype.visitTimeMillisecond=xj(Rj),wj.prototype.visitTimeMicrosecond=xj(Fj),wj.prototype.visitTimeNanosecond=xj(Nj),wj.prototype.visitDecimal=xj((({values:t,stride:e},n)=>zU.decimal(t.subarray(e*n,e*(n+1))))),wj.prototype.visitList=xj(((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 LW([a])})),wj.prototype.visitStruct=xj(((t,e)=>new vj(t,e))),wj.prototype.visitUnion=xj(((t,e)=>t.type.mode===OH.Dense?Lj(t,e):Bj(t,e))),wj.prototype.visitDenseUnion=xj(Lj),wj.prototype.visitSparseUnion=xj(Bj),wj.prototype.visitDictionary=xj(((t,e)=>{var n
|
|
13788
|
+
return null===(n=t.dictionary)||void 0===n?void 0:n.get(t.values[e])})),wj.prototype.visitInterval=xj(((t,e)=>t.type.unit===LH.DAY_TIME?Pj(t,e):zj(t,e))),wj.prototype.visitIntervalDayTime=xj(Pj),wj.prototype.visitIntervalYearMonth=xj(zj),wj.prototype.visitDuration=xj(((t,e)=>{switch(t.type.unit){case NH.SECOND:return Vj(t,e)
|
|
13789
|
+
case NH.MILLISECOND:return Hj(t,e)
|
|
13790
|
+
case NH.MICROSECOND:return Uj(t,e)
|
|
13791
|
+
case NH.NANOSECOND:return qj(t,e)}})),wj.prototype.visitDurationSecond=xj(Vj),wj.prototype.visitDurationMillisecond=xj(Hj),wj.prototype.visitDurationMicrosecond=xj(Uj),wj.prototype.visitDurationNanosecond=xj(qj),wj.prototype.visitFixedSizeList=xj(((t,e)=>{const{stride:n,children:i}=t,s=i[0].slice(e*n,n)
|
|
13792
|
+
return new LW([s])})),wj.prototype.visitMap=xj(((t,e)=>{const{valueOffsets:n,children:i}=t,{[e]:s,[e+1]:o}=n,r=i[0]
|
|
13793
|
+
return new Yj(r.slice(s,o-s))}))
|
|
13794
|
+
const jj=new wj,Wj=Symbol.for("keys"),Gj=Symbol.for("vals"),Zj=Symbol.for("kKeysAsStrings"),Kj=Symbol.for("_kKeysAsStrings")
|
|
13795
|
+
class Yj{constructor(t){return this[Wj]=new LW([t.children[0]]).memoize(),this[Gj]=t.children[1],new Proxy(this,new Jj)}get[Zj](){return this[Kj]||(this[Kj]=Array.from(this[Wj].toArray(),String))}[Symbol.iterator](){return new Xj(this[Wj],this[Gj])}get size(){return this[Wj].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Wj],e=this[Gj],n={}
|
|
13796
|
+
for(let i=-1,s=t.length;++i<s;)n[t.get(i)]=jj.visit(e,i)
|
|
13797
|
+
return n}toString(){return`{${[...this].map((([t,e])=>`${$U(t)}: ${$U(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class Xj{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),jj.visit(this.vals,t)]})}}class Jj{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Zj]}has(t,e){return t[Zj].includes(e)}getOwnPropertyDescriptor(t,e){if(-1!==t[Zj].indexOf(e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
|
|
13799
|
+
const n=t[Zj].indexOf(e)
|
|
13800
|
+
if(-1!==n){const i=jj.visit(Reflect.get(t,Gj),n)
|
|
13801
|
+
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[Zj].indexOf(e)
|
|
13802
|
+
return-1!==i?(fj.visit(Reflect.get(t,Gj),i,n),Reflect.set(t,e,n)):!!Reflect.has(t,e)&&Reflect.set(t,e,n)}}let Qj
|
|
13803
|
+
function tW(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&&(Qj=o,o=r,r=Qj),r>s&&(r=s),i?i(t,o,r):[o,r]}Object.defineProperties(Yj.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Wj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Gj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Kj]:{writable:!0,enumerable:!1,configurable:!1,value:null}})
|
|
13806
|
+
const eW=(t,e)=>t<0?e+t:t,nW=t=>t!=t
|
|
13807
|
+
function iW(t){if("object"!==typeof t||null===t)return nW(t)?nW: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]=iW(i)
|
|
13816
|
+
return sW(n)}(t):Array.isArray(t)?function(t){const e=[]
|
|
13817
|
+
for(let n=-1,i=t.length;++n<i;)e[n]=iW(t[n])
|
|
13818
|
+
return sW(e)}(t):t instanceof LW?function(t){const e=[]
|
|
13819
|
+
for(let n=-1,i=t.length;++n<i;)e[n]=iW(t.get(n))
|
|
13820
|
+
return sW(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]=iW(t[n[e]])
|
|
13824
|
+
return sW(i,n)}(t,!0)}function sW(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 oW(t,n,n.keys())
|
|
13830
|
+
case Yj:case vj:case Object:case void 0:return oW(t,n,e||Object.keys(n))}return n instanceof LW&&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 oW(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 rW(t,e,n,i){return 0!=(n&1<<i)}function aW(t,e,n,i){return(n&1<<i)>>i}function lW(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):cW(new dW(n,t,e,null,rW)).subarray(0,i)),s}return n}function cW(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 dW{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 hW(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 dW(t,e,n-e,t,aW))i+=s
|
|
13843
13846
|
return i}const i=n>>3<<3,s=e+(e%8==0?0:8-e%8)
|
|
13844
|
-
return
|
|
13847
|
+
return hW(t,e,s)+hW(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+=uW(o.getUint32(s)),s+=4
|
|
13850
|
+
for(;r-s>=2;)i+=uW(o.getUint16(s)),s+=2
|
|
13851
|
+
for(;r-s>=1;)i+=uW(o.getUint8(s)),s+=1
|
|
13852
|
+
return i}(t,s>>3,i-s>>3)}function uW(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 pW{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 dq.isSparseUnion(t)||dq.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(dq.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-hW(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 pW?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=Fq(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(dq.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===OH.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(dq.isUnion(i)){const s=i,o=this.children[s.typeIdToChildIndex[this.typeIds[t]]],r=s.mode===OH.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(lW(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 pW(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===IU.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(lW(this.offset,e,this.nullBitmap),0)
|
|
13869
13872
|
const s=this.buffers
|
|
13870
|
-
return s[
|
|
13873
|
+
return s[MU.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[MU.TYPE])&&(o[MU.TYPE]=s.subarray(t,t+e)),(s=o[MU.OFFSET])&&(o[MU.OFFSET]=s.subarray(t,t+e+1))||(s=o[MU.DATA])&&(o[MU.DATA]=6===i?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map((t=>t.slice(e,n)))}}pW.prototype.children=Object.freeze([])
|
|
13876
|
+
class fW extends Nq{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 pW(e,n,i,i)}visitBool(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length>>3,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13878
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitInt(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13879
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitFloat(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13880
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitUtf8(t){const{type:e,offset:n=0}=t,i=kH(t.data),s=kH(t.nullBitmap),o=xH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13881
|
+
return new pW(e,n,r,a,[o,i,s])}visitLargeUtf8(t){const{type:e,offset:n=0}=t,i=kH(t.data),s=kH(t.nullBitmap),o=CH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13882
|
+
return new pW(e,n,r,a,[o,i,s])}visitBinary(t){const{type:e,offset:n=0}=t,i=kH(t.data),s=kH(t.nullBitmap),o=xH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13883
|
+
return new pW(e,n,r,a,[o,i,s])}visitLargeBinary(t){const{type:e,offset:n=0}=t,i=kH(t.data),s=kH(t.nullBitmap),o=CH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13884
|
+
return new pW(e,n,r,a,[o,i,s])}visitFixedSizeBinary(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length/Fq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13885
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitDate(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length/Fq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13886
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitTimestamp(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length/Fq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13887
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitTime(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length/Fq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13888
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitDecimal(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length/Fq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13889
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitList(t){const{type:e,offset:n=0,child:i}=t,s=kH(t.nullBitmap),o=xH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13890
|
+
return new pW(e,n,r,a,[o,void 0,s],[i])}visitStruct(t){const{type:e,offset:n=0,children:i=[]}=t,s=kH(t.nullBitmap),{length:o=i.reduce(((t,{length:e})=>Math.max(t,e)),0),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13891
|
+
return new pW(e,n,o,r,[void 0,void 0,s],i)}visitUnion(t){const{type:e,offset:n=0,children:i=[]}=t,s=wH(e.ArrayType,t.typeIds),{length:o=s.length,nullCount:r=-1}=t
|
|
13892
|
+
if(dq.isSparseUnion(e))return new pW(e,n,o,r,[void 0,void 0,void 0,s],i)
|
|
13893
|
+
const a=xH(t.valueOffsets)
|
|
13894
|
+
return new pW(e,n,o,r,[a,void 0,void 0,s],i)}visitDictionary(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.indices.ArrayType,t.data),{dictionary:o=new LW([(new fW).visit({type:e.dictionary})])}=t,{length:r=s.length,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13895
|
+
return new pW(e,n,r,a,[void 0,s,i],[],o)}visitInterval(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length/Fq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13896
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitDuration(t){const{type:e,offset:n=0}=t,i=kH(t.nullBitmap),s=wH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13897
|
+
return new pW(e,n,o,r,[void 0,s,i])}visitFixedSizeList(t){const{type:e,offset:n=0,child:i=(new fW).visit({type:e.valueType})}=t,s=kH(t.nullBitmap),{length:o=i.length/Fq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13898
|
+
return new pW(e,n,o,r,[void 0,void 0,s],[i])}visitMap(t){const{type:e,offset:n=0,child:i=(new fW).visit({type:e.childType})}=t,s=kH(t.nullBitmap),o=xH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13899
|
+
return new pW(e,n,r,a,[o,void 0,s],[i])}}const mW=new fW
|
|
13900
|
+
function gW(t){return mW.visit(t)}class vW{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 bW(t){return t.reduce(((t,e)=>t+e.nullCount),0)}function yW(t){return t.reduce(((t,e,n)=>(t[n+1]=t[n]+e.length,t)),new Uint32Array(t.length+1))}function wW(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 xW(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 CW(t,e){return t.getValid(e)}function kW(t){function e(e,n,i){return t(e[n],i)}return function(t){return xW(this.data,this._offsets,t,e)}}function SW(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=xW(s,this._offsets,t,n)
|
|
13913
|
+
return e=void 0,o}}function _W(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):xW(s,this._offsets,i,n)
|
|
13919
|
+
return e=void 0,o}}class IW extends Nq{}function MW(t,e,n){if(void 0===e)return-1
|
|
13920
|
+
if(null===e)switch(t.typeId){case IU.Union:case IU.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 dW(n,t.offset+(e||0),t.length,n,rW)){if(!s)return i;++i}return-1}(t,n)}const i=jj.getVisitFn(t),s=iW(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 $W(t,e,n){const i=jj.getVisitFn(t),s=iW(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}IW.prototype.visitNull=function(t,e){return null===e&&t.length>0?0:-1},IW.prototype.visitBool=MW,IW.prototype.visitInt=MW,IW.prototype.visitInt8=MW,IW.prototype.visitInt16=MW,IW.prototype.visitInt32=MW,IW.prototype.visitInt64=MW,IW.prototype.visitUint8=MW,IW.prototype.visitUint16=MW,IW.prototype.visitUint32=MW,IW.prototype.visitUint64=MW,IW.prototype.visitFloat=MW,IW.prototype.visitFloat16=MW,IW.prototype.visitFloat32=MW,IW.prototype.visitFloat64=MW,IW.prototype.visitUtf8=MW,IW.prototype.visitLargeUtf8=MW,IW.prototype.visitBinary=MW,IW.prototype.visitLargeBinary=MW,IW.prototype.visitFixedSizeBinary=MW,IW.prototype.visitDate=MW,IW.prototype.visitDateDay=MW,IW.prototype.visitDateMillisecond=MW,IW.prototype.visitTimestamp=MW,IW.prototype.visitTimestampSecond=MW,IW.prototype.visitTimestampMillisecond=MW,IW.prototype.visitTimestampMicrosecond=MW,IW.prototype.visitTimestampNanosecond=MW,IW.prototype.visitTime=MW,IW.prototype.visitTimeSecond=MW,IW.prototype.visitTimeMillisecond=MW,IW.prototype.visitTimeMicrosecond=MW,IW.prototype.visitTimeNanosecond=MW,IW.prototype.visitDecimal=MW,IW.prototype.visitList=MW,IW.prototype.visitStruct=MW,IW.prototype.visitUnion=MW,IW.prototype.visitDenseUnion=$W,IW.prototype.visitSparseUnion=$W,IW.prototype.visitDictionary=MW,IW.prototype.visitInterval=MW,IW.prototype.visitIntervalDayTime=MW,IW.prototype.visitIntervalYearMonth=MW,IW.prototype.visitDuration=MW,IW.prototype.visitDurationSecond=MW,IW.prototype.visitDurationMillisecond=MW,IW.prototype.visitDurationMicrosecond=MW,IW.prototype.visitDurationNanosecond=MW,IW.prototype.visitFixedSizeList=MW,IW.prototype.visitMap=MW
|
|
13929
|
+
const EW=new IW
|
|
13930
|
+
class DW extends Nq{}function AW(t){const{type:e}=t
|
|
13931
|
+
if(0===t.nullCount&&1===t.stride&&(dq.isInt(e)&&64!==e.bitWidth||dq.isTime(e)&&64!==e.bitWidth||dq.isFloat(e)&&e.precision!==RH.HALF))return new vW(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 vW(t.data.length,(e=>{const i=t.data[e].length,s=t.slice(n,n+i)
|
|
13935
|
+
return n+=i,new TW(s)}))}class TW{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}}DW.prototype.visitNull=AW,DW.prototype.visitBool=AW,DW.prototype.visitInt=AW,DW.prototype.visitInt8=AW,DW.prototype.visitInt16=AW,DW.prototype.visitInt32=AW,DW.prototype.visitInt64=AW,DW.prototype.visitUint8=AW,DW.prototype.visitUint16=AW,DW.prototype.visitUint32=AW,DW.prototype.visitUint64=AW,DW.prototype.visitFloat=AW,DW.prototype.visitFloat16=AW,DW.prototype.visitFloat32=AW,DW.prototype.visitFloat64=AW,DW.prototype.visitUtf8=AW,DW.prototype.visitLargeUtf8=AW,DW.prototype.visitBinary=AW,DW.prototype.visitLargeBinary=AW,DW.prototype.visitFixedSizeBinary=AW,DW.prototype.visitDate=AW,DW.prototype.visitDateDay=AW,DW.prototype.visitDateMillisecond=AW,DW.prototype.visitTimestamp=AW,DW.prototype.visitTimestampSecond=AW,DW.prototype.visitTimestampMillisecond=AW,DW.prototype.visitTimestampMicrosecond=AW,DW.prototype.visitTimestampNanosecond=AW,DW.prototype.visitTime=AW,DW.prototype.visitTimeSecond=AW,DW.prototype.visitTimeMillisecond=AW,DW.prototype.visitTimeMicrosecond=AW,DW.prototype.visitTimeNanosecond=AW,DW.prototype.visitDecimal=AW,DW.prototype.visitList=AW,DW.prototype.visitStruct=AW,DW.prototype.visitUnion=AW,DW.prototype.visitDenseUnion=AW,DW.prototype.visitSparseUnion=AW,DW.prototype.visitDictionary=AW,DW.prototype.visitInterval=AW,DW.prototype.visitIntervalDayTime=AW,DW.prototype.visitIntervalYearMonth=AW,DW.prototype.visitDuration=AW,DW.prototype.visitDurationSecond=AW,DW.prototype.visitDurationMillisecond=AW,DW.prototype.visitDurationMicrosecond=AW,DW.prototype.visitDurationNanosecond=AW,DW.prototype.visitFixedSizeList=AW,DW.prototype.visitMap=AW
|
|
13936
|
+
const OW=new DW
|
|
13937
|
+
var RW
|
|
13938
|
+
const FW={},NW={}
|
|
13939
|
+
class LW{constructor(t){var e,n,i
|
|
13940
|
+
const s=t[0]instanceof LW?t.flatMap((t=>t.data)):t
|
|
13941
|
+
if(0===s.length||s.some((t=>!(t instanceof pW))))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}=FW[o.typeId],i=s[0]
|
|
13946
|
+
this.isValid=t=>CW(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,NW[o.typeId]),this._offsets=yW(s)}this.data=s,this.type=o,this.stride=Fq(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 bW(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${IU[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(eW(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return OW.visit(this)}concat(...t){return new LW(this.data.concat(t.flatMap((t=>t.data)).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new LW(tW(this,t,e,(({data:t,_offsets:e},n,i)=>wW(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 IU.Int:case IU.Float:case IU.Decimal:case IU.Time:case IU.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 LW(this.data.map((({children:e})=>e[t]))):null}get isMemoized(){return!!dq.isDictionary(this.type)&&this.data[0].dictionary.isMemoized}memoize(){if(dq.isDictionary(this.type)){const t=new BW(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 LW(e)}return new BW(this)}unmemoize(){if(dq.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 LW(e)}return this}}RW=Symbol.toStringTag,LW[RW]=(t=>{t.type=dq.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(IU).map((t=>IU[t])).filter((t=>"number"==typeof t&&t!==IU.NONE))
|
|
13957
|
+
for(const n of e){const e=jj.getVisitFnByTypeId(n),i=fj.getVisitFnByTypeId(n),s=EW.getVisitFnByTypeId(n)
|
|
13958
|
+
FW[n]={get:e,set:i,indexOf:s},NW[n]=Object.create(t,{isValid:{value:kW(CW)},get:{value:kW(jj.getVisitFnByTypeId(n))},set:{value:SW(fj.getVisitFnByTypeId(n))},indexOf:{value:_W(EW.getVisitFnByTypeId(n))}})}return"Vector"})(LW.prototype)
|
|
13959
|
+
class BW extends LW{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 BW(i.call(this,t,e))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new LW(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class PW{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 zW{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 zW).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+4),(e||new zW).__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):TH.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13966
|
+
return e?(t||new SU).__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 PW).__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 PW).__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 nU).__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,TH.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 VW{constructor(t=[],e,n,i=TH.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=qW(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 VW(n,this.metadata)}selectAt(t){const e=t.map((t=>this.fields[t])).filter(Boolean)
|
|
13976
|
+
return new VW(e,this.metadata)}assign(...t){const e=t[0]instanceof VW?t[0]:Array.isArray(t[0])?new VW(t[0]):new VW(t),n=[...this.fields],i=UW(UW(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:UW(UW(new Map,n[e].metadata),t.metadata)}))&&!1})),o=qW(s,new Map)
|
|
13978
|
+
return new VW([...n,...s],i,new Map([...this.dictionaries,...o]))}}VW.prototype.fields=null,VW.prototype.metadata=null,VW.prototype.dictionaries=null
|
|
13979
|
+
class HW{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 HW(`${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,HW.new(e,n,i,s)}}function UW(t,e){return new Map([...t||new Map,...e||new Map])}function qW(t,e=new Map){for(let n=-1,i=t.length;++n<i;){const i=t[n].type
|
|
13982
|
+
if(dq.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&&qW(i.children,e)}return e}HW.prototype.type=null,HW.prototype.name=null,HW.prototype.nullable=null,HW.prototype.metadata=null
|
|
13984
|
+
var jW=qH,WW=UH
|
|
13985
|
+
class GW{static decode(t){t=new WW(kH(t))
|
|
13986
|
+
const e=zW.getRootAsFooter(t),n=VW.decode(e.schema(),new Map,e.version())
|
|
13987
|
+
return new ZW(n,e)}static encode(t){const e=new jW,n=VW.encode(e,t.schema)
|
|
13988
|
+
zW.startRecordBatchesVector(e,t.numRecordBatches)
|
|
13989
|
+
for(const n of[...t.recordBatches()].slice().reverse())KW.encode(e,n)
|
|
13987
13990
|
const i=e.endVector()
|
|
13988
|
-
|
|
13989
|
-
for(const n of[...t.dictionaryBatches()].slice().reverse())
|
|
13991
|
+
zW.startDictionariesVector(e,t.numDictionaries)
|
|
13992
|
+
for(const n of[...t.dictionaryBatches()].slice().reverse())KW.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 zW.startFooter(e),zW.addSchema(e,n),zW.addVersion(e,TH.V5),zW.addRecordBatches(e,i),zW.addDictionaries(e,s),zW.finishFooterBuffer(e,zW.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=TH.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 ZW extends GW{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 KW.decode(e)}return null}getDictionaryBatch(t){if(t>=0&&t<this.numDictionaries){const e=this._footer.dictionaries(t)
|
|
13996
|
+
if(e)return KW.decode(e)}return null}}class KW{static decode(t){return new KW(t.metaDataLength(),t.bodyLength(),t.offset())}static encode(t,e){const{metaDataLength:n}=e,i=BigInt(e.offset),s=BigInt(e.bodyLength)
|
|
13997
|
+
return PW.createBlock(t,i,n,s)}constructor(t,e,n){this.metaDataLength=t,this.offset=EU(n),this.bodyLength=EU(e)}}const YW=Object.freeze({done:!0,value:void 0})
|
|
13998
|
+
class XW{constructor(t){this._json=t}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class JW{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 QW extends JW{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(YW)
|
|
14000
|
+
this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return $H.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return $H.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return e(this,void 0,void 0,(function*(){return yield this.abort(t),YW}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),YW}))}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(YW)}_ensureOpen(){if(this._closedPromiseResolve)return!0
|
|
14001
|
+
throw new Error("AsyncQueue is closed")}}class tG extends QW{write(t){if((t=kH(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?eH(this.toUint8Array(!0)):this.toUint8Array(!1).then(eH)}toUint8Array(t=!1){return t?yH(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 yH(s,o)[0]})))()}}class eG{constructor(t){t&&(this.source=new iG($H.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 nG{constructor(t){t instanceof nG?this.source=t.source:t instanceof tG?this.source=new sG($H.fromAsyncIterable(t)):mH(t)?this.source=new sG($H.fromNodeStream(t)):fH(t)?this.source=new sG($H.fromDOMStream(t)):uH(t)?this.source=new sG($H.fromDOMStream(t.body)):aH(t)?this.source=new sG($H.fromIterable(t)):(rH(t)||lH(t))&&(this.source=new sG($H.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 iG{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)||YW)}return(t){return Object.create(this.source.return&&this.source.return(t)||YW)}}class sG{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))||YW
|
|
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))||YW
|
|
14008
|
+
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}}class oG extends eG{constructor(t,e){super(),this.position=0,this.buffer=kH(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 rG extends nG{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 aG(t){return t<0&&(t=4294967295+t+1),`0x${t.toString(16)}`}const lG=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8]
|
|
14023
|
+
class cG{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`${aG(this.buffer[1])} ${aG(this.buffer[0])}`}}class dG extends cG{times(t){return this._times(t),this}plus(t){return this._plus(t),this}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.length,i=new dG(e)
|
|
14029
|
+
for(let e=0;e<n;){const s=8<n-e?8:n-e,o=new dG(new Uint32Array([Number.parseInt(t.slice(e,e+s),10),0])),r=new dG(new Uint32Array([lG[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;)dG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
|
|
14032
|
+
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 extends cG{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 hG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return hG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.startsWith("-"),i=t.length,s=new hG(e)
|
|
14034
|
+
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])),r=new hG(new Uint32Array([lG[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;)hG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
|
|
14037
|
+
return e}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)}}class uG{constructor(t){this.buffer=t}high(){return new hG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new hG(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 dG(new Uint32Array([this.buffer[3],0])),n=new dG(new Uint32Array([this.buffer[2],0])),i=new dG(new Uint32Array([this.buffer[1],0])),s=new dG(new Uint32Array([this.buffer[0],0])),o=new dG(new Uint32Array([t.buffer[3],0])),r=new dG(new Uint32Array([t.buffer[2],0])),a=new dG(new Uint32Array([t.buffer[1],0])),l=new dG(new Uint32Array([t.buffer[0],0]))
|
|
14038
|
+
let c=dG.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 dG(new Uint32Array([c.high(),0]))
|
|
14041
|
+
c=dG.multiply(i,l),d.plus(c),c=dG.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 dG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(dG.multiply(n,l)).plus(dG.multiply(i,a)).plus(dG.multiply(s,r)),this.buffer[3]+=dG.multiply(e,l).plus(dG.multiply(n,a)).plus(dG.multiply(i,r)).plus(dG.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`${aG(this.buffer[3])} ${aG(this.buffer[2])} ${aG(this.buffer[1])} ${aG(this.buffer[0])}`}static multiply(t,e){return new uG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new uG(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return uG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return uG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new uG(e)
|
|
14044
|
+
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new uG(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0,0,0])),r=new uG(new Uint32Array([lG[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;)uG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+16*n,4))
|
|
14047
|
+
return e}}class pG extends Nq{constructor(t,e,n,i,s=TH.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 HW?t.type:t)}visitNull(t,{length:e}=this.nextFieldNode()){return gW({type:t,length:e})}visitBool(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitInt(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFloat(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({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 gW({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 gW({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 gW({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 gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDate(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTimestamp(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTime(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDecimal(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitList(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({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 gW({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<TH.V5&&this.readNullBitmap(t,n),t.mode===OH.Sparse?this.visitSparseUnion(t,{length:e,nullCount:n}):this.visitDenseUnion(t,{length:e,nullCount:n})}visitDenseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({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 gW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),children:this.visitMany(t.children)})}visitDictionary(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({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 gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDuration(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFixedSizeList(t,{length:e,nullCount:n}=this.nextFieldNode()){return gW({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 gW({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 fG extends pG{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):cW(this.sources[n])}readOffsets(t,{offset:e}=this.nextBufferRange()){return wH(Uint8Array,wH(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return wH(Uint8Array,wH(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:n}=this
|
|
14048
|
+
return dq.isTimestamp(t)||(dq.isInt(t)||dq.isTime(t))&&64===t.bitWidth||dq.isDuration(t)||dq.isDate(t)&&t.unit===FH.MILLISECOND?wH(Uint8Array,hG.convertArray(n[e])):dq.isDecimal(t)?wH(Uint8Array,uG.convertArray(n[e])):dq.isBinary(t)||dq.isLargeBinary(t)||dq.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]):dq.isBool(t)?cW(n[e]):dq.isUtf8(t)||dq.isLargeUtf8(t)?iH(n[e].join("")):wH(Uint8Array,wH(t.ArrayType,n[e].map((t=>+t))))}}class mG extends Nq{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 gG(t,e){return e instanceof t.constructor}function vG(t,e){return t===e||gG(t,e)}function bG(t,e){return t===e||gG(t,e)&&t.bitWidth===e.bitWidth&&t.isSigned===e.isSigned}function yG(t,e){return t===e||gG(t,e)&&t.precision===e.precision}function wG(t,e){return t===e||gG(t,e)&&t.unit===e.unit}function xG(t,e){return t===e||gG(t,e)&&t.unit===e.unit&&t.timezone===e.timezone}function CG(t,e){return t===e||gG(t,e)&&t.unit===e.unit&&t.bitWidth===e.bitWidth}function kG(t,e){return t===e||gG(t,e)&&t.mode===e.mode&&t.typeIds.every(((t,n)=>t===e.typeIds[n]))&&IG.compareManyFields(t.children,e.children)}function SG(t,e){return t===e||gG(t,e)&&t.unit===e.unit}function _G(t,e){return t===e||gG(t,e)&&t.unit===e.unit}mG.prototype.visitNull=vG,mG.prototype.visitBool=vG,mG.prototype.visitInt=bG,mG.prototype.visitInt8=bG,mG.prototype.visitInt16=bG,mG.prototype.visitInt32=bG,mG.prototype.visitInt64=bG,mG.prototype.visitUint8=bG,mG.prototype.visitUint16=bG,mG.prototype.visitUint32=bG,mG.prototype.visitUint64=bG,mG.prototype.visitFloat=yG,mG.prototype.visitFloat16=yG,mG.prototype.visitFloat32=yG,mG.prototype.visitFloat64=yG,mG.prototype.visitUtf8=vG,mG.prototype.visitLargeUtf8=vG,mG.prototype.visitBinary=vG,mG.prototype.visitLargeBinary=vG,mG.prototype.visitFixedSizeBinary=function(t,e){return t===e||gG(t,e)&&t.byteWidth===e.byteWidth},mG.prototype.visitDate=wG,mG.prototype.visitDateDay=wG,mG.prototype.visitDateMillisecond=wG,mG.prototype.visitTimestamp=xG,mG.prototype.visitTimestampSecond=xG,mG.prototype.visitTimestampMillisecond=xG,mG.prototype.visitTimestampMicrosecond=xG,mG.prototype.visitTimestampNanosecond=xG,mG.prototype.visitTime=CG,mG.prototype.visitTimeSecond=CG,mG.prototype.visitTimeMillisecond=CG,mG.prototype.visitTimeMicrosecond=CG,mG.prototype.visitTimeNanosecond=CG,mG.prototype.visitDecimal=vG,mG.prototype.visitList=function(t,e){return t===e||gG(t,e)&&t.children.length===e.children.length&&IG.compareManyFields(t.children,e.children)},mG.prototype.visitStruct=function(t,e){return t===e||gG(t,e)&&t.children.length===e.children.length&&IG.compareManyFields(t.children,e.children)},mG.prototype.visitUnion=kG,mG.prototype.visitDenseUnion=kG,mG.prototype.visitSparseUnion=kG,mG.prototype.visitDictionary=function(t,e){return t===e||gG(t,e)&&t.id===e.id&&t.isOrdered===e.isOrdered&&IG.visit(t.indices,e.indices)&&IG.visit(t.dictionary,e.dictionary)},mG.prototype.visitInterval=SG,mG.prototype.visitIntervalDayTime=SG,mG.prototype.visitIntervalYearMonth=SG,mG.prototype.visitDuration=_G,mG.prototype.visitDurationSecond=_G,mG.prototype.visitDurationMillisecond=_G,mG.prototype.visitDurationMicrosecond=_G,mG.prototype.visitDurationNanosecond=_G,mG.prototype.visitFixedSizeList=function(t,e){return t===e||gG(t,e)&&t.listSize===e.listSize&&t.children.length===e.children.length&&IG.compareManyFields(t.children,e.children)},mG.prototype.visitMap=function(t,e){return t===e||gG(t,e)&&t.keysSorted===e.keysSorted&&t.children.length===e.children.length&&IG.compareManyFields(t.children,e.children)}
|
|
14051
|
+
const IG=new mG
|
|
14052
|
+
function MG(t,e){return IG.compareSchemas(t,e)}function $G(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=EG(n,r,d,e,s),r>0&&(i[o++]=gW({type:new Mq(n),length:r,nullCount:0,children:d.slice()})))}return[t=t.assign(n),i.map((e=>new OG(t,e)))]}(t,e.map((t=>t.data.concat())))}function EG(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:gW({type:i.type,length:e,nullCount:e,nullBitmap:new Uint8Array(r)})}}return n}var DG,AG
|
|
14063
|
+
class TG{constructor(...t){var e,n
|
|
14064
|
+
if(0===t.length)return this.batches=[],this.schema=new VW([]),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 VW&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop())
|
|
14067
|
+
const o=t=>{if(t){if(t instanceof OG)return[t]
|
|
14068
|
+
if(t instanceof TG)return t.batches
|
|
14069
|
+
if(t instanceof pW){if(t.type instanceof Mq)return[new OG(new VW(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 LW([t[e]]))),s=null!=i?i:new VW(e.map(((t,e)=>new HW(String(t),n[e].type,n[e].nullable)))),[,o]=$G(s,n)
|
|
14072
|
+
return 0===o.length?[new OG(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 VW([]),!(i instanceof VW))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
|
|
14074
|
+
for(const t of r){if(!(t instanceof OG))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
|
|
14075
|
+
if(!MG(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:yW(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=bW(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(eW(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?OW.visit(new LW(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 TG(e,n.map((t=>new OG(e,t))))}slice(t,e){const n=this.schema;[t,e]=tW({length:this.numRows},t,e)
|
|
14077
|
+
const i=wW(this.data,this._offsets,t,e)
|
|
14078
|
+
return new TG(n,i.map((t=>new OG(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=gW({type:n,length:0,nullCount:0})
|
|
14080
|
+
e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new LW(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 LW([gW({type:new hq,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]=$G(n,r)}return new TG(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 TG(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 TG(...$G(s,o))}}DG=Symbol.toStringTag,TG[DG]=(t=>(t.schema=null,t.batches=[],t._offsets=new Uint32Array([0]),t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,t.isValid=kW(CW),t.get=kW(jj.getVisitFn(IU.Struct)),t.set=SW(fj.getVisitFn(IU.Struct)),t.indexOf=_W(EW.getVisitFn(IU.Struct)),"Table"))(TG.prototype)
|
|
14088
|
+
let OG=class t{constructor(...t){switch(t.length){case 2:if([this.schema]=t,!(this.schema instanceof VW))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.")
|
|
14089
|
+
if([,this.data=gW({nullCount:0,type:new Mq(this.schema.fields),children:this.schema.fields.map((t=>gW({type:t.type,nullCount:0})))})]=t,!(this.data instanceof pW))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=RG(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]=HW.new({name:n,type:e[n].type,nullable:!0}),t)),{length:0,fields:new Array,children:new Array}),o=new VW(n),r=gW({type:new Mq(n),length:s,children:i,nullCount:0});[this.schema,this.data]=RG(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=FG(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 jj.visit(this.data,t)}at(t){return this.get(eW(t,this.numRows))}set(t,e){return fj.visit(this.data,t,e)}indexOf(t,e){return EW.visit(this.data,t,e)}[Symbol.iterator](){return OW.visit(new LW([this.data]))}toArray(){return[...this]}concat(...t){return new TG(this.schema,[this,...t])}slice(e,n){const[i]=new LW([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 LW([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 LW([gW({type:new hq,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 VW(t,new Map(this.schema.metadata)),s=gW({type:new Mq(t),children:o})}return new t(i,s)}select(e){const n=this.schema.select(e),i=new Mq(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,gW({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=gW({type:new Mq(n.fields),length:this.numRows,children:i})
|
|
14097
14100
|
return new t(n,s)}}
|
|
14098
|
-
function
|
|
14101
|
+
function RG(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:gW({type:l.type,length:n,nullCount:n,nullBitmap:new Uint8Array(r)}))}return[t.assign(s),gW({type:new Mq(s),length:n,children:o})]}function FG(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)||[]])FG(o.children,null==t?void 0:t.children,n)
|
|
14107
|
+
if(dq.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}AG=Symbol.toStringTag,OG[AG]=(t=>(t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(OG.prototype)
|
|
14109
|
+
class NG extends OG{constructor(t){const e=t.fields.map((t=>gW({type:t.type})))
|
|
14110
|
+
super(t,gW({type:new Mq(t.fields),nullCount:0,children:e}))}}let LG=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):TH.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6)
|
|
14112
|
+
return t?this.bb.readUint8(this.bb_pos+t):_U.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 nU).__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,TH.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,_U.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 BG=new class extends Nq{visit(t,e){return null==t||null==e?void 0:super.visit(t,e)}visitNull(t,e){return gU.startNull(e),gU.endNull(e)}visitInt(t,e){return tU.startInt(e),tU.addBitWidth(e,t.bitWidth),tU.addIsSigned(e,t.isSigned),tU.endInt(e)}visitFloat(t,e){return dU.startFloatingPoint(e),dU.addPrecision(e,t.precision),dU.endFloatingPoint(e)}visitBinary(t,e){return iU.startBinary(e),iU.endBinary(e)}visitLargeBinary(t,e){return uU.startLargeBinary(e),uU.endLargeBinary(e)}visitBool(t,e){return sU.startBool(e),sU.endBool(e)}visitUtf8(t,e){return xU.startUtf8(e),xU.endUtf8(e)}visitLargeUtf8(t,e){return pU.startLargeUtf8(e),pU.endLargeUtf8(e)}visitDecimal(t,e){return rU.startDecimal(e),rU.addScale(e,t.scale),rU.addPrecision(e,t.precision),rU.addBitWidth(e,t.bitWidth),rU.endDecimal(e)}visitDate(t,e){return oU.startDate(e),oU.addUnit(e,t.unit),oU.endDate(e)}visitTime(t,e){return bU.startTime(e),bU.addUnit(e,t.unit),bU.addBitWidth(e,t.bitWidth),bU.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0
|
|
14120
|
+
return yU.startTimestamp(e),yU.addUnit(e,t.unit),void 0!==n&&yU.addTimezone(e,n),yU.endTimestamp(e)}visitInterval(t,e){return hU.startInterval(e),hU.addUnit(e,t.unit),hU.endInterval(e)}visitDuration(t,e){return aU.startDuration(e),aU.addUnit(e,t.unit),aU.endDuration(e)}visitList(t,e){return fU.startList(e),fU.endList(e)}visitStruct(t,e){return vU.startStruct_(e),vU.endStruct_(e)}visitUnion(t,e){wU.startTypeIdsVector(e,t.typeIds.length)
|
|
14121
|
+
const n=wU.createTypeIdsVector(e,t.typeIds)
|
|
14122
|
+
return wU.startUnion(e),wU.addMode(e,t.mode),wU.addTypeIds(e,n),wU.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e)
|
|
14123
|
+
return eU.startDictionaryEncoding(e),eU.addId(e,BigInt(t.id)),eU.addIsOrdered(e,t.isOrdered),void 0!==n&&eU.addIndexType(e,n),eU.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return lU.startFixedSizeBinary(e),lU.addByteWidth(e,t.byteWidth),lU.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return cU.startFixedSizeList(e),cU.addListSize(e,t.listSize),cU.endFixedSizeList(e)}visitMap(t,e){return mU.startMap(e),mU.addKeysSorted(e,t.keysSorted),mU.endMap(e)}}
|
|
14124
|
+
function PG(t){return new KG(t.count,VG(t.columns),HG(t.columns))}function zG(t,e){return(t.children||[]).filter(Boolean).map((t=>HW.fromJSON(t,e)))}function VG(t){return(t||[]).reduce(((t,e)=>{return[...t,new JG(e.count,(n=e.VALIDITY,(n||[]).reduce(((t,e)=>t+ +(0===e)),0))),...VG(e.children)]
|
|
14125
|
+
var n}),[])}function HG(t,e=[]){for(let n=-1,i=(t||[]).length;++n<i;){const i=t[n]
|
|
14126
|
+
i.VALIDITY&&e.push(new XG(e.length,i.VALIDITY.length)),i.TYPE_ID&&e.push(new XG(e.length,i.TYPE_ID.length)),i.OFFSET&&e.push(new XG(e.length,i.OFFSET.length)),i.DATA&&e.push(new XG(e.length,i.DATA.length)),e=HG(i.children,e)}return e}function UG(t=[]){return new Map(t.map((({key:t,value:e})=>[t,e])))}function qG(t){return new uq(t.isSigned,t.bitWidth)}function jG(t,e){const n=t.type.name
|
|
14127
|
+
switch(n){case"NONE":case"null":return new hq
|
|
14128
|
+
case"binary":return new mq
|
|
14129
|
+
case"largebinary":return new gq
|
|
14130
|
+
case"utf8":return new vq
|
|
14131
|
+
case"largeutf8":return new bq
|
|
14132
|
+
case"bool":return new yq
|
|
14133
|
+
case"list":return new Iq((e||[])[0])
|
|
14134
|
+
case"struct":case"struct_":return new Mq(e||[])}switch(n){case"int":{const e=t.type
|
|
14135
|
+
return new uq(e.isSigned,e.bitWidth)}case"floatingpoint":{const e=t.type
|
|
14136
|
+
return new fq(RH[e.precision])}case"decimal":{const e=t.type
|
|
14137
|
+
return new wq(e.scale,e.precision,e.bitWidth)}case"date":{const e=t.type
|
|
14138
|
+
return new xq(FH[e.unit])}case"time":{const e=t.type
|
|
14139
|
+
return new Cq(NH[e.unit],e.bitWidth)}case"timestamp":{const e=t.type
|
|
14140
|
+
return new kq(NH[e.unit],e.timezone)}case"interval":{const e=t.type
|
|
14141
|
+
return new Sq(LH[e.unit])}case"duration":{const e=t.type
|
|
14142
|
+
return new _q(NH[e.unit])}case"union":{const n=t.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("")
|
|
14143
|
+
return new $q(OH[o],n.typeIds||[],e||[])}case"fixedsizebinary":{const e=t.type
|
|
14144
|
+
return new Eq(e.byteWidth)}case"fixedsizelist":{const n=t.type
|
|
14145
|
+
return new Dq(n.listSize,(e||[])[0])}case"map":{const n=t.type
|
|
14146
|
+
return new Aq((e||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}var WG=qH,GG=UH
|
|
14147
|
+
class ZG{static fromJSON(t,e){const n=new ZG(0,TH.V5,e)
|
|
14148
|
+
return n._createHeader=function(t,e){return()=>{switch(e){case _U.Schema:return VW.fromJSON(t)
|
|
14149
|
+
case _U.RecordBatch:return KG.fromJSON(t)
|
|
14150
|
+
case _U.DictionaryBatch:return YG.fromJSON(t)}throw new Error(`Unrecognized Message type: { name: ${_U[e]}, type: ${e} }`)}}(t,e),n}static decode(t){t=new GG(kH(t))
|
|
14151
|
+
const e=LG.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new ZG(n,i,s)
|
|
14152
|
+
return o._createHeader=function(t,e){return()=>{switch(e){case _U.Schema:return VW.decode(t.header(new SU),new Map,t.version())
|
|
14153
|
+
case _U.RecordBatch:return KG.decode(t.header(new YH),t.version())
|
|
14154
|
+
case _U.DictionaryBatch:return YG.decode(t.header(new XH),t.version())}throw new Error(`Unrecognized Message type: { name: ${_U[e]}, type: ${e} }`)}}(e,s),o}static encode(t){const e=new WG
|
|
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=VW.encode(e,t.header()):t.isRecordBatch()?n=KG.encode(e,t.header()):t.isDictionaryBatch()&&(n=YG.encode(e,t.header())),LG.startMessage(e),LG.addVersion(e,TH.V5),LG.addHeader(e,n),LG.addHeaderType(e,t.headerType),LG.addBodyLength(e,BigInt(t.bodyLength)),LG.finishMessageBuffer(e,LG.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof VW)return new ZG(0,TH.V5,_U.Schema,t)
|
|
14157
|
+
if(t instanceof KG)return new ZG(e,TH.V5,_U.RecordBatch,t)
|
|
14158
|
+
if(t instanceof YG)return new ZG(e,TH.V5,_U.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===_U.Schema}isRecordBatch(){return this.headerType===_U.RecordBatch}isDictionaryBatch(){return this.headerType===_U.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=EU(t)}}class KG{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=EU(t)}}class YG{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=EU(e)}}class XG{constructor(t,e){this.offset=EU(t),this.length=EU(e)}}class JG{constructor(t,e){this.length=EU(t),this.nullCount=EU(e)}}function QG(t,e){const n=[]
|
|
14160
|
+
for(let i,s=-1,o=-1,r=t.childrenLength();++s<r;)(i=t.children(s))&&(n[++o]=HW.decode(i,e))
|
|
14161
|
+
return n}function tZ(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 eZ(t){return new uq(t.isSigned(),t.bitWidth())}function nZ(t,e){const n=t.typeType()
|
|
14164
|
+
switch(n){case CU.NONE:case CU.Null:return new hq
|
|
14165
|
+
case CU.Binary:return new mq
|
|
14166
|
+
case CU.LargeBinary:return new gq
|
|
14167
|
+
case CU.Utf8:return new vq
|
|
14168
|
+
case CU.LargeUtf8:return new bq
|
|
14169
|
+
case CU.Bool:return new yq
|
|
14170
|
+
case CU.List:return new Iq((e||[])[0])
|
|
14171
|
+
case CU.Struct_:return new Mq(e||[])}switch(n){case CU.Int:{const e=t.type(new tU)
|
|
14172
|
+
return new uq(e.isSigned(),e.bitWidth())}case CU.FloatingPoint:{const e=t.type(new dU)
|
|
14173
|
+
return new fq(e.precision())}case CU.Decimal:{const e=t.type(new rU)
|
|
14174
|
+
return new wq(e.scale(),e.precision(),e.bitWidth())}case CU.Date:{const e=t.type(new oU)
|
|
14175
|
+
return new xq(e.unit())}case CU.Time:{const e=t.type(new bU)
|
|
14176
|
+
return new Cq(e.unit(),e.bitWidth())}case CU.Timestamp:{const e=t.type(new yU)
|
|
14177
|
+
return new kq(e.unit(),e.timezone())}case CU.Interval:{const e=t.type(new hU)
|
|
14178
|
+
return new Sq(e.unit())}case CU.Duration:{const e=t.type(new aU)
|
|
14179
|
+
return new _q(e.unit())}case CU.Union:{const n=t.type(new wU)
|
|
14180
|
+
return new $q(n.mode(),n.typeIdsArray()||[],e||[])}case CU.FixedSizeBinary:{const e=t.type(new lU)
|
|
14181
|
+
return new Eq(e.byteWidth())}case CU.FixedSizeList:{const n=t.type(new cU)
|
|
14182
|
+
return new Dq(n.listSize(),(e||[])[0])}case CU.Map:{const n=t.type(new mU)
|
|
14183
|
+
return new Aq((e||[])[0],n.keysSorted())}}throw new Error(`Unrecognized type: "${CU[n]}" (${n})`)}HW.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
|
+
dq.isDictionary(o)?(r=o.dictionary.typeId,s=BG.visit(o,t),i=BG.visit(o.dictionary,t)):i=BG.visit(o,t)
|
|
14187
|
+
const a=(o.children||[]).map((e=>HW.encode(t,e))),l=kU.createChildrenVector(t,a),c=e.metadata&&e.metadata.size>0?kU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
|
|
14188
|
+
return nU.startKeyValue(t),nU.addKey(t,i),nU.addValue(t,s),nU.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
|
+
kU.startField(t),kU.addType(t,i),kU.addTypeType(t,r),kU.addChildren(t,l),kU.addNullable(t,!!e.nullable),-1!==n&&kU.addName(t,n);-1!==s&&kU.addDictionary(t,s);-1!==c&&kU.addCustomMetadata(t,c)
|
|
14191
|
+
return kU.endField(t)},HW.decode=function(t,e){let n,i,s,o,r,a
|
|
14192
|
+
e&&(a=t.dictionary())?e.has(n=EU(a.id()))?(o=(o=a.indexType())?eZ(o):new pq,r=new Rq(e.get(n),o,n,a.isOrdered()),i=new HW(t.name(),r,t.nullable(),tZ(t))):(o=(o=a.indexType())?eZ(o):new pq,e.set(n,s=nZ(t,QG(t,e))),r=new Rq(s,o,n,a.isOrdered()),i=new HW(t.name(),r,t.nullable(),tZ(t))):(s=nZ(t,QG(t,e)),i=new HW(t.name(),s,t.nullable(),tZ(t)))
|
|
14193
|
+
return i||null},HW.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)?qG(i):new pq,a=new Rq(e.get(n),i,n,o.isOrdered),s=new HW(t.name,a,t.nullable,UG(t.metadata))):(i=(i=o.indexType)?qG(i):new pq,e.set(n,r=jG(t,zG(t,e))),a=new Rq(r,i,n,o.isOrdered),s=new HW(t.name,a,t.nullable,UG(t.metadata))):(r=jG(t,zG(t,e)),s=new HW(t.name,r,t.nullable,UG(t.metadata))),s||null},VW.encode=function(t,e){const n=e.fields.map((e=>HW.encode(t,e)))
|
|
14195
|
+
SU.startFieldsVector(t,n.length)
|
|
14196
|
+
const i=SU.createFieldsVector(t,n),s=e.metadata&&e.metadata.size>0?SU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
|
|
14197
|
+
return nU.startKeyValue(t),nU.addKey(t,i),nU.addValue(t,s),nU.endKeyValue(t)}))):-1
|
|
14198
|
+
SU.startSchema(t),SU.addFields(t,i),SU.addEndianness(t,iZ?JH.Little:JH.Big),-1!==s&&SU.addCustomMetadata(t,s)
|
|
14199
|
+
return SU.endSchema(t)},VW.decode=function(t,e=new Map,n=TH.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]=HW.decode(i,e))
|
|
14198
14201
|
return n}(t,e)
|
|
14199
|
-
return new
|
|
14200
|
-
|
|
14201
|
-
for(const e of n.slice().reverse())
|
|
14202
|
+
return new VW(i,tZ(t),e,n)},VW.fromJSON=function(t,e=new Map){return new VW(function(t,e){return(t.fields||[]).filter(Boolean).map((t=>HW.fromJSON(t,e)))}(t,e),UG(t.metadata),e)},KG.encode=function(t,e){const n=e.nodes||[],i=e.buffers||[]
|
|
14203
|
+
YH.startNodesVector(t,n.length)
|
|
14204
|
+
for(const e of n.slice().reverse())JG.encode(t,e)
|
|
14202
14205
|
const s=t.endVector()
|
|
14203
|
-
|
|
14204
|
-
for(const e of i.slice().reverse())
|
|
14206
|
+
YH.startBuffersVector(t,i.length)
|
|
14207
|
+
for(const e of i.slice().reverse())XG.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 YH.startRecordBatch(t),YH.addLength(t,BigInt(e.length)),YH.addNodes(t,s),YH.addBuffers(t,o),YH.endRecordBatch(t)},KG.decode=function(t,e=TH.V5){if(null!==t.compression())throw new Error("Record batch compression not implemented")
|
|
14210
|
+
return new KG(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]=JG.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<TH.V4&&(i.bb_pos+=8*(s+1)),n[++o]=XG.decode(i))
|
|
14214
|
+
return n}(t,e))},KG.fromJSON=PG,YG.encode=function(t,e){const n=KG.encode(t,e.data)
|
|
14215
|
+
return XH.startDictionaryBatch(t),XH.addId(t,BigInt(e.id)),XH.addIsDelta(t,e.isDelta),XH.addData(t,n),XH.endDictionaryBatch(t)},YG.decode=function(t,e=TH.V5){return new YG(KG.decode(t.data(),e),t.id(),t.isDelta())},YG.fromJSON=function(t){return new YG(PG(t.data),t.id,t.isDelta)},JG.encode=function(t,e){return KH.createFieldNode(t,BigInt(e.length),BigInt(e.nullCount))},JG.decode=function(t){return new JG(t.length(),t.nullCount())},XG.encode=function(t,e){return ZH.createBuffer(t,BigInt(e.offset),BigInt(e.length))},XG.decode=function(t){return new XG(t.offset(),t.length())}
|
|
14216
|
+
const iZ=(()=>{const t=new ArrayBuffer(2)
|
|
14217
|
+
return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]})(),sZ=t=>`Expected ${_U[t]} Message in stream, but was null or length 0.`,oZ=t=>`Header pointer of flatbuffer-encoded ${_U[t]} Message is null or length 0.`,rZ=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,aZ=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`
|
|
14218
|
+
class lZ{constructor(t){this.source=t instanceof eG?t:new eG(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?YW: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(sZ(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=kH(this.source.read(t))
|
|
14224
|
+
if(e.byteLength<t)throw new Error(aZ(t,e.byteLength))
|
|
14225
|
+
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){const e=_U.Schema,n=this.readMessage(e),i=null==n?void 0:n.header()
|
|
14226
|
+
if(t&&!i)throw new Error(oZ(e))
|
|
14227
|
+
return i}readMetadataLength(){const t=this.source.read(hZ),e=t&&new UH(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 YW
|
|
14230
|
+
if(e.byteLength<t)throw new Error(rZ(t,e.byteLength))
|
|
14231
|
+
return{done:!1,value:ZG.decode(e)}}}class cZ{constructor(t,e){this.source=t instanceof nG?t:hH(t)?new rG(t,e):new nG(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?YW: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(sZ(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=kH(yield this.source.read(t))
|
|
14237
|
+
if(e.byteLength<t)throw new Error(aZ(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=_U.Schema,n=yield this.readMessage(e),i=null==n?void 0:n.header()
|
|
14239
|
+
if(t&&!i)throw new Error(oZ(e))
|
|
14240
|
+
return i}))}readMetadataLength(){return e(this,void 0,void 0,(function*(){const t=yield this.source.read(hZ),e=t&&new UH(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 YW
|
|
14243
|
+
if(e.byteLength<t)throw new Error(rZ(t,e.byteLength))
|
|
14244
|
+
return{done:!1,value:ZG.decode(e)}}))}}class dZ extends lZ{constructor(t){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=t instanceof XW?t:new XW(t)}next(){const{_json:t}=this
|
|
14242
14245
|
if(!this._schema){this._schema=!0
|
|
14243
|
-
return{done:!1,value:
|
|
14246
|
+
return{done:!1,value:ZG.fromJSON(t.schema,_U.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:ZG.fromJSON(e,_U.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:ZG.fromJSON(e,_U.RecordBatch)}}return this._body=[],YW}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(sZ(t))
|
|
14253
|
+
return e.value}readSchema(){const t=_U.Schema,e=this.readMessage(t),n=null==e?void 0:e.header()
|
|
14254
|
+
if(!e||!n)throw new Error(oZ(t))
|
|
14255
|
+
return n}}const hZ=4,uZ="ARROW1",pZ=new Uint8Array(6)
|
|
14256
|
+
for(let t=0;t<6;t+=1)pZ[t]=uZ.codePointAt(t)
|
|
14257
|
+
function fZ(t,e=0){for(let n=-1,i=pZ.length;++n<i;)if(pZ[n]!==t[e+n])return!1
|
|
14258
|
+
return!0}const mZ=pZ.length,gZ=mZ+hZ,vZ=2*mZ+hZ
|
|
14259
|
+
class bZ extends JW{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 rH(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 $H.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return $H.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 bZ?t:cH(t)?function(t){return new yZ(new $Z(t))}(t):hH(t)?function(t){return e(this,void 0,void 0,(function*(){const{size:e}=yield t.stat(),n=new rG(t,e)
|
|
14261
|
+
return e>=vZ&&fZ(yield n.readAt(0,mZ+7&-8))?new CZ(new MZ(n)):new wZ(new _Z(n))}))}(t):rH(t)?(()=>e(this,void 0,void 0,(function*(){return yield bZ.from(yield t)})))():uH(t)||fH(t)||mH(t)||lH(t)?function(t){return e(this,void 0,void 0,(function*(){const e=yield t.peek(mZ+7&-8)
|
|
14262
|
+
return e&&e.byteLength>=4?fZ(e)?new xZ(new IZ(yield t.read())):new wZ(new _Z(t)):new wZ(new _Z(function(){return s(this,arguments,(function*(){}))}()))}))}(new nG(t)):function(t){const e=t.peek(mZ+7&-8)
|
|
14263
|
+
return e&&e.byteLength>=4?fZ(e)?new xZ(new IZ(t.read())):new yZ(new SZ(t)):new yZ(new SZ(function*(){}()))}(new eG(t))}static readAll(t){return t instanceof bZ?t.isSync()?DZ(t):AZ(t):cH(t)||ArrayBuffer.isView(t)||aH(t)||dH(t)?DZ(t):AZ(t)}}class yZ extends bZ{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 wZ extends bZ{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 xZ extends yZ{constructor(t){super(t),this._impl=t}}class CZ extends wZ{constructor(t){super(t),this._impl=t}}class kZ{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=gW({type:new Mq(this.schema.fields),length:t.length,children:n})
|
|
14268
|
+
return new OG(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 LW(a)):new LW(a)).memoize()}return r.memoize()}_loadVectors(t,e,n){return new pG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class SZ extends kZ{constructor(t,e){super(e),this._reader=cH(t)?new dZ(this._handle=t):new lZ(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=EZ(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):YW}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):YW}next(){if(this.closed)return YW
|
|
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 NG(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class _Z extends kZ{constructor(t,e){super(e),this._reader=new cZ(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=EZ(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):YW}))}return(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):YW}))}next(){return e(this,void 0,void 0,(function*(){if(this.closed)return YW
|
|
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 NG(this.schema)}):yield this.return()}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){return yield this._reader.readMessage(t)}))}}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){super(t instanceof oG?t:new oG(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(_U.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(_U.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-gZ,n=t.readInt32(e),i=t.readAt(e-n,n)
|
|
14298
|
+
return GW.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 MZ extends _Z{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 rG?t:new rG(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(_U.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(_U.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-gZ,n=yield t.readInt32(e),i=yield t.readAt(e-n,n)
|
|
14316
|
+
return GW.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 $Z extends SZ{constructor(t,e){super(t,e)}_loadVectors(t,e,n){return new fG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}function EZ(t,e){return e&&"boolean"==typeof e.autoDestroy?e.autoDestroy:t.autoDestroy}function*DZ(t){const e=bZ.from(t)
|
|
14318
|
+
try{if(!e.open({autoDestroy:!1}).closed)do{yield e}while(!e.reset().open().closed)}finally{e.cancel()}}function AZ(t){return s(this,arguments,(function*(){const e=yield i(bZ.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 TZ=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
|
+
`,OZ=Mt`
|
|
14348
14351
|
${Vs("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 RZ(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function FZ(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function NZ(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=RZ,n=(e,n)=>RZ(t(e),n),i=(e,n)=>t(e)-n):(e=t===RZ||t===FZ?t:LZ,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 LZ(){return 0}function BZ(t){return null===t?NaN:+t}const PZ=NZ(RZ).right
|
|
14447
|
+
NZ(BZ).center
|
|
14448
|
+
class zZ extends Map{constructor(t,e=HZ){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(VZ(this,t))}has(t){return super.has(VZ(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 VZ({_intern:t,_key:e},n){const i=e(n)
|
|
14452
|
+
return t.has(i)?t.get(i):n}function HZ(t){return null!==t&&"object"==typeof t?t.valueOf():t}const UZ=Math.sqrt(50),qZ=Math.sqrt(10),jZ=Math.sqrt(2)
|
|
14453
|
+
function WZ(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>=UZ?10:o>=qZ?5:o>=jZ?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?WZ(t,e,2*n):[a,l,c]}function GZ(t,e,n){return WZ(t=+t,e=+e,n=+n)[2]}function ZZ(t,e,n=BZ){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 KZ(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 YZ(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 XZ=Symbol("implicit")
|
|
14464
|
+
function JZ(){var t=new zZ,e=[],n=[],i=XZ
|
|
14462
14465
|
function s(s){let o=t.get(s)
|
|
14463
|
-
if(void 0===o){if(i!==
|
|
14466
|
+
if(void 0===o){if(i!==XZ)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 zZ
|
|
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 JZ(e,n).unknown(i)},YZ.apply(s,arguments),s}function QZ(){var t,e,n=JZ().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=KZ(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 QZ(i(),[o,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},YZ.apply(h(),arguments)}function tK(t){return+t}var eK=[0,1]
|
|
14475
|
+
function nK(t){return t}function iK(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n})
|
|
14476
|
+
var n}function sK(t,e,n){var i=t[0],s=t[1],o=e[0],r=e[1]
|
|
14477
|
+
return s<i?(i=iK(s,i),o=n(r,o)):(i=iK(i,s),o=n(o,r)),function(t){return o(i(t))}}function oK(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]=iK(t[r],t[r+1]),o[r]=n(e[r],e[r+1])
|
|
14479
|
+
return function(e){var n=PZ(t,e,1,i)-1
|
|
14480
|
+
return o[n](s[n](e))}}function rK(){var t,e,n,i,s,o,r=eK,a=eK,l=Mz,c=nK
|
|
14478
14481
|
function d(){var t,e,n,l=Math.min(r.length,a.length)
|
|
14479
|
-
return c!==
|
|
14482
|
+
return c!==nK&&(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?oK:sK,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),Cz)))(n)))},h.domain=function(t){return arguments.length?(r=Array.from(t,tK),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=$z,d()},h.clamp=function(t){return arguments.length?(c=!!t||nK,d()):c!==nK},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 aK(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 lK(t){return(t=aK(Math.abs(t)))?t[1]:NaN}var cK,dK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
14485
|
+
function hK(t){if(!(e=dK.exec(t)))throw new Error("invalid format: "+t)
|
|
14483
14486
|
var e
|
|
14484
|
-
return new
|
|
14487
|
+
return new uK({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 uK(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 pK(t,e){var n=aK(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")}hK.prototype=uK.prototype,uK.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 fK={"%":(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)=>pK(100*t,e),r:pK,s:function(t,e){var n=aK(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-(cK=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")+aK(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 mK(t){return t}var gK,vK,bK,yK=Array.prototype.map,wK=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
14496
|
+
function xK(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?mK:(e=yK.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?mK:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(yK.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=hK(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"):fK[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=fK[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?wK[8+cK/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=hK(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(lK(e)/3))),s=Math.pow(10,-i),o=wK[8+i/3]
|
|
14519
|
+
return function(t){return n(s*t)+o}}}}function CK(t,e,n,i){var s,o=function(t,e,n){n=+n
|
|
14520
|
+
const i=(e=+e)<(t=+t),s=i?GZ(e,t,n):GZ(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=hK(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(lK(e)/3)))-lK(Math.abs(t)))}(o,r))||(i.precision=s),bK(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,lK(e)-lK(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,-lK(Math.abs(t)))}(o))||(i.precision=s-2*("%"===i.type))}return vK(i)}function kK(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?WZ(e,t,n):WZ(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 CK(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=GZ(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 SK(){var t=rK()(nK,nK)
|
|
14544
|
+
return t.copy=function(){return e=t,SK().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())
|
|
14545
|
+
var e},YZ.apply(t,arguments),kK(t)}function _K(){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]=ZZ(e,t/s)
|
|
14548
|
+
return o}function o(e){return null==e||isNaN(e=+e)?t:n[PZ(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(RZ),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 _K().domain(e).range(n).unknown(t)},YZ.apply(o,arguments)}gK=xK({thousands:",",grouping:[3],currency:["$",""]}),vK=gK.format,bK=gK.formatPrefix
|
|
14553
|
+
const IK="bottom-left",MK="bottom-right",$K="top-left",EK="top",DK="show",AK="hide",TK="linear",OK="ordinal"
|
|
14554
|
+
class RK{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)?SK().domain(t.values.map((t=>+t))).range(t.colors):JZ().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===TK}isColorScaleOrdinal(t){return t===OK}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=eo(s)
|
|
14561
|
-
return null===o?this.emptyDieColor:(o=new Gs(o.r,o.g,o.b,this.calculateOpacity(i,n)),o.toStringWebRGBA())}}class
|
|
14564
|
+
return null===o?this.emptyDieColor:(o=new Gs(o.r,o.g,o.b,this.calculateOpacity(i,n)),o.toStringWebRGBA())}}class FK{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=QZ().domain(KZ(e.origin.x,e.origin.x+e.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
14575
|
+
return t===IK||t===$K?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(t,e,n){const i=_K().domain([0,n])
|
|
14576
|
+
return t===IK||t===$K?i.range(KZ(e.origin.x,e.origin.x+e.cols)):i.range(KZ(e.origin.x,e.origin.x+e.cols).reverse())}createVerticalScale(t,e,n){const i=QZ().domain(KZ(e.origin.y,e.origin.y+e.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
14577
|
+
return t===IK||t===MK?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(t,e,n){const i=_K().domain([0,n])
|
|
14578
|
+
return t===IK||t===MK?i.range(KZ(e.origin.y,e.origin.y+e.rows).reverse()):i.range(KZ(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 RK(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 NK{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?AK:DK,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 LK=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
|
|
14592
|
+
class BK extends wE{constructor(t){super(LK),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 PK{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&&dq.isInt(e.type)&&32===e.type.bitWidth&&dq.isInt(n.type)&&32===n.type.bitWidth&&dq.isFloat(i.type)&&i.type.precision===RH.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 zK=Symbol("Comlink.proxy"),VK=Symbol("Comlink.endpoint"),HK=Symbol("Comlink.releaseProxy"),UK=Symbol("Comlink.finalizer"),qK=Symbol("Comlink.thrown"),jK=t=>"object"==typeof t&&null!==t||"function"==typeof t,WK=new Map([["proxy",{canHandle:t=>jK(t)&&t[zK],serialize(t){const{port1:e,port2:n}=new MessageChannel
|
|
14600
|
+
return GK(t,e),[n,[n]]},deserialize:t=>(t.start(),KK(t))}],["throw",{canHandle:t=>jK(t)&&qK 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 GK(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(oY)
|
|
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]]=oY(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,{[zK]:!0})}(new n(...l))
|
|
14613
14616
|
break
|
|
14614
14617
|
case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel
|
|
14615
|
-
|
|
14618
|
+
GK(t,n),c=iY(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,[qK]:0}}Promise.resolve(c).catch((t=>({value:t,[qK]:0}))).then((n=>{const[s,a]=sY(n)
|
|
14622
|
+
e.postMessage(Object.assign(Object.assign({},s),{id:o}),a),"RELEASE"===r&&(e.removeEventListener("message",i),ZK(e),UK in t&&"function"==typeof t[UK]&&t[UK]())})).catch((t=>{const[n,i]=sY({value:new TypeError("Unserializable return value"),[qK]:0})
|
|
14623
|
+
e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function ZK(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function KK(t,e){return tY(t,[],e)}function YK(t){if(t)throw new Error("Proxy has been released and is not useable")}function XK(t){return rY(t,{type:"RELEASE"}).then((()=>{ZK(t)}))}const JK=new WeakMap,QK="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(JK.get(t)||0)-1
|
|
14624
|
+
JK.set(t,e),0===e&&XK(t)}))
|
|
14625
|
+
function tY(t,e=[],n=function(){}){let i=!1
|
|
14626
|
+
const s=new Proxy(n,{get(n,o){if(YK(i),o===HK)return()=>{!function(t){QK&&QK.unregister(t)}(s),XK(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=rY(t,{type:"GET",path:e.map((t=>t.toString()))}).then(oY)
|
|
14629
|
+
return n.then.bind(n)}return tY(t,[...e,o])},set(n,s,o){YK(i)
|
|
14630
|
+
const[r,a]=sY(o)
|
|
14631
|
+
return rY(t,{type:"SET",path:[...e,s].map((t=>t.toString())),value:r},a).then(oY)},apply(n,s,o){YK(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===VK)return rY(t,{type:"ENDPOINT"}).then(oY)
|
|
14634
|
+
if("bind"===r)return tY(t,e.slice(0,-1))
|
|
14635
|
+
const[a,l]=eY(o)
|
|
14636
|
+
return rY(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:a},l).then(oY)},construct(n,s){YK(i)
|
|
14637
|
+
const[o,r]=eY(s)
|
|
14638
|
+
return rY(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:o},r).then(oY)}})
|
|
14639
|
+
return function(t,e){const n=(JK.get(e)||0)+1
|
|
14640
|
+
JK.set(e,n),QK&&QK.register(t,e,t)}(s,t),s}function eY(t){const e=t.map(sY)
|
|
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 iY{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===nY){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 nY=new WeakMap
|
|
14643
|
+
function iY(t,e){return nY.set(t,e),t}function sY(t){for(const[e,n]of WK)if(n.canHandle(t)){const[i,s]=n.serialize(t)
|
|
14644
|
+
return[{type:"HANDLER",name:e,value:i},s]}return[{type:"RAW",value:t},nY.get(t)||[]]}function oY(t){switch(t.type){case"HANDLER":return WK.get(t.name).deserialize(t.value)
|
|
14645
|
+
case"RAW":return t.value}}function rY(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 aY
|
|
14647
|
+
class lY{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===aY){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
|
+
aY=URL.createObjectURL(t)}const t=new Worker(aY),e=KK(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(iY(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?AK:DK,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 cY{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===IK||e===$K?Math.floor:Math.ceil,i=e===IK||e===MK?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 dY{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(){QV().on("zoom",null)(AP(this.wafermap)),this.wafermap.removeEventListener("wheel",this.onWheelMove)}handleChange(t,e){t!==this.wafermap||"canvasWidth"!==e&&"canvasHeight"!==e||this.createZoomBehavior()}createZoomBehavior(){QV().scaleExtent(this.scaleExtent).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth,this.wafermap.canvasHeight]]).on("zoom",(t=>{this.wafermap.transform=t.transform}))(AP(this.wafermap))}}class hY{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,32 +14669,32 @@ 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=SK()
|
|
14673
|
+
return t===IK||t===$K?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=SK()
|
|
14674
|
+
return t===IK||t===MK?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===TK){const t=this.wafermap.colorScale.values.map((t=>+t)),e=SK().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 KZ(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 uY extends We{constructor(){super(...arguments),this.waferMapUpdateTracker=new BK(this.asRequiredFieldsWaferMap),this.originLocation=IK,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=EK,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=TK,this.computations=new hY(this.asRequiredFieldsWaferMap),this.dataManager=new FK(this.asRequiredFieldsWaferMap),this.workerRenderer=new lY(this.asRequiredFieldsWaferMap),this.renderer=new NK(this.asRequiredFieldsWaferMap),this.renderQueued=!1,this.transform=qV,this.hoverTransform="",this.hoverOpacity=AK,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===IK||e===$K?Math.floor:Math.ceil,i=e===IK||e===MK?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 cY(this.asRequiredFieldsWaferMap),this.zoomHandler=new dY(this.asRequiredFieldsWaferMap),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new PK(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(
|
|
14693
|
-
const
|
|
14694
|
-
${
|
|
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}}uY.Arrow={tableFromIPC:function t(e){const n=bZ.from(e)
|
|
14693
|
+
return rH(n)?n.then((e=>t(e))):n.isAsync()?n.readAll().then((t=>new TG(t))):new TG(n.readAll())}},t([ft({attribute:"origin-location"})],uY.prototype,"originLocation",void 0),t([ft({attribute:"grid-min-x",converter:ut})],uY.prototype,"gridMinX",void 0),t([ft({attribute:"grid-max-x",converter:ut})],uY.prototype,"gridMaxX",void 0),t([ft({attribute:"grid-min-y",converter:ut})],uY.prototype,"gridMinY",void 0),t([ft({attribute:"grid-max-y",converter:ut})],uY.prototype,"gridMaxY",void 0),t([ft],uY.prototype,"orientation",void 0),t([ft({attribute:"max-characters",converter:ut})],uY.prototype,"maxCharacters",void 0),t([ft({attribute:"die-labels-hidden",mode:"boolean"})],uY.prototype,"dieLabelsHidden",void 0),t([ft({attribute:"die-labels-suffix"})],uY.prototype,"dieLabelsSuffix",void 0),t([ft({attribute:"color-scale-mode"})],uY.prototype,"colorScaleMode",void 0),t([C],uY.prototype,"renderer",void 0),t([C],uY.prototype,"canvasWidth",void 0),t([C],uY.prototype,"canvasHeight",void 0),t([C],uY.prototype,"transform",void 0),t([C],uY.prototype,"hoverTransform",void 0),t([C],uY.prototype,"hoverOpacity",void 0),t([C],uY.prototype,"hoverWidth",void 0),t([C],uY.prototype,"hoverHeight",void 0),t([C],uY.prototype,"hoverDie",void 0),t([C],uY.prototype,"highlightedTags",void 0),t([C],uY.prototype,"dies",void 0),t([C],uY.prototype,"diesTable",void 0),t([C],uY.prototype,"colorScale",void 0)
|
|
14694
|
+
const pY=uY.compose({baseName:"wafer-map",template:TZ,styles:OZ})
|
|
14695
|
+
_i.getOrCreate().withPrefix("nimble").register(pY())
|
|
14696
|
+
const fY=Mt`
|
|
14697
|
+
${mY="inline-block",`${Bs(mY)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host::before,:host::after,::before,::after{box-sizing:border-box;}`}
|
|
14695
14698
|
|
|
14696
14699
|
:host {
|
|
14697
14700
|
border: 2px solid ${hl};
|
|
@@ -14714,8 +14717,8 @@ const cY=Mt`
|
|
|
14714
14717
|
color: ${Hc};
|
|
14715
14718
|
}
|
|
14716
14719
|
`
|
|
14717
|
-
var
|
|
14718
|
-
const
|
|
14719
|
-
const
|
|
14720
|
-
_i.getOrCreate().withPrefix("spright").register(
|
|
14720
|
+
var mY
|
|
14721
|
+
const gY=Q`<slot></slot>`
|
|
14722
|
+
const vY=class extends We{}.compose({baseName:"rectangle",template:gY,styles:fY})
|
|
14723
|
+
_i.getOrCreate().withPrefix("spright").register(vY())}()
|
|
14721
14724
|
//# sourceMappingURL=all-components-bundle.min.js.map
|