openc3-cosmos-tool-tlmgrapher 5.6.0 → 5.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js/909.js","mappings":"oNAAA,IAAIA,EAAW,CACbC,OAAQC,KAAKC,QACbC,UAAWF,KAAKE,WAGdH,EAAS,CACXI,OAAOC,GACDC,KAAKC,UACPF,EAASG,KAAKC,KAAKC,OACnBX,EAASC,OAAOI,IAAI,mBAAoBC,GAE5C,GAGF,MAAMK,EAAM,KAAM,IAAKD,MAAME,UAEvBC,EAAeC,IAASH,IAAQG,GAAQ,IAE9C,MAAMC,EACJC,YAAYC,GACVV,KAAKW,oBAAsBX,KAAKW,oBAAoBC,KAAKZ,MACzDA,KAAKU,WAAaA,EAClBV,KAAKa,kBAAoB,CAC3B,CACAC,QACOd,KAAKe,cACRf,KAAKgB,UAAYZ,WACVJ,KAAKiB,UACZjB,KAAKkB,eACLC,iBAAiB,mBAAoBnB,KAAKW,qBAC1CjB,EAAOI,IAAI,gDAAgDE,KAAKS,YAAYW,oBAEhF,CACAC,OACMrB,KAAKe,cACPf,KAAKiB,UAAYb,IACjBJ,KAAKsB,cACLC,oBAAoB,mBAAoBvB,KAAKW,qBAC7CjB,EAAOI,IAAI,6BAEf,CACAiB,YACE,OAAOf,KAAKgB,YAAchB,KAAKiB,SACjC,CACAO,aACExB,KAAKyB,SAAWrB,GAClB,CACAsB,gBACE1B,KAAKa,kBAAoB,EACzBb,KAAKwB,oBACExB,KAAK2B,eACZjC,EAAOI,IAAI,qCACb,CACA8B,mBACE5B,KAAK2B,eAAiBvB,IACtBV,EAAOI,IAAI,wCACb,CACAoB,eACElB,KAAKsB,cACLtB,KAAK6B,MACP,CACAP,cACEQ,aAAa9B,KAAK+B,YACpB,CACAF,OACE7B,KAAK+B,YAAcC,YAAW,KAC5BhC,KAAKiC,mBACLjC,KAAK6B,MACN,GAAG7B,KAAKkC,kBACX,CACAA,kBACE,MAAOd,eAAgBA,EAAgBe,wBAAyBA,GAA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AASiB,IACtB,MAAM,IAAIjnE,UAAU,uIACtB,CCEe,SAAShnB,EAAmB9lB,GACzC,OAAOg0G,EAAkBh0G,IAAQi0G,EAAgBj0G,KAAQ0uG,EAAAA,EAAAA,GAA2B1uG,IAAQk0G,GAC9F,C","sources":["webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/uplot/dist/uPlot.esm.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/uplot/dist/uPlot.min.css","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/adapters/xhr.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/axios.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/cancel/CancelToken.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/cancel/CanceledError.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/cancel/isCancel.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/Axios.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/AxiosError.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/InterceptorManager.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/buildFullPath.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/dispatchRequest.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/mergeConfig.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/settle.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/transformData.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/defaults/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/defaults/transitional.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/env/data.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/bind.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/buildURL.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/combineURLs.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/cookies.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/isAxiosError.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/null.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/parseHeaders.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/parseProtocol.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/spread.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/toFormData.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/validator.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/utils.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/binary-search/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-buffer-basic-detection.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-buffer-view-core.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-buffer.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-copy-within.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-from-constructor-and-list.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-iteration-from-last.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-last-index-of.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-to-reversed.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-with.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/collection-strong.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/collection-weak.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/collection.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/define-built-ins.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/flatten-into-array.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/ieee754.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/is-big-int-array.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/is-integral-number.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/math-expm1.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/math-log10.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/number-parse-float.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/same-value.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/string-pad-webkit-bug.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/string-pad.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/to-big-int.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/to-index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/to-offset.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/to-positive-integer.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-from-species-and-list.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-from.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-species-constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.array.flat-map.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.array.splice.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.array.unscopables.flat-map.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.json.to-string-tag.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.map.constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.map.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.asinh.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.log10.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.log2.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.sign.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.sinh.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.to-string-tag.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.number.epsilon.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.number.is-integer.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.object.entries.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.parse-float.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.regexp.flags.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.set.constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.set.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.string.pad-start.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.string.replace-all.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.string.search.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.symbol.async-iterator.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.symbol.to-string-tag.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.at.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.copy-within.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.every.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.fill.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.filter.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.find-index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.find-last-index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.find-last.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.find.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.for-each.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.includes.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.index-of.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.iterator.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.join.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.last-index-of.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.map.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.reduce-right.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.reduce.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.reverse.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.set.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.slice.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.some.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.sort.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.to-locale-string.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.to-reversed.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.to-sorted.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.to-string.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.uint8-array.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.with.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.weak-map.constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.weak-map.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/esnext.typed-array.to-reversed.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/esnext.typed-array.to-sorted.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/esnext.typed-array.with.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/web.queue-microtask.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/defaultLocale/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/defaultOptions/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/format/longFormatters/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/protectedTokens/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/format/formatters/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/format/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/isDate/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/isValid/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/assign/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/Setter.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/constants/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/constants.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/utils.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/setUTCWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/setUTCDay/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/setUTCISODay/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/addMilliseconds/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/subMilliseconds/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/toDate/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/muuri/dist/muuri.module.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/uplot/dist/uPlot.min.css?5af8","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"],"sourcesContent":["var adapters = {\n logger: self.console,\n WebSocket: self.WebSocket\n};\n\nvar logger = {\n log(...messages) {\n if (this.enabled) {\n messages.push(Date.now());\n adapters.logger.log(\"[ActionCable]\", ...messages);\n }\n }\n};\n\nconst now = () => (new Date).getTime();\n\nconst secondsSince = time => (now() - time) / 1e3;\n\nclass ConnectionMonitor {\n constructor(connection) {\n this.visibilityDidChange = this.visibilityDidChange.bind(this);\n this.connection = connection;\n this.reconnectAttempts = 0;\n }\n start() {\n if (!this.isRunning()) {\n this.startedAt = now();\n delete this.stoppedAt;\n this.startPolling();\n addEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`);\n }\n }\n stop() {\n if (this.isRunning()) {\n this.stoppedAt = now();\n this.stopPolling();\n removeEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(\"ConnectionMonitor stopped\");\n }\n }\n isRunning() {\n return this.startedAt && !this.stoppedAt;\n }\n recordPing() {\n this.pingedAt = now();\n }\n recordConnect() {\n this.reconnectAttempts = 0;\n this.recordPing();\n delete this.disconnectedAt;\n logger.log(\"ConnectionMonitor recorded connect\");\n }\n recordDisconnect() {\n this.disconnectedAt = now();\n logger.log(\"ConnectionMonitor recorded disconnect\");\n }\n startPolling() {\n this.stopPolling();\n this.poll();\n }\n stopPolling() {\n clearTimeout(this.pollTimeout);\n }\n poll() {\n this.pollTimeout = setTimeout((() => {\n this.reconnectIfStale();\n this.poll();\n }), this.getPollInterval());\n }\n getPollInterval() {\n const {staleThreshold: staleThreshold, reconnectionBackoffRate: reconnectionBackoffRate} = this.constructor;\n const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10));\n const jitterMax = this.reconnectAttempts === 0 ? 1 : reconnectionBackoffRate;\n const jitter = jitterMax * Math.random();\n return staleThreshold * 1e3 * backoff * (1 + jitter);\n }\n reconnectIfStale() {\n if (this.connectionIsStale()) {\n logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`);\n this.reconnectAttempts++;\n if (this.disconnectedRecently()) {\n logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`);\n } else {\n logger.log(\"ConnectionMonitor reopening\");\n this.connection.reopen();\n }\n }\n }\n get refreshedAt() {\n return this.pingedAt ? this.pingedAt : this.startedAt;\n }\n connectionIsStale() {\n return secondsSince(this.refreshedAt) > this.constructor.staleThreshold;\n }\n disconnectedRecently() {\n return this.disconnectedAt && secondsSince(this.disconnectedAt) < this.constructor.staleThreshold;\n }\n visibilityDidChange() {\n if (document.visibilityState === \"visible\") {\n setTimeout((() => {\n if (this.connectionIsStale() || !this.connection.isOpen()) {\n logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`);\n this.connection.reopen();\n }\n }), 200);\n }\n }\n}\n\nConnectionMonitor.staleThreshold = 6;\n\nConnectionMonitor.reconnectionBackoffRate = .15;\n\nvar INTERNAL = {\n message_types: {\n welcome: \"welcome\",\n disconnect: \"disconnect\",\n ping: \"ping\",\n confirmation: \"confirm_subscription\",\n rejection: \"reject_subscription\"\n },\n disconnect_reasons: {\n unauthorized: \"unauthorized\",\n invalid_request: \"invalid_request\",\n server_restart: \"server_restart\"\n },\n default_mount_path: \"/cable\",\n protocols: [ \"actioncable-v1-json\", \"actioncable-unsupported\" ]\n};\n\nconst {message_types: message_types, protocols: protocols} = INTERNAL;\n\nconst supportedProtocols = protocols.slice(0, protocols.length - 1);\n\nconst indexOf = [].indexOf;\n\nclass Connection {\n constructor(consumer) {\n this.open = this.open.bind(this);\n this.consumer = consumer;\n this.subscriptions = this.consumer.subscriptions;\n this.monitor = new ConnectionMonitor(this);\n this.disconnected = true;\n }\n send(data) {\n if (this.isOpen()) {\n this.webSocket.send(JSON.stringify(data));\n return true;\n } else {\n return false;\n }\n }\n open() {\n if (this.isActive()) {\n logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`);\n return false;\n } else {\n logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`);\n if (this.webSocket) {\n this.uninstallEventHandlers();\n }\n this.webSocket = new adapters.WebSocket(this.consumer.url, protocols);\n this.installEventHandlers();\n this.monitor.start();\n return true;\n }\n }\n close({allowReconnect: allowReconnect} = {\n allowReconnect: true\n }) {\n if (!allowReconnect) {\n this.monitor.stop();\n }\n if (this.isOpen()) {\n return this.webSocket.close();\n }\n }\n reopen() {\n logger.log(`Reopening WebSocket, current state is ${this.getState()}`);\n if (this.isActive()) {\n try {\n return this.close();\n } catch (error) {\n logger.log(\"Failed to reopen WebSocket\", error);\n } finally {\n logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`);\n setTimeout(this.open, this.constructor.reopenDelay);\n }\n } else {\n return this.open();\n }\n }\n getProtocol() {\n if (this.webSocket) {\n return this.webSocket.protocol;\n }\n }\n isOpen() {\n return this.isState(\"open\");\n }\n isActive() {\n return this.isState(\"open\", \"connecting\");\n }\n isProtocolSupported() {\n return indexOf.call(supportedProtocols, this.getProtocol()) >= 0;\n }\n isState(...states) {\n return indexOf.call(states, this.getState()) >= 0;\n }\n getState() {\n if (this.webSocket) {\n for (let state in adapters.WebSocket) {\n if (adapters.WebSocket[state] === this.webSocket.readyState) {\n return state.toLowerCase();\n }\n }\n }\n return null;\n }\n installEventHandlers() {\n for (let eventName in this.events) {\n const handler = this.events[eventName].bind(this);\n this.webSocket[`on${eventName}`] = handler;\n }\n }\n uninstallEventHandlers() {\n for (let eventName in this.events) {\n this.webSocket[`on${eventName}`] = function() {};\n }\n }\n}\n\nConnection.reopenDelay = 500;\n\nConnection.prototype.events = {\n message(event) {\n if (!this.isProtocolSupported()) {\n return;\n }\n const {identifier: identifier, message: message, reason: reason, reconnect: reconnect, type: type} = JSON.parse(event.data);\n switch (type) {\n case message_types.welcome:\n this.monitor.recordConnect();\n return this.subscriptions.reload();\n\n case message_types.disconnect:\n logger.log(`Disconnecting. Reason: ${reason}`);\n return this.close({\n allowReconnect: reconnect\n });\n\n case message_types.ping:\n return this.monitor.recordPing();\n\n case message_types.confirmation:\n this.subscriptions.confirmSubscription(identifier);\n return this.subscriptions.notify(identifier, \"connected\");\n\n case message_types.rejection:\n return this.subscriptions.reject(identifier);\n\n default:\n return this.subscriptions.notify(identifier, \"received\", message);\n }\n },\n open() {\n logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`);\n this.disconnected = false;\n if (!this.isProtocolSupported()) {\n logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\");\n return this.close({\n allowReconnect: false\n });\n }\n },\n close(event) {\n logger.log(\"WebSocket onclose event\");\n if (this.disconnected) {\n return;\n }\n this.disconnected = true;\n this.monitor.recordDisconnect();\n return this.subscriptions.notifyAll(\"disconnected\", {\n willAttemptReconnect: this.monitor.isRunning()\n });\n },\n error() {\n logger.log(\"WebSocket onerror event\");\n }\n};\n\nconst extend = function(object, properties) {\n if (properties != null) {\n for (let key in properties) {\n const value = properties[key];\n object[key] = value;\n }\n }\n return object;\n};\n\nclass Subscription {\n constructor(consumer, params = {}, mixin) {\n this.consumer = consumer;\n this.identifier = JSON.stringify(params);\n extend(this, mixin);\n }\n perform(action, data = {}) {\n data.action = action;\n return this.send(data);\n }\n send(data) {\n return this.consumer.send({\n command: \"message\",\n identifier: this.identifier,\n data: JSON.stringify(data)\n });\n }\n unsubscribe() {\n return this.consumer.subscriptions.remove(this);\n }\n}\n\nclass SubscriptionGuarantor {\n constructor(subscriptions) {\n this.subscriptions = subscriptions;\n this.pendingSubscriptions = [];\n }\n guarantee(subscription) {\n if (this.pendingSubscriptions.indexOf(subscription) == -1) {\n logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`);\n this.pendingSubscriptions.push(subscription);\n } else {\n logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`);\n }\n this.startGuaranteeing();\n }\n forget(subscription) {\n logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`);\n this.pendingSubscriptions = this.pendingSubscriptions.filter((s => s !== subscription));\n }\n startGuaranteeing() {\n this.stopGuaranteeing();\n this.retrySubscribing();\n }\n stopGuaranteeing() {\n clearTimeout(this.retryTimeout);\n }\n retrySubscribing() {\n this.retryTimeout = setTimeout((() => {\n if (this.subscriptions && typeof this.subscriptions.subscribe === \"function\") {\n this.pendingSubscriptions.map((subscription => {\n logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`);\n this.subscriptions.subscribe(subscription);\n }));\n }\n }), 500);\n }\n}\n\nclass Subscriptions {\n constructor(consumer) {\n this.consumer = consumer;\n this.guarantor = new SubscriptionGuarantor(this);\n this.subscriptions = [];\n }\n create(channelName, mixin) {\n const channel = channelName;\n const params = typeof channel === \"object\" ? channel : {\n channel: channel\n };\n const subscription = new Subscription(this.consumer, params, mixin);\n return this.add(subscription);\n }\n add(subscription) {\n this.subscriptions.push(subscription);\n this.consumer.ensureActiveConnection();\n this.notify(subscription, \"initialized\");\n this.subscribe(subscription);\n return subscription;\n }\n remove(subscription) {\n this.forget(subscription);\n if (!this.findAll(subscription.identifier).length) {\n this.sendCommand(subscription, \"unsubscribe\");\n }\n return subscription;\n }\n reject(identifier) {\n return this.findAll(identifier).map((subscription => {\n this.forget(subscription);\n this.notify(subscription, \"rejected\");\n return subscription;\n }));\n }\n forget(subscription) {\n this.guarantor.forget(subscription);\n this.subscriptions = this.subscriptions.filter((s => s !== subscription));\n return subscription;\n }\n findAll(identifier) {\n return this.subscriptions.filter((s => s.identifier === identifier));\n }\n reload() {\n return this.subscriptions.map((subscription => this.subscribe(subscription)));\n }\n notifyAll(callbackName, ...args) {\n return this.subscriptions.map((subscription => this.notify(subscription, callbackName, ...args)));\n }\n notify(subscription, callbackName, ...args) {\n let subscriptions;\n if (typeof subscription === \"string\") {\n subscriptions = this.findAll(subscription);\n } else {\n subscriptions = [ subscription ];\n }\n return subscriptions.map((subscription => typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined));\n }\n subscribe(subscription) {\n if (this.sendCommand(subscription, \"subscribe\")) {\n this.guarantor.guarantee(subscription);\n }\n }\n confirmSubscription(identifier) {\n logger.log(`Subscription confirmed ${identifier}`);\n this.findAll(identifier).map((subscription => this.guarantor.forget(subscription)));\n }\n sendCommand(subscription, command) {\n const {identifier: identifier} = subscription;\n return this.consumer.send({\n command: command,\n identifier: identifier\n });\n }\n}\n\nclass Consumer {\n constructor(url) {\n this._url = url;\n this.subscriptions = new Subscriptions(this);\n this.connection = new Connection(this);\n }\n get url() {\n return createWebSocketURL(this._url);\n }\n send(data) {\n return this.connection.send(data);\n }\n connect() {\n return this.connection.open();\n }\n disconnect() {\n return this.connection.close({\n allowReconnect: false\n });\n }\n ensureActiveConnection() {\n if (!this.connection.isActive()) {\n return this.connection.open();\n }\n }\n}\n\nfunction createWebSocketURL(url) {\n if (typeof url === \"function\") {\n url = url();\n }\n if (url && !/^wss?:/i.test(url)) {\n const a = document.createElement(\"a\");\n a.href = url;\n a.href = a.href;\n a.protocol = a.protocol.replace(\"http\", \"ws\");\n return a.href;\n } else {\n return url;\n }\n}\n\nfunction createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n return new Consumer(url);\n}\n\nfunction getConfig(name) {\n const element = document.head.querySelector(`meta[name='action-cable-${name}']`);\n if (element) {\n return element.getAttribute(\"content\");\n }\n}\n\nexport { Connection, ConnectionMonitor, Consumer, INTERNAL, Subscription, SubscriptionGuarantor, Subscriptions, adapters, createConsumer, createWebSocketURL, getConfig, logger };\n","/**\n* Copyright (c) 2023, Leon Sorokin\n* All rights reserved. (MIT Licensed)\n*\n* uPlot.js (μPlot)\n* A small, fast chart for time series, lines, areas, ohlc & bars\n* https://github.com/leeoniya/uPlot (v1.6.24)\n*/\n\nconst FEAT_TIME = true;\n\nconst pre = \"u-\";\n\nconst UPLOT = \"uplot\";\nconst ORI_HZ = pre + \"hz\";\nconst ORI_VT = pre + \"vt\";\nconst TITLE = pre + \"title\";\nconst WRAP = pre + \"wrap\";\nconst UNDER = pre + \"under\";\nconst OVER = pre + \"over\";\nconst AXIS = pre + \"axis\";\nconst OFF = pre + \"off\";\nconst SELECT = pre + \"select\";\nconst CURSOR_X = pre + \"cursor-x\";\nconst CURSOR_Y = pre + \"cursor-y\";\nconst CURSOR_PT = pre + \"cursor-pt\";\nconst LEGEND = pre + \"legend\";\nconst LEGEND_LIVE = pre + \"live\";\nconst LEGEND_INLINE = pre + \"inline\";\nconst LEGEND_THEAD = pre + \"thead\";\nconst LEGEND_SERIES = pre + \"series\";\nconst LEGEND_MARKER = pre + \"marker\";\nconst LEGEND_LABEL = pre + \"label\";\nconst LEGEND_VALUE = pre + \"value\";\n\nconst WIDTH = \"width\";\nconst HEIGHT = \"height\";\nconst TOP = \"top\";\nconst BOTTOM = \"bottom\";\nconst LEFT = \"left\";\nconst RIGHT = \"right\";\nconst hexBlack = \"#000\";\nconst transparent = hexBlack + \"0\";\n\nconst mousemove = \"mousemove\";\nconst mousedown = \"mousedown\";\nconst mouseup = \"mouseup\";\nconst mouseenter = \"mouseenter\";\nconst mouseleave = \"mouseleave\";\nconst dblclick = \"dblclick\";\nconst resize = \"resize\";\nconst scroll = \"scroll\";\n\nconst change = \"change\";\nconst dppxchange = \"dppxchange\";\n\nconst LEGEND_DISP = \"--\";\n\nconst domEnv = typeof window != 'undefined';\n\nconst doc = domEnv ? document : null;\nconst win = domEnv ? window : null;\nconst nav = domEnv ? navigator : null;\n\nlet pxRatio;\n\n//export const canHover = domEnv && !win.matchMedia('(hover: none)').matches;\n\nlet query;\n\nfunction setPxRatio() {\n\tlet _pxRatio = devicePixelRatio;\n\n\t// during print preview, Chrome fires off these dppx queries even without changes\n\tif (pxRatio != _pxRatio) {\n\t\tpxRatio = _pxRatio;\n\n\t\tquery && off(change, query, setPxRatio);\n\t\tquery = matchMedia(`(min-resolution: ${pxRatio - 0.001}dppx) and (max-resolution: ${pxRatio + 0.001}dppx)`);\n\t\ton(change, query, setPxRatio);\n\n\t\twin.dispatchEvent(new CustomEvent(dppxchange));\n\t}\n}\n\nfunction addClass(el, c) {\n\tif (c != null) {\n\t\tlet cl = el.classList;\n\t\t!cl.contains(c) && cl.add(c);\n\t}\n}\n\nfunction remClass(el, c) {\n\tlet cl = el.classList;\n\tcl.contains(c) && cl.remove(c);\n}\n\nfunction setStylePx(el, name, value) {\n\tel.style[name] = value + \"px\";\n}\n\nfunction placeTag(tag, cls, targ, refEl) {\n\tlet el = doc.createElement(tag);\n\n\tif (cls != null)\n\t\taddClass(el, cls);\n\n\tif (targ != null)\n\t\ttarg.insertBefore(el, refEl);\n\n\treturn el;\n}\n\nfunction placeDiv(cls, targ) {\n\treturn placeTag(\"div\", cls, targ);\n}\n\nconst xformCache = new WeakMap();\n\nfunction elTrans(el, xPos, yPos, xMax, yMax) {\n\tlet xform = \"translate(\" + xPos + \"px,\" + yPos + \"px)\";\n\tlet xformOld = xformCache.get(el);\n\n\tif (xform != xformOld) {\n\t\tel.style.transform = xform;\n\t\txformCache.set(el, xform);\n\n\t\tif (xPos < 0 || yPos < 0 || xPos > xMax || yPos > yMax)\n\t\t\taddClass(el, OFF);\n\t\telse\n\t\t\tremClass(el, OFF);\n\t}\n}\n\nconst colorCache = new WeakMap();\n\nfunction elColor(el, background, borderColor) {\n\tlet newColor = background + borderColor;\n\tlet oldColor = colorCache.get(el);\n\n\tif (newColor != oldColor) {\n\t\tcolorCache.set(el, newColor);\n\t\tel.style.background = background;\n\t\tel.style.borderColor = borderColor;\n\t}\n}\n\nconst sizeCache = new WeakMap();\n\nfunction elSize(el, newWid, newHgt, centered) {\n\tlet newSize = newWid + \"\" + newHgt;\n\tlet oldSize = sizeCache.get(el);\n\n\tif (newSize != oldSize) {\n\t\tsizeCache.set(el, newSize);\n\t\tel.style.height = newHgt + \"px\";\n\t\tel.style.width = newWid + \"px\";\n\t\tel.style.marginLeft = centered ? -newWid/2 + \"px\" : 0;\n\t\tel.style.marginTop = centered ? -newHgt/2 + \"px\" : 0;\n\t}\n}\n\nconst evOpts = {passive: true};\nconst evOpts2 = {...evOpts, capture: true};\n\nfunction on(ev, el, cb, capt) {\n\tel.addEventListener(ev, cb, capt ? evOpts2 : evOpts);\n}\n\nfunction off(ev, el, cb, capt) {\n\tel.removeEventListener(ev, cb, capt ? evOpts2 : evOpts);\n}\n\ndomEnv && setPxRatio();\n\n// binary search for index of closest value\nfunction closestIdx(num, arr, lo, hi) {\n\tlet mid;\n\tlo = lo || 0;\n\thi = hi || arr.length - 1;\n\tlet bitwise = hi <= 2147483647;\n\n\twhile (hi - lo > 1) {\n\t\tmid = bitwise ? (lo + hi) >> 1 : floor((lo + hi) / 2);\n\n\t\tif (arr[mid] < num)\n\t\t\tlo = mid;\n\t\telse\n\t\t\thi = mid;\n\t}\n\n\tif (num - arr[lo] <= arr[hi] - num)\n\t\treturn lo;\n\n\treturn hi;\n}\n\nfunction nonNullIdx(data, _i0, _i1, dir) {\n\tfor (let i = dir == 1 ? _i0 : _i1; i >= _i0 && i <= _i1; i += dir) {\n\t\tif (data[i] != null)\n\t\t\treturn i;\n\t}\n\n\treturn -1;\n}\n\nfunction getMinMax(data, _i0, _i1, sorted) {\n//\tconsole.log(\"getMinMax()\");\n\n\tlet _min = inf;\n\tlet _max = -inf;\n\n\tif (sorted == 1) {\n\t\t_min = data[_i0];\n\t\t_max = data[_i1];\n\t}\n\telse if (sorted == -1) {\n\t\t_min = data[_i1];\n\t\t_max = data[_i0];\n\t}\n\telse {\n\t\tfor (let i = _i0; i <= _i1; i++) {\n\t\t\tif (data[i] != null) {\n\t\t\t\t_min = min(_min, data[i]);\n\t\t\t\t_max = max(_max, data[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn [_min, _max];\n}\n\nfunction getMinMaxLog(data, _i0, _i1) {\n//\tconsole.log(\"getMinMax()\");\n\n\tlet _min = inf;\n\tlet _max = -inf;\n\n\tfor (let i = _i0; i <= _i1; i++) {\n\t\tif (data[i] > 0) {\n\t\t\t_min = min(_min, data[i]);\n\t\t\t_max = max(_max, data[i]);\n\t\t}\n\t}\n\n\treturn [\n\t\t_min == inf ? 1 : _min,\n\t\t_max == -inf ? 10 : _max,\n\t];\n}\n\nfunction rangeLog(min, max, base, fullMags) {\n\tlet minSign = sign(min);\n\tlet maxSign = sign(max);\n\n\tlet logFn = base == 10 ? log10 : log2;\n\n\tif (min == max) {\n\t\tif (minSign == -1) {\n\t\t\tmin *= base;\n\t\t\tmax /= base;\n\t\t}\n\t\telse {\n\t\t\tmin /= base;\n\t\t\tmax *= base;\n\t\t}\n\t}\n\n\tlet growMinAbs = minSign == 1 ? floor : ceil;\n\tlet growMaxAbs = maxSign == 1 ? ceil : floor;\n\n\tlet minExp = growMinAbs(logFn(abs(min)));\n\tlet maxExp = growMaxAbs(logFn(abs(max)));\n\n\tlet minIncr = pow(base, minExp);\n\tlet maxIncr = pow(base, maxExp);\n\n\t// fix values like Math.pow(10, -5) === 0.000009999999999999999\n\tif (base == 10) {\n\t\tif (minExp < 0)\n\t\t\tminIncr = roundDec(minIncr, -minExp);\n\t\tif (maxExp < 0)\n\t\t\tmaxIncr = roundDec(maxIncr, -maxExp);\n\t}\n\n\tif (fullMags || base == 2) {\n\t\tmin = minIncr * minSign;\n\t\tmax = maxIncr * maxSign;\n\t}\n\telse {\n\t\tmin = incrRoundDn(min, minIncr);\n\t\tmax = incrRoundUp(max, maxIncr);\n\t}\n\n\treturn [min, max];\n}\n\nfunction rangeAsinh(min, max, base, fullMags) {\n\tlet minMax = rangeLog(min, max, base, fullMags);\n\n\tif (min == 0)\n\t\tminMax[0] = 0;\n\n\tif (max == 0)\n\t\tminMax[1] = 0;\n\n\treturn minMax;\n}\n\nconst rangePad = 0.1;\n\nconst autoRangePart = {\n\tmode: 3,\n\tpad: rangePad,\n};\n\nconst _eqRangePart = {\n\tpad: 0,\n\tsoft: null,\n\tmode: 0,\n};\n\nconst _eqRange = {\n\tmin: _eqRangePart,\n\tmax: _eqRangePart,\n};\n\n// this ensures that non-temporal/numeric y-axes get multiple-snapped padding added above/below\n// TODO: also account for incrs when snapping to ensure top of axis gets a tick & value\nfunction rangeNum(_min, _max, mult, extra) {\n\tif (isObj(mult))\n\t\treturn _rangeNum(_min, _max, mult);\n\n\t_eqRangePart.pad = mult;\n\t_eqRangePart.soft = extra ? 0 : null;\n\t_eqRangePart.mode = extra ? 3 : 0;\n\n\treturn _rangeNum(_min, _max, _eqRange);\n}\n\n// nullish coalesce\nfunction ifNull(lh, rh) {\n\treturn lh == null ? rh : lh;\n}\n\n// checks if given index range in an array contains a non-null value\n// aka a range-bounded Array.some()\nfunction hasData(data, idx0, idx1) {\n\tidx0 = ifNull(idx0, 0);\n\tidx1 = ifNull(idx1, data.length - 1);\n\n\twhile (idx0 <= idx1) {\n\t\tif (data[idx0] != null)\n\t\t\treturn true;\n\t\tidx0++;\n\t}\n\n\treturn false;\n}\n\nfunction _rangeNum(_min, _max, cfg) {\n\tlet cmin = cfg.min;\n\tlet cmax = cfg.max;\n\n\tlet padMin = ifNull(cmin.pad, 0);\n\tlet padMax = ifNull(cmax.pad, 0);\n\n\tlet hardMin = ifNull(cmin.hard, -inf);\n\tlet hardMax = ifNull(cmax.hard, inf);\n\n\tlet softMin = ifNull(cmin.soft, inf);\n\tlet softMax = ifNull(cmax.soft, -inf);\n\n\tlet softMinMode = ifNull(cmin.mode, 0);\n\tlet softMaxMode = ifNull(cmax.mode, 0);\n\n\tlet delta = _max - _min;\n\tlet deltaMag = log10(delta);\n\n\tlet scalarMax = max(abs(_min), abs(_max));\n\tlet scalarMag = log10(scalarMax);\n\n\tlet scalarMagDelta = abs(scalarMag - deltaMag);\n\n\t// this handles situations like 89.7, 89.69999999999999\n\t// by assuming 0.001x deltas are precision errors\n//\tif (delta > 0 && delta < abs(_max) / 1e3)\n//\t\tdelta = 0;\n\n\t// treat data as flat if delta is less than 1 billionth\n\t// or range is 11+ orders of magnitude below raw values, e.g. 99999999.99999996 - 100000000.00000004\n\tif (delta < 1e-9 || scalarMagDelta > 10) {\n\t\tdelta = 0;\n\n\t\t// if soft mode is 2 and all vals are flat at 0, avoid the 0.1 * 1e3 fallback\n\t\t// this prevents 0,0,0 from ranging to -100,100 when softMin/softMax are -1,1\n\t\tif (_min == 0 || _max == 0) {\n\t\t\tdelta = 1e-9;\n\n\t\t\tif (softMinMode == 2 && softMin != inf)\n\t\t\t\tpadMin = 0;\n\n\t\t\tif (softMaxMode == 2 && softMax != -inf)\n\t\t\t\tpadMax = 0;\n\t\t}\n\t}\n\n\tlet nonZeroDelta = delta || scalarMax || 1e3;\n\tlet mag = log10(nonZeroDelta);\n\tlet base = pow(10, floor(mag));\n\n\tlet _padMin = nonZeroDelta * (delta == 0 ? (_min == 0 ? .1 : 1) : padMin);\n\tlet _newMin = roundDec(incrRoundDn(_min - _padMin, base/10), 9);\n\tlet _softMin = _min >= softMin && (softMinMode == 1 || softMinMode == 3 && _newMin <= softMin || softMinMode == 2 && _newMin >= softMin) ? softMin : inf;\n\tlet minLim = max(hardMin, _newMin < _softMin && _min >= _softMin ? _softMin : min(_softMin, _newMin));\n\n\tlet _padMax = nonZeroDelta * (delta == 0 ? (_max == 0 ? .1 : 1) : padMax);\n\tlet _newMax = roundDec(incrRoundUp(_max + _padMax, base/10), 9);\n\tlet _softMax = _max <= softMax && (softMaxMode == 1 || softMaxMode == 3 && _newMax >= softMax || softMaxMode == 2 && _newMax <= softMax) ? softMax : -inf;\n\tlet maxLim = min(hardMax, _newMax > _softMax && _max <= _softMax ? _softMax : max(_softMax, _newMax));\n\n\tif (minLim == maxLim && minLim == 0)\n\t\tmaxLim = 100;\n\n\treturn [minLim, maxLim];\n}\n\n// alternative: https://stackoverflow.com/a/2254896\nconst numFormatter = new Intl.NumberFormat(domEnv ? nav.language : 'en-US');\nconst fmtNum = val => numFormatter.format(val);\n\nconst M = Math;\n\nconst PI = M.PI;\nconst abs = M.abs;\nconst floor = M.floor;\nconst round = M.round;\nconst ceil = M.ceil;\nconst min = M.min;\nconst max = M.max;\nconst pow = M.pow;\nconst sign = M.sign;\nconst log10 = M.log10;\nconst log2 = M.log2;\n// TODO: seems like this needs to match asinh impl if the passed v is tweaked?\nconst sinh = (v, linthresh = 1) => M.sinh(v) * linthresh;\nconst asinh = (v, linthresh = 1) => M.asinh(v / linthresh);\n\nconst inf = Infinity;\n\nfunction numIntDigits(x) {\n\treturn (log10((x ^ (x >> 31)) - (x >> 31)) | 0) + 1;\n}\n\nfunction clamp(num, _min, _max) {\n\treturn min(max(num, _min), _max);\n}\n\nfunction fnOrSelf(v) {\n\treturn typeof v == \"function\" ? v : () => v;\n}\n\nconst noop = () => {};\n\nconst retArg0 = _0 => _0;\n\nconst retArg1 = (_0, _1) => _1;\n\nconst retNull = _ => null;\n\nconst retTrue = _ => true;\n\nconst retEq = (a, b) => a == b;\n\n// this will probably prevent tick incrs > 14 decimal places\n// (we generate up to 17 dec, see fixedDec const)\nconst fixFloat = v => roundDec(v, 14);\n\nfunction incrRound(num, incr) {\n\treturn fixFloat(roundDec(fixFloat(num/incr))*incr);\n}\n\nfunction incrRoundUp(num, incr) {\n\treturn fixFloat(ceil(fixFloat(num/incr))*incr);\n}\n\nfunction incrRoundDn(num, incr) {\n\treturn fixFloat(floor(fixFloat(num/incr))*incr);\n}\n\n// https://stackoverflow.com/a/48764436\n// rounds half away from zero\nfunction roundDec(val, dec = 0) {\n\tif (isInt(val))\n\t\treturn val;\n//\telse if (dec == 0)\n//\t\treturn round(val);\n\n\tlet p = 10 ** dec;\n\tlet n = (val * p) * (1 + Number.EPSILON);\n\treturn round(n) / p;\n}\n\nconst fixedDec = new Map();\n\nfunction guessDec(num) {\n\treturn ((\"\"+num).split(\".\")[1] || \"\").length;\n}\n\nfunction genIncrs(base, minExp, maxExp, mults) {\n\tlet incrs = [];\n\n\tlet multDec = mults.map(guessDec);\n\n\tfor (let exp = minExp; exp < maxExp; exp++) {\n\t\tlet expa = abs(exp);\n\t\tlet mag = roundDec(pow(base, exp), expa);\n\n\t\tfor (let i = 0; i < mults.length; i++) {\n\t\t\tlet _incr = mults[i] * mag;\n\t\t\tlet dec = (_incr >= 0 && exp >= 0 ? 0 : expa) + (exp >= multDec[i] ? 0 : multDec[i]);\n\t\t\tlet incr = roundDec(_incr, dec);\n\t\t\tincrs.push(incr);\n\t\t\tfixedDec.set(incr, dec);\n\t\t}\n\t}\n\n\treturn incrs;\n}\n\n//export const assign = Object.assign;\n\nconst EMPTY_OBJ = {};\nconst EMPTY_ARR = [];\n\nconst nullNullTuple = [null, null];\n\nconst isArr = Array.isArray;\nconst isInt = Number.isInteger;\nconst isUndef = v => v === void 0;\n\nfunction isStr(v) {\n\treturn typeof v == 'string';\n}\n\nfunction isObj(v) {\n\tlet is = false;\n\n\tif (v != null) {\n\t\tlet c = v.constructor;\n\t\tis = c == null || c == Object;\n\t}\n\n\treturn is;\n}\n\nfunction fastIsObj(v) {\n\treturn v != null && typeof v == 'object';\n}\n\nconst TypedArray = Object.getPrototypeOf(Uint8Array);\n\nfunction copy(o, _isObj = isObj) {\n\tlet out;\n\n\tif (isArr(o)) {\n\t\tlet val = o.find(v => v != null);\n\n\t\tif (isArr(val) || _isObj(val)) {\n\t\t\tout = Array(o.length);\n\t\t\tfor (let i = 0; i < o.length; i++)\n\t\t\t\tout[i] = copy(o[i], _isObj);\n\t\t}\n\t\telse\n\t\t\tout = o.slice();\n\t}\n\telse if (o instanceof TypedArray) // also (ArrayBuffer.isView(o) && !(o instanceof DataView))\n\t\tout = o.slice();\n\telse if (_isObj(o)) {\n\t\tout = {};\n\t\tfor (let k in o)\n\t\t\tout[k] = copy(o[k], _isObj);\n\t}\n\telse\n\t\tout = o;\n\n\treturn out;\n}\n\nfunction assign(targ) {\n\tlet args = arguments;\n\n\tfor (let i = 1; i < args.length; i++) {\n\t\tlet src = args[i];\n\n\t\tfor (let key in src) {\n\t\t\tif (isObj(targ[key]))\n\t\t\t\tassign(targ[key], copy(src[key]));\n\t\t\telse\n\t\t\t\ttarg[key] = copy(src[key]);\n\t\t}\n\t}\n\n\treturn targ;\n}\n\n// nullModes\nconst NULL_REMOVE = 0; // nulls are converted to undefined (e.g. for spanGaps: true)\nconst NULL_RETAIN = 1; // nulls are retained, with alignment artifacts set to undefined (default)\nconst NULL_EXPAND = 2; // nulls are expanded to include any adjacent alignment artifacts\n\n// sets undefined values to nulls when adjacent to existing nulls (minesweeper)\nfunction nullExpand(yVals, nullIdxs, alignedLen) {\n\tfor (let i = 0, xi, lastNullIdx = -1; i < nullIdxs.length; i++) {\n\t\tlet nullIdx = nullIdxs[i];\n\n\t\tif (nullIdx > lastNullIdx) {\n\t\t\txi = nullIdx - 1;\n\t\t\twhile (xi >= 0 && yVals[xi] == null)\n\t\t\t\tyVals[xi--] = null;\n\n\t\t\txi = nullIdx + 1;\n\t\t\twhile (xi < alignedLen && yVals[xi] == null)\n\t\t\t\tyVals[lastNullIdx = xi++] = null;\n\t\t}\n\t}\n}\n\n// nullModes is a tables-matched array indicating how to treat nulls in each series\n// output is sorted ASC on the joined field (table[0]) and duplicate join values are collapsed\nfunction join(tables, nullModes) {\n\tlet xVals = new Set();\n\n\tfor (let ti = 0; ti < tables.length; ti++) {\n\t\tlet t = tables[ti];\n\t\tlet xs = t[0];\n\t\tlet len = xs.length;\n\n\t\tfor (let i = 0; i < len; i++)\n\t\t\txVals.add(xs[i]);\n\t}\n\n\tlet data = [Array.from(xVals).sort((a, b) => a - b)];\n\n\tlet alignedLen = data[0].length;\n\n\tlet xIdxs = new Map();\n\n\tfor (let i = 0; i < alignedLen; i++)\n\t\txIdxs.set(data[0][i], i);\n\n\tfor (let ti = 0; ti < tables.length; ti++) {\n\t\tlet t = tables[ti];\n\t\tlet xs = t[0];\n\n\t\tfor (let si = 1; si < t.length; si++) {\n\t\t\tlet ys = t[si];\n\n\t\t\tlet yVals = Array(alignedLen).fill(undefined);\n\n\t\t\tlet nullMode = nullModes ? nullModes[ti][si] : NULL_RETAIN;\n\n\t\t\tlet nullIdxs = [];\n\n\t\t\tfor (let i = 0; i < ys.length; i++) {\n\t\t\t\tlet yVal = ys[i];\n\t\t\t\tlet alignedIdx = xIdxs.get(xs[i]);\n\n\t\t\t\tif (yVal === null) {\n\t\t\t\t\tif (nullMode != NULL_REMOVE) {\n\t\t\t\t\t\tyVals[alignedIdx] = yVal;\n\n\t\t\t\t\t\tif (nullMode == NULL_EXPAND)\n\t\t\t\t\t\t\tnullIdxs.push(alignedIdx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tyVals[alignedIdx] = yVal;\n\t\t\t}\n\n\t\t\tnullExpand(yVals, nullIdxs, alignedLen);\n\n\t\t\tdata.push(yVals);\n\t\t}\n\t}\n\n\treturn data;\n}\n\nconst microTask = typeof queueMicrotask == \"undefined\" ? fn => Promise.resolve().then(fn) : queueMicrotask;\n\nconst months = [\n\t\"January\",\n\t\"February\",\n\t\"March\",\n\t\"April\",\n\t\"May\",\n\t\"June\",\n\t\"July\",\n\t\"August\",\n\t\"September\",\n\t\"October\",\n\t\"November\",\n\t\"December\",\n];\n\nconst days = [\n\t\"Sunday\",\n\t\"Monday\",\n\t\"Tuesday\",\n\t\"Wednesday\",\n\t\"Thursday\",\n\t\"Friday\",\n\t\"Saturday\",\n];\n\nfunction slice3(str) {\n\treturn str.slice(0, 3);\n}\n\nconst days3 = days.map(slice3);\n\nconst months3 = months.map(slice3);\n\nconst engNames = {\n\tMMMM: months,\n\tMMM: months3,\n\tWWWW: days,\n\tWWW: days3,\n};\n\nfunction zeroPad2(int) {\n\treturn (int < 10 ? '0' : '') + int;\n}\n\nfunction zeroPad3(int) {\n\treturn (int < 10 ? '00' : int < 100 ? '0' : '') + int;\n}\n\n/*\nfunction suffix(int) {\n\tlet mod10 = int % 10;\n\n\treturn int + (\n\t\tmod10 == 1 && int != 11 ? \"st\" :\n\t\tmod10 == 2 && int != 12 ? \"nd\" :\n\t\tmod10 == 3 && int != 13 ? \"rd\" : \"th\"\n\t);\n}\n*/\n\nconst subs = {\n\t// 2019\n\tYYYY:\td => d.getFullYear(),\n\t// 19\n\tYY:\t\td => (d.getFullYear()+'').slice(2),\n\t// July\n\tMMMM:\t(d, names) => names.MMMM[d.getMonth()],\n\t// Jul\n\tMMM:\t(d, names) => names.MMM[d.getMonth()],\n\t// 07\n\tMM:\t\td => zeroPad2(d.getMonth()+1),\n\t// 7\n\tM:\t\td => d.getMonth()+1,\n\t// 09\n\tDD:\t\td => zeroPad2(d.getDate()),\n\t// 9\n\tD:\t\td => d.getDate(),\n\t// Monday\n\tWWWW:\t(d, names) => names.WWWW[d.getDay()],\n\t// Mon\n\tWWW:\t(d, names) => names.WWW[d.getDay()],\n\t// 03\n\tHH:\t\td => zeroPad2(d.getHours()),\n\t// 3\n\tH:\t\td => d.getHours(),\n\t// 9 (12hr, unpadded)\n\th:\t\td => {let h = d.getHours(); return h == 0 ? 12 : h > 12 ? h - 12 : h;},\n\t// AM\n\tAA:\t\td => d.getHours() >= 12 ? 'PM' : 'AM',\n\t// am\n\taa:\t\td => d.getHours() >= 12 ? 'pm' : 'am',\n\t// a\n\ta:\t\td => d.getHours() >= 12 ? 'p' : 'a',\n\t// 09\n\tmm:\t\td => zeroPad2(d.getMinutes()),\n\t// 9\n\tm:\t\td => d.getMinutes(),\n\t// 09\n\tss:\t\td => zeroPad2(d.getSeconds()),\n\t// 9\n\ts:\t\td => d.getSeconds(),\n\t// 374\n\tfff:\td => zeroPad3(d.getMilliseconds()),\n};\n\nfunction fmtDate(tpl, names) {\n\tnames = names || engNames;\n\tlet parts = [];\n\n\tlet R = /\\{([a-z]+)\\}|[^{]+/gi, m;\n\n\twhile (m = R.exec(tpl))\n\t\tparts.push(m[0][0] == '{' ? subs[m[1]] : m[0]);\n\n\treturn d => {\n\t\tlet out = '';\n\n\t\tfor (let i = 0; i < parts.length; i++)\n\t\t\tout += typeof parts[i] == \"string\" ? parts[i] : parts[i](d, names);\n\n\t\treturn out;\n\t}\n}\n\nconst localTz = new Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n// https://stackoverflow.com/questions/15141762/how-to-initialize-a-javascript-date-to-a-particular-time-zone/53652131#53652131\nfunction tzDate(date, tz) {\n\tlet date2;\n\n\t// perf optimization\n\tif (tz == 'UTC' || tz == 'Etc/UTC')\n\t\tdate2 = new Date(+date + date.getTimezoneOffset() * 6e4);\n\telse if (tz == localTz)\n\t\tdate2 = date;\n\telse {\n\t\tdate2 = new Date(date.toLocaleString('en-US', {timeZone: tz}));\n\t\tdate2.setMilliseconds(date.getMilliseconds());\n\t}\n\n\treturn date2;\n}\n\n//export const series = [];\n\n// default formatters:\n\nconst onlyWhole = v => v % 1 == 0;\n\nconst allMults = [1,2,2.5,5];\n\n// ...0.01, 0.02, 0.025, 0.05, 0.1, 0.2, 0.25, 0.5\nconst decIncrs = genIncrs(10, -16, 0, allMults);\n\n// 1, 2, 2.5, 5, 10, 20, 25, 50...\nconst oneIncrs = genIncrs(10, 0, 16, allMults);\n\n// 1, 2, 5, 10, 20, 25, 50...\nconst wholeIncrs = oneIncrs.filter(onlyWhole);\n\nconst numIncrs = decIncrs.concat(oneIncrs);\n\nconst NL = \"\\n\";\n\nconst yyyy = \"{YYYY}\";\nconst NLyyyy = NL + yyyy;\nconst md = \"{M}/{D}\";\nconst NLmd = NL + md;\nconst NLmdyy = NLmd + \"/{YY}\";\n\nconst aa = \"{aa}\";\nconst hmm = \"{h}:{mm}\";\nconst hmmaa = hmm + aa;\nconst NLhmmaa = NL + hmmaa;\nconst ss = \":{ss}\";\n\nconst _ = null;\n\nfunction genTimeStuffs(ms) {\n\tlet\ts = ms * 1e3,\n\t\tm = s * 60,\n\t\th = m * 60,\n\t\td = h * 24,\n\t\tmo = d * 30,\n\t\ty = d * 365;\n\n\t// min of 1e-3 prevents setting a temporal x ticks too small since Date objects cannot advance ticks smaller than 1ms\n\tlet subSecIncrs = ms == 1 ? genIncrs(10, 0, 3, allMults).filter(onlyWhole) : genIncrs(10, -3, 0, allMults);\n\n\tlet timeIncrs = subSecIncrs.concat([\n\t\t// minute divisors (# of secs)\n\t\ts,\n\t\ts * 5,\n\t\ts * 10,\n\t\ts * 15,\n\t\ts * 30,\n\t\t// hour divisors (# of mins)\n\t\tm,\n\t\tm * 5,\n\t\tm * 10,\n\t\tm * 15,\n\t\tm * 30,\n\t\t// day divisors (# of hrs)\n\t\th,\n\t\th * 2,\n\t\th * 3,\n\t\th * 4,\n\t\th * 6,\n\t\th * 8,\n\t\th * 12,\n\t\t// month divisors TODO: need more?\n\t\td,\n\t\td * 2,\n\t\td * 3,\n\t\td * 4,\n\t\td * 5,\n\t\td * 6,\n\t\td * 7,\n\t\td * 8,\n\t\td * 9,\n\t\td * 10,\n\t\td * 15,\n\t\t// year divisors (# months, approx)\n\t\tmo,\n\t\tmo * 2,\n\t\tmo * 3,\n\t\tmo * 4,\n\t\tmo * 6,\n\t\t// century divisors\n\t\ty,\n\t\ty * 2,\n\t\ty * 5,\n\t\ty * 10,\n\t\ty * 25,\n\t\ty * 50,\n\t\ty * 100,\n\t]);\n\n\t// [0]: minimum num secs in the tick incr\n\t// [1]: default tick format\n\t// [2-7]: rollover tick formats\n\t// [8]: mode: 0: replace [1] -> [2-7], 1: concat [1] + [2-7]\n\tconst _timeAxisStamps = [\n\t// tick incr default year month day hour min sec mode\n\t\t[y, yyyy, _, _, _, _, _, _, 1],\n\t\t[d * 28, \"{MMM}\", NLyyyy, _, _, _, _, _, 1],\n\t\t[d, md, NLyyyy, _, _, _, _, _, 1],\n\t\t[h, \"{h}\" + aa, NLmdyy, _, NLmd, _, _, _, 1],\n\t\t[m, hmmaa, NLmdyy, _, NLmd, _, _, _, 1],\n\t\t[s, ss, NLmdyy + \" \" + hmmaa, _, NLmd + \" \" + hmmaa, _, NLhmmaa, _, 1],\n\t\t[ms, ss + \".{fff}\", NLmdyy + \" \" + hmmaa, _, NLmd + \" \" + hmmaa, _, NLhmmaa, _, 1],\n\t];\n\n\t// the ensures that axis ticks, values & grid are aligned to logical temporal breakpoints and not an arbitrary timestamp\n\t// https://www.timeanddate.com/time/dst/\n\t// https://www.timeanddate.com/time/dst/2019.html\n\t// https://www.epochconverter.com/timezones\n\tfunction timeAxisSplits(tzDate) {\n\t\treturn (self, axisIdx, scaleMin, scaleMax, foundIncr, foundSpace) => {\n\t\t\tlet splits = [];\n\t\t\tlet isYr = foundIncr >= y;\n\t\t\tlet isMo = foundIncr >= mo && foundIncr < y;\n\n\t\t\t// get the timezone-adjusted date\n\t\t\tlet minDate = tzDate(scaleMin);\n\t\t\tlet minDateTs = roundDec(minDate * ms, 3);\n\n\t\t\t// get ts of 12am (this lands us at or before the original scaleMin)\n\t\t\tlet minMin = mkDate(minDate.getFullYear(), isYr ? 0 : minDate.getMonth(), isMo || isYr ? 1 : minDate.getDate());\n\t\t\tlet minMinTs = roundDec(minMin * ms, 3);\n\n\t\t\tif (isMo || isYr) {\n\t\t\t\tlet moIncr = isMo ? foundIncr / mo : 0;\n\t\t\t\tlet yrIncr = isYr ? foundIncr / y : 0;\n\t\t\t//\tlet tzOffset = scaleMin - minDateTs;\t\t// needed?\n\t\t\t\tlet split = minDateTs == minMinTs ? minDateTs : roundDec(mkDate(minMin.getFullYear() + yrIncr, minMin.getMonth() + moIncr, 1) * ms, 3);\n\t\t\t\tlet splitDate = new Date(round(split / ms));\n\t\t\t\tlet baseYear = splitDate.getFullYear();\n\t\t\t\tlet baseMonth = splitDate.getMonth();\n\n\t\t\t\tfor (let i = 0; split <= scaleMax; i++) {\n\t\t\t\t\tlet next = mkDate(baseYear + yrIncr * i, baseMonth + moIncr * i, 1);\n\t\t\t\t\tlet offs = next - tzDate(roundDec(next * ms, 3));\n\n\t\t\t\t\tsplit = roundDec((+next + offs) * ms, 3);\n\n\t\t\t\t\tif (split <= scaleMax)\n\t\t\t\t\t\tsplits.push(split);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet incr0 = foundIncr >= d ? d : foundIncr;\n\t\t\t\tlet tzOffset = floor(scaleMin) - floor(minDateTs);\n\t\t\t\tlet split = minMinTs + tzOffset + incrRoundUp(minDateTs - minMinTs, incr0);\n\t\t\t\tsplits.push(split);\n\n\t\t\t\tlet date0 = tzDate(split);\n\n\t\t\t\tlet prevHour = date0.getHours() + (date0.getMinutes() / m) + (date0.getSeconds() / h);\n\t\t\t\tlet incrHours = foundIncr / h;\n\n\t\t\t\tlet minSpace = self.axes[axisIdx]._space;\n\t\t\t\tlet pctSpace = foundSpace / minSpace;\n\n\t\t\t\twhile (1) {\n\t\t\t\t\tsplit = roundDec(split + foundIncr, ms == 1 ? 0 : 3);\n\n\t\t\t\t\tif (split > scaleMax)\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tif (incrHours > 1) {\n\t\t\t\t\t\tlet expectedHour = floor(roundDec(prevHour + incrHours, 6)) % 24;\n\t\t\t\t\t\tlet splitDate = tzDate(split);\n\t\t\t\t\t\tlet actualHour = splitDate.getHours();\n\n\t\t\t\t\t\tlet dstShift = actualHour - expectedHour;\n\n\t\t\t\t\t\tif (dstShift > 1)\n\t\t\t\t\t\t\tdstShift = -1;\n\n\t\t\t\t\t\tsplit -= dstShift * h;\n\n\t\t\t\t\t\tprevHour = (prevHour + incrHours) % 24;\n\n\t\t\t\t\t\t// add a tick only if it's further than 70% of the min allowed label spacing\n\t\t\t\t\t\tlet prevSplit = splits[splits.length - 1];\n\t\t\t\t\t\tlet pctIncr = roundDec((split - prevSplit) / foundIncr, 3);\n\n\t\t\t\t\t\tif (pctIncr * pctSpace >= .7)\n\t\t\t\t\t\t\tsplits.push(split);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsplits.push(split);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn splits;\n\t\t}\n\t}\n\n\treturn [\n\t\ttimeIncrs,\n\t\t_timeAxisStamps,\n\t\ttimeAxisSplits,\n\t];\n}\n\nconst [ timeIncrsMs, _timeAxisStampsMs, timeAxisSplitsMs ] = genTimeStuffs(1);\nconst [ timeIncrsS, _timeAxisStampsS, timeAxisSplitsS ] = genTimeStuffs(1e-3);\n\n// base 2\ngenIncrs(2, -53, 53, [1]);\n\n/*\nconsole.log({\n\tdecIncrs,\n\toneIncrs,\n\twholeIncrs,\n\tnumIncrs,\n\ttimeIncrs,\n\tfixedDec,\n});\n*/\n\nfunction timeAxisStamps(stampCfg, fmtDate) {\n\treturn stampCfg.map(s => s.map((v, i) =>\n\t\ti == 0 || i == 8 || v == null ? v : fmtDate(i == 1 || s[8] == 0 ? v : s[1] + v)\n\t));\n}\n\n// TODO: will need to accept spaces[] and pull incr into the loop when grid will be non-uniform, eg for log scales.\n// currently we ignore this for months since they're *nearly* uniform and the added complexity is not worth it\nfunction timeAxisVals(tzDate, stamps) {\n\treturn (self, splits, axisIdx, foundSpace, foundIncr) => {\n\t\tlet s = stamps.find(s => foundIncr >= s[0]) || stamps[stamps.length - 1];\n\n\t\t// these track boundaries when a full label is needed again\n\t\tlet prevYear;\n\t\tlet prevMnth;\n\t\tlet prevDate;\n\t\tlet prevHour;\n\t\tlet prevMins;\n\t\tlet prevSecs;\n\n\t\treturn splits.map(split => {\n\t\t\tlet date = tzDate(split);\n\n\t\t\tlet newYear = date.getFullYear();\n\t\t\tlet newMnth = date.getMonth();\n\t\t\tlet newDate = date.getDate();\n\t\t\tlet newHour = date.getHours();\n\t\t\tlet newMins = date.getMinutes();\n\t\t\tlet newSecs = date.getSeconds();\n\n\t\t\tlet stamp = (\n\t\t\t\tnewYear != prevYear && s[2] ||\n\t\t\t\tnewMnth != prevMnth && s[3] ||\n\t\t\t\tnewDate != prevDate && s[4] ||\n\t\t\t\tnewHour != prevHour && s[5] ||\n\t\t\t\tnewMins != prevMins && s[6] ||\n\t\t\t\tnewSecs != prevSecs && s[7] ||\n\t\t\t\t s[1]\n\t\t\t);\n\n\t\t\tprevYear = newYear;\n\t\t\tprevMnth = newMnth;\n\t\t\tprevDate = newDate;\n\t\t\tprevHour = newHour;\n\t\t\tprevMins = newMins;\n\t\t\tprevSecs = newSecs;\n\n\t\t\treturn stamp(date);\n\t\t});\n\t}\n}\n\n// for when axis.values is defined as a static fmtDate template string\nfunction timeAxisVal(tzDate, dateTpl) {\n\tlet stamp = fmtDate(dateTpl);\n\treturn (self, splits, axisIdx, foundSpace, foundIncr) => splits.map(split => stamp(tzDate(split)));\n}\n\nfunction mkDate(y, m, d) {\n\treturn new Date(y, m, d);\n}\n\nfunction timeSeriesStamp(stampCfg, fmtDate) {\n\treturn fmtDate(stampCfg);\n}\nconst _timeSeriesStamp = '{YYYY}-{MM}-{DD} {h}:{mm}{aa}';\n\nfunction timeSeriesVal(tzDate, stamp) {\n\treturn (self, val, seriesIdx, dataIdx) => dataIdx == null ? LEGEND_DISP : stamp(tzDate(val));\n}\n\nfunction legendStroke(self, seriesIdx) {\n\tlet s = self.series[seriesIdx];\n\treturn s.width ? s.stroke(self, seriesIdx) : s.points.width ? s.points.stroke(self, seriesIdx) : null;\n}\n\nfunction legendFill(self, seriesIdx) {\n\treturn self.series[seriesIdx].fill(self, seriesIdx);\n}\n\nconst legendOpts = {\n\tshow: true,\n\tlive: true,\n\tisolate: false,\n\tmount: noop,\n\tmarkers: {\n\t\tshow: true,\n\t\twidth: 2,\n\t\tstroke: legendStroke,\n\t\tfill: legendFill,\n\t\tdash: \"solid\",\n\t},\n\tidx: null,\n\tidxs: null,\n\tvalues: [],\n};\n\nfunction cursorPointShow(self, si) {\n\tlet o = self.cursor.points;\n\n\tlet pt = placeDiv();\n\n\tlet size = o.size(self, si);\n\tsetStylePx(pt, WIDTH, size);\n\tsetStylePx(pt, HEIGHT, size);\n\n\tlet mar = size / -2;\n\tsetStylePx(pt, \"marginLeft\", mar);\n\tsetStylePx(pt, \"marginTop\", mar);\n\n\tlet width = o.width(self, si, size);\n\twidth && setStylePx(pt, \"borderWidth\", width);\n\n\treturn pt;\n}\n\nfunction cursorPointFill(self, si) {\n\tlet sp = self.series[si].points;\n\treturn sp._fill || sp._stroke;\n}\n\nfunction cursorPointStroke(self, si) {\n\tlet sp = self.series[si].points;\n\treturn sp._stroke || sp._fill;\n}\n\nfunction cursorPointSize(self, si) {\n\tlet sp = self.series[si].points;\n\treturn sp.size;\n}\n\nfunction dataIdx(self, seriesIdx, cursorIdx) {\n\treturn cursorIdx;\n}\n\nconst moveTuple = [0,0];\n\nfunction cursorMove(self, mouseLeft1, mouseTop1) {\n\tmoveTuple[0] = mouseLeft1;\n\tmoveTuple[1] = mouseTop1;\n\treturn moveTuple;\n}\n\nfunction filtBtn0(self, targ, handle) {\n\treturn e => {\n\t\te.button == 0 && handle(e);\n\t};\n}\n\nfunction passThru(self, targ, handle) {\n\treturn handle;\n}\n\nconst cursorOpts = {\n\tshow: true,\n\tx: true,\n\ty: true,\n\tlock: false,\n\tmove: cursorMove,\n\tpoints: {\n\t\tshow: cursorPointShow,\n\t\tsize: cursorPointSize,\n\t\twidth: 0,\n\t\tstroke: cursorPointStroke,\n\t\tfill: cursorPointFill,\n\t},\n\n\tbind: {\n\t\tmousedown: filtBtn0,\n\t\tmouseup: filtBtn0,\n\t\tclick: filtBtn0,\n\t\tdblclick: filtBtn0,\n\n\t\tmousemove: passThru,\n\t\tmouseleave: passThru,\n\t\tmouseenter: passThru,\n\t},\n\n\tdrag: {\n\t\tsetScale: true,\n\t\tx: true,\n\t\ty: false,\n\t\tdist: 0,\n\t\tuni: null,\n\t\tclick: (self, e) => {\n\t\t//\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\te.stopImmediatePropagation();\n\t\t},\n\t\t_x: false,\n\t\t_y: false,\n\t},\n\n\tfocus: {\n\t\tprox: -1,\n\t\tbias: 0,\n\t},\n\n\tleft: -10,\n\ttop: -10,\n\tidx: null,\n\tdataIdx,\n\tidxs: null,\n};\n\nconst axisLines = {\n\tshow: true,\n\tstroke: \"rgba(0,0,0,0.07)\",\n\twidth: 2,\n//\tdash: [],\n};\n\nconst grid = assign({}, axisLines, {\n\tfilter: retArg1,\n});\n\nconst ticks = assign({}, grid, {\n\tsize: 10,\n});\n\nconst border = assign({}, axisLines, {\n\tshow: false,\n});\n\nconst font = '12px system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"';\nconst labelFont = \"bold \" + font;\nconst lineMult = 1.5;\t\t// font-size multiplier\n\nconst xAxisOpts = {\n\tshow: true,\n\tscale: \"x\",\n\tstroke: hexBlack,\n\tspace: 50,\n\tgap: 5,\n\tsize: 50,\n\tlabelGap: 0,\n\tlabelSize: 30,\n\tlabelFont,\n\tside: 2,\n//\tclass: \"x-vals\",\n//\tincrs: timeIncrs,\n//\tvalues: timeVals,\n//\tfilter: retArg1,\n\tgrid,\n\tticks,\n\tborder,\n\tfont,\n\trotate: 0,\n};\n\nconst numSeriesLabel = \"Value\";\nconst timeSeriesLabel = \"Time\";\n\nconst xSeriesOpts = {\n\tshow: true,\n\tscale: \"x\",\n\tauto: false,\n\tsorted: 1,\n//\tlabel: \"Time\",\n//\tvalue: v => stamp(new Date(v * 1e3)),\n\n\t// internal caches\n\tmin: inf,\n\tmax: -inf,\n\tidxs: [],\n};\n\nfunction numAxisVals(self, splits, axisIdx, foundSpace, foundIncr) {\n\treturn splits.map(v => v == null ? \"\" : fmtNum(v));\n}\n\nfunction numAxisSplits(self, axisIdx, scaleMin, scaleMax, foundIncr, foundSpace, forceMin) {\n\tlet splits = [];\n\n\tlet numDec = fixedDec.get(foundIncr) || 0;\n\n\tscaleMin = forceMin ? scaleMin : roundDec(incrRoundUp(scaleMin, foundIncr), numDec);\n\n\tfor (let val = scaleMin; val <= scaleMax; val = roundDec(val + foundIncr, numDec))\n\t\tsplits.push(Object.is(val, -0) ? 0 : val);\t\t// coalesces -0\n\n\treturn splits;\n}\n\n// this doesnt work for sin, which needs to come off from 0 independently in pos and neg dirs\nfunction logAxisSplits(self, axisIdx, scaleMin, scaleMax, foundIncr, foundSpace, forceMin) {\n\tconst splits = [];\n\n\tconst logBase = self.scales[self.axes[axisIdx].scale].log;\n\n\tconst logFn = logBase == 10 ? log10 : log2;\n\n\tconst exp = floor(logFn(scaleMin));\n\n\tfoundIncr = pow(logBase, exp);\n\n\tif (logBase == 10 && exp < 0)\n\t\tfoundIncr = roundDec(foundIncr, -exp);\n\n\tlet split = scaleMin;\n\n\tdo {\n\t\tsplits.push(split);\n\t\tsplit = split + foundIncr;\n\n\t\tif (logBase == 10)\n\t\t\tsplit = roundDec(split, fixedDec.get(foundIncr));\n\n\t\tif (split >= foundIncr * logBase)\n\t\t\tfoundIncr = split;\n\n\t} while (split <= scaleMax);\n\n\treturn splits;\n}\n\nfunction asinhAxisSplits(self, axisIdx, scaleMin, scaleMax, foundIncr, foundSpace, forceMin) {\n\tlet sc = self.scales[self.axes[axisIdx].scale];\n\n\tlet linthresh = sc.asinh;\n\n\tlet posSplits = scaleMax > linthresh ? logAxisSplits(self, axisIdx, max(linthresh, scaleMin), scaleMax, foundIncr) : [linthresh];\n\tlet zero = scaleMax >= 0 && scaleMin <= 0 ? [0] : [];\n\tlet negSplits = scaleMin < -linthresh ? logAxisSplits(self, axisIdx, max(linthresh, -scaleMax), -scaleMin, foundIncr): [linthresh];\n\n\treturn negSplits.reverse().map(v => -v).concat(zero, posSplits);\n}\n\nconst RE_ALL = /./;\nconst RE_12357 = /[12357]/;\nconst RE_125 = /[125]/;\nconst RE_1 = /1/;\n\nfunction log10AxisValsFilt(self, splits, axisIdx, foundSpace, foundIncr) {\n\tlet axis = self.axes[axisIdx];\n\tlet scaleKey = axis.scale;\n\tlet sc = self.scales[scaleKey];\n\n\tif (sc.distr == 3 && sc.log == 2)\n\t\treturn splits;\n\n\tlet valToPos = self.valToPos;\n\n\tlet minSpace = axis._space;\n\n\tlet _10 = valToPos(10, scaleKey);\n\n\tlet re = (\n\t\tvalToPos(9, scaleKey) - _10 >= minSpace ? RE_ALL :\n\t\tvalToPos(7, scaleKey) - _10 >= minSpace ? RE_12357 :\n\t\tvalToPos(5, scaleKey) - _10 >= minSpace ? RE_125 :\n\t\tRE_1\n\t);\n\n\treturn splits.map(v => ((sc.distr == 4 && v == 0) || re.test(v)) ? v : null);\n}\n\nfunction numSeriesVal(self, val, seriesIdx, dataIdx) {\n\treturn dataIdx == null ? LEGEND_DISP : val == null ? \"\" : fmtNum(val);\n}\n\nconst yAxisOpts = {\n\tshow: true,\n\tscale: \"y\",\n\tstroke: hexBlack,\n\tspace: 30,\n\tgap: 5,\n\tsize: 50,\n\tlabelGap: 0,\n\tlabelSize: 30,\n\tlabelFont,\n\tside: 3,\n//\tclass: \"y-vals\",\n//\tincrs: numIncrs,\n//\tvalues: (vals, space) => vals,\n//\tfilter: retArg1,\n\tgrid,\n\tticks,\n\tborder,\n\tfont,\n\trotate: 0,\n};\n\n// takes stroke width\nfunction ptDia(width, mult) {\n\tlet dia = 3 + (width || 1) * 2;\n\treturn roundDec(dia * mult, 3);\n}\n\nfunction seriesPointsShow(self, si) {\n\tlet { scale, idxs } = self.series[0];\n\tlet xData = self._data[0];\n\tlet p0 = self.valToPos(xData[idxs[0]], scale, true);\n\tlet p1 = self.valToPos(xData[idxs[1]], scale, true);\n\tlet dim = abs(p1 - p0);\n\n\tlet s = self.series[si];\n//\tconst dia = ptDia(s.width, pxRatio);\n\tlet maxPts = dim / (s.points.space * pxRatio);\n\treturn idxs[1] - idxs[0] <= maxPts;\n}\n\nconst facet = {\n\tscale: null,\n\tauto: true,\n\tsorted: 0,\n\n\t// internal caches\n\tmin: inf,\n\tmax: -inf,\n};\n\nconst gaps = (self, seriesIdx, idx0, idx1, nullGaps) => nullGaps;\n\nconst xySeriesOpts = {\n\tshow: true,\n\tauto: true,\n\tsorted: 0,\n\tgaps,\n\talpha: 1,\n\tfacets: [\n\t\tassign({}, facet, {scale: 'x'}),\n\t\tassign({}, facet, {scale: 'y'}),\n\t],\n};\n\nconst ySeriesOpts = {\n\tscale: \"y\",\n\tauto: true,\n\tsorted: 0,\n\tshow: true,\n\tspanGaps: false,\n\tgaps,\n\talpha: 1,\n\tpoints: {\n\t\tshow: seriesPointsShow,\n\t\tfilter: null,\n\t// paths:\n\t//\tstroke: \"#000\",\n\t//\tfill: \"#fff\",\n\t//\twidth: 1,\n\t//\tsize: 10,\n\t},\n//\tlabel: \"Value\",\n//\tvalue: v => v,\n\tvalues: null,\n\n\t// internal caches\n\tmin: inf,\n\tmax: -inf,\n\tidxs: [],\n\n\tpath: null,\n\tclip: null,\n};\n\nfunction clampScale(self, val, scaleMin, scaleMax, scaleKey) {\n/*\n\tif (val < 0) {\n\t\tlet cssHgt = self.bbox.height / pxRatio;\n\t\tlet absPos = self.valToPos(abs(val), scaleKey);\n\t\tlet fromBtm = cssHgt - absPos;\n\t\treturn self.posToVal(cssHgt + fromBtm, scaleKey);\n\t}\n*/\n\treturn scaleMin / 10;\n}\n\nconst xScaleOpts = {\n\ttime: FEAT_TIME,\n\tauto: true,\n\tdistr: 1,\n\tlog: 10,\n\tasinh: 1,\n\tmin: null,\n\tmax: null,\n\tdir: 1,\n\tori: 0,\n};\n\nconst yScaleOpts = assign({}, xScaleOpts, {\n\ttime: false,\n\tori: 1,\n});\n\nconst syncs = {};\n\nfunction _sync(key, opts) {\n\tlet s = syncs[key];\n\n\tif (!s) {\n\t\ts = {\n\t\t\tkey,\n\t\t\tplots: [],\n\t\t\tsub(plot) {\n\t\t\t\ts.plots.push(plot);\n\t\t\t},\n\t\t\tunsub(plot) {\n\t\t\t\ts.plots = s.plots.filter(c => c != plot);\n\t\t\t},\n\t\t\tpub(type, self, x, y, w, h, i) {\n\t\t\t\tfor (let j = 0; j < s.plots.length; j++)\n\t\t\t\t\ts.plots[j] != self && s.plots[j].pub(type, self, x, y, w, h, i);\n\t\t\t},\n\t\t};\n\n\t\tif (key != null)\n\t\t\tsyncs[key] = s;\n\t}\n\n\treturn s;\n}\n\nconst BAND_CLIP_FILL = 1 << 0;\nconst BAND_CLIP_STROKE = 1 << 1;\n\nfunction orient(u, seriesIdx, cb) {\n\tconst mode = u.mode;\n\tconst series = u.series[seriesIdx];\n\tconst data = mode == 2 ? u._data[seriesIdx] : u._data;\n\tconst scales = u.scales;\n\tconst bbox = u.bbox;\n\n\tlet dx = data[0],\n\t\tdy = mode == 2 ? data[1] : data[seriesIdx],\n\t\tsx = mode == 2 ? scales[series.facets[0].scale] : scales[u.series[0].scale],\n\t\tsy = mode == 2 ? scales[series.facets[1].scale] : scales[series.scale],\n\t\tl = bbox.left,\n\t\tt = bbox.top,\n\t\tw = bbox.width,\n\t\th = bbox.height,\n\t\tH = u.valToPosH,\n\t\tV = u.valToPosV;\n\n\treturn (sx.ori == 0\n\t\t? cb(\n\t\t\tseries,\n\t\t\tdx,\n\t\t\tdy,\n\t\t\tsx,\n\t\t\tsy,\n\t\t\tH,\n\t\t\tV,\n\t\t\tl,\n\t\t\tt,\n\t\t\tw,\n\t\t\th,\n\t\t\tmoveToH,\n\t\t\tlineToH,\n\t\t\trectH,\n\t\t\tarcH,\n\t\t\tbezierCurveToH,\n\t\t)\n\t\t: cb(\n\t\t\tseries,\n\t\t\tdx,\n\t\t\tdy,\n\t\t\tsx,\n\t\t\tsy,\n\t\t\tV,\n\t\t\tH,\n\t\t\tt,\n\t\t\tl,\n\t\t\th,\n\t\t\tw,\n\t\t\tmoveToV,\n\t\t\tlineToV,\n\t\t\trectV,\n\t\t\tarcV,\n\t\t\tbezierCurveToV,\n\t\t)\n\t);\n}\n\nfunction bandFillClipDirs(self, seriesIdx) {\n\tlet fillDir = 0;\n\n\t// 2 bits, -1 | 1\n\tlet clipDirs = 0;\n\n\tlet bands = ifNull(self.bands, EMPTY_ARR);\n\n\tfor (let i = 0; i < bands.length; i++) {\n\t\tlet b = bands[i];\n\n\t\t// is a \"from\" band edge\n\t\tif (b.series[0] == seriesIdx)\n\t\t\tfillDir = b.dir;\n\t\t// is a \"to\" band edge\n\t\telse if (b.series[1] == seriesIdx) {\n\t\t\tif (b.dir == 1)\n\t\t\t\tclipDirs |= 1;\n\t\t\telse\n\t\t\t\tclipDirs |= 2;\n\t\t}\n\t}\n\n\treturn [\n\t\tfillDir,\n\t\t(\n\t\t\tclipDirs == 1 ? -1 : // neg only\n\t\t\tclipDirs == 2 ? 1 : // pos only\n\t\t\tclipDirs == 3 ? 2 : // both\n\t\t\t 0 // neither\n\t\t)\n\t];\n}\n\nfunction seriesFillTo(self, seriesIdx, dataMin, dataMax, bandFillDir) {\n\tlet mode = self.mode;\n\tlet series = self.series[seriesIdx];\n\tlet scaleKey = mode == 2 ? series.facets[1].scale : series.scale;\n\tlet scale = self.scales[scaleKey];\n\n\treturn (\n\t\tbandFillDir == -1 ? scale.min :\n\t\tbandFillDir == 1 ? scale.max :\n\t\tscale.distr == 3 ? (\n\t\t\tscale.dir == 1 ? scale.min :\n\t\t\tscale.max\n\t\t) : 0\n\t);\n}\n\n// creates inverted band clip path (from stroke path -> yMax || yMin)\n// clipDir is always inverse of fillDir\n// default clip dir is upwards (1), since default band fill is downwards/fillBelowTo (-1) (highIdx -> lowIdx)\nfunction clipBandLine(self, seriesIdx, idx0, idx1, strokePath, clipDir) {\n\treturn orient(self, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\tlet pxRound = series.pxRound;\n\n\t\tconst dir = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\t\tconst lineTo = scaleX.ori == 0 ? lineToH : lineToV;\n\n\t\tlet frIdx, toIdx;\n\n\t\tif (dir == 1) {\n\t\t\tfrIdx = idx0;\n\t\t\ttoIdx = idx1;\n\t\t}\n\t\telse {\n\t\t\tfrIdx = idx1;\n\t\t\ttoIdx = idx0;\n\t\t}\n\n\t\t// path start\n\t\tlet x0 = pxRound(valToPosX(dataX[frIdx], scaleX, xDim, xOff));\n\t\tlet y0 = pxRound(valToPosY(dataY[frIdx], scaleY, yDim, yOff));\n\t\t// path end x\n\t\tlet x1 = pxRound(valToPosX(dataX[toIdx], scaleX, xDim, xOff));\n\t\t// upper or lower y limit\n\t\tlet yLimit = pxRound(valToPosY(clipDir == 1 ? scaleY.max : scaleY.min, scaleY, yDim, yOff));\n\n\t\tlet clip = new Path2D(strokePath);\n\n\t\tlineTo(clip, x1, yLimit);\n\t\tlineTo(clip, x0, yLimit);\n\t\tlineTo(clip, x0, y0);\n\n\t\treturn clip;\n\t});\n}\n\nfunction clipGaps(gaps, ori, plotLft, plotTop, plotWid, plotHgt) {\n\tlet clip = null;\n\n\t// create clip path (invert gaps and non-gaps)\n\tif (gaps.length > 0) {\n\t\tclip = new Path2D();\n\n\t\tconst rect = ori == 0 ? rectH : rectV;\n\n\t\tlet prevGapEnd = plotLft;\n\n\t\tfor (let i = 0; i < gaps.length; i++) {\n\t\t\tlet g = gaps[i];\n\n\t\t\tif (g[1] > g[0]) {\n\t\t\t\tlet w = g[0] - prevGapEnd;\n\n\t\t\t\tw > 0 && rect(clip, prevGapEnd, plotTop, w, plotTop + plotHgt);\n\n\t\t\t\tprevGapEnd = g[1];\n\t\t\t}\n\t\t}\n\n\t\tlet w = plotLft + plotWid - prevGapEnd;\n\n\t\tw > 0 && rect(clip, prevGapEnd, plotTop, w, plotTop + plotHgt);\n\t}\n\n\treturn clip;\n}\n\nfunction addGap(gaps, fromX, toX) {\n\tlet prevGap = gaps[gaps.length - 1];\n\n\tif (prevGap && prevGap[0] == fromX)\t\t\t// TODO: gaps must be encoded at stroke widths?\n\t\tprevGap[1] = toX;\n\telse\n\t\tgaps.push([fromX, toX]);\n}\n\nfunction findGaps(xs, ys, idx0, idx1, dir, pixelForX, align) {\n\tlet gaps = [];\n\tlet len = xs.length;\n\n\tfor (let i = dir == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += dir) {\n\t\tlet yVal = ys[i];\n\n\t\tif (yVal === null) {\n\t\t\tlet fr = i, to = i;\n\n\t\t\tif (dir == 1) {\n\t\t\t\twhile (++i <= idx1 && ys[i] === null)\n\t\t\t\t\tto = i;\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (--i >= idx0 && ys[i] === null)\n\t\t\t\t\tto = i;\n\t\t\t}\n\n\t\t\tlet frPx = pixelForX(xs[fr]);\n\t\t\tlet toPx = to == fr ? frPx : pixelForX(xs[to]);\n\n\t\t\t// if value adjacent to edge null is same pixel, then it's partially\n\t\t\t// filled and gap should start at next pixel\n\t\t\tlet fri2 = fr - dir;\n\t\t\tlet frPx2 = align <= 0 && fri2 >= 0 && fri2 < len ? pixelForX(xs[fri2]) : frPx;\n\t\t//\tif (frPx2 == frPx)\n\t\t//\t\tfrPx++;\n\t\t//\telse\n\t\t\t\tfrPx = frPx2;\n\n\t\t\tlet toi2 = to + dir;\n\t\t\tlet toPx2 = align >= 0 && toi2 >= 0 && toi2 < len ? pixelForX(xs[toi2]) : toPx;\n\t\t//\tif (toPx2 == toPx)\n\t\t//\t\ttoPx--;\n\t\t//\telse\n\t\t\t\ttoPx = toPx2;\n\n\t\t\tif (toPx >= frPx)\n\t\t\t\tgaps.push([frPx, toPx]); // addGap\n\t\t}\n\t}\n\n\treturn gaps;\n}\n\nfunction pxRoundGen(pxAlign) {\n\treturn pxAlign == 0 ? retArg0 : pxAlign == 1 ? round : v => incrRound(v, pxAlign);\n}\n\nfunction rect(ori) {\n\tlet moveTo = ori == 0 ?\n\t\tmoveToH :\n\t\tmoveToV;\n\n\tlet arcTo = ori == 0 ?\n\t\t(p, x1, y1, x2, y2, r) => { p.arcTo(x1, y1, x2, y2, r); } :\n\t\t(p, y1, x1, y2, x2, r) => { p.arcTo(x1, y1, x2, y2, r); };\n\n\tlet rect = ori == 0 ?\n\t\t(p, x, y, w, h) => { p.rect(x, y, w, h); } :\n\t\t(p, y, x, h, w) => { p.rect(x, y, w, h); };\n\n\t// TODO (pending better browser support): https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect\n\treturn (p, x, y, w, h, endRad = 0, baseRad = 0) => {\n\t\tif (endRad == 0 && baseRad == 0)\n\t\t\trect(p, x, y, w, h);\n\t\telse {\n\t\t\tendRad = min(endRad, w / 2, h / 2);\n\t\t\tbaseRad = min(baseRad, w / 2, h / 2);\n\n\t\t\t// adapted from https://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-using-html-canvas/7838871#7838871\n\t\t\tmoveTo(p, x + endRad, y);\n\t\t\tarcTo(p, x + w, y, x + w, y + h, endRad);\n\t\t\tarcTo(p, x + w, y + h, x, y + h, baseRad);\n\t\t\tarcTo(p, x, y + h, x, y, baseRad);\n\t\t\tarcTo(p, x, y, x + w, y, endRad);\n\t\t\tp.closePath();\n\t\t}\n\t};\n}\n\n// orientation-inverting canvas functions\nconst moveToH = (p, x, y) => { p.moveTo(x, y); };\nconst moveToV = (p, y, x) => { p.moveTo(x, y); };\nconst lineToH = (p, x, y) => { p.lineTo(x, y); };\nconst lineToV = (p, y, x) => { p.lineTo(x, y); };\nconst rectH = rect(0);\nconst rectV = rect(1);\nconst arcH = (p, x, y, r, startAngle, endAngle) => { p.arc(x, y, r, startAngle, endAngle); };\nconst arcV = (p, y, x, r, startAngle, endAngle) => { p.arc(x, y, r, startAngle, endAngle); };\nconst bezierCurveToH = (p, bp1x, bp1y, bp2x, bp2y, p2x, p2y) => { p.bezierCurveTo(bp1x, bp1y, bp2x, bp2y, p2x, p2y); };\nconst bezierCurveToV = (p, bp1y, bp1x, bp2y, bp2x, p2y, p2x) => { p.bezierCurveTo(bp1x, bp1y, bp2x, bp2y, p2x, p2y); };\n\n// TODO: drawWrap(seriesIdx, drawPoints) (save, restore, translate, clip)\nfunction points(opts) {\n\treturn (u, seriesIdx, idx0, idx1, filtIdxs) => {\n\t//\tlog(\"drawPoints()\", arguments);\n\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet { pxRound, points } = series;\n\n\t\t\tlet moveTo, arc;\n\n\t\t\tif (scaleX.ori == 0) {\n\t\t\t\tmoveTo = moveToH;\n\t\t\t\tarc = arcH;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmoveTo = moveToV;\n\t\t\t\tarc = arcV;\n\t\t\t}\n\n\t\t\tconst width = roundDec(points.width * pxRatio, 3);\n\n\t\t\tlet rad = (points.size - points.width) / 2 * pxRatio;\n\t\t\tlet dia = roundDec(rad * 2, 3);\n\n\t\t\tlet fill = new Path2D();\n\t\t\tlet clip = new Path2D();\n\n\t\t\tlet { left: lft, top: top, width: wid, height: hgt } = u.bbox;\n\n\t\t\trectH(clip,\n\t\t\t\tlft - dia,\n\t\t\t\ttop - dia,\n\t\t\t\twid + dia * 2,\n\t\t\t\thgt + dia * 2,\n\t\t\t);\n\n\t\t\tconst drawPoint = pi => {\n\t\t\t\tif (dataY[pi] != null) {\n\t\t\t\t\tlet x = pxRound(valToPosX(dataX[pi], scaleX, xDim, xOff));\n\t\t\t\t\tlet y = pxRound(valToPosY(dataY[pi], scaleY, yDim, yOff));\n\n\t\t\t\t\tmoveTo(fill, x + rad, y);\n\t\t\t\t\tarc(fill, x, y, rad, 0, PI * 2);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (filtIdxs)\n\t\t\t\tfiltIdxs.forEach(drawPoint);\n\t\t\telse {\n\t\t\t\tfor (let pi = idx0; pi <= idx1; pi++)\n\t\t\t\t\tdrawPoint(pi);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tstroke: width > 0 ? fill : null,\n\t\t\t\tfill,\n\t\t\t\tclip,\n\t\t\t\tflags: BAND_CLIP_FILL | BAND_CLIP_STROKE,\n\t\t\t};\n\t\t});\n\t};\n}\n\nfunction _drawAcc(lineTo) {\n\treturn (stroke, accX, minY, maxY, inY, outY) => {\n\t\tif (minY != maxY) {\n\t\t\tif (inY != minY && outY != minY)\n\t\t\t\tlineTo(stroke, accX, minY);\n\t\t\tif (inY != maxY && outY != maxY)\n\t\t\t\tlineTo(stroke, accX, maxY);\n\n\t\t\tlineTo(stroke, accX, outY);\n\t\t}\n\t};\n}\n\nconst drawAccH = _drawAcc(lineToH);\nconst drawAccV = _drawAcc(lineToV);\n\nfunction linear(opts) {\n\tconst alignGaps = ifNull(opts?.alignGaps, 0);\n\n\treturn (u, seriesIdx, idx0, idx1) => {\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet pxRound = series.pxRound;\n\n\t\t\tlet pixelForX = val => pxRound(valToPosX(val, scaleX, xDim, xOff));\n\t\t\tlet pixelForY = val => pxRound(valToPosY(val, scaleY, yDim, yOff));\n\n\t\t\tlet lineTo, drawAcc;\n\n\t\t\tif (scaleX.ori == 0) {\n\t\t\t\tlineTo = lineToH;\n\t\t\t\tdrawAcc = drawAccH;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlineTo = lineToV;\n\t\t\t\tdrawAcc = drawAccV;\n\t\t\t}\n\n\t\t\tconst dir = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\n\t\t\tconst _paths = {stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: BAND_CLIP_FILL};\n\t\t\tconst stroke = _paths.stroke;\n\n\t\t\tlet minY = inf,\n\t\t\t\tmaxY = -inf,\n\t\t\t\tinY, outY, drawnAtX;\n\n\t\t\tlet accX = pixelForX(dataX[dir == 1 ? idx0 : idx1]);\n\n\t\t\t// data edges\n\t\t\tlet lftIdx = nonNullIdx(dataY, idx0, idx1, 1 * dir);\n\t\t\tlet rgtIdx = nonNullIdx(dataY, idx0, idx1, -1 * dir);\n\t\t\tlet lftX = pixelForX(dataX[lftIdx]);\n\t\t\tlet rgtX = pixelForX(dataX[rgtIdx]);\n\n\t\t\tlet hasGap = false;\n\n\t\t\tfor (let i = dir == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += dir) {\n\t\t\t\tlet x = pixelForX(dataX[i]);\n\t\t\t\tlet yVal = dataY[i];\n\n\t\t\t\tif (x == accX) {\n\t\t\t\t\tif (yVal != null) {\n\t\t\t\t\t\toutY = pixelForY(yVal);\n\n\t\t\t\t\t\tif (minY == inf) {\n\t\t\t\t\t\t\tlineTo(stroke, x, outY);\n\t\t\t\t\t\t\tinY = outY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tminY = min(outY, minY);\n\t\t\t\t\t\tmaxY = max(outY, maxY);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (yVal === null)\n\t\t\t\t\t\t\thasGap = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (minY != inf) {\n\t\t\t\t\t\tdrawAcc(stroke, accX, minY, maxY, inY, outY);\n\t\t\t\t\t\tdrawnAtX = accX;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (yVal != null) {\n\t\t\t\t\t\toutY = pixelForY(yVal);\n\t\t\t\t\t\tlineTo(stroke, x, outY);\n\t\t\t\t\t\tminY = maxY = inY = outY;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tminY = inf;\n\t\t\t\t\t\tmaxY = -inf;\n\n\t\t\t\t\t\tif (yVal === null)\n\t\t\t\t\t\t\thasGap = true;\n\t\t\t\t\t}\n\n\t\t\t\t\taccX = x;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (minY != inf && minY != maxY && drawnAtX != accX)\n\t\t\t\tdrawAcc(stroke, accX, minY, maxY, inY, outY);\n\n\t\t\tlet [ bandFillDir, bandClipDir ] = bandFillClipDirs(u, seriesIdx);\n\n\t\t\tif (series.fill != null || bandFillDir != 0) {\n\t\t\t\tlet fill = _paths.fill = new Path2D(stroke);\n\n\t\t\t\tlet fillToVal = series.fillTo(u, seriesIdx, series.min, series.max, bandFillDir);\n\t\t\t\tlet fillToY = pixelForY(fillToVal);\n\n\t\t\t\tlineTo(fill, rgtX, fillToY);\n\t\t\t\tlineTo(fill, lftX, fillToY);\n\t\t\t}\n\n\t\t\tif (!series.spanGaps) {\n\t\t\t//\tconsole.time('gaps');\n\t\t\t\tlet gaps = [];\n\n\t\t\t\thasGap && gaps.push(...findGaps(dataX, dataY, idx0, idx1, dir, pixelForX, alignGaps));\n\n\t\t\t//\tconsole.timeEnd('gaps');\n\n\t\t\t//\tconsole.log('gaps', JSON.stringify(gaps));\n\n\t\t\t\t_paths.gaps = gaps = series.gaps(u, seriesIdx, idx0, idx1, gaps);\n\n\t\t\t\t_paths.clip = clipGaps(gaps, scaleX.ori, xOff, yOff, xDim, yDim);\n\t\t\t}\n\n\t\t\tif (bandClipDir != 0) {\n\t\t\t\t_paths.band = bandClipDir == 2 ? [\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, -1),\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, 1),\n\t\t\t\t] : clipBandLine(u, seriesIdx, idx0, idx1, stroke, bandClipDir);\n\t\t\t}\n\n\t\t\treturn _paths;\n\t\t});\n\t};\n}\n\n// BUG: align: -1 behaves like align: 1 when scale.dir: -1\nfunction stepped(opts) {\n\tconst align = ifNull(opts.align, 1);\n\t// whether to draw ascenders/descenders at null/gap bondaries\n\tconst ascDesc = ifNull(opts.ascDesc, false);\n\tconst alignGaps = ifNull(opts.alignGaps, 0);\n\tconst extend = ifNull(opts.extend, false);\n\n\treturn (u, seriesIdx, idx0, idx1) => {\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet pxRound = series.pxRound;\n\n\t\t\tlet { left, width } = u.bbox;\n\n\t\t\tlet pixelForX = val => pxRound(valToPosX(val, scaleX, xDim, xOff));\n\t\t\tlet pixelForY = val => pxRound(valToPosY(val, scaleY, yDim, yOff));\n\n\t\t\tlet lineTo = scaleX.ori == 0 ? lineToH : lineToV;\n\n\t\t\tconst _paths = {stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: BAND_CLIP_FILL};\n\t\t\tconst stroke = _paths.stroke;\n\n\t\t\tconst dir = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\n\t\t\tidx0 = nonNullIdx(dataY, idx0, idx1, 1);\n\t\t\tidx1 = nonNullIdx(dataY, idx0, idx1, -1);\n\n\t\t\tlet prevYPos = pixelForY(dataY[dir == 1 ? idx0 : idx1]);\n\t\t\tlet firstXPos = pixelForX(dataX[dir == 1 ? idx0 : idx1]);\n\t\t\tlet prevXPos = firstXPos;\n\n\t\t\tlet firstXPosExt = firstXPos;\n\n\t\t\tif (extend && align == -1) {\n\t\t\t\tfirstXPosExt = left;\n\t\t\t\tlineTo(stroke, firstXPosExt, prevYPos);\n\t\t\t}\n\n\t\t\tlineTo(stroke, firstXPos, prevYPos);\n\n\t\t\tfor (let i = dir == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += dir) {\n\t\t\t\tlet yVal1 = dataY[i];\n\n\t\t\t\tif (yVal1 == null)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlet x1 = pixelForX(dataX[i]);\n\t\t\t\tlet y1 = pixelForY(yVal1);\n\n\t\t\t\tif (align == 1)\n\t\t\t\t\tlineTo(stroke, x1, prevYPos);\n\t\t\t\telse\n\t\t\t\t\tlineTo(stroke, prevXPos, y1);\n\n\t\t\t\tlineTo(stroke, x1, y1);\n\n\t\t\t\tprevYPos = y1;\n\t\t\t\tprevXPos = x1;\n\t\t\t}\n\n\t\t\tlet prevXPosExt = prevXPos;\n\n\t\t\tif (extend && align == 1) {\n\t\t\t\tprevXPosExt = left + width;\n\t\t\t\tlineTo(stroke, prevXPosExt, prevYPos);\n\t\t\t}\n\n\t\t\tlet [ bandFillDir, bandClipDir ] = bandFillClipDirs(u, seriesIdx);\n\n\t\t\tif (series.fill != null || bandFillDir != 0) {\n\t\t\t\tlet fill = _paths.fill = new Path2D(stroke);\n\n\t\t\t\tlet fillTo = series.fillTo(u, seriesIdx, series.min, series.max, bandFillDir);\n\t\t\t\tlet fillToY = pixelForY(fillTo);\n\n\t\t\t\tlineTo(fill, prevXPosExt, fillToY);\n\t\t\t\tlineTo(fill, firstXPosExt, fillToY);\n\t\t\t}\n\n\t\t\tif (!series.spanGaps) {\n\t\t\t//\tconsole.time('gaps');\n\t\t\t\tlet gaps = [];\n\n\t\t\t\tgaps.push(...findGaps(dataX, dataY, idx0, idx1, dir, pixelForX, alignGaps));\n\n\t\t\t//\tconsole.timeEnd('gaps');\n\n\t\t\t//\tconsole.log('gaps', JSON.stringify(gaps));\n\n\t\t\t\t// expand/contract clips for ascenders/descenders\n\t\t\t\tlet halfStroke = (series.width * pxRatio) / 2;\n\t\t\t\tlet startsOffset = (ascDesc || align == 1) ? halfStroke : -halfStroke;\n\t\t\t\tlet endsOffset = (ascDesc || align == -1) ? -halfStroke : halfStroke;\n\n\t\t\t\tgaps.forEach(g => {\n\t\t\t\t\tg[0] += startsOffset;\n\t\t\t\t\tg[1] += endsOffset;\n\t\t\t\t});\n\n\t\t\t\t_paths.gaps = gaps = series.gaps(u, seriesIdx, idx0, idx1, gaps);\n\n\t\t\t\t_paths.clip = clipGaps(gaps, scaleX.ori, xOff, yOff, xDim, yDim);\n\t\t\t}\n\n\t\t\tif (bandClipDir != 0) {\n\t\t\t\t_paths.band = bandClipDir == 2 ? [\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, -1),\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, 1),\n\t\t\t\t] : clipBandLine(u, seriesIdx, idx0, idx1, stroke, bandClipDir);\n\t\t\t}\n\n\t\t\treturn _paths;\n\t\t});\n\t};\n}\n\nfunction bars(opts) {\n\topts = opts || EMPTY_OBJ;\n\tconst size = ifNull(opts.size, [0.6, inf, 1]);\n\tconst align = opts.align || 0;\n\tconst extraGap = (opts.gap || 0) * pxRatio;\n\n\tlet ro = opts.radius;\n\n\tro =\n\t\t// [valueRadius, baselineRadius]\n\t\tro == null ? [0, 0] :\n\t\ttypeof ro == 'number' ? [ro, 0] : ro;\n\n\tconst radiusFn = fnOrSelf(ro);\n\n\tconst gapFactor = 1 - size[0];\n\tconst maxWidth = ifNull(size[1], inf) * pxRatio;\n\tconst minWidth = ifNull(size[2], 1) * pxRatio;\n\n\tconst disp = ifNull(opts.disp, EMPTY_OBJ);\n\tconst _each = ifNull(opts.each, _ => {});\n\n\tconst { fill: dispFills, stroke: dispStrokes } = disp;\n\n\treturn (u, seriesIdx, idx0, idx1) => {\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet pxRound = series.pxRound;\n\n\t\t\tlet valRadius, baseRadius;\n\n\t\t\tif (scaleX.ori == 0)\n\t\t\t\t[valRadius, baseRadius] = radiusFn(u, seriesIdx);\n\t\t\telse\n\t\t\t\t[baseRadius, valRadius] = radiusFn(u, seriesIdx);\n\n\t\t\tconst _dirX = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\t\t\tconst _dirY = scaleY.dir * (scaleY.ori == 1 ? 1 : -1);\n\n\t\t\tlet rect = scaleX.ori == 0 ? rectH : rectV;\n\n\t\t\tlet each = scaleX.ori == 0 ? _each : (u, seriesIdx, i, top, lft, hgt, wid) => {\n\t\t\t\t_each(u, seriesIdx, i, lft, top, wid, hgt);\n\t\t\t};\n\n\t\t\tlet [ bandFillDir, bandClipDir ] = bandFillClipDirs(u, seriesIdx);\n\n\t\t//\tlet fillToY = series.fillTo(u, seriesIdx, series.min, series.max, bandFillDir);\n\t\t\tlet fillToY = scaleY.distr == 3 ? (bandFillDir == 1 ? scaleY.max : scaleY.min) : 0;\n\n\t\t\tlet y0Pos = valToPosY(fillToY, scaleY, yDim, yOff);\n\n\t\t\t// barWid is to center of stroke\n\t\t\tlet xShift, barWid;\n\n\t\t\tlet strokeWidth = pxRound(series.width * pxRatio);\n\n\t\t\tlet multiPath = false;\n\n\t\t\tlet fillColors = null;\n\t\t\tlet fillPaths = null;\n\t\t\tlet strokeColors = null;\n\t\t\tlet strokePaths = null;\n\n\t\t\tif (dispFills != null && (strokeWidth == 0 || dispStrokes != null)) {\n\t\t\t\tmultiPath = true;\n\n\t\t\t\tfillColors = dispFills.values(u, seriesIdx, idx0, idx1);\n\t\t\t\tfillPaths = new Map();\n\t\t\t\t(new Set(fillColors)).forEach(color => {\n\t\t\t\t\tif (color != null)\n\t\t\t\t\t\tfillPaths.set(color, new Path2D());\n\t\t\t\t});\n\n\t\t\t\tif (strokeWidth > 0) {\n\t\t\t\t\tstrokeColors = dispStrokes.values(u, seriesIdx, idx0, idx1);\n\t\t\t\t\tstrokePaths = new Map();\n\t\t\t\t\t(new Set(strokeColors)).forEach(color => {\n\t\t\t\t\t\tif (color != null)\n\t\t\t\t\t\t\tstrokePaths.set(color, new Path2D());\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet { x0, size } = disp;\n\n\t\t\tif (x0 != null && size != null) {\n\t\t\t\tdataX = x0.values(u, seriesIdx, idx0, idx1);\n\n\t\t\t\tif (x0.unit == 2)\n\t\t\t\t\tdataX = dataX.map(pct => u.posToVal(xOff + pct * xDim, scaleX.key, true));\n\n\t\t\t\t// assumes uniform sizes, for now\n\t\t\t\tlet sizes = size.values(u, seriesIdx, idx0, idx1);\n\n\t\t\t\tif (size.unit == 2)\n\t\t\t\t\tbarWid = sizes[0] * xDim;\n\t\t\t\telse\n\t\t\t\t\tbarWid = valToPosX(sizes[0], scaleX, xDim, xOff) - valToPosX(0, scaleX, xDim, xOff); // assumes linear scale (delta from 0)\n\n\t\t\t\tbarWid = pxRound(barWid - strokeWidth);\n\n\t\t\t\txShift = (_dirX == 1 ? -strokeWidth / 2 : barWid + strokeWidth / 2);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet colWid = xDim;\n\n\t\t\t\tif (dataX.length > 1) {\n\t\t\t\t\t// prior index with non-undefined y data\n\t\t\t\t\tlet prevIdx = null;\n\n\t\t\t\t\t// scan full dataset for smallest adjacent delta\n\t\t\t\t\t// will not work properly for non-linear x scales, since does not do expensive valToPosX calcs till end\n\t\t\t\t\tfor (let i = 0, minDelta = Infinity; i < dataX.length; i++) {\n\t\t\t\t\t\tif (dataY[i] !== undefined) {\n\t\t\t\t\t\t\tif (prevIdx != null) {\n\t\t\t\t\t\t\t\tlet delta = abs(dataX[i] - dataX[prevIdx]);\n\n\t\t\t\t\t\t\t\tif (delta < minDelta) {\n\t\t\t\t\t\t\t\t\tminDelta = delta;\n\t\t\t\t\t\t\t\t\tcolWid = abs(valToPosX(dataX[i], scaleX, xDim, xOff) - valToPosX(dataX[prevIdx], scaleX, xDim, xOff));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tprevIdx = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet gapWid = colWid * gapFactor;\n\n\t\t\t\tbarWid = pxRound(min(maxWidth, max(minWidth, colWid - gapWid)) - strokeWidth - extraGap);\n\n\t\t\t\txShift = (align == 0 ? barWid / 2 : align == _dirX ? 0 : barWid) - align * _dirX * extraGap / 2;\n\t\t\t}\n\n\t\t\tconst _paths = {stroke: null, fill: null, clip: null, band: null, gaps: null, flags: BAND_CLIP_FILL | BAND_CLIP_STROKE}; // disp, geom\n\n\t\t\tlet yLimit;\n\n\t\t\tif (bandClipDir != 0) {\n\t\t\t\t_paths.band = new Path2D();\n\t\t\t\tyLimit = pxRound(valToPosY(bandClipDir == 1 ? scaleY.max : scaleY.min, scaleY, yDim, yOff));\n\t\t\t}\n\n\t\t\tconst stroke = multiPath ? null : new Path2D();\n\t\t\tconst band = _paths.band;\n\n\t\t\tlet { y0, y1 } = disp;\n\n\t\t\tlet dataY0 = null;\n\n\t\t\tif (y0 != null && y1 != null) {\n\t\t\t\tdataY = y1.values(u, seriesIdx, idx0, idx1);\n\t\t\t\tdataY0 = y0.values(u, seriesIdx, idx0, idx1);\n\t\t\t}\n\n\t\t\tlet radVal = valRadius * barWid;\n\t\t\tlet radBase = baseRadius * barWid;\n\n\t\t\tfor (let i = _dirX == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += _dirX) {\n\t\t\t\tlet yVal = dataY[i];\n\n\t\t\t\t// we can skip both, drawing and band clipping for alignment artifacts\n\t\t\t\tif (yVal === undefined)\n\t\t\t\t\tcontinue;\n\n\t\t\t/*\n\t\t\t\t// interpolate upwards band clips\n\t\t\t\tif (yVal == null) {\n\t\t\t\t//\tif (hasBands)\n\t\t\t\t//\t\tyVal = costlyLerp(i, idx0, idx1, _dirX, dataY);\n\t\t\t\t//\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t*/\n\n\t\t\t\tlet xVal = scaleX.distr != 2 || disp != null ? dataX[i] : i;\n\n\t\t\t\t// TODO: all xPos can be pre-computed once for all series in aligned set\n\t\t\t\tlet xPos = valToPosX(xVal, scaleX, xDim, xOff);\n\t\t\t\tlet yPos = valToPosY(ifNull(yVal, fillToY), scaleY, yDim, yOff);\n\n\t\t\t\tif (dataY0 != null && yVal != null)\n\t\t\t\t\ty0Pos = valToPosY(dataY0[i], scaleY, yDim, yOff);\n\n\t\t\t\tlet lft = pxRound(xPos - xShift);\n\t\t\t\tlet btm = pxRound(max(yPos, y0Pos));\n\t\t\t\tlet top = pxRound(min(yPos, y0Pos));\n\t\t\t\t// this includes the stroke\n\t\t\t\tlet barHgt = btm - top;\n\n\t\t\t\tif (yVal != null) { // && yVal != fillToY (0 height bar)\n\t\t\t\t\tlet rv = yVal < 0 ? radBase : radVal;\n\t\t\t\t\tlet rb = yVal < 0 ? radVal : radBase;\n\n\t\t\t\t\tif (multiPath) {\n\t\t\t\t\t\tif (strokeWidth > 0 && strokeColors[i] != null)\n\t\t\t\t\t\t\trect(strokePaths.get(strokeColors[i]), lft, top + floor(strokeWidth / 2), barWid, max(0, barHgt - strokeWidth), rv, rb);\n\n\t\t\t\t\t\tif (fillColors[i] != null)\n\t\t\t\t\t\t\trect(fillPaths.get(fillColors[i]), lft, top + floor(strokeWidth / 2), barWid, max(0, barHgt - strokeWidth), rv, rb);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\trect(stroke, lft, top + floor(strokeWidth / 2), barWid, max(0, barHgt - strokeWidth), rv, rb);\n\n\t\t\t\t\teach(u, seriesIdx, i,\n\t\t\t\t\t\tlft - strokeWidth / 2,\n\t\t\t\t\t\ttop,\n\t\t\t\t\t\tbarWid + strokeWidth,\n\t\t\t\t\t\tbarHgt,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (bandClipDir != 0) {\n\t\t\t\t\tif (_dirY * bandClipDir == 1) {\n\t\t\t\t\t\tbtm = top;\n\t\t\t\t\t\ttop = yLimit;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttop = btm;\n\t\t\t\t\t\tbtm = yLimit;\n\t\t\t\t\t}\n\n\t\t\t\t\tbarHgt = btm - top;\n\n\t\t\t\t\trect(band, lft - strokeWidth / 2, top, barWid + strokeWidth, max(0, barHgt), 0, 0); // radius here?\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (strokeWidth > 0)\n\t\t\t\t_paths.stroke = multiPath ? strokePaths : stroke;\n\n\t\t\t_paths.fill = multiPath ? fillPaths : stroke;\n\n\t\t\treturn _paths;\n\t\t});\n\t};\n}\n\nfunction splineInterp(interp, opts) {\n\tconst alignGaps = ifNull(opts?.alignGaps, 0);\n\n\treturn (u, seriesIdx, idx0, idx1) => {\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet pxRound = series.pxRound;\n\n\t\t\tlet pixelForX = val => pxRound(valToPosX(val, scaleX, xDim, xOff));\n\t\t\tlet pixelForY = val => pxRound(valToPosY(val, scaleY, yDim, yOff));\n\n\t\t\tlet moveTo, bezierCurveTo, lineTo;\n\n\t\t\tif (scaleX.ori == 0) {\n\t\t\t\tmoveTo = moveToH;\n\t\t\t\tlineTo = lineToH;\n\t\t\t\tbezierCurveTo = bezierCurveToH;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmoveTo = moveToV;\n\t\t\t\tlineTo = lineToV;\n\t\t\t\tbezierCurveTo = bezierCurveToV;\n\t\t\t}\n\n\t\t\tconst dir = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\n\t\t\tidx0 = nonNullIdx(dataY, idx0, idx1, 1);\n\t\t\tidx1 = nonNullIdx(dataY, idx0, idx1, -1);\n\n\t\t\tlet firstXPos = pixelForX(dataX[dir == 1 ? idx0 : idx1]);\n\t\t\tlet prevXPos = firstXPos;\n\n\t\t\tlet xCoords = [];\n\t\t\tlet yCoords = [];\n\n\t\t\tfor (let i = dir == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += dir) {\n\t\t\t\tlet yVal = dataY[i];\n\n\t\t\t\tif (yVal != null) {\n\t\t\t\t\tlet xVal = dataX[i];\n\t\t\t\t\tlet xPos = pixelForX(xVal);\n\n\t\t\t\t\txCoords.push(prevXPos = xPos);\n\t\t\t\t\tyCoords.push(pixelForY(dataY[i]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst _paths = {stroke: interp(xCoords, yCoords, moveTo, lineTo, bezierCurveTo, pxRound), fill: null, clip: null, band: null, gaps: null, flags: BAND_CLIP_FILL};\n\t\t\tconst stroke = _paths.stroke;\n\n\t\t\tlet [ bandFillDir, bandClipDir ] = bandFillClipDirs(u, seriesIdx);\n\n\t\t\tif (series.fill != null || bandFillDir != 0) {\n\t\t\t\tlet fill = _paths.fill = new Path2D(stroke);\n\n\t\t\t\tlet fillTo = series.fillTo(u, seriesIdx, series.min, series.max, bandFillDir);\n\t\t\t\tlet fillToY = pixelForY(fillTo);\n\n\t\t\t\tlineTo(fill, prevXPos, fillToY);\n\t\t\t\tlineTo(fill, firstXPos, fillToY);\n\t\t\t}\n\n\t\t\tif (!series.spanGaps) {\n\t\t\t//\tconsole.time('gaps');\n\t\t\t\tlet gaps = [];\n\n\t\t\t\tgaps.push(...findGaps(dataX, dataY, idx0, idx1, dir, pixelForX, alignGaps));\n\n\t\t\t//\tconsole.timeEnd('gaps');\n\n\t\t\t//\tconsole.log('gaps', JSON.stringify(gaps));\n\n\t\t\t\t_paths.gaps = gaps = series.gaps(u, seriesIdx, idx0, idx1, gaps);\n\n\t\t\t\t_paths.clip = clipGaps(gaps, scaleX.ori, xOff, yOff, xDim, yDim);\n\t\t\t}\n\n\t\t\tif (bandClipDir != 0) {\n\t\t\t\t_paths.band = bandClipDir == 2 ? [\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, -1),\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, 1),\n\t\t\t\t] : clipBandLine(u, seriesIdx, idx0, idx1, stroke, bandClipDir);\n\t\t\t}\n\n\t\t\treturn _paths;\n\n\t\t\t// if FEAT_PATHS: false in rollup.config.js\n\t\t\t//\tu.ctx.save();\n\t\t\t//\tu.ctx.beginPath();\n\t\t\t//\tu.ctx.rect(u.bbox.left, u.bbox.top, u.bbox.width, u.bbox.height);\n\t\t\t//\tu.ctx.clip();\n\t\t\t//\tu.ctx.strokeStyle = u.series[sidx].stroke;\n\t\t\t//\tu.ctx.stroke(stroke);\n\t\t\t//\tu.ctx.fillStyle = u.series[sidx].fill;\n\t\t\t//\tu.ctx.fill(fill);\n\t\t\t//\tu.ctx.restore();\n\t\t\t//\treturn null;\n\t\t});\n\t};\n}\n\nfunction monotoneCubic(opts) {\n\treturn splineInterp(_monotoneCubic, opts);\n}\n\n// Monotone Cubic Spline interpolation, adapted from the Chartist.js implementation:\n// https://github.com/gionkunz/chartist-js/blob/e7e78201bffe9609915e5e53cfafa29a5d6c49f9/src/scripts/interpolation.js#L240-L369\nfunction _monotoneCubic(xs, ys, moveTo, lineTo, bezierCurveTo, pxRound) {\n\tconst n = xs.length;\n\n\tif (n < 2)\n\t\treturn null;\n\n\tconst path = new Path2D();\n\n\tmoveTo(path, xs[0], ys[0]);\n\n\tif (n == 2)\n\t\tlineTo(path, xs[1], ys[1]);\n\telse {\n\t\tlet ms = Array(n),\n\t\t\tds = Array(n - 1),\n\t\t\tdys = Array(n - 1),\n\t\t\tdxs = Array(n - 1);\n\n\t\t// calc deltas and derivative\n\t\tfor (let i = 0; i < n - 1; i++) {\n\t\t\tdys[i] = ys[i + 1] - ys[i];\n\t\t\tdxs[i] = xs[i + 1] - xs[i];\n\t\t\tds[i] = dys[i] / dxs[i];\n\t\t}\n\n\t\t// determine desired slope (m) at each point using Fritsch-Carlson method\n\t\t// http://math.stackexchange.com/questions/45218/implementation-of-monotone-cubic-interpolation\n\t\tms[0] = ds[0];\n\n\t\tfor (let i = 1; i < n - 1; i++) {\n\t\t\tif (ds[i] === 0 || ds[i - 1] === 0 || (ds[i - 1] > 0) !== (ds[i] > 0))\n\t\t\t\tms[i] = 0;\n\t\t\telse {\n\t\t\t\tms[i] = 3 * (dxs[i - 1] + dxs[i]) / (\n\t\t\t\t\t(2 * dxs[i] + dxs[i - 1]) / ds[i - 1] +\n\t\t\t\t\t(dxs[i] + 2 * dxs[i - 1]) / ds[i]\n\t\t\t\t);\n\n\t\t\t\tif (!isFinite(ms[i]))\n\t\t\t\t\tms[i] = 0;\n\t\t\t}\n\t\t}\n\n\t\tms[n - 1] = ds[n - 2];\n\n\t\tfor (let i = 0; i < n - 1; i++) {\n\t\t\tbezierCurveTo(\n\t\t\t\tpath,\n\t\t\t\txs[i] + dxs[i] / 3,\n\t\t\t\tys[i] + ms[i] * dxs[i] / 3,\n\t\t\t\txs[i + 1] - dxs[i] / 3,\n\t\t\t\tys[i + 1] - ms[i + 1] * dxs[i] / 3,\n\t\t\t\txs[i + 1],\n\t\t\t\tys[i + 1],\n\t\t\t);\n\t\t}\n\t}\n\n\treturn path;\n}\n\nconst cursorPlots = new Set();\n\nfunction invalidateRects() {\n\tfor (let u of cursorPlots)\n\t\tu.syncRect(true);\n}\n\nif (domEnv) {\n\ton(resize, win, invalidateRects);\n\ton(scroll, win, invalidateRects, true);\n\ton(dppxchange, win, () => { uPlot.pxRatio = pxRatio; });\n}\n\nconst linearPath = linear() ;\nconst pointsPath = points() ;\n\nfunction setDefaults(d, xo, yo, initY) {\n\tlet d2 = initY ? [d[0], d[1]].concat(d.slice(2)) : [d[0]].concat(d.slice(1));\n\treturn d2.map((o, i) => setDefault(o, i, xo, yo));\n}\n\nfunction setDefaults2(d, xyo) {\n\treturn d.map((o, i) => i == 0 ? null : assign({}, xyo, o)); // todo: assign() will not merge facet arrays\n}\n\nfunction setDefault(o, i, xo, yo) {\n\treturn assign({}, (i == 0 ? xo : yo), o);\n}\n\nfunction snapNumX(self, dataMin, dataMax) {\n\treturn dataMin == null ? nullNullTuple : [dataMin, dataMax];\n}\n\nconst snapTimeX = snapNumX;\n\n// this ensures that non-temporal/numeric y-axes get multiple-snapped padding added above/below\n// TODO: also account for incrs when snapping to ensure top of axis gets a tick & value\nfunction snapNumY(self, dataMin, dataMax) {\n\treturn dataMin == null ? nullNullTuple : rangeNum(dataMin, dataMax, rangePad, true);\n}\n\nfunction snapLogY(self, dataMin, dataMax, scale) {\n\treturn dataMin == null ? nullNullTuple : rangeLog(dataMin, dataMax, self.scales[scale].log, false);\n}\n\nconst snapLogX = snapLogY;\n\nfunction snapAsinhY(self, dataMin, dataMax, scale) {\n\treturn dataMin == null ? nullNullTuple : rangeAsinh(dataMin, dataMax, self.scales[scale].log, false);\n}\n\nconst snapAsinhX = snapAsinhY;\n\n// dim is logical (getClientBoundingRect) pixels, not canvas pixels\nfunction findIncr(minVal, maxVal, incrs, dim, minSpace) {\n\tlet intDigits = max(numIntDigits(minVal), numIntDigits(maxVal));\n\n\tlet delta = maxVal - minVal;\n\n\tlet incrIdx = closestIdx((minSpace / dim) * delta, incrs);\n\n\tdo {\n\t\tlet foundIncr = incrs[incrIdx];\n\t\tlet foundSpace = dim * foundIncr / delta;\n\n\t\tif (foundSpace >= minSpace && intDigits + (foundIncr < 5 ? fixedDec.get(foundIncr) : 0) <= 17)\n\t\t\treturn [foundIncr, foundSpace];\n\t} while (++incrIdx < incrs.length);\n\n\treturn [0, 0];\n}\n\nfunction pxRatioFont(font) {\n\tlet fontSize, fontSizeCss;\n\tfont = font.replace(/(\\d+)px/, (m, p1) => (fontSize = round((fontSizeCss = +p1) * pxRatio)) + 'px');\n\treturn [font, fontSize, fontSizeCss];\n}\n\nfunction syncFontSize(axis) {\n\tif (axis.show) {\n\t\t[axis.font, axis.labelFont].forEach(f => {\n\t\t\tlet size = roundDec(f[2] * pxRatio, 1);\n\t\t\tf[0] = f[0].replace(/[0-9.]+px/, size + 'px');\n\t\t\tf[1] = size;\n\t\t});\n\t}\n}\n\nfunction uPlot(opts, data, then) {\n\tconst self = {\n\t\tmode: ifNull(opts.mode, 1),\n\t};\n\n\tconst mode = self.mode;\n\n\t// TODO: cache denoms & mins scale.cache = {r, min, }\n\tfunction getValPct(val, scale) {\n\t\tlet _val = (\n\t\t\tscale.distr == 3 ? log10(val > 0 ? val : scale.clamp(self, val, scale.min, scale.max, scale.key)) :\n\t\t\tscale.distr == 4 ? asinh(val, scale.asinh) :\n\t\t\tval\n\t\t);\n\n\t\treturn (_val - scale._min) / (scale._max - scale._min);\n\t}\n\n\tfunction getHPos(val, scale, dim, off) {\n\t\tlet pct = getValPct(val, scale);\n\t\treturn off + dim * (scale.dir == -1 ? (1 - pct) : pct);\n\t}\n\n\tfunction getVPos(val, scale, dim, off) {\n\t\tlet pct = getValPct(val, scale);\n\t\treturn off + dim * (scale.dir == -1 ? pct : (1 - pct));\n\t}\n\n\tfunction getPos(val, scale, dim, off) {\n\t\treturn scale.ori == 0 ? getHPos(val, scale, dim, off) : getVPos(val, scale, dim, off);\n\t}\n\n\tself.valToPosH = getHPos;\n\tself.valToPosV = getVPos;\n\n\tlet ready = false;\n\tself.status = 0;\n\n\tconst root = self.root = placeDiv(UPLOT);\n\n\tif (opts.id != null)\n\t\troot.id = opts.id;\n\n\taddClass(root, opts.class);\n\n\tif (opts.title) {\n\t\tlet title = placeDiv(TITLE, root);\n\t\ttitle.textContent = opts.title;\n\t}\n\n\tconst can = placeTag(\"canvas\");\n\tconst ctx = self.ctx = can.getContext(\"2d\");\n\n\tconst wrap = placeDiv(WRAP, root);\n\n\ton(\"click\", wrap, e => {\n\t\tlet didDrag = mouseLeft1 != mouseLeft0 || mouseTop1 != mouseTop0;\n\t\tdidDrag && drag.click(self, e);\n\t}, true);\n\n\tconst under = self.under = placeDiv(UNDER, wrap);\n\twrap.appendChild(can);\n\tconst over = self.over = placeDiv(OVER, wrap);\n\n\topts = copy(opts);\n\n\tconst pxAlign = +ifNull(opts.pxAlign, 1);\n\n\tconst pxRound = pxRoundGen(pxAlign);\n\n\t(opts.plugins || []).forEach(p => {\n\t\tif (p.opts)\n\t\t\topts = p.opts(self, opts) || opts;\n\t});\n\n\tconst ms = opts.ms || 1e-3;\n\n\tconst series = self.series = mode == 1 ?\n\t\tsetDefaults(opts.series || [], xSeriesOpts, ySeriesOpts, false) :\n\t\tsetDefaults2(opts.series || [null], xySeriesOpts);\n\tconst axes = self.axes = setDefaults(opts.axes || [], xAxisOpts, yAxisOpts, true);\n\tconst scales = self.scales = {};\n\tconst bands = self.bands = opts.bands || [];\n\n\tbands.forEach(b => {\n\t\tb.fill = fnOrSelf(b.fill || null);\n\t\tb.dir = ifNull(b.dir, -1);\n\t});\n\n\tconst xScaleKey = mode == 2 ? series[1].facets[0].scale : series[0].scale;\n\n\tconst drawOrderMap = {\n\t\taxes: drawAxesGrid,\n\t\tseries: drawSeries,\n\t};\n\n\tconst drawOrder = (opts.drawOrder || [\"axes\", \"series\"]).map(key => drawOrderMap[key]);\n\n\tfunction initScale(scaleKey) {\n\t\tlet sc = scales[scaleKey];\n\n\t\tif (sc == null) {\n\t\t\tlet scaleOpts = (opts.scales || EMPTY_OBJ)[scaleKey] || EMPTY_OBJ;\n\n\t\t\tif (scaleOpts.from != null) {\n\t\t\t\t// ensure parent is initialized\n\t\t\t\tinitScale(scaleOpts.from);\n\t\t\t\t// dependent scales inherit\n\t\t\t\tscales[scaleKey] = assign({}, scales[scaleOpts.from], scaleOpts, {key: scaleKey});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsc = scales[scaleKey] = assign({}, (scaleKey == xScaleKey ? xScaleOpts : yScaleOpts), scaleOpts);\n\n\t\t\t\tsc.key = scaleKey;\n\n\t\t\t\tlet isTime = sc.time;\n\n\t\t\t\tlet rn = sc.range;\n\n\t\t\t\tlet rangeIsArr = isArr(rn);\n\n\t\t\t\tif (scaleKey != xScaleKey || (mode == 2 && !isTime)) {\n\t\t\t\t\t// if range array has null limits, it should be auto\n\t\t\t\t\tif (rangeIsArr && (rn[0] == null || rn[1] == null)) {\n\t\t\t\t\t\trn = {\n\t\t\t\t\t\t\tmin: rn[0] == null ? autoRangePart : {\n\t\t\t\t\t\t\t\tmode: 1,\n\t\t\t\t\t\t\t\thard: rn[0],\n\t\t\t\t\t\t\t\tsoft: rn[0],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tmax: rn[1] == null ? autoRangePart : {\n\t\t\t\t\t\t\t\tmode: 1,\n\t\t\t\t\t\t\t\thard: rn[1],\n\t\t\t\t\t\t\t\tsoft: rn[1],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t\trangeIsArr = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!rangeIsArr && isObj(rn)) {\n\t\t\t\t\t\tlet cfg = rn;\n\t\t\t\t\t\t// this is similar to snapNumY\n\t\t\t\t\t\trn = (self, dataMin, dataMax) => dataMin == null ? nullNullTuple : rangeNum(dataMin, dataMax, cfg);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsc.range = fnOrSelf(rn || (isTime ? snapTimeX : scaleKey == xScaleKey ?\n\t\t\t\t\t(sc.distr == 3 ? snapLogX : sc.distr == 4 ? snapAsinhX : snapNumX) :\n\t\t\t\t\t(sc.distr == 3 ? snapLogY : sc.distr == 4 ? snapAsinhY : snapNumY)\n\t\t\t\t));\n\n\t\t\t\tsc.auto = fnOrSelf(rangeIsArr ? false : sc.auto);\n\n\t\t\t\tsc.clamp = fnOrSelf(sc.clamp || clampScale);\n\n\t\t\t\t// caches for expensive ops like asinh() & log()\n\t\t\t\tsc._min = sc._max = null;\n\t\t\t}\n\t\t}\n\t}\n\n\tinitScale(\"x\");\n\tinitScale(\"y\");\n\n\t// TODO: init scales from facets in mode: 2\n\tif (mode == 1) {\n\t\tseries.forEach(s => {\n\t\t\tinitScale(s.scale);\n\t\t});\n\t}\n\n\taxes.forEach(a => {\n\t\tinitScale(a.scale);\n\t});\n\n\tfor (let k in opts.scales)\n\t\tinitScale(k);\n\n\tconst scaleX = scales[xScaleKey];\n\n\tconst xScaleDistr = scaleX.distr;\n\n\tlet valToPosX, valToPosY;\n\n\tif (scaleX.ori == 0) {\n\t\taddClass(root, ORI_HZ);\n\t\tvalToPosX = getHPos;\n\t\tvalToPosY = getVPos;\n\t\t/*\n\t\tupdOriDims = () => {\n\t\t\txDimCan = plotWid;\n\t\t\txOffCan = plotLft;\n\t\t\tyDimCan = plotHgt;\n\t\t\tyOffCan = plotTop;\n\n\t\t\txDimCss = plotWidCss;\n\t\t\txOffCss = plotLftCss;\n\t\t\tyDimCss = plotHgtCss;\n\t\t\tyOffCss = plotTopCss;\n\t\t};\n\t\t*/\n\t}\n\telse {\n\t\taddClass(root, ORI_VT);\n\t\tvalToPosX = getVPos;\n\t\tvalToPosY = getHPos;\n\t\t/*\n\t\tupdOriDims = () => {\n\t\t\txDimCan = plotHgt;\n\t\t\txOffCan = plotTop;\n\t\t\tyDimCan = plotWid;\n\t\t\tyOffCan = plotLft;\n\n\t\t\txDimCss = plotHgtCss;\n\t\t\txOffCss = plotTopCss;\n\t\t\tyDimCss = plotWidCss;\n\t\t\tyOffCss = plotLftCss;\n\t\t};\n\t\t*/\n\t}\n\n\tconst pendScales = {};\n\n\t// explicitly-set initial scales\n\tfor (let k in scales) {\n\t\tlet sc = scales[k];\n\n\t\tif (sc.min != null || sc.max != null) {\n\t\t\tpendScales[k] = {min: sc.min, max: sc.max};\n\t\t\tsc.min = sc.max = null;\n\t\t}\n\t}\n\n//\tself.tz = opts.tz || Intl.DateTimeFormat().resolvedOptions().timeZone;\n\tconst _tzDate = (opts.tzDate || (ts => new Date(round(ts / ms))));\n\tconst _fmtDate = (opts.fmtDate || fmtDate);\n\n\tconst _timeAxisSplits = (ms == 1 ? timeAxisSplitsMs(_tzDate) : timeAxisSplitsS(_tzDate));\n\tconst _timeAxisVals = timeAxisVals(_tzDate, timeAxisStamps((ms == 1 ? _timeAxisStampsMs : _timeAxisStampsS), _fmtDate));\n\tconst _timeSeriesVal = timeSeriesVal(_tzDate, timeSeriesStamp(_timeSeriesStamp, _fmtDate));\n\n\tconst activeIdxs = [];\n\n\tconst legend = (self.legend = assign({}, legendOpts, opts.legend));\n\tconst showLegend = legend.show;\n\tconst markers = legend.markers;\n\n\t{\n\t\tlegend.idxs = activeIdxs;\n\n\t\tmarkers.width = fnOrSelf(markers.width);\n\t\tmarkers.dash = fnOrSelf(markers.dash);\n\t\tmarkers.stroke = fnOrSelf(markers.stroke);\n\t\tmarkers.fill = fnOrSelf(markers.fill);\n\t}\n\n\tlet legendEl;\n\tlet legendRows = [];\n\tlet legendCells = [];\n\tlet legendCols;\n\tlet multiValLegend = false;\n\tlet NULL_LEGEND_VALUES = {};\n\n\tif (legend.live) {\n\t\tconst getMultiVals = series[1] ? series[1].values : null;\n\t\tmultiValLegend = getMultiVals != null;\n\t\tlegendCols = multiValLegend ? getMultiVals(self, 1, 0) : {_: 0};\n\n\t\tfor (let k in legendCols)\n\t\t\tNULL_LEGEND_VALUES[k] = LEGEND_DISP;\n\t}\n\n\tif (showLegend) {\n\t\tlegendEl = placeTag(\"table\", LEGEND, root);\n\n\t\tlegend.mount(self, legendEl);\n\n\t\tif (multiValLegend) {\n\t\t\tlet head = placeTag(\"tr\", LEGEND_THEAD, legendEl);\n\t\t\tplaceTag(\"th\", null, head);\n\n\t\t\tfor (var key in legendCols)\n\t\t\t\tplaceTag(\"th\", LEGEND_LABEL, head).textContent = key;\n\t\t}\n\t\telse {\n\t\t\taddClass(legendEl, LEGEND_INLINE);\n\t\t\tlegend.live && addClass(legendEl, LEGEND_LIVE);\n\t\t}\n\t}\n\n\tconst son = {show: true};\n\tconst soff = {show: false};\n\n\tfunction initLegendRow(s, i) {\n\t\tif (i == 0 && (multiValLegend || !legend.live || mode == 2))\n\t\t\treturn nullNullTuple;\n\n\t\tlet cells = [];\n\n\t\tlet row = placeTag(\"tr\", LEGEND_SERIES, legendEl, legendEl.childNodes[i]);\n\n\t\taddClass(row, s.class);\n\n\t\tif (!s.show)\n\t\t\taddClass(row, OFF);\n\n\t\tlet label = placeTag(\"th\", null, row);\n\n\t\tif (markers.show) {\n\t\t\tlet indic = placeDiv(LEGEND_MARKER, label);\n\n\t\t\tif (i > 0) {\n\t\t\t\tlet width = markers.width(self, i);\n\n\t\t\t\tif (width)\n\t\t\t\t\tindic.style.border = width + \"px \" + markers.dash(self, i) + \" \" + markers.stroke(self, i);\n\n\t\t\t\tindic.style.background = markers.fill(self, i);\n\t\t\t}\n\t\t}\n\n\t\tlet text = placeDiv(LEGEND_LABEL, label);\n\t\ttext.textContent = s.label;\n\n\t\tif (i > 0) {\n\t\t\tif (!markers.show)\n\t\t\t\ttext.style.color = s.width > 0 ? markers.stroke(self, i) : markers.fill(self, i);\n\n\t\t\tonMouse(\"click\", label, e => {\n\t\t\t\tif (cursor._lock)\n\t\t\t\t\treturn;\n\n\t\t\t\tlet seriesIdx = series.indexOf(s);\n\n\t\t\t\tif ((e.ctrlKey || e.metaKey) != legend.isolate) {\n\t\t\t\t\t// if any other series is shown, isolate this one. else show all\n\t\t\t\t\tlet isolate = series.some((s, i) => i > 0 && i != seriesIdx && s.show);\n\n\t\t\t\t\tseries.forEach((s, i) => {\n\t\t\t\t\t\ti > 0 && setSeries(i, isolate ? (i == seriesIdx ? son : soff) : son, true, syncOpts.setSeries);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tsetSeries(seriesIdx, {show: !s.show}, true, syncOpts.setSeries);\n\t\t\t});\n\n\t\t\tif (cursorFocus) {\n\t\t\t\tonMouse(mouseenter, label, e => {\n\t\t\t\t\tif (cursor._lock)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tsetSeries(series.indexOf(s), FOCUS_TRUE, true, syncOpts.setSeries);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfor (var key in legendCols) {\n\t\t\tlet v = placeTag(\"td\", LEGEND_VALUE, row);\n\t\t\tv.textContent = \"--\";\n\t\t\tcells.push(v);\n\t\t}\n\n\t\treturn [row, cells];\n\t}\n\n\tconst mouseListeners = new Map();\n\n\tfunction onMouse(ev, targ, fn) {\n\t\tconst targListeners = mouseListeners.get(targ) || {};\n\t\tconst listener = cursor.bind[ev](self, targ, fn);\n\n\t\tif (listener) {\n\t\t\ton(ev, targ, targListeners[ev] = listener);\n\t\t\tmouseListeners.set(targ, targListeners);\n\t\t}\n\t}\n\n\tfunction offMouse(ev, targ, fn) {\n\t\tconst targListeners = mouseListeners.get(targ) || {};\n\n\t\tfor (let k in targListeners) {\n\t\t\tif (ev == null || k == ev) {\n\t\t\t\toff(k, targ, targListeners[k]);\n\t\t\t\tdelete targListeners[k];\n\t\t\t}\n\t\t}\n\n\t\tif (ev == null)\n\t\t\tmouseListeners.delete(targ);\n\t}\n\n\tlet fullWidCss = 0;\n\tlet fullHgtCss = 0;\n\n\tlet plotWidCss = 0;\n\tlet plotHgtCss = 0;\n\n\t// plot margins to account for axes\n\tlet plotLftCss = 0;\n\tlet plotTopCss = 0;\n\n\tlet plotLft = 0;\n\tlet plotTop = 0;\n\tlet plotWid = 0;\n\tlet plotHgt = 0;\n\n\tself.bbox = {};\n\n\tlet shouldSetScales = false;\n\tlet shouldSetSize = false;\n\tlet shouldConvergeSize = false;\n\tlet shouldSetCursor = false;\n\tlet shouldSetSelect = false;\n\tlet shouldSetLegend = false;\n\n\tfunction _setSize(width, height, force) {\n\t\tif (force || (width != self.width || height != self.height))\n\t\t\tcalcSize(width, height);\n\n\t\tresetYSeries(false);\n\n\t\tshouldConvergeSize = true;\n\t\tshouldSetSize = true;\n\n\t\tif (cursor.left >= 0)\n\t\t\tshouldSetCursor = shouldSetLegend = true;\n\n\t\tcommit();\n\t}\n\n\tfunction calcSize(width, height) {\n\t//\tlog(\"calcSize()\", arguments);\n\n\t\tself.width = fullWidCss = plotWidCss = width;\n\t\tself.height = fullHgtCss = plotHgtCss = height;\n\t\tplotLftCss = plotTopCss = 0;\n\n\t\tcalcPlotRect();\n\t\tcalcAxesRects();\n\n\t\tlet bb = self.bbox;\n\n\t\tplotLft = bb.left = incrRound(plotLftCss * pxRatio, 0.5);\n\t\tplotTop = bb.top = incrRound(plotTopCss * pxRatio, 0.5);\n\t\tplotWid = bb.width = incrRound(plotWidCss * pxRatio, 0.5);\n\t\tplotHgt = bb.height = incrRound(plotHgtCss * pxRatio, 0.5);\n\n\t//\tupdOriDims();\n\t}\n\n\t// ensures size calc convergence\n\tconst CYCLE_LIMIT = 3;\n\n\tfunction convergeSize() {\n\t\tlet converged = false;\n\n\t\tlet cycleNum = 0;\n\n\t\twhile (!converged) {\n\t\t\tcycleNum++;\n\n\t\t\tlet axesConverged = axesCalc(cycleNum);\n\t\t\tlet paddingConverged = paddingCalc(cycleNum);\n\n\t\t\tconverged = cycleNum == CYCLE_LIMIT || (axesConverged && paddingConverged);\n\n\t\t\tif (!converged) {\n\t\t\t\tcalcSize(self.width, self.height);\n\t\t\t\tshouldSetSize = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction setSize({width, height}) {\n\t\t_setSize(width, height);\n\t}\n\n\tself.setSize = setSize;\n\n\t// accumulate axis offsets, reduce canvas width\n\tfunction calcPlotRect() {\n\t\t// easements for edge labels\n\t\tlet hasTopAxis = false;\n\t\tlet hasBtmAxis = false;\n\t\tlet hasRgtAxis = false;\n\t\tlet hasLftAxis = false;\n\n\t\taxes.forEach((axis, i) => {\n\t\t\tif (axis.show && axis._show) {\n\t\t\t\tlet {side, _size} = axis;\n\t\t\t\tlet isVt = side % 2;\n\t\t\t\tlet labelSize = axis.label != null ? axis.labelSize : 0;\n\n\t\t\t\tlet fullSize = _size + labelSize;\n\n\t\t\t\tif (fullSize > 0) {\n\t\t\t\t\tif (isVt) {\n\t\t\t\t\t\tplotWidCss -= fullSize;\n\n\t\t\t\t\t\tif (side == 3) {\n\t\t\t\t\t\t\tplotLftCss += fullSize;\n\t\t\t\t\t\t\thasLftAxis = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\thasRgtAxis = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tplotHgtCss -= fullSize;\n\n\t\t\t\t\t\tif (side == 0) {\n\t\t\t\t\t\t\tplotTopCss += fullSize;\n\t\t\t\t\t\t\thasTopAxis = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\thasBtmAxis = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tsidesWithAxes[0] = hasTopAxis;\n\t\tsidesWithAxes[1] = hasRgtAxis;\n\t\tsidesWithAxes[2] = hasBtmAxis;\n\t\tsidesWithAxes[3] = hasLftAxis;\n\n\t\t// hz padding\n\t\tplotWidCss -= _padding[1] + _padding[3];\n\t\tplotLftCss += _padding[3];\n\n\t\t// vt padding\n\t\tplotHgtCss -= _padding[2] + _padding[0];\n\t\tplotTopCss += _padding[0];\n\t}\n\n\tfunction calcAxesRects() {\n\t\t// will accum +\n\t\tlet off1 = plotLftCss + plotWidCss;\n\t\tlet off2 = plotTopCss + plotHgtCss;\n\t\t// will accum -\n\t\tlet off3 = plotLftCss;\n\t\tlet off0 = plotTopCss;\n\n\t\tfunction incrOffset(side, size) {\n\t\t\tswitch (side) {\n\t\t\t\tcase 1: off1 += size; return off1 - size;\n\t\t\t\tcase 2: off2 += size; return off2 - size;\n\t\t\t\tcase 3: off3 -= size; return off3 + size;\n\t\t\t\tcase 0: off0 -= size; return off0 + size;\n\t\t\t}\n\t\t}\n\n\t\taxes.forEach((axis, i) => {\n\t\t\tif (axis.show && axis._show) {\n\t\t\t\tlet side = axis.side;\n\n\t\t\t\taxis._pos = incrOffset(side, axis._size);\n\n\t\t\t\tif (axis.label != null)\n\t\t\t\t\taxis._lpos = incrOffset(side, axis.labelSize);\n\t\t\t}\n\t\t});\n\t}\n\n\tconst cursor = (self.cursor = assign({}, cursorOpts, {drag: {y: mode == 2}}, opts.cursor));\n\n\t{\n\t\tcursor.idxs = activeIdxs;\n\n\t\tcursor._lock = false;\n\n\t\tlet points = cursor.points;\n\n\t\tpoints.show = fnOrSelf(points.show);\n\t\tpoints.size = fnOrSelf(points.size);\n\t\tpoints.stroke = fnOrSelf(points.stroke);\n\t\tpoints.width = fnOrSelf(points.width);\n\t\tpoints.fill = fnOrSelf(points.fill);\n\t}\n\n\tconst focus = self.focus = assign({}, opts.focus || {alpha: 0.3}, cursor.focus);\n\n\tif (focus.bias != 0)\n\t\tfocus.prox = 1e5; // big, but < Infinity\n\n\tconst cursorFocus = focus.prox >= 0;\n\n\t// series-intersection markers\n\tlet cursorPts = [null];\n\n\tfunction initCursorPt(s, si) {\n\t\tif (si > 0) {\n\t\t\tlet pt = cursor.points.show(self, si);\n\n\t\t\tif (pt) {\n\t\t\t\taddClass(pt, CURSOR_PT);\n\t\t\t\taddClass(pt, s.class);\n\t\t\t\telTrans(pt, -10, -10, plotWidCss, plotHgtCss);\n\t\t\t\tover.insertBefore(pt, cursorPts[si]);\n\n\t\t\t\treturn pt;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction initSeries(s, i) {\n\t\tif (mode == 1 || i > 0) {\n\t\t\tlet isTime = mode == 1 && scales[s.scale].time;\n\n\t\t\tlet sv = s.value;\n\t\t\ts.value = isTime ? (isStr(sv) ? timeSeriesVal(_tzDate, timeSeriesStamp(sv, _fmtDate)) : sv || _timeSeriesVal) : sv || numSeriesVal;\n\t\t\ts.label = s.label || (isTime ? timeSeriesLabel : numSeriesLabel);\n\t\t}\n\n\t\tif (i > 0) {\n\t\t\ts.width = s.width == null ? 1 : s.width;\n\t\t\ts.paths = s.paths || linearPath || retNull;\n\t\t\ts.fillTo = fnOrSelf(s.fillTo || seriesFillTo);\n\t\t\ts.pxAlign = +ifNull(s.pxAlign, pxAlign);\n\t\t\ts.pxRound = pxRoundGen(s.pxAlign);\n\n\t\t\ts.stroke = fnOrSelf(s.stroke || null);\n\t\t\ts.fill = fnOrSelf(s.fill || null);\n\t\t\ts._stroke = s._fill = s._paths = s._focus = null;\n\n\t\t\tlet _ptDia = ptDia(max(1, s.width), 1);\n\t\t\tlet points = s.points = assign({}, {\n\t\t\t\tsize: _ptDia,\n\t\t\t\twidth: max(1, _ptDia * .2),\n\t\t\t\tstroke: s.stroke,\n\t\t\t\tspace: _ptDia * 2,\n\t\t\t\tpaths: pointsPath,\n\t\t\t\t_stroke: null,\n\t\t\t\t_fill: null,\n\t\t\t}, s.points);\n\t\t\tpoints.show = fnOrSelf(points.show);\n\t\t\tpoints.filter = fnOrSelf(points.filter);\n\t\t\tpoints.fill = fnOrSelf(points.fill);\n\t\t\tpoints.stroke = fnOrSelf(points.stroke);\n\t\t\tpoints.paths = fnOrSelf(points.paths);\n\t\t\tpoints.pxAlign = s.pxAlign;\n\t\t}\n\n\t\tif (showLegend) {\n\t\t\tlet rowCells = initLegendRow(s, i);\n\t\t\tlegendRows.splice(i, 0, rowCells[0]);\n\t\t\tlegendCells.splice(i, 0, rowCells[1]);\n\t\t\tlegend.values.push(null);\t// NULL_LEGEND_VALS not yet avil here :(\n\t\t}\n\n\t\tif (cursor.show) {\n\t\t\tactiveIdxs.splice(i, 0, null);\n\n\t\t\tlet pt = initCursorPt(s, i);\n\t\t\tpt && cursorPts.splice(i, 0, pt);\n\t\t}\n\n\t\tfire(\"addSeries\", i);\n\t}\n\n\tfunction addSeries(opts, si) {\n\t\tsi = si == null ? series.length : si;\n\n\t\topts = mode == 1 ? setDefault(opts, si, xSeriesOpts, ySeriesOpts) : setDefault(opts, si, null, xySeriesOpts);\n\n\t\tseries.splice(si, 0, opts);\n\t\tinitSeries(series[si], si);\n\t}\n\n\tself.addSeries = addSeries;\n\n\tfunction delSeries(i) {\n\t\tseries.splice(i, 1);\n\n\t\tif (showLegend) {\n\t\t\tlegend.values.splice(i, 1);\n\n\t\t\tlegendCells.splice(i, 1);\n\t\t\tlet tr = legendRows.splice(i, 1)[0];\n\t\t\toffMouse(null, tr.firstChild);\n\t\t\ttr.remove();\n\t\t}\n\n\t\tif (cursor.show) {\n\t\t\tactiveIdxs.splice(i, 1);\n\n\t\t\tcursorPts.length > 1 && cursorPts.splice(i, 1)[0].remove();\n\t\t}\n\n\t\t// TODO: de-init no-longer-needed scales?\n\n\t\tfire(\"delSeries\", i);\n\t}\n\n\tself.delSeries = delSeries;\n\n\tconst sidesWithAxes = [false, false, false, false];\n\n\tfunction initAxis(axis, i) {\n\t\taxis._show = axis.show;\n\n\t\tif (axis.show) {\n\t\t\tlet isVt = axis.side % 2;\n\n\t\t\tlet sc = scales[axis.scale];\n\n\t\t\t// this can occur if all series specify non-default scales\n\t\t\tif (sc == null) {\n\t\t\t\taxis.scale = isVt ? series[1].scale : xScaleKey;\n\t\t\t\tsc = scales[axis.scale];\n\t\t\t}\n\n\t\t\t// also set defaults for incrs & values based on axis distr\n\t\t\tlet isTime = sc.time;\n\n\t\t\taxis.size = fnOrSelf(axis.size);\n\t\t\taxis.space = fnOrSelf(axis.space);\n\t\t\taxis.rotate = fnOrSelf(axis.rotate);\n\t\t\taxis.incrs = fnOrSelf(axis.incrs || ( sc.distr == 2 ? wholeIncrs : (isTime ? (ms == 1 ? timeIncrsMs : timeIncrsS) : numIncrs)));\n\t\t\taxis.splits = fnOrSelf(axis.splits || (isTime && sc.distr == 1 ? _timeAxisSplits : sc.distr == 3 ? logAxisSplits : sc.distr == 4 ? asinhAxisSplits : numAxisSplits));\n\n\t\t\taxis.stroke = fnOrSelf(axis.stroke);\n\t\t\taxis.grid.stroke = fnOrSelf(axis.grid.stroke);\n\t\t\taxis.ticks.stroke = fnOrSelf(axis.ticks.stroke);\n\t\t\taxis.border.stroke = fnOrSelf(axis.border.stroke);\n\n\t\t\tlet av = axis.values;\n\n\t\t\taxis.values = (\n\t\t\t\t// static array of tick values\n\t\t\t\tisArr(av) && !isArr(av[0]) ? fnOrSelf(av) :\n\t\t\t\t// temporal\n\t\t\t\tisTime ? (\n\t\t\t\t\t// config array of fmtDate string tpls\n\t\t\t\t\tisArr(av) ?\n\t\t\t\t\t\ttimeAxisVals(_tzDate, timeAxisStamps(av, _fmtDate)) :\n\t\t\t\t\t// fmtDate string tpl\n\t\t\t\t\tisStr(av) ?\n\t\t\t\t\t\ttimeAxisVal(_tzDate, av) :\n\t\t\t\t\tav || _timeAxisVals\n\t\t\t\t) : av || numAxisVals\n\t\t\t);\n\n\t\t\taxis.filter = fnOrSelf(axis.filter || ( sc.distr >= 3 && sc.log == 10 ? log10AxisValsFilt : retArg1));\n\n\t\t\taxis.font = pxRatioFont(axis.font);\n\t\t\taxis.labelFont = pxRatioFont(axis.labelFont);\n\n\t\t\taxis._size = axis.size(self, null, i, 0);\n\n\t\t\taxis._space =\n\t\t\taxis._rotate =\n\t\t\taxis._incrs =\n\t\t\taxis._found =\t// foundIncrSpace\n\t\t\taxis._splits =\n\t\t\taxis._values = null;\n\n\t\t\tif (axis._size > 0) {\n\t\t\t\tsidesWithAxes[i] = true;\n\t\t\t\taxis._el = placeDiv(AXIS, wrap);\n\t\t\t}\n\n\t\t\t// debug\n\t\t//\taxis._el.style.background = \"#\" + Math.floor(Math.random()*16777215).toString(16) + '80';\n\t\t}\n\t}\n\n\tfunction autoPadSide(self, side, sidesWithAxes, cycleNum) {\n\t\tlet [hasTopAxis, hasRgtAxis, hasBtmAxis, hasLftAxis] = sidesWithAxes;\n\n\t\tlet ori = side % 2;\n\t\tlet size = 0;\n\n\t\tif (ori == 0 && (hasLftAxis || hasRgtAxis))\n\t\t\tsize = (side == 0 && !hasTopAxis || side == 2 && !hasBtmAxis ? round(xAxisOpts.size / 3) : 0);\n\t\tif (ori == 1 && (hasTopAxis || hasBtmAxis))\n\t\t\tsize = (side == 1 && !hasRgtAxis || side == 3 && !hasLftAxis ? round(yAxisOpts.size / 2) : 0);\n\n\t\treturn size;\n\t}\n\n\tconst padding = self.padding = (opts.padding || [autoPadSide,autoPadSide,autoPadSide,autoPadSide]).map(p => fnOrSelf(ifNull(p, autoPadSide)));\n\tconst _padding = self._padding = padding.map((p, i) => p(self, i, sidesWithAxes, 0));\n\n\tlet dataLen;\n\n\t// rendered data window\n\tlet i0 = null;\n\tlet i1 = null;\n\tconst idxs = mode == 1 ? series[0].idxs : null;\n\n\tlet data0 = null;\n\n\tlet viaAutoScaleX = false;\n\n\tfunction setData(_data, _resetScales) {\n\t\tdata = _data == null ? [] : copy(_data, fastIsObj);\n\n\t\tif (mode == 2) {\n\t\t\tdataLen = 0;\n\t\t\tfor (let i = 1; i < series.length; i++)\n\t\t\t\tdataLen += data[i][0].length;\n\t\t\tself.data = data = _data;\n\t\t}\n\t\telse {\n\t\t\tif (data[0] == null)\n\t\t\t\tdata[0] = [];\n\n\t\t\tself.data = data.slice();\n\n\t\t\tdata0 = data[0];\n\t\t\tdataLen = data0.length;\n\n\t\t\tif (xScaleDistr == 2) {\n\t\t\t\tdata[0] = Array(dataLen);\n\t\t\t\tfor (let i = 0; i < dataLen; i++)\n\t\t\t\t\tdata[0][i] = i;\n\t\t\t}\n\t\t}\n\n\t\tself._data = data;\n\n\t\tresetYSeries(true);\n\n\t\tfire(\"setData\");\n\n\t\t// forces x axis tick values to re-generate when neither x scale nor y scale changes\n\t\t// in ordinal mode, scale range is by index, so will not change if new data has same length, but tick values are from data\n\t\tif (xScaleDistr == 2) {\n\t\t\tshouldConvergeSize = true;\n\n\t\t\t/* or somewhat cheaper, and uglier:\n\t\t\tif (ready) {\n\t\t\t\t// logic extracted from axesCalc()\n\t\t\t\tlet i = 0;\n\t\t\t\tlet axis = axes[i];\n\t\t\t\tlet _splits = axis._splits.map(i => data0[i]);\n\t\t\t\tlet [_incr, _space] = axis._found;\n\t\t\t\tlet incr = data0[_splits[1]] - data0[_splits[0]];\n\t\t\t\taxis._values = axis.values(self, axis.filter(self, _splits, i, _space, incr), i, _space, incr);\n\t\t\t}\n\t\t\t*/\n\t\t}\n\n\t\tif (_resetScales !== false) {\n\t\t\tlet xsc = scaleX;\n\n\t\t\tif (xsc.auto(self, viaAutoScaleX))\n\t\t\t\tautoScaleX();\n\t\t\telse\n\t\t\t\t_setScale(xScaleKey, xsc.min, xsc.max);\n\n\t\t\tshouldSetCursor = cursor.left >= 0;\n\t\t\tshouldSetLegend = true;\n\t\t\tcommit();\n\t\t}\n\t}\n\n\tself.setData = setData;\n\n\tfunction autoScaleX() {\n\t\tviaAutoScaleX = true;\n\n\t\tlet _min, _max;\n\n\t\tif (mode == 1) {\n\t\t\tif (dataLen > 0) {\n\t\t\t\ti0 = idxs[0] = 0;\n\t\t\t\ti1 = idxs[1] = dataLen - 1;\n\n\t\t\t\t_min = data[0][i0];\n\t\t\t\t_max = data[0][i1];\n\n\t\t\t\tif (xScaleDistr == 2) {\n\t\t\t\t\t_min = i0;\n\t\t\t\t\t_max = i1;\n\t\t\t\t}\n\t\t\t\telse if (dataLen == 1) {\n\t\t\t\t\tif (xScaleDistr == 3)\n\t\t\t\t\t\t[_min, _max] = rangeLog(_min, _min, scaleX.log, false);\n\t\t\t\t\telse if (xScaleDistr == 4)\n\t\t\t\t\t\t[_min, _max] = rangeAsinh(_min, _min, scaleX.log, false);\n\t\t\t\t\telse if (scaleX.time)\n\t\t\t\t\t\t_max = _min + round(86400 / ms);\n\t\t\t\t\telse\n\t\t\t\t\t\t[_min, _max] = rangeNum(_min, _max, rangePad, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ti0 = idxs[0] = _min = null;\n\t\t\t\ti1 = idxs[1] = _max = null;\n\t\t\t}\n\t\t}\n\n\t\t_setScale(xScaleKey, _min, _max);\n\t}\n\n\tlet ctxStroke, ctxFill, ctxWidth, ctxDash, ctxJoin, ctxCap, ctxFont, ctxAlign, ctxBaseline;\n\tlet ctxAlpha;\n\n\tfunction setCtxStyle(stroke, width, dash, cap, fill, join) {\n\t\tstroke ??= transparent;\n\t\tdash ??= EMPTY_ARR;\n\t\tcap ??= \"butt\"; // (‿|‿)\n\t\tfill ??= transparent;\n\t\tjoin ??= \"round\";\n\n\t\tif (stroke != ctxStroke)\n\t\t\tctx.strokeStyle = ctxStroke = stroke;\n\t\tif (fill != ctxFill)\n\t\t\tctx.fillStyle = ctxFill = fill;\n\t\tif (width != ctxWidth)\n\t\t\tctx.lineWidth = ctxWidth = width;\n\t\tif (join != ctxJoin)\n\t\t\tctx.lineJoin = ctxJoin = join;\n\t\tif (cap != ctxCap)\n\t\t\tctx.lineCap = ctxCap = cap;\n\t\tif (dash != ctxDash)\n\t\t\tctx.setLineDash(ctxDash = dash);\n\t}\n\n\tfunction setFontStyle(font, fill, align, baseline) {\n\t\tif (fill != ctxFill)\n\t\t\tctx.fillStyle = ctxFill = fill;\n\t\tif (font != ctxFont)\n\t\t\tctx.font = ctxFont = font;\n\t\tif (align != ctxAlign)\n\t\t\tctx.textAlign = ctxAlign = align;\n\t\tif (baseline != ctxBaseline)\n\t\t\tctx.textBaseline = ctxBaseline = baseline;\n\t}\n\n\tfunction accScale(wsc, psc, facet, data, sorted = 0) {\n\t\tif (data.length > 0 && wsc.auto(self, viaAutoScaleX) && (psc == null || psc.min == null)) {\n\t\t\tlet _i0 = ifNull(i0, 0);\n\t\t\tlet _i1 = ifNull(i1, data.length - 1);\n\n\t\t\t// only run getMinMax() for invalidated series data, else reuse\n\t\t\tlet minMax = facet.min == null ? (wsc.distr == 3 ? getMinMaxLog(data, _i0, _i1) : getMinMax(data, _i0, _i1, sorted)) : [facet.min, facet.max];\n\n\t\t\t// initial min/max\n\t\t\twsc.min = min(wsc.min, facet.min = minMax[0]);\n\t\t\twsc.max = max(wsc.max, facet.max = minMax[1]);\n\t\t}\n\t}\n\n\tfunction setScales() {\n\t//\tlog(\"setScales()\", arguments);\n\n\t\t// wip scales\n\t\tlet wipScales = copy(scales, fastIsObj);\n\n\t\tfor (let k in wipScales) {\n\t\t\tlet wsc = wipScales[k];\n\t\t\tlet psc = pendScales[k];\n\n\t\t\tif (psc != null && psc.min != null) {\n\t\t\t\tassign(wsc, psc);\n\n\t\t\t\t// explicitly setting the x-scale invalidates everything (acts as redraw)\n\t\t\t\tif (k == xScaleKey)\n\t\t\t\t\tresetYSeries(true);\n\t\t\t}\n\t\t\telse if (k != xScaleKey || mode == 2) {\n\t\t\t\tif (dataLen == 0 && wsc.from == null) {\n\t\t\t\t\tlet minMax = wsc.range(self, null, null, k);\n\t\t\t\t\twsc.min = minMax[0];\n\t\t\t\t\twsc.max = minMax[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\twsc.min = inf;\n\t\t\t\t\twsc.max = -inf;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (dataLen > 0) {\n\t\t\t// pre-range y-scales from y series' data values\n\t\t\tseries.forEach((s, i) => {\n\t\t\t\tif (mode == 1) {\n\t\t\t\t\tlet k = s.scale;\n\t\t\t\t\tlet wsc = wipScales[k];\n\t\t\t\t\tlet psc = pendScales[k];\n\n\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\tlet minMax = wsc.range(self, wsc.min, wsc.max, k);\n\n\t\t\t\t\t\twsc.min = minMax[0];\n\t\t\t\t\t\twsc.max = minMax[1];\n\n\t\t\t\t\t\ti0 = closestIdx(wsc.min, data[0]);\n\t\t\t\t\t\ti1 = closestIdx(wsc.max, data[0]);\n\n\t\t\t\t\t\t// don't try to contract same or adjacent idxs\n\t\t\t\t\t\tif (i1 - i0 > 1) {\n\t\t\t\t\t\t\t// closest indices can be outside of view\n\t\t\t\t\t\t\tif (data[0][i0] < wsc.min)\n\t\t\t\t\t\t\t\ti0++;\n\t\t\t\t\t\t\tif (data[0][i1] > wsc.max)\n\t\t\t\t\t\t\t\ti1--;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.min = data0[i0];\n\t\t\t\t\t\ts.max = data0[i1];\n\t\t\t\t\t}\n\t\t\t\t\telse if (s.show && s.auto)\n\t\t\t\t\t\taccScale(wsc, psc, s, data[i], s.sorted);\n\n\t\t\t\t\ts.idxs[0] = i0;\n\t\t\t\t\ts.idxs[1] = i1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\tif (s.show && s.auto) {\n\t\t\t\t\t\t\t// TODO: only handles, assumes and requires facets[0] / 'x' scale, and facets[1] / 'y' scale\n\t\t\t\t\t\t\tlet [ xFacet, yFacet ] = s.facets;\n\t\t\t\t\t\t\tlet xScaleKey = xFacet.scale;\n\t\t\t\t\t\t\tlet yScaleKey = yFacet.scale;\n\t\t\t\t\t\t\tlet [ xData, yData ] = data[i];\n\n\t\t\t\t\t\t\taccScale(wipScales[xScaleKey], pendScales[xScaleKey], xFacet, xData, xFacet.sorted);\n\t\t\t\t\t\t\taccScale(wipScales[yScaleKey], pendScales[yScaleKey], yFacet, yData, yFacet.sorted);\n\n\t\t\t\t\t\t\t// temp\n\t\t\t\t\t\t\ts.min = yFacet.min;\n\t\t\t\t\t\t\ts.max = yFacet.max;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// range independent scales\n\t\t\tfor (let k in wipScales) {\n\t\t\t\tlet wsc = wipScales[k];\n\t\t\t\tlet psc = pendScales[k];\n\n\t\t\t\tif (wsc.from == null && (psc == null || psc.min == null)) {\n\t\t\t\t\tlet minMax = wsc.range(\n\t\t\t\t\t\tself,\n\t\t\t\t\t\twsc.min == inf ? null : wsc.min,\n\t\t\t\t\t\twsc.max == -inf ? null : wsc.max,\n\t\t\t\t\t\tk\n\t\t\t\t\t);\n\t\t\t\t\twsc.min = minMax[0];\n\t\t\t\t\twsc.max = minMax[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// range dependent scales\n\t\tfor (let k in wipScales) {\n\t\t\tlet wsc = wipScales[k];\n\n\t\t\tif (wsc.from != null) {\n\t\t\t\tlet base = wipScales[wsc.from];\n\n\t\t\t\tif (base.min == null)\n\t\t\t\t\twsc.min = wsc.max = null;\n\t\t\t\telse {\n\t\t\t\t\tlet minMax = wsc.range(self, base.min, base.max, k);\n\t\t\t\t\twsc.min = minMax[0];\n\t\t\t\t\twsc.max = minMax[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet changed = {};\n\t\tlet anyChanged = false;\n\n\t\tfor (let k in wipScales) {\n\t\t\tlet wsc = wipScales[k];\n\t\t\tlet sc = scales[k];\n\n\t\t\tif (sc.min != wsc.min || sc.max != wsc.max) {\n\t\t\t\tsc.min = wsc.min;\n\t\t\t\tsc.max = wsc.max;\n\n\t\t\t\tlet distr = sc.distr;\n\n\t\t\t\tsc._min = distr == 3 ? log10(sc.min) : distr == 4 ? asinh(sc.min, sc.asinh) : sc.min;\n\t\t\t\tsc._max = distr == 3 ? log10(sc.max) : distr == 4 ? asinh(sc.max, sc.asinh) : sc.max;\n\n\t\t\t\tchanged[k] = anyChanged = true;\n\t\t\t}\n\t\t}\n\n\t\tif (anyChanged) {\n\t\t\t// invalidate paths of all series on changed scales\n\t\t\tseries.forEach((s, i) => {\n\t\t\t\tif (mode == 2) {\n\t\t\t\t\tif (i > 0 && changed.y)\n\t\t\t\t\t\ts._paths = null;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (changed[s.scale])\n\t\t\t\t\t\ts._paths = null;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfor (let k in changed) {\n\t\t\t\tshouldConvergeSize = true;\n\t\t\t\tfire(\"setScale\", k);\n\t\t\t}\n\n\t\t\tif (cursor.show && cursor.left >= 0)\n\t\t\t\tshouldSetCursor = shouldSetLegend = true;\n\t\t}\n\n\t\tfor (let k in pendScales)\n\t\t\tpendScales[k] = null;\n\t}\n\n\t// grabs the nearest indices with y data outside of x-scale limits\n\tfunction getOuterIdxs(ydata) {\n\t\tlet _i0 = clamp(i0 - 1, 0, dataLen - 1);\n\t\tlet _i1 = clamp(i1 + 1, 0, dataLen - 1);\n\n\t\twhile (ydata[_i0] == null && _i0 > 0)\n\t\t\t_i0--;\n\n\t\twhile (ydata[_i1] == null && _i1 < dataLen - 1)\n\t\t\t_i1++;\n\n\t\treturn [_i0, _i1];\n\t}\n\n\tfunction drawSeries() {\n\t\tif (dataLen > 0) {\n\t\t\tseries.forEach((s, i) => {\n\t\t\t\tif (i > 0 && s.show && s._paths == null) {\n\t\t\t\t\tlet _idxs = mode == 2 ? [0, data[i][0].length - 1] : getOuterIdxs(data[i]);\n\t\t\t\t\ts._paths = s.paths(self, i, _idxs[0], _idxs[1]);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tseries.forEach((s, i) => {\n\t\t\t\tif (i > 0 && s.show) {\n\t\t\t\t\tif (ctxAlpha != s.alpha)\n\t\t\t\t\t\tctx.globalAlpha = ctxAlpha = s.alpha;\n\n\t\t\t\t\t{\n\t\t\t\t\t\tcacheStrokeFill(i, false);\n\t\t\t\t\t\ts._paths && drawPath(i, false);\n\t\t\t\t\t}\n\n\t\t\t\t\t{\n\t\t\t\t\t\tcacheStrokeFill(i, true);\n\n\t\t\t\t\t\tlet _gaps = s._paths ? s._paths.gaps : null;\n\n\t\t\t\t\t\tlet show = s.points.show(self, i, i0, i1, _gaps);\n\t\t\t\t\t\tlet idxs = s.points.filter(self, i, show, _gaps);\n\n\t\t\t\t\t\tif (show || idxs) {\n\t\t\t\t\t\t\ts.points._paths = s.points.paths(self, i, i0, i1, idxs);\n\t\t\t\t\t\t\tdrawPath(i, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ctxAlpha != 1)\n\t\t\t\t\t\tctx.globalAlpha = ctxAlpha = 1;\n\n\t\t\t\t\tfire(\"drawSeries\", i);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction cacheStrokeFill(si, _points) {\n\t\tlet s = _points ? series[si].points : series[si];\n\n\t\ts._stroke = s.stroke(self, si);\n\t\ts._fill = s.fill(self, si);\n\t}\n\n\tfunction drawPath(si, _points) {\n\t\tlet s = _points ? series[si].points : series[si];\n\n\t\tlet strokeStyle = s._stroke;\n\t\tlet fillStyle = s._fill;\n\n\t\tlet { stroke, fill, clip: gapsClip, flags } = s._paths;\n\t\tlet boundsClip = null;\n\t\tlet width = roundDec(s.width * pxRatio, 3);\n\t\tlet offset = (width % 2) / 2;\n\n\t\tif (_points && fillStyle == null)\n\t\t\tfillStyle = width > 0 ? \"#fff\" : strokeStyle;\n\n\t\tlet _pxAlign = s.pxAlign == 1;\n\n\t\t_pxAlign && ctx.translate(offset, offset);\n\n\t\tif (!_points) {\n\t\t\tlet lft = plotLft,\n\t\t\t\ttop = plotTop,\n\t\t\t\twid = plotWid,\n\t\t\t\thgt = plotHgt;\n\n\t\t\tlet halfWid = width * pxRatio / 2;\n\n\t\t\tif (s.min == 0)\n\t\t\t\thgt += halfWid;\n\n\t\t\tif (s.max == 0) {\n\t\t\t\ttop -= halfWid;\n\t\t\t\thgt += halfWid;\n\t\t\t}\n\n\t\t\tboundsClip = new Path2D();\n\t\t\tboundsClip.rect(lft, top, wid, hgt);\n\t\t}\n\n\t\t// the points pathbuilder's gapsClip is its boundsClip, since points dont need gaps clipping, and bounds depend on point size\n\t\tif (_points)\n\t\t\tstrokeFill(strokeStyle, width, s.dash, s.cap, fillStyle, stroke, fill, flags, gapsClip);\n\t\telse\n\t\t\tfillStroke(si, strokeStyle, width, s.dash, s.cap, fillStyle, stroke, fill, flags, boundsClip, gapsClip);\n\n\t\t_pxAlign && ctx.translate(-offset, -offset);\n\t}\n\n\tfunction fillStroke(si, strokeStyle, lineWidth, lineDash, lineCap, fillStyle, strokePath, fillPath, flags, boundsClip, gapsClip) {\n\t\tlet didStrokeFill = false;\n\n\t\t// for all bands where this series is the top edge, create upwards clips using the bottom edges\n\t\t// and apply clips + fill with band fill or dfltFill\n\t\tbands.forEach((b, bi) => {\n\t\t\t// isUpperEdge?\n\t\t\tif (b.series[0] == si) {\n\t\t\t\tlet lowerEdge = series[b.series[1]];\n\t\t\t\tlet lowerData = data[b.series[1]];\n\n\t\t\t\tlet bandClip = (lowerEdge._paths || EMPTY_OBJ).band;\n\n\t\t\t\tif (isArr(bandClip))\n\t\t\t\t\tbandClip = b.dir == 1 ? bandClip[0] : bandClip[1];\n\n\t\t\t\tlet gapsClip2;\n\n\t\t\t\tlet _fillStyle = null;\n\n\t\t\t\t// hasLowerEdge?\n\t\t\t\tif (lowerEdge.show && bandClip && hasData(lowerData, i0, i1)) {\n\t\t\t\t\t_fillStyle = b.fill(self, bi) || fillStyle;\n\t\t\t\t\tgapsClip2 = lowerEdge._paths.clip;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tbandClip = null;\n\n\t\t\t\tstrokeFill(strokeStyle, lineWidth, lineDash, lineCap, _fillStyle, strokePath, fillPath, flags, boundsClip, gapsClip, gapsClip2, bandClip);\n\n\t\t\t\tdidStrokeFill = true;\n\t\t\t}\n\t\t});\n\n\t\tif (!didStrokeFill)\n\t\t\tstrokeFill(strokeStyle, lineWidth, lineDash, lineCap, fillStyle, strokePath, fillPath, flags, boundsClip, gapsClip);\n\t}\n\n\tconst CLIP_FILL_STROKE = BAND_CLIP_FILL | BAND_CLIP_STROKE;\n\n\tfunction strokeFill(strokeStyle, lineWidth, lineDash, lineCap, fillStyle, strokePath, fillPath, flags, boundsClip, gapsClip, gapsClip2, bandClip) {\n\t\tsetCtxStyle(strokeStyle, lineWidth, lineDash, lineCap, fillStyle);\n\n\t\tif (boundsClip || gapsClip || bandClip) {\n\t\t\tctx.save();\n\t\t\tboundsClip && ctx.clip(boundsClip);\n\t\t\tgapsClip && ctx.clip(gapsClip);\n\t\t}\n\n\t\tif (bandClip) {\n\t\t\tif ((flags & CLIP_FILL_STROKE) == CLIP_FILL_STROKE) {\n\t\t\t\tctx.clip(bandClip);\n\t\t\t\tgapsClip2 && ctx.clip(gapsClip2);\n\t\t\t\tdoFill(fillStyle, fillPath);\n\t\t\t\tdoStroke(strokeStyle, strokePath, lineWidth);\n\t\t\t}\n\t\t\telse if (flags & BAND_CLIP_STROKE) {\n\t\t\t\tdoFill(fillStyle, fillPath);\n\t\t\t\tctx.clip(bandClip);\n\t\t\t\tdoStroke(strokeStyle, strokePath, lineWidth);\n\t\t\t}\n\t\t\telse if (flags & BAND_CLIP_FILL) {\n\t\t\t\tctx.save();\n\t\t\t\tctx.clip(bandClip);\n\t\t\t\tgapsClip2 && ctx.clip(gapsClip2);\n\t\t\t\tdoFill(fillStyle, fillPath);\n\t\t\t\tctx.restore();\n\t\t\t\tdoStroke(strokeStyle, strokePath, lineWidth);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdoFill(fillStyle, fillPath);\n\t\t\tdoStroke(strokeStyle, strokePath, lineWidth);\n\t\t}\n\n\t\tif (boundsClip || gapsClip || bandClip)\n\t\t\tctx.restore();\n\t}\n\n\tfunction doStroke(strokeStyle, strokePath, lineWidth) {\n\t\tif (lineWidth > 0) {\n\t\t\tif (strokePath instanceof Map) {\n\t\t\t\tstrokePath.forEach((strokePath, strokeStyle) => {\n\t\t\t\t\tctx.strokeStyle = ctxStroke = strokeStyle;\n\t\t\t\t\tctx.stroke(strokePath);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t\tstrokePath != null && strokeStyle && ctx.stroke(strokePath);\n\t\t}\n\t}\n\n\tfunction doFill(fillStyle, fillPath) {\n\t\tif (fillPath instanceof Map) {\n\t\t\tfillPath.forEach((fillPath, fillStyle) => {\n\t\t\t\tctx.fillStyle = ctxFill = fillStyle;\n\t\t\t\tctx.fill(fillPath);\n\t\t\t});\n\t\t}\n\t\telse\n\t\t\tfillPath != null && fillStyle && ctx.fill(fillPath);\n\t}\n\n\tfunction getIncrSpace(axisIdx, min, max, fullDim) {\n\t\tlet axis = axes[axisIdx];\n\n\t\tlet incrSpace;\n\n\t\tif (fullDim <= 0)\n\t\t\tincrSpace = [0, 0];\n\t\telse {\n\t\t\tlet minSpace = axis._space = axis.space(self, axisIdx, min, max, fullDim);\n\t\t\tlet incrs = axis._incrs = axis.incrs(self, axisIdx, min, max, fullDim, minSpace);\n\t\t\tincrSpace = findIncr(min, max, incrs, fullDim, minSpace);\n\t\t}\n\n\t\treturn (axis._found = incrSpace);\n\t}\n\n\tfunction drawOrthoLines(offs, filts, ori, side, pos0, len, width, stroke, dash, cap) {\n\t\tlet offset = (width % 2) / 2;\n\n\t\tpxAlign == 1 && ctx.translate(offset, offset);\n\n\t\tsetCtxStyle(stroke, width, dash, cap, stroke);\n\n\t\tctx.beginPath();\n\n\t\tlet x0, y0, x1, y1, pos1 = pos0 + (side == 0 || side == 3 ? -len : len);\n\n\t\tif (ori == 0) {\n\t\t\ty0 = pos0;\n\t\t\ty1 = pos1;\n\t\t}\n\t\telse {\n\t\t\tx0 = pos0;\n\t\t\tx1 = pos1;\n\t\t}\n\n\t\tfor (let i = 0; i < offs.length; i++) {\n\t\t\tif (filts[i] != null) {\n\t\t\t\tif (ori == 0)\n\t\t\t\t\tx0 = x1 = offs[i];\n\t\t\t\telse\n\t\t\t\t\ty0 = y1 = offs[i];\n\n\t\t\t\tctx.moveTo(x0, y0);\n\t\t\t\tctx.lineTo(x1, y1);\n\t\t\t}\n\t\t}\n\n\t\tctx.stroke();\n\n\t\tpxAlign == 1 && ctx.translate(-offset, -offset);\n\t}\n\n\tfunction axesCalc(cycleNum) {\n\t//\tlog(\"axesCalc()\", arguments);\n\n\t\tlet converged = true;\n\n\t\taxes.forEach((axis, i) => {\n\t\t\tif (!axis.show)\n\t\t\t\treturn;\n\n\t\t\tlet scale = scales[axis.scale];\n\n\t\t\tif (scale.min == null) {\n\t\t\t\tif (axis._show) {\n\t\t\t\t\tconverged = false;\n\t\t\t\t\taxis._show = false;\n\t\t\t\t\tresetYSeries(false);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!axis._show) {\n\t\t\t\t\tconverged = false;\n\t\t\t\t\taxis._show = true;\n\t\t\t\t\tresetYSeries(false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet side = axis.side;\n\t\t\tlet ori = side % 2;\n\n\t\t\tlet {min, max} = scale;\t\t// \t\t// should this toggle them ._show = false\n\n\t\t\tlet [_incr, _space] = getIncrSpace(i, min, max, ori == 0 ? plotWidCss : plotHgtCss);\n\n\t\t\tif (_space == 0)\n\t\t\t\treturn;\n\n\t\t\t// if we're using index positions, force first tick to match passed index\n\t\t\tlet forceMin = scale.distr == 2;\n\n\t\t\tlet _splits = axis._splits = axis.splits(self, i, min, max, _incr, _space, forceMin);\n\n\t\t\t// tick labels\n\t\t\t// BOO this assumes a specific data/series\n\t\t\tlet splits = scale.distr == 2 ? _splits.map(i => data0[i]) : _splits;\n\t\t\tlet incr = scale.distr == 2 ? data0[_splits[1]] - data0[_splits[0]] : _incr;\n\n\t\t\tlet values = axis._values = axis.values(self, axis.filter(self, splits, i, _space, incr), i, _space, incr);\n\n\t\t\t// rotating of labels only supported on bottom x axis\n\t\t\taxis._rotate = side == 2 ? axis.rotate(self, values, i, _space) : 0;\n\n\t\t\tlet oldSize = axis._size;\n\n\t\t\taxis._size = ceil(axis.size(self, values, i, cycleNum));\n\n\t\t\tif (oldSize != null && axis._size != oldSize)\t\t\t// ready && ?\n\t\t\t\tconverged = false;\n\t\t});\n\n\t\treturn converged;\n\t}\n\n\tfunction paddingCalc(cycleNum) {\n\t\tlet converged = true;\n\n\t\tpadding.forEach((p, i) => {\n\t\t\tlet _p = p(self, i, sidesWithAxes, cycleNum);\n\n\t\t\tif (_p != _padding[i])\n\t\t\t\tconverged = false;\n\n\t\t\t_padding[i] = _p;\n\t\t});\n\n\t\treturn converged;\n\t}\n\n\tfunction drawAxesGrid() {\n\t\tfor (let i = 0; i < axes.length; i++) {\n\t\t\tlet axis = axes[i];\n\n\t\t\tif (!axis.show || !axis._show)\n\t\t\t\tcontinue;\n\n\t\t\tlet side = axis.side;\n\t\t\tlet ori = side % 2;\n\n\t\t\tlet x, y;\n\n\t\t\tlet fillStyle = axis.stroke(self, i);\n\n\t\t\tlet shiftDir = side == 0 || side == 3 ? -1 : 1;\n\n\t\t\t// axis label\n\t\t\tif (axis.label) {\n\t\t\t\tlet shiftAmt = axis.labelGap * shiftDir;\n\t\t\t\tlet baseLpos = round((axis._lpos + shiftAmt) * pxRatio);\n\n\t\t\t\tsetFontStyle(axis.labelFont[0], fillStyle, \"center\", side == 2 ? TOP : BOTTOM);\n\n\t\t\t\tctx.save();\n\n\t\t\t\tif (ori == 1) {\n\t\t\t\t\tx = y = 0;\n\n\t\t\t\t\tctx.translate(\n\t\t\t\t\t\tbaseLpos,\n\t\t\t\t\t\tround(plotTop + plotHgt / 2),\n\t\t\t\t\t);\n\t\t\t\t\tctx.rotate((side == 3 ? -PI : PI) / 2);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx = round(plotLft + plotWid / 2);\n\t\t\t\t\ty = baseLpos;\n\t\t\t\t}\n\n\t\t\t\tctx.fillText(axis.label, x, y);\n\n\t\t\t\tctx.restore();\n\t\t\t}\n\n\t\t\tlet [_incr, _space] = axis._found;\n\n\t\t\tif (_space == 0)\n\t\t\t\tcontinue;\n\n\t\t\tlet scale = scales[axis.scale];\n\n\t\t\tlet plotDim = ori == 0 ? plotWid : plotHgt;\n\t\t\tlet plotOff = ori == 0 ? plotLft : plotTop;\n\n\t\t\tlet axisGap = round(axis.gap * pxRatio);\n\n\t\t\tlet _splits = axis._splits;\n\n\t\t\t// tick labels\n\t\t\t// BOO this assumes a specific data/series\n\t\t\tlet splits = scale.distr == 2 ? _splits.map(i => data0[i]) : _splits;\n\t\t\tlet incr = scale.distr == 2 ? data0[_splits[1]] - data0[_splits[0]] : _incr;\n\n\t\t\tlet ticks = axis.ticks;\n\t\t\tlet border = axis.border;\n\t\t\tlet tickSize = ticks.show ? round(ticks.size * pxRatio) : 0;\n\n\t\t\t// rotating of labels only supported on bottom x axis\n\t\t\tlet angle = axis._rotate * -PI/180;\n\n\t\t\tlet basePos = pxRound(axis._pos * pxRatio);\n\t\t\tlet shiftAmt = (tickSize + axisGap) * shiftDir;\n\t\t\tlet finalPos = basePos + shiftAmt;\n\t\t\t y = ori == 0 ? finalPos : 0;\n\t\t\t x = ori == 1 ? finalPos : 0;\n\n\t\t\tlet font = axis.font[0];\n\t\t\tlet textAlign = axis.align == 1 ? LEFT :\n\t\t\t axis.align == 2 ? RIGHT :\n\t\t\t angle > 0 ? LEFT :\n\t\t\t angle < 0 ? RIGHT :\n\t\t\t ori == 0 ? \"center\" : side == 3 ? RIGHT : LEFT;\n\t\t\tlet textBaseline = angle ||\n\t\t\t ori == 1 ? \"middle\" : side == 2 ? TOP : BOTTOM;\n\n\t\t\tsetFontStyle(font, fillStyle, textAlign, textBaseline);\n\n\t\t\tlet lineHeight = axis.font[1] * lineMult;\n\n\t\t\tlet canOffs = _splits.map(val => pxRound(getPos(val, scale, plotDim, plotOff)));\n\n\t\t\tlet _values = axis._values;\n\n\t\t\tfor (let i = 0; i < _values.length; i++) {\n\t\t\t\tlet val = _values[i];\n\n\t\t\t\tif (val != null) {\n\t\t\t\t\tif (ori == 0)\n\t\t\t\t\t\tx = canOffs[i];\n\t\t\t\t\telse\n\t\t\t\t\t\ty = canOffs[i];\n\n\t\t\t\t\tval = \"\" + val;\n\n\t\t\t\t\tlet _parts = val.indexOf(\"\\n\") == -1 ? [val] : val.split(/\\n/gm);\n\n\t\t\t\t\tfor (let j = 0; j < _parts.length; j++) {\n\t\t\t\t\t\tlet text = _parts[j];\n\n\t\t\t\t\t\tif (angle) {\n\t\t\t\t\t\t\tctx.save();\n\t\t\t\t\t\t\tctx.translate(x, y + j * lineHeight); // can this be replaced with position math?\n\t\t\t\t\t\t\tctx.rotate(angle); // can this be done once?\n\t\t\t\t\t\t\tctx.fillText(text, 0, 0);\n\t\t\t\t\t\t\tctx.restore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tctx.fillText(text, x, y + j * lineHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ticks\n\t\t\tif (ticks.show) {\n\t\t\t\tdrawOrthoLines(\n\t\t\t\t\tcanOffs,\n\t\t\t\t\tticks.filter(self, splits, i, _space, incr),\n\t\t\t\t\tori,\n\t\t\t\t\tside,\n\t\t\t\t\tbasePos,\n\t\t\t\t\ttickSize,\n\t\t\t\t\troundDec(ticks.width * pxRatio, 3),\n\t\t\t\t\tticks.stroke(self, i),\n\t\t\t\t\tticks.dash,\n\t\t\t\t\tticks.cap,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// grid\n\t\t\tlet grid = axis.grid;\n\n\t\t\tif (grid.show) {\n\t\t\t\tdrawOrthoLines(\n\t\t\t\t\tcanOffs,\n\t\t\t\t\tgrid.filter(self, splits, i, _space, incr),\n\t\t\t\t\tori,\n\t\t\t\t\tori == 0 ? 2 : 1,\n\t\t\t\t\tori == 0 ? plotTop : plotLft,\n\t\t\t\t\tori == 0 ? plotHgt : plotWid,\n\t\t\t\t\troundDec(grid.width * pxRatio, 3),\n\t\t\t\t\tgrid.stroke(self, i),\n\t\t\t\t\tgrid.dash,\n\t\t\t\t\tgrid.cap,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (border.show) {\n\t\t\t\tdrawOrthoLines(\n\t\t\t\t\t[basePos],\n\t\t\t\t\t[1],\n\t\t\t\t\tori == 0 ? 1 : 0,\n\t\t\t\t\tori == 0 ? 1 : 2,\n\t\t\t\t\tori == 1 ? plotTop : plotLft,\n\t\t\t\t\tori == 1 ? plotHgt : plotWid,\n\t\t\t\t\troundDec(border.width * pxRatio, 3),\n\t\t\t\t\tborder.stroke(self, i),\n\t\t\t\t\tborder.dash,\n\t\t\t\t\tborder.cap,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tfire(\"drawAxes\");\n\t}\n\n\tfunction resetYSeries(minMax) {\n\t//\tlog(\"resetYSeries()\", arguments);\n\n\t\tseries.forEach((s, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\ts._paths = null;\n\n\t\t\t\tif (minMax) {\n\t\t\t\t\tif (mode == 1) {\n\t\t\t\t\t\ts.min = null;\n\t\t\t\t\t\ts.max = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ts.facets.forEach(f => {\n\t\t\t\t\t\t\tf.min = null;\n\t\t\t\t\t\t\tf.max = null;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tlet queuedCommit = false;\n\n\tfunction commit() {\n\t\tif (!queuedCommit) {\n\t\t\tmicroTask(_commit);\n\t\t\tqueuedCommit = true;\n\t\t}\n\t}\n\n\tfunction _commit() {\n\t//\tlog(\"_commit()\", arguments);\n\n\t\tif (shouldSetScales) {\n\t\t\tsetScales();\n\t\t\tshouldSetScales = false;\n\t\t}\n\n\t\tif (shouldConvergeSize) {\n\t\t\tconvergeSize();\n\t\t\tshouldConvergeSize = false;\n\t\t}\n\n\t\tif (shouldSetSize) {\n\t\t\tsetStylePx(under, LEFT, plotLftCss);\n\t\t\tsetStylePx(under, TOP, plotTopCss);\n\t\t\tsetStylePx(under, WIDTH, plotWidCss);\n\t\t\tsetStylePx(under, HEIGHT, plotHgtCss);\n\n\t\t\tsetStylePx(over, LEFT, plotLftCss);\n\t\t\tsetStylePx(over, TOP, plotTopCss);\n\t\t\tsetStylePx(over, WIDTH, plotWidCss);\n\t\t\tsetStylePx(over, HEIGHT, plotHgtCss);\n\n\t\t\tsetStylePx(wrap, WIDTH, fullWidCss);\n\t\t\tsetStylePx(wrap, HEIGHT, fullHgtCss);\n\n\t\t\t// NOTE: mutating this during print preview in Chrome forces transparent\n\t\t\t// canvas pixels to white, even when followed up with clearRect() below\n\t\t\tcan.width = round(fullWidCss * pxRatio);\n\t\t\tcan.height = round(fullHgtCss * pxRatio);\n\n\t\t\taxes.forEach(({ _el, _show, _size, _pos, side }) => {\n\t\t\t\tif (_el != null) {\n\t\t\t\t\tif (_show) {\n\t\t\t\t\t\tlet posOffset = (side === 3 || side === 0 ? _size : 0);\n\t\t\t\t\t\tlet isVt = side % 2 == 1;\n\n\t\t\t\t\t\tsetStylePx(_el, isVt ? \"left\" : \"top\", _pos - posOffset);\n\t\t\t\t\t\tsetStylePx(_el, isVt ? \"width\" : \"height\", _size);\n\t\t\t\t\t\tsetStylePx(_el, isVt ? \"top\" : \"left\", isVt ? plotTopCss : plotLftCss);\n\t\t\t\t\t\tsetStylePx(_el, isVt ? \"height\" : \"width\", isVt ? plotHgtCss : plotWidCss);\n\n\t\t\t\t\t\tremClass(_el, OFF);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\taddClass(_el, OFF);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// invalidate ctx style cache\n\t\t\tctxStroke = ctxFill = ctxWidth = ctxJoin = ctxCap = ctxFont = ctxAlign = ctxBaseline = ctxDash = null;\n\t\t\tctxAlpha = 1;\n\n\t\t\tsyncRect(true);\n\n\t\t\tfire(\"setSize\");\n\n\t\t\tshouldSetSize = false;\n\t\t}\n\n\t\tif (fullWidCss > 0 && fullHgtCss > 0) {\n\t\t\tctx.clearRect(0, 0, can.width, can.height);\n\t\t\tfire(\"drawClear\");\n\t\t\tdrawOrder.forEach(fn => fn());\n\t\t\tfire(\"draw\");\n\t\t}\n\n\t\tif (select.show && shouldSetSelect) {\n\t\t\tsetSelect(select);\n\t\t\tshouldSetSelect = false;\n\t\t}\n\n\t\tif (cursor.show && shouldSetCursor) {\n\t\t\tupdateCursor(null, true, false);\n\t\t\tshouldSetCursor = false;\n\t\t}\n\n\t\tif (legend.show && legend.live && shouldSetLegend) {\n\t\t\tsetLegend();\n\t\t\tshouldSetLegend = false; // redundant currently\n\t\t}\n\n\t\tif (!ready) {\n\t\t\tready = true;\n\t\t\tself.status = 1;\n\n\t\t\tfire(\"ready\");\n\t\t}\n\n\t\tviaAutoScaleX = false;\n\n\t\tqueuedCommit = false;\n\t}\n\n\tself.redraw = (rebuildPaths, recalcAxes) => {\n\t\tshouldConvergeSize = recalcAxes || false;\n\n\t\tif (rebuildPaths !== false)\n\t\t\t_setScale(xScaleKey, scaleX.min, scaleX.max);\n\t\telse\n\t\t\tcommit();\n\t};\n\n\t// redraw() => setScale('x', scales.x.min, scales.x.max);\n\n\t// explicit, never re-ranged (is this actually true? for x and y)\n\tfunction setScale(key, opts) {\n\t\tlet sc = scales[key];\n\n\t\tif (sc.from == null) {\n\t\t\tif (dataLen == 0) {\n\t\t\t\tlet minMax = sc.range(self, opts.min, opts.max, key);\n\t\t\t\topts.min = minMax[0];\n\t\t\t\topts.max = minMax[1];\n\t\t\t}\n\n\t\t\tif (opts.min > opts.max) {\n\t\t\t\tlet _min = opts.min;\n\t\t\t\topts.min = opts.max;\n\t\t\t\topts.max = _min;\n\t\t\t}\n\n\t\t\tif (dataLen > 1 && opts.min != null && opts.max != null && opts.max - opts.min < 1e-16)\n\t\t\t\treturn;\n\n\t\t\tif (key == xScaleKey) {\n\t\t\t\tif (sc.distr == 2 && dataLen > 0) {\n\t\t\t\t\topts.min = closestIdx(opts.min, data[0]);\n\t\t\t\t\topts.max = closestIdx(opts.max, data[0]);\n\n\t\t\t\t\tif (opts.min == opts.max)\n\t\t\t\t\t\topts.max++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t//\tlog(\"setScale()\", arguments);\n\n\t\t\tpendScales[key] = opts;\n\n\t\t\tshouldSetScales = true;\n\t\t\tcommit();\n\t\t}\n\t}\n\n\tself.setScale = setScale;\n\n//\tINTERACTION\n\n\tlet xCursor;\n\tlet yCursor;\n\tlet vCursor;\n\tlet hCursor;\n\n\t// starting position before cursor.move\n\tlet rawMouseLeft0;\n\tlet rawMouseTop0;\n\n\t// starting position\n\tlet mouseLeft0;\n\tlet mouseTop0;\n\n\t// current position before cursor.move\n\tlet rawMouseLeft1;\n\tlet rawMouseTop1;\n\n\t// current position\n\tlet mouseLeft1;\n\tlet mouseTop1;\n\n\tlet dragging = false;\n\n\tconst drag = cursor.drag;\n\n\tlet dragX = drag.x;\n\tlet dragY = drag.y;\n\n\tif (cursor.show) {\n\t\tif (cursor.x)\n\t\t\txCursor = placeDiv(CURSOR_X, over);\n\t\tif (cursor.y)\n\t\t\tyCursor = placeDiv(CURSOR_Y, over);\n\n\t\tif (scaleX.ori == 0) {\n\t\t\tvCursor = xCursor;\n\t\t\thCursor = yCursor;\n\t\t}\n\t\telse {\n\t\t\tvCursor = yCursor;\n\t\t\thCursor = xCursor;\n\t\t}\n\n\t\tmouseLeft1 = cursor.left;\n\t\tmouseTop1 = cursor.top;\n\t}\n\n\tconst select = self.select = assign({\n\t\tshow: true,\n\t\tover: true,\n\t\tleft: 0,\n\t\twidth: 0,\n\t\ttop: 0,\n\t\theight: 0,\n\t}, opts.select);\n\n\tconst selectDiv = select.show ? placeDiv(SELECT, select.over ? over : under) : null;\n\n\tfunction setSelect(opts, _fire) {\n\t\tif (select.show) {\n\t\t\tfor (let prop in opts) {\n\t\t\t\tselect[prop] = opts[prop];\n\n\t\t\t\tif (prop in _hideProps)\n\t\t\t\t\tsetStylePx(selectDiv, prop, opts[prop]);\n\t\t\t}\n\n\t\t\t_fire !== false && fire(\"setSelect\");\n\t\t}\n\t}\n\n\tself.setSelect = setSelect;\n\n\tfunction toggleDOM(i, onOff) {\n\t\tlet s = series[i];\n\t\tlet label = showLegend ? legendRows[i] : null;\n\n\t\tif (s.show)\n\t\t\tlabel && remClass(label, OFF);\n\t\telse {\n\t\t\tlabel && addClass(label, OFF);\n\t\t\tcursorPts.length > 1 && elTrans(cursorPts[i], -10, -10, plotWidCss, plotHgtCss);\n\t\t}\n\t}\n\n\tfunction _setScale(key, min, max) {\n\t\tsetScale(key, {min, max});\n\t}\n\n\tfunction setSeries(i, opts, _fire, _pub) {\n\t//\tlog(\"setSeries()\", arguments);\n\n\t\tif (opts.focus != null)\n\t\t\tsetFocus(i);\n\n\t\tif (opts.show != null) {\n\t\t\tseries.forEach((s, si) => {\n\t\t\t\tif (si > 0 && (i == si || i == null)) {\n\t\t\t\t\ts.show = opts.show;\n\t\t\t\t\ttoggleDOM(si, opts.show);\n\n\t\t\t\t\t_setScale(mode == 2 ? s.facets[1].scale : s.scale, null, null);\n\t\t\t\t\tcommit();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t_fire !== false && fire(\"setSeries\", i, opts);\n\n\t\t_pub && pubSync(\"setSeries\", self, i, opts);\n\t}\n\n\tself.setSeries = setSeries;\n\n\tfunction setBand(bi, opts) {\n\t\tassign(bands[bi], opts);\n\t}\n\n\tfunction addBand(opts, bi) {\n\t\topts.fill = fnOrSelf(opts.fill || null);\n\t\topts.dir = ifNull(opts.dir, -1);\n\t\tbi = bi == null ? bands.length : bi;\n\t\tbands.splice(bi, 0, opts);\n\t}\n\n\tfunction delBand(bi) {\n\t\tif (bi == null)\n\t\t\tbands.length = 0;\n\t\telse\n\t\t\tbands.splice(bi, 1);\n\t}\n\n\tself.addBand = addBand;\n\tself.setBand = setBand;\n\tself.delBand = delBand;\n\n\tfunction setAlpha(i, value) {\n\t\tseries[i].alpha = value;\n\n\t\tif (cursor.show && cursorPts[i])\n\t\t\tcursorPts[i].style.opacity = value;\n\n\t\tif (showLegend && legendRows[i])\n\t\t\tlegendRows[i].style.opacity = value;\n\t}\n\n\t// y-distance\n\tlet closestDist;\n\tlet closestSeries;\n\tlet focusedSeries;\n\tconst FOCUS_TRUE = {focus: true};\n\n\tfunction setFocus(i) {\n\t\tif (i != focusedSeries) {\n\t\t//\tlog(\"setFocus()\", arguments);\n\n\t\t\tlet allFocused = i == null;\n\n\t\t\tlet _setAlpha = focus.alpha != 1;\n\n\t\t\tseries.forEach((s, i2) => {\n\t\t\t\tlet isFocused = allFocused || i2 == 0 || i2 == i;\n\t\t\t\ts._focus = allFocused ? null : isFocused;\n\t\t\t\t_setAlpha && setAlpha(i2, isFocused ? 1 : focus.alpha);\n\t\t\t});\n\n\t\t\tfocusedSeries = i;\n\t\t\t_setAlpha && commit();\n\t\t}\n\t}\n\n\tif (showLegend && cursorFocus) {\n\t\ton(mouseleave, legendEl, e => {\n\t\t\tif (cursor._lock)\n\t\t\t\treturn;\n\n\t\t\tif (focusedSeries != null)\n\t\t\t\tsetSeries(null, FOCUS_TRUE, true, syncOpts.setSeries);\n\t\t});\n\t}\n\n\tfunction posToVal(pos, scale, can) {\n\t\tlet sc = scales[scale];\n\n\t\tif (can)\n\t\t\tpos = pos / pxRatio - (sc.ori == 1 ? plotTopCss : plotLftCss);\n\n\t\tlet dim = plotWidCss;\n\n\t\tif (sc.ori == 1) {\n\t\t\tdim = plotHgtCss;\n\t\t\tpos = dim - pos;\n\t\t}\n\n\t\tif (sc.dir == -1)\n\t\t\tpos = dim - pos;\n\n\t\tlet _min = sc._min,\n\t\t\t_max = sc._max,\n\t\t\tpct = pos / dim;\n\n\t\tlet sv = _min + (_max - _min) * pct;\n\n\t\tlet distr = sc.distr;\n\n\t\treturn (\n\t\t\tdistr == 3 ? pow(10, sv) :\n\t\t\tdistr == 4 ? sinh(sv, sc.asinh) :\n\t\t\tsv\n\t\t);\n\t}\n\n\tfunction closestIdxFromXpos(pos, can) {\n\t\tlet v = posToVal(pos, xScaleKey, can);\n\t\treturn closestIdx(v, data[0], i0, i1);\n\t}\n\n\tself.valToIdx = val => closestIdx(val, data[0]);\n\tself.posToIdx = closestIdxFromXpos;\n\tself.posToVal = posToVal;\n\tself.valToPos = (val, scale, can) => (\n\t\tscales[scale].ori == 0 ?\n\t\tgetHPos(val, scales[scale],\n\t\t\tcan ? plotWid : plotWidCss,\n\t\t\tcan ? plotLft : 0,\n\t\t) :\n\t\tgetVPos(val, scales[scale],\n\t\t\tcan ? plotHgt : plotHgtCss,\n\t\t\tcan ? plotTop : 0,\n\t\t)\n\t);\n\n\t// defers calling expensive functions\n\tfunction batch(fn) {\n\t\tfn(self);\n\t\tcommit();\n\t}\n\n\tself.batch = batch;\n\n\t(self.setCursor = (opts, _fire, _pub) => {\n\t\tmouseLeft1 = opts.left;\n\t\tmouseTop1 = opts.top;\n\t//\tassign(cursor, opts);\n\t\tupdateCursor(null, _fire, _pub);\n\t});\n\n\tfunction setSelH(off, dim) {\n\t\tsetStylePx(selectDiv, LEFT, select.left = off);\n\t\tsetStylePx(selectDiv, WIDTH, select.width = dim);\n\t}\n\n\tfunction setSelV(off, dim) {\n\t\tsetStylePx(selectDiv, TOP, select.top = off);\n\t\tsetStylePx(selectDiv, HEIGHT, select.height = dim);\n\t}\n\n\tlet setSelX = scaleX.ori == 0 ? setSelH : setSelV;\n\tlet setSelY = scaleX.ori == 1 ? setSelH : setSelV;\n\n\tfunction syncLegend() {\n\t\tif (showLegend && legend.live) {\n\t\t\tfor (let i = mode == 2 ? 1 : 0; i < series.length; i++) {\n\t\t\t\tif (i == 0 && multiValLegend)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlet vals = legend.values[i];\n\n\t\t\t\tlet j = 0;\n\n\t\t\t\tfor (let k in vals)\n\t\t\t\t\tlegendCells[i][j++].firstChild.nodeValue = vals[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction setLegend(opts, _fire) {\n\t\tif (opts != null) {\n\t\t\tif (opts.idxs) {\n\t\t\t\topts.idxs.forEach((didx, sidx) => {\n\t\t\t\t\tactiveIdxs[sidx] = didx;\n\t\t\t\t});\n\t\t\t}\n\t\t\telse if (!isUndef(opts.idx))\n\t\t\t\tactiveIdxs.fill(opts.idx);\n\n\t\t\tlegend.idx = activeIdxs[0];\n\t\t}\n\n\t\tfor (let sidx = 0; sidx < series.length; sidx++) {\n\t\t\tif (sidx > 0 || mode == 1 && !multiValLegend)\n\t\t\t\tsetLegendValues(sidx, activeIdxs[sidx]);\n\t\t}\n\n\t\tif (showLegend && legend.live)\n\t\t\tsyncLegend();\n\n\t\tshouldSetLegend = false;\n\n\t\t_fire !== false && fire(\"setLegend\");\n\t}\n\n\tself.setLegend = setLegend;\n\n\tfunction setLegendValues(sidx, idx) {\n\t\tlet s = series[sidx];\n\t\tlet src = sidx == 0 && xScaleDistr == 2 ? data0 : data[sidx];\n\t\tlet val;\n\n\t\tif (multiValLegend)\n\t\t\tval = s.values(self, sidx, idx) ?? NULL_LEGEND_VALUES;\n\t\telse {\n\t\t\tval = s.value(self, idx == null ? null : src[idx], sidx, idx);\n\t\t\tval = val == null ? NULL_LEGEND_VALUES : {_: val};\n\t\t}\n\n\t\tlegend.values[sidx] = val;\n\t}\n\n\tfunction updateCursor(src, _fire, _pub) {\n\t//\tts == null && log(\"updateCursor()\", arguments);\n\n\t\trawMouseLeft1 = mouseLeft1;\n\t\trawMouseTop1 = mouseTop1;\n\n\t\t[mouseLeft1, mouseTop1] = cursor.move(self, mouseLeft1, mouseTop1);\n\n\t\tif (cursor.show) {\n\t\t\tvCursor && elTrans(vCursor, round(mouseLeft1), 0, plotWidCss, plotHgtCss);\n\t\t\thCursor && elTrans(hCursor, 0, round(mouseTop1), plotWidCss, plotHgtCss);\n\t\t}\n\n\t\tlet idx;\n\n\t\t// when zooming to an x scale range between datapoints the binary search\n\t\t// for nearest min/max indices results in this condition. cheap hack :D\n\t\tlet noDataInRange = i0 > i1; // works for mode 1 only\n\n\t\tclosestDist = inf;\n\n\t\t// TODO: extract\n\t\tlet xDim = scaleX.ori == 0 ? plotWidCss : plotHgtCss;\n\t\tlet yDim = scaleX.ori == 1 ? plotWidCss : plotHgtCss;\n\n\t\t// if cursor hidden, hide points & clear legend vals\n\t\tif (mouseLeft1 < 0 || dataLen == 0 || noDataInRange) {\n\t\t\tidx = null;\n\n\t\t\tfor (let i = 0; i < series.length; i++) {\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tcursorPts.length > 1 && elTrans(cursorPts[i], -10, -10, plotWidCss, plotHgtCss);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cursorFocus)\n\t\t\t\tsetSeries(null, FOCUS_TRUE, true, src == null && syncOpts.setSeries);\n\n\t\t\tif (legend.live) {\n\t\t\t\tactiveIdxs.fill(idx);\n\t\t\t\tshouldSetLegend = true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t//\tlet pctY = 1 - (y / rect.height);\n\n\t\t\tlet mouseXPos, valAtPosX, xPos;\n\n\t\t\tif (mode == 1) {\n\t\t\t\tmouseXPos = scaleX.ori == 0 ? mouseLeft1 : mouseTop1;\n\t\t\t\tvalAtPosX = posToVal(mouseXPos, xScaleKey);\n\t\t\t\tidx = closestIdx(valAtPosX, data[0], i0, i1);\n\t\t\t\txPos = valToPosX(data[0][idx], scaleX, xDim, 0);\n\t\t\t}\n\n\t\t\tfor (let i = mode == 2 ? 1 : 0; i < series.length; i++) {\n\t\t\t\tlet s = series[i];\n\n\t\t\t\tlet idx1 = activeIdxs[i];\n\t\t\t\tlet yVal1 = mode == 1 ? data[i][idx1] : data[i][1][idx1];\n\n\t\t\t\tlet idx2 = cursor.dataIdx(self, i, idx, valAtPosX);\n\t\t\t\tlet yVal2 = mode == 1 ? data[i][idx2] : data[i][1][idx2];\n\n\t\t\t\tshouldSetLegend = shouldSetLegend || yVal2 != yVal1 || idx2 != idx1;\n\n\t\t\t\tactiveIdxs[i] = idx2;\n\n\t\t\t\tlet xPos2 = incrRoundUp(idx2 == idx ? xPos : valToPosX(mode == 1 ? data[0][idx2] : data[i][0][idx2], scaleX, xDim, 0), 1);\n\n\t\t\t\tif (i > 0 && s.show) {\n\t\t\t\t\tlet yPos = yVal2 == null ? -10 : incrRoundUp(valToPosY(yVal2, mode == 1 ? scales[s.scale] : scales[s.facets[1].scale], yDim, 0), 1);\n\n\t\t\t\t\tif (cursorFocus && yPos >= 0 && mode == 1) {\n\t\t\t\t\t\tlet dist = abs(yPos - mouseTop1);\n\t\t\t\t\t\tlet bias = focus.bias;\n\n\t\t\t\t\t\tif (bias != 0) {\n\t\t\t\t\t\t\tlet mouseYPos = scaleX.ori == 1 ? mouseLeft1 : mouseTop1;\n\t\t\t\t\t\t\tlet mouseYVal = posToVal(mouseYPos, s.scale);\n\n\t\t\t\t\t\t\tlet seriesYValSign = yVal2 >= 0 ? 1 : -1;\n\t\t\t\t\t\t\tlet mouseYValSign = mouseYVal >= 0 ? 1 : -1;\n\n\t\t\t\t\t\t\t// with a focus bias, we will never cross zero when prox testing\n\t\t\t\t\t\t\t// it's either closest towards zero, or closest away from zero\n\t\t\t\t\t\t\tif (mouseYValSign == seriesYValSign) {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tdist < closestDist\n\t\t\t\t\t\t\t\t\t&& (\n\t\t\t\t\t\t\t\t\t\tmouseYValSign == 1 ?\n\t\t\t\t\t\t\t\t\t\t\t(bias == 1 ? yVal2 >= mouseYVal : yVal2 <= mouseYVal) : // >= 0\n\t\t\t\t\t\t\t\t\t\t\t(bias == 1 ? yVal2 <= mouseYVal : yVal2 >= mouseYVal) // < 0\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tclosestDist = dist;\n\t\t\t\t\t\t\t\t\tclosestSeries = i;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (dist < closestDist) {\n\t\t\t\t\t\t\t\tclosestDist = dist;\n\t\t\t\t\t\t\t\tclosestSeries = i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet hPos, vPos;\n\n\t\t\t\t\tif (scaleX.ori == 0) {\n\t\t\t\t\t\thPos = xPos2;\n\t\t\t\t\t\tvPos = yPos;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\thPos = yPos;\n\t\t\t\t\t\tvPos = xPos2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (shouldSetLegend && cursorPts.length > 1) {\n\t\t\t\t\t\telColor(cursorPts[i], cursor.points.fill(self, i), cursor.points.stroke(self, i));\n\n\t\t\t\t\t\tlet ptWid, ptHgt, ptLft, ptTop,\n\t\t\t\t\t\t\tcentered = true,\n\t\t\t\t\t\t\tgetBBox = cursor.points.bbox;\n\n\t\t\t\t\t\tif (getBBox != null) {\n\t\t\t\t\t\t\tcentered = false;\n\n\t\t\t\t\t\t\tlet bbox = getBBox(self, i);\n\n\t\t\t\t\t\t\tptLft = bbox.left;\n\t\t\t\t\t\t\tptTop = bbox.top;\n\t\t\t\t\t\t\tptWid = bbox.width;\n\t\t\t\t\t\t\tptHgt = bbox.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tptLft = hPos;\n\t\t\t\t\t\t\tptTop = vPos;\n\t\t\t\t\t\t\tptWid = ptHgt = cursor.points.size(self, i);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telSize(cursorPts[i], ptWid, ptHgt, centered);\n\t\t\t\t\t\telTrans(cursorPts[i], ptLft, ptTop, plotWidCss, plotHgtCss);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcursor.idx = idx;\n\t\tcursor.left = mouseLeft1;\n\t\tcursor.top = mouseTop1;\n\n\t\tif (shouldSetLegend) {\n\t\t\tlegend.idx = idx;\n\t\t\tsetLegend();\n\t\t}\n\n\t\t// nit: cursor.drag.setSelect is assumed always true\n\t\tif (select.show && dragging) {\n\t\t\tif (src != null) {\n\t\t\t\tlet [xKey, yKey] = syncOpts.scales;\n\t\t\t\tlet [matchXKeys, matchYKeys] = syncOpts.match;\n\t\t\t\tlet [xKeySrc, yKeySrc] = src.cursor.sync.scales;\n\n\t\t\t\t// match the dragX/dragY implicitness/explicitness of src\n\t\t\t\tlet sdrag = src.cursor.drag;\n\t\t\t\tdragX = sdrag._x;\n\t\t\t\tdragY = sdrag._y;\n\n\t\t\t\tif (dragX || dragY) {\n\t\t\t\t\tlet { left, top, width, height } = src.select;\n\n\t\t\t\t\tlet sori = src.scales[xKey].ori;\n\t\t\t\t\tlet sPosToVal = src.posToVal;\n\n\t\t\t\t\tlet sOff, sDim, sc, a, b;\n\n\t\t\t\t\tlet matchingX = xKey != null && matchXKeys(xKey, xKeySrc);\n\t\t\t\t\tlet matchingY = yKey != null && matchYKeys(yKey, yKeySrc);\n\n\t\t\t\t\tif (matchingX && dragX) {\n\t\t\t\t\t\tif (sori == 0) {\n\t\t\t\t\t\t\tsOff = left;\n\t\t\t\t\t\t\tsDim = width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tsOff = top;\n\t\t\t\t\t\t\tsDim = height;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsc = scales[xKey];\n\n\t\t\t\t\t\ta = valToPosX(sPosToVal(sOff, xKeySrc), sc, xDim, 0);\n\t\t\t\t\t\tb = valToPosX(sPosToVal(sOff + sDim, xKeySrc), sc, xDim, 0);\n\n\t\t\t\t\t\tsetSelX(min(a,b), abs(b-a));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsetSelX(0, xDim);\n\n\t\t\t\t\tif (matchingY && dragY) {\n\t\t\t\t\t\tif (sori == 1) {\n\t\t\t\t\t\t\tsOff = left;\n\t\t\t\t\t\t\tsDim = width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tsOff = top;\n\t\t\t\t\t\t\tsDim = height;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsc = scales[yKey];\n\n\t\t\t\t\t\ta = valToPosY(sPosToVal(sOff, yKeySrc), sc, yDim, 0);\n\t\t\t\t\t\tb = valToPosY(sPosToVal(sOff + sDim, yKeySrc), sc, yDim, 0);\n\n\t\t\t\t\t\tsetSelY(min(a,b), abs(b-a));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsetSelY(0, yDim);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\thideSelect();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet rawDX = abs(rawMouseLeft1 - rawMouseLeft0);\n\t\t\t\tlet rawDY = abs(rawMouseTop1 - rawMouseTop0);\n\n\t\t\t\tif (scaleX.ori == 1) {\n\t\t\t\t\tlet _rawDX = rawDX;\n\t\t\t\t\trawDX = rawDY;\n\t\t\t\t\trawDY = _rawDX;\n\t\t\t\t}\n\n\t\t\t\tdragX = drag.x && rawDX >= drag.dist;\n\t\t\t\tdragY = drag.y && rawDY >= drag.dist;\n\n\t\t\t\tlet uni = drag.uni;\n\n\t\t\t\tif (uni != null) {\n\t\t\t\t\t// only calc drag status if they pass the dist thresh\n\t\t\t\t\tif (dragX && dragY) {\n\t\t\t\t\t\tdragX = rawDX >= uni;\n\t\t\t\t\t\tdragY = rawDY >= uni;\n\n\t\t\t\t\t\t// force unidirectionality when both are under uni limit\n\t\t\t\t\t\tif (!dragX && !dragY) {\n\t\t\t\t\t\t\tif (rawDY > rawDX)\n\t\t\t\t\t\t\t\tdragY = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tdragX = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (drag.x && drag.y && (dragX || dragY))\n\t\t\t\t\t// if omni with no uni then both dragX / dragY should be true if either is true\n\t\t\t\t\tdragX = dragY = true;\n\n\t\t\t\tlet p0, p1;\n\n\t\t\t\tif (dragX) {\n\t\t\t\t\tif (scaleX.ori == 0) {\n\t\t\t\t\t\tp0 = mouseLeft0;\n\t\t\t\t\t\tp1 = mouseLeft1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp0 = mouseTop0;\n\t\t\t\t\t\tp1 = mouseTop1;\n\t\t\t\t\t}\n\n\t\t\t\t\tsetSelX(min(p0, p1), abs(p1 - p0));\n\n\t\t\t\t\tif (!dragY)\n\t\t\t\t\t\tsetSelY(0, yDim);\n\t\t\t\t}\n\n\t\t\t\tif (dragY) {\n\t\t\t\t\tif (scaleX.ori == 1) {\n\t\t\t\t\t\tp0 = mouseLeft0;\n\t\t\t\t\t\tp1 = mouseLeft1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp0 = mouseTop0;\n\t\t\t\t\t\tp1 = mouseTop1;\n\t\t\t\t\t}\n\n\t\t\t\t\tsetSelY(min(p0, p1), abs(p1 - p0));\n\n\t\t\t\t\tif (!dragX)\n\t\t\t\t\t\tsetSelX(0, xDim);\n\t\t\t\t}\n\n\t\t\t\t// the drag didn't pass the dist requirement\n\t\t\t\tif (!dragX && !dragY) {\n\t\t\t\t\tsetSelX(0, 0);\n\t\t\t\t\tsetSelY(0, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdrag._x = dragX;\n\t\tdrag._y = dragY;\n\n\t\tif (src == null) {\n\t\t\tif (_pub) {\n\t\t\t\tif (syncKey != null) {\n\t\t\t\t\tlet [xSyncKey, ySyncKey] = syncOpts.scales;\n\n\t\t\t\t\tsyncOpts.values[0] = xSyncKey != null ? posToVal(scaleX.ori == 0 ? mouseLeft1 : mouseTop1, xSyncKey) : null;\n\t\t\t\t\tsyncOpts.values[1] = ySyncKey != null ? posToVal(scaleX.ori == 1 ? mouseLeft1 : mouseTop1, ySyncKey) : null;\n\t\t\t\t}\n\n\t\t\t\tpubSync(mousemove, self, mouseLeft1, mouseTop1, plotWidCss, plotHgtCss, idx);\n\t\t\t}\n\n\t\t\tif (cursorFocus) {\n\t\t\t\tlet shouldPub = _pub && syncOpts.setSeries;\n\t\t\t\tlet p = focus.prox;\n\n\t\t\t\tif (focusedSeries == null) {\n\t\t\t\t\tif (closestDist <= p)\n\t\t\t\t\t\tsetSeries(closestSeries, FOCUS_TRUE, true, shouldPub);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (closestDist > p)\n\t\t\t\t\t\tsetSeries(null, FOCUS_TRUE, true, shouldPub);\n\t\t\t\t\telse if (closestSeries != focusedSeries)\n\t\t\t\t\t\tsetSeries(closestSeries, FOCUS_TRUE, true, shouldPub);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t_fire !== false && fire(\"setCursor\");\n\t}\n\n\tlet rect = null;\n\n\tfunction syncRect(defer) {\n\t\tif (defer === true)\n\t\t\trect = null;\n\t\telse {\n\t\t\trect = over.getBoundingClientRect();\n\t\t\tfire(\"syncRect\", rect);\n\t\t}\n\t}\n\n\tfunction mouseMove(e, src, _l, _t, _w, _h, _i) {\n\t\tif (cursor._lock)\n\t\t\treturn;\n\n\t\t// Chrome on Windows has a bug which triggers a stray mousemove event after an initial mousedown event\n\t\t// when clicking into a plot as part of re-focusing the browser window.\n\t\t// we gotta ignore it to avoid triggering a phantom drag / setSelect\n\t\t// However, on touch-only devices Chrome-based browsers trigger a 0-distance mousemove before mousedown\n\t\t// so we don't ignore it when mousedown has set the dragging flag\n\t\tif (dragging && e != null && e.movementX == 0 && e.movementY == 0)\n\t\t\treturn;\n\n\t\tcacheMouse(e, src, _l, _t, _w, _h, _i, false, e != null);\n\n\t\tif (e != null)\n\t\t\tupdateCursor(null, true, true);\n\t\telse\n\t\t\tupdateCursor(src, true, false);\n\t}\n\n\tfunction cacheMouse(e, src, _l, _t, _w, _h, _i, initial, snap) {\n\t\tif (rect == null)\n\t\t\tsyncRect(false);\n\n\t\tif (e != null) {\n\t\t\t_l = e.clientX - rect.left;\n\t\t\t_t = e.clientY - rect.top;\n\t\t}\n\t\telse {\n\t\t\tif (_l < 0 || _t < 0) {\n\t\t\t\tmouseLeft1 = -10;\n\t\t\t\tmouseTop1 = -10;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet [xKey, yKey] = syncOpts.scales;\n\n\t\t\tlet syncOptsSrc = src.cursor.sync;\n\t\t\tlet [xValSrc, yValSrc] = syncOptsSrc.values;\n\t\t\tlet [xKeySrc, yKeySrc] = syncOptsSrc.scales;\n\t\t\tlet [matchXKeys, matchYKeys] = syncOpts.match;\n\n\t\t\tlet rotSrc = src.axes[0].side % 2 == 1;\n\n\t\t\tlet xDim = scaleX.ori == 0 ? plotWidCss : plotHgtCss,\n\t\t\t\tyDim = scaleX.ori == 1 ? plotWidCss : plotHgtCss,\n\t\t\t\t_xDim = rotSrc ? _h : _w,\n\t\t\t\t_yDim = rotSrc ? _w : _h,\n\t\t\t\t_xPos = rotSrc ? _t : _l,\n\t\t\t\t_yPos = rotSrc ? _l : _t;\n\n\t\t\tif (xKeySrc != null)\n\t\t\t\t_l = matchXKeys(xKey, xKeySrc) ? getPos(xValSrc, scales[xKey], xDim, 0) : -10;\n\t\t\telse\n\t\t\t\t_l = xDim * (_xPos/_xDim);\n\n\t\t\tif (yKeySrc != null)\n\t\t\t\t_t = matchYKeys(yKey, yKeySrc) ? getPos(yValSrc, scales[yKey], yDim, 0) : -10;\n\t\t\telse\n\t\t\t\t_t = yDim * (_yPos/_yDim);\n\n\t\t\tif (scaleX.ori == 1) {\n\t\t\t\tlet __l = _l;\n\t\t\t\t_l = _t;\n\t\t\t\t_t = __l;\n\t\t\t}\n\t\t}\n\n\t\tif (snap) {\n\t\t\tif (_l <= 1 || _l >= plotWidCss - 1)\n\t\t\t\t_l = incrRound(_l, plotWidCss);\n\n\t\t\tif (_t <= 1 || _t >= plotHgtCss - 1)\n\t\t\t\t_t = incrRound(_t, plotHgtCss);\n\t\t}\n\n\t\tif (initial) {\n\t\t\trawMouseLeft0 = _l;\n\t\t\trawMouseTop0 = _t;\n\n\t\t\t[mouseLeft0, mouseTop0] = cursor.move(self, _l, _t);\n\t\t}\n\t\telse {\n\t\t\tmouseLeft1 = _l;\n\t\t\tmouseTop1 = _t;\n\t\t}\n\t}\n\n\tconst _hideProps = {\n\t\twidth: 0,\n\t\theight: 0,\n\t\tleft: 0,\n\t\ttop: 0,\n\t};\n\n\tfunction hideSelect() {\n\t\tsetSelect(_hideProps, false);\n\t}\n\n\tfunction mouseDown(e, src, _l, _t, _w, _h, _i) {\n\t\tdragging = true;\n\t\tdragX = dragY = drag._x = drag._y = false;\n\n\t\tcacheMouse(e, src, _l, _t, _w, _h, _i, true, false);\n\n\t\tif (e != null) {\n\t\t\tonMouse(mouseup, doc, mouseUp);\n\t\t\tpubSync(mousedown, self, mouseLeft0, mouseTop0, plotWidCss, plotHgtCss, null);\n\t\t}\n\t}\n\n\tfunction mouseUp(e, src, _l, _t, _w, _h, _i) {\n\t\tdragging = drag._x = drag._y = false;\n\n\t\tcacheMouse(e, src, _l, _t, _w, _h, _i, false, true);\n\n\t\tlet { left, top, width, height } = select;\n\n\t\tlet hasSelect = width > 0 || height > 0;\n\n\t\thasSelect && setSelect(select);\n\n\t\tif (drag.setScale && hasSelect) {\n\t\t//\tif (syncKey != null) {\n\t\t//\t\tdragX = drag.x;\n\t\t//\t\tdragY = drag.y;\n\t\t//\t}\n\n\t\t\tlet xOff = left,\n\t\t\t\txDim = width,\n\t\t\t\tyOff = top,\n\t\t\t\tyDim = height;\n\n\t\t\tif (scaleX.ori == 1) {\n\t\t\t\txOff = top,\n\t\t\t\txDim = height,\n\t\t\t\tyOff = left,\n\t\t\t\tyDim = width;\n\t\t\t}\n\n\t\t\tif (dragX) {\n\t\t\t\t_setScale(xScaleKey,\n\t\t\t\t\tposToVal(xOff, xScaleKey),\n\t\t\t\t\tposToVal(xOff + xDim, xScaleKey)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (dragY) {\n\t\t\t\tfor (let k in scales) {\n\t\t\t\t\tlet sc = scales[k];\n\n\t\t\t\t\tif (k != xScaleKey && sc.from == null && sc.min != inf) {\n\t\t\t\t\t\t_setScale(k,\n\t\t\t\t\t\t\tposToVal(yOff + yDim, k),\n\t\t\t\t\t\t\tposToVal(yOff, k)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thideSelect();\n\t\t}\n\t\telse if (cursor.lock) {\n\t\t\tcursor._lock = !cursor._lock;\n\n\t\t\tif (!cursor._lock)\n\t\t\t\tupdateCursor(null, true, false);\n\t\t}\n\n\t\tif (e != null) {\n\t\t\toffMouse(mouseup, doc);\n\t\t\tpubSync(mouseup, self, mouseLeft1, mouseTop1, plotWidCss, plotHgtCss, null);\n\t\t}\n\t}\n\n\tfunction mouseLeave(e, src, _l, _t, _w, _h, _i) {\n\t\tif (!cursor._lock) {\n\t\t\tlet _dragging = dragging;\n\n\t\t\tif (dragging) {\n\t\t\t\t// handle case when mousemove aren't fired all the way to edges by browser\n\t\t\t\tlet snapH = true;\n\t\t\t\tlet snapV = true;\n\t\t\t\tlet snapProx = 10;\n\n\t\t\t\tlet dragH, dragV;\n\n\t\t\t\tif (scaleX.ori == 0) {\n\t\t\t\t\tdragH = dragX;\n\t\t\t\t\tdragV = dragY;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdragH = dragY;\n\t\t\t\t\tdragV = dragX;\n\t\t\t\t}\n\n\t\t\t\tif (dragH && dragV) {\n\t\t\t\t\t// maybe omni corner snap\n\t\t\t\t\tsnapH = mouseLeft1 <= snapProx || mouseLeft1 >= plotWidCss - snapProx;\n\t\t\t\t\tsnapV = mouseTop1 <= snapProx || mouseTop1 >= plotHgtCss - snapProx;\n\t\t\t\t}\n\n\t\t\t\tif (dragH && snapH)\n\t\t\t\t\tmouseLeft1 = mouseLeft1 < mouseLeft0 ? 0 : plotWidCss;\n\n\t\t\t\tif (dragV && snapV)\n\t\t\t\t\tmouseTop1 = mouseTop1 < mouseTop0 ? 0 : plotHgtCss;\n\n\t\t\t\tupdateCursor(null, true, true);\n\n\t\t\t\tdragging = false;\n\t\t\t}\n\n\t\t\tmouseLeft1 = -10;\n\t\t\tmouseTop1 = -10;\n\n\t\t\t// passing a non-null timestamp to force sync/mousemove event\n\t\t\tupdateCursor(null, true, true);\n\n\t\t\tif (_dragging)\n\t\t\t\tdragging = _dragging;\n\t\t}\n\t}\n\n\tfunction dblClick(e, src, _l, _t, _w, _h, _i) {\n\t\tautoScaleX();\n\n\t\thideSelect();\n\n\t\tif (e != null)\n\t\t\tpubSync(dblclick, self, mouseLeft1, mouseTop1, plotWidCss, plotHgtCss, null);\n\t}\n\n\tfunction syncPxRatio() {\n\t\taxes.forEach(syncFontSize);\n\t\t_setSize(self.width, self.height, true);\n\t}\n\n\ton(dppxchange, win, syncPxRatio);\n\n\t// internal pub/sub\n\tconst events = {};\n\n\tevents.mousedown = mouseDown;\n\tevents.mousemove = mouseMove;\n\tevents.mouseup = mouseUp;\n\tevents.dblclick = dblClick;\n\tevents[\"setSeries\"] = (e, src, idx, opts) => {\n\t\tsetSeries(idx, opts, true, false);\n\t};\n\n\tif (cursor.show) {\n\t\tonMouse(mousedown, over, mouseDown);\n\t\tonMouse(mousemove, over, mouseMove);\n\t\tonMouse(mouseenter, over, syncRect);\n\t\tonMouse(mouseleave, over, mouseLeave);\n\n\t\tonMouse(dblclick, over, dblClick);\n\n\t\tcursorPlots.add(self);\n\n\t\tself.syncRect = syncRect;\n\t}\n\n\t// external on/off\n\tconst hooks = self.hooks = opts.hooks || {};\n\n\tfunction fire(evName, a1, a2) {\n\t\tif (evName in hooks) {\n\t\t\thooks[evName].forEach(fn => {\n\t\t\t\tfn.call(null, self, a1, a2);\n\t\t\t});\n\t\t}\n\t}\n\n\t(opts.plugins || []).forEach(p => {\n\t\tfor (let evName in p.hooks)\n\t\t\thooks[evName] = (hooks[evName] || []).concat(p.hooks[evName]);\n\t});\n\n\tconst syncOpts = assign({\n\t\tkey: null,\n\t\tsetSeries: false,\n\t\tfilters: {\n\t\t\tpub: retTrue,\n\t\t\tsub: retTrue,\n\t\t},\n\t\tscales: [xScaleKey, series[1] ? series[1].scale : null],\n\t\tmatch: [retEq, retEq],\n\t\tvalues: [null, null],\n\t}, cursor.sync);\n\n\t(cursor.sync = syncOpts);\n\n\tconst syncKey = syncOpts.key;\n\n\tconst sync = _sync(syncKey);\n\n\tfunction pubSync(type, src, x, y, w, h, i) {\n\t\tif (syncOpts.filters.pub(type, src, x, y, w, h, i))\n\t\t\tsync.pub(type, src, x, y, w, h, i);\n\t}\n\n\tsync.sub(self);\n\n\tfunction pub(type, src, x, y, w, h, i) {\n\t\tif (syncOpts.filters.sub(type, src, x, y, w, h, i))\n\t\t\tevents[type](null, src, x, y, w, h, i);\n\t}\n\n\t(self.pub = pub);\n\n\tfunction destroy() {\n\t\tsync.unsub(self);\n\t\tcursorPlots.delete(self);\n\t\tmouseListeners.clear();\n\t\toff(dppxchange, win, syncPxRatio);\n\t\troot.remove();\n\t\tlegendEl?.remove(); // in case mounted outside of root\n\t\tfire(\"destroy\");\n\t}\n\n\tself.destroy = destroy;\n\n\tfunction _init() {\n\t\tfire(\"init\", opts, data);\n\n\t\tsetData(data || opts.data, false);\n\n\t\tif (pendScales[xScaleKey])\n\t\t\tsetScale(xScaleKey, pendScales[xScaleKey]);\n\t\telse\n\t\t\tautoScaleX();\n\n\t\tshouldSetSelect = select.show;\n\t\tshouldSetCursor = shouldSetLegend = true;\n\n\t\t_setSize(opts.width, opts.height);\n\t}\n\n\tseries.forEach(initSeries);\n\n\taxes.forEach(initAxis);\n\n\tif (then) {\n\t\tif (then instanceof HTMLElement) {\n\t\t\tthen.appendChild(root);\n\t\t\t_init();\n\t\t}\n\t\telse\n\t\t\tthen(self, _init);\n\t}\n\telse\n\t\t_init();\n\n\treturn self;\n}\n\nuPlot.assign = assign;\nuPlot.fmtNum = fmtNum;\nuPlot.rangeNum = rangeNum;\nuPlot.rangeLog = rangeLog;\nuPlot.rangeAsinh = rangeAsinh;\nuPlot.orient = orient;\nuPlot.pxRatio = pxRatio;\n\n{\n\tuPlot.join = join;\n}\n\n{\n\tuPlot.fmtDate = fmtDate;\n\tuPlot.tzDate = tzDate;\n}\n\n{\n\tuPlot.sync = _sync;\n}\n\n{\n\tuPlot.addGap = addGap;\n\tuPlot.clipGaps = clipGaps;\n\n\tlet paths = uPlot.paths = {\n\t\tpoints,\n\t};\n\n\t(paths.linear = linear);\n\t(paths.stepped = stepped);\n\t(paths.bars = bars);\n\t(paths.spline = monotoneCubic);\n}\n\nexport { uPlot as default };\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../@vue/cli-service/node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-moz-min-content;width:min-content}.u-title{text-align:center;font-size:18px;font-weight:700}.u-wrap{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;position:relative;width:100%;height:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{vertical-align:middle;display:inline-block}.u-legend .u-marker{width:1em;height:1em;margin-right:4px;background-clip:padding-box!important}.u-inline.u-live th:after{content:\\\":\\\";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{position:absolute;pointer-events:none}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{height:100%;border-right:1px dashed #607d8b}.u-hz .u-cursor-y,.u-vt .u-cursor-x{width:100%;border-bottom:1px dashed #607d8b}.u-cursor-pt{position:absolute;top:0;left:0;border-radius:50%;border:0 solid;pointer-events:none;will-change:transform;z-index:100;background-clip:padding-box!important}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar transitionalDefaults = require('../defaults/transitional');\nvar AxiosError = require('../core/AxiosError');\nvar CanceledError = require('../cancel/CanceledError');\nvar parseProtocol = require('../helpers/parseProtocol');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new CanceledError() : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n var protocol = parseProtocol(fullPath);\n\n if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = require('./cancel/CanceledError');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\naxios.toFormData = require('./helpers/toFormData');\n\n// Expose AxiosError class\naxios.AxiosError = require('../lib/core/AxiosError');\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\nvar CanceledError = require('./CanceledError');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nvar AxiosError = require('../core/AxiosError');\nvar utils = require('../utils');\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction CanceledError(message) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nmodule.exports = CanceledError;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar buildFullPath = require('./buildFullPath');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n var fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url: url,\n data: data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nvar prototype = AxiosError.prototype;\nvar descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED'\n// eslint-disable-next-line func-names\n].forEach(function(code) {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = function(error, code, config, request, response, customProps) {\n var axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nmodule.exports = AxiosError;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar CanceledError = require('../cancel/CanceledError');\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'beforeRedirect': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n","'use strict';\n\nvar AxiosError = require('./AxiosError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar normalizeHeaderName = require('../helpers/normalizeHeaderName');\nvar AxiosError = require('../core/AxiosError');\nvar transitionalDefaults = require('./transitional');\nvar toFormData = require('../helpers/toFormData');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n\n var isObjectPayload = utils.isObject(data);\n var contentType = headers && headers['Content-Type'];\n\n var isFileList;\n\n if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) {\n var _FormData = this.env && this.env.FormData;\n return toFormData(isFileList ? {'files[]': data} : data, _FormData && new _FormData());\n } else if (isObjectPayload || contentType === 'application/json') {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: require('./env/FormData')\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","module.exports = {\n \"version\": \"0.27.2\"\n};","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","// eslint-disable-next-line strict\nmodule.exports = null;\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nmodule.exports = function parseProtocol(url) {\n var match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Convert a data object to FormData\n * @param {Object} obj\n * @param {?Object} [formData]\n * @returns {Object}\n **/\n\nfunction toFormData(obj, formData) {\n // eslint-disable-next-line no-param-reassign\n formData = formData || new FormData();\n\n var stack = [];\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n function build(data, parentKey) {\n if (utils.isPlainObject(data) || utils.isArray(data)) {\n if (stack.indexOf(data) !== -1) {\n throw Error('Circular reference detected in ' + parentKey);\n }\n\n stack.push(data);\n\n utils.forEach(data, function each(value, key) {\n if (utils.isUndefined(value)) return;\n var fullKey = parentKey ? parentKey + '.' + key : key;\n var arr;\n\n if (value && !parentKey && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {\n // eslint-disable-next-line func-names\n arr.forEach(function(el) {\n !utils.isUndefined(el) && formData.append(fullKey, convertValue(el));\n });\n return;\n }\n }\n\n build(value, fullKey);\n });\n\n stack.pop();\n } else {\n formData.append(parentKey, convertValue(data));\n }\n }\n\n build(obj);\n\n return formData;\n}\n\nmodule.exports = toFormData;\n","'use strict';\n\nvar VERSION = require('../env/data').version;\nvar AxiosError = require('../core/AxiosError');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n// eslint-disable-next-line func-names\nvar kindOf = (function(cache) {\n // eslint-disable-next-line func-names\n return function(thing) {\n var str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n };\n})(Object.create(null));\n\nfunction kindOfTest(type) {\n type = type.toLowerCase();\n return function isKindOf(thing) {\n return kindOf(thing) === type;\n };\n}\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return Array.isArray(val);\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nvar isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nvar isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nvar isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nvar isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nvar isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} thing The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(thing) {\n var pattern = '[object FormData]';\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) ||\n toString.call(thing) === pattern ||\n (isFunction(thing.toString) && thing.toString() === pattern)\n );\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nvar isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n */\n\nfunction inherits(constructor, superConstructor, props, descriptors) {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function} [filter]\n * @returns {Object}\n */\n\nfunction toFlatObject(sourceObj, destObj, filter) {\n var props;\n var i;\n var prop;\n var merged = {};\n\n destObj = destObj || {};\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if (!merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = Object.getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/*\n * determines whether a string ends with the characters of a specified string\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n * @returns {boolean}\n */\nfunction endsWith(str, searchString, position) {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n var lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object\n * @param {*} [thing]\n * @returns {Array}\n */\nfunction toArray(thing) {\n if (!thing) return null;\n var i = thing.length;\n if (isUndefined(i)) return null;\n var arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n// eslint-disable-next-line func-names\nvar isTypedArray = (function(TypedArray) {\n // eslint-disable-next-line func-names\n return function(thing) {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM,\n inherits: inherits,\n toFlatObject: toFlatObject,\n kindOf: kindOf,\n kindOfTest: kindOfTest,\n endsWith: endsWith,\n toArray: toArray,\n isTypedArray: isTypedArray,\n isFileList: isFileList\n};\n","module.exports = function(haystack, needle, comparator, low, high) {\n var mid, cmp;\n\n if(low === undefined)\n low = 0;\n\n else {\n low = low|0;\n if(low < 0 || low >= haystack.length)\n throw new RangeError(\"invalid lower bound\");\n }\n\n if(high === undefined)\n high = haystack.length - 1;\n\n else {\n high = high|0;\n if(high < low || high >= haystack.length)\n throw new RangeError(\"invalid upper bound\");\n }\n\n while(low <= high) {\n // The naive `low + high >>> 1` could fail for array lengths > 2**31\n // because `>>>` converts its operands to int32. `low + (high - low >>> 1)`\n // works for array lengths <= 2**32-1 which is also Javascript's max array\n // length.\n mid = low + ((high - low) >>> 1);\n cmp = +comparator(haystack[mid], needle, mid, haystack);\n\n // Too low.\n if(cmp < 0.0)\n low = mid + 1;\n\n // Too high.\n else if(cmp > 0.0)\n high = mid - 1;\n\n // Key found.\n else\n return mid;\n }\n\n // Key not found.\n return ~low;\n}\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar TypeError = global.TypeError;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQUIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar getTypedArrayConstructor = function (it) {\n var proto = getPrototypeOf(it);\n if (!isObject(proto)) return;\n var state = getInternalState(proto);\n return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;\n throw TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced, options) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) {\n // old WebKit bug - some methods are non-configurable\n try {\n TypedArrayConstructor.prototype[KEY] = property;\n } catch (error2) { /* empty */ }\n }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n defineBuiltIn(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n defineBuiltIn(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQUIRED = true;\n defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {\n configurable: true,\n get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n }\n });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n getTypedArrayConstructor: getTypedArrayConstructor,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","'use strict';\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar FunctionName = require('../internals/function-name');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar arrayFill = require('../internals/array-fill');\nvar arraySlice = require('../internals/array-slice-simple');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar getInternalArrayBufferState = InternalStateModule.getterFor(ARRAY_BUFFER);\nvar getInternalDataViewState = InternalStateModule.getterFor(DATA_VIEW);\nvar setInternalState = InternalStateModule.set;\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE];\nvar $DataView = global[DATA_VIEW];\nvar DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar Array = global.Array;\nvar RangeError = global.RangeError;\nvar fill = uncurryThis(arrayFill);\nvar reverse = uncurryThis([].reverse);\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key, getInternalState) {\n defineBuiltInAccessor(Constructor[PROTOTYPE], key, {\n configurable: true,\n get: function () {\n return getInternalState(this)[key];\n }\n });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalDataViewState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = store.bytes;\n var start = intIndex + store.byteOffset;\n var pack = arraySlice(bytes, start, start + count);\n return isLittleEndian ? pack : reverse(pack);\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalDataViewState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = store.bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, ArrayBufferPrototype);\n var byteLength = toIndex(length);\n setInternalState(this, {\n type: ARRAY_BUFFER,\n bytes: fill(Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) {\n this.byteLength = byteLength;\n this.detached = false;\n }\n };\n\n ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE];\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, DataViewPrototype);\n anInstance(buffer, ArrayBufferPrototype);\n var bufferState = getInternalArrayBufferState(buffer);\n var bufferLength = bufferState.byteLength;\n var offset = toIntegerOrInfinity(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n type: DATA_VIEW,\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset,\n bytes: bufferState.bytes\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n DataViewPrototype = $DataView[PROTOTYPE];\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength', getInternalArrayBufferState);\n addGetter($DataView, 'buffer', getInternalDataViewState);\n addGetter($DataView, 'byteLength', getInternalDataViewState);\n addGetter($DataView, 'byteOffset', getInternalDataViewState);\n }\n\n defineBuiltIns(DataViewPrototype, {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return NativeArrayBuffer.length != 1 || INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, ArrayBufferPrototype);\n return new NativeArrayBuffer(toIndex(length));\n };\n\n $ArrayBuffer[PROTOTYPE] = ArrayBufferPrototype;\n\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf(DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf(DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = uncurryThis(DataViewPrototype.setInt8);\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) defineBuiltIns(DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n to += inc;\n from += inc;\n } return O;\n};\n","var lengthOfArrayLike = require('../internals/length-of-array-like');\n\nmodule.exports = function (Constructor, list) {\n var index = 0;\n var length = lengthOfArrayLike(list);\n var result = new Constructor(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ findLast, findLastIndex }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_FIND_LAST_INDEX = TYPE == 1;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that);\n var index = lengthOfArrayLike(self);\n var value, result;\n while (index-- > 0) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (result) switch (TYPE) {\n case 0: return value; // findLast\n case 1: return index; // findLastIndex\n }\n }\n return IS_FIND_LAST_INDEX ? -1 : undefined;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.findLast` method\n // https://github.com/tc39/proposal-array-find-from-last\n findLast: createMethod(0),\n // `Array.prototype.findLastIndex` method\n // https://github.com/tc39/proposal-array-find-from-last\n findLastIndex: createMethod(1)\n};\n","'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar apply = require('../internals/function-apply');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = lengthOfArrayLike(O);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n","var lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toReversed\n// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed\nmodule.exports = function (O, C) {\n var len = lengthOfArrayLike(O);\n var A = new C(len);\n var k = 0;\n for (; k < len; k++) A[k] = O[len - k - 1];\n return A;\n};\n","var lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar $RangeError = RangeError;\n\n// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.with\n// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with\nmodule.exports = function (O, C, index, value) {\n var len = lengthOfArrayLike(O);\n var relativeIndex = toIntegerOrInfinity(index);\n var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;\n if (actualIndex >= len || actualIndex < 0) throw $RangeError('Incorrect index');\n var A = new C(len);\n var k = 0;\n for (; k < len; k++) A[k] = k === actualIndex ? value : O[k];\n return A;\n};\n","'use strict';\nvar create = require('../internals/object-create');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var Prototype = Constructor.prototype;\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n defineBuiltIns(Prototype, {\n // `{ Map, Set }.prototype.clear()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.clear\n // https://tc39.es/ecma262/#sec-set.prototype.clear\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // `{ Map, Set }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.delete\n // https://tc39.es/ecma262/#sec-set.prototype.delete\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.foreach\n // https://tc39.es/ecma262/#sec-set.prototype.foreach\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // `{ Map, Set}.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.has\n // https://tc39.es/ecma262/#sec-set.prototype.has\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n defineBuiltIns(Prototype, IS_MAP ? {\n // `Map.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-map.prototype.get\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // `Map.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-map.prototype.set\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // `Set.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-set.prototype.add\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {\n configurable: true,\n get: function () {\n return getInternalState(this).size;\n }\n });\n return Constructor;\n },\n setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.entries\n // https://tc39.es/ecma262/#sec-map.prototype.keys\n // https://tc39.es/ecma262/#sec-map.prototype.values\n // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n // https://tc39.es/ecma262/#sec-set.prototype.entries\n // https://tc39.es/ecma262/#sec-set.prototype.keys\n // https://tc39.es/ecma262/#sec-set.prototype.values\n // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return createIterResultObject(undefined, true);\n }\n // return step by kind\n if (kind == 'keys') return createIterResultObject(entry.key, false);\n if (kind == 'values') return createIterResultObject(entry.value, false);\n return createIterResultObject([entry.key, entry.value], false);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // `{ Map, Set }.prototype[@@species]` accessors\n // https://tc39.es/ecma262/#sec-get-map-@@species\n // https://tc39.es/ecma262/#sec-get-set-@@species\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anInstance = require('../internals/an-instance');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar hasOwn = require('../internals/has-own-property');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar splice = uncurryThis([].splice);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (state) {\n return state.frozen || (state.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n return find(store.entries, function (it) {\n return it[0] === key;\n });\n};\n\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) splice(this.entries, index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n id: id++,\n frozen: undefined\n });\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var Prototype = Constructor.prototype;\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n defineBuiltIns(Prototype, {\n // `{ WeakMap, WeakSet }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.delete\n // https://tc39.es/ecma262/#sec-weakset.prototype.delete\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && hasOwn(data, state.id) && delete data[state.id];\n },\n // `{ WeakMap, WeakSet }.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.has\n // https://tc39.es/ecma262/#sec-weakset.prototype.has\n has: function has(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && hasOwn(data, state.id);\n }\n });\n\n defineBuiltIns(Prototype, IS_MAP ? {\n // `WeakMap.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.get\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // `WeakMap.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.set\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // `WeakSet.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-weakset.prototype.add\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return Constructor;\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);\n defineBuiltIn(NativePrototype, KEY,\n KEY == 'add' ? function add(value) {\n uncurriedNativeMethod(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n uncurriedNativeMethod(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n var REPLACE = isForced(\n CONSTRUCTOR_NAME,\n !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n }))\n );\n\n if (REPLACE) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.enable();\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new -- required for testing\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, NativePrototype);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, constructor: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","var defineBuiltIn = require('../internals/define-built-in');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) defineBuiltIn(target, key, src[key], options);\n return target;\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg) : false;\n var element, elementLen;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n elementLen = lengthOfArrayLike(element);\n targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;\n } else {\n doesNotExceedSafeInteger(targetIndex + 1);\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar $Array = Array;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = $Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n c = pow(2, -exponent);\n if (number * c < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n while (mantissaLength >= 8) {\n buffer[index++] = mantissa & 255;\n mantissa /= 256;\n mantissaLength -= 8;\n }\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n while (exponentLength > 0) {\n buffer[index++] = exponent & 255;\n exponent /= 256;\n exponentLength -= 8;\n }\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n while (nBits > 0) {\n exponent = exponent * 256 + buffer[index--];\n nBits -= 8;\n }\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n while (nBits > 0) {\n mantissa = mantissa * 256 + buffer[index--];\n nBits -= 8;\n }\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","var classof = require('../internals/classof');\n\nmodule.exports = function (it) {\n var klass = classof(it);\n return klass == 'BigInt64Array' || klass == 'BigUint64Array';\n};\n","var isObject = require('../internals/is-object');\n\nvar floor = Math.floor;\n\n// `IsIntegralNumber` abstract operation\n// https://tc39.es/ecma262/#sec-isintegralnumber\n// eslint-disable-next-line es/no-number-isinteger -- safe\nmodule.exports = Number.isInteger || function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","// eslint-disable-next-line es/no-math-expm1 -- safe\nvar $expm1 = Math.expm1;\nvar exp = Math.exp;\n\n// `Math.expm1` method implementation\n// https://tc39.es/ecma262/#sec-math.expm1\nmodule.exports = (!$expm1\n // Old FF bug\n || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || $expm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n var n = +x;\n return n == 0 ? n : n > -1e-6 && n < 1e-6 ? n + n * n / 2 : exp(n) - 1;\n} : $expm1;\n","var log = Math.log;\nvar LOG10E = Math.LOG10E;\n\n// eslint-disable-next-line es/no-math-log10 -- safe\nmodule.exports = Math.log10 || function log10(x) {\n return log(x) * LOG10E;\n};\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar charAt = uncurryThis(''.charAt);\nvar $parseFloat = global.parseFloat;\nvar Symbol = global.Symbol;\nvar ITERATOR = Symbol && Symbol.iterator;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity\n // MS Edge 18- broken with boxed symbols\n || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); }));\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n var trimmedString = trim(toString(string));\n var result = $parseFloat(trimmedString);\n return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;\n} : $parseFloat;\n","// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(userAgent);\n","// https://github.com/tc39/proposal-string-pad-start-end\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar $repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = toString(requireObjectCoercible($this));\n var intMaxLength = toLength(maxLength);\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : toString(fillString);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.es/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.es/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","var toPrimitive = require('../internals/to-primitive');\n\nvar $TypeError = TypeError;\n\n// `ToBigInt` abstract operation\n// https://tc39.es/ecma262/#sec-tobigint\nmodule.exports = function (argument) {\n var prim = toPrimitive(argument, 'number');\n if (typeof prim == 'number') throw $TypeError(\"Can't convert number to bigint\");\n // eslint-disable-next-line es/no-bigint -- safe\n return BigInt(prim);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\n\nvar $RangeError = RangeError;\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toIntegerOrInfinity(it);\n var length = toLength(number);\n if (number !== length) throw $RangeError('Wrong length or index');\n return length;\n};\n","var toPositiveInteger = require('../internals/to-positive-integer');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it, BYTES) {\n var offset = toPositiveInteger(it);\n if (offset % BYTES) throw $RangeError('Wrong offset');\n return offset;\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it) {\n var result = toIntegerOrInfinity(it);\n if (result < 0) throw $RangeError(\"The argument can't be less than 0\");\n return result;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isIntegralNumber = require('../internals/is-integral-number');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar create = require('../internals/object-create');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar enforceInternalState = InternalStateModule.enforce;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar ArrayBufferPrototype = ArrayBuffer.prototype;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n aTypedArrayConstructor(C);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n defineBuiltInAccessor(it, key, {\n configurable: true,\n get: function () {\n return getInternalState(this)[key];\n }\n });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && !isSymbol(key)\n && key in target\n && isIntegralNumber(+key)\n && key >= 0;\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n key = toPropertyKey(key);\n return isTypedArrayIndex(target, key)\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n key = toPropertyKey(key);\n if (isTypedArrayIndex(target, key)\n && isObject(descriptor)\n && hasOwn(descriptor, 'value')\n && !hasOwn(descriptor, 'get')\n && !hasOwn(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!hasOwn(descriptor, 'writable') || descriptor.writable)\n && (!hasOwn(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructorPrototype);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return call(typedArrayFrom, TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructorPrototype);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return call(typedArrayFrom, TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n enforceInternalState(TypedArrayConstructorPrototype).TypedArrayConstructor = TypedArrayConstructor;\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n var FORCED = TypedArrayConstructor != NativeTypedArrayConstructor;\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({ global: true, constructor: true, forced: FORCED, sham: !NATIVE_ARRAY_BUFFER_VIEWS }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","/* eslint-disable no-new -- required for testing */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","var arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\n\nmodule.exports = function (instance, list) {\n return arrayFromConstructorAndList(typedArraySpeciesConstructor(instance), list);\n};\n","var bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar aConstructor = require('../internals/a-constructor');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isBigIntArray = require('../internals/is-big-int-array');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\nvar toBigInt = require('../internals/to-big-int');\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var C = aConstructor(this);\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, thisIsBigIntArray, value, step, iterator, next;\n if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n O = [];\n while (!(step = call(next, iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2]);\n }\n length = lengthOfArrayLike(O);\n result = new (aTypedArrayConstructor(C))(length);\n thisIsBigIntArray = isBigIntArray(result);\n for (i = 0; length > i; i++) {\n value = mapping ? mapfn(O[i], i) : O[i];\n // FF30- typed arrays doesn't properly convert objects to typed array values\n result[i] = thisIsBigIntArray ? toBigInt(value) : +value;\n }\n return result;\n};\n","var ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\n\n// a part of `TypedArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#typedarray-species-create\nmodule.exports = function (originalArray) {\n return aTypedArrayConstructor(speciesConstructor(originalArray, getTypedArrayConstructor(originalArray)));\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-array.prototype.flatmap\n$({ target: 'Array', proto: true }, {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen = lengthOfArrayLike(O);\n var A;\n aCallable(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar setArrayLength = require('../internals/array-set-length');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n }\n doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n setArrayLength(O, len - actualDeleteCount + insertCount);\n return A;\n }\n});\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flatMap');\n","var global = require('../internals/global');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// JSON[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-json-@@tostringtag\nsetToStringTag(global.JSON, 'JSON', true);\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.es/ecma262/#sec-map-objects\ncollection('Map', function (init) {\n return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.map.constructor');\n","var $ = require('../internals/export');\n\n// eslint-disable-next-line es/no-math-asinh -- required for testing\nvar $asinh = Math.asinh;\nvar log = Math.log;\nvar sqrt = Math.sqrt;\n\nfunction asinh(x) {\n var n = +x;\n return !isFinite(n) || n == 0 ? n : n < 0 ? -asinh(-n) : log(n + sqrt(n * n + 1));\n}\n\nvar FORCED = !($asinh && 1 / $asinh(0) > 0);\n\n// `Math.asinh` method\n// https://tc39.es/ecma262/#sec-math.asinh\n// Tor Browser bug: Math.asinh(0) -> -0\n$({ target: 'Math', stat: true, forced: FORCED }, {\n asinh: asinh\n});\n","var $ = require('../internals/export');\nvar log10 = require('../internals/math-log10');\n\n// `Math.log10` method\n// https://tc39.es/ecma262/#sec-math.log10\n$({ target: 'Math', stat: true }, {\n log10: log10\n});\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\n// `Math.log2` method\n// https://tc39.es/ecma262/#sec-math.log2\n$({ target: 'Math', stat: true }, {\n log2: function log2(x) {\n return log(x) / LN2;\n }\n});\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.es/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n sign: sign\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar expm1 = require('../internals/math-expm1');\n\nvar abs = Math.abs;\nvar exp = Math.exp;\nvar E = Math.E;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-math-sinh -- required for testing\n return Math.sinh(-2e-17) != -2e-17;\n});\n\n// `Math.sinh` method\n// https://tc39.es/ecma262/#sec-math.sinh\n// V8 near Chromium 38 has a problem with very small numbers\n$({ target: 'Math', stat: true, forced: FORCED }, {\n sinh: function sinh(x) {\n var n = +x;\n return abs(n) < 1 ? (expm1(n) - expm1(-n)) / 2 : (exp(n - 1) - exp(-n - 1)) * (E / 2);\n }\n});\n","var setToStringTag = require('../internals/set-to-string-tag');\n\n// Math[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-math-@@tostringtag\nsetToStringTag(Math, 'Math', true);\n","var $ = require('../internals/export');\n\n// `Number.EPSILON` constant\n// https://tc39.es/ecma262/#sec-number.epsilon\n$({ target: 'Number', stat: true, nonConfigurable: true, nonWritable: true }, {\n EPSILON: Math.pow(2, -52)\n});\n","var $ = require('../internals/export');\nvar isIntegralNumber = require('../internals/is-integral-number');\n\n// `Number.isInteger` method\n// https://tc39.es/ecma262/#sec-number.isinteger\n$({ target: 'Number', stat: true }, {\n isInteger: isIntegralNumber\n});\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","var $ = require('../internals/export');\nvar $parseFloat = require('../internals/number-parse-float');\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\n$({ global: true, forced: parseFloat != $parseFloat }, {\n parseFloat: $parseFloat\n});\n","var global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar regExpFlags = require('../internals/regexp-flags');\nvar fails = require('../internals/fails');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError\nvar RegExp = global.RegExp;\nvar RegExpPrototype = RegExp.prototype;\n\nvar FORCED = DESCRIPTORS && fails(function () {\n var INDICES_SUPPORT = true;\n try {\n RegExp('.', 'd');\n } catch (error) {\n INDICES_SUPPORT = false;\n }\n\n var O = {};\n // modern V8 bug\n var calls = '';\n var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';\n\n var addGetter = function (key, chr) {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(O, key, { get: function () {\n calls += chr;\n return true;\n } });\n };\n\n var pairs = {\n dotAll: 's',\n global: 'g',\n ignoreCase: 'i',\n multiline: 'm',\n sticky: 'y'\n };\n\n if (INDICES_SUPPORT) pairs.hasIndices = 'd';\n\n for (var key in pairs) addGetter(key, pairs[key]);\n\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n var result = Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call(O);\n\n return result !== expected || calls !== expected;\n});\n\n// `RegExp.prototype.flags` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nif (FORCED) defineBuiltInAccessor(RegExpPrototype, 'flags', {\n configurable: true,\n get: regExpFlags\n});\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.es/ecma262/#sec-set-objects\ncollection('Set', function (init) {\n return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.set.constructor');\n","'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.es/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar isCallable = require('../internals/is-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isRegExp = require('../internals/is-regexp');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar getSubstitution = require('../internals/get-substitution');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar $TypeError = TypeError;\nvar indexOf = uncurryThis(''.indexOf);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\nvar max = Math.max;\n\nvar stringIndexOf = function (string, searchValue, fromIndex) {\n if (fromIndex > string.length) return -1;\n if (searchValue === '') return fromIndex;\n return indexOf(string, searchValue, fromIndex);\n};\n\n// `String.prototype.replaceAll` method\n// https://tc39.es/ecma262/#sec-string.prototype.replaceall\n$({ target: 'String', proto: true }, {\n replaceAll: function replaceAll(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;\n var position = 0;\n var endOfLastMatch = 0;\n var result = '';\n if (!isNullOrUndefined(searchValue)) {\n IS_REG_EXP = isRegExp(searchValue);\n if (IS_REG_EXP) {\n flags = toString(requireObjectCoercible(getRegExpFlags(searchValue)));\n if (!~indexOf(flags, 'g')) throw $TypeError('`.replaceAll` does not allow non-global regexes');\n }\n replacer = getMethod(searchValue, REPLACE);\n if (replacer) {\n return call(replacer, searchValue, O, replaceValue);\n } else if (IS_PURE && IS_REG_EXP) {\n return replace(toString(O), searchValue, replaceValue);\n }\n }\n string = toString(O);\n searchString = toString(searchValue);\n functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n searchLength = searchString.length;\n advanceBy = max(1, searchLength);\n position = stringIndexOf(string, searchString, 0);\n while (position !== -1) {\n replacement = functionalReplace\n ? toString(replaceValue(searchString, position, string))\n : getSubstitution(searchString, string, position, [], undefined, replaceValue);\n result += stringSlice(string, endOfLastMatch, position) + replacement;\n endOfLastMatch = position + searchLength;\n position = stringIndexOf(string, searchString, position + advanceBy);\n }\n if (endOfLastMatch < string.length) {\n result += stringSlice(string, endOfLastMatch);\n }\n return result;\n }\n});\n","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.es/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);\n return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeSearch, rx, S);\n\n if (res.done) return res.value;\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","var defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.asyncIterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.asynciterator\ndefineWellKnownSymbol('asyncIterator');\n","var getBuiltIn = require('../internals/get-built-in');\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// `Symbol.toStringTag` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.tostringtag\ndefineWellKnownSymbol('toStringTag');\n\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag(getBuiltIn('Symbol'), 'Symbol');\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.at` method\n// https://github.com/tc39/proposal-relative-indexing-method\nexportTypedArrayMethod('at', function at(index) {\n var O = aTypedArray(this);\n var len = lengthOfArrayLike(O);\n var relativeIndex = toIntegerOrInfinity(index);\n var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;\n return (k < 0 || k >= len) ? undefined : O[k];\n});\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $ArrayCopyWithin = require('../internals/array-copy-within');\n\nvar u$ArrayCopyWithin = uncurryThis($ArrayCopyWithin);\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.copyWithin` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin\nexportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {\n return u$ArrayCopyWithin(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $every = require('../internals/array-iteration').every;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.every` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every\nexportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {\n return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\nvar toBigInt = require('../internals/to-big-int');\nvar classof = require('../internals/classof');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar slice = uncurryThis(''.slice);\n\n// V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18\nvar CONVERSION_BUG = fails(function () {\n var count = 0;\n // eslint-disable-next-line es/no-typed-arrays -- safe\n new Int8Array(2).fill({ valueOf: function () { return count++; } });\n return count !== 1;\n});\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n var length = arguments.length;\n aTypedArray(this);\n var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;\n return call($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);\n}, CONVERSION_BUG);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return fromSpeciesAndList(this, list);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findIndex = require('../internals/array-iteration').findIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex\nexportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {\n return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findLastIndex = require('../internals/array-iteration-from-last').findLastIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findLastIndex` method\n// https://github.com/tc39/proposal-array-find-from-last\nexportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) {\n return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findLast = require('../internals/array-iteration-from-last').findLast;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findLast` method\n// https://github.com/tc39/proposal-array-find-from-last\nexportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) {\n return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $find = require('../internals/array-iteration').find;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.find` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find\nexportTypedArrayMethod('find', function find(predicate /* , thisArg */) {\n return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach\nexportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {\n $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $includes = require('../internals/array-includes').includes;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.includes` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes\nexportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {\n return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $indexOf = require('../internals/array-includes').indexOf;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof\nexportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {\n return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = uncurryThis(ArrayIterators.values);\nvar arrayKeys = uncurryThis(ArrayIterators.keys);\nvar arrayEntries = uncurryThis(ArrayIterators.entries);\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar TypedArrayPrototype = Uint8Array && Uint8Array.prototype;\n\nvar GENERIC = !fails(function () {\n TypedArrayPrototype[ITERATOR].call([1]);\n});\n\nvar ITERATOR_IS_VALUES = !!TypedArrayPrototype\n && TypedArrayPrototype.values\n && TypedArrayPrototype[ITERATOR] === TypedArrayPrototype.values\n && TypedArrayPrototype.values.name === 'values';\n\nvar typedArrayValues = function values() {\n return arrayValues(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries(aTypedArray(this));\n}, GENERIC);\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys(aTypedArray(this));\n}, GENERIC);\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = uncurryThis([].join);\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\nexportTypedArrayMethod('join', function join(separator) {\n return $join(aTypedArray(this), separator);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar apply = require('../internals/function-apply');\nvar $lastIndexOf = require('../internals/array-last-index-of');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.lastIndexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof\nexportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {\n var length = arguments.length;\n return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (typedArraySpeciesConstructor(O))(length);\n });\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduceRight = require('../internals/array-reduce').right;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduceRight` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright\nexportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {\n var length = arguments.length;\n return $reduceRight(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduce = require('../internals/array-reduce').left;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce\nexportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {\n var length = arguments.length;\n return $reduce(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n","'use strict';\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toOffset = require('../internals/to-offset');\nvar toIndexedObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar RangeError = global.RangeError;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar $set = Int8ArrayPrototype && Int8ArrayPrototype.set;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n var array = new Uint8ClampedArray(2);\n call($set, array, { length: 1, 0: 3 }, 1);\n return array[1] !== 3;\n});\n\n// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other\nvar TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {\n var array = new Int8Array(2);\n array.set(1);\n array.set('2', 1);\n return array[0] !== 0 || array[1] !== 2;\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var src = toIndexedObject(arrayLike);\n if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);\n var length = this.length;\n var len = lengthOfArrayLike(src);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\nvar fails = require('../internals/fails');\nvar arraySlice = require('../internals/array-slice');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = arraySlice(aTypedArray(this), start, end);\n var C = typedArraySpeciesConstructor(this);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $some = require('../internals/array-iteration').some;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.some` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some\nexportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {\n return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar internalSort = require('../internals/array-sort');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !(fails(function () {\n nativeSort(new Uint16Array(2), null);\n}) && fails(function () {\n nativeSort(new Uint16Array(2), {});\n}));\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n nativeSort(array, function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort(this, comparefn);\n\n return internalSort(aTypedArray(this), getSortCompare(comparefn));\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\nvar arraySlice = require('../internals/array-slice');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return apply(\n $toLocaleString,\n TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),\n arraySlice(arguments)\n );\n}, FORCED);\n","'use strict';\nvar arrayToReversed = require('../internals/array-to-reversed');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\n\n// `%TypedArray%.prototype.toReversed` method\n// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed\nexportTypedArrayMethod('toReversed', function toReversed() {\n return arrayToReversed(aTypedArray(this), getTypedArrayConstructor(this));\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar sort = uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort);\n\n// `%TypedArray%.prototype.toSorted` method\n// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSorted\nexportTypedArrayMethod('toSorted', function toSorted(compareFn) {\n if (compareFn !== undefined) aCallable(compareFn);\n var O = aTypedArray(this);\n var A = arrayFromConstructorAndList(getTypedArrayConstructor(O), O);\n return sort(A, compareFn);\n});\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar join = uncurryThis([].join);\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return join(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar arrayWith = require('../internals/array-with');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar isBigIntArray = require('../internals/is-big-int-array');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toBigInt = require('../internals/to-big-int');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar PROPER_ORDER = !!function () {\n try {\n // eslint-disable-next-line no-throw-literal, es/no-typed-arrays, es/no-array-prototype-with -- required for testing\n new Int8Array(1)['with'](2, { valueOf: function () { throw 8; } });\n } catch (error) {\n // some early implementations, like WebKit, does not follow the final semantic\n // https://github.com/tc39/proposal-change-array-by-copy/pull/86\n return error === 8;\n }\n}();\n\n// `%TypedArray%.prototype.with` method\n// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with\nexportTypedArrayMethod('with', { 'with': function (index, value) {\n var O = aTypedArray(this);\n var relativeIndex = toIntegerOrInfinity(index);\n var actualValue = isBigIntArray(O) ? toBigInt(value) : +value;\n return arrayWith(O, getTypedArrayConstructor(O), relativeIndex, actualValue);\n} }['with'], !PROPER_ORDER);\n","'use strict';\nvar FREEZING = require('../internals/freezing');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\nvar isObject = require('../internals/is-object');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar fails = require('../internals/fails');\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\n\nvar $Object = Object;\n// eslint-disable-next-line es/no-array-isarray -- safe\nvar isArray = Array.isArray;\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = $Object.isExtensible;\n// eslint-disable-next-line es/no-object-isfrozen -- safe\nvar isFrozen = $Object.isFrozen;\n// eslint-disable-next-line es/no-object-issealed -- safe\nvar isSealed = $Object.isSealed;\n// eslint-disable-next-line es/no-object-freeze -- safe\nvar freeze = $Object.freeze;\n// eslint-disable-next-line es/no-object-seal -- safe\nvar seal = $Object.seal;\n\nvar FROZEN = {};\nvar SEALED = {};\nvar IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;\nvar InternalWeakMap;\n\nvar wrapper = function (init) {\n return function WeakMap() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n};\n\n// `WeakMap` constructor\n// https://tc39.es/ecma262/#sec-weakmap-constructor\nvar $WeakMap = collection('WeakMap', wrapper, collectionWeak);\nvar WeakMapPrototype = $WeakMap.prototype;\nvar nativeSet = uncurryThis(WeakMapPrototype.set);\n\n// Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them\nvar hasMSEdgeFreezingBug = function () {\n return FREEZING && fails(function () {\n var frozenArray = freeze([]);\n nativeSet(new $WeakMap(), frozenArray, 1);\n return !isFrozen(frozenArray);\n });\n};\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP) if (IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n InternalMetadataModule.enable();\n var nativeDelete = uncurryThis(WeakMapPrototype['delete']);\n var nativeHas = uncurryThis(WeakMapPrototype.has);\n var nativeGet = uncurryThis(WeakMapPrototype.get);\n defineBuiltIns(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete(this, key) || state.frozen['delete'](key);\n } return nativeDelete(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) || state.frozen.has(key);\n } return nativeHas(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);\n } return nativeGet(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);\n } else nativeSet(this, key, value);\n return this;\n }\n });\n// Chakra Edge frozen keys fix\n} else if (hasMSEdgeFreezingBug()) {\n defineBuiltIns(WeakMapPrototype, {\n set: function set(key, value) {\n var arrayIntegrityLevel;\n if (isArray(key)) {\n if (isFrozen(key)) arrayIntegrityLevel = FROZEN;\n else if (isSealed(key)) arrayIntegrityLevel = SEALED;\n }\n nativeSet(this, key, value);\n if (arrayIntegrityLevel == FROZEN) freeze(key);\n if (arrayIntegrityLevel == SEALED) seal(key);\n return this;\n }\n });\n}\n","// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.weak-map.constructor');\n","// TODO: Remove from `core-js@4`\nrequire('../modules/es.typed-array.to-reversed');\n","// TODO: Remove from `core-js@4`\nrequire('../modules/es.typed-array.to-sorted');\n","// TODO: Remove from `core-js@4`\nrequire('../modules/es.typed-array.with');\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar microtask = require('../internals/microtask');\nvar aCallable = require('../internals/a-callable');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar process = global.process;\n\n// `queueMicrotask` method\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask\n$({ global: true, enumerable: true, dontCallGetSet: true }, {\n queueMicrotask: function queueMicrotask(fn) {\n validateArgumentsLength(arguments.length, 1);\n aCallable(fn);\n var domain = IS_NODE && process.domain;\n microtask(domain ? domain.bind(fn) : fn);\n }\n});\n","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n return result;\n};\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // TODO: Remove String()\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n return function (dirtyIndex, options) {\n var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n var valuesArray;\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;\n // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n case 2:\n return number + 'nd';\n case 3:\n return number + 'rd';\n }\n }\n return number + 'th';\n};\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","export default function buildMatchFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n if (!matchResult) {\n return null;\n }\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n }) : findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n var value;\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n return undefined;\n}\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}","export default function buildMatchPatternFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import defaultLocale from \"../../locale/en-US/index.js\";\nexport default defaultLocale;","var defaultOptions = {};\nexport function getDefaultOptions() {\n return defaultOptions;\n}\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n};\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n};\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n var dateTimeFormat;\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n var year = getUTCWeekYear(dirtyDate, options);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, options);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n }\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n var number = Number(dirtyNumber);\n if (isNaN(number)) {\n return number;\n }\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n while (output.length < targetLength) {\n output = '0' + output;\n }\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\nvar formatters = {\n // Year\n y: function y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n var signedYear = date.getUTCFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function M(date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function d(date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function a(date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n case 'aaa':\n return dayPeriodEnumValue;\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function h(date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function H(date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function m(date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function s(date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function S(date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nvar formatters = {\n // Era\n G: function G(date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function y(date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function Y(date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function R(date, token) {\n var isoWeekYear = getUTCISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function u(date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function Q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function M(date, token, localize) {\n var month = date.getUTCMonth();\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function L(date, token, localize) {\n var month = date.getUTCMonth();\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function w(date, token, localize, options) {\n var week = getUTCWeek(date, options);\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function I(date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function d(date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function D(date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function E(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function e(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function c(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function i(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function a(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function b(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function B(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function h(date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function H(date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function K(date, token, localize) {\n var hours = date.getUTCHours() % 12;\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function k(date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function m(date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n return lightFormatters.m(date, token);\n },\n // Second\n s: function s(date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function S(date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function X(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n if (timezoneOffset === 0) {\n return 'Z';\n }\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function x(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function O(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function z(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function t(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function T(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, dirtyDelimiter);\n}\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\nexport default formatters;","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n var originalDate = toDate(dirtyDate);\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n }\n\n // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n var firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n var formatter = formatters[firstCharacter];\n if (formatter) {\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n return substring;\n }).join('');\n return result;\n}\nfunction cleanEscapedString(input) {\n var matched = input.match(escapedStringRegExp);\n if (!matched) {\n return input;\n }\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","export default function assign(target, object) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n for (var property in object) {\n if (Object.prototype.hasOwnProperty.call(object, property)) {\n ;\n target[property] = object[property];\n }\n }\n return target;\n}","import _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar TIMEZONE_UNIT_PRIORITY = 10;\nexport var Setter = /*#__PURE__*/function () {\n function Setter() {\n _classCallCheck(this, Setter);\n _defineProperty(this, \"priority\", void 0);\n _defineProperty(this, \"subPriority\", 0);\n }\n _createClass(Setter, [{\n key: \"validate\",\n value: function validate(_utcDate, _options) {\n return true;\n }\n }]);\n return Setter;\n}();\nexport var ValueSetter = /*#__PURE__*/function (_Setter) {\n _inherits(ValueSetter, _Setter);\n var _super = _createSuper(ValueSetter);\n function ValueSetter(value, validateValue, setValue, priority, subPriority) {\n var _this;\n _classCallCheck(this, ValueSetter);\n _this = _super.call(this);\n _this.value = value;\n _this.validateValue = validateValue;\n _this.setValue = setValue;\n _this.priority = priority;\n if (subPriority) {\n _this.subPriority = subPriority;\n }\n return _this;\n }\n _createClass(ValueSetter, [{\n key: \"validate\",\n value: function validate(utcDate, options) {\n return this.validateValue(utcDate, this.value, options);\n }\n }, {\n key: \"set\",\n value: function set(utcDate, flags, options) {\n return this.setValue(utcDate, flags, this.value, options);\n }\n }]);\n return ValueSetter;\n}(Setter);\nexport var DateToSystemTimezoneSetter = /*#__PURE__*/function (_Setter2) {\n _inherits(DateToSystemTimezoneSetter, _Setter2);\n var _super2 = _createSuper(DateToSystemTimezoneSetter);\n function DateToSystemTimezoneSetter() {\n var _this2;\n _classCallCheck(this, DateToSystemTimezoneSetter);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this2 = _super2.call.apply(_super2, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this2), \"priority\", TIMEZONE_UNIT_PRIORITY);\n _defineProperty(_assertThisInitialized(_this2), \"subPriority\", -1);\n return _this2;\n }\n _createClass(DateToSystemTimezoneSetter, [{\n key: \"set\",\n value: function set(date, flags) {\n if (flags.timestampIsSet) {\n return date;\n }\n var convertedDate = new Date(0);\n convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n return convertedDate;\n }\n }]);\n return DateToSystemTimezoneSetter;\n}(Setter);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { ValueSetter } from \"./Setter.js\";\nexport var Parser = /*#__PURE__*/function () {\n function Parser() {\n _classCallCheck(this, Parser);\n _defineProperty(this, \"incompatibleTokens\", void 0);\n _defineProperty(this, \"priority\", void 0);\n _defineProperty(this, \"subPriority\", void 0);\n }\n _createClass(Parser, [{\n key: \"run\",\n value: function run(dateString, token, match, options) {\n var result = this.parse(dateString, token, match, options);\n if (!result) {\n return null;\n }\n return {\n setter: new ValueSetter(result.value, this.validate, this.set, this.priority, this.subPriority),\n rest: result.rest\n };\n }\n }, {\n key: \"validate\",\n value: function validate(_utcDate, _value, _options) {\n return true;\n }\n }]);\n return Parser;\n}();","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nexport var EraParser = /*#__PURE__*/function (_Parser) {\n _inherits(EraParser, _Parser);\n var _super = _createSuper(EraParser);\n function EraParser() {\n var _this;\n _classCallCheck(this, EraParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 140);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['R', 'u', 't', 'T']);\n return _this;\n }\n _createClass(EraParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return match.era(dateString, {\n width: 'abbreviated'\n }) || match.era(dateString, {\n width: 'narrow'\n });\n // A, B\n case 'GGGGG':\n return match.era(dateString, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n case 'GGGG':\n default:\n return match.era(dateString, {\n width: 'wide'\n }) || match.era(dateString, {\n width: 'abbreviated'\n }) || match.era(dateString, {\n width: 'narrow'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n flags.era = value;\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return EraParser;\n}(Parser);","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n\n/**\n * Days in 1 year\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n *\n * @name daysInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInYear = 365.2425;\n\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInMinute = 60000;\n\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInHour = 3600000;\n\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInSecond = 1000;\n\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\nexport var minTime = -maxTime;\n\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var minutesInHour = 60;\n\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexport var monthsInQuarter = 3;\n\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var monthsInYear = 12;\n\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var quartersInYear = 4;\n\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInHour = 3600;\n\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInMinute = 60;\n\n/**\n * Seconds in 1 day\n *\n * @name secondsInDay\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInDay = secondsInHour * 24;\n\n/**\n * Seconds in 1 week\n *\n * @name secondsInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInWeek = secondsInDay * 7;\n\n/**\n * Seconds in 1 year\n *\n * @name secondsInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInYear = secondsInDay * daysInYear;\n\n/**\n * Seconds in 1 month\n *\n * @name secondsInMonth\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInMonth = secondsInYear / 12;\n\n/**\n * Seconds in 1 quarter\n *\n * @name secondsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInQuarter = secondsInMonth * 3;","export var numericPatterns = {\n month: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/,\n // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/,\n // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/,\n // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/,\n // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/,\n // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/,\n // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n minute: /^[0-5]?\\d/,\n // 0 to 59\n second: /^[0-5]?\\d/,\n // 0 to 59\n\n singleDigit: /^\\d/,\n // 0 to 9\n twoDigits: /^\\d{1,2}/,\n // 0 to 99\n threeDigits: /^\\d{1,3}/,\n // 0 to 999\n fourDigits: /^\\d{1,4}/,\n // 0 to 9999\n\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/,\n // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/,\n // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/,\n // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/ // 0 to 9999, -0 to -9999\n};\n\nexport var timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/\n};","import { millisecondsInHour, millisecondsInMinute, millisecondsInSecond } from \"../../constants/index.js\";\nimport { numericPatterns } from \"./constants.js\";\nexport function mapValue(parseFnResult, mapFn) {\n if (!parseFnResult) {\n return parseFnResult;\n }\n return {\n value: mapFn(parseFnResult.value),\n rest: parseFnResult.rest\n };\n}\nexport function parseNumericPattern(pattern, dateString) {\n var matchResult = dateString.match(pattern);\n if (!matchResult) {\n return null;\n }\n return {\n value: parseInt(matchResult[0], 10),\n rest: dateString.slice(matchResult[0].length)\n };\n}\nexport function parseTimezonePattern(pattern, dateString) {\n var matchResult = dateString.match(pattern);\n if (!matchResult) {\n return null;\n }\n\n // Input is 'Z'\n if (matchResult[0] === 'Z') {\n return {\n value: 0,\n rest: dateString.slice(1)\n };\n }\n var sign = matchResult[1] === '+' ? 1 : -1;\n var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n return {\n value: sign * (hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * millisecondsInSecond),\n rest: dateString.slice(matchResult[0].length)\n };\n}\nexport function parseAnyDigitsSigned(dateString) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);\n}\nexport function parseNDigits(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, dateString);\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, dateString);\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, dateString);\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, dateString);\n default:\n return parseNumericPattern(new RegExp('^\\\\d{1,' + n + '}'), dateString);\n }\n}\nexport function parseNDigitsSigned(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);\n default:\n return parseNumericPattern(new RegExp('^-?\\\\d{1,' + n + '}'), dateString);\n }\n}\nexport function dayPeriodEnumToHours(dayPeriod) {\n switch (dayPeriod) {\n case 'morning':\n return 4;\n case 'evening':\n return 17;\n case 'pm':\n case 'noon':\n case 'afternoon':\n return 12;\n case 'am':\n case 'midnight':\n case 'night':\n default:\n return 0;\n }\n}\nexport function normalizeTwoDigitYear(twoDigitYear, currentYear) {\n var isCommonEra = currentYear > 0;\n // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n var result;\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n var rangeEnd = absCurrentYear + 50;\n var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;\n var isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n return isCommonEra ? result : 1 - result;\n}\nexport function isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\";\n// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n// | Year | y | yy | yyy | yyyy | yyyyy |\n// |----------|-------|----|-------|-------|-------|\n// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\nexport var YearParser = /*#__PURE__*/function (_Parser) {\n _inherits(YearParser, _Parser);\n var _super = _createSuper(YearParser);\n function YearParser() {\n var _this;\n _classCallCheck(this, YearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'u', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(YearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(year) {\n return {\n year: year,\n isTwoDigitYear: token === 'yy'\n };\n };\n switch (token) {\n case 'y':\n return mapValue(parseNDigits(4, dateString), valueCallback);\n case 'yo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'year'\n }), valueCallback);\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n var currentYear = date.getUTCFullYear();\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return YearParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits, normalizeTwoDigitYear, mapValue } from \"../utils.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\";\n// Local week-numbering year\nexport var LocalWeekYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalWeekYearParser, _Parser);\n var _super = _createSuper(LocalWeekYearParser);\n function LocalWeekYearParser() {\n var _this;\n _classCallCheck(this, LocalWeekYearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'Q', 'q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n return _this;\n }\n _createClass(LocalWeekYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(year) {\n return {\n year: year,\n isTwoDigitYear: token === 'YY'\n };\n };\n switch (token) {\n case 'Y':\n return mapValue(parseNDigits(4, dateString), valueCallback);\n case 'Yo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'year'\n }), valueCallback);\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value, options) {\n var currentYear = getUTCWeekYear(date, options);\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n }]);\n return LocalWeekYearParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week-numbering year\nexport var ISOWeekYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOWeekYearParser, _Parser);\n var _super = _createSuper(ISOWeekYearParser);\n function ISOWeekYearParser() {\n var _this;\n _classCallCheck(this, ISOWeekYearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(ISOWeekYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n if (token === 'R') {\n return parseNDigitsSigned(4, dateString);\n }\n return parseNDigitsSigned(token.length, dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n var firstWeekOfYear = new Date(0);\n firstWeekOfYear.setUTCFullYear(value, 0, 4);\n firstWeekOfYear.setUTCHours(0, 0, 0, 0);\n return startOfUTCISOWeek(firstWeekOfYear);\n }\n }]);\n return ISOWeekYearParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nexport var ExtendedYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(ExtendedYearParser, _Parser);\n var _super = _createSuper(ExtendedYearParser);\n function ExtendedYearParser() {\n var _this;\n _classCallCheck(this, ExtendedYearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(ExtendedYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n if (token === 'u') {\n return parseNDigitsSigned(4, dateString);\n }\n return parseNDigitsSigned(token.length, dateString);\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return ExtendedYearParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport var QuarterParser = /*#__PURE__*/function (_Parser) {\n _inherits(QuarterParser, _Parser);\n var _super = _createSuper(QuarterParser);\n function QuarterParser() {\n var _this;\n _classCallCheck(this, QuarterParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 120);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(QuarterParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n case 'QQ':\n // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n case 'Qo':\n return match.ordinalNumber(dateString, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n case 'QQQ':\n return match.quarter(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'QQQQQ':\n return match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n case 'QQQQ':\n default:\n return match.quarter(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return QuarterParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport var StandAloneQuarterParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneQuarterParser, _Parser);\n var _super = _createSuper(StandAloneQuarterParser);\n function StandAloneQuarterParser() {\n var _this;\n _classCallCheck(this, StandAloneQuarterParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 120);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'Q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(StandAloneQuarterParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n case 'qq':\n // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n case 'qo':\n return match.ordinalNumber(dateString, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n case 'qqq':\n return match.quarter(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'qqqqq':\n return match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n case 'qqqq':\n default:\n return match.quarter(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return StandAloneQuarterParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nexport var MonthParser = /*#__PURE__*/function (_Parser) {\n _inherits(MonthParser, _Parser);\n var _super = _createSuper(MonthParser);\n function MonthParser() {\n var _this;\n _classCallCheck(this, MonthParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'L', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n _defineProperty(_assertThisInitialized(_this), \"priority\", 110);\n return _this;\n }\n _createClass(MonthParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n return value - 1;\n };\n switch (token) {\n // 1, 2, ..., 12\n case 'M':\n return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n // 01, 02, ..., 12\n case 'MM':\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n case 'Mo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'month'\n }), valueCallback);\n // Jan, Feb, ..., Dec\n case 'MMM':\n return match.month(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // J, F, ..., D\n case 'MMMMM':\n return match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n case 'MMMM':\n default:\n return match.month(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return MonthParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, mapValue } from \"../utils.js\";\nexport var StandAloneMonthParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneMonthParser, _Parser);\n var _super = _createSuper(StandAloneMonthParser);\n function StandAloneMonthParser() {\n var _this;\n _classCallCheck(this, StandAloneMonthParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 110);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(StandAloneMonthParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n return value - 1;\n };\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n // 01, 02, ..., 12\n case 'LL':\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n case 'Lo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'month'\n }), valueCallback);\n // Jan, Feb, ..., Dec\n case 'LLL':\n return match.month(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // J, F, ..., D\n case 'LLLLL':\n return match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n case 'LLLL':\n default:\n return match.month(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return StandAloneMonthParser;\n}(Parser);","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCWeek from \"../getUTCWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCWeek(dirtyDate, dirtyWeek, options) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var week = toInteger(dirtyWeek);\n var diff = getUTCWeek(date, options) - week;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCWeek from \"../../../_lib/setUTCWeek/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\"; // Local week of year\nexport var LocalWeekParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalWeekParser, _Parser);\n var _super = _createSuper(LocalWeekParser);\n function LocalWeekParser() {\n var _this;\n _classCallCheck(this, LocalWeekParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 100);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n return _this;\n }\n _createClass(LocalWeekParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'w':\n return parseNumericPattern(numericPatterns.week, dateString);\n case 'wo':\n return match.ordinalNumber(dateString, {\n unit: 'week'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n return startOfUTCWeek(setUTCWeek(date, value, options), options);\n }\n }]);\n return LocalWeekParser;\n}(Parser);","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCISOWeek from \"../getUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCISOWeek(dirtyDate, dirtyISOWeek) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var isoWeek = toInteger(dirtyISOWeek);\n var diff = getUTCISOWeek(date) - isoWeek;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCISOWeek from \"../../../_lib/setUTCISOWeek/index.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week of year\nexport var ISOWeekParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOWeekParser, _Parser);\n var _super = _createSuper(ISOWeekParser);\n function ISOWeekParser() {\n var _this;\n _classCallCheck(this, ISOWeekParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 100);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(ISOWeekParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'I':\n return parseNumericPattern(numericPatterns.week, dateString);\n case 'Io':\n return match.ordinalNumber(dateString, {\n unit: 'week'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n return startOfUTCISOWeek(setUTCISOWeek(date, value));\n }\n }]);\n return ISOWeekParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { isLeapYearIndex, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n// Day of the month\nexport var DateParser = /*#__PURE__*/function (_Parser) {\n _inherits(DateParser, _Parser);\n var _super = _createSuper(DateParser);\n function DateParser() {\n var _this;\n _classCallCheck(this, DateParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"subPriority\", 1);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(DateParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'd':\n return parseNumericPattern(numericPatterns.date, dateString);\n case 'do':\n return match.ordinalNumber(dateString, {\n unit: 'date'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(date, value) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n var month = date.getUTCMonth();\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH[month];\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCDate(value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return DateParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, isLeapYearIndex } from \"../utils.js\";\nexport var DayOfYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayOfYearParser, _Parser);\n var _super = _createSuper(DayOfYearParser);\n function DayOfYearParser() {\n var _this;\n _classCallCheck(this, DayOfYearParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"subpriority\", 1);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'L', 'w', 'I', 'd', 'E', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(DayOfYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'D':\n case 'DD':\n return parseNumericPattern(numericPatterns.dayOfYear, dateString);\n case 'Do':\n return match.ordinalNumber(dateString, {\n unit: 'date'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(date, value) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n if (isLeapYear) {\n return value >= 1 && value <= 366;\n } else {\n return value >= 1 && value <= 365;\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(0, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return DayOfYearParser;\n}(Parser);","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function setUTCDay(dirtyDate, dirtyDay, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(2, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n var date = toDate(dirtyDate);\n var day = toInteger(dirtyDay);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Day of week\nexport var DayParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayParser, _Parser);\n var _super = _createSuper(DayParser);\n function DayParser() {\n var _this;\n _classCallCheck(this, DayParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['D', 'i', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(DayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n case 'EEEEE':\n return match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'EEEEEE':\n return match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n case 'EEEE':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return DayParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Local day of week\nexport var LocalDayParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalDayParser, _Parser);\n var _super = _createSuper(LocalDayParser);\n function LocalDayParser() {\n var _this;\n _classCallCheck(this, LocalDayParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']);\n return _this;\n }\n _createClass(LocalDayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match, options) {\n var valueCallback = function valueCallback(value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n switch (token) {\n // 3\n case 'e':\n case 'ee':\n // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n case 'eo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'day'\n }), valueCallback);\n // Tue\n case 'eee':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n case 'eeeee':\n return match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n case 'eeeeee':\n return match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n case 'eeee':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return LocalDayParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Stand-alone local day of week\nexport var StandAloneLocalDayParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneLocalDayParser, _Parser);\n var _super = _createSuper(StandAloneLocalDayParser);\n function StandAloneLocalDayParser() {\n var _this;\n _classCallCheck(this, StandAloneLocalDayParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'e', 't', 'T']);\n return _this;\n }\n _createClass(StandAloneLocalDayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match, options) {\n var valueCallback = function valueCallback(value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n switch (token) {\n // 3\n case 'c':\n case 'cc':\n // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n case 'co':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'day'\n }), valueCallback);\n // Tue\n case 'ccc':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // T\n case 'ccccc':\n return match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n case 'cccccc':\n return match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tuesday\n case 'cccc':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return StandAloneLocalDayParser;\n}(Parser);","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nexport default function setUTCISODay(dirtyDate, dirtyDay) {\n requiredArgs(2, arguments);\n var day = toInteger(dirtyDay);\n if (day % 7 === 0) {\n day = day - 7;\n }\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCISODay from \"../../../_lib/setUTCISODay/index.js\"; // ISO day of week\nexport var ISODayParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISODayParser, _Parser);\n var _super = _createSuper(ISODayParser);\n function ISODayParser() {\n var _this;\n _classCallCheck(this, ISODayParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']);\n return _this;\n }\n _createClass(ISODayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n if (value === 0) {\n return 7;\n }\n return value;\n };\n switch (token) {\n // 2\n case 'i':\n case 'ii':\n // 02\n return parseNDigits(token.length, dateString);\n // 2nd\n case 'io':\n return match.ordinalNumber(dateString, {\n unit: 'day'\n });\n // Tue\n case 'iii':\n return mapValue(match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // T\n case 'iiiii':\n return mapValue(match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // Tu\n case 'iiiiii':\n return mapValue(match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // Tuesday\n case 'iiii':\n default:\n return mapValue(match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 7;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date = setUTCISODay(date, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n return ISODayParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport var AMPMParser = /*#__PURE__*/function (_Parser) {\n _inherits(AMPMParser, _Parser);\n var _super = _createSuper(AMPMParser);\n function AMPMParser() {\n var _this;\n _classCallCheck(this, AMPMParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['b', 'B', 'H', 'k', 't', 'T']);\n return _this;\n }\n _createClass(AMPMParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'aaaaa':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'aaaa':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n return AMPMParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport var AMPMMidnightParser = /*#__PURE__*/function (_Parser) {\n _inherits(AMPMMidnightParser, _Parser);\n var _super = _createSuper(AMPMMidnightParser);\n function AMPMMidnightParser() {\n var _this;\n _classCallCheck(this, AMPMMidnightParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'B', 'H', 'k', 't', 'T']);\n return _this;\n }\n _createClass(AMPMMidnightParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'bbbbb':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'bbbb':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n return AMPMMidnightParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\"; // in the morning, in the afternoon, in the evening, at night\nexport var DayPeriodParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayPeriodParser, _Parser);\n var _super = _createSuper(DayPeriodParser);\n function DayPeriodParser() {\n var _this;\n _classCallCheck(this, DayPeriodParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 't', 'T']);\n return _this;\n }\n _createClass(DayPeriodParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'BBBBB':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n case 'BBBB':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n return DayPeriodParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour1to12Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour1to12Parser, _Parser);\n var _super = _createSuper(Hour1to12Parser);\n function Hour1to12Parser() {\n var _this;\n _classCallCheck(this, Hour1to12Parser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['H', 'K', 'k', 't', 'T']);\n return _this;\n }\n _createClass(Hour1to12Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'h':\n return parseNumericPattern(numericPatterns.hour12h, dateString);\n case 'ho':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 12;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var isPM = date.getUTCHours() >= 12;\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setUTCHours(0, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n return date;\n }\n }]);\n return Hour1to12Parser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour0to23Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour0to23Parser, _Parser);\n var _super = _createSuper(Hour0to23Parser);\n function Hour0to23Parser() {\n var _this;\n _classCallCheck(this, Hour0to23Parser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 'h', 'K', 'k', 't', 'T']);\n return _this;\n }\n _createClass(Hour0to23Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'H':\n return parseNumericPattern(numericPatterns.hour23h, dateString);\n case 'Ho':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 23;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(value, 0, 0, 0);\n return date;\n }\n }]);\n return Hour0to23Parser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour0To11Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour0To11Parser, _Parser);\n var _super = _createSuper(Hour0To11Parser);\n function Hour0To11Parser() {\n var _this;\n _classCallCheck(this, Hour0To11Parser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['h', 'H', 'k', 't', 'T']);\n return _this;\n }\n _createClass(Hour0To11Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'K':\n return parseNumericPattern(numericPatterns.hour11h, dateString);\n case 'Ko':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var isPM = date.getUTCHours() >= 12;\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n return date;\n }\n }]);\n return Hour0To11Parser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour1To24Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour1To24Parser, _Parser);\n var _super = _createSuper(Hour1To24Parser);\n function Hour1To24Parser() {\n var _this;\n _classCallCheck(this, Hour1To24Parser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 'h', 'H', 'K', 't', 'T']);\n return _this;\n }\n _createClass(Hour1To24Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'k':\n return parseNumericPattern(numericPatterns.hour24h, dateString);\n case 'ko':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 24;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var hours = value <= 24 ? value % 24 : value;\n date.setUTCHours(hours, 0, 0, 0);\n return date;\n }\n }]);\n return Hour1To24Parser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var MinuteParser = /*#__PURE__*/function (_Parser) {\n _inherits(MinuteParser, _Parser);\n var _super = _createSuper(MinuteParser);\n function MinuteParser() {\n var _this;\n _classCallCheck(this, MinuteParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 60);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n return _this;\n }\n _createClass(MinuteParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'm':\n return parseNumericPattern(numericPatterns.minute, dateString);\n case 'mo':\n return match.ordinalNumber(dateString, {\n unit: 'minute'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMinutes(value, 0, 0);\n return date;\n }\n }]);\n return MinuteParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var SecondParser = /*#__PURE__*/function (_Parser) {\n _inherits(SecondParser, _Parser);\n var _super = _createSuper(SecondParser);\n function SecondParser() {\n var _this;\n _classCallCheck(this, SecondParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 50);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n return _this;\n }\n _createClass(SecondParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 's':\n return parseNumericPattern(numericPatterns.second, dateString);\n case 'so':\n return match.ordinalNumber(dateString, {\n unit: 'second'\n });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCSeconds(value, 0);\n return date;\n }\n }]);\n return SecondParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nexport var FractionOfSecondParser = /*#__PURE__*/function (_Parser) {\n _inherits(FractionOfSecondParser, _Parser);\n var _super = _createSuper(FractionOfSecondParser);\n function FractionOfSecondParser() {\n var _this;\n _classCallCheck(this, FractionOfSecondParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 30);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n return _this;\n }\n _createClass(FractionOfSecondParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n var valueCallback = function valueCallback(value) {\n return Math.floor(value * Math.pow(10, -token.length + 3));\n };\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMilliseconds(value);\n return date;\n }\n }]);\n return FractionOfSecondParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601. +00:00 is `'Z'`)\nexport var ISOTimezoneWithZParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOTimezoneWithZParser, _Parser);\n var _super = _createSuper(ISOTimezoneWithZParser);\n function ISOTimezoneWithZParser() {\n var _this;\n _classCallCheck(this, ISOTimezoneWithZParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 10);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T', 'x']);\n return _this;\n }\n _createClass(ISOTimezoneWithZParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n switch (token) {\n case 'X':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n case 'XX':\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n case 'XXXX':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n case 'XXXXX':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n case 'XXX':\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n if (flags.timestampIsSet) {\n return date;\n }\n return new Date(date.getTime() - value);\n }\n }]);\n return ISOTimezoneWithZParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601)\nexport var ISOTimezoneParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOTimezoneParser, _Parser);\n var _super = _createSuper(ISOTimezoneParser);\n function ISOTimezoneParser() {\n var _this;\n _classCallCheck(this, ISOTimezoneParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 10);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T', 'X']);\n return _this;\n }\n _createClass(ISOTimezoneParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n switch (token) {\n case 'x':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n case 'xx':\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n case 'xxxx':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n case 'xxxxx':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n case 'xxx':\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n if (flags.timestampIsSet) {\n return date;\n }\n return new Date(date.getTime() - value);\n }\n }]);\n return ISOTimezoneParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport var TimestampSecondsParser = /*#__PURE__*/function (_Parser) {\n _inherits(TimestampSecondsParser, _Parser);\n var _super = _createSuper(TimestampSecondsParser);\n function TimestampSecondsParser() {\n var _this;\n _classCallCheck(this, TimestampSecondsParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 40);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", '*');\n return _this;\n }\n _createClass(TimestampSecondsParser, [{\n key: \"parse\",\n value: function parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n return [new Date(value * 1000), {\n timestampIsSet: true\n }];\n }\n }]);\n return TimestampSecondsParser;\n}(Parser);","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport var TimestampMillisecondsParser = /*#__PURE__*/function (_Parser) {\n _inherits(TimestampMillisecondsParser, _Parser);\n var _super = _createSuper(TimestampMillisecondsParser);\n function TimestampMillisecondsParser() {\n var _this;\n _classCallCheck(this, TimestampMillisecondsParser);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"priority\", 20);\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", '*');\n return _this;\n }\n _createClass(TimestampMillisecondsParser, [{\n key: \"parse\",\n value: function parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n return [new Date(value), {\n timestampIsSet: true\n }];\n }\n }]);\n return TimestampMillisecondsParser;\n}(Parser);","import { EraParser } from \"./EraParser.js\";\nimport { YearParser } from \"./YearParser.js\";\nimport { LocalWeekYearParser } from \"./LocalWeekYearParser.js\";\nimport { ISOWeekYearParser } from \"./ISOWeekYearParser.js\";\nimport { ExtendedYearParser } from \"./ExtendedYearParser.js\";\nimport { QuarterParser } from \"./QuarterParser.js\";\nimport { StandAloneQuarterParser } from \"./StandAloneQuarterParser.js\";\nimport { MonthParser } from \"./MonthParser.js\";\nimport { StandAloneMonthParser } from \"./StandAloneMonthParser.js\";\nimport { LocalWeekParser } from \"./LocalWeekParser.js\";\nimport { ISOWeekParser } from \"./ISOWeekParser.js\";\nimport { DateParser } from \"./DateParser.js\";\nimport { DayOfYearParser } from \"./DayOfYearParser.js\";\nimport { DayParser } from \"./DayParser.js\";\nimport { LocalDayParser } from \"./LocalDayParser.js\";\nimport { StandAloneLocalDayParser } from \"./StandAloneLocalDayParser.js\";\nimport { ISODayParser } from \"./ISODayParser.js\";\nimport { AMPMParser } from \"./AMPMParser.js\";\nimport { AMPMMidnightParser } from \"./AMPMMidnightParser.js\";\nimport { DayPeriodParser } from \"./DayPeriodParser.js\";\nimport { Hour1to12Parser } from \"./Hour1to12Parser.js\";\nimport { Hour0to23Parser } from \"./Hour0to23Parser.js\";\nimport { Hour0To11Parser } from \"./Hour0To11Parser.js\";\nimport { Hour1To24Parser } from \"./Hour1To24Parser.js\";\nimport { MinuteParser } from \"./MinuteParser.js\";\nimport { SecondParser } from \"./SecondParser.js\";\nimport { FractionOfSecondParser } from \"./FractionOfSecondParser.js\";\nimport { ISOTimezoneWithZParser } from \"./ISOTimezoneWithZParser.js\";\nimport { ISOTimezoneParser } from \"./ISOTimezoneParser.js\";\nimport { TimestampSecondsParser } from \"./TimestampSecondsParser.js\";\nimport { TimestampMillisecondsParser } from \"./TimestampMillisecondsParser.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\nexport var parsers = {\n G: new EraParser(),\n y: new YearParser(),\n Y: new LocalWeekYearParser(),\n R: new ISOWeekYearParser(),\n u: new ExtendedYearParser(),\n Q: new QuarterParser(),\n q: new StandAloneQuarterParser(),\n M: new MonthParser(),\n L: new StandAloneMonthParser(),\n w: new LocalWeekParser(),\n I: new ISOWeekParser(),\n d: new DateParser(),\n D: new DayOfYearParser(),\n E: new DayParser(),\n e: new LocalDayParser(),\n c: new StandAloneLocalDayParser(),\n i: new ISODayParser(),\n a: new AMPMParser(),\n b: new AMPMMidnightParser(),\n B: new DayPeriodParser(),\n h: new Hour1to12Parser(),\n H: new Hour0to23Parser(),\n K: new Hour0To11Parser(),\n k: new Hour1To24Parser(),\n m: new MinuteParser(),\n s: new SecondParser(),\n S: new FractionOfSecondParser(),\n X: new ISOTimezoneWithZParser(),\n x: new ISOTimezoneParser(),\n t: new TimestampSecondsParser(),\n T: new TimestampMillisecondsParser()\n};","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _createForOfIteratorHelper from \"@babel/runtime/helpers/esm/createForOfIteratorHelper\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { DateToSystemTimezoneSetter } from \"./_lib/Setter.js\";\nimport { parsers } from \"./_lib/parsers/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar notWhitespaceRegExp = /\\S/;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 7 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Sun | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Seconds timestamp | 40 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Fraction of second | 30 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Milliseconds timestamp | 20 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Long localized date | NA | P | 05/29/1453 | 5,8 |\n * | | | PP | May 29, 1453 | |\n * | | | PPP | May 29th, 1453 | |\n * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |\n * | Long localized time | NA | p | 12:00 AM | 5,8 |\n * | | | pp | 12:00:00 AM | |\n * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |\n * | | | PPpp | May 29, 1453, 12:00:00 AM | |\n * | | | PPPpp | May 29th, 1453 at ... | |\n * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear}\n * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n * on the given locale.\n *\n * using `en-US` locale: `P` => `MM/dd/yyyy`\n * using `en-US` locale: `p` => `hh:mm a`\n * using `pt-BR` locale: `P` => `dd/MM/yyyy`\n * using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {String} dateString - the string to parse\n * @param {String} formatString - the string of tokens\n * @param {Date|Number} referenceDate - defines values missing from the parsed dateString\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {Date} the parsed date\n * @throws {TypeError} 3 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n * locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\nexport default function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n requiredArgs(3, arguments);\n var dateString = String(dirtyDateString);\n var formatString = String(dirtyFormatString);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n if (!locale.match) {\n throw new RangeError('locale must contain match property');\n }\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n if (formatString === '') {\n if (dateString === '') {\n return toDate(dirtyReferenceDate);\n } else {\n return new Date(NaN);\n }\n }\n var subFnOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale\n };\n\n // If timezone isn't specified, it will be set to the system timezone\n var setters = [new DateToSystemTimezoneSetter()];\n var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n if (firstCharacter in longFormatters) {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n }).join('').match(formattingTokensRegExp);\n var usedTokens = [];\n var _iterator = _createForOfIteratorHelper(tokens),\n _step;\n try {\n var _loop = function _loop() {\n var token = _step.value;\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n var firstCharacter = token[0];\n var parser = parsers[firstCharacter];\n if (parser) {\n var incompatibleTokens = parser.incompatibleTokens;\n if (Array.isArray(incompatibleTokens)) {\n var incompatibleToken = usedTokens.find(function (usedToken) {\n return incompatibleTokens.includes(usedToken.token) || usedToken.token === firstCharacter;\n });\n if (incompatibleToken) {\n throw new RangeError(\"The format string mustn't contain `\".concat(incompatibleToken.fullToken, \"` and `\").concat(token, \"` at the same time\"));\n }\n } else if (parser.incompatibleTokens === '*' && usedTokens.length > 0) {\n throw new RangeError(\"The format string mustn't contain `\".concat(token, \"` and any other token at the same time\"));\n }\n usedTokens.push({\n token: firstCharacter,\n fullToken: token\n });\n var parseResult = parser.run(dateString, token, locale.match, subFnOptions);\n if (!parseResult) {\n return {\n v: new Date(NaN)\n };\n }\n setters.push(parseResult.setter);\n dateString = parseResult.rest;\n } else {\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n // Replace two single quote characters with one single quote character\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString(token);\n }\n\n // Cut token from string, or, if string doesn't match the token, return Invalid Date\n if (dateString.indexOf(token) === 0) {\n dateString = dateString.slice(token.length);\n } else {\n return {\n v: new Date(NaN)\n };\n }\n }\n };\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ret = _loop();\n if (_typeof(_ret) === \"object\") return _ret.v;\n }\n\n // Check if the remaining input contains something other than whitespace\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {\n return new Date(NaN);\n }\n var uniquePrioritySetters = setters.map(function (setter) {\n return setter.priority;\n }).sort(function (a, b) {\n return b - a;\n }).filter(function (priority, index, array) {\n return array.indexOf(priority) === index;\n }).map(function (priority) {\n return setters.filter(function (setter) {\n return setter.priority === priority;\n }).sort(function (a, b) {\n return b.subPriority - a.subPriority;\n });\n }).map(function (setterArray) {\n return setterArray[0];\n });\n var date = toDate(dirtyReferenceDate);\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n var utcDate = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));\n var flags = {};\n var _iterator2 = _createForOfIteratorHelper(uniquePrioritySetters),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var setter = _step2.value;\n if (!setter.validate(utcDate, subFnOptions)) {\n return new Date(NaN);\n }\n var result = setter.set(utcDate, flags, subFnOptions);\n // Result is tuple (date, flags)\n if (Array.isArray(result)) {\n utcDate = result[0];\n assign(flags, result[1]);\n // Result is date\n } else {\n utcDate = result;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n return utcDate;\n}\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\");\n // eslint-disable-next-line no-console\n console.warn(new Error().stack);\n }\n return new Date(NaN);\n }\n}","/**\n* Muuri v0.9.5\n* https://muuri.dev/\n* Copyright (c) 2015-present, Haltu Oy\n* Released under the MIT license\n* https://github.com/haltu/muuri/blob/master/LICENSE.md\n* @license MIT\n*\n* Muuri Packer\n* Copyright (c) 2016-present, Niklas Rämö <inramo@gmail.com>\n* @license MIT\n*\n* Muuri Ticker / Muuri Emitter / Muuri Dragger\n* Copyright (c) 2018-present, Niklas Rämö <inramo@gmail.com>\n* @license MIT\n*\n* Muuri AutoScroller\n* Copyright (c) 2019-present, Niklas Rämö <inramo@gmail.com>\n* @license MIT\n*/\n\nvar GRID_INSTANCES = {};\nvar ITEM_ELEMENT_MAP = typeof Map === 'function' ? new Map() : null;\n\nvar ACTION_SWAP = 'swap';\nvar ACTION_MOVE = 'move';\n\nvar EVENT_SYNCHRONIZE = 'synchronize';\nvar EVENT_LAYOUT_START = 'layoutStart';\nvar EVENT_LAYOUT_END = 'layoutEnd';\nvar EVENT_LAYOUT_ABORT = 'layoutAbort';\nvar EVENT_ADD = 'add';\nvar EVENT_REMOVE = 'remove';\nvar EVENT_SHOW_START = 'showStart';\nvar EVENT_SHOW_END = 'showEnd';\nvar EVENT_HIDE_START = 'hideStart';\nvar EVENT_HIDE_END = 'hideEnd';\nvar EVENT_FILTER = 'filter';\nvar EVENT_SORT = 'sort';\nvar EVENT_MOVE = 'move';\nvar EVENT_SEND = 'send';\nvar EVENT_BEFORE_SEND = 'beforeSend';\nvar EVENT_RECEIVE = 'receive';\nvar EVENT_BEFORE_RECEIVE = 'beforeReceive';\nvar EVENT_DRAG_INIT = 'dragInit';\nvar EVENT_DRAG_START = 'dragStart';\nvar EVENT_DRAG_MOVE = 'dragMove';\nvar EVENT_DRAG_SCROLL = 'dragScroll';\nvar EVENT_DRAG_END = 'dragEnd';\nvar EVENT_DRAG_RELEASE_START = 'dragReleaseStart';\nvar EVENT_DRAG_RELEASE_END = 'dragReleaseEnd';\nvar EVENT_DESTROY = 'destroy';\n\nvar HAS_TOUCH_EVENTS = 'ontouchstart' in window;\nvar HAS_POINTER_EVENTS = !!window.PointerEvent;\nvar HAS_MS_POINTER_EVENTS = !!window.navigator.msPointerEnabled;\n\nvar MAX_SAFE_FLOAT32_INTEGER = 16777216;\n\n/**\n * Event emitter constructor.\n *\n * @class\n */\nfunction Emitter() {\n this._events = {};\n this._queue = [];\n this._counter = 0;\n this._clearOnEmit = false;\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Bind an event listener.\n *\n * @public\n * @param {String} event\n * @param {Function} listener\n * @returns {Emitter}\n */\nEmitter.prototype.on = function (event, listener) {\n if (!this._events || !event || !listener) return this;\n\n // Get listeners queue and create it if it does not exist.\n var listeners = this._events[event];\n if (!listeners) listeners = this._events[event] = [];\n\n // Add the listener to the queue.\n listeners.push(listener);\n\n return this;\n};\n\n/**\n * Unbind all event listeners that match the provided listener function.\n *\n * @public\n * @param {String} event\n * @param {Function} listener\n * @returns {Emitter}\n */\nEmitter.prototype.off = function (event, listener) {\n if (!this._events || !event || !listener) return this;\n\n // Get listeners and return immediately if none is found.\n var listeners = this._events[event];\n if (!listeners || !listeners.length) return this;\n\n // Remove all matching listeners.\n var index;\n while ((index = listeners.indexOf(listener)) !== -1) {\n listeners.splice(index, 1);\n }\n\n return this;\n};\n\n/**\n * Unbind all listeners of the provided event.\n *\n * @public\n * @param {String} event\n * @returns {Emitter}\n */\nEmitter.prototype.clear = function (event) {\n if (!this._events || !event) return this;\n\n var listeners = this._events[event];\n if (listeners) {\n listeners.length = 0;\n delete this._events[event];\n }\n\n return this;\n};\n\n/**\n * Emit all listeners in a specified event with the provided arguments.\n *\n * @public\n * @param {String} event\n * @param {...*} [args]\n * @returns {Emitter}\n */\nEmitter.prototype.emit = function (event) {\n if (!this._events || !event) {\n this._clearOnEmit = false;\n return this;\n }\n\n // Get event listeners and quit early if there's no listeners.\n var listeners = this._events[event];\n if (!listeners || !listeners.length) {\n this._clearOnEmit = false;\n return this;\n }\n\n var queue = this._queue;\n var startIndex = queue.length;\n var argsLength = arguments.length - 1;\n var args;\n\n // If we have more than 3 arguments let's put the arguments in an array and\n // apply it to the listeners.\n if (argsLength > 3) {\n args = [];\n args.push.apply(args, arguments);\n args.shift();\n }\n\n // Add the current listeners to the callback queue before we process them.\n // This is necessary to guarantee that all of the listeners are called in\n // correct order even if new event listeners are removed/added during\n // processing and/or events are emitted during processing.\n queue.push.apply(queue, listeners);\n\n // Reset the event's listeners if need be.\n if (this._clearOnEmit) {\n listeners.length = 0;\n this._clearOnEmit = false;\n }\n\n // Increment queue counter. This is needed for the scenarios where emit is\n // triggered while the queue is already processing. We need to keep track of\n // how many \"queue processors\" there are active so that we can safely reset\n // the queue in the end when the last queue processor is finished.\n ++this._counter;\n\n // Process the queue (the specific part of it for this emit).\n var i = startIndex;\n var endIndex = queue.length;\n for (; i < endIndex; i++) {\n // prettier-ignore\n argsLength === 0 ? queue[i]() :\n argsLength === 1 ? queue[i](arguments[1]) :\n argsLength === 2 ? queue[i](arguments[1], arguments[2]) :\n argsLength === 3 ? queue[i](arguments[1], arguments[2], arguments[3]) :\n queue[i].apply(null, args);\n\n // Stop processing if the emitter is destroyed.\n if (!this._events) return this;\n }\n\n // Decrement queue process counter.\n --this._counter;\n\n // Reset the queue if there are no more queue processes running.\n if (!this._counter) queue.length = 0;\n\n return this;\n};\n\n/**\n * Emit all listeners in a specified event with the provided arguments and\n * remove the event's listeners just before calling the them. This method allows\n * the emitter to serve as a queue where all listeners are called only once.\n *\n * @public\n * @param {String} event\n * @param {...*} [args]\n * @returns {Emitter}\n */\nEmitter.prototype.burst = function () {\n if (!this._events) return this;\n this._clearOnEmit = true;\n this.emit.apply(this, arguments);\n return this;\n};\n\n/**\n * Check how many listeners there are for a specific event.\n *\n * @public\n * @param {String} event\n * @returns {Boolean}\n */\nEmitter.prototype.countListeners = function (event) {\n if (!this._events) return 0;\n var listeners = this._events[event];\n return listeners ? listeners.length : 0;\n};\n\n/**\n * Destroy emitter instance. Basically just removes all bound listeners.\n *\n * @public\n * @returns {Emitter}\n */\nEmitter.prototype.destroy = function () {\n if (!this._events) return this;\n this._queue.length = this._counter = 0;\n this._events = null;\n return this;\n};\n\nvar pointerout = HAS_POINTER_EVENTS ? 'pointerout' : HAS_MS_POINTER_EVENTS ? 'MSPointerOut' : '';\nvar waitDuration = 100;\n\n/**\n * If you happen to use Edge or IE on a touch capable device there is a\n * a specific case where pointercancel and pointerend events are never emitted,\n * even though one them should always be emitted when you release your finger\n * from the screen. The bug appears specifically when Muuri shifts the dragged\n * element's position in the DOM after pointerdown event, IE and Edge don't like\n * that behaviour and quite often forget to emit the pointerend/pointercancel\n * event. But, they do emit pointerout event so we utilize that here.\n * Specifically, if there has been no pointermove event within 100 milliseconds\n * since the last pointerout event we force cancel the drag operation. This hack\n * works surprisingly well 99% of the time. There is that 1% chance there still\n * that dragged items get stuck but it is what it is.\n *\n * @class\n * @param {Dragger} dragger\n */\nfunction EdgeHack(dragger) {\n if (!pointerout) return;\n\n this._dragger = dragger;\n this._timeout = null;\n this._outEvent = null;\n this._isActive = false;\n\n this._addBehaviour = this._addBehaviour.bind(this);\n this._removeBehaviour = this._removeBehaviour.bind(this);\n this._onTimeout = this._onTimeout.bind(this);\n this._resetData = this._resetData.bind(this);\n this._onStart = this._onStart.bind(this);\n this._onOut = this._onOut.bind(this);\n\n this._dragger.on('start', this._onStart);\n}\n\n/**\n * @private\n */\nEdgeHack.prototype._addBehaviour = function () {\n if (this._isActive) return;\n this._isActive = true;\n this._dragger.on('move', this._resetData);\n this._dragger.on('cancel', this._removeBehaviour);\n this._dragger.on('end', this._removeBehaviour);\n window.addEventListener(pointerout, this._onOut);\n};\n\n/**\n * @private\n */\nEdgeHack.prototype._removeBehaviour = function () {\n if (!this._isActive) return;\n this._dragger.off('move', this._resetData);\n this._dragger.off('cancel', this._removeBehaviour);\n this._dragger.off('end', this._removeBehaviour);\n window.removeEventListener(pointerout, this._onOut);\n this._resetData();\n this._isActive = false;\n};\n\n/**\n * @private\n */\nEdgeHack.prototype._resetData = function () {\n window.clearTimeout(this._timeout);\n this._timeout = null;\n this._outEvent = null;\n};\n\n/**\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nEdgeHack.prototype._onStart = function (e) {\n if (e.pointerType === 'mouse') return;\n this._addBehaviour();\n};\n\n/**\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nEdgeHack.prototype._onOut = function (e) {\n if (!this._dragger._getTrackedTouch(e)) return;\n this._resetData();\n this._outEvent = e;\n this._timeout = window.setTimeout(this._onTimeout, waitDuration);\n};\n\n/**\n * @private\n */\nEdgeHack.prototype._onTimeout = function () {\n var e = this._outEvent;\n this._resetData();\n if (this._dragger.isActive()) this._dragger._onCancel(e);\n};\n\n/**\n * @public\n */\nEdgeHack.prototype.destroy = function () {\n if (!pointerout) return;\n this._dragger.off('start', this._onStart);\n this._removeBehaviour();\n};\n\n// Playing it safe here, test all potential prefixes capitalized and lowercase.\nvar vendorPrefixes = ['', 'webkit', 'moz', 'ms', 'o', 'Webkit', 'Moz', 'MS', 'O'];\nvar cache$2 = {};\n\n/**\n * Get prefixed CSS property name when given a non-prefixed CSS property name.\n * Returns null if the property is not supported at all.\n *\n * @param {CSSStyleDeclaration} style\n * @param {String} prop\n * @returns {String}\n */\nfunction getPrefixedPropName(style, prop) {\n var prefixedProp = cache$2[prop] || '';\n if (prefixedProp) return prefixedProp;\n\n var camelProp = prop[0].toUpperCase() + prop.slice(1);\n var i = 0;\n while (i < vendorPrefixes.length) {\n prefixedProp = vendorPrefixes[i] ? vendorPrefixes[i] + camelProp : prop;\n if (prefixedProp in style) {\n cache$2[prop] = prefixedProp;\n return prefixedProp;\n }\n ++i;\n }\n\n return '';\n}\n\n/**\n * Check if passive events are supported.\n * https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n *\n * @returns {Boolean}\n */\nfunction hasPassiveEvents() {\n var isPassiveEventsSupported = false;\n\n try {\n var passiveOpts = Object.defineProperty({}, 'passive', {\n get: function () {\n isPassiveEventsSupported = true;\n },\n });\n window.addEventListener('testPassive', null, passiveOpts);\n window.removeEventListener('testPassive', null, passiveOpts);\n } catch (e) {}\n\n return isPassiveEventsSupported;\n}\n\nvar ua = window.navigator.userAgent.toLowerCase();\nvar isEdge = ua.indexOf('edge') > -1;\nvar isIE = ua.indexOf('trident') > -1;\nvar isFirefox = ua.indexOf('firefox') > -1;\nvar isAndroid = ua.indexOf('android') > -1;\n\nvar listenerOptions = hasPassiveEvents() ? { passive: true } : false;\n\nvar taProp = 'touchAction';\nvar taPropPrefixed = getPrefixedPropName(document.documentElement.style, taProp);\nvar taDefaultValue = 'auto';\n\n/**\n * Creates a new Dragger instance for an element.\n *\n * @public\n * @class\n * @param {HTMLElement} element\n * @param {Object} [cssProps]\n */\nfunction Dragger(element, cssProps) {\n this._element = element;\n this._emitter = new Emitter();\n this._isDestroyed = false;\n this._cssProps = {};\n this._touchAction = '';\n this._isActive = false;\n\n this._pointerId = null;\n this._startTime = 0;\n this._startX = 0;\n this._startY = 0;\n this._currentX = 0;\n this._currentY = 0;\n\n this._onStart = this._onStart.bind(this);\n this._onMove = this._onMove.bind(this);\n this._onCancel = this._onCancel.bind(this);\n this._onEnd = this._onEnd.bind(this);\n\n // Can't believe had to build a freaking class for a hack!\n this._edgeHack = null;\n if ((isEdge || isIE) && (HAS_POINTER_EVENTS || HAS_MS_POINTER_EVENTS)) {\n this._edgeHack = new EdgeHack(this);\n }\n\n // Apply initial CSS props.\n this.setCssProps(cssProps);\n\n // If touch action was not provided with initial CSS props let's assume it's\n // auto.\n if (!this._touchAction) {\n this.setTouchAction(taDefaultValue);\n }\n\n // Prevent native link/image dragging for the item and it's children.\n element.addEventListener('dragstart', Dragger._preventDefault, false);\n\n // Listen to start event.\n element.addEventListener(Dragger._inputEvents.start, this._onStart, listenerOptions);\n}\n\n/**\n * Protected properties\n * ********************\n */\n\nDragger._pointerEvents = {\n start: 'pointerdown',\n move: 'pointermove',\n cancel: 'pointercancel',\n end: 'pointerup',\n};\n\nDragger._msPointerEvents = {\n start: 'MSPointerDown',\n move: 'MSPointerMove',\n cancel: 'MSPointerCancel',\n end: 'MSPointerUp',\n};\n\nDragger._touchEvents = {\n start: 'touchstart',\n move: 'touchmove',\n cancel: 'touchcancel',\n end: 'touchend',\n};\n\nDragger._mouseEvents = {\n start: 'mousedown',\n move: 'mousemove',\n cancel: '',\n end: 'mouseup',\n};\n\nDragger._inputEvents = (function () {\n if (HAS_TOUCH_EVENTS) return Dragger._touchEvents;\n if (HAS_POINTER_EVENTS) return Dragger._pointerEvents;\n if (HAS_MS_POINTER_EVENTS) return Dragger._msPointerEvents;\n return Dragger._mouseEvents;\n})();\n\nDragger._emitter = new Emitter();\n\nDragger._emitterEvents = {\n start: 'start',\n move: 'move',\n end: 'end',\n cancel: 'cancel',\n};\n\nDragger._activeInstances = [];\n\n/**\n * Protected static methods\n * ************************\n */\n\nDragger._preventDefault = function (e) {\n if (e.preventDefault && e.cancelable !== false) e.preventDefault();\n};\n\nDragger._activateInstance = function (instance) {\n var index = Dragger._activeInstances.indexOf(instance);\n if (index > -1) return;\n\n Dragger._activeInstances.push(instance);\n Dragger._emitter.on(Dragger._emitterEvents.move, instance._onMove);\n Dragger._emitter.on(Dragger._emitterEvents.cancel, instance._onCancel);\n Dragger._emitter.on(Dragger._emitterEvents.end, instance._onEnd);\n\n if (Dragger._activeInstances.length === 1) {\n Dragger._bindListeners();\n }\n};\n\nDragger._deactivateInstance = function (instance) {\n var index = Dragger._activeInstances.indexOf(instance);\n if (index === -1) return;\n\n Dragger._activeInstances.splice(index, 1);\n Dragger._emitter.off(Dragger._emitterEvents.move, instance._onMove);\n Dragger._emitter.off(Dragger._emitterEvents.cancel, instance._onCancel);\n Dragger._emitter.off(Dragger._emitterEvents.end, instance._onEnd);\n\n if (!Dragger._activeInstances.length) {\n Dragger._unbindListeners();\n }\n};\n\nDragger._bindListeners = function () {\n window.addEventListener(Dragger._inputEvents.move, Dragger._onMove, listenerOptions);\n window.addEventListener(Dragger._inputEvents.end, Dragger._onEnd, listenerOptions);\n if (Dragger._inputEvents.cancel) {\n window.addEventListener(Dragger._inputEvents.cancel, Dragger._onCancel, listenerOptions);\n }\n};\n\nDragger._unbindListeners = function () {\n window.removeEventListener(Dragger._inputEvents.move, Dragger._onMove, listenerOptions);\n window.removeEventListener(Dragger._inputEvents.end, Dragger._onEnd, listenerOptions);\n if (Dragger._inputEvents.cancel) {\n window.removeEventListener(Dragger._inputEvents.cancel, Dragger._onCancel, listenerOptions);\n }\n};\n\nDragger._getEventPointerId = function (event) {\n // If we have pointer id available let's use it.\n if (typeof event.pointerId === 'number') {\n return event.pointerId;\n }\n\n // For touch events let's get the first changed touch's identifier.\n if (event.changedTouches) {\n return event.changedTouches[0] ? event.changedTouches[0].identifier : null;\n }\n\n // For mouse/other events let's provide a static id.\n return 1;\n};\n\nDragger._getTouchById = function (event, id) {\n // If we have a pointer event return the whole event if there's a match, and\n // null otherwise.\n if (typeof event.pointerId === 'number') {\n return event.pointerId === id ? event : null;\n }\n\n // For touch events let's check if there's a changed touch object that matches\n // the pointerId in which case return the touch object.\n if (event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i++) {\n if (event.changedTouches[i].identifier === id) {\n return event.changedTouches[i];\n }\n }\n return null;\n }\n\n // For mouse/other events let's assume there's only one pointer and just\n // return the event.\n return event;\n};\n\nDragger._onMove = function (e) {\n Dragger._emitter.emit(Dragger._emitterEvents.move, e);\n};\n\nDragger._onCancel = function (e) {\n Dragger._emitter.emit(Dragger._emitterEvents.cancel, e);\n};\n\nDragger._onEnd = function (e) {\n Dragger._emitter.emit(Dragger._emitterEvents.end, e);\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Reset current drag operation (if any).\n *\n * @private\n */\nDragger.prototype._reset = function () {\n this._pointerId = null;\n this._startTime = 0;\n this._startX = 0;\n this._startY = 0;\n this._currentX = 0;\n this._currentY = 0;\n this._isActive = false;\n Dragger._deactivateInstance(this);\n};\n\n/**\n * Create a custom dragger event from a raw event.\n *\n * @private\n * @param {String} type\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n * @returns {Object}\n */\nDragger.prototype._createEvent = function (type, e) {\n var touch = this._getTrackedTouch(e);\n return {\n // Hammer.js compatibility interface.\n type: type,\n srcEvent: e,\n distance: this.getDistance(),\n deltaX: this.getDeltaX(),\n deltaY: this.getDeltaY(),\n deltaTime: type === Dragger._emitterEvents.start ? 0 : this.getDeltaTime(),\n isFirst: type === Dragger._emitterEvents.start,\n isFinal: type === Dragger._emitterEvents.end || type === Dragger._emitterEvents.cancel,\n pointerType: e.pointerType || (e.touches ? 'touch' : 'mouse'),\n // Partial Touch API interface.\n identifier: this._pointerId,\n screenX: touch.screenX,\n screenY: touch.screenY,\n clientX: touch.clientX,\n clientY: touch.clientY,\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target,\n };\n};\n\n/**\n * Emit a raw event as dragger event internally.\n *\n * @private\n * @param {String} type\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._emit = function (type, e) {\n this._emitter.emit(type, this._createEvent(type, e));\n};\n\n/**\n * If the provided event is a PointerEvent this method will return it if it has\n * the same pointerId as the instance. If the provided event is a TouchEvent\n * this method will try to look for a Touch instance in the changedTouches that\n * has an identifier matching this instance's pointerId. If the provided event\n * is a MouseEvent (or just any other event than PointerEvent or TouchEvent)\n * it will be returned immediately.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n * @returns {?(Touch|PointerEvent|MouseEvent)}\n */\nDragger.prototype._getTrackedTouch = function (e) {\n if (this._pointerId === null) return null;\n return Dragger._getTouchById(e, this._pointerId);\n};\n\n/**\n * Handler for start event.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._onStart = function (e) {\n if (this._isDestroyed) return;\n\n // If pointer id is already assigned let's return early.\n if (this._pointerId !== null) return;\n\n // Get (and set) pointer id.\n this._pointerId = Dragger._getEventPointerId(e);\n if (this._pointerId === null) return;\n\n // Setup initial data and emit start event.\n var touch = this._getTrackedTouch(e);\n this._startX = this._currentX = touch.clientX;\n this._startY = this._currentY = touch.clientY;\n this._startTime = Date.now();\n this._isActive = true;\n this._emit(Dragger._emitterEvents.start, e);\n\n // If the drag procedure was not reset within the start procedure let's\n // activate the instance (start listening to move/cancel/end events).\n if (this._isActive) {\n Dragger._activateInstance(this);\n }\n};\n\n/**\n * Handler for move event.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._onMove = function (e) {\n var touch = this._getTrackedTouch(e);\n if (!touch) return;\n this._currentX = touch.clientX;\n this._currentY = touch.clientY;\n this._emit(Dragger._emitterEvents.move, e);\n};\n\n/**\n * Handler for cancel event.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._onCancel = function (e) {\n if (!this._getTrackedTouch(e)) return;\n this._emit(Dragger._emitterEvents.cancel, e);\n this._reset();\n};\n\n/**\n * Handler for end event.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._onEnd = function (e) {\n if (!this._getTrackedTouch(e)) return;\n this._emit(Dragger._emitterEvents.end, e);\n this._reset();\n};\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Check if the element is being dragged at the moment.\n *\n * @public\n * @returns {Boolean}\n */\nDragger.prototype.isActive = function () {\n return this._isActive;\n};\n\n/**\n * Set element's touch-action CSS property.\n *\n * @public\n * @param {String} value\n */\nDragger.prototype.setTouchAction = function (value) {\n // Store unmodified touch action value (we trust user input here).\n this._touchAction = value;\n\n // Set touch-action style.\n if (taPropPrefixed) {\n this._cssProps[taPropPrefixed] = '';\n this._element.style[taPropPrefixed] = value;\n }\n\n // If we have an unsupported touch-action value let's add a special listener\n // that prevents default action on touch start event. A dirty hack, but best\n // we can do for now. The other options would be to somehow polyfill the\n // unsupported touch action behavior with custom heuristics which sounds like\n // a can of worms. We do a special exception here for Firefox Android which's\n // touch-action does not work properly if the dragged element is moved in the\n // the DOM tree on touchstart.\n if (HAS_TOUCH_EVENTS) {\n this._element.removeEventListener(Dragger._touchEvents.start, Dragger._preventDefault, true);\n if (this._element.style[taPropPrefixed] !== value || (isFirefox && isAndroid)) {\n this._element.addEventListener(Dragger._touchEvents.start, Dragger._preventDefault, true);\n }\n }\n};\n\n/**\n * Update element's CSS properties. Accepts an object with camel cased style\n * props with value pairs as it's first argument.\n *\n * @public\n * @param {Object} [newProps]\n */\nDragger.prototype.setCssProps = function (newProps) {\n if (!newProps) return;\n\n var currentProps = this._cssProps;\n var element = this._element;\n var prop;\n var prefixedProp;\n\n // Reset current props.\n for (prop in currentProps) {\n element.style[prop] = currentProps[prop];\n delete currentProps[prop];\n }\n\n // Set new props.\n for (prop in newProps) {\n // Make sure we have a value for the prop.\n if (!newProps[prop]) continue;\n\n // Special handling for touch-action.\n if (prop === taProp) {\n this.setTouchAction(newProps[prop]);\n continue;\n }\n\n // Get prefixed prop and skip if it does not exist.\n prefixedProp = getPrefixedPropName(element.style, prop);\n if (!prefixedProp) continue;\n\n // Store the prop and add the style.\n currentProps[prefixedProp] = '';\n element.style[prefixedProp] = newProps[prop];\n }\n};\n\n/**\n * How much the pointer has moved on x-axis from start position, in pixels.\n * Positive value indicates movement from left to right.\n *\n * @public\n * @returns {Number}\n */\nDragger.prototype.getDeltaX = function () {\n return this._currentX - this._startX;\n};\n\n/**\n * How much the pointer has moved on y-axis from start position, in pixels.\n * Positive value indicates movement from top to bottom.\n *\n * @public\n * @returns {Number}\n */\nDragger.prototype.getDeltaY = function () {\n return this._currentY - this._startY;\n};\n\n/**\n * How far (in pixels) has pointer moved from start position.\n *\n * @public\n * @returns {Number}\n */\nDragger.prototype.getDistance = function () {\n var x = this.getDeltaX();\n var y = this.getDeltaY();\n return Math.sqrt(x * x + y * y);\n};\n\n/**\n * How long has pointer been dragged.\n *\n * @public\n * @returns {Number}\n */\nDragger.prototype.getDeltaTime = function () {\n return this._startTime ? Date.now() - this._startTime : 0;\n};\n\n/**\n * Bind drag event listeners.\n *\n * @public\n * @param {String} eventName\n * - 'start', 'move', 'cancel' or 'end'.\n * @param {Function} listener\n */\nDragger.prototype.on = function (eventName, listener) {\n this._emitter.on(eventName, listener);\n};\n\n/**\n * Unbind drag event listeners.\n *\n * @public\n * @param {String} eventName\n * - 'start', 'move', 'cancel' or 'end'.\n * @param {Function} listener\n */\nDragger.prototype.off = function (eventName, listener) {\n this._emitter.off(eventName, listener);\n};\n\n/**\n * Destroy the instance and unbind all drag event listeners.\n *\n * @public\n */\nDragger.prototype.destroy = function () {\n if (this._isDestroyed) return;\n\n var element = this._element;\n\n if (this._edgeHack) this._edgeHack.destroy();\n\n // Reset data and deactivate the instance.\n this._reset();\n\n // Destroy emitter.\n this._emitter.destroy();\n\n // Unbind event handlers.\n element.removeEventListener(Dragger._inputEvents.start, this._onStart, listenerOptions);\n element.removeEventListener('dragstart', Dragger._preventDefault, false);\n element.removeEventListener(Dragger._touchEvents.start, Dragger._preventDefault, true);\n\n // Reset styles.\n for (var prop in this._cssProps) {\n element.style[prop] = this._cssProps[prop];\n delete this._cssProps[prop];\n }\n\n // Reset data.\n this._element = null;\n\n // Mark as destroyed.\n this._isDestroyed = true;\n};\n\nvar dt = 1000 / 60;\n\nvar raf = (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n function (callback) {\n return this.setTimeout(function () {\n callback(Date.now());\n }, dt);\n }\n).bind(window);\n\n/**\n * A ticker system for handling DOM reads and writes in an efficient way.\n *\n * @class\n */\nfunction Ticker(numLanes) {\n this._nextStep = null;\n this._lanes = [];\n this._stepQueue = [];\n this._stepCallbacks = {};\n this._step = this._step.bind(this);\n for (var i = 0; i < numLanes; i++) {\n this._lanes.push(new TickerLane());\n }\n}\n\nTicker.prototype._step = function (time) {\n var lanes = this._lanes;\n var stepQueue = this._stepQueue;\n var stepCallbacks = this._stepCallbacks;\n var i, j, id, laneQueue, laneCallbacks, laneIndices;\n\n this._nextStep = null;\n\n for (i = 0; i < lanes.length; i++) {\n laneQueue = lanes[i].queue;\n laneCallbacks = lanes[i].callbacks;\n laneIndices = lanes[i].indices;\n for (j = 0; j < laneQueue.length; j++) {\n id = laneQueue[j];\n if (!id) continue;\n stepQueue.push(id);\n stepCallbacks[id] = laneCallbacks[id];\n delete laneCallbacks[id];\n delete laneIndices[id];\n }\n laneQueue.length = 0;\n }\n\n for (i = 0; i < stepQueue.length; i++) {\n id = stepQueue[i];\n if (stepCallbacks[id]) stepCallbacks[id](time);\n delete stepCallbacks[id];\n }\n\n stepQueue.length = 0;\n};\n\nTicker.prototype.add = function (laneIndex, id, callback) {\n this._lanes[laneIndex].add(id, callback);\n if (!this._nextStep) this._nextStep = raf(this._step);\n};\n\nTicker.prototype.remove = function (laneIndex, id) {\n this._lanes[laneIndex].remove(id);\n};\n\n/**\n * A lane for ticker.\n *\n * @class\n */\nfunction TickerLane() {\n this.queue = [];\n this.indices = {};\n this.callbacks = {};\n}\n\nTickerLane.prototype.add = function (id, callback) {\n var index = this.indices[id];\n if (index !== undefined) this.queue[index] = undefined;\n this.queue.push(id);\n this.callbacks[id] = callback;\n this.indices[id] = this.queue.length - 1;\n};\n\nTickerLane.prototype.remove = function (id) {\n var index = this.indices[id];\n if (index === undefined) return;\n this.queue[index] = undefined;\n delete this.callbacks[id];\n delete this.indices[id];\n};\n\nvar LAYOUT_READ = 'layoutRead';\nvar LAYOUT_WRITE = 'layoutWrite';\nvar VISIBILITY_READ = 'visibilityRead';\nvar VISIBILITY_WRITE = 'visibilityWrite';\nvar DRAG_START_READ = 'dragStartRead';\nvar DRAG_START_WRITE = 'dragStartWrite';\nvar DRAG_MOVE_READ = 'dragMoveRead';\nvar DRAG_MOVE_WRITE = 'dragMoveWrite';\nvar DRAG_SCROLL_READ = 'dragScrollRead';\nvar DRAG_SCROLL_WRITE = 'dragScrollWrite';\nvar DRAG_SORT_READ = 'dragSortRead';\nvar PLACEHOLDER_LAYOUT_READ = 'placeholderLayoutRead';\nvar PLACEHOLDER_LAYOUT_WRITE = 'placeholderLayoutWrite';\nvar PLACEHOLDER_RESIZE_WRITE = 'placeholderResizeWrite';\nvar AUTO_SCROLL_READ = 'autoScrollRead';\nvar AUTO_SCROLL_WRITE = 'autoScrollWrite';\nvar DEBOUNCE_READ = 'debounceRead';\n\nvar LANE_READ = 0;\nvar LANE_READ_TAIL = 1;\nvar LANE_WRITE = 2;\n\nvar ticker = new Ticker(3);\n\nfunction addLayoutTick(itemId, read, write) {\n ticker.add(LANE_READ, LAYOUT_READ + itemId, read);\n ticker.add(LANE_WRITE, LAYOUT_WRITE + itemId, write);\n}\n\nfunction cancelLayoutTick(itemId) {\n ticker.remove(LANE_READ, LAYOUT_READ + itemId);\n ticker.remove(LANE_WRITE, LAYOUT_WRITE + itemId);\n}\n\nfunction addVisibilityTick(itemId, read, write) {\n ticker.add(LANE_READ, VISIBILITY_READ + itemId, read);\n ticker.add(LANE_WRITE, VISIBILITY_WRITE + itemId, write);\n}\n\nfunction cancelVisibilityTick(itemId) {\n ticker.remove(LANE_READ, VISIBILITY_READ + itemId);\n ticker.remove(LANE_WRITE, VISIBILITY_WRITE + itemId);\n}\n\nfunction addDragStartTick(itemId, read, write) {\n ticker.add(LANE_READ, DRAG_START_READ + itemId, read);\n ticker.add(LANE_WRITE, DRAG_START_WRITE + itemId, write);\n}\n\nfunction cancelDragStartTick(itemId) {\n ticker.remove(LANE_READ, DRAG_START_READ + itemId);\n ticker.remove(LANE_WRITE, DRAG_START_WRITE + itemId);\n}\n\nfunction addDragMoveTick(itemId, read, write) {\n ticker.add(LANE_READ, DRAG_MOVE_READ + itemId, read);\n ticker.add(LANE_WRITE, DRAG_MOVE_WRITE + itemId, write);\n}\n\nfunction cancelDragMoveTick(itemId) {\n ticker.remove(LANE_READ, DRAG_MOVE_READ + itemId);\n ticker.remove(LANE_WRITE, DRAG_MOVE_WRITE + itemId);\n}\n\nfunction addDragScrollTick(itemId, read, write) {\n ticker.add(LANE_READ, DRAG_SCROLL_READ + itemId, read);\n ticker.add(LANE_WRITE, DRAG_SCROLL_WRITE + itemId, write);\n}\n\nfunction cancelDragScrollTick(itemId) {\n ticker.remove(LANE_READ, DRAG_SCROLL_READ + itemId);\n ticker.remove(LANE_WRITE, DRAG_SCROLL_WRITE + itemId);\n}\n\nfunction addDragSortTick(itemId, read) {\n ticker.add(LANE_READ_TAIL, DRAG_SORT_READ + itemId, read);\n}\n\nfunction cancelDragSortTick(itemId) {\n ticker.remove(LANE_READ_TAIL, DRAG_SORT_READ + itemId);\n}\n\nfunction addPlaceholderLayoutTick(itemId, read, write) {\n ticker.add(LANE_READ, PLACEHOLDER_LAYOUT_READ + itemId, read);\n ticker.add(LANE_WRITE, PLACEHOLDER_LAYOUT_WRITE + itemId, write);\n}\n\nfunction cancelPlaceholderLayoutTick(itemId) {\n ticker.remove(LANE_READ, PLACEHOLDER_LAYOUT_READ + itemId);\n ticker.remove(LANE_WRITE, PLACEHOLDER_LAYOUT_WRITE + itemId);\n}\n\nfunction addPlaceholderResizeTick(itemId, write) {\n ticker.add(LANE_WRITE, PLACEHOLDER_RESIZE_WRITE + itemId, write);\n}\n\nfunction cancelPlaceholderResizeTick(itemId) {\n ticker.remove(LANE_WRITE, PLACEHOLDER_RESIZE_WRITE + itemId);\n}\n\nfunction addAutoScrollTick(read, write) {\n ticker.add(LANE_READ, AUTO_SCROLL_READ, read);\n ticker.add(LANE_WRITE, AUTO_SCROLL_WRITE, write);\n}\n\nfunction cancelAutoScrollTick() {\n ticker.remove(LANE_READ, AUTO_SCROLL_READ);\n ticker.remove(LANE_WRITE, AUTO_SCROLL_WRITE);\n}\n\nfunction addDebounceTick(debounceId, read) {\n ticker.add(LANE_READ, DEBOUNCE_READ + debounceId, read);\n}\n\nfunction cancelDebounceTick(debounceId) {\n ticker.remove(LANE_READ, DEBOUNCE_READ + debounceId);\n}\n\nvar AXIS_X = 1;\nvar AXIS_Y = 2;\nvar FORWARD = 4;\nvar BACKWARD = 8;\nvar LEFT = AXIS_X | BACKWARD;\nvar RIGHT = AXIS_X | FORWARD;\nvar UP = AXIS_Y | BACKWARD;\nvar DOWN = AXIS_Y | FORWARD;\n\nvar functionType = 'function';\n\n/**\n * Check if a value is a function.\n *\n * @param {*} val\n * @returns {Boolean}\n */\nfunction isFunction(val) {\n return typeof val === functionType;\n}\n\nvar cache$1 = typeof WeakMap === 'function' ? new WeakMap() : null;\n\n/**\n * Returns the computed value of an element's style property as a string.\n *\n * @param {HTMLElement} element\n * @param {String} style\n * @returns {String}\n */\nfunction getStyle(element, style) {\n var styles = cache$1 && cache$1.get(element);\n\n if (!styles) {\n styles = window.getComputedStyle(element, null);\n if (cache$1) cache$1.set(element, styles);\n }\n\n return styles.getPropertyValue(style);\n}\n\n/**\n * Returns the computed value of an element's style property transformed into\n * a float value.\n *\n * @param {HTMLElement} el\n * @param {String} style\n * @returns {Number}\n */\nfunction getStyleAsFloat(el, style) {\n return parseFloat(getStyle(el, style)) || 0;\n}\n\nvar DOC_ELEM = document.documentElement;\nvar BODY = document.body;\nvar THRESHOLD_DATA = { value: 0, offset: 0 };\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {HTMLElement|Window}\n */\nfunction getScrollElement(element) {\n if (element === window || element === DOC_ELEM || element === BODY) {\n return window;\n } else {\n return element;\n }\n}\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {Number}\n */\nfunction getScrollLeft(element) {\n return element === window ? element.pageXOffset : element.scrollLeft;\n}\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {Number}\n */\nfunction getScrollTop(element) {\n return element === window ? element.pageYOffset : element.scrollTop;\n}\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {Number}\n */\nfunction getScrollLeftMax(element) {\n if (element === window) {\n return DOC_ELEM.scrollWidth - DOC_ELEM.clientWidth;\n } else {\n return element.scrollWidth - element.clientWidth;\n }\n}\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {Number}\n */\nfunction getScrollTopMax(element) {\n if (element === window) {\n return DOC_ELEM.scrollHeight - DOC_ELEM.clientHeight;\n } else {\n return element.scrollHeight - element.clientHeight;\n }\n}\n\n/**\n * Get window's or element's client rectangle data relative to the element's\n * content dimensions (includes inner size + padding, excludes scrollbars,\n * borders and margins).\n *\n * @param {HTMLElement|Window} element\n * @returns {Rectangle}\n */\nfunction getContentRect(element, result) {\n result = result || {};\n\n if (element === window) {\n result.width = DOC_ELEM.clientWidth;\n result.height = DOC_ELEM.clientHeight;\n result.left = 0;\n result.right = result.width;\n result.top = 0;\n result.bottom = result.height;\n } else {\n var bcr = element.getBoundingClientRect();\n var borderLeft = element.clientLeft || getStyleAsFloat(element, 'border-left-width');\n var borderTop = element.clientTop || getStyleAsFloat(element, 'border-top-width');\n result.width = element.clientWidth;\n result.height = element.clientHeight;\n result.left = bcr.left + borderLeft;\n result.right = result.left + result.width;\n result.top = bcr.top + borderTop;\n result.bottom = result.top + result.height;\n }\n\n return result;\n}\n\n/**\n * @param {Item} item\n * @returns {Object}\n */\nfunction getItemAutoScrollSettings(item) {\n return item._drag._getGrid()._settings.dragAutoScroll;\n}\n\n/**\n * @param {Item} item\n */\nfunction prepareItemScrollSync(item) {\n if (!item._drag) return;\n item._drag._prepareScroll();\n}\n\n/**\n * @param {Item} item\n */\nfunction applyItemScrollSync(item) {\n if (!item._drag || !item._isActive) return;\n var drag = item._drag;\n drag._scrollDiffX = drag._scrollDiffY = 0;\n item._setTranslate(drag._left, drag._top);\n}\n\n/**\n * Compute threshold value and edge offset.\n *\n * @param {Number} threshold\n * @param {Number} safeZone\n * @param {Number} itemSize\n * @param {Number} targetSize\n * @returns {Object}\n */\nfunction computeThreshold(threshold, safeZone, itemSize, targetSize) {\n THRESHOLD_DATA.value = Math.min(targetSize / 2, threshold);\n THRESHOLD_DATA.offset =\n Math.max(0, itemSize + THRESHOLD_DATA.value * 2 + targetSize * safeZone - targetSize) / 2;\n return THRESHOLD_DATA;\n}\n\nfunction ScrollRequest() {\n this.reset();\n}\n\nScrollRequest.prototype.reset = function () {\n if (this.isActive) this.onStop();\n this.item = null;\n this.element = null;\n this.isActive = false;\n this.isEnding = false;\n this.direction = null;\n this.value = null;\n this.maxValue = 0;\n this.threshold = 0;\n this.distance = 0;\n this.speed = 0;\n this.duration = 0;\n this.action = null;\n};\n\nScrollRequest.prototype.hasReachedEnd = function () {\n return FORWARD & this.direction ? this.value >= this.maxValue : this.value <= 0;\n};\n\nScrollRequest.prototype.computeCurrentScrollValue = function () {\n if (this.value === null) {\n return AXIS_X & this.direction ? getScrollLeft(this.element) : getScrollTop(this.element);\n }\n return Math.max(0, Math.min(this.value, this.maxValue));\n};\n\nScrollRequest.prototype.computeNextScrollValue = function (deltaTime) {\n var delta = this.speed * (deltaTime / 1000);\n var nextValue = FORWARD & this.direction ? this.value + delta : this.value - delta;\n return Math.max(0, Math.min(nextValue, this.maxValue));\n};\n\nScrollRequest.prototype.computeSpeed = (function () {\n var data = {\n direction: null,\n threshold: 0,\n distance: 0,\n value: 0,\n maxValue: 0,\n deltaTime: 0,\n duration: 0,\n isEnding: false,\n };\n\n return function (deltaTime) {\n var item = this.item;\n var speed = getItemAutoScrollSettings(item).speed;\n\n if (isFunction(speed)) {\n data.direction = this.direction;\n data.threshold = this.threshold;\n data.distance = this.distance;\n data.value = this.value;\n data.maxValue = this.maxValue;\n data.duration = this.duration;\n data.speed = this.speed;\n data.deltaTime = deltaTime;\n data.isEnding = this.isEnding;\n return speed(item, this.element, data);\n } else {\n return speed;\n }\n };\n})();\n\nScrollRequest.prototype.tick = function (deltaTime) {\n if (!this.isActive) {\n this.isActive = true;\n this.onStart();\n }\n this.value = this.computeCurrentScrollValue();\n this.speed = this.computeSpeed(deltaTime);\n this.value = this.computeNextScrollValue(deltaTime);\n this.duration += deltaTime;\n return this.value;\n};\n\nScrollRequest.prototype.onStart = function () {\n var item = this.item;\n var onStart = getItemAutoScrollSettings(item).onStart;\n if (isFunction(onStart)) onStart(item, this.element, this.direction);\n};\n\nScrollRequest.prototype.onStop = function () {\n var item = this.item;\n var onStop = getItemAutoScrollSettings(item).onStop;\n if (isFunction(onStop)) onStop(item, this.element, this.direction);\n // Manually nudge sort to happen. There's a good chance that the item is still\n // after the scroll stops which means that the next sort will be triggered\n // only after the item is moved or it's parent scrolled.\n if (item._drag) item._drag.sort();\n};\n\nfunction ScrollAction() {\n this.element = null;\n this.requestX = null;\n this.requestY = null;\n this.scrollLeft = 0;\n this.scrollTop = 0;\n}\n\nScrollAction.prototype.reset = function () {\n if (this.requestX) this.requestX.action = null;\n if (this.requestY) this.requestY.action = null;\n this.element = null;\n this.requestX = null;\n this.requestY = null;\n this.scrollLeft = 0;\n this.scrollTop = 0;\n};\n\nScrollAction.prototype.addRequest = function (request) {\n if (AXIS_X & request.direction) {\n this.removeRequest(this.requestX);\n this.requestX = request;\n } else {\n this.removeRequest(this.requestY);\n this.requestY = request;\n }\n request.action = this;\n};\n\nScrollAction.prototype.removeRequest = function (request) {\n if (!request) return;\n if (this.requestX === request) {\n this.requestX = null;\n request.action = null;\n } else if (this.requestY === request) {\n this.requestY = null;\n request.action = null;\n }\n};\n\nScrollAction.prototype.computeScrollValues = function () {\n this.scrollLeft = this.requestX ? this.requestX.value : getScrollLeft(this.element);\n this.scrollTop = this.requestY ? this.requestY.value : getScrollTop(this.element);\n};\n\nScrollAction.prototype.scroll = function () {\n var element = this.element;\n if (!element) return;\n\n if (element.scrollTo) {\n element.scrollTo(this.scrollLeft, this.scrollTop);\n } else {\n element.scrollLeft = this.scrollLeft;\n element.scrollTop = this.scrollTop;\n }\n};\n\nfunction Pool(createItem, releaseItem) {\n this.pool = [];\n this.createItem = createItem;\n this.releaseItem = releaseItem;\n}\n\nPool.prototype.pick = function () {\n return this.pool.pop() || this.createItem();\n};\n\nPool.prototype.release = function (item) {\n this.releaseItem(item);\n if (this.pool.indexOf(item) !== -1) return;\n this.pool.push(item);\n};\n\nPool.prototype.reset = function () {\n this.pool.length = 0;\n};\n\n/**\n * Check if two rectangles are overlapping.\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Number}\n */\nfunction isOverlapping(a, b) {\n return !(\n a.left + a.width <= b.left ||\n b.left + b.width <= a.left ||\n a.top + a.height <= b.top ||\n b.top + b.height <= a.top\n );\n}\n\n/**\n * Calculate intersection area between two rectangle.\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Number}\n */\nfunction getIntersectionArea(a, b) {\n if (!isOverlapping(a, b)) return 0;\n var width = Math.min(a.left + a.width, b.left + b.width) - Math.max(a.left, b.left);\n var height = Math.min(a.top + a.height, b.top + b.height) - Math.max(a.top, b.top);\n return width * height;\n}\n\n/**\n * Calculate how many percent the intersection area of two rectangles is from\n * the maximum potential intersection area between the rectangles.\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Number}\n */\nfunction getIntersectionScore(a, b) {\n var area = getIntersectionArea(a, b);\n if (!area) return 0;\n var maxArea = Math.min(a.width, b.width) * Math.min(a.height, b.height);\n return (area / maxArea) * 100;\n}\n\nvar RECT_1 = {\n width: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n};\n\nvar RECT_2 = {\n width: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n};\n\nfunction AutoScroller() {\n this._isDestroyed = false;\n this._isTicking = false;\n this._tickTime = 0;\n this._tickDeltaTime = 0;\n this._items = [];\n this._actions = [];\n this._requests = {};\n this._requests[AXIS_X] = {};\n this._requests[AXIS_Y] = {};\n this._requestOverlapCheck = {};\n this._dragPositions = {};\n this._dragDirections = {};\n this._overlapCheckInterval = 150;\n\n this._requestPool = new Pool(\n function () {\n return new ScrollRequest();\n },\n function (request) {\n request.reset();\n }\n );\n\n this._actionPool = new Pool(\n function () {\n return new ScrollAction();\n },\n function (action) {\n action.reset();\n }\n );\n\n this._readTick = this._readTick.bind(this);\n this._writeTick = this._writeTick.bind(this);\n}\n\nAutoScroller.AXIS_X = AXIS_X;\nAutoScroller.AXIS_Y = AXIS_Y;\nAutoScroller.FORWARD = FORWARD;\nAutoScroller.BACKWARD = BACKWARD;\nAutoScroller.LEFT = LEFT;\nAutoScroller.RIGHT = RIGHT;\nAutoScroller.UP = UP;\nAutoScroller.DOWN = DOWN;\n\nAutoScroller.smoothSpeed = function (maxSpeed, acceleration, deceleration) {\n return function (item, element, data) {\n var targetSpeed = 0;\n if (!data.isEnding) {\n if (data.threshold > 0) {\n var factor = data.threshold - Math.max(0, data.distance);\n targetSpeed = (maxSpeed / data.threshold) * factor;\n } else {\n targetSpeed = maxSpeed;\n }\n }\n\n var currentSpeed = data.speed;\n var nextSpeed = targetSpeed;\n\n if (currentSpeed === targetSpeed) {\n return nextSpeed;\n }\n\n if (currentSpeed < targetSpeed) {\n nextSpeed = currentSpeed + acceleration * (data.deltaTime / 1000);\n return Math.min(targetSpeed, nextSpeed);\n } else {\n nextSpeed = currentSpeed - deceleration * (data.deltaTime / 1000);\n return Math.max(targetSpeed, nextSpeed);\n }\n };\n};\n\nAutoScroller.pointerHandle = function (pointerSize) {\n var rect = { left: 0, top: 0, width: 0, height: 0 };\n var size = pointerSize || 1;\n return function (item, x, y, w, h, pX, pY) {\n rect.left = pX - size * 0.5;\n rect.top = pY - size * 0.5;\n rect.width = size;\n rect.height = size;\n return rect;\n };\n};\n\nAutoScroller.prototype._readTick = function (time) {\n if (this._isDestroyed) return;\n if (time && this._tickTime) {\n this._tickDeltaTime = time - this._tickTime;\n this._tickTime = time;\n this._updateRequests();\n this._updateActions();\n } else {\n this._tickTime = time;\n this._tickDeltaTime = 0;\n }\n};\n\nAutoScroller.prototype._writeTick = function () {\n if (this._isDestroyed) return;\n this._applyActions();\n addAutoScrollTick(this._readTick, this._writeTick);\n};\n\nAutoScroller.prototype._startTicking = function () {\n this._isTicking = true;\n addAutoScrollTick(this._readTick, this._writeTick);\n};\n\nAutoScroller.prototype._stopTicking = function () {\n this._isTicking = false;\n this._tickTime = 0;\n this._tickDeltaTime = 0;\n cancelAutoScrollTick();\n};\n\nAutoScroller.prototype._getItemHandleRect = function (item, handle, rect) {\n var itemDrag = item._drag;\n\n if (handle) {\n var ev = itemDrag._dragMoveEvent || itemDrag._dragStartEvent;\n var data = handle(\n item,\n itemDrag._clientX,\n itemDrag._clientY,\n item._width,\n item._height,\n ev.clientX,\n ev.clientY\n );\n rect.left = data.left;\n rect.top = data.top;\n rect.width = data.width;\n rect.height = data.height;\n } else {\n rect.left = itemDrag._clientX;\n rect.top = itemDrag._clientY;\n rect.width = item._width;\n rect.height = item._height;\n }\n\n rect.right = rect.left + rect.width;\n rect.bottom = rect.top + rect.height;\n\n return rect;\n};\n\nAutoScroller.prototype._requestItemScroll = function (\n item,\n axis,\n element,\n direction,\n threshold,\n distance,\n maxValue\n) {\n var reqMap = this._requests[axis];\n var request = reqMap[item._id];\n\n if (request) {\n if (request.element !== element || request.direction !== direction) {\n request.reset();\n }\n } else {\n request = this._requestPool.pick();\n }\n\n request.item = item;\n request.element = element;\n request.direction = direction;\n request.threshold = threshold;\n request.distance = distance;\n request.maxValue = maxValue;\n reqMap[item._id] = request;\n};\n\nAutoScroller.prototype._cancelItemScroll = function (item, axis) {\n var reqMap = this._requests[axis];\n var request = reqMap[item._id];\n if (!request) return;\n if (request.action) request.action.removeRequest(request);\n this._requestPool.release(request);\n delete reqMap[item._id];\n};\n\nAutoScroller.prototype._checkItemOverlap = function (item, checkX, checkY) {\n var settings = getItemAutoScrollSettings(item);\n var targets = isFunction(settings.targets) ? settings.targets(item) : settings.targets;\n var threshold = settings.threshold;\n var safeZone = settings.safeZone;\n\n if (!targets || !targets.length) {\n checkX && this._cancelItemScroll(item, AXIS_X);\n checkY && this._cancelItemScroll(item, AXIS_Y);\n return;\n }\n\n var dragDirections = this._dragDirections[item._id];\n var dragDirectionX = dragDirections[0];\n var dragDirectionY = dragDirections[1];\n\n if (!dragDirectionX && !dragDirectionY) {\n checkX && this._cancelItemScroll(item, AXIS_X);\n checkY && this._cancelItemScroll(item, AXIS_Y);\n return;\n }\n\n var itemRect = this._getItemHandleRect(item, settings.handle, RECT_1);\n var testRect = RECT_2;\n\n var target = null;\n var testElement = null;\n var testAxisX = true;\n var testAxisY = true;\n var testScore = 0;\n var testPriority = 0;\n var testThreshold = null;\n var testDirection = null;\n var testDistance = 0;\n var testMaxScrollX = 0;\n var testMaxScrollY = 0;\n\n var xElement = null;\n var xPriority = -Infinity;\n var xThreshold = 0;\n var xScore = 0;\n var xDirection = null;\n var xDistance = 0;\n var xMaxScroll = 0;\n\n var yElement = null;\n var yPriority = -Infinity;\n var yThreshold = 0;\n var yScore = 0;\n var yDirection = null;\n var yDistance = 0;\n var yMaxScroll = 0;\n\n for (var i = 0; i < targets.length; i++) {\n target = targets[i];\n testAxisX = checkX && dragDirectionX && target.axis !== AXIS_Y;\n testAxisY = checkY && dragDirectionY && target.axis !== AXIS_X;\n testPriority = target.priority || 0;\n\n // Ignore this item if it's x-axis and y-axis priority is lower than\n // the currently matching item's.\n if ((!testAxisX || testPriority < xPriority) && (!testAxisY || testPriority < yPriority)) {\n continue;\n }\n\n testElement = getScrollElement(target.element || target);\n testMaxScrollX = testAxisX ? getScrollLeftMax(testElement) : -1;\n testMaxScrollY = testAxisY ? getScrollTopMax(testElement) : -1;\n\n // Ignore this item if there is no possibility to scroll.\n if (!testMaxScrollX && !testMaxScrollY) continue;\n\n testRect = getContentRect(testElement, testRect);\n testScore = getIntersectionScore(itemRect, testRect);\n\n // Ignore this item if it's not overlapping at all with the dragged item.\n if (testScore <= 0) continue;\n\n // Test x-axis.\n if (\n testAxisX &&\n testPriority >= xPriority &&\n testMaxScrollX > 0 &&\n (testPriority > xPriority || testScore > xScore)\n ) {\n testDirection = null;\n testThreshold = computeThreshold(\n typeof target.threshold === 'number' ? target.threshold : threshold,\n safeZone,\n itemRect.width,\n testRect.width\n );\n if (dragDirectionX === RIGHT) {\n testDistance = testRect.right + testThreshold.offset - itemRect.right;\n if (testDistance <= testThreshold.value && getScrollLeft(testElement) < testMaxScrollX) {\n testDirection = RIGHT;\n }\n } else if (dragDirectionX === LEFT) {\n testDistance = itemRect.left - (testRect.left - testThreshold.offset);\n if (testDistance <= testThreshold.value && getScrollLeft(testElement) > 0) {\n testDirection = LEFT;\n }\n }\n\n if (testDirection !== null) {\n xElement = testElement;\n xPriority = testPriority;\n xThreshold = testThreshold.value;\n xScore = testScore;\n xDirection = testDirection;\n xDistance = testDistance;\n xMaxScroll = testMaxScrollX;\n }\n }\n\n // Test y-axis.\n if (\n testAxisY &&\n testPriority >= yPriority &&\n testMaxScrollY > 0 &&\n (testPriority > yPriority || testScore > yScore)\n ) {\n testDirection = null;\n testThreshold = computeThreshold(\n typeof target.threshold === 'number' ? target.threshold : threshold,\n safeZone,\n itemRect.height,\n testRect.height\n );\n if (dragDirectionY === DOWN) {\n testDistance = testRect.bottom + testThreshold.offset - itemRect.bottom;\n if (testDistance <= testThreshold.value && getScrollTop(testElement) < testMaxScrollY) {\n testDirection = DOWN;\n }\n } else if (dragDirectionY === UP) {\n testDistance = itemRect.top - (testRect.top - testThreshold.offset);\n if (testDistance <= testThreshold.value && getScrollTop(testElement) > 0) {\n testDirection = UP;\n }\n }\n\n if (testDirection !== null) {\n yElement = testElement;\n yPriority = testPriority;\n yThreshold = testThreshold.value;\n yScore = testScore;\n yDirection = testDirection;\n yDistance = testDistance;\n yMaxScroll = testMaxScrollY;\n }\n }\n }\n\n // Request or cancel x-axis scroll.\n if (checkX) {\n if (xElement) {\n this._requestItemScroll(\n item,\n AXIS_X,\n xElement,\n xDirection,\n xThreshold,\n xDistance,\n xMaxScroll\n );\n } else {\n this._cancelItemScroll(item, AXIS_X);\n }\n }\n\n // Request or cancel y-axis scroll.\n if (checkY) {\n if (yElement) {\n this._requestItemScroll(\n item,\n AXIS_Y,\n yElement,\n yDirection,\n yThreshold,\n yDistance,\n yMaxScroll\n );\n } else {\n this._cancelItemScroll(item, AXIS_Y);\n }\n }\n};\n\nAutoScroller.prototype._updateScrollRequest = function (scrollRequest) {\n var item = scrollRequest.item;\n var settings = getItemAutoScrollSettings(item);\n var targets = isFunction(settings.targets) ? settings.targets(item) : settings.targets;\n var targetCount = (targets && targets.length) || 0;\n var threshold = settings.threshold;\n var safeZone = settings.safeZone;\n var itemRect = this._getItemHandleRect(item, settings.handle, RECT_1);\n var testRect = RECT_2;\n var target = null;\n var testElement = null;\n var testIsAxisX = false;\n var testScore = null;\n var testThreshold = null;\n var testDistance = null;\n var testScroll = null;\n var testMaxScroll = null;\n var hasReachedEnd = null;\n\n for (var i = 0; i < targetCount; i++) {\n target = targets[i];\n\n // Make sure we have a matching element.\n testElement = getScrollElement(target.element || target);\n if (testElement !== scrollRequest.element) continue;\n\n // Make sure we have a matching axis.\n testIsAxisX = !!(AXIS_X & scrollRequest.direction);\n if (testIsAxisX) {\n if (target.axis === AXIS_Y) continue;\n } else {\n if (target.axis === AXIS_X) continue;\n }\n\n // Stop scrolling if there is no room to scroll anymore.\n testMaxScroll = testIsAxisX ? getScrollLeftMax(testElement) : getScrollTopMax(testElement);\n if (testMaxScroll <= 0) {\n break;\n }\n\n testRect = getContentRect(testElement, testRect);\n testScore = getIntersectionScore(itemRect, testRect);\n\n // Stop scrolling if dragged item is not overlapping with the scroll\n // element anymore.\n if (testScore <= 0) {\n break;\n }\n\n // Compute threshold and edge offset.\n testThreshold = computeThreshold(\n typeof target.threshold === 'number' ? target.threshold : threshold,\n safeZone,\n testIsAxisX ? itemRect.width : itemRect.height,\n testIsAxisX ? testRect.width : testRect.height\n );\n\n // Compute distance (based on current direction).\n if (scrollRequest.direction === LEFT) {\n testDistance = itemRect.left - (testRect.left - testThreshold.offset);\n } else if (scrollRequest.direction === RIGHT) {\n testDistance = testRect.right + testThreshold.offset - itemRect.right;\n } else if (scrollRequest.direction === UP) {\n testDistance = itemRect.top - (testRect.top - testThreshold.offset);\n } else {\n testDistance = testRect.bottom + testThreshold.offset - itemRect.bottom;\n }\n\n // Stop scrolling if threshold is not exceeded.\n if (testDistance > testThreshold.value) {\n break;\n }\n\n // Stop scrolling if we have reached the end of the scroll value.\n testScroll = testIsAxisX ? getScrollLeft(testElement) : getScrollTop(testElement);\n hasReachedEnd =\n FORWARD & scrollRequest.direction ? testScroll >= testMaxScroll : testScroll <= 0;\n if (hasReachedEnd) {\n break;\n }\n\n // Scrolling can continue, let's update the values.\n scrollRequest.maxValue = testMaxScroll;\n scrollRequest.threshold = testThreshold.value;\n scrollRequest.distance = testDistance;\n scrollRequest.isEnding = false;\n return true;\n }\n\n // Before we end the request, let's see if we need to stop the scrolling\n // smoothly or immediately.\n if (settings.smoothStop === true && scrollRequest.speed > 0) {\n if (hasReachedEnd === null) hasReachedEnd = scrollRequest.hasReachedEnd();\n scrollRequest.isEnding = hasReachedEnd ? false : true;\n } else {\n scrollRequest.isEnding = false;\n }\n\n return scrollRequest.isEnding;\n};\n\nAutoScroller.prototype._updateRequests = function () {\n var items = this._items;\n var requestsX = this._requests[AXIS_X];\n var requestsY = this._requests[AXIS_Y];\n var item, reqX, reqY, checkTime, needsCheck, checkX, checkY;\n\n for (var i = 0; i < items.length; i++) {\n item = items[i];\n checkTime = this._requestOverlapCheck[item._id];\n needsCheck = checkTime > 0 && this._tickTime - checkTime > this._overlapCheckInterval;\n\n checkX = true;\n reqX = requestsX[item._id];\n if (reqX && reqX.isActive) {\n checkX = !this._updateScrollRequest(reqX);\n if (checkX) {\n needsCheck = true;\n this._cancelItemScroll(item, AXIS_X);\n }\n }\n\n checkY = true;\n reqY = requestsY[item._id];\n if (reqY && reqY.isActive) {\n checkY = !this._updateScrollRequest(reqY);\n if (checkY) {\n needsCheck = true;\n this._cancelItemScroll(item, AXIS_Y);\n }\n }\n\n if (needsCheck) {\n this._requestOverlapCheck[item._id] = 0;\n this._checkItemOverlap(item, checkX, checkY);\n }\n }\n};\n\nAutoScroller.prototype._requestAction = function (request, axis) {\n var actions = this._actions;\n var isAxisX = axis === AXIS_X;\n var action = null;\n\n for (var i = 0; i < actions.length; i++) {\n action = actions[i];\n\n // If the action's request does not match the request's -> skip.\n if (request.element !== action.element) {\n action = null;\n continue;\n }\n\n // If the request and action share the same element, but the request slot\n // for the requested axis is already reserved let's ignore and cancel this\n // request.\n if (isAxisX ? action.requestX : action.requestY) {\n this._cancelItemScroll(request.item, axis);\n return;\n }\n\n // Seems like we have found our action, let's break the loop.\n break;\n }\n\n if (!action) action = this._actionPool.pick();\n action.element = request.element;\n action.addRequest(request);\n\n request.tick(this._tickDeltaTime);\n actions.push(action);\n};\n\nAutoScroller.prototype._updateActions = function () {\n var items = this._items;\n var requests = this._requests;\n var actions = this._actions;\n var itemId;\n var reqX;\n var reqY;\n var i;\n\n // Generate actions.\n for (i = 0; i < items.length; i++) {\n itemId = items[i]._id;\n reqX = requests[AXIS_X][itemId];\n reqY = requests[AXIS_Y][itemId];\n if (reqX) this._requestAction(reqX, AXIS_X);\n if (reqY) this._requestAction(reqY, AXIS_Y);\n }\n\n // Compute actions' scroll values.\n for (i = 0; i < actions.length; i++) {\n actions[i].computeScrollValues();\n }\n};\n\nAutoScroller.prototype._applyActions = function () {\n var actions = this._actions;\n var items = this._items;\n var i;\n\n // No actions -> no scrolling.\n if (!actions.length) return;\n\n // Scroll all the required elements.\n for (i = 0; i < actions.length; i++) {\n actions[i].scroll();\n this._actionPool.release(actions[i]);\n }\n\n // Reset actions.\n actions.length = 0;\n\n // Sync the item position immediately after all the auto-scrolling business is\n // finished. Without this procedure the items will jitter during auto-scroll\n // (in some cases at least) since the drag scroll handler is async (bound to\n // raf tick). Note that this procedure should not emit any dragScroll events,\n // because otherwise they would be emitted twice for the same event.\n for (i = 0; i < items.length; i++) prepareItemScrollSync(items[i]);\n for (i = 0; i < items.length; i++) applyItemScrollSync(items[i]);\n};\n\nAutoScroller.prototype._updateDragDirection = function (item) {\n var dragPositions = this._dragPositions[item._id];\n var dragDirections = this._dragDirections[item._id];\n var x1 = item._drag._left;\n var y1 = item._drag._top;\n if (dragPositions.length) {\n var x2 = dragPositions[0];\n var y2 = dragPositions[1];\n dragDirections[0] = x1 > x2 ? RIGHT : x1 < x2 ? LEFT : dragDirections[0] || 0;\n dragDirections[1] = y1 > y2 ? DOWN : y1 < y2 ? UP : dragDirections[1] || 0;\n }\n dragPositions[0] = x1;\n dragPositions[1] = y1;\n};\n\nAutoScroller.prototype.addItem = function (item) {\n if (this._isDestroyed) return;\n var index = this._items.indexOf(item);\n if (index === -1) {\n this._items.push(item);\n this._requestOverlapCheck[item._id] = this._tickTime;\n this._dragDirections[item._id] = [0, 0];\n this._dragPositions[item._id] = [];\n if (!this._isTicking) this._startTicking();\n }\n};\n\nAutoScroller.prototype.updateItem = function (item) {\n if (this._isDestroyed) return;\n\n // Make sure the item still exists in the auto-scroller.\n if (!this._dragDirections[item._id]) return;\n\n this._updateDragDirection(item);\n if (!this._requestOverlapCheck[item._id]) {\n this._requestOverlapCheck[item._id] = this._tickTime;\n }\n};\n\nAutoScroller.prototype.removeItem = function (item) {\n if (this._isDestroyed) return;\n\n var index = this._items.indexOf(item);\n if (index === -1) return;\n\n var itemId = item._id;\n\n var reqX = this._requests[AXIS_X][itemId];\n if (reqX) {\n this._cancelItemScroll(item, AXIS_X);\n delete this._requests[AXIS_X][itemId];\n }\n\n var reqY = this._requests[AXIS_Y][itemId];\n if (reqY) {\n this._cancelItemScroll(item, AXIS_Y);\n delete this._requests[AXIS_Y][itemId];\n }\n\n delete this._requestOverlapCheck[itemId];\n delete this._dragPositions[itemId];\n delete this._dragDirections[itemId];\n this._items.splice(index, 1);\n\n if (this._isTicking && !this._items.length) {\n this._stopTicking();\n }\n};\n\nAutoScroller.prototype.isItemScrollingX = function (item) {\n var reqX = this._requests[AXIS_X][item._id];\n return !!(reqX && reqX.isActive);\n};\n\nAutoScroller.prototype.isItemScrollingY = function (item) {\n var reqY = this._requests[AXIS_Y][item._id];\n return !!(reqY && reqY.isActive);\n};\n\nAutoScroller.prototype.isItemScrolling = function (item) {\n return this.isItemScrollingX(item) || this.isItemScrollingY(item);\n};\n\nAutoScroller.prototype.destroy = function () {\n if (this._isDestroyed) return;\n\n var items = this._items.slice(0);\n for (var i = 0; i < items.length; i++) {\n this.removeItem(items[i]);\n }\n\n this._actions.length = 0;\n this._requestPool.reset();\n this._actionPool.reset();\n\n this._isDestroyed = true;\n};\n\nvar ElProto = window.Element.prototype;\nvar matchesFn =\n ElProto.matches ||\n ElProto.matchesSelector ||\n ElProto.webkitMatchesSelector ||\n ElProto.mozMatchesSelector ||\n ElProto.msMatchesSelector ||\n ElProto.oMatchesSelector ||\n function () {\n return false;\n };\n\n/**\n * Check if element matches a CSS selector.\n *\n * @param {Element} el\n * @param {String} selector\n * @returns {Boolean}\n */\nfunction elementMatches(el, selector) {\n return matchesFn.call(el, selector);\n}\n\n/**\n * Add class to an element.\n *\n * @param {HTMLElement} element\n * @param {String} className\n */\nfunction addClass(element, className) {\n if (!className) return;\n\n if (element.classList) {\n element.classList.add(className);\n } else {\n if (!elementMatches(element, '.' + className)) {\n element.className += ' ' + className;\n }\n }\n}\n\nvar tempArray = [];\nvar numberType = 'number';\n\n/**\n * Insert an item or an array of items to array to a specified index. Mutates\n * the array. The index can be negative in which case the items will be added\n * to the end of the array.\n *\n * @param {Array} array\n * @param {*} items\n * @param {Number} [index=-1]\n */\nfunction arrayInsert(array, items, index) {\n var startIndex = typeof index === numberType ? index : -1;\n if (startIndex < 0) startIndex = array.length - startIndex + 1;\n\n array.splice.apply(array, tempArray.concat(startIndex, 0, items));\n tempArray.length = 0;\n}\n\n/**\n * Normalize array index. Basically this function makes sure that the provided\n * array index is within the bounds of the provided array and also transforms\n * negative index to the matching positive index. The third (optional) argument\n * allows you to define offset for array's length in case you are adding items\n * to the array or removing items from the array.\n *\n * @param {Array} array\n * @param {Number} index\n * @param {Number} [sizeOffset]\n */\nfunction normalizeArrayIndex(array, index, sizeOffset) {\n var maxIndex = Math.max(0, array.length - 1 + (sizeOffset || 0));\n return index > maxIndex ? maxIndex : index < 0 ? Math.max(maxIndex + index + 1, 0) : index;\n}\n\n/**\n * Move array item to another index.\n *\n * @param {Array} array\n * @param {Number} fromIndex\n * - Index (positive or negative) of the item that will be moved.\n * @param {Number} toIndex\n * - Index (positive or negative) where the item should be moved to.\n */\nfunction arrayMove(array, fromIndex, toIndex) {\n // Make sure the array has two or more items.\n if (array.length < 2) return;\n\n // Normalize the indices.\n var from = normalizeArrayIndex(array, fromIndex);\n var to = normalizeArrayIndex(array, toIndex);\n\n // Add target item to the new position.\n if (from !== to) {\n array.splice(to, 0, array.splice(from, 1)[0]);\n }\n}\n\n/**\n * Swap array items.\n *\n * @param {Array} array\n * @param {Number} index\n * - Index (positive or negative) of the item that will be swapped.\n * @param {Number} withIndex\n * - Index (positive or negative) of the other item that will be swapped.\n */\nfunction arraySwap(array, index, withIndex) {\n // Make sure the array has two or more items.\n if (array.length < 2) return;\n\n // Normalize the indices.\n var indexA = normalizeArrayIndex(array, index);\n var indexB = normalizeArrayIndex(array, withIndex);\n var temp;\n\n // Swap the items.\n if (indexA !== indexB) {\n temp = array[indexA];\n array[indexA] = array[indexB];\n array[indexB] = temp;\n }\n}\n\nvar transformProp = getPrefixedPropName(document.documentElement.style, 'transform') || 'transform';\n\nvar styleNameRegEx = /([A-Z])/g;\nvar prefixRegex = /^(webkit-|moz-|ms-|o-)/;\nvar msPrefixRegex = /^(-m-s-)/;\n\n/**\n * Transforms a camel case style property to kebab case style property. Handles\n * vendor prefixed properties elegantly as well, e.g. \"WebkitTransform\" and\n * \"webkitTransform\" are both transformed into \"-webkit-transform\".\n *\n * @param {String} property\n * @returns {String}\n */\nfunction getStyleName(property) {\n // Initial slicing, turns \"fooBarProp\" into \"foo-bar-prop\".\n var styleName = property.replace(styleNameRegEx, '-$1').toLowerCase();\n\n // Handle properties that start with \"webkit\", \"moz\", \"ms\" or \"o\" prefix (we\n // need to add an extra '-' to the beginnig).\n styleName = styleName.replace(prefixRegex, '-$1');\n\n // Handle properties that start with \"MS\" prefix (we need to transform the\n // \"-m-s-\" into \"-ms-\").\n styleName = styleName.replace(msPrefixRegex, '-ms-');\n\n return styleName;\n}\n\nvar transformStyle = getStyleName(transformProp);\n\nvar transformNone$1 = 'none';\nvar displayInline = 'inline';\nvar displayNone = 'none';\nvar displayStyle = 'display';\n\n/**\n * Returns true if element is transformed, false if not. In practice the\n * element's display value must be anything else than \"none\" or \"inline\" as\n * well as have a valid transform value applied in order to be counted as a\n * transformed element.\n *\n * Borrowed from Mezr (v0.6.1):\n * https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L661\n *\n * @param {HTMLElement} element\n * @returns {Boolean}\n */\nfunction isTransformed(element) {\n var transform = getStyle(element, transformStyle);\n if (!transform || transform === transformNone$1) return false;\n\n var display = getStyle(element, displayStyle);\n if (display === displayInline || display === displayNone) return false;\n\n return true;\n}\n\n/**\n * Returns an absolute positioned element's containing block, which is\n * considered to be the closest ancestor element that the target element's\n * positioning is relative to. Disclaimer: this only works as intended for\n * absolute positioned elements.\n *\n * @param {HTMLElement} element\n * @returns {(Document|Element)}\n */\nfunction getContainingBlock(element) {\n // As long as the containing block is an element, static and not\n // transformed, try to get the element's parent element and fallback to\n // document. https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L339\n var doc = document;\n var res = element || doc;\n while (res && res !== doc && getStyle(res, 'position') === 'static' && !isTransformed(res)) {\n res = res.parentElement || doc;\n }\n return res;\n}\n\nvar offsetA = {};\nvar offsetB = {};\nvar offsetDiff = {};\n\n/**\n * Returns the element's document offset, which in practice means the vertical\n * and horizontal distance between the element's northwest corner and the\n * document's northwest corner. Note that this function always returns the same\n * object so be sure to read the data from it instead using it as a reference.\n *\n * @param {(Document|Element|Window)} element\n * @param {Object} [offsetData]\n * - Optional data object where the offset data will be inserted to. If not\n * provided a new object will be created for the return data.\n * @returns {Object}\n */\nfunction getOffset(element, offsetData) {\n var offset = offsetData || {};\n var rect;\n\n // Set up return data.\n offset.left = 0;\n offset.top = 0;\n\n // Document's offsets are always 0.\n if (element === document) return offset;\n\n // Add viewport scroll left/top to the respective offsets.\n offset.left = window.pageXOffset || 0;\n offset.top = window.pageYOffset || 0;\n\n // Window's offsets are the viewport scroll left/top values.\n if (element.self === window.self) return offset;\n\n // Add element's client rects to the offsets.\n rect = element.getBoundingClientRect();\n offset.left += rect.left;\n offset.top += rect.top;\n\n // Exclude element's borders from the offset.\n offset.left += getStyleAsFloat(element, 'border-left-width');\n offset.top += getStyleAsFloat(element, 'border-top-width');\n\n return offset;\n}\n\n/**\n * Calculate the offset difference two elements.\n *\n * @param {HTMLElement} elemA\n * @param {HTMLElement} elemB\n * @param {Boolean} [compareContainingBlocks=false]\n * - When this is set to true the containing blocks of the provided elements\n * will be used for calculating the difference. Otherwise the provided\n * elements will be compared directly.\n * @returns {Object}\n */\nfunction getOffsetDiff(elemA, elemB, compareContainingBlocks) {\n offsetDiff.left = 0;\n offsetDiff.top = 0;\n\n // If elements are same let's return early.\n if (elemA === elemB) return offsetDiff;\n\n // Compare containing blocks if necessary.\n if (compareContainingBlocks) {\n elemA = getContainingBlock(elemA);\n elemB = getContainingBlock(elemB);\n\n // If containing blocks are identical, let's return early.\n if (elemA === elemB) return offsetDiff;\n }\n\n // Finally, let's calculate the offset diff.\n getOffset(elemA, offsetA);\n getOffset(elemB, offsetB);\n offsetDiff.left = offsetB.left - offsetA.left;\n offsetDiff.top = offsetB.top - offsetA.top;\n\n return offsetDiff;\n}\n\n/**\n * Check if overflow style value is scrollable.\n *\n * @param {String} value\n * @returns {Boolean}\n */\nfunction isScrollableOverflow(value) {\n return value === 'auto' || value === 'scroll' || value === 'overlay';\n}\n\n/**\n * Check if an element is scrollable.\n *\n * @param {HTMLElement} element\n * @returns {Boolean}\n */\nfunction isScrollable(element) {\n return (\n isScrollableOverflow(getStyle(element, 'overflow')) ||\n isScrollableOverflow(getStyle(element, 'overflow-x')) ||\n isScrollableOverflow(getStyle(element, 'overflow-y'))\n );\n}\n\n/**\n * Collect element's ancestors that are potentially scrollable elements. The\n * provided element is also also included in the check, meaning that if it is\n * scrollable it is added to the result array.\n *\n * @param {HTMLElement} element\n * @param {Array} [result]\n * @returns {Array}\n */\nfunction getScrollableAncestors(element, result) {\n result = result || [];\n\n // Find scroll parents.\n while (element && element !== document) {\n // If element is inside ShadowDOM let's get it's host node from the real\n // DOM and continue looping.\n if (element.getRootNode && element instanceof DocumentFragment) {\n element = element.getRootNode().host;\n continue;\n }\n\n // If element is scrollable let's add it to the scrollable list.\n if (isScrollable(element)) {\n result.push(element);\n }\n\n element = element.parentNode;\n }\n\n // Always add window to the results.\n result.push(window);\n\n return result;\n}\n\nvar translateValue = {};\nvar transformNone = 'none';\nvar rxMat3d = /^matrix3d/;\nvar rxMatTx = /([^,]*,){4}/;\nvar rxMat3dTx = /([^,]*,){12}/;\nvar rxNextItem = /[^,]*,/;\n\n/**\n * Returns the element's computed translateX and translateY values as a floats.\n * The returned object is always the same object and updated every time this\n * function is called.\n *\n * @param {HTMLElement} element\n * @returns {Object}\n */\nfunction getTranslate(element) {\n translateValue.x = 0;\n translateValue.y = 0;\n\n var transform = getStyle(element, transformStyle);\n if (!transform || transform === transformNone) {\n return translateValue;\n }\n\n // Transform style can be in either matrix3d(...) or matrix(...).\n var isMat3d = rxMat3d.test(transform);\n var tX = transform.replace(isMat3d ? rxMat3dTx : rxMatTx, '');\n var tY = tX.replace(rxNextItem, '');\n\n translateValue.x = parseFloat(tX) || 0;\n translateValue.y = parseFloat(tY) || 0;\n\n return translateValue;\n}\n\n/**\n * Remove class from an element.\n *\n * @param {HTMLElement} element\n * @param {String} className\n */\nfunction removeClass(element, className) {\n if (!className) return;\n\n if (element.classList) {\n element.classList.remove(className);\n } else {\n if (elementMatches(element, '.' + className)) {\n element.className = (' ' + element.className + ' ')\n .replace(' ' + className + ' ', ' ')\n .trim();\n }\n }\n}\n\nvar IS_IOS =\n /^(iPad|iPhone|iPod)/.test(window.navigator.platform) ||\n (/^Mac/.test(window.navigator.platform) && window.navigator.maxTouchPoints > 1);\nvar START_PREDICATE_INACTIVE = 0;\nvar START_PREDICATE_PENDING = 1;\nvar START_PREDICATE_RESOLVED = 2;\nvar SCROLL_LISTENER_OPTIONS = hasPassiveEvents() ? { passive: true } : false;\n\n/**\n * Bind touch interaction to an item.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemDrag(item) {\n var element = item._element;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n this._item = item;\n this._gridId = grid._id;\n this._isDestroyed = false;\n this._isMigrating = false;\n\n // Start predicate data.\n this._startPredicate = isFunction(settings.dragStartPredicate)\n ? settings.dragStartPredicate\n : ItemDrag.defaultStartPredicate;\n this._startPredicateState = START_PREDICATE_INACTIVE;\n this._startPredicateResult = undefined;\n\n // Data for drag sort predicate heuristics.\n this._isSortNeeded = false;\n this._sortTimer = undefined;\n this._blockedSortIndex = null;\n this._sortX1 = 0;\n this._sortX2 = 0;\n this._sortY1 = 0;\n this._sortY2 = 0;\n\n // Setup item's initial drag data.\n this._reset();\n\n // Bind the methods that needs binding.\n this._preStartCheck = this._preStartCheck.bind(this);\n this._preEndCheck = this._preEndCheck.bind(this);\n this._onScroll = this._onScroll.bind(this);\n this._prepareStart = this._prepareStart.bind(this);\n this._applyStart = this._applyStart.bind(this);\n this._prepareMove = this._prepareMove.bind(this);\n this._applyMove = this._applyMove.bind(this);\n this._prepareScroll = this._prepareScroll.bind(this);\n this._applyScroll = this._applyScroll.bind(this);\n this._handleSort = this._handleSort.bind(this);\n this._handleSortDelayed = this._handleSortDelayed.bind(this);\n\n // Get drag handle element.\n this._handle = (settings.dragHandle && element.querySelector(settings.dragHandle)) || element;\n\n // Init dragger.\n this._dragger = new Dragger(this._handle, settings.dragCssProps);\n this._dragger.on('start', this._preStartCheck);\n this._dragger.on('move', this._preStartCheck);\n this._dragger.on('cancel', this._preEndCheck);\n this._dragger.on('end', this._preEndCheck);\n}\n\n/**\n * Public properties\n * *****************\n */\n\n/**\n * @public\n * @static\n * @type {AutoScroller}\n */\nItemDrag.autoScroller = new AutoScroller();\n\n/**\n * Public static methods\n * *********************\n */\n\n/**\n * Default drag start predicate handler that handles anchor elements\n * gracefully. The return value of this function defines if the drag is\n * started, rejected or pending. When true is returned the dragging is started\n * and when false is returned the dragging is rejected. If nothing is returned\n * the predicate will be called again on the next drag movement.\n *\n * @public\n * @static\n * @param {Item} item\n * @param {Object} event\n * @param {Object} [options]\n * - An optional options object which can be used to pass the predicate\n * it's options manually. By default the predicate retrieves the options\n * from the grid's settings.\n * @returns {(Boolean|undefined)}\n */\nItemDrag.defaultStartPredicate = function (item, event, options) {\n var drag = item._drag;\n\n // Make sure left button is pressed on mouse.\n if (event.isFirst && event.srcEvent.button) {\n return false;\n }\n\n // If the start event is trusted, non-cancelable and it's default action has\n // not been prevented it is in most cases a sign that the gesture would be\n // cancelled anyways right after it has started (e.g. starting drag while\n // the page is scrolling).\n if (\n !IS_IOS &&\n event.isFirst &&\n event.srcEvent.isTrusted === true &&\n event.srcEvent.defaultPrevented === false &&\n event.srcEvent.cancelable === false\n ) {\n return false;\n }\n\n // Final event logic. At this stage return value does not matter anymore,\n // the predicate is either resolved or it's not and there's nothing to do\n // about it. Here we just reset data and if the item element is a link\n // we follow it (if there has only been slight movement).\n if (event.isFinal) {\n drag._finishStartPredicate(event);\n return;\n }\n\n // Setup predicate data from options if not already set.\n var predicate = drag._startPredicateData;\n if (!predicate) {\n var config = options || drag._getGrid()._settings.dragStartPredicate || {};\n drag._startPredicateData = predicate = {\n distance: Math.max(config.distance, 0) || 0,\n delay: Math.max(config.delay, 0) || 0,\n };\n }\n\n // If delay is defined let's keep track of the latest event and initiate\n // delay if it has not been done yet.\n if (predicate.delay) {\n predicate.event = event;\n if (!predicate.delayTimer) {\n predicate.delayTimer = window.setTimeout(function () {\n predicate.delay = 0;\n if (drag._resolveStartPredicate(predicate.event)) {\n drag._forceResolveStartPredicate(predicate.event);\n drag._resetStartPredicate();\n }\n }, predicate.delay);\n }\n }\n\n return drag._resolveStartPredicate(event);\n};\n\n/**\n * Default drag sort predicate.\n *\n * @public\n * @static\n * @param {Item} item\n * @param {Object} [options]\n * @param {Number} [options.threshold=50]\n * @param {String} [options.action='move']\n * @returns {?Object}\n * - Returns `null` if no valid index was found. Otherwise returns drag sort\n * command.\n */\nItemDrag.defaultSortPredicate = (function () {\n var itemRect = {};\n var targetRect = {};\n var returnData = {};\n var gridsArray = [];\n var minThreshold = 1;\n var maxThreshold = 100;\n\n function getTargetGrid(item, rootGrid, threshold) {\n var target = null;\n var dragSort = rootGrid._settings.dragSort;\n var bestScore = -1;\n var gridScore;\n var grids;\n var grid;\n var container;\n var containerRect;\n var left;\n var top;\n var right;\n var bottom;\n var i;\n\n // Get potential target grids.\n if (dragSort === true) {\n gridsArray[0] = rootGrid;\n grids = gridsArray;\n } else if (isFunction(dragSort)) {\n grids = dragSort.call(rootGrid, item);\n }\n\n // Return immediately if there are no grids.\n if (!grids || !Array.isArray(grids) || !grids.length) {\n return target;\n }\n\n // Loop through the grids and get the best match.\n for (i = 0; i < grids.length; i++) {\n grid = grids[i];\n\n // Filter out all destroyed grids.\n if (grid._isDestroyed) continue;\n\n // Compute the grid's client rect an clamp the initial boundaries to\n // viewport dimensions.\n grid._updateBoundingRect();\n left = Math.max(0, grid._left);\n top = Math.max(0, grid._top);\n right = Math.min(window.innerWidth, grid._right);\n bottom = Math.min(window.innerHeight, grid._bottom);\n\n // The grid might be inside one or more elements that clip it's visibility\n // (e.g overflow scroll/hidden) so we want to find out the visible portion\n // of the grid in the viewport and use that in our calculations.\n container = grid._element.parentNode;\n while (\n container &&\n container !== document &&\n container !== document.documentElement &&\n container !== document.body\n ) {\n if (container.getRootNode && container instanceof DocumentFragment) {\n container = container.getRootNode().host;\n continue;\n }\n\n if (getStyle(container, 'overflow') !== 'visible') {\n containerRect = container.getBoundingClientRect();\n left = Math.max(left, containerRect.left);\n top = Math.max(top, containerRect.top);\n right = Math.min(right, containerRect.right);\n bottom = Math.min(bottom, containerRect.bottom);\n }\n\n if (getStyle(container, 'position') === 'fixed') {\n break;\n }\n\n container = container.parentNode;\n }\n\n // No need to go further if target rect does not have visible area.\n if (left >= right || top >= bottom) continue;\n\n // Check how much dragged element overlaps the container element.\n targetRect.left = left;\n targetRect.top = top;\n targetRect.width = right - left;\n targetRect.height = bottom - top;\n gridScore = getIntersectionScore(itemRect, targetRect);\n\n // Check if this grid is the best match so far.\n if (gridScore > threshold && gridScore > bestScore) {\n bestScore = gridScore;\n target = grid;\n }\n }\n\n // Always reset grids array.\n gridsArray.length = 0;\n\n return target;\n }\n\n return function (item, options) {\n var drag = item._drag;\n var rootGrid = drag._getGrid();\n\n // Get drag sort predicate settings.\n var sortThreshold = options && typeof options.threshold === 'number' ? options.threshold : 50;\n var sortAction = options && options.action === ACTION_SWAP ? ACTION_SWAP : ACTION_MOVE;\n var migrateAction =\n options && options.migrateAction === ACTION_SWAP ? ACTION_SWAP : ACTION_MOVE;\n\n // Sort threshold must be a positive number capped to a max value of 100. If\n // that's not the case this function will not work correctly. So let's clamp\n // the threshold just in case.\n sortThreshold = Math.min(Math.max(sortThreshold, minThreshold), maxThreshold);\n\n // Populate item rect data.\n itemRect.width = item._width;\n itemRect.height = item._height;\n itemRect.left = drag._clientX;\n itemRect.top = drag._clientY;\n\n // Calculate the target grid.\n var grid = getTargetGrid(item, rootGrid, sortThreshold);\n\n // Return early if we found no grid container element that overlaps the\n // dragged item enough.\n if (!grid) return null;\n\n var isMigration = item.getGrid() !== grid;\n var gridOffsetLeft = 0;\n var gridOffsetTop = 0;\n var matchScore = 0;\n var matchIndex = -1;\n var hasValidTargets = false;\n var target;\n var score;\n var i;\n\n // If item is moved within it's originating grid adjust item's left and\n // top props. Otherwise if item is moved to/within another grid get the\n // container element's offset (from the element's content edge).\n if (grid === rootGrid) {\n itemRect.left = drag._gridX + item._marginLeft;\n itemRect.top = drag._gridY + item._marginTop;\n } else {\n grid._updateBorders(1, 0, 1, 0);\n gridOffsetLeft = grid._left + grid._borderLeft;\n gridOffsetTop = grid._top + grid._borderTop;\n }\n\n // Loop through the target grid items and try to find the best match.\n for (i = 0; i < grid._items.length; i++) {\n target = grid._items[i];\n\n // If the target item is not active or the target item is the dragged\n // item let's skip to the next item.\n if (!target._isActive || target === item) {\n continue;\n }\n\n // Mark the grid as having valid target items.\n hasValidTargets = true;\n\n // Calculate the target's overlap score with the dragged item.\n targetRect.width = target._width;\n targetRect.height = target._height;\n targetRect.left = target._left + target._marginLeft + gridOffsetLeft;\n targetRect.top = target._top + target._marginTop + gridOffsetTop;\n score = getIntersectionScore(itemRect, targetRect);\n\n // Update best match index and score if the target's overlap score with\n // the dragged item is higher than the current best match score.\n if (score > matchScore) {\n matchIndex = i;\n matchScore = score;\n }\n }\n\n // If there is no valid match and the dragged item is being moved into\n // another grid we need to do some guess work here. If there simply are no\n // valid targets (which means that the dragged item will be the only active\n // item in the new grid) we can just add it as the first item. If we have\n // valid items in the new grid and the dragged item is overlapping one or\n // more of the items in the new grid let's make an exception with the\n // threshold and just pick the item which the dragged item is overlapping\n // most. However, if the dragged item is not overlapping any of the valid\n // items in the new grid let's position it as the last item in the grid.\n if (isMigration && matchScore < sortThreshold) {\n matchIndex = hasValidTargets ? matchIndex : 0;\n matchScore = sortThreshold;\n }\n\n // Check if the best match overlaps enough to justify a placement switch.\n if (matchScore >= sortThreshold) {\n returnData.grid = grid;\n returnData.index = matchIndex;\n returnData.action = isMigration ? migrateAction : sortAction;\n return returnData;\n }\n\n return null;\n };\n})();\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Abort dragging and reset drag data.\n *\n * @public\n */\nItemDrag.prototype.stop = function () {\n if (!this._isActive) return;\n\n // If the item is being dropped into another grid, finish it up and return\n // immediately.\n if (this._isMigrating) {\n this._finishMigration();\n return;\n }\n\n var item = this._item;\n var itemId = item._id;\n\n // Stop auto-scroll.\n ItemDrag.autoScroller.removeItem(item);\n\n // Cancel queued ticks.\n cancelDragStartTick(itemId);\n cancelDragMoveTick(itemId);\n cancelDragScrollTick(itemId);\n\n // Cancel sort procedure.\n this._cancelSort();\n\n if (this._isStarted) {\n // Remove scroll listeners.\n this._unbindScrollListeners();\n\n var element = item._element;\n var grid = this._getGrid();\n var draggingClass = grid._settings.itemDraggingClass;\n\n // Append item element to the container if it's not it's child. Also make\n // sure the translate values are adjusted to account for the DOM shift.\n if (element.parentNode !== grid._element) {\n grid._element.appendChild(element);\n item._setTranslate(this._gridX, this._gridY);\n\n // We need to do forced reflow to make sure the dragging class is removed\n // gracefully.\n // eslint-disable-next-line\n if (draggingClass) element.clientWidth;\n }\n\n // Remove dragging class.\n removeClass(element, draggingClass);\n }\n\n // Reset drag data.\n this._reset();\n};\n\n/**\n * Manually trigger drag sort. This is only needed for special edge cases where\n * e.g. you have disabled sort and want to trigger a sort right after enabling\n * it (and don't want to wait for the next move/scroll event).\n *\n * @private\n * @param {Boolean} [force=false]\n */\nItemDrag.prototype.sort = function (force) {\n var item = this._item;\n if (this._isActive && item._isActive && this._dragMoveEvent) {\n if (force === true) {\n this._handleSort();\n } else {\n addDragSortTick(item._id, this._handleSort);\n }\n }\n};\n\n/**\n * Destroy instance.\n *\n * @public\n */\nItemDrag.prototype.destroy = function () {\n if (this._isDestroyed) return;\n this.stop();\n this._dragger.destroy();\n ItemDrag.autoScroller.removeItem(this._item);\n this._isDestroyed = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Get Grid instance.\n *\n * @private\n * @returns {?Grid}\n */\nItemDrag.prototype._getGrid = function () {\n return GRID_INSTANCES[this._gridId] || null;\n};\n\n/**\n * Setup/reset drag data.\n *\n * @private\n */\nItemDrag.prototype._reset = function () {\n this._isActive = false;\n this._isStarted = false;\n\n // The dragged item's container element.\n this._container = null;\n\n // The dragged item's containing block.\n this._containingBlock = null;\n\n // Drag/scroll event data.\n this._dragStartEvent = null;\n this._dragMoveEvent = null;\n this._dragPrevMoveEvent = null;\n this._scrollEvent = null;\n\n // All the elements which need to be listened for scroll events during\n // dragging.\n this._scrollers = [];\n\n // The current translateX/translateY position.\n this._left = 0;\n this._top = 0;\n\n // Dragged element's current position within the grid.\n this._gridX = 0;\n this._gridY = 0;\n\n // Dragged element's current offset from window's northwest corner. Does\n // not account for element's margins.\n this._clientX = 0;\n this._clientY = 0;\n\n // Keep track of the clientX/Y diff for scrolling.\n this._scrollDiffX = 0;\n this._scrollDiffY = 0;\n\n // Keep track of the clientX/Y diff for moving.\n this._moveDiffX = 0;\n this._moveDiffY = 0;\n\n // Offset difference between the dragged element's temporary drag\n // container and it's original container.\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n};\n\n/**\n * Bind drag scroll handlers to all scrollable ancestor elements of the\n * dragged element and the drag container element.\n *\n * @private\n */\nItemDrag.prototype._bindScrollListeners = function () {\n var gridContainer = this._getGrid()._element;\n var dragContainer = this._container;\n var scrollers = this._scrollers;\n var gridScrollers;\n var i;\n\n // Get dragged element's scrolling parents.\n scrollers.length = 0;\n getScrollableAncestors(this._item._element.parentNode, scrollers);\n\n // If drag container is defined and it's not the same element as grid\n // container then we need to add the grid container and it's scroll parents\n // to the elements which are going to be listener for scroll events.\n if (dragContainer !== gridContainer) {\n gridScrollers = [];\n getScrollableAncestors(gridContainer, gridScrollers);\n for (i = 0; i < gridScrollers.length; i++) {\n if (scrollers.indexOf(gridScrollers[i]) < 0) {\n scrollers.push(gridScrollers[i]);\n }\n }\n }\n\n // Bind scroll listeners.\n for (i = 0; i < scrollers.length; i++) {\n scrollers[i].addEventListener('scroll', this._onScroll, SCROLL_LISTENER_OPTIONS);\n }\n};\n\n/**\n * Unbind currently bound drag scroll handlers from all scrollable ancestor\n * elements of the dragged element and the drag container element.\n *\n * @private\n */\nItemDrag.prototype._unbindScrollListeners = function () {\n var scrollers = this._scrollers;\n var i;\n\n for (i = 0; i < scrollers.length; i++) {\n scrollers[i].removeEventListener('scroll', this._onScroll, SCROLL_LISTENER_OPTIONS);\n }\n\n scrollers.length = 0;\n};\n\n/**\n * Unbind currently bound drag scroll handlers from all scrollable ancestor\n * elements of the dragged element and the drag container element.\n *\n * @private\n * @param {Object} event\n * @returns {Boolean}\n */\nItemDrag.prototype._resolveStartPredicate = function (event) {\n var predicate = this._startPredicateData;\n if (event.distance < predicate.distance || predicate.delay) return;\n this._resetStartPredicate();\n return true;\n};\n\n/**\n * Forcefully resolve drag start predicate.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._forceResolveStartPredicate = function (event) {\n if (!this._isDestroyed && this._startPredicateState === START_PREDICATE_PENDING) {\n this._startPredicateState = START_PREDICATE_RESOLVED;\n this._onStart(event);\n }\n};\n\n/**\n * Finalize start predicate.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._finishStartPredicate = function (event) {\n var element = this._item._element;\n\n // Check if this is a click (very subjective heuristics).\n var isClick = Math.abs(event.deltaX) < 2 && Math.abs(event.deltaY) < 2 && event.deltaTime < 200;\n\n // Reset predicate.\n this._resetStartPredicate();\n\n // If the gesture can be interpreted as click let's try to open the element's\n // href url (if it is an anchor element).\n if (isClick) openAnchorHref(element);\n};\n\n/**\n * Reset drag sort heuristics.\n *\n * @private\n * @param {Number} x\n * @param {Number} y\n */\nItemDrag.prototype._resetHeuristics = function (x, y) {\n this._blockedSortIndex = null;\n this._sortX1 = this._sortX2 = x;\n this._sortY1 = this._sortY2 = y;\n};\n\n/**\n * Run heuristics and return true if overlap check can be performed, and false\n * if it can not.\n *\n * @private\n * @param {Number} x\n * @param {Number} y\n * @returns {Boolean}\n */\nItemDrag.prototype._checkHeuristics = function (x, y) {\n var settings = this._getGrid()._settings.dragSortHeuristics;\n var minDist = settings.minDragDistance;\n\n // Skip heuristics if not needed.\n if (minDist <= 0) {\n this._blockedSortIndex = null;\n return true;\n }\n\n var diffX = x - this._sortX2;\n var diffY = y - this._sortY2;\n\n // If we can't do proper bounce back check make sure that the blocked index\n // is not set.\n var canCheckBounceBack = minDist > 3 && settings.minBounceBackAngle > 0;\n if (!canCheckBounceBack) {\n this._blockedSortIndex = null;\n }\n\n if (Math.abs(diffX) > minDist || Math.abs(diffY) > minDist) {\n // Reset blocked index if angle changed enough. This check requires a\n // minimum value of 3 for minDragDistance to function properly.\n if (canCheckBounceBack) {\n var angle = Math.atan2(diffX, diffY);\n var prevAngle = Math.atan2(this._sortX2 - this._sortX1, this._sortY2 - this._sortY1);\n var deltaAngle = Math.atan2(Math.sin(angle - prevAngle), Math.cos(angle - prevAngle));\n if (Math.abs(deltaAngle) > settings.minBounceBackAngle) {\n this._blockedSortIndex = null;\n }\n }\n\n // Update points.\n this._sortX1 = this._sortX2;\n this._sortY1 = this._sortY2;\n this._sortX2 = x;\n this._sortY2 = y;\n\n return true;\n }\n\n return false;\n};\n\n/**\n * Reset for default drag start predicate function.\n *\n * @private\n */\nItemDrag.prototype._resetStartPredicate = function () {\n var predicate = this._startPredicateData;\n if (predicate) {\n if (predicate.delayTimer) {\n predicate.delayTimer = window.clearTimeout(predicate.delayTimer);\n }\n this._startPredicateData = null;\n }\n};\n\n/**\n * Handle the sorting procedure. Manage drag sort heuristics/interval and\n * check overlap when necessary.\n *\n * @private\n */\nItemDrag.prototype._handleSort = function () {\n if (!this._isActive) return;\n\n var settings = this._getGrid()._settings;\n\n // No sorting when drag sort is disabled. Also, account for the scenario where\n // dragSort is temporarily disabled during drag procedure so we need to reset\n // sort timer heuristics state too.\n if (\n !settings.dragSort ||\n (!settings.dragAutoScroll.sortDuringScroll && ItemDrag.autoScroller.isItemScrolling(this._item))\n ) {\n this._sortX1 = this._sortX2 = this._gridX;\n this._sortY1 = this._sortY2 = this._gridY;\n // We set this to true intentionally so that overlap check would be\n // triggered as soon as possible after sort becomes enabled again.\n this._isSortNeeded = true;\n if (this._sortTimer !== undefined) {\n this._sortTimer = window.clearTimeout(this._sortTimer);\n }\n return;\n }\n\n // If sorting is enabled we always need to run the heuristics check to keep\n // the tracked coordinates updated. We also allow an exception when the sort\n // timer is finished because the heuristics are intended to prevent overlap\n // checks based on the dragged element's immediate movement and a delayed\n // overlap check is valid if it comes through, because it was valid when it\n // was invoked.\n var shouldSort = this._checkHeuristics(this._gridX, this._gridY);\n if (!this._isSortNeeded && !shouldSort) return;\n\n var sortInterval = settings.dragSortHeuristics.sortInterval;\n if (sortInterval <= 0 || this._isSortNeeded) {\n this._isSortNeeded = false;\n if (this._sortTimer !== undefined) {\n this._sortTimer = window.clearTimeout(this._sortTimer);\n }\n this._checkOverlap();\n } else if (this._sortTimer === undefined) {\n this._sortTimer = window.setTimeout(this._handleSortDelayed, sortInterval);\n }\n};\n\n/**\n * Delayed sort handler.\n *\n * @private\n */\nItemDrag.prototype._handleSortDelayed = function () {\n this._isSortNeeded = true;\n this._sortTimer = undefined;\n addDragSortTick(this._item._id, this._handleSort);\n};\n\n/**\n * Cancel and reset sort procedure.\n *\n * @private\n */\nItemDrag.prototype._cancelSort = function () {\n this._isSortNeeded = false;\n if (this._sortTimer !== undefined) {\n this._sortTimer = window.clearTimeout(this._sortTimer);\n }\n cancelDragSortTick(this._item._id);\n};\n\n/**\n * Handle the ending of the drag procedure for sorting.\n *\n * @private\n */\nItemDrag.prototype._finishSort = function () {\n var isSortEnabled = this._getGrid()._settings.dragSort;\n var needsFinalCheck = isSortEnabled && (this._isSortNeeded || this._sortTimer !== undefined);\n this._cancelSort();\n if (needsFinalCheck) this._checkOverlap();\n};\n\n/**\n * Check (during drag) if an item is overlapping other items and based on\n * the configuration layout the items.\n *\n * @private\n */\nItemDrag.prototype._checkOverlap = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n var settings = this._getGrid()._settings;\n var result;\n var currentGrid;\n var currentIndex;\n var targetGrid;\n var targetIndex;\n var targetItem;\n var sortAction;\n var isMigration;\n\n // Get overlap check result.\n if (isFunction(settings.dragSortPredicate)) {\n result = settings.dragSortPredicate(item, this._dragMoveEvent);\n } else {\n result = ItemDrag.defaultSortPredicate(item, settings.dragSortPredicate);\n }\n\n // Let's make sure the result object has a valid index before going further.\n if (!result || typeof result.index !== 'number') return;\n\n sortAction = result.action === ACTION_SWAP ? ACTION_SWAP : ACTION_MOVE;\n currentGrid = item.getGrid();\n targetGrid = result.grid || currentGrid;\n isMigration = currentGrid !== targetGrid;\n currentIndex = currentGrid._items.indexOf(item);\n targetIndex = normalizeArrayIndex(\n targetGrid._items,\n result.index,\n isMigration && sortAction === ACTION_MOVE ? 1 : 0\n );\n\n // Prevent position bounce.\n if (!isMigration && targetIndex === this._blockedSortIndex) {\n return;\n }\n\n // If the item was moved within it's current grid.\n if (!isMigration) {\n // Make sure the target index is not the current index.\n if (currentIndex !== targetIndex) {\n this._blockedSortIndex = currentIndex;\n\n // Do the sort.\n (sortAction === ACTION_SWAP ? arraySwap : arrayMove)(\n currentGrid._items,\n currentIndex,\n targetIndex\n );\n\n // Emit move event.\n if (currentGrid._hasListeners(EVENT_MOVE)) {\n currentGrid._emit(EVENT_MOVE, {\n item: item,\n fromIndex: currentIndex,\n toIndex: targetIndex,\n action: sortAction,\n });\n }\n\n // Layout the grid.\n currentGrid.layout();\n }\n }\n\n // If the item was moved to another grid.\n else {\n this._blockedSortIndex = null;\n\n // Let's fetch the target item when it's still in it's original index.\n targetItem = targetGrid._items[targetIndex];\n\n // Emit beforeSend event.\n if (currentGrid._hasListeners(EVENT_BEFORE_SEND)) {\n currentGrid._emit(EVENT_BEFORE_SEND, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Emit beforeReceive event.\n if (targetGrid._hasListeners(EVENT_BEFORE_RECEIVE)) {\n targetGrid._emit(EVENT_BEFORE_RECEIVE, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Update item's grid id reference.\n item._gridId = targetGrid._id;\n\n // Update drag instance's migrating indicator.\n this._isMigrating = item._gridId !== this._gridId;\n\n // Move item instance from current grid to target grid.\n currentGrid._items.splice(currentIndex, 1);\n arrayInsert(targetGrid._items, item, targetIndex);\n\n // Reset sort data.\n item._sortData = null;\n\n // Emit send event.\n if (currentGrid._hasListeners(EVENT_SEND)) {\n currentGrid._emit(EVENT_SEND, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Emit receive event.\n if (targetGrid._hasListeners(EVENT_RECEIVE)) {\n targetGrid._emit(EVENT_RECEIVE, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // If the sort action is \"swap\" let's respect it and send the target item\n // (if it exists) from the target grid to the originating grid. This process\n // is done on purpose after the dragged item placed within the target grid\n // so that we can keep this implementation as simple as possible utilizing\n // the existing API.\n if (sortAction === ACTION_SWAP && targetItem && targetItem.isActive()) {\n // Sanity check to make sure that the target item is still part of the\n // target grid. It could have been manipulated in the event handlers.\n if (targetGrid._items.indexOf(targetItem) > -1) {\n targetGrid.send(targetItem, currentGrid, currentIndex, {\n appendTo: this._container || document.body,\n layoutSender: false,\n layoutReceiver: false,\n });\n }\n }\n\n // Layout both grids.\n currentGrid.layout();\n targetGrid.layout();\n }\n};\n\n/**\n * If item is dragged into another grid, finish the migration process\n * gracefully.\n *\n * @private\n */\nItemDrag.prototype._finishMigration = function () {\n var item = this._item;\n var release = item._dragRelease;\n var element = item._element;\n var isActive = item._isActive;\n var targetGrid = item.getGrid();\n var targetGridElement = targetGrid._element;\n var targetSettings = targetGrid._settings;\n var targetContainer = targetSettings.dragContainer || targetGridElement;\n var currentSettings = this._getGrid()._settings;\n var currentContainer = element.parentNode;\n var currentVisClass = isActive\n ? currentSettings.itemVisibleClass\n : currentSettings.itemHiddenClass;\n var nextVisClass = isActive ? targetSettings.itemVisibleClass : targetSettings.itemHiddenClass;\n var translate;\n var offsetDiff;\n\n // Destroy current drag. Note that we need to set the migrating flag to\n // false first, because otherwise we create an infinite loop between this\n // and the drag.stop() method.\n this._isMigrating = false;\n this.destroy();\n\n // Update item class.\n if (currentSettings.itemClass !== targetSettings.itemClass) {\n removeClass(element, currentSettings.itemClass);\n addClass(element, targetSettings.itemClass);\n }\n\n // Update visibility class.\n if (currentVisClass !== nextVisClass) {\n removeClass(element, currentVisClass);\n addClass(element, nextVisClass);\n }\n\n // Move the item inside the target container if it's different than the\n // current container.\n if (targetContainer !== currentContainer) {\n targetContainer.appendChild(element);\n offsetDiff = getOffsetDiff(currentContainer, targetContainer, true);\n translate = getTranslate(element);\n translate.x -= offsetDiff.left;\n translate.y -= offsetDiff.top;\n }\n\n // Update item's cached dimensions.\n item._refreshDimensions();\n\n // Calculate the offset difference between target's drag container (if any)\n // and actual grid container element. We save it later for the release\n // process.\n offsetDiff = getOffsetDiff(targetContainer, targetGridElement, true);\n release._containerDiffX = offsetDiff.left;\n release._containerDiffY = offsetDiff.top;\n\n // Recreate item's drag handler.\n item._drag = targetSettings.dragEnabled ? new ItemDrag(item) : null;\n\n // Adjust the position of the item element if it was moved from a container\n // to another.\n if (targetContainer !== currentContainer) {\n item._setTranslate(translate.x, translate.y);\n }\n\n // Update child element's styles to reflect the current visibility state.\n item._visibility.setStyles(isActive ? targetSettings.visibleStyles : targetSettings.hiddenStyles);\n\n // Start the release.\n release.start();\n};\n\n/**\n * Drag pre-start handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._preStartCheck = function (event) {\n // Let's activate drag start predicate state.\n if (this._startPredicateState === START_PREDICATE_INACTIVE) {\n this._startPredicateState = START_PREDICATE_PENDING;\n }\n\n // If predicate is pending try to resolve it.\n if (this._startPredicateState === START_PREDICATE_PENDING) {\n this._startPredicateResult = this._startPredicate(this._item, event);\n if (this._startPredicateResult === true) {\n this._startPredicateState = START_PREDICATE_RESOLVED;\n this._onStart(event);\n } else if (this._startPredicateResult === false) {\n this._resetStartPredicate(event);\n this._dragger._reset();\n this._startPredicateState = START_PREDICATE_INACTIVE;\n }\n }\n\n // Otherwise if predicate is resolved and drag is active, move the item.\n else if (this._startPredicateState === START_PREDICATE_RESOLVED && this._isActive) {\n this._onMove(event);\n }\n};\n\n/**\n * Drag pre-end handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._preEndCheck = function (event) {\n var isResolved = this._startPredicateState === START_PREDICATE_RESOLVED;\n\n // Do final predicate check to allow user to unbind stuff for the current\n // drag procedure within the predicate callback. The return value of this\n // check will have no effect to the state of the predicate.\n this._startPredicate(this._item, event);\n\n this._startPredicateState = START_PREDICATE_INACTIVE;\n\n if (!isResolved || !this._isActive) return;\n\n if (this._isStarted) {\n this._onEnd(event);\n } else {\n this.stop();\n }\n};\n\n/**\n * Drag start handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._onStart = function (event) {\n var item = this._item;\n if (!item._isActive) return;\n\n this._isActive = true;\n this._dragStartEvent = event;\n ItemDrag.autoScroller.addItem(item);\n\n addDragStartTick(item._id, this._prepareStart, this._applyStart);\n};\n\n/**\n * Prepare item to be dragged.\n *\n * @private\n * ItemDrag.prototype\n */\nItemDrag.prototype._prepareStart = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n var element = item._element;\n var grid = this._getGrid();\n var settings = grid._settings;\n var gridContainer = grid._element;\n var dragContainer = settings.dragContainer || gridContainer;\n var containingBlock = getContainingBlock(dragContainer);\n var translate = getTranslate(element);\n var elementRect = element.getBoundingClientRect();\n var hasDragContainer = dragContainer !== gridContainer;\n\n this._container = dragContainer;\n this._containingBlock = containingBlock;\n this._clientX = elementRect.left;\n this._clientY = elementRect.top;\n this._left = this._gridX = translate.x;\n this._top = this._gridY = translate.y;\n this._scrollDiffX = this._scrollDiffY = 0;\n this._moveDiffX = this._moveDiffY = 0;\n\n this._resetHeuristics(this._gridX, this._gridY);\n\n // If a specific drag container is set and it is different from the\n // grid's container element we store the offset between containers.\n if (hasDragContainer) {\n var offsetDiff = getOffsetDiff(containingBlock, gridContainer);\n this._containerDiffX = offsetDiff.left;\n this._containerDiffY = offsetDiff.top;\n }\n};\n\n/**\n * Start drag for the item.\n *\n * @private\n */\nItemDrag.prototype._applyStart = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n var grid = this._getGrid();\n var element = item._element;\n var release = item._dragRelease;\n var migrate = item._migrate;\n var hasDragContainer = this._container !== grid._element;\n\n if (item.isPositioning()) {\n item._layout.stop(true, this._left, this._top);\n }\n\n if (migrate._isActive) {\n this._left -= migrate._containerDiffX;\n this._top -= migrate._containerDiffY;\n this._gridX -= migrate._containerDiffX;\n this._gridY -= migrate._containerDiffY;\n migrate.stop(true, this._left, this._top);\n }\n\n if (item.isReleasing()) {\n release._reset();\n }\n\n if (grid._settings.dragPlaceholder.enabled) {\n item._dragPlaceholder.create();\n }\n\n this._isStarted = true;\n\n grid._emit(EVENT_DRAG_INIT, item, this._dragStartEvent);\n\n if (hasDragContainer) {\n // If the dragged element is a child of the drag container all we need to\n // do is setup the relative drag position data.\n if (element.parentNode === this._container) {\n this._gridX -= this._containerDiffX;\n this._gridY -= this._containerDiffY;\n }\n // Otherwise we need to append the element inside the correct container,\n // setup the actual drag position data and adjust the element's translate\n // values to account for the DOM position shift.\n else {\n this._left += this._containerDiffX;\n this._top += this._containerDiffY;\n this._container.appendChild(element);\n item._setTranslate(this._left, this._top);\n }\n }\n\n addClass(element, grid._settings.itemDraggingClass);\n this._bindScrollListeners();\n grid._emit(EVENT_DRAG_START, item, this._dragStartEvent);\n};\n\n/**\n * Drag move handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._onMove = function (event) {\n var item = this._item;\n\n if (!item._isActive) {\n this.stop();\n return;\n }\n\n this._dragMoveEvent = event;\n addDragMoveTick(item._id, this._prepareMove, this._applyMove);\n addDragSortTick(item._id, this._handleSort);\n};\n\n/**\n * Prepare dragged item for moving.\n *\n * @private\n */\nItemDrag.prototype._prepareMove = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n var settings = this._getGrid()._settings;\n var axis = settings.dragAxis;\n var nextEvent = this._dragMoveEvent;\n var prevEvent = this._dragPrevMoveEvent || this._dragStartEvent || nextEvent;\n\n // Update horizontal position data.\n if (axis !== 'y') {\n var moveDiffX = nextEvent.clientX - prevEvent.clientX;\n this._left = this._left - this._moveDiffX + moveDiffX;\n this._gridX = this._gridX - this._moveDiffX + moveDiffX;\n this._clientX = this._clientX - this._moveDiffX + moveDiffX;\n this._moveDiffX = moveDiffX;\n }\n\n // Update vertical position data.\n if (axis !== 'x') {\n var moveDiffY = nextEvent.clientY - prevEvent.clientY;\n this._top = this._top - this._moveDiffY + moveDiffY;\n this._gridY = this._gridY - this._moveDiffY + moveDiffY;\n this._clientY = this._clientY - this._moveDiffY + moveDiffY;\n this._moveDiffY = moveDiffY;\n }\n\n this._dragPrevMoveEvent = nextEvent;\n};\n\n/**\n * Apply movement to dragged item.\n *\n * @private\n */\nItemDrag.prototype._applyMove = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n this._moveDiffX = this._moveDiffY = 0;\n item._setTranslate(this._left, this._top);\n this._getGrid()._emit(EVENT_DRAG_MOVE, item, this._dragMoveEvent);\n ItemDrag.autoScroller.updateItem(item);\n};\n\n/**\n * Drag scroll handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._onScroll = function (event) {\n var item = this._item;\n\n if (!item._isActive) {\n this.stop();\n return;\n }\n\n this._scrollEvent = event;\n addDragScrollTick(item._id, this._prepareScroll, this._applyScroll);\n addDragSortTick(item._id, this._handleSort);\n};\n\n/**\n * Prepare dragged item for scrolling.\n *\n * @private\n */\nItemDrag.prototype._prepareScroll = function () {\n if (!this._isActive) return;\n\n // If item is not active do nothing.\n var item = this._item;\n if (!item._isActive) return;\n\n var element = item._element;\n var grid = this._getGrid();\n var gridContainer = grid._element;\n var rect = element.getBoundingClientRect();\n\n // Update container diff.\n if (this._container !== gridContainer) {\n var offsetDiff = getOffsetDiff(this._containingBlock, gridContainer);\n this._containerDiffX = offsetDiff.left;\n this._containerDiffY = offsetDiff.top;\n }\n\n // Update horizontal position data.\n var scrollDiffX = this._clientX - this._moveDiffX - rect.left;\n this._left = this._left - this._scrollDiffX + scrollDiffX;\n this._scrollDiffX = scrollDiffX;\n\n // Update vertical position data.\n var scrollDiffY = this._clientY - this._moveDiffY - rect.top;\n this._top = this._top - this._scrollDiffY + scrollDiffY;\n this._scrollDiffY = scrollDiffY;\n\n // Update grid position.\n this._gridX = this._left - this._containerDiffX;\n this._gridY = this._top - this._containerDiffY;\n};\n\n/**\n * Apply scroll to dragged item.\n *\n * @private\n */\nItemDrag.prototype._applyScroll = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n this._scrollDiffX = this._scrollDiffY = 0;\n item._setTranslate(this._left, this._top);\n this._getGrid()._emit(EVENT_DRAG_SCROLL, item, this._scrollEvent);\n};\n\n/**\n * Drag end handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._onEnd = function (event) {\n var item = this._item;\n var element = item._element;\n var grid = this._getGrid();\n var settings = grid._settings;\n var release = item._dragRelease;\n\n // If item is not active, reset drag.\n if (!item._isActive) {\n this.stop();\n return;\n }\n\n // Cancel queued ticks.\n cancelDragStartTick(item._id);\n cancelDragMoveTick(item._id);\n cancelDragScrollTick(item._id);\n\n // Finish sort procedure (does final overlap check if needed).\n this._finishSort();\n\n // Remove scroll listeners.\n this._unbindScrollListeners();\n\n // Setup release data.\n release._containerDiffX = this._containerDiffX;\n release._containerDiffY = this._containerDiffY;\n\n // Reset drag data.\n this._reset();\n\n // Remove drag class name from element.\n removeClass(element, settings.itemDraggingClass);\n\n // Stop auto-scroll.\n ItemDrag.autoScroller.removeItem(item);\n\n // Emit dragEnd event.\n grid._emit(EVENT_DRAG_END, item, event);\n\n // Finish up the migration process or start the release process.\n this._isMigrating ? this._finishMigration() : release.start();\n};\n\n/**\n * Private helpers\n * ***************\n */\n\n/**\n * Check if an element is an anchor element and open the href url if possible.\n *\n * @param {HTMLElement} element\n */\nfunction openAnchorHref(element) {\n // Make sure the element is anchor element.\n if (element.tagName.toLowerCase() !== 'a') return;\n\n // Get href and make sure it exists.\n var href = element.getAttribute('href');\n if (!href) return;\n\n // Finally let's navigate to the link href.\n var target = element.getAttribute('target');\n if (target && target !== '_self') {\n window.open(href, target);\n } else {\n window.location.href = href;\n }\n}\n\n/**\n * Get current values of the provided styles definition object or array.\n *\n * @param {HTMLElement} element\n * @param {(Object|Array} styles\n * @return {Object}\n */\nfunction getCurrentStyles(element, styles) {\n var result = {};\n var prop, i;\n\n if (Array.isArray(styles)) {\n for (i = 0; i < styles.length; i++) {\n prop = styles[i];\n result[prop] = getStyle(element, getStyleName(prop));\n }\n } else {\n for (prop in styles) {\n result[prop] = getStyle(element, getStyleName(prop));\n }\n }\n\n return result;\n}\n\nvar unprefixRegEx = /^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/;\nvar cache = {};\n\n/**\n * Remove any potential vendor prefixes from a property name.\n *\n * @param {String} prop\n * @returns {String}\n */\nfunction getUnprefixedPropName(prop) {\n var result = cache[prop];\n if (result) return result;\n\n result = prop.replace(unprefixRegEx, '');\n\n if (result !== prop) {\n result = result[0].toLowerCase() + result.slice(1);\n }\n\n cache[prop] = result;\n\n return result;\n}\n\nvar nativeCode = '[native code]';\n\n/**\n * Check if a value (e.g. a method or constructor) is native code. Good for\n * detecting when a polyfill is used and when not.\n *\n * @param {*} feat\n * @returns {Boolean}\n */\nfunction isNative(feat) {\n var S = window.Symbol;\n return !!(\n feat &&\n isFunction(S) &&\n isFunction(S.toString) &&\n S(feat).toString().indexOf(nativeCode) > -1\n );\n}\n\n/**\n * Set inline styles to an element.\n *\n * @param {HTMLElement} element\n * @param {Object} styles\n */\nfunction setStyles(element, styles) {\n for (var prop in styles) {\n element.style[prop] = styles[prop];\n }\n}\n\nvar HAS_WEB_ANIMATIONS = !!(Element && isFunction(Element.prototype.animate));\nvar HAS_NATIVE_WEB_ANIMATIONS = !!(Element && isNative(Element.prototype.animate));\n\n/**\n * Item animation handler powered by Web Animations API.\n *\n * @class\n * @param {HTMLElement} element\n */\nfunction Animator(element) {\n this._element = element;\n this._animation = null;\n this._duration = 0;\n this._easing = '';\n this._callback = null;\n this._props = [];\n this._values = [];\n this._isDestroyed = false;\n this._onFinish = this._onFinish.bind(this);\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Start instance's animation. Automatically stops current animation if it is\n * running.\n *\n * @public\n * @param {Object} propsFrom\n * @param {Object} propsTo\n * @param {Object} [options]\n * @param {Number} [options.duration=300]\n * @param {String} [options.easing='ease']\n * @param {Function} [options.onFinish]\n */\nAnimator.prototype.start = function (propsFrom, propsTo, options) {\n if (this._isDestroyed) return;\n\n var element = this._element;\n var opts = options || {};\n\n // If we don't have web animations available let's not animate.\n if (!HAS_WEB_ANIMATIONS) {\n setStyles(element, propsTo);\n this._callback = isFunction(opts.onFinish) ? opts.onFinish : null;\n this._onFinish();\n return;\n }\n\n var animation = this._animation;\n var currentProps = this._props;\n var currentValues = this._values;\n var duration = opts.duration || 300;\n var easing = opts.easing || 'ease';\n var cancelAnimation = false;\n var propName, propCount, propIndex;\n\n // If we have an existing animation running, let's check if it needs to be\n // cancelled or if it can continue running.\n if (animation) {\n propCount = 0;\n\n // Cancel animation if duration or easing has changed.\n if (duration !== this._duration || easing !== this._easing) {\n cancelAnimation = true;\n }\n\n // Check if the requested animation target props and values match with the\n // current props and values.\n if (!cancelAnimation) {\n for (propName in propsTo) {\n ++propCount;\n propIndex = currentProps.indexOf(propName);\n if (propIndex === -1 || propsTo[propName] !== currentValues[propIndex]) {\n cancelAnimation = true;\n break;\n }\n }\n\n // Check if the target props count matches current props count. This is\n // needed for the edge case scenario where target props contain the same\n // styles as current props, but the current props have some additional\n // props.\n if (propCount !== currentProps.length) {\n cancelAnimation = true;\n }\n }\n }\n\n // Cancel animation (if required).\n if (cancelAnimation) animation.cancel();\n\n // Store animation callback.\n this._callback = isFunction(opts.onFinish) ? opts.onFinish : null;\n\n // If we have a running animation that does not need to be cancelled, let's\n // call it a day here and let it run.\n if (animation && !cancelAnimation) return;\n\n // Store target props and values to instance.\n currentProps.length = currentValues.length = 0;\n for (propName in propsTo) {\n currentProps.push(propName);\n currentValues.push(propsTo[propName]);\n }\n\n // Start the animation. We need to provide unprefixed property names to the\n // Web Animations polyfill if it is being used. If we have native Web\n // Animations available we need to provide prefixed properties instead.\n this._duration = duration;\n this._easing = easing;\n this._animation = element.animate(\n [\n createFrame(propsFrom, HAS_NATIVE_WEB_ANIMATIONS),\n createFrame(propsTo, HAS_NATIVE_WEB_ANIMATIONS),\n ],\n {\n duration: duration,\n easing: easing,\n }\n );\n this._animation.onfinish = this._onFinish;\n\n // Set the end styles. This makes sure that the element stays at the end\n // values after animation is finished.\n setStyles(element, propsTo);\n};\n\n/**\n * Stop instance's current animation if running.\n *\n * @public\n */\nAnimator.prototype.stop = function () {\n if (this._isDestroyed || !this._animation) return;\n this._animation.cancel();\n this._animation = this._callback = null;\n this._props.length = this._values.length = 0;\n};\n\n/**\n * Read the current values of the element's animated styles from the DOM.\n *\n * @public\n * @return {Object}\n */\nAnimator.prototype.getCurrentStyles = function () {\n return getCurrentStyles(element, currentProps);\n};\n\n/**\n * Check if the item is being animated currently.\n *\n * @public\n * @return {Boolean}\n */\nAnimator.prototype.isAnimating = function () {\n return !!this._animation;\n};\n\n/**\n * Destroy the instance and stop current animation if it is running.\n *\n * @public\n */\nAnimator.prototype.destroy = function () {\n if (this._isDestroyed) return;\n this.stop();\n this._element = null;\n this._isDestroyed = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Animation end handler.\n *\n * @private\n */\nAnimator.prototype._onFinish = function () {\n var callback = this._callback;\n this._animation = this._callback = null;\n this._props.length = this._values.length = 0;\n callback && callback();\n};\n\n/**\n * Private helpers\n * ***************\n */\n\nfunction createFrame(props, prefix) {\n var frame = {};\n for (var prop in props) {\n frame[prefix ? prop : getUnprefixedPropName(prop)] = props[prop];\n }\n return frame;\n}\n\n/**\n * Transform translateX and translateY value into CSS transform style\n * property's value.\n *\n * @param {Number} x\n * @param {Number} y\n * @returns {String}\n */\nfunction getTranslateString(x, y) {\n return 'translateX(' + x + 'px) translateY(' + y + 'px)';\n}\n\n/**\n * Drag placeholder.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemDragPlaceholder(item) {\n this._item = item;\n this._animation = new Animator();\n this._element = null;\n this._className = '';\n this._didMigrate = false;\n this._resetAfterLayout = false;\n this._left = 0;\n this._top = 0;\n this._transX = 0;\n this._transY = 0;\n this._nextTransX = 0;\n this._nextTransY = 0;\n\n // Bind animation handlers.\n this._setupAnimation = this._setupAnimation.bind(this);\n this._startAnimation = this._startAnimation.bind(this);\n this._updateDimensions = this._updateDimensions.bind(this);\n\n // Bind event handlers.\n this._onLayoutStart = this._onLayoutStart.bind(this);\n this._onLayoutEnd = this._onLayoutEnd.bind(this);\n this._onReleaseEnd = this._onReleaseEnd.bind(this);\n this._onMigrate = this._onMigrate.bind(this);\n this._onHide = this._onHide.bind(this);\n}\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Update placeholder's dimensions to match the item's dimensions.\n *\n * @private\n */\nItemDragPlaceholder.prototype._updateDimensions = function () {\n if (!this.isActive()) return;\n setStyles(this._element, {\n width: this._item._width + 'px',\n height: this._item._height + 'px',\n });\n};\n\n/**\n * Move placeholder to a new position.\n *\n * @private\n * @param {Item[]} items\n * @param {Boolean} isInstant\n */\nItemDragPlaceholder.prototype._onLayoutStart = function (items, isInstant) {\n var item = this._item;\n\n // If the item is not part of the layout anymore reset placeholder.\n if (items.indexOf(item) === -1) {\n this.reset();\n return;\n }\n\n var nextLeft = item._left;\n var nextTop = item._top;\n var currentLeft = this._left;\n var currentTop = this._top;\n\n // Keep track of item layout position.\n this._left = nextLeft;\n this._top = nextTop;\n\n // If item's position did not change, and the item did not migrate and the\n // layout is not instant and we can safely skip layout.\n if (!isInstant && !this._didMigrate && currentLeft === nextLeft && currentTop === nextTop) {\n return;\n }\n\n // Slots data is calculated with item margins added to them so we need to add\n // item's left and top margin to the slot data to get the placeholder's\n // next position.\n var nextX = nextLeft + item._marginLeft;\n var nextY = nextTop + item._marginTop;\n\n // Just snap to new position without any animations if no animation is\n // required or if placeholder moves between grids.\n var grid = item.getGrid();\n var animEnabled = !isInstant && grid._settings.layoutDuration > 0;\n if (!animEnabled || this._didMigrate) {\n // Cancel potential (queued) layout tick.\n cancelPlaceholderLayoutTick(item._id);\n\n // Snap placeholder to correct position.\n this._element.style[transformProp] = getTranslateString(nextX, nextY);\n this._animation.stop();\n\n // Move placeholder inside correct container after migration.\n if (this._didMigrate) {\n grid.getElement().appendChild(this._element);\n this._didMigrate = false;\n }\n\n return;\n }\n\n // Start the placeholder's layout animation in the next tick. We do this to\n // avoid layout thrashing.\n this._nextTransX = nextX;\n this._nextTransY = nextY;\n addPlaceholderLayoutTick(item._id, this._setupAnimation, this._startAnimation);\n};\n\n/**\n * Prepare placeholder for layout animation.\n *\n * @private\n */\nItemDragPlaceholder.prototype._setupAnimation = function () {\n if (!this.isActive()) return;\n\n var translate = getTranslate(this._element);\n this._transX = translate.x;\n this._transY = translate.y;\n};\n\n/**\n * Start layout animation.\n *\n * @private\n */\nItemDragPlaceholder.prototype._startAnimation = function () {\n if (!this.isActive()) return;\n\n var animation = this._animation;\n var currentX = this._transX;\n var currentY = this._transY;\n var nextX = this._nextTransX;\n var nextY = this._nextTransY;\n\n // If placeholder is already in correct position let's just stop animation\n // and be done with it.\n if (currentX === nextX && currentY === nextY) {\n if (animation.isAnimating()) {\n this._element.style[transformProp] = getTranslateString(nextX, nextY);\n animation.stop();\n }\n return;\n }\n\n // Otherwise let's start the animation.\n var settings = this._item.getGrid()._settings;\n var currentStyles = {};\n var targetStyles = {};\n currentStyles[transformProp] = getTranslateString(currentX, currentY);\n targetStyles[transformProp] = getTranslateString(nextX, nextY);\n animation.start(currentStyles, targetStyles, {\n duration: settings.layoutDuration,\n easing: settings.layoutEasing,\n onFinish: this._onLayoutEnd,\n });\n};\n\n/**\n * Layout end handler.\n *\n * @private\n */\nItemDragPlaceholder.prototype._onLayoutEnd = function () {\n if (this._resetAfterLayout) {\n this.reset();\n }\n};\n\n/**\n * Drag end handler. This handler is called when dragReleaseEnd event is\n * emitted and receives the event data as it's argument.\n *\n * @private\n * @param {Item} item\n */\nItemDragPlaceholder.prototype._onReleaseEnd = function (item) {\n if (item._id === this._item._id) {\n // If the placeholder is not animating anymore we can safely reset it.\n if (!this._animation.isAnimating()) {\n this.reset();\n return;\n }\n\n // If the placeholder item is still animating here, let's wait for it to\n // finish it's animation.\n this._resetAfterLayout = true;\n }\n};\n\n/**\n * Migration start handler. This handler is called when beforeSend event is\n * emitted and receives the event data as it's argument.\n *\n * @private\n * @param {Object} data\n * @param {Item} data.item\n * @param {Grid} data.fromGrid\n * @param {Number} data.fromIndex\n * @param {Grid} data.toGrid\n * @param {Number} data.toIndex\n */\nItemDragPlaceholder.prototype._onMigrate = function (data) {\n // Make sure we have a matching item.\n if (data.item !== this._item) return;\n\n var grid = this._item.getGrid();\n var nextGrid = data.toGrid;\n\n // Unbind listeners from current grid.\n grid.off(EVENT_DRAG_RELEASE_END, this._onReleaseEnd);\n grid.off(EVENT_LAYOUT_START, this._onLayoutStart);\n grid.off(EVENT_BEFORE_SEND, this._onMigrate);\n grid.off(EVENT_HIDE_START, this._onHide);\n\n // Bind listeners to the next grid.\n nextGrid.on(EVENT_DRAG_RELEASE_END, this._onReleaseEnd);\n nextGrid.on(EVENT_LAYOUT_START, this._onLayoutStart);\n nextGrid.on(EVENT_BEFORE_SEND, this._onMigrate);\n nextGrid.on(EVENT_HIDE_START, this._onHide);\n\n // Mark the item as migrated.\n this._didMigrate = true;\n};\n\n/**\n * Reset placeholder if the associated item is hidden.\n *\n * @private\n * @param {Item[]} items\n */\nItemDragPlaceholder.prototype._onHide = function (items) {\n if (items.indexOf(this._item) > -1) this.reset();\n};\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Create placeholder. Note that this method only writes to DOM and does not\n * read anything from DOM so it should not cause any additional layout\n * thrashing when it's called at the end of the drag start procedure.\n *\n * @public\n */\nItemDragPlaceholder.prototype.create = function () {\n // If we already have placeholder set up we can skip the initiation logic.\n if (this.isActive()) {\n this._resetAfterLayout = false;\n return;\n }\n\n var item = this._item;\n var grid = item.getGrid();\n var settings = grid._settings;\n var animation = this._animation;\n\n // Keep track of layout position.\n this._left = item._left;\n this._top = item._top;\n\n // Create placeholder element.\n var element;\n if (isFunction(settings.dragPlaceholder.createElement)) {\n element = settings.dragPlaceholder.createElement(item);\n } else {\n element = document.createElement('div');\n }\n this._element = element;\n\n // Update element to animation instance.\n animation._element = element;\n\n // Add placeholder class to the placeholder element.\n this._className = settings.itemPlaceholderClass || '';\n if (this._className) {\n addClass(element, this._className);\n }\n\n // Set initial styles.\n setStyles(element, {\n position: 'absolute',\n left: '0px',\n top: '0px',\n width: item._width + 'px',\n height: item._height + 'px',\n });\n\n // Set initial position.\n element.style[transformProp] = getTranslateString(\n item._left + item._marginLeft,\n item._top + item._marginTop\n );\n\n // Bind event listeners.\n grid.on(EVENT_LAYOUT_START, this._onLayoutStart);\n grid.on(EVENT_DRAG_RELEASE_END, this._onReleaseEnd);\n grid.on(EVENT_BEFORE_SEND, this._onMigrate);\n grid.on(EVENT_HIDE_START, this._onHide);\n\n // onCreate hook.\n if (isFunction(settings.dragPlaceholder.onCreate)) {\n settings.dragPlaceholder.onCreate(item, element);\n }\n\n // Insert the placeholder element to the grid.\n grid.getElement().appendChild(element);\n};\n\n/**\n * Reset placeholder data.\n *\n * @public\n */\nItemDragPlaceholder.prototype.reset = function () {\n if (!this.isActive()) return;\n\n var element = this._element;\n var item = this._item;\n var grid = item.getGrid();\n var settings = grid._settings;\n var animation = this._animation;\n\n // Reset flag.\n this._resetAfterLayout = false;\n\n // Cancel potential (queued) layout tick.\n cancelPlaceholderLayoutTick(item._id);\n cancelPlaceholderResizeTick(item._id);\n\n // Reset animation instance.\n animation.stop();\n animation._element = null;\n\n // Unbind event listeners.\n grid.off(EVENT_DRAG_RELEASE_END, this._onReleaseEnd);\n grid.off(EVENT_LAYOUT_START, this._onLayoutStart);\n grid.off(EVENT_BEFORE_SEND, this._onMigrate);\n grid.off(EVENT_HIDE_START, this._onHide);\n\n // Remove placeholder class from the placeholder element.\n if (this._className) {\n removeClass(element, this._className);\n this._className = '';\n }\n\n // Remove element.\n element.parentNode.removeChild(element);\n this._element = null;\n\n // onRemove hook. Note that here we use the current grid's onRemove callback\n // so if the item has migrated during drag the onRemove method will not be\n // the originating grid's method.\n if (isFunction(settings.dragPlaceholder.onRemove)) {\n settings.dragPlaceholder.onRemove(item, element);\n }\n};\n\n/**\n * Check if placeholder is currently active (visible).\n *\n * @public\n * @returns {Boolean}\n */\nItemDragPlaceholder.prototype.isActive = function () {\n return !!this._element;\n};\n\n/**\n * Get placeholder element.\n *\n * @public\n * @returns {?HTMLElement}\n */\nItemDragPlaceholder.prototype.getElement = function () {\n return this._element;\n};\n\n/**\n * Update placeholder's dimensions to match the item's dimensions. Note that\n * the updating is done asynchronously in the next tick to avoid layout\n * thrashing.\n *\n * @public\n */\nItemDragPlaceholder.prototype.updateDimensions = function () {\n if (!this.isActive()) return;\n addPlaceholderResizeTick(this._item._id, this._updateDimensions);\n};\n\n/**\n * Destroy placeholder instance.\n *\n * @public\n */\nItemDragPlaceholder.prototype.destroy = function () {\n this.reset();\n this._animation.destroy();\n this._item = this._animation = null;\n};\n\n/**\n * The release process handler constructor. Although this might seem as proper\n * fit for the drag process this needs to be separated into it's own logic\n * because there might be a scenario where drag is disabled, but the release\n * process still needs to be implemented (dragging from a grid to another).\n *\n * @class\n * @param {Item} item\n */\nfunction ItemDragRelease(item) {\n this._item = item;\n this._isActive = false;\n this._isDestroyed = false;\n this._isPositioningStarted = false;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Start the release process of an item.\n *\n * @public\n */\nItemDragRelease.prototype.start = function () {\n if (this._isDestroyed || this._isActive) return;\n\n var item = this._item;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n this._isActive = true;\n addClass(item._element, settings.itemReleasingClass);\n if (!settings.dragRelease.useDragContainer) {\n this._placeToGrid();\n }\n grid._emit(EVENT_DRAG_RELEASE_START, item);\n\n // Let's start layout manually _only_ if there is no unfinished layout in\n // about to finish.\n if (!grid._nextLayoutData) item._layout.start(false);\n};\n\n/**\n * End the release process of an item. This method can be used to abort an\n * ongoing release process (animation) or finish the release process.\n *\n * @public\n * @param {Boolean} [abort=false]\n * - Should the release be aborted? When true, the release end event won't be\n * emitted. Set to true only when you need to abort the release process\n * while the item is animating to it's position.\n * @param {Number} [left]\n * - The element's current translateX value (optional).\n * @param {Number} [top]\n * - The element's current translateY value (optional).\n */\nItemDragRelease.prototype.stop = function (abort, left, top) {\n if (this._isDestroyed || !this._isActive) return;\n\n var item = this._item;\n var grid = item.getGrid();\n\n if (!abort && (left === undefined || top === undefined)) {\n left = item._left;\n top = item._top;\n }\n\n var didReparent = this._placeToGrid(left, top);\n this._reset(didReparent);\n\n if (!abort) grid._emit(EVENT_DRAG_RELEASE_END, item);\n};\n\nItemDragRelease.prototype.isJustReleased = function () {\n return this._isActive && this._isPositioningStarted === false;\n};\n\n/**\n * Destroy instance.\n *\n * @public\n */\nItemDragRelease.prototype.destroy = function () {\n if (this._isDestroyed) return;\n this.stop(true);\n this._item = null;\n this._isDestroyed = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Move the element back to the grid container element if it does not exist\n * there already.\n *\n * @private\n * @param {Number} [left]\n * - The element's current translateX value (optional).\n * @param {Number} [top]\n * - The element's current translateY value (optional).\n * @returns {Boolean}\n * - Returns `true` if the element was reparented.\n */\nItemDragRelease.prototype._placeToGrid = function (left, top) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var container = item.getGrid()._element;\n var didReparent = false;\n\n if (element.parentNode !== container) {\n if (left === undefined || top === undefined) {\n var translate = getTranslate(element);\n left = translate.x - this._containerDiffX;\n top = translate.y - this._containerDiffY;\n }\n\n container.appendChild(element);\n item._setTranslate(left, top);\n didReparent = true;\n }\n\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n\n return didReparent;\n};\n\n/**\n * Reset data and remove releasing class.\n *\n * @private\n * @param {Boolean} [needsReflow]\n */\nItemDragRelease.prototype._reset = function (needsReflow) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var releasingClass = item.getGrid()._settings.itemReleasingClass;\n\n this._isActive = false;\n this._isPositioningStarted = false;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n\n // If the element was just reparented we need to do a forced reflow to remove\n // the class gracefully.\n if (releasingClass) {\n // eslint-disable-next-line\n if (needsReflow) item._element.clientWidth;\n removeClass(item._element, releasingClass);\n }\n};\n\nvar MIN_ANIMATION_DISTANCE = 2;\n\n/**\n * Layout manager for Item instance, handles the positioning of an item.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemLayout(item) {\n var element = item._element;\n var elementStyle = element.style;\n\n this._item = item;\n this._isActive = false;\n this._isDestroyed = false;\n this._isInterrupted = false;\n this._currentStyles = {};\n this._targetStyles = {};\n this._nextLeft = 0;\n this._nextTop = 0;\n this._offsetLeft = 0;\n this._offsetTop = 0;\n this._skipNextAnimation = false;\n this._animOptions = {\n onFinish: this._finish.bind(this),\n duration: 0,\n easing: 0,\n };\n\n // Set element's initial position styles.\n elementStyle.left = '0px';\n elementStyle.top = '0px';\n item._setTranslate(0, 0);\n\n this._animation = new Animator(element);\n this._queue = 'layout-' + item._id;\n\n // Bind animation handlers and finish method.\n this._setupAnimation = this._setupAnimation.bind(this);\n this._startAnimation = this._startAnimation.bind(this);\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Start item layout based on it's current data.\n *\n * @public\n * @param {Boolean} instant\n * @param {Function} [onFinish]\n */\nItemLayout.prototype.start = function (instant, onFinish) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var release = item._dragRelease;\n var gridSettings = item.getGrid()._settings;\n var isPositioning = this._isActive;\n var isJustReleased = release.isJustReleased();\n var animDuration = isJustReleased\n ? gridSettings.dragRelease.duration\n : gridSettings.layoutDuration;\n var animEasing = isJustReleased ? gridSettings.dragRelease.easing : gridSettings.layoutEasing;\n var animEnabled = !instant && !this._skipNextAnimation && animDuration > 0;\n\n // If the item is currently positioning cancel potential queued layout tick\n // and process current layout callback queue with interrupted flag on.\n if (isPositioning) {\n cancelLayoutTick(item._id);\n item._emitter.burst(this._queue, true, item);\n }\n\n // Mark release positioning as started.\n if (isJustReleased) release._isPositioningStarted = true;\n\n // Push the callback to the callback queue.\n if (isFunction(onFinish)) {\n item._emitter.on(this._queue, onFinish);\n }\n\n // Reset animation skipping flag.\n this._skipNextAnimation = false;\n\n // If no animations are needed, easy peasy!\n if (!animEnabled) {\n this._updateOffsets();\n item._setTranslate(this._nextLeft, this._nextTop);\n this._animation.stop();\n this._finish();\n return;\n }\n\n // Let's make sure an ongoing animation's callback is cancelled before going\n // further. Without this there's a chance that the animation will finish\n // before the next tick and mess up our logic.\n if (this._animation.isAnimating()) {\n this._animation._animation.onfinish = null;\n }\n\n // Kick off animation to be started in the next tick.\n this._isActive = true;\n this._animOptions.easing = animEasing;\n this._animOptions.duration = animDuration;\n this._isInterrupted = isPositioning;\n addLayoutTick(item._id, this._setupAnimation, this._startAnimation);\n};\n\n/**\n * Stop item's position animation if it is currently animating.\n *\n * @public\n * @param {Boolean} processCallbackQueue\n * @param {Number} [left]\n * @param {Number} [top]\n */\nItemLayout.prototype.stop = function (processCallbackQueue, left, top) {\n if (this._isDestroyed || !this._isActive) return;\n\n var item = this._item;\n\n // Cancel animation init.\n cancelLayoutTick(item._id);\n\n // Stop animation.\n if (this._animation.isAnimating()) {\n if (left === undefined || top === undefined) {\n var translate = getTranslate(item._element);\n left = translate.x;\n top = translate.y;\n }\n item._setTranslate(left, top);\n this._animation.stop();\n }\n\n // Remove positioning class.\n removeClass(item._element, item.getGrid()._settings.itemPositioningClass);\n\n // Reset active state.\n this._isActive = false;\n\n // Process callback queue if needed.\n if (processCallbackQueue) {\n item._emitter.burst(this._queue, true, item);\n }\n};\n\n/**\n * Destroy the instance and stop current animation if it is running.\n *\n * @public\n */\nItemLayout.prototype.destroy = function () {\n if (this._isDestroyed) return;\n\n var elementStyle = this._item._element.style;\n\n this.stop(true, 0, 0);\n this._item._emitter.clear(this._queue);\n this._animation.destroy();\n\n elementStyle[transformProp] = '';\n elementStyle.left = '';\n elementStyle.top = '';\n\n this._item = null;\n this._currentStyles = null;\n this._targetStyles = null;\n this._animOptions = null;\n this._isDestroyed = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Calculate and update item's current layout offset data.\n *\n * @private\n */\nItemLayout.prototype._updateOffsets = function () {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var migrate = item._migrate;\n var release = item._dragRelease;\n\n this._offsetLeft = release._isActive\n ? release._containerDiffX\n : migrate._isActive\n ? migrate._containerDiffX\n : 0;\n\n this._offsetTop = release._isActive\n ? release._containerDiffY\n : migrate._isActive\n ? migrate._containerDiffY\n : 0;\n\n this._nextLeft = this._item._left + this._offsetLeft;\n this._nextTop = this._item._top + this._offsetTop;\n};\n\n/**\n * Finish item layout procedure.\n *\n * @private\n */\nItemLayout.prototype._finish = function () {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var migrate = item._migrate;\n var release = item._dragRelease;\n\n // Update internal translate values.\n item._tX = this._nextLeft;\n item._tY = this._nextTop;\n\n // Mark the item as inactive and remove positioning classes.\n if (this._isActive) {\n this._isActive = false;\n removeClass(item._element, item.getGrid()._settings.itemPositioningClass);\n }\n\n // Finish up release and migration.\n if (release._isActive) release.stop();\n if (migrate._isActive) migrate.stop();\n\n // Process the callback queue.\n item._emitter.burst(this._queue, false, item);\n};\n\n/**\n * Prepare item for layout animation.\n *\n * @private\n */\nItemLayout.prototype._setupAnimation = function () {\n var item = this._item;\n if (item._tX === undefined || item._tY === undefined) {\n var translate = getTranslate(item._element);\n item._tX = translate.x;\n item._tY = translate.y;\n }\n};\n\n/**\n * Start layout animation.\n *\n * @private\n */\nItemLayout.prototype._startAnimation = function () {\n var item = this._item;\n var settings = item.getGrid()._settings;\n var isInstant = this._animOptions.duration <= 0;\n\n // Let's update the offset data and target styles.\n this._updateOffsets();\n\n var xDiff = Math.abs(item._left - (item._tX - this._offsetLeft));\n var yDiff = Math.abs(item._top - (item._tY - this._offsetTop));\n\n // If there is no need for animation or if the item is already in correct\n // position (or near it) let's finish the process early.\n if (isInstant || (xDiff < MIN_ANIMATION_DISTANCE && yDiff < MIN_ANIMATION_DISTANCE)) {\n if (xDiff || yDiff || this._isInterrupted) {\n item._setTranslate(this._nextLeft, this._nextTop);\n }\n this._animation.stop();\n this._finish();\n return;\n }\n\n // Set item's positioning class if needed.\n if (!this._isInterrupted) {\n addClass(item._element, settings.itemPositioningClass);\n }\n\n // Get current/next styles for animation.\n this._currentStyles[transformProp] = getTranslateString(item._tX, item._tY);\n this._targetStyles[transformProp] = getTranslateString(this._nextLeft, this._nextTop);\n\n // Set internal translation values to undefined for the duration of the\n // animation since they will be changing on each animation frame for the\n // duration of the animation and tracking them would mean reading the DOM on\n // each frame, which is pretty darn expensive.\n item._tX = item._tY = undefined;\n\n // Start animation.\n this._animation.start(this._currentStyles, this._targetStyles, this._animOptions);\n};\n\n/**\n * The migrate process handler constructor.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemMigrate(item) {\n // Private props.\n this._item = item;\n this._isActive = false;\n this._isDestroyed = false;\n this._container = false;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Start the migrate process of an item.\n *\n * @public\n * @param {Grid} targetGrid\n * @param {(HTMLElement|Number|Item)} position\n * @param {HTMLElement} [container]\n */\nItemMigrate.prototype.start = function (targetGrid, position, container) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var isActive = item.isActive();\n var isVisible = item.isVisible();\n var grid = item.getGrid();\n var settings = grid._settings;\n var targetSettings = targetGrid._settings;\n var targetElement = targetGrid._element;\n var targetItems = targetGrid._items;\n var currentIndex = grid._items.indexOf(item);\n var targetContainer = container || document.body;\n var targetIndex;\n var targetItem;\n var currentContainer;\n var offsetDiff;\n var containerDiff;\n var translate;\n var translateX;\n var translateY;\n var currentVisClass;\n var nextVisClass;\n\n // Get target index.\n if (typeof position === 'number') {\n targetIndex = normalizeArrayIndex(targetItems, position, 1);\n } else {\n targetItem = targetGrid.getItem(position);\n if (!targetItem) return;\n targetIndex = targetItems.indexOf(targetItem);\n }\n\n // Get current translateX and translateY values if needed.\n if (item.isPositioning() || this._isActive || item.isReleasing()) {\n translate = getTranslate(element);\n translateX = translate.x;\n translateY = translate.y;\n }\n\n // Abort current positioning.\n if (item.isPositioning()) {\n item._layout.stop(true, translateX, translateY);\n }\n\n // Abort current migration.\n if (this._isActive) {\n translateX -= this._containerDiffX;\n translateY -= this._containerDiffY;\n this.stop(true, translateX, translateY);\n }\n\n // Abort current release.\n if (item.isReleasing()) {\n translateX -= item._dragRelease._containerDiffX;\n translateY -= item._dragRelease._containerDiffY;\n item._dragRelease.stop(true, translateX, translateY);\n }\n\n // Stop current visibility animation.\n item._visibility.stop(true);\n\n // Destroy current drag.\n if (item._drag) item._drag.destroy();\n\n // Emit beforeSend event.\n if (grid._hasListeners(EVENT_BEFORE_SEND)) {\n grid._emit(EVENT_BEFORE_SEND, {\n item: item,\n fromGrid: grid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Emit beforeReceive event.\n if (targetGrid._hasListeners(EVENT_BEFORE_RECEIVE)) {\n targetGrid._emit(EVENT_BEFORE_RECEIVE, {\n item: item,\n fromGrid: grid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Update item class.\n if (settings.itemClass !== targetSettings.itemClass) {\n removeClass(element, settings.itemClass);\n addClass(element, targetSettings.itemClass);\n }\n\n // Update visibility class.\n currentVisClass = isVisible ? settings.itemVisibleClass : settings.itemHiddenClass;\n nextVisClass = isVisible ? targetSettings.itemVisibleClass : targetSettings.itemHiddenClass;\n if (currentVisClass !== nextVisClass) {\n removeClass(element, currentVisClass);\n addClass(element, nextVisClass);\n }\n\n // Move item instance from current grid to target grid.\n grid._items.splice(currentIndex, 1);\n arrayInsert(targetItems, item, targetIndex);\n\n // Update item's grid id reference.\n item._gridId = targetGrid._id;\n\n // If item is active we need to move the item inside the target container for\n // the duration of the (potential) animation if it's different than the\n // current container.\n if (isActive) {\n currentContainer = element.parentNode;\n if (targetContainer !== currentContainer) {\n targetContainer.appendChild(element);\n offsetDiff = getOffsetDiff(targetContainer, currentContainer, true);\n if (!translate) {\n translate = getTranslate(element);\n translateX = translate.x;\n translateY = translate.y;\n }\n item._setTranslate(translateX + offsetDiff.left, translateY + offsetDiff.top);\n }\n }\n // If item is not active let's just append it to the target grid's element.\n else {\n targetElement.appendChild(element);\n }\n\n // Update child element's styles to reflect the current visibility state.\n item._visibility.setStyles(\n isVisible ? targetSettings.visibleStyles : targetSettings.hiddenStyles\n );\n\n // Get offset diff for the migration data, if the item is active.\n if (isActive) {\n containerDiff = getOffsetDiff(targetContainer, targetElement, true);\n }\n\n // Update item's cached dimensions.\n item._refreshDimensions();\n\n // Reset item's sort data.\n item._sortData = null;\n\n // Create new drag handler.\n item._drag = targetSettings.dragEnabled ? new ItemDrag(item) : null;\n\n // Setup migration data.\n if (isActive) {\n this._isActive = true;\n this._container = targetContainer;\n this._containerDiffX = containerDiff.left;\n this._containerDiffY = containerDiff.top;\n } else {\n this._isActive = false;\n this._container = null;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n }\n\n // Emit send event.\n if (grid._hasListeners(EVENT_SEND)) {\n grid._emit(EVENT_SEND, {\n item: item,\n fromGrid: grid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Emit receive event.\n if (targetGrid._hasListeners(EVENT_RECEIVE)) {\n targetGrid._emit(EVENT_RECEIVE, {\n item: item,\n fromGrid: grid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n};\n\n/**\n * End the migrate process of an item. This method can be used to abort an\n * ongoing migrate process (animation) or finish the migrate process.\n *\n * @public\n * @param {Boolean} [abort=false]\n * - Should the migration be aborted?\n * @param {Number} [left]\n * - The element's current translateX value (optional).\n * @param {Number} [top]\n * - The element's current translateY value (optional).\n */\nItemMigrate.prototype.stop = function (abort, left, top) {\n if (this._isDestroyed || !this._isActive) return;\n\n var item = this._item;\n var element = item._element;\n var grid = item.getGrid();\n var gridElement = grid._element;\n var translate;\n\n if (this._container !== gridElement) {\n if (left === undefined || top === undefined) {\n if (abort) {\n translate = getTranslate(element);\n left = translate.x - this._containerDiffX;\n top = translate.y - this._containerDiffY;\n } else {\n left = item._left;\n top = item._top;\n }\n }\n\n gridElement.appendChild(element);\n item._setTranslate(left, top);\n }\n\n this._isActive = false;\n this._container = null;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n};\n\n/**\n * Destroy instance.\n *\n * @public\n */\nItemMigrate.prototype.destroy = function () {\n if (this._isDestroyed) return;\n this.stop(true);\n this._item = null;\n this._isDestroyed = true;\n};\n\n/**\n * Visibility manager for Item instance, handles visibility of an item.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemVisibility(item) {\n var isActive = item._isActive;\n var element = item._element;\n var childElement = element.children[0];\n var settings = item.getGrid()._settings;\n\n if (!childElement) {\n throw new Error('No valid child element found within item element.');\n }\n\n this._item = item;\n this._isDestroyed = false;\n this._isHidden = !isActive;\n this._isHiding = false;\n this._isShowing = false;\n this._childElement = childElement;\n this._currentStyleProps = [];\n this._animation = new Animator(childElement);\n this._queue = 'visibility-' + item._id;\n this._finishShow = this._finishShow.bind(this);\n this._finishHide = this._finishHide.bind(this);\n\n element.style.display = isActive ? '' : 'none';\n addClass(element, isActive ? settings.itemVisibleClass : settings.itemHiddenClass);\n this.setStyles(isActive ? settings.visibleStyles : settings.hiddenStyles);\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Show item.\n *\n * @public\n * @param {Boolean} instant\n * @param {Function} [onFinish]\n */\nItemVisibility.prototype.show = function (instant, onFinish) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var callback = isFunction(onFinish) ? onFinish : null;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n // If item is visible call the callback and be done with it.\n if (!this._isShowing && !this._isHidden) {\n callback && callback(false, item);\n return;\n }\n\n // If item is showing and does not need to be shown instantly, let's just\n // push callback to the callback queue and be done with it.\n if (this._isShowing && !instant) {\n callback && item._emitter.on(this._queue, callback);\n return;\n }\n\n // If the item is hiding or hidden process the current visibility callback\n // queue with the interrupted flag active, update classes and set display\n // to block if necessary.\n if (!this._isShowing) {\n item._emitter.burst(this._queue, true, item);\n removeClass(element, settings.itemHiddenClass);\n addClass(element, settings.itemVisibleClass);\n if (!this._isHiding) element.style.display = '';\n }\n\n // Push callback to the callback queue.\n callback && item._emitter.on(this._queue, callback);\n\n // Update visibility states.\n this._isShowing = true;\n this._isHiding = this._isHidden = false;\n\n // Finally let's start show animation.\n this._startAnimation(true, instant, this._finishShow);\n};\n\n/**\n * Hide item.\n *\n * @public\n * @param {Boolean} instant\n * @param {Function} [onFinish]\n */\nItemVisibility.prototype.hide = function (instant, onFinish) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var callback = isFunction(onFinish) ? onFinish : null;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n // If item is already hidden call the callback and be done with it.\n if (!this._isHiding && this._isHidden) {\n callback && callback(false, item);\n return;\n }\n\n // If item is hiding and does not need to be hidden instantly, let's just\n // push callback to the callback queue and be done with it.\n if (this._isHiding && !instant) {\n callback && item._emitter.on(this._queue, callback);\n return;\n }\n\n // If the item is showing or visible process the current visibility callback\n // queue with the interrupted flag active, update classes and set display\n // to block if necessary.\n if (!this._isHiding) {\n item._emitter.burst(this._queue, true, item);\n addClass(element, settings.itemHiddenClass);\n removeClass(element, settings.itemVisibleClass);\n }\n\n // Push callback to the callback queue.\n callback && item._emitter.on(this._queue, callback);\n\n // Update visibility states.\n this._isHidden = this._isHiding = true;\n this._isShowing = false;\n\n // Finally let's start hide animation.\n this._startAnimation(false, instant, this._finishHide);\n};\n\n/**\n * Stop current hiding/showing process.\n *\n * @public\n * @param {Boolean} processCallbackQueue\n */\nItemVisibility.prototype.stop = function (processCallbackQueue) {\n if (this._isDestroyed) return;\n if (!this._isHiding && !this._isShowing) return;\n\n var item = this._item;\n\n cancelVisibilityTick(item._id);\n this._animation.stop();\n if (processCallbackQueue) {\n item._emitter.burst(this._queue, true, item);\n }\n};\n\n/**\n * Reset all existing visibility styles and apply new visibility styles to the\n * visibility element. This method should be used to set styles when there is a\n * chance that the current style properties differ from the new ones (basically\n * on init and on migrations).\n *\n * @public\n * @param {Object} styles\n */\nItemVisibility.prototype.setStyles = function (styles) {\n var childElement = this._childElement;\n var currentStyleProps = this._currentStyleProps;\n this._removeCurrentStyles();\n for (var prop in styles) {\n currentStyleProps.push(prop);\n childElement.style[prop] = styles[prop];\n }\n};\n\n/**\n * Destroy the instance and stop current animation if it is running.\n *\n * @public\n */\nItemVisibility.prototype.destroy = function () {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n this.stop(true);\n item._emitter.clear(this._queue);\n this._animation.destroy();\n this._removeCurrentStyles();\n removeClass(element, settings.itemVisibleClass);\n removeClass(element, settings.itemHiddenClass);\n element.style.display = '';\n\n // Reset state.\n this._isHiding = this._isShowing = false;\n this._isDestroyed = this._isHidden = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Start visibility animation.\n *\n * @private\n * @param {Boolean} toVisible\n * @param {Boolean} [instant]\n * @param {Function} [onFinish]\n */\nItemVisibility.prototype._startAnimation = function (toVisible, instant, onFinish) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var animation = this._animation;\n var childElement = this._childElement;\n var settings = item.getGrid()._settings;\n var targetStyles = toVisible ? settings.visibleStyles : settings.hiddenStyles;\n var duration = toVisible ? settings.showDuration : settings.hideDuration;\n var easing = toVisible ? settings.showEasing : settings.hideEasing;\n var isInstant = instant || duration <= 0;\n var currentStyles;\n\n // No target styles? Let's quit early.\n if (!targetStyles) {\n onFinish && onFinish();\n return;\n }\n\n // Cancel queued visibility tick.\n cancelVisibilityTick(item._id);\n\n // If we need to apply the styles instantly without animation.\n if (isInstant) {\n setStyles(childElement, targetStyles);\n animation.stop();\n onFinish && onFinish();\n return;\n }\n\n // Let's make sure an ongoing animation's callback is cancelled before going\n // further. Without this there's a chance that the animation will finish\n // before the next tick and mess up our logic.\n if (animation.isAnimating()) {\n animation._animation.onfinish = null;\n }\n\n // Start the animation in the next tick (to avoid layout thrashing).\n addVisibilityTick(\n item._id,\n function () {\n currentStyles = getCurrentStyles(childElement, targetStyles);\n },\n function () {\n animation.start(currentStyles, targetStyles, {\n duration: duration,\n easing: easing,\n onFinish: onFinish,\n });\n }\n );\n};\n\n/**\n * Finish show procedure.\n *\n * @private\n */\nItemVisibility.prototype._finishShow = function () {\n if (this._isHidden) return;\n this._isShowing = false;\n this._item._emitter.burst(this._queue, false, this._item);\n};\n\n/**\n * Finish hide procedure.\n *\n * @private\n */\nItemVisibility.prototype._finishHide = function () {\n if (!this._isHidden) return;\n var item = this._item;\n this._isHiding = false;\n item._layout.stop(true, 0, 0);\n item._element.style.display = 'none';\n item._emitter.burst(this._queue, false, item);\n};\n\n/**\n * Remove currently applied visibility related inline style properties.\n *\n * @private\n */\nItemVisibility.prototype._removeCurrentStyles = function () {\n var childElement = this._childElement;\n var currentStyleProps = this._currentStyleProps;\n\n for (var i = 0; i < currentStyleProps.length; i++) {\n childElement.style[currentStyleProps[i]] = '';\n }\n\n currentStyleProps.length = 0;\n};\n\nvar id = 0;\n\n/**\n * Returns a unique numeric id (increments a base value on every call).\n * @returns {Number}\n */\nfunction createUid() {\n return ++id;\n}\n\n/**\n * Creates a new Item instance for a Grid instance.\n *\n * @class\n * @param {Grid} grid\n * @param {HTMLElement} element\n * @param {Boolean} [isActive]\n */\nfunction Item(grid, element, isActive) {\n var settings = grid._settings;\n\n // Store item/element pair to a map (for faster item querying by element).\n if (ITEM_ELEMENT_MAP) {\n if (ITEM_ELEMENT_MAP.has(element)) {\n throw new Error('You can only create one Muuri Item per element!');\n } else {\n ITEM_ELEMENT_MAP.set(element, this);\n }\n }\n\n this._id = createUid();\n this._gridId = grid._id;\n this._element = element;\n this._isDestroyed = false;\n this._left = 0;\n this._top = 0;\n this._width = 0;\n this._height = 0;\n this._marginLeft = 0;\n this._marginRight = 0;\n this._marginTop = 0;\n this._marginBottom = 0;\n this._tX = undefined;\n this._tY = undefined;\n this._sortData = null;\n this._emitter = new Emitter();\n\n // If the provided item element is not a direct child of the grid container\n // element, append it to the grid container. Note, we are indeed reading the\n // DOM here but it's a property that does not cause reflowing.\n if (element.parentNode !== grid._element) {\n grid._element.appendChild(element);\n }\n\n // Set item class.\n addClass(element, settings.itemClass);\n\n // If isActive is not defined, let's try to auto-detect it. Note, we are\n // indeed reading the DOM here but it's a property that does not cause\n // reflowing.\n if (typeof isActive !== 'boolean') {\n isActive = getStyle(element, 'display') !== 'none';\n }\n\n // Set up active state (defines if the item is considered part of the layout\n // or not).\n this._isActive = isActive;\n\n // Setup visibility handler.\n this._visibility = new ItemVisibility(this);\n\n // Set up layout handler.\n this._layout = new ItemLayout(this);\n\n // Set up migration handler data.\n this._migrate = new ItemMigrate(this);\n\n // Set up drag handler.\n this._drag = settings.dragEnabled ? new ItemDrag(this) : null;\n\n // Set up release handler. Note that although this is fully linked to dragging\n // this still needs to be always instantiated to handle migration scenarios\n // correctly.\n this._dragRelease = new ItemDragRelease(this);\n\n // Set up drag placeholder handler. Note that although this is fully linked to\n // dragging this still needs to be always instantiated to handle migration\n // scenarios correctly.\n this._dragPlaceholder = new ItemDragPlaceholder(this);\n\n // Note! You must call the following methods before you start using the\n // instance. They are deliberately not called in the end as it would cause\n // potentially a massive amount of reflows if multiple items were instantiated\n // in a loop.\n // this._refreshDimensions();\n // this._refreshSortData();\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Get the instance grid reference.\n *\n * @public\n * @returns {Grid}\n */\nItem.prototype.getGrid = function () {\n return GRID_INSTANCES[this._gridId];\n};\n\n/**\n * Get the instance element.\n *\n * @public\n * @returns {HTMLElement}\n */\nItem.prototype.getElement = function () {\n return this._element;\n};\n\n/**\n * Get instance element's cached width.\n *\n * @public\n * @returns {Number}\n */\nItem.prototype.getWidth = function () {\n return this._width;\n};\n\n/**\n * Get instance element's cached height.\n *\n * @public\n * @returns {Number}\n */\nItem.prototype.getHeight = function () {\n return this._height;\n};\n\n/**\n * Get instance element's cached margins.\n *\n * @public\n * @returns {Object}\n * - The returned object contains left, right, top and bottom properties\n * which indicate the item element's cached margins.\n */\nItem.prototype.getMargin = function () {\n return {\n left: this._marginLeft,\n right: this._marginRight,\n top: this._marginTop,\n bottom: this._marginBottom,\n };\n};\n\n/**\n * Get instance element's cached position.\n *\n * @public\n * @returns {Object}\n * - The returned object contains left and top properties which indicate the\n * item element's cached position in the grid.\n */\nItem.prototype.getPosition = function () {\n return {\n left: this._left,\n top: this._top,\n };\n};\n\n/**\n * Is the item active?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isActive = function () {\n return this._isActive;\n};\n\n/**\n * Is the item visible?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isVisible = function () {\n return !!this._visibility && !this._visibility._isHidden;\n};\n\n/**\n * Is the item being animated to visible?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isShowing = function () {\n return !!(this._visibility && this._visibility._isShowing);\n};\n\n/**\n * Is the item being animated to hidden?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isHiding = function () {\n return !!(this._visibility && this._visibility._isHiding);\n};\n\n/**\n * Is the item positioning?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isPositioning = function () {\n return !!(this._layout && this._layout._isActive);\n};\n\n/**\n * Is the item being dragged (or queued for dragging)?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isDragging = function () {\n return !!(this._drag && this._drag._isActive);\n};\n\n/**\n * Is the item being released?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isReleasing = function () {\n return !!(this._dragRelease && this._dragRelease._isActive);\n};\n\n/**\n * Is the item destroyed?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isDestroyed = function () {\n return this._isDestroyed;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Recalculate item's dimensions.\n *\n * @private\n * @param {Boolean} [force=false]\n */\nItem.prototype._refreshDimensions = function (force) {\n if (this._isDestroyed) return;\n if (force !== true && this._visibility._isHidden) return;\n\n var element = this._element;\n var dragPlaceholder = this._dragPlaceholder;\n var rect = element.getBoundingClientRect();\n\n // Calculate width and height.\n this._width = rect.width;\n this._height = rect.height;\n\n // Calculate margins (ignore negative margins).\n this._marginLeft = Math.max(0, getStyleAsFloat(element, 'margin-left'));\n this._marginRight = Math.max(0, getStyleAsFloat(element, 'margin-right'));\n this._marginTop = Math.max(0, getStyleAsFloat(element, 'margin-top'));\n this._marginBottom = Math.max(0, getStyleAsFloat(element, 'margin-bottom'));\n\n // Keep drag placeholder's dimensions synced with the item's.\n if (dragPlaceholder) dragPlaceholder.updateDimensions();\n};\n\n/**\n * Fetch and store item's sort data.\n *\n * @private\n */\nItem.prototype._refreshSortData = function () {\n if (this._isDestroyed) return;\n\n var data = (this._sortData = {});\n var getters = this.getGrid()._settings.sortData;\n var prop;\n\n for (prop in getters) {\n data[prop] = getters[prop](this, this._element);\n }\n};\n\n/**\n * Add item to layout.\n *\n * @private\n */\nItem.prototype._addToLayout = function (left, top) {\n if (this._isActive === true) return;\n this._isActive = true;\n this._left = left || 0;\n this._top = top || 0;\n};\n\n/**\n * Remove item from layout.\n *\n * @private\n */\nItem.prototype._removeFromLayout = function () {\n if (this._isActive === false) return;\n this._isActive = false;\n this._left = 0;\n this._top = 0;\n};\n\n/**\n * Check if the layout procedure can be skipped for the item.\n *\n * @private\n * @param {Number} left\n * @param {Number} top\n * @returns {Boolean}\n */\nItem.prototype._canSkipLayout = function (left, top) {\n return (\n this._left === left &&\n this._top === top &&\n !this._migrate._isActive &&\n !this._layout._skipNextAnimation &&\n !this._dragRelease.isJustReleased()\n );\n};\n\n/**\n * Set the provided left and top arguments as the item element's translate\n * values in the DOM. This method keeps track of the currently applied\n * translate values and skips the update operation if the provided values are\n * identical to the currently applied values. Returns `false` if there was no\n * need for update and `true` if the translate value was updated.\n *\n * @private\n * @param {Number} left\n * @param {Number} top\n * @returns {Boolean}\n */\nItem.prototype._setTranslate = function (left, top) {\n if (this._tX === left && this._tY === top) return false;\n this._tX = left;\n this._tY = top;\n this._element.style[transformProp] = getTranslateString(left, top);\n return true;\n};\n\n/**\n * Destroy item instance.\n *\n * @private\n * @param {Boolean} [removeElement=false]\n */\nItem.prototype._destroy = function (removeElement) {\n if (this._isDestroyed) return;\n\n var element = this._element;\n var grid = this.getGrid();\n var settings = grid._settings;\n\n // Destroy handlers.\n this._dragPlaceholder.destroy();\n this._dragRelease.destroy();\n this._migrate.destroy();\n this._layout.destroy();\n this._visibility.destroy();\n if (this._drag) this._drag.destroy();\n\n // Destroy emitter.\n this._emitter.destroy();\n\n // Remove item class.\n removeClass(element, settings.itemClass);\n\n // Remove element from DOM.\n if (removeElement) element.parentNode.removeChild(element);\n\n // Remove item/element pair from map.\n if (ITEM_ELEMENT_MAP) ITEM_ELEMENT_MAP.delete(element);\n\n // Reset state.\n this._isActive = false;\n this._isDestroyed = true;\n};\n\nfunction createPackerProcessor(isWorker) {\n var FILL_GAPS = 1;\n var HORIZONTAL = 2;\n var ALIGN_RIGHT = 4;\n var ALIGN_BOTTOM = 8;\n var ROUNDING = 16;\n\n var EPS = 0.001;\n var MIN_SLOT_SIZE = 0.5;\n\n // Rounds number first to three decimal precision and then floors the result\n // to two decimal precision.\n // Math.floor(Math.round(number * 1000) / 10) / 100\n function roundNumber(number) {\n return ((((number * 1000 + 0.5) << 0) / 10) << 0) / 100;\n }\n\n /**\n * @class\n */\n function PackerProcessor() {\n this.currentRects = [];\n this.nextRects = [];\n this.rectTarget = {};\n this.rectStore = [];\n this.slotSizes = [];\n this.rectId = 0;\n this.slotIndex = -1;\n this.slotData = { left: 0, top: 0, width: 0, height: 0 };\n this.sortRectsLeftTop = this.sortRectsLeftTop.bind(this);\n this.sortRectsTopLeft = this.sortRectsTopLeft.bind(this);\n }\n\n /**\n * Takes a layout object as an argument and computes positions (slots) for the\n * layout items. Also computes the final width and height of the layout. The\n * provided layout object's slots array is mutated as well as the width and\n * height properties.\n *\n * @param {Object} layout\n * @param {Number} layout.width\n * - The start (current) width of the layout in pixels.\n * @param {Number} layout.height\n * - The start (current) height of the layout in pixels.\n * @param {(Item[]|Number[])} layout.items\n * - List of Muuri.Item instances or a list of item dimensions\n * (e.g [ item1Width, item1Height, item2Width, item2Height, ... ]).\n * @param {(Array|Float32Array)} layout.slots\n * - An Array/Float32Array instance which's length should equal to\n * the amount of items times two. The position (width and height) of each\n * item will be written into this array.\n * @param {Number} settings\n * - The layout's settings as bitmasks.\n * @returns {Object}\n */\n PackerProcessor.prototype.computeLayout = function (layout, settings) {\n var items = layout.items;\n var slots = layout.slots;\n var fillGaps = !!(settings & FILL_GAPS);\n var horizontal = !!(settings & HORIZONTAL);\n var alignRight = !!(settings & ALIGN_RIGHT);\n var alignBottom = !!(settings & ALIGN_BOTTOM);\n var rounding = !!(settings & ROUNDING);\n var isPreProcessed = typeof items[0] === 'number';\n var i, bump, item, slotWidth, slotHeight, slot;\n\n // No need to go further if items do not exist.\n if (!items.length) return layout;\n\n // Compute slots for the items.\n bump = isPreProcessed ? 2 : 1;\n for (i = 0; i < items.length; i += bump) {\n // If items are pre-processed it means that items array contains only\n // the raw dimensions of the items. Otherwise we assume it is an array\n // of normal Muuri items.\n if (isPreProcessed) {\n slotWidth = items[i];\n slotHeight = items[i + 1];\n } else {\n item = items[i];\n slotWidth = item._width + item._marginLeft + item._marginRight;\n slotHeight = item._height + item._marginTop + item._marginBottom;\n }\n\n // If rounding is enabled let's round the item's width and height to\n // make the layout algorithm a bit more stable. This has a performance\n // cost so don't use this if not necessary.\n if (rounding) {\n slotWidth = roundNumber(slotWidth);\n slotHeight = roundNumber(slotHeight);\n }\n\n // Get slot data.\n slot = this.computeNextSlot(layout, slotWidth, slotHeight, fillGaps, horizontal);\n\n // Update layout width/height.\n if (horizontal) {\n if (slot.left + slot.width > layout.width) {\n layout.width = slot.left + slot.width;\n }\n } else {\n if (slot.top + slot.height > layout.height) {\n layout.height = slot.top + slot.height;\n }\n }\n\n // Add item slot data to layout slots.\n slots[++this.slotIndex] = slot.left;\n slots[++this.slotIndex] = slot.top;\n\n // Store the size too (for later usage) if needed.\n if (alignRight || alignBottom) {\n this.slotSizes.push(slot.width, slot.height);\n }\n }\n\n // If the alignment is set to right we need to adjust the results.\n if (alignRight) {\n for (i = 0; i < slots.length; i += 2) {\n slots[i] = layout.width - (slots[i] + this.slotSizes[i]);\n }\n }\n\n // If the alignment is set to bottom we need to adjust the results.\n if (alignBottom) {\n for (i = 1; i < slots.length; i += 2) {\n slots[i] = layout.height - (slots[i] + this.slotSizes[i]);\n }\n }\n\n // Reset stuff.\n this.slotSizes.length = 0;\n this.currentRects.length = 0;\n this.nextRects.length = 0;\n this.rectStore.length = 0;\n this.rectId = 0;\n this.slotIndex = -1;\n\n return layout;\n };\n\n /**\n * Calculate next slot in the layout. Returns a slot object with position and\n * dimensions data. The returned object is reused between calls.\n *\n * @param {Object} layout\n * @param {Number} slotWidth\n * @param {Number} slotHeight\n * @param {Boolean} fillGaps\n * @param {Boolean} horizontal\n * @returns {Object}\n */\n PackerProcessor.prototype.computeNextSlot = function (\n layout,\n slotWidth,\n slotHeight,\n fillGaps,\n horizontal\n ) {\n var slot = this.slotData;\n var currentRects = this.currentRects;\n var nextRects = this.nextRects;\n var ignoreCurrentRects = false;\n var rect;\n var rectId;\n var shards;\n var i;\n var j;\n\n // Reset new slots.\n nextRects.length = 0;\n\n // Set item slot initial data.\n slot.left = null;\n slot.top = null;\n slot.width = slotWidth;\n slot.height = slotHeight;\n\n // Try to find position for the slot from the existing free spaces in the\n // layout.\n for (i = 0; i < currentRects.length; i++) {\n rectId = currentRects[i];\n if (!rectId) continue;\n rect = this.getRect(rectId);\n if (slot.width <= rect.width + EPS && slot.height <= rect.height + EPS) {\n slot.left = rect.left;\n slot.top = rect.top;\n break;\n }\n }\n\n // If no position was found for the slot let's position the slot to\n // the bottom left (in vertical mode) or top right (in horizontal mode) of\n // the layout.\n if (slot.left === null) {\n if (horizontal) {\n slot.left = layout.width;\n slot.top = 0;\n } else {\n slot.left = 0;\n slot.top = layout.height;\n }\n\n // If gaps don't need filling let's throw away all the current free spaces\n // (currentRects).\n if (!fillGaps) {\n ignoreCurrentRects = true;\n }\n }\n\n // In vertical mode, if the slot's bottom overlaps the layout's bottom.\n if (!horizontal && slot.top + slot.height > layout.height + EPS) {\n // If slot is not aligned to the left edge, create a new free space to the\n // left of the slot.\n if (slot.left > MIN_SLOT_SIZE) {\n nextRects.push(this.addRect(0, layout.height, slot.left, Infinity));\n }\n\n // If slot is not aligned to the right edge, create a new free space to\n // the right of the slot.\n if (slot.left + slot.width < layout.width - MIN_SLOT_SIZE) {\n nextRects.push(\n this.addRect(\n slot.left + slot.width,\n layout.height,\n layout.width - slot.left - slot.width,\n Infinity\n )\n );\n }\n\n // Update layout height.\n layout.height = slot.top + slot.height;\n }\n\n // In horizontal mode, if the slot's right overlaps the layout's right edge.\n if (horizontal && slot.left + slot.width > layout.width + EPS) {\n // If slot is not aligned to the top, create a new free space above the\n // slot.\n if (slot.top > MIN_SLOT_SIZE) {\n nextRects.push(this.addRect(layout.width, 0, Infinity, slot.top));\n }\n\n // If slot is not aligned to the bottom, create a new free space below\n // the slot.\n if (slot.top + slot.height < layout.height - MIN_SLOT_SIZE) {\n nextRects.push(\n this.addRect(\n layout.width,\n slot.top + slot.height,\n Infinity,\n layout.height - slot.top - slot.height\n )\n );\n }\n\n // Update layout width.\n layout.width = slot.left + slot.width;\n }\n\n // Clean up the current free spaces making sure none of them overlap with\n // the slot. Split all overlapping free spaces into smaller shards that do\n // not overlap with the slot.\n if (!ignoreCurrentRects) {\n if (fillGaps) i = 0;\n for (; i < currentRects.length; i++) {\n rectId = currentRects[i];\n if (!rectId) continue;\n rect = this.getRect(rectId);\n shards = this.splitRect(rect, slot);\n for (j = 0; j < shards.length; j++) {\n rectId = shards[j];\n rect = this.getRect(rectId);\n // Make sure that the free space is within the boundaries of the\n // layout. This routine is critical to the algorithm as it makes sure\n // that there are no leftover spaces with infinite height/width.\n // It's also essential that we don't compare values absolutely to each\n // other but leave a little headroom (EPSILON) to get rid of false\n // positives.\n if (\n horizontal ? rect.left + EPS < layout.width - EPS : rect.top + EPS < layout.height - EPS\n ) {\n nextRects.push(rectId);\n }\n }\n }\n }\n\n // Sanitize and sort all the new free spaces that will be used in the next\n // iteration. This procedure is critical to make the bin-packing algorithm\n // work. The free spaces have to be in correct order in the beginning of the\n // next iteration.\n if (nextRects.length > 1) {\n this.purgeRects(nextRects).sort(horizontal ? this.sortRectsLeftTop : this.sortRectsTopLeft);\n }\n\n // Finally we need to make sure that `this.currentRects` points to\n // `nextRects` array as that is used in the next iteration's beginning when\n // we try to find a space for the next slot.\n this.currentRects = nextRects;\n this.nextRects = currentRects;\n\n return slot;\n };\n\n /**\n * Add a new rectangle to the rectangle store. Returns the id of the new\n * rectangle.\n *\n * @param {Number} left\n * @param {Number} top\n * @param {Number} width\n * @param {Number} height\n * @returns {Number}\n */\n PackerProcessor.prototype.addRect = function (left, top, width, height) {\n var rectId = ++this.rectId;\n this.rectStore[rectId] = left || 0;\n this.rectStore[++this.rectId] = top || 0;\n this.rectStore[++this.rectId] = width || 0;\n this.rectStore[++this.rectId] = height || 0;\n return rectId;\n };\n\n /**\n * Get rectangle data from the rectangle store by id. Optionally you can\n * provide a target object where the rectangle data will be written in. By\n * default an internal object is reused as a target object.\n *\n * @param {Number} id\n * @param {Object} [target]\n * @returns {Object}\n */\n PackerProcessor.prototype.getRect = function (id, target) {\n if (!target) target = this.rectTarget;\n target.left = this.rectStore[id] || 0;\n target.top = this.rectStore[++id] || 0;\n target.width = this.rectStore[++id] || 0;\n target.height = this.rectStore[++id] || 0;\n return target;\n };\n\n /**\n * Punch a hole into a rectangle and return the shards (1-4).\n *\n * @param {Object} rect\n * @param {Object} hole\n * @returns {Number[]}\n */\n PackerProcessor.prototype.splitRect = (function () {\n var shards = [];\n var width = 0;\n var height = 0;\n return function (rect, hole) {\n // Reset old shards.\n shards.length = 0;\n\n // If the slot does not overlap with the hole add slot to the return data\n // as is. Note that in this case we are eager to keep the slot as is if\n // possible so we use the EPSILON in favour of that logic.\n if (\n rect.left + rect.width <= hole.left + EPS ||\n hole.left + hole.width <= rect.left + EPS ||\n rect.top + rect.height <= hole.top + EPS ||\n hole.top + hole.height <= rect.top + EPS\n ) {\n shards.push(this.addRect(rect.left, rect.top, rect.width, rect.height));\n return shards;\n }\n\n // Left split.\n width = hole.left - rect.left;\n if (width >= MIN_SLOT_SIZE) {\n shards.push(this.addRect(rect.left, rect.top, width, rect.height));\n }\n\n // Right split.\n width = rect.left + rect.width - (hole.left + hole.width);\n if (width >= MIN_SLOT_SIZE) {\n shards.push(this.addRect(hole.left + hole.width, rect.top, width, rect.height));\n }\n\n // Top split.\n height = hole.top - rect.top;\n if (height >= MIN_SLOT_SIZE) {\n shards.push(this.addRect(rect.left, rect.top, rect.width, height));\n }\n\n // Bottom split.\n height = rect.top + rect.height - (hole.top + hole.height);\n if (height >= MIN_SLOT_SIZE) {\n shards.push(this.addRect(rect.left, hole.top + hole.height, rect.width, height));\n }\n\n return shards;\n };\n })();\n\n /**\n * Check if a rectangle is fully within another rectangle.\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Boolean}\n */\n PackerProcessor.prototype.isRectAWithinRectB = function (a, b) {\n return (\n a.left + EPS >= b.left &&\n a.top + EPS >= b.top &&\n a.left + a.width - EPS <= b.left + b.width &&\n a.top + a.height - EPS <= b.top + b.height\n );\n };\n\n /**\n * Loops through an array of rectangle ids and resets all that are fully\n * within another rectangle in the array. Resetting in this case means that\n * the rectangle id value is replaced with zero.\n *\n * @param {Number[]} rectIds\n * @returns {Number[]}\n */\n PackerProcessor.prototype.purgeRects = (function () {\n var rectA = {};\n var rectB = {};\n return function (rectIds) {\n var i = rectIds.length;\n var j;\n\n while (i--) {\n j = rectIds.length;\n if (!rectIds[i]) continue;\n this.getRect(rectIds[i], rectA);\n while (j--) {\n if (!rectIds[j] || i === j) continue;\n this.getRect(rectIds[j], rectB);\n if (this.isRectAWithinRectB(rectA, rectB)) {\n rectIds[i] = 0;\n break;\n }\n }\n }\n\n return rectIds;\n };\n })();\n\n /**\n * Sort rectangles with top-left gravity.\n *\n * @param {Number} aId\n * @param {Number} bId\n * @returns {Number}\n */\n PackerProcessor.prototype.sortRectsTopLeft = (function () {\n var rectA = {};\n var rectB = {};\n return function (aId, bId) {\n this.getRect(aId, rectA);\n this.getRect(bId, rectB);\n\n return rectA.top < rectB.top && rectA.top + EPS < rectB.top\n ? -1\n : rectA.top > rectB.top && rectA.top - EPS > rectB.top\n ? 1\n : rectA.left < rectB.left && rectA.left + EPS < rectB.left\n ? -1\n : rectA.left > rectB.left && rectA.left - EPS > rectB.left\n ? 1\n : 0;\n };\n })();\n\n /**\n * Sort rectangles with left-top gravity.\n *\n * @param {Number} aId\n * @param {Number} bId\n * @returns {Number}\n */\n PackerProcessor.prototype.sortRectsLeftTop = (function () {\n var rectA = {};\n var rectB = {};\n return function (aId, bId) {\n this.getRect(aId, rectA);\n this.getRect(bId, rectB);\n return rectA.left < rectB.left && rectA.left + EPS < rectB.left\n ? -1\n : rectA.left > rectB.left && rectA.left - EPS < rectB.left\n ? 1\n : rectA.top < rectB.top && rectA.top + EPS < rectB.top\n ? -1\n : rectA.top > rectB.top && rectA.top - EPS > rectB.top\n ? 1\n : 0;\n };\n })();\n\n if (isWorker) {\n var PACKET_INDEX_WIDTH = 1;\n var PACKET_INDEX_HEIGHT = 2;\n var PACKET_INDEX_OPTIONS = 3;\n var PACKET_HEADER_SLOTS = 4;\n var processor = new PackerProcessor();\n\n self.onmessage = function (msg) {\n var data = new Float32Array(msg.data);\n var items = data.subarray(PACKET_HEADER_SLOTS, data.length);\n var slots = new Float32Array(items.length);\n var settings = data[PACKET_INDEX_OPTIONS];\n var layout = {\n items: items,\n slots: slots,\n width: data[PACKET_INDEX_WIDTH],\n height: data[PACKET_INDEX_HEIGHT],\n };\n\n // Compute the layout (width / height / slots).\n processor.computeLayout(layout, settings);\n\n // Copy layout data to the return data.\n data[PACKET_INDEX_WIDTH] = layout.width;\n data[PACKET_INDEX_HEIGHT] = layout.height;\n data.set(layout.slots, PACKET_HEADER_SLOTS);\n\n // Send layout back to the main thread.\n postMessage(data.buffer, [data.buffer]);\n };\n }\n\n return PackerProcessor;\n}\n\nvar PackerProcessor = createPackerProcessor();\n\n//\n// WORKER UTILS\n//\n\nvar blobUrl = null;\nvar activeWorkers = [];\n\nfunction createWorkerProcessors(amount, onmessage) {\n var workers = [];\n\n if (amount > 0) {\n if (!blobUrl) {\n blobUrl = URL.createObjectURL(\n new Blob(['(' + createPackerProcessor.toString() + ')(true)'], {\n type: 'application/javascript',\n })\n );\n }\n\n for (var i = 0, worker; i < amount; i++) {\n worker = new Worker(blobUrl);\n if (onmessage) worker.onmessage = onmessage;\n workers.push(worker);\n activeWorkers.push(worker);\n }\n }\n\n return workers;\n}\n\nfunction destroyWorkerProcessors(workers) {\n var worker;\n var index;\n\n for (var i = 0; i < workers.length; i++) {\n worker = workers[i];\n worker.onmessage = null;\n worker.onerror = null;\n worker.onmessageerror = null;\n worker.terminate();\n\n index = activeWorkers.indexOf(worker);\n if (index > -1) activeWorkers.splice(index, 1);\n }\n\n if (blobUrl && !activeWorkers.length) {\n URL.revokeObjectURL(blobUrl);\n blobUrl = null;\n }\n}\n\nfunction isWorkerProcessorsSupported() {\n return !!(window.Worker && window.URL && window.Blob);\n}\n\nvar FILL_GAPS = 1;\nvar HORIZONTAL = 2;\nvar ALIGN_RIGHT = 4;\nvar ALIGN_BOTTOM = 8;\nvar ROUNDING = 16;\nvar PACKET_INDEX_ID = 0;\nvar PACKET_INDEX_WIDTH = 1;\nvar PACKET_INDEX_HEIGHT = 2;\nvar PACKET_INDEX_OPTIONS = 3;\nvar PACKET_HEADER_SLOTS = 4;\n\n/**\n * @class\n * @param {Number} [numWorkers=0]\n * @param {Object} [options]\n * @param {Boolean} [options.fillGaps=false]\n * @param {Boolean} [options.horizontal=false]\n * @param {Boolean} [options.alignRight=false]\n * @param {Boolean} [options.alignBottom=false]\n * @param {Boolean} [options.rounding=false]\n */\nfunction Packer(numWorkers, options) {\n this._options = 0;\n this._processor = null;\n this._layoutQueue = [];\n this._layouts = {};\n this._layoutCallbacks = {};\n this._layoutWorkers = {};\n this._layoutWorkerData = {};\n this._workers = [];\n this._onWorkerMessage = this._onWorkerMessage.bind(this);\n\n // Set initial options.\n this.setOptions(options);\n\n // Init the worker(s) or the processor if workers can't be used.\n numWorkers = typeof numWorkers === 'number' ? Math.max(0, numWorkers) : 0;\n if (numWorkers && isWorkerProcessorsSupported()) {\n try {\n this._workers = createWorkerProcessors(numWorkers, this._onWorkerMessage);\n } catch (e) {\n this._processor = new PackerProcessor();\n }\n } else {\n this._processor = new PackerProcessor();\n }\n}\n\nPacker.prototype._sendToWorker = function () {\n if (!this._layoutQueue.length || !this._workers.length) return;\n\n var layoutId = this._layoutQueue.shift();\n var worker = this._workers.pop();\n var data = this._layoutWorkerData[layoutId];\n\n delete this._layoutWorkerData[layoutId];\n this._layoutWorkers[layoutId] = worker;\n worker.postMessage(data.buffer, [data.buffer]);\n};\n\nPacker.prototype._onWorkerMessage = function (msg) {\n var data = new Float32Array(msg.data);\n var layoutId = data[PACKET_INDEX_ID];\n var layout = this._layouts[layoutId];\n var callback = this._layoutCallbacks[layoutId];\n var worker = this._layoutWorkers[layoutId];\n\n if (layout) delete this._layouts[layoutId];\n if (callback) delete this._layoutCallbacks[layoutId];\n if (worker) delete this._layoutWorkers[layoutId];\n\n if (layout && callback) {\n layout.width = data[PACKET_INDEX_WIDTH];\n layout.height = data[PACKET_INDEX_HEIGHT];\n layout.slots = data.subarray(PACKET_HEADER_SLOTS, data.length);\n this._finalizeLayout(layout);\n callback(layout);\n }\n\n if (worker) {\n this._workers.push(worker);\n this._sendToWorker();\n }\n};\n\nPacker.prototype._finalizeLayout = function (layout) {\n var grid = layout._grid;\n var isHorizontal = layout._settings & HORIZONTAL;\n var isBorderBox = grid._boxSizing === 'border-box';\n\n delete layout._grid;\n delete layout._settings;\n\n layout.styles = {};\n\n if (isHorizontal) {\n layout.styles.width =\n (isBorderBox ? layout.width + grid._borderLeft + grid._borderRight : layout.width) + 'px';\n } else {\n layout.styles.height =\n (isBorderBox ? layout.height + grid._borderTop + grid._borderBottom : layout.height) + 'px';\n }\n\n return layout;\n};\n\n/**\n * @public\n * @param {Object} [options]\n * @param {Boolean} [options.fillGaps]\n * @param {Boolean} [options.horizontal]\n * @param {Boolean} [options.alignRight]\n * @param {Boolean} [options.alignBottom]\n * @param {Boolean} [options.rounding]\n */\nPacker.prototype.setOptions = function (options) {\n if (!options) return;\n\n var fillGaps;\n if (typeof options.fillGaps === 'boolean') {\n fillGaps = options.fillGaps ? FILL_GAPS : 0;\n } else {\n fillGaps = this._options & FILL_GAPS;\n }\n\n var horizontal;\n if (typeof options.horizontal === 'boolean') {\n horizontal = options.horizontal ? HORIZONTAL : 0;\n } else {\n horizontal = this._options & HORIZONTAL;\n }\n\n var alignRight;\n if (typeof options.alignRight === 'boolean') {\n alignRight = options.alignRight ? ALIGN_RIGHT : 0;\n } else {\n alignRight = this._options & ALIGN_RIGHT;\n }\n\n var alignBottom;\n if (typeof options.alignBottom === 'boolean') {\n alignBottom = options.alignBottom ? ALIGN_BOTTOM : 0;\n } else {\n alignBottom = this._options & ALIGN_BOTTOM;\n }\n\n var rounding;\n if (typeof options.rounding === 'boolean') {\n rounding = options.rounding ? ROUNDING : 0;\n } else {\n rounding = this._options & ROUNDING;\n }\n\n this._options = fillGaps | horizontal | alignRight | alignBottom | rounding;\n};\n\n/**\n * @public\n * @param {Grid} grid\n * @param {Number} layoutId\n * @param {Item[]} items\n * @param {Number} width\n * @param {Number} height\n * @param {Function} callback\n * @returns {?Function}\n */\nPacker.prototype.createLayout = function (grid, layoutId, items, width, height, callback) {\n if (this._layouts[layoutId]) {\n throw new Error('A layout with the provided id is currently being processed.');\n }\n\n var horizontal = this._options & HORIZONTAL;\n var layout = {\n id: layoutId,\n items: items,\n slots: null,\n width: horizontal ? 0 : width,\n height: !horizontal ? 0 : height,\n // Temporary data, which will be removed before sending the layout data\n // outside of Packer's context.\n _grid: grid,\n _settings: this._options,\n };\n\n // If there are no items let's call the callback immediately.\n if (!items.length) {\n layout.slots = [];\n this._finalizeLayout(layout);\n callback(layout);\n return;\n }\n\n // Create layout synchronously if needed.\n if (this._processor) {\n layout.slots = window.Float32Array\n ? new Float32Array(items.length * 2)\n : new Array(items.length * 2);\n this._processor.computeLayout(layout, layout._settings);\n this._finalizeLayout(layout);\n callback(layout);\n return;\n }\n\n // Worker data.\n var data = new Float32Array(PACKET_HEADER_SLOTS + items.length * 2);\n\n // Worker data header.\n data[PACKET_INDEX_ID] = layoutId;\n data[PACKET_INDEX_WIDTH] = layout.width;\n data[PACKET_INDEX_HEIGHT] = layout.height;\n data[PACKET_INDEX_OPTIONS] = layout._settings;\n\n // Worker data items.\n var i, j, item;\n for (i = 0, j = PACKET_HEADER_SLOTS - 1, item; i < items.length; i++) {\n item = items[i];\n data[++j] = item._width + item._marginLeft + item._marginRight;\n data[++j] = item._height + item._marginTop + item._marginBottom;\n }\n\n this._layoutQueue.push(layoutId);\n this._layouts[layoutId] = layout;\n this._layoutCallbacks[layoutId] = callback;\n this._layoutWorkerData[layoutId] = data;\n\n this._sendToWorker();\n\n return this.cancelLayout.bind(this, layoutId);\n};\n\n/**\n * @public\n * @param {Number} layoutId\n */\nPacker.prototype.cancelLayout = function (layoutId) {\n var layout = this._layouts[layoutId];\n if (!layout) return;\n\n delete this._layouts[layoutId];\n delete this._layoutCallbacks[layoutId];\n\n if (this._layoutWorkerData[layoutId]) {\n delete this._layoutWorkerData[layoutId];\n var queueIndex = this._layoutQueue.indexOf(layoutId);\n if (queueIndex > -1) this._layoutQueue.splice(queueIndex, 1);\n }\n};\n\n/**\n * @public\n */\nPacker.prototype.destroy = function () {\n // Move all currently used workers back in the workers array.\n for (var key in this._layoutWorkers) {\n this._workers.push(this._layoutWorkers[key]);\n }\n\n // Destroy all instance's workers.\n destroyWorkerProcessors(this._workers);\n\n // Reset data.\n this._workers.length = 0;\n this._layoutQueue.length = 0;\n this._layouts = {};\n this._layoutCallbacks = {};\n this._layoutWorkers = {};\n this._layoutWorkerData = {};\n};\n\nvar debounceId = 0;\n\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. The returned function accepts one argument which, when\n * being `true`, cancels the debounce function immediately. When the debounce\n * function is canceled it cannot be invoked again.\n *\n * @param {Function} fn\n * @param {Number} durationMs\n * @returns {Function}\n */\nfunction debounce(fn, durationMs) {\n var id = ++debounceId;\n var timer = 0;\n var lastTime = 0;\n var isCanceled = false;\n var tick = function (time) {\n if (isCanceled) return;\n\n if (lastTime) timer -= time - lastTime;\n lastTime = time;\n\n if (timer > 0) {\n addDebounceTick(id, tick);\n } else {\n timer = lastTime = 0;\n fn();\n }\n };\n\n return function (cancel) {\n if (isCanceled) return;\n\n if (durationMs <= 0) {\n if (cancel !== true) fn();\n return;\n }\n\n if (cancel === true) {\n isCanceled = true;\n timer = lastTime = 0;\n tick = undefined;\n cancelDebounceTick(id);\n return;\n }\n\n if (timer <= 0) {\n timer = durationMs;\n tick(0);\n } else {\n timer = durationMs;\n }\n };\n}\n\nvar htmlCollectionType = '[object HTMLCollection]';\nvar nodeListType = '[object NodeList]';\n\n/**\n * Check if a value is a node list or a html collection.\n *\n * @param {*} val\n * @returns {Boolean}\n */\nfunction isNodeList(val) {\n var type = Object.prototype.toString.call(val);\n return type === htmlCollectionType || type === nodeListType;\n}\n\nvar objectType = 'object';\nvar objectToStringType = '[object Object]';\nvar toString = Object.prototype.toString;\n\n/**\n * Check if a value is a plain object.\n *\n * @param {*} val\n * @returns {Boolean}\n */\nfunction isPlainObject(val) {\n return typeof val === objectType && toString.call(val) === objectToStringType;\n}\n\nfunction noop() {}\n\n/**\n * Converts a value to an array or clones an array.\n *\n * @param {*} val\n * @returns {Array}\n */\nfunction toArray(val) {\n return isNodeList(val) ? Array.prototype.slice.call(val) : Array.prototype.concat(val);\n}\n\nvar NUMBER_TYPE = 'number';\nvar STRING_TYPE = 'string';\nvar INSTANT_LAYOUT = 'instant';\nvar layoutId = 0;\n\n/**\n * Creates a new Grid instance.\n *\n * @class\n * @param {(HTMLElement|String)} element\n * @param {Object} [options]\n * @param {(String|HTMLElement[]|NodeList|HTMLCollection)} [options.items=\"*\"]\n * @param {Number} [options.showDuration=300]\n * @param {String} [options.showEasing=\"ease\"]\n * @param {Object} [options.visibleStyles={opacity: \"1\", transform: \"scale(1)\"}]\n * @param {Number} [options.hideDuration=300]\n * @param {String} [options.hideEasing=\"ease\"]\n * @param {Object} [options.hiddenStyles={opacity: \"0\", transform: \"scale(0.5)\"}]\n * @param {(Function|Object)} [options.layout]\n * @param {Boolean} [options.layout.fillGaps=false]\n * @param {Boolean} [options.layout.horizontal=false]\n * @param {Boolean} [options.layout.alignRight=false]\n * @param {Boolean} [options.layout.alignBottom=false]\n * @param {Boolean} [options.layout.rounding=false]\n * @param {(Boolean|Number)} [options.layoutOnResize=150]\n * @param {Boolean} [options.layoutOnInit=true]\n * @param {Number} [options.layoutDuration=300]\n * @param {String} [options.layoutEasing=\"ease\"]\n * @param {?Object} [options.sortData=null]\n * @param {Boolean} [options.dragEnabled=false]\n * @param {?String} [options.dragHandle=null]\n * @param {?HtmlElement} [options.dragContainer=null]\n * @param {?Function} [options.dragStartPredicate]\n * @param {Number} [options.dragStartPredicate.distance=0]\n * @param {Number} [options.dragStartPredicate.delay=0]\n * @param {String} [options.dragAxis=\"xy\"]\n * @param {(Boolean|Function)} [options.dragSort=true]\n * @param {Object} [options.dragSortHeuristics]\n * @param {Number} [options.dragSortHeuristics.sortInterval=100]\n * @param {Number} [options.dragSortHeuristics.minDragDistance=10]\n * @param {Number} [options.dragSortHeuristics.minBounceBackAngle=1]\n * @param {(Function|Object)} [options.dragSortPredicate]\n * @param {Number} [options.dragSortPredicate.threshold=50]\n * @param {String} [options.dragSortPredicate.action=\"move\"]\n * @param {String} [options.dragSortPredicate.migrateAction=\"move\"]\n * @param {Object} [options.dragRelease]\n * @param {Number} [options.dragRelease.duration=300]\n * @param {String} [options.dragRelease.easing=\"ease\"]\n * @param {Boolean} [options.dragRelease.useDragContainer=true]\n * @param {Object} [options.dragCssProps]\n * @param {Object} [options.dragPlaceholder]\n * @param {Boolean} [options.dragPlaceholder.enabled=false]\n * @param {?Function} [options.dragPlaceholder.createElement=null]\n * @param {?Function} [options.dragPlaceholder.onCreate=null]\n * @param {?Function} [options.dragPlaceholder.onRemove=null]\n * @param {Object} [options.dragAutoScroll]\n * @param {(Function|Array)} [options.dragAutoScroll.targets=[]]\n * @param {?Function} [options.dragAutoScroll.handle=null]\n * @param {Number} [options.dragAutoScroll.threshold=50]\n * @param {Number} [options.dragAutoScroll.safeZone=0.2]\n * @param {(Function|Number)} [options.dragAutoScroll.speed]\n * @param {Boolean} [options.dragAutoScroll.sortDuringScroll=true]\n * @param {Boolean} [options.dragAutoScroll.smoothStop=false]\n * @param {?Function} [options.dragAutoScroll.onStart=null]\n * @param {?Function} [options.dragAutoScroll.onStop=null]\n * @param {String} [options.containerClass=\"muuri\"]\n * @param {String} [options.itemClass=\"muuri-item\"]\n * @param {String} [options.itemVisibleClass=\"muuri-item-visible\"]\n * @param {String} [options.itemHiddenClass=\"muuri-item-hidden\"]\n * @param {String} [options.itemPositioningClass=\"muuri-item-positioning\"]\n * @param {String} [options.itemDraggingClass=\"muuri-item-dragging\"]\n * @param {String} [options.itemReleasingClass=\"muuri-item-releasing\"]\n * @param {String} [options.itemPlaceholderClass=\"muuri-item-placeholder\"]\n */\nfunction Grid(element, options) {\n // Allow passing element as selector string\n if (typeof element === STRING_TYPE) {\n element = document.querySelector(element);\n }\n\n // Throw an error if the container element is not body element or does not\n // exist within the body element.\n var isElementInDom = element.getRootNode\n ? element.getRootNode({ composed: true }) === document\n : document.body.contains(element);\n if (!isElementInDom || element === document.documentElement) {\n throw new Error('Container element must be an existing DOM element.');\n }\n\n // Create instance settings by merging the options with default options.\n var settings = mergeSettings(Grid.defaultOptions, options);\n settings.visibleStyles = normalizeStyles(settings.visibleStyles);\n settings.hiddenStyles = normalizeStyles(settings.hiddenStyles);\n if (!isFunction(settings.dragSort)) {\n settings.dragSort = !!settings.dragSort;\n }\n\n this._id = createUid();\n this._element = element;\n this._settings = settings;\n this._isDestroyed = false;\n this._items = [];\n this._layout = {\n id: 0,\n items: [],\n slots: [],\n };\n this._isLayoutFinished = true;\n this._nextLayoutData = null;\n this._emitter = new Emitter();\n this._onLayoutDataReceived = this._onLayoutDataReceived.bind(this);\n\n // Store grid instance to the grid instances collection.\n GRID_INSTANCES[this._id] = this;\n\n // Add container element's class name.\n addClass(element, settings.containerClass);\n\n // If layoutOnResize option is a valid number sanitize it and bind the resize\n // handler.\n bindLayoutOnResize(this, settings.layoutOnResize);\n\n // Add initial items.\n this.add(getInitialGridElements(element, settings.items), { layout: false });\n\n // Layout on init if necessary.\n if (settings.layoutOnInit) {\n this.layout(true);\n }\n}\n\n/**\n * Public properties\n * *****************\n */\n\n/**\n * @public\n * @static\n * @see Item\n */\nGrid.Item = Item;\n\n/**\n * @public\n * @static\n * @see ItemLayout\n */\nGrid.ItemLayout = ItemLayout;\n\n/**\n * @public\n * @static\n * @see ItemVisibility\n */\nGrid.ItemVisibility = ItemVisibility;\n\n/**\n * @public\n * @static\n * @see ItemMigrate\n */\nGrid.ItemMigrate = ItemMigrate;\n\n/**\n * @public\n * @static\n * @see ItemDrag\n */\nGrid.ItemDrag = ItemDrag;\n\n/**\n * @public\n * @static\n * @see ItemDragRelease\n */\nGrid.ItemDragRelease = ItemDragRelease;\n\n/**\n * @public\n * @static\n * @see ItemDragPlaceholder\n */\nGrid.ItemDragPlaceholder = ItemDragPlaceholder;\n\n/**\n * @public\n * @static\n * @see Emitter\n */\nGrid.Emitter = Emitter;\n\n/**\n * @public\n * @static\n * @see Animator\n */\nGrid.Animator = Animator;\n\n/**\n * @public\n * @static\n * @see Dragger\n */\nGrid.Dragger = Dragger;\n\n/**\n * @public\n * @static\n * @see Packer\n */\nGrid.Packer = Packer;\n\n/**\n * @public\n * @static\n * @see AutoScroller\n */\nGrid.AutoScroller = AutoScroller;\n\n/**\n * The default Packer instance used by default for all layouts.\n *\n * @public\n * @static\n * @type {Packer}\n */\nGrid.defaultPacker = new Packer(2);\n\n/**\n * Default options for Grid instance.\n *\n * @public\n * @static\n * @type {Object}\n */\nGrid.defaultOptions = {\n // Initial item elements\n items: '*',\n\n // Default show animation\n showDuration: 300,\n showEasing: 'ease',\n\n // Default hide animation\n hideDuration: 300,\n hideEasing: 'ease',\n\n // Item's visible/hidden state styles\n visibleStyles: {\n opacity: '1',\n transform: 'scale(1)',\n },\n hiddenStyles: {\n opacity: '0',\n transform: 'scale(0.5)',\n },\n\n // Layout\n layout: {\n fillGaps: false,\n horizontal: false,\n alignRight: false,\n alignBottom: false,\n rounding: false,\n },\n layoutOnResize: 150,\n layoutOnInit: true,\n layoutDuration: 300,\n layoutEasing: 'ease',\n\n // Sorting\n sortData: null,\n\n // Drag & Drop\n dragEnabled: false,\n dragContainer: null,\n dragHandle: null,\n dragStartPredicate: {\n distance: 0,\n delay: 0,\n },\n dragAxis: 'xy',\n dragSort: true,\n dragSortHeuristics: {\n sortInterval: 100,\n minDragDistance: 10,\n minBounceBackAngle: 1,\n },\n dragSortPredicate: {\n threshold: 50,\n action: ACTION_MOVE,\n migrateAction: ACTION_MOVE,\n },\n dragRelease: {\n duration: 300,\n easing: 'ease',\n useDragContainer: true,\n },\n dragCssProps: {\n touchAction: 'none',\n userSelect: 'none',\n userDrag: 'none',\n tapHighlightColor: 'rgba(0, 0, 0, 0)',\n touchCallout: 'none',\n contentZooming: 'none',\n },\n dragPlaceholder: {\n enabled: false,\n createElement: null,\n onCreate: null,\n onRemove: null,\n },\n dragAutoScroll: {\n targets: [],\n handle: null,\n threshold: 50,\n safeZone: 0.2,\n speed: AutoScroller.smoothSpeed(1000, 2000, 2500),\n sortDuringScroll: true,\n smoothStop: false,\n onStart: null,\n onStop: null,\n },\n\n // Classnames\n containerClass: 'muuri',\n itemClass: 'muuri-item',\n itemVisibleClass: 'muuri-item-shown',\n itemHiddenClass: 'muuri-item-hidden',\n itemPositioningClass: 'muuri-item-positioning',\n itemDraggingClass: 'muuri-item-dragging',\n itemReleasingClass: 'muuri-item-releasing',\n itemPlaceholderClass: 'muuri-item-placeholder',\n};\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Bind an event listener.\n *\n * @public\n * @param {String} event\n * @param {Function} listener\n * @returns {Grid}\n */\nGrid.prototype.on = function (event, listener) {\n this._emitter.on(event, listener);\n return this;\n};\n\n/**\n * Unbind an event listener.\n *\n * @public\n * @param {String} event\n * @param {Function} listener\n * @returns {Grid}\n */\nGrid.prototype.off = function (event, listener) {\n this._emitter.off(event, listener);\n return this;\n};\n\n/**\n * Get the container element.\n *\n * @public\n * @returns {HTMLElement}\n */\nGrid.prototype.getElement = function () {\n return this._element;\n};\n\n/**\n * Get instance's item by element or by index. Target can also be an Item\n * instance in which case the function returns the item if it exists within\n * related Grid instance. If nothing is found with the provided target, null\n * is returned.\n *\n * @private\n * @param {(HtmlElement|Number|Item)} [target]\n * @returns {?Item}\n */\nGrid.prototype.getItem = function (target) {\n // If no target is specified or the instance is destroyed, return null.\n if (this._isDestroyed || (!target && target !== 0)) {\n return null;\n }\n\n // If target is number return the item in that index. If the number is lower\n // than zero look for the item starting from the end of the items array. For\n // example -1 for the last item, -2 for the second last item, etc.\n if (typeof target === NUMBER_TYPE) {\n return this._items[target > -1 ? target : this._items.length + target] || null;\n }\n\n // If the target is an instance of Item return it if it is attached to this\n // Grid instance, otherwise return null.\n if (target instanceof Item) {\n return target._gridId === this._id ? target : null;\n }\n\n // In other cases let's assume that the target is an element, so let's try\n // to find an item that matches the element and return it. If item is not\n // found return null.\n if (ITEM_ELEMENT_MAP) {\n var item = ITEM_ELEMENT_MAP.get(target);\n return item && item._gridId === this._id ? item : null;\n } else {\n for (var i = 0; i < this._items.length; i++) {\n if (this._items[i]._element === target) {\n return this._items[i];\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get all items. Optionally you can provide specific targets (elements,\n * indices and item instances). All items that are not found are omitted from\n * the returned array.\n *\n * @public\n * @param {(HtmlElement|Number|Item|Array)} [targets]\n * @returns {Item[]}\n */\nGrid.prototype.getItems = function (targets) {\n // Return all items immediately if no targets were provided or if the\n // instance is destroyed.\n if (this._isDestroyed || targets === undefined) {\n return this._items.slice(0);\n }\n\n var items = [];\n var i, item;\n\n if (Array.isArray(targets) || isNodeList(targets)) {\n for (i = 0; i < targets.length; i++) {\n item = this.getItem(targets[i]);\n if (item) items.push(item);\n }\n } else {\n item = this.getItem(targets);\n if (item) items.push(item);\n }\n\n return items;\n};\n\n/**\n * Update the cached dimensions of the instance's items. By default all the\n * items are refreshed, but you can also provide an array of target items as the\n * first argument if you want to refresh specific items. Note that all hidden\n * items are not refreshed by default since their \"display\" property is \"none\"\n * and their dimensions are therefore not readable from the DOM. However, if you\n * do want to force update hidden item dimensions too you can provide `true`\n * as the second argument, which makes the elements temporarily visible while\n * their dimensions are being read.\n *\n * @public\n * @param {Item[]} [items]\n * @param {Boolean} [force=false]\n * @returns {Grid}\n */\nGrid.prototype.refreshItems = function (items, force) {\n if (this._isDestroyed) return this;\n\n var targets = items || this._items;\n var i, item, style, hiddenItemStyles;\n\n if (force === true) {\n hiddenItemStyles = [];\n for (i = 0; i < targets.length; i++) {\n item = targets[i];\n if (!item.isVisible() && !item.isHiding()) {\n style = item.getElement().style;\n style.visibility = 'hidden';\n style.display = '';\n hiddenItemStyles.push(style);\n }\n }\n }\n\n for (i = 0; i < targets.length; i++) {\n targets[i]._refreshDimensions(force);\n }\n\n if (force === true) {\n for (i = 0; i < hiddenItemStyles.length; i++) {\n style = hiddenItemStyles[i];\n style.visibility = '';\n style.display = 'none';\n }\n hiddenItemStyles.length = 0;\n }\n\n return this;\n};\n\n/**\n * Update the sort data of the instance's items. By default all the items are\n * refreshed, but you can also provide an array of target items if you want to\n * refresh specific items.\n *\n * @public\n * @param {Item[]} [items]\n * @returns {Grid}\n */\nGrid.prototype.refreshSortData = function (items) {\n if (this._isDestroyed) return this;\n\n var targets = items || this._items;\n for (var i = 0; i < targets.length; i++) {\n targets[i]._refreshSortData();\n }\n\n return this;\n};\n\n/**\n * Synchronize the item elements to match the order of the items in the DOM.\n * This comes handy if you need to keep the DOM structure matched with the\n * order of the items. Note that if an item's element is not currently a child\n * of the container element (if it is dragged for example) it is ignored and\n * left untouched.\n *\n * @public\n * @returns {Grid}\n */\nGrid.prototype.synchronize = function () {\n if (this._isDestroyed) return this;\n\n var items = this._items;\n if (!items.length) return this;\n\n var fragment;\n var element;\n\n for (var i = 0; i < items.length; i++) {\n element = items[i]._element;\n if (element.parentNode === this._element) {\n fragment = fragment || document.createDocumentFragment();\n fragment.appendChild(element);\n }\n }\n\n if (!fragment) return this;\n\n this._element.appendChild(fragment);\n this._emit(EVENT_SYNCHRONIZE);\n\n return this;\n};\n\n/**\n * Calculate and apply item positions.\n *\n * @public\n * @param {Boolean} [instant=false]\n * @param {Function} [onFinish]\n * @returns {Grid}\n */\nGrid.prototype.layout = function (instant, onFinish) {\n if (this._isDestroyed) return this;\n\n // Cancel unfinished layout algorithm if possible.\n var unfinishedLayout = this._nextLayoutData;\n if (unfinishedLayout && isFunction(unfinishedLayout.cancel)) {\n unfinishedLayout.cancel();\n }\n\n // Compute layout id (let's stay in Float32 range).\n layoutId = (layoutId % MAX_SAFE_FLOAT32_INTEGER) + 1;\n var nextLayoutId = layoutId;\n\n // Store data for next layout.\n this._nextLayoutData = {\n id: nextLayoutId,\n instant: instant,\n onFinish: onFinish,\n cancel: null,\n };\n\n // Collect layout items (all active grid items).\n var items = this._items;\n var layoutItems = [];\n for (var i = 0; i < items.length; i++) {\n if (items[i]._isActive) layoutItems.push(items[i]);\n }\n\n // Compute new layout.\n this._refreshDimensions();\n var gridWidth = this._width - this._borderLeft - this._borderRight;\n var gridHeight = this._height - this._borderTop - this._borderBottom;\n var layoutSettings = this._settings.layout;\n var cancelLayout;\n if (isFunction(layoutSettings)) {\n cancelLayout = layoutSettings(\n this,\n nextLayoutId,\n layoutItems,\n gridWidth,\n gridHeight,\n this._onLayoutDataReceived\n );\n } else {\n Grid.defaultPacker.setOptions(layoutSettings);\n cancelLayout = Grid.defaultPacker.createLayout(\n this,\n nextLayoutId,\n layoutItems,\n gridWidth,\n gridHeight,\n this._onLayoutDataReceived\n );\n }\n\n // Store layout cancel method if available.\n if (\n isFunction(cancelLayout) &&\n this._nextLayoutData &&\n this._nextLayoutData.id === nextLayoutId\n ) {\n this._nextLayoutData.cancel = cancelLayout;\n }\n\n return this;\n};\n\n/**\n * Add new items by providing the elements you wish to add to the instance and\n * optionally provide the index where you want the items to be inserted into.\n * All elements that are not already children of the container element will be\n * automatically appended to the container element. If an element has it's CSS\n * display property set to \"none\" it will be marked as inactive during the\n * initiation process. As long as the item is inactive it will not be part of\n * the layout, but it will retain it's index. You can activate items at any\n * point with grid.show() method. This method will automatically call\n * grid.layout() if one or more of the added elements are visible. If only\n * hidden items are added no layout will be called. All the new visible items\n * are positioned without animation during their first layout.\n *\n * @public\n * @param {(HTMLElement|HTMLElement[])} elements\n * @param {Object} [options]\n * @param {Number} [options.index=-1]\n * @param {Boolean} [options.active]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Item[]}\n */\nGrid.prototype.add = function (elements, options) {\n if (this._isDestroyed || !elements) return [];\n\n var newItems = toArray(elements);\n if (!newItems.length) return newItems;\n\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var items = this._items;\n var needsLayout = false;\n var fragment;\n var element;\n var item;\n var i;\n\n // Collect all the elements that are not child of the grid element into a\n // document fragment.\n for (i = 0; i < newItems.length; i++) {\n element = newItems[i];\n if (element.parentNode !== this._element) {\n fragment = fragment || document.createDocumentFragment();\n fragment.appendChild(element);\n }\n }\n\n // If we have a fragment, let's append it to the grid element. We could just\n // not do this and the `new Item()` instantiation would handle this for us,\n // but this way we can add the elements into the DOM a bit faster.\n if (fragment) {\n this._element.appendChild(fragment);\n }\n\n // Map provided elements into new grid items.\n for (i = 0; i < newItems.length; i++) {\n element = newItems[i];\n item = newItems[i] = new Item(this, element, opts.active);\n\n // If the item to be added is active, we need to do a layout. Also, we\n // need to mark the item with the skipNextAnimation flag to make it\n // position instantly (without animation) during the next layout. Without\n // the hack the item would animate to it's new position from the northwest\n // corner of the grid, which feels a bit buggy (imho).\n if (item._isActive) {\n needsLayout = true;\n item._layout._skipNextAnimation = true;\n }\n }\n\n // Set up the items' initial dimensions and sort data. This needs to be done\n // in a separate loop to avoid layout thrashing.\n for (i = 0; i < newItems.length; i++) {\n item = newItems[i];\n item._refreshDimensions();\n item._refreshSortData();\n }\n\n // Add the new items to the items collection to correct index.\n arrayInsert(items, newItems, opts.index);\n\n // Emit add event.\n if (this._hasListeners(EVENT_ADD)) {\n this._emit(EVENT_ADD, newItems.slice(0));\n }\n\n // If layout is needed.\n if (needsLayout && layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n\n return newItems;\n};\n\n/**\n * Remove items from the instance.\n *\n * @public\n * @param {Item[]} items\n * @param {Object} [options]\n * @param {Boolean} [options.removeElements=false]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Item[]}\n */\nGrid.prototype.remove = function (items, options) {\n if (this._isDestroyed || !items.length) return [];\n\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var needsLayout = false;\n var allItems = this.getItems();\n var targetItems = [];\n var indices = [];\n var index;\n var item;\n var i;\n\n // Remove the individual items.\n for (i = 0; i < items.length; i++) {\n item = items[i];\n if (item._isDestroyed) continue;\n\n index = this._items.indexOf(item);\n if (index === -1) continue;\n\n if (item._isActive) needsLayout = true;\n\n targetItems.push(item);\n indices.push(allItems.indexOf(item));\n item._destroy(opts.removeElements);\n this._items.splice(index, 1);\n }\n\n // Emit remove event.\n if (this._hasListeners(EVENT_REMOVE)) {\n this._emit(EVENT_REMOVE, targetItems.slice(0), indices);\n }\n\n // If layout is needed.\n if (needsLayout && layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n\n return targetItems;\n};\n\n/**\n * Show specific instance items.\n *\n * @public\n * @param {Item[]} items\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {Boolean} [options.syncWithLayout=true]\n * @param {Function} [options.onFinish]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.show = function (items, options) {\n if (!this._isDestroyed && items.length) {\n this._setItemsVisibility(items, true, options);\n }\n return this;\n};\n\n/**\n * Hide specific instance items.\n *\n * @public\n * @param {Item[]} items\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {Boolean} [options.syncWithLayout=true]\n * @param {Function} [options.onFinish]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.hide = function (items, options) {\n if (!this._isDestroyed && items.length) {\n this._setItemsVisibility(items, false, options);\n }\n return this;\n};\n\n/**\n * Filter items. Expects at least one argument, a predicate, which should be\n * either a function or a string. The predicate callback is executed for every\n * item in the instance. If the return value of the predicate is truthy the\n * item in question will be shown and otherwise hidden. The predicate callback\n * receives the item instance as it's argument. If the predicate is a string\n * it is considered to be a selector and it is checked against every item\n * element in the instance with the native element.matches() method. All the\n * matching items will be shown and others hidden.\n *\n * @public\n * @param {(Function|String)} predicate\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {Boolean} [options.syncWithLayout=true]\n * @param {FilterCallback} [options.onFinish]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.filter = function (predicate, options) {\n if (this._isDestroyed || !this._items.length) return this;\n\n var itemsToShow = [];\n var itemsToHide = [];\n var isPredicateString = typeof predicate === STRING_TYPE;\n var isPredicateFn = isFunction(predicate);\n var opts = options || {};\n var isInstant = opts.instant === true;\n var syncWithLayout = opts.syncWithLayout;\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var onFinish = isFunction(opts.onFinish) ? opts.onFinish : null;\n var tryFinishCounter = -1;\n var tryFinish = noop;\n var item;\n var i;\n\n // If we have onFinish callback, let's create proper tryFinish callback.\n if (onFinish) {\n tryFinish = function () {\n ++tryFinishCounter && onFinish(itemsToShow.slice(0), itemsToHide.slice(0));\n };\n }\n\n // Check which items need to be shown and which hidden.\n if (isPredicateFn || isPredicateString) {\n for (i = 0; i < this._items.length; i++) {\n item = this._items[i];\n if (isPredicateFn ? predicate(item) : elementMatches(item._element, predicate)) {\n itemsToShow.push(item);\n } else {\n itemsToHide.push(item);\n }\n }\n }\n\n // Show items that need to be shown.\n if (itemsToShow.length) {\n this.show(itemsToShow, {\n instant: isInstant,\n syncWithLayout: syncWithLayout,\n onFinish: tryFinish,\n layout: false,\n });\n } else {\n tryFinish();\n }\n\n // Hide items that need to be hidden.\n if (itemsToHide.length) {\n this.hide(itemsToHide, {\n instant: isInstant,\n syncWithLayout: syncWithLayout,\n onFinish: tryFinish,\n layout: false,\n });\n } else {\n tryFinish();\n }\n\n // If there are any items to filter.\n if (itemsToShow.length || itemsToHide.length) {\n // Emit filter event.\n if (this._hasListeners(EVENT_FILTER)) {\n this._emit(EVENT_FILTER, itemsToShow.slice(0), itemsToHide.slice(0));\n }\n\n // If layout is needed.\n if (layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n }\n\n return this;\n};\n\n/**\n * Sort items. There are three ways to sort the items. The first is simply by\n * providing a function as the comparer which works identically to native\n * array sort. Alternatively you can sort by the sort data you have provided\n * in the instance's options. Just provide the sort data key(s) as a string\n * (separated by space) and the items will be sorted based on the provided\n * sort data keys. Lastly you have the opportunity to provide a presorted\n * array of items which will be used to sync the internal items array in the\n * same order.\n *\n * @public\n * @param {(Function|String|Item[])} comparer\n * @param {Object} [options]\n * @param {Boolean} [options.descending=false]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.sort = (function () {\n var sortComparer;\n var isDescending;\n var origItems;\n var indexMap;\n\n function defaultComparer(a, b) {\n var result = 0;\n var criteriaName;\n var criteriaOrder;\n var valA;\n var valB;\n\n // Loop through the list of sort criteria.\n for (var i = 0; i < sortComparer.length; i++) {\n // Get the criteria name, which should match an item's sort data key.\n criteriaName = sortComparer[i][0];\n criteriaOrder = sortComparer[i][1];\n\n // Get items' cached sort values for the criteria. If the item has no sort\n // data let's update the items sort data (this is a lazy load mechanism).\n valA = (a._sortData ? a : a._refreshSortData())._sortData[criteriaName];\n valB = (b._sortData ? b : b._refreshSortData())._sortData[criteriaName];\n\n // Sort the items in descending order if defined so explicitly. Otherwise\n // sort items in ascending order.\n if (criteriaOrder === 'desc' || (!criteriaOrder && isDescending)) {\n result = valB < valA ? -1 : valB > valA ? 1 : 0;\n } else {\n result = valA < valB ? -1 : valA > valB ? 1 : 0;\n }\n\n // If we have -1 or 1 as the return value, let's return it immediately.\n if (result) return result;\n }\n\n // If values are equal let's compare the item indices to make sure we\n // have a stable sort. Note that this is not necessary in evergreen browsers\n // because Array.sort() is nowadays stable. However, in order to guarantee\n // same results in older browsers we need this.\n if (!result) {\n if (!indexMap) indexMap = createIndexMap(origItems);\n result = isDescending ? compareIndexMap(indexMap, b, a) : compareIndexMap(indexMap, a, b);\n }\n return result;\n }\n\n function customComparer(a, b) {\n var result = isDescending ? -sortComparer(a, b) : sortComparer(a, b);\n if (!result) {\n if (!indexMap) indexMap = createIndexMap(origItems);\n result = isDescending ? compareIndexMap(indexMap, b, a) : compareIndexMap(indexMap, a, b);\n }\n return result;\n }\n\n return function (comparer, options) {\n if (this._isDestroyed || this._items.length < 2) return this;\n\n var items = this._items;\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n\n // Setup parent scope data.\n isDescending = !!opts.descending;\n origItems = items.slice(0);\n indexMap = null;\n\n // If function is provided do a native array sort.\n if (isFunction(comparer)) {\n sortComparer = comparer;\n items.sort(customComparer);\n }\n // Otherwise if we got a string, let's sort by the sort data as provided in\n // the instance's options.\n else if (typeof comparer === STRING_TYPE) {\n sortComparer = comparer\n .trim()\n .split(' ')\n .filter(function (val) {\n return val;\n })\n .map(function (val) {\n return val.split(':');\n });\n items.sort(defaultComparer);\n }\n // Otherwise if we got an array, let's assume it's a presorted array of the\n // items and order the items based on it. Here we blindly trust that the\n // presorted array consists of the same item instances as the current\n // `gird._items` array.\n else if (Array.isArray(comparer)) {\n items.length = 0;\n items.push.apply(items, comparer);\n }\n // Otherwise let's throw an error.\n else {\n sortComparer = isDescending = origItems = indexMap = null;\n throw new Error('Invalid comparer argument provided.');\n }\n\n // Emit sort event.\n if (this._hasListeners(EVENT_SORT)) {\n this._emit(EVENT_SORT, items.slice(0), origItems);\n }\n\n // If layout is needed.\n if (layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n\n // Reset data (to avoid mem leaks).\n sortComparer = isDescending = origItems = indexMap = null;\n\n return this;\n };\n})();\n\n/**\n * Move item to another index or in place of another item.\n *\n * @public\n * @param {(HtmlElement|Number|Item)} item\n * @param {(HtmlElement|Number|Item)} position\n * @param {Object} [options]\n * @param {String} [options.action=\"move\"]\n * - Accepts either \"move\" or \"swap\".\n * - \"move\" moves the item in place of the other item.\n * - \"swap\" swaps the position of the items.\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.move = function (item, position, options) {\n if (this._isDestroyed || this._items.length < 2) return this;\n\n var items = this._items;\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var isSwap = opts.action === ACTION_SWAP;\n var action = isSwap ? ACTION_SWAP : ACTION_MOVE;\n var fromItem = this.getItem(item);\n var toItem = this.getItem(position);\n var fromIndex;\n var toIndex;\n\n // Make sure the items exist and are not the same.\n if (fromItem && toItem && fromItem !== toItem) {\n // Get the indices of the items.\n fromIndex = items.indexOf(fromItem);\n toIndex = items.indexOf(toItem);\n\n // Do the move/swap.\n if (isSwap) {\n arraySwap(items, fromIndex, toIndex);\n } else {\n arrayMove(items, fromIndex, toIndex);\n }\n\n // Emit move event.\n if (this._hasListeners(EVENT_MOVE)) {\n this._emit(EVENT_MOVE, {\n item: fromItem,\n fromIndex: fromIndex,\n toIndex: toIndex,\n action: action,\n });\n }\n\n // If layout is needed.\n if (layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n }\n\n return this;\n};\n\n/**\n * Send item to another Grid instance.\n *\n * @public\n * @param {(HtmlElement|Number|Item)} item\n * @param {Grid} targetGrid\n * @param {(HtmlElement|Number|Item)} position\n * @param {Object} [options]\n * @param {HTMLElement} [options.appendTo=document.body]\n * @param {(Boolean|Function|String)} [options.layoutSender=true]\n * @param {(Boolean|Function|String)} [options.layoutReceiver=true]\n * @returns {Grid}\n */\nGrid.prototype.send = function (item, targetGrid, position, options) {\n if (this._isDestroyed || targetGrid._isDestroyed || this === targetGrid) return this;\n\n // Make sure we have a valid target item.\n item = this.getItem(item);\n if (!item) return this;\n\n var opts = options || {};\n var container = opts.appendTo || document.body;\n var layoutSender = opts.layoutSender ? opts.layoutSender : opts.layoutSender === undefined;\n var layoutReceiver = opts.layoutReceiver\n ? opts.layoutReceiver\n : opts.layoutReceiver === undefined;\n\n // Start the migration process.\n item._migrate.start(targetGrid, position, container);\n\n // If migration was started successfully and the item is active, let's layout\n // the grids.\n if (item._migrate._isActive && item._isActive) {\n if (layoutSender) {\n this.layout(\n layoutSender === INSTANT_LAYOUT,\n isFunction(layoutSender) ? layoutSender : undefined\n );\n }\n if (layoutReceiver) {\n targetGrid.layout(\n layoutReceiver === INSTANT_LAYOUT,\n isFunction(layoutReceiver) ? layoutReceiver : undefined\n );\n }\n }\n\n return this;\n};\n\n/**\n * Destroy the instance.\n *\n * @public\n * @param {Boolean} [removeElements=false]\n * @returns {Grid}\n */\nGrid.prototype.destroy = function (removeElements) {\n if (this._isDestroyed) return this;\n\n var container = this._element;\n var items = this._items.slice(0);\n var layoutStyles = (this._layout && this._layout.styles) || {};\n var i, prop;\n\n // Unbind window resize event listener.\n unbindLayoutOnResize(this);\n\n // Destroy items.\n for (i = 0; i < items.length; i++) items[i]._destroy(removeElements);\n this._items.length = 0;\n\n // Restore container.\n removeClass(container, this._settings.containerClass);\n for (prop in layoutStyles) container.style[prop] = '';\n\n // Emit destroy event and unbind all events.\n this._emit(EVENT_DESTROY);\n this._emitter.destroy();\n\n // Remove reference from the grid instances collection.\n delete GRID_INSTANCES[this._id];\n\n // Flag instance as destroyed.\n this._isDestroyed = true;\n\n return this;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Emit a grid event.\n *\n * @private\n * @param {String} event\n * @param {...*} [arg]\n */\nGrid.prototype._emit = function () {\n if (this._isDestroyed) return;\n this._emitter.emit.apply(this._emitter, arguments);\n};\n\n/**\n * Check if there are any events listeners for an event.\n *\n * @private\n * @param {String} event\n * @returns {Boolean}\n */\nGrid.prototype._hasListeners = function (event) {\n if (this._isDestroyed) return false;\n return this._emitter.countListeners(event) > 0;\n};\n\n/**\n * Update container's width, height and offsets.\n *\n * @private\n */\nGrid.prototype._updateBoundingRect = function () {\n var element = this._element;\n var rect = element.getBoundingClientRect();\n this._width = rect.width;\n this._height = rect.height;\n this._left = rect.left;\n this._top = rect.top;\n this._right = rect.right;\n this._bottom = rect.bottom;\n};\n\n/**\n * Update container's border sizes.\n *\n * @private\n * @param {Boolean} left\n * @param {Boolean} right\n * @param {Boolean} top\n * @param {Boolean} bottom\n */\nGrid.prototype._updateBorders = function (left, right, top, bottom) {\n var element = this._element;\n if (left) this._borderLeft = getStyleAsFloat(element, 'border-left-width');\n if (right) this._borderRight = getStyleAsFloat(element, 'border-right-width');\n if (top) this._borderTop = getStyleAsFloat(element, 'border-top-width');\n if (bottom) this._borderBottom = getStyleAsFloat(element, 'border-bottom-width');\n};\n\n/**\n * Refresh all of container's internal dimensions and offsets.\n *\n * @private\n */\nGrid.prototype._refreshDimensions = function () {\n this._updateBoundingRect();\n this._updateBorders(1, 1, 1, 1);\n this._boxSizing = getStyle(this._element, 'box-sizing');\n};\n\n/**\n * Calculate and apply item positions.\n *\n * @private\n * @param {Object} layout\n */\nGrid.prototype._onLayoutDataReceived = (function () {\n var itemsToLayout = [];\n return function (layout) {\n if (this._isDestroyed || !this._nextLayoutData || this._nextLayoutData.id !== layout.id) return;\n\n var grid = this;\n var instant = this._nextLayoutData.instant;\n var onFinish = this._nextLayoutData.onFinish;\n var numItems = layout.items.length;\n var counter = numItems;\n var item;\n var left;\n var top;\n var i;\n\n // Reset next layout data.\n this._nextLayoutData = null;\n\n if (!this._isLayoutFinished && this._hasListeners(EVENT_LAYOUT_ABORT)) {\n this._emit(EVENT_LAYOUT_ABORT, this._layout.items.slice(0));\n }\n\n // Update the layout reference.\n this._layout = layout;\n\n // Update the item positions and collect all items that need to be laid\n // out. It is critical that we update the item position _before_ the\n // layoutStart event as the new data might be needed in the callback.\n itemsToLayout.length = 0;\n for (i = 0; i < numItems; i++) {\n item = layout.items[i];\n\n // Make sure we have a matching item.\n if (!item) {\n --counter;\n continue;\n }\n\n // Get the item's new left and top values.\n left = layout.slots[i * 2];\n top = layout.slots[i * 2 + 1];\n\n // Let's skip the layout process if we can. Possibly avoids a lot of DOM\n // operations which saves us some CPU cycles.\n if (item._canSkipLayout(left, top)) {\n --counter;\n continue;\n }\n\n // Update the item's position.\n item._left = left;\n item._top = top;\n\n // Only active non-dragged items need to be moved.\n if (item.isActive() && !item.isDragging()) {\n itemsToLayout.push(item);\n } else {\n --counter;\n }\n }\n\n // Set layout styles to the grid element.\n if (layout.styles) {\n setStyles(this._element, layout.styles);\n }\n\n // layoutStart event is intentionally emitted after the container element's\n // dimensions are set, because otherwise there would be no hook for reacting\n // to container dimension changes.\n if (this._hasListeners(EVENT_LAYOUT_START)) {\n this._emit(EVENT_LAYOUT_START, layout.items.slice(0), instant === true);\n // Let's make sure that the current layout process has not been overridden\n // in the layoutStart event, and if so, let's stop processing the aborted\n // layout.\n if (this._layout.id !== layout.id) return;\n }\n\n var tryFinish = function () {\n if (--counter > 0) return;\n\n var hasLayoutChanged = grid._layout.id !== layout.id;\n var callback = isFunction(instant) ? instant : onFinish;\n\n if (!hasLayoutChanged) {\n grid._isLayoutFinished = true;\n }\n\n if (isFunction(callback)) {\n callback(layout.items.slice(0), hasLayoutChanged);\n }\n\n if (!hasLayoutChanged && grid._hasListeners(EVENT_LAYOUT_END)) {\n grid._emit(EVENT_LAYOUT_END, layout.items.slice(0));\n }\n };\n\n if (!itemsToLayout.length) {\n tryFinish();\n return this;\n }\n\n this._isLayoutFinished = false;\n\n for (i = 0; i < itemsToLayout.length; i++) {\n if (this._layout.id !== layout.id) break;\n itemsToLayout[i]._layout.start(instant === true, tryFinish);\n }\n\n if (this._layout.id === layout.id) {\n itemsToLayout.length = 0;\n }\n\n return this;\n };\n})();\n\n/**\n * Show or hide Grid instance's items.\n *\n * @private\n * @param {Item[]} items\n * @param {Boolean} toVisible\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {Boolean} [options.syncWithLayout=true]\n * @param {Function} [options.onFinish]\n * @param {(Boolean|Function|String)} [options.layout=true]\n */\nGrid.prototype._setItemsVisibility = function (items, toVisible, options) {\n var grid = this;\n var targetItems = items.slice(0);\n var opts = options || {};\n var isInstant = opts.instant === true;\n var callback = opts.onFinish;\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var counter = targetItems.length;\n var startEvent = toVisible ? EVENT_SHOW_START : EVENT_HIDE_START;\n var endEvent = toVisible ? EVENT_SHOW_END : EVENT_HIDE_END;\n var method = toVisible ? 'show' : 'hide';\n var needsLayout = false;\n var completedItems = [];\n var hiddenItems = [];\n var item;\n var i;\n\n // If there are no items call the callback, but don't emit any events.\n if (!counter) {\n if (isFunction(callback)) callback(targetItems);\n return;\n }\n\n // Prepare the items.\n for (i = 0; i < targetItems.length; i++) {\n item = targetItems[i];\n\n // If inactive item is shown or active item is hidden we need to do\n // layout.\n if ((toVisible && !item._isActive) || (!toVisible && item._isActive)) {\n needsLayout = true;\n }\n\n // If inactive item is shown we also need to do a little hack to make the\n // item not animate it's next positioning (layout).\n item._layout._skipNextAnimation = !!(toVisible && !item._isActive);\n\n // If a hidden item is being shown we need to refresh the item's\n // dimensions.\n if (toVisible && item._visibility._isHidden) {\n hiddenItems.push(item);\n }\n\n // Add item to layout or remove it from layout.\n if (toVisible) {\n item._addToLayout();\n } else {\n item._removeFromLayout();\n }\n }\n\n // Force refresh the dimensions of all hidden items.\n if (hiddenItems.length) {\n this.refreshItems(hiddenItems, true);\n hiddenItems.length = 0;\n }\n\n // Show the items in sync with the next layout.\n function triggerVisibilityChange() {\n if (needsLayout && opts.syncWithLayout !== false) {\n grid.off(EVENT_LAYOUT_START, triggerVisibilityChange);\n }\n\n if (grid._hasListeners(startEvent)) {\n grid._emit(startEvent, targetItems.slice(0));\n }\n\n for (i = 0; i < targetItems.length; i++) {\n // Make sure the item is still in the original grid. There is a chance\n // that the item starts migrating before tiggerVisibilityChange is called.\n if (targetItems[i]._gridId !== grid._id) {\n if (--counter < 1) {\n if (isFunction(callback)) callback(completedItems.slice(0));\n if (grid._hasListeners(endEvent)) grid._emit(endEvent, completedItems.slice(0));\n }\n continue;\n }\n\n targetItems[i]._visibility[method](isInstant, function (interrupted, item) {\n // If the current item's animation was not interrupted add it to the\n // completedItems array.\n if (!interrupted) completedItems.push(item);\n\n // If all items have finished their animations call the callback\n // and emit showEnd/hideEnd event.\n if (--counter < 1) {\n if (isFunction(callback)) callback(completedItems.slice(0));\n if (grid._hasListeners(endEvent)) grid._emit(endEvent, completedItems.slice(0));\n }\n });\n }\n }\n\n // Trigger the visibility change, either async with layout or instantly.\n if (needsLayout && opts.syncWithLayout !== false) {\n this.on(EVENT_LAYOUT_START, triggerVisibilityChange);\n } else {\n triggerVisibilityChange();\n }\n\n // Trigger layout if needed.\n if (needsLayout && layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n};\n\n/**\n * Private helpers\n * ***************\n */\n\n/**\n * Merge default settings with user settings. The returned object is a new\n * object with merged values. The merging is a deep merge meaning that all\n * objects and arrays within the provided settings objects will be also merged\n * so that modifying the values of the settings object will have no effect on\n * the returned object.\n *\n * @param {Object} defaultSettings\n * @param {Object} [userSettings]\n * @returns {Object} Returns a new object.\n */\nfunction mergeSettings(defaultSettings, userSettings) {\n // Create a fresh copy of default settings.\n var settings = mergeObjects({}, defaultSettings);\n\n // Merge user settings to default settings.\n if (userSettings) {\n settings = mergeObjects(settings, userSettings);\n }\n\n // Handle visible/hidden styles manually so that the whole object is\n // overridden instead of the props.\n\n if (userSettings && userSettings.visibleStyles) {\n settings.visibleStyles = userSettings.visibleStyles;\n } else if (defaultSettings && defaultSettings.visibleStyles) {\n settings.visibleStyles = defaultSettings.visibleStyles;\n }\n\n if (userSettings && userSettings.hiddenStyles) {\n settings.hiddenStyles = userSettings.hiddenStyles;\n } else if (defaultSettings && defaultSettings.hiddenStyles) {\n settings.hiddenStyles = defaultSettings.hiddenStyles;\n }\n\n return settings;\n}\n\n/**\n * Merge two objects recursively (deep merge). The source object's properties\n * are merged to the target object.\n *\n * @param {Object} target\n * - The target object.\n * @param {Object} source\n * - The source object.\n * @returns {Object} Returns the target object.\n */\nfunction mergeObjects(target, source) {\n var sourceKeys = Object.keys(source);\n var length = sourceKeys.length;\n var isSourceObject;\n var propName;\n var i;\n\n for (i = 0; i < length; i++) {\n propName = sourceKeys[i];\n isSourceObject = isPlainObject(source[propName]);\n\n // If target and source values are both objects, merge the objects and\n // assign the merged value to the target property.\n if (isPlainObject(target[propName]) && isSourceObject) {\n target[propName] = mergeObjects(mergeObjects({}, target[propName]), source[propName]);\n continue;\n }\n\n // If source's value is object and target's is not let's clone the object as\n // the target's value.\n if (isSourceObject) {\n target[propName] = mergeObjects({}, source[propName]);\n continue;\n }\n\n // If source's value is an array let's clone the array as the target's\n // value.\n if (Array.isArray(source[propName])) {\n target[propName] = source[propName].slice(0);\n continue;\n }\n\n // In all other cases let's just directly assign the source's value as the\n // target's value.\n target[propName] = source[propName];\n }\n\n return target;\n}\n\n/**\n * Collect and return initial items for grid.\n *\n * @param {HTMLElement} gridElement\n * @param {?(HTMLElement[]|NodeList|HtmlCollection|String)} elements\n * @returns {(HTMLElement[]|NodeList|HtmlCollection)}\n */\nfunction getInitialGridElements(gridElement, elements) {\n // If we have a wildcard selector let's return all the children.\n if (elements === '*') {\n return gridElement.children;\n }\n\n // If we have some more specific selector, let's filter the elements.\n if (typeof elements === STRING_TYPE) {\n var result = [];\n var children = gridElement.children;\n for (var i = 0; i < children.length; i++) {\n if (elementMatches(children[i], elements)) {\n result.push(children[i]);\n }\n }\n return result;\n }\n\n // If we have an array of elements or a node list.\n if (Array.isArray(elements) || isNodeList(elements)) {\n return elements;\n }\n\n // Otherwise just return an empty array.\n return [];\n}\n\n/**\n * Bind grid's resize handler to window.\n *\n * @param {Grid} grid\n * @param {(Number|Boolean)} delay\n */\nfunction bindLayoutOnResize(grid, delay) {\n if (typeof delay !== NUMBER_TYPE) {\n delay = delay === true ? 0 : -1;\n }\n\n if (delay >= 0) {\n grid._resizeHandler = debounce(function () {\n grid.refreshItems().layout();\n }, delay);\n\n window.addEventListener('resize', grid._resizeHandler);\n }\n}\n\n/**\n * Unbind grid's resize handler from window.\n *\n * @param {Grid} grid\n */\nfunction unbindLayoutOnResize(grid) {\n if (grid._resizeHandler) {\n grid._resizeHandler(true);\n window.removeEventListener('resize', grid._resizeHandler);\n grid._resizeHandler = null;\n }\n}\n\n/**\n * Normalize style declaration object, returns a normalized (new) styles object\n * (prefixed properties and invalid properties removed).\n *\n * @param {Object} styles\n * @returns {Object}\n */\nfunction normalizeStyles(styles) {\n var normalized = {};\n var docElemStyle = document.documentElement.style;\n var prop, prefixedProp;\n\n // Normalize visible styles (prefix and remove invalid).\n for (prop in styles) {\n if (!styles[prop]) continue;\n prefixedProp = getPrefixedPropName(docElemStyle, prop);\n if (!prefixedProp) continue;\n normalized[prefixedProp] = styles[prop];\n }\n\n return normalized;\n}\n\n/**\n * Create index map from items.\n *\n * @param {Item[]} items\n * @returns {Object}\n */\nfunction createIndexMap(items) {\n var result = {};\n for (var i = 0; i < items.length; i++) {\n result[items[i]._id] = i;\n }\n return result;\n}\n\n/**\n * Sort comparer function for items' index map.\n *\n * @param {Object} indexMap\n * @param {Item} itemA\n * @param {Item} itemB\n * @returns {Number}\n */\nfunction compareIndexMap(indexMap, itemA, itemB) {\n var indexA = indexMap[itemA._id];\n var indexB = indexMap[itemB._id];\n return indexA - indexB;\n}\n\nexport default Grid;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!../../@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!../../@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[3]!./uPlot.min.css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"7668e03a\", content, true, {\"sourceMap\":false,\"shadowMode\":false});","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","import _typeof from \"./typeof.js\";\nexport default function _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n };\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}"],"names":["adapters","logger","self","console","WebSocket","log","messages","this","enabled","push","Date","now","getTime","secondsSince","time","ConnectionMonitor","constructor","connection","visibilityDidChange","bind","reconnectAttempts","start","isRunning","startedAt","stoppedAt","startPolling","addEventListener","staleThreshold","stop","stopPolling","removeEventListener","recordPing","pingedAt","recordConnect","disconnectedAt","recordDisconnect","poll","clearTimeout","pollTimeout","setTimeout","reconnectIfStale","getPollInterval","reconnectionBackoffRate","backoff","Math","pow","min","jitterMax","jitter","random","connectionIsStale","refreshedAt","disconnectedRecently","reopen","document","visibilityState","isOpen","INTERNAL","message_types","welcome","disconnect","ping","confirmation","rejection","disconnect_reasons","unauthorized","invalid_request","server_restart","default_mount_path","protocols","supportedProtocols","slice","length","indexOf","Connection","consumer","open","subscriptions","monitor","disconnected","send","data","webSocket","JSON","stringify","isActive","getState","uninstallEventHandlers","url","installEventHandlers","close","allowReconnect","error","reopenDelay","getProtocol","protocol","isState","isProtocolSupported","call","states","state","readyState","toLowerCase","eventName","events","handler","prototype","message","event","identifier","reason","reconnect","type","parse","reload","confirmSubscription","notify","reject","notifyAll","willAttemptReconnect","extend","object","properties","key","value","Subscription","params","mixin","perform","action","command","unsubscribe","remove","SubscriptionGuarantor","pendingSubscriptions","guarantee","subscription","startGuaranteeing","forget","filter","s","stopGuaranteeing","retrySubscribing","retryTimeout","subscribe","map","Subscriptions","guarantor","create","channelName","channel","add","ensureActiveConnection","findAll","sendCommand","callbackName","args","undefined","Consumer","_url","createWebSocketURL","connect","test","a","createElement","href","replace","createConsumer","getConfig","name","element","head","querySelector","getAttribute","pxRatio","query","FEAT_TIME","pre","UPLOT","ORI_HZ","ORI_VT","TITLE","WRAP","UNDER","OVER","AXIS","OFF","SELECT","CURSOR_X","CURSOR_Y","CURSOR_PT","LEGEND","LEGEND_LIVE","LEGEND_INLINE","LEGEND_THEAD","LEGEND_SERIES","LEGEND_MARKER","LEGEND_LABEL","LEGEND_VALUE","WIDTH","HEIGHT","TOP","BOTTOM","LEFT","RIGHT","hexBlack","transparent","mousemove","mousedown","mouseup","mouseenter","mouseleave","dblclick","resize","scroll","change","dppxchange","LEGEND_DISP","domEnv","window","doc","win","nav","navigator","setPxRatio","_pxRatio","devicePixelRatio","off","matchMedia","concat","on","dispatchEvent","CustomEvent","addClass","el","c","cl","classList","contains","remClass","setStylePx","style","placeTag","tag","cls","targ","refEl","insertBefore","placeDiv","xformCache","WeakMap","elTrans","xPos","yPos","xMax","yMax","xform","xformOld","get","transform","set","colorCache","elColor","background","borderColor","newColor","oldColor","sizeCache","elSize","newWid","newHgt","centered","newSize","oldSize","height","width","marginLeft","marginTop","evOpts","passive","evOpts2","_objectSpread","capture","ev","cb","capt","closestIdx","num","arr","lo","hi","mid","bitwise","floor","nonNullIdx","_i0","_i1","dir","i","getMinMax","sorted","_min","inf","_max","max","getMinMaxLog","rangeLog","base","fullMags","minSign","sign","maxSign","logFn","log10","log2","growMinAbs","ceil","growMaxAbs","minExp","abs","maxExp","minIncr","maxIncr","roundDec","incrRoundDn","incrRoundUp","rangeAsinh","minMax","rangePad","autoRangePart","mode","pad","_eqRangePart","soft","_eqRange","rangeNum","mult","extra","isObj","_rangeNum","ifNull","lh","rh","hasData","idx0","idx1","cfg","cmin","cmax","padMin","padMax","hardMin","hard","hardMax","softMin","softMax","softMinMode","softMaxMode","delta","deltaMag","scalarMax","scalarMag","scalarMagDelta","nonZeroDelta","mag","_padMin","_newMin","_softMin","minLim","_padMax","_newMax","_softMax","maxLim","numFormatter","Intl","NumberFormat","language","fmtNum","val","format","M","PI","round","sinh","v","linthresh","arguments","asinh","Infinity","numIntDigits","x","clamp","fnOrSelf","noop","retArg0","_0","retArg1","_1","retNull","_","retTrue","retEq","b","fixFloat","incrRound","incr","dec","isInt","p","n","Number","EPSILON","fixedDec","Map","guessDec","split","genIncrs","mults","incrs","multDec","exp","expa","_incr","EMPTY_OBJ","EMPTY_ARR","nullNullTuple","isArr","Array","isArray","isInteger","isUndef","isStr","is","Object","fastIsObj","_typeof","TypedArray","getPrototypeOf","Uint8Array","copy","o","out","_isObj","find","k","assign","src","NULL_REMOVE","NULL_RETAIN","NULL_EXPAND","nullExpand","yVals","nullIdxs","alignedLen","xi","lastNullIdx","nullIdx","join","tables","nullModes","xVals","Set","ti","t","xs","len","from","sort","xIdxs","si","ys","fill","nullMode","yVal","alignedIdx","microTask","queueMicrotask","fn","Promise","resolve","then","months","days","slice3","str","days3","months3","engNames","MMMM","MMM","WWWW","WWW","zeroPad2","int","zeroPad3","subs","YYYY","d","getFullYear","YY","names","getMonth","MM","DD","getDate","D","getDay","HH","getHours","H","h","AA","aa","mm","getMinutes","m","ss","getSeconds","fff","getMilliseconds","fmtDate","tpl","parts","R","exec","localTz","DateTimeFormat","resolvedOptions","timeZone","tzDate","date","tz","date2","getTimezoneOffset","toLocaleString","setMilliseconds","onlyWhole","allMults","decIncrs","oneIncrs","wholeIncrs","numIncrs","NL","yyyy","NLyyyy","md","NLmd","NLmdyy","hmm","hmmaa","NLhmmaa","genTimeStuffs","ms","mo","y","subSecIncrs","timeIncrs","_timeAxisStamps","timeAxisSplits","axisIdx","scaleMin","scaleMax","foundIncr","foundSpace","splits","isYr","isMo","minDate","minDateTs","minMin","mkDate","minMinTs","moIncr","yrIncr","splitDate","baseYear","baseMonth","next","offs","incr0","tzOffset","date0","prevHour","incrHours","minSpace","axes","_space","pctSpace","expectedHour","actualHour","dstShift","prevSplit","pctIncr","_genTimeStuffs","_genTimeStuffs2","_slicedToArray","timeIncrsMs","_timeAxisStampsMs","timeAxisSplitsMs","_genTimeStuffs3","_genTimeStuffs4","timeIncrsS","_timeAxisStampsS","timeAxisSplitsS","timeAxisStamps","stampCfg","timeAxisVals","stamps","prevYear","prevMnth","prevDate","prevMins","prevSecs","newYear","newMnth","newDate","newHour","newMins","newSecs","stamp","timeAxisVal","dateTpl","timeSeriesStamp","_timeSeriesStamp","timeSeriesVal","seriesIdx","dataIdx","legendStroke","series","stroke","points","legendFill","legendOpts","show","live","isolate","mount","markers","dash","idx","idxs","values","cursorPointShow","cursor","pt","size","mar","cursorPointFill","sp","_fill","_stroke","cursorPointStroke","cursorPointSize","cursorIdx","moveTuple","cursorMove","mouseLeft1","mouseTop1","filtBtn0","handle","e","button","passThru","cursorOpts","lock","move","click","drag","setScale","dist","uni","stopPropagation","stopImmediatePropagation","_x","_y","focus","prox","bias","left","top","axisLines","grid","ticks","border","font","labelFont","lineMult","xAxisOpts","scale","space","gap","labelGap","labelSize","side","rotate","numSeriesLabel","timeSeriesLabel","xSeriesOpts","auto","numAxisVals","numAxisSplits","forceMin","numDec","logAxisSplits","logBase","scales","asinhAxisSplits","sc","posSplits","zero","negSplits","reverse","RE_ALL","RE_12357","RE_125","RE_1","log10AxisValsFilt","axis","scaleKey","distr","valToPos","_10","re","numSeriesVal","yAxisOpts","ptDia","dia","seriesPointsShow","_self$series$","xData","_data","p0","p1","dim","maxPts","facet","gaps","nullGaps","xySeriesOpts","alpha","facets","ySeriesOpts","spanGaps","path","clip","clampScale","xScaleOpts","ori","yScaleOpts","syncs","_sync","opts","plots","sub","plot","unsub","pub","w","j","BAND_CLIP_FILL","BAND_CLIP_STROKE","orient","u","bbox","dx","dy","sx","sy","l","valToPosH","V","valToPosV","moveToH","lineToH","rectH","arcH","bezierCurveToH","moveToV","lineToV","rectV","arcV","bezierCurveToV","bandFillClipDirs","fillDir","clipDirs","bands","seriesFillTo","dataMin","dataMax","bandFillDir","clipBandLine","strokePath","clipDir","dataX","dataY","scaleX","scaleY","valToPosX","valToPosY","xOff","yOff","xDim","yDim","frIdx","toIdx","pxRound","lineTo","x0","y0","x1","yLimit","Path2D","clipGaps","plotLft","plotTop","plotWid","plotHgt","rect","prevGapEnd","g","addGap","fromX","toX","prevGap","findGaps","pixelForX","align","fr","to","frPx","toPx","fri2","frPx2","toi2","toPx2","pxRoundGen","pxAlign","moveTo","arcTo","y1","x2","y2","r","endRad","baseRad","closePath","startAngle","endAngle","arc","bp1x","bp1y","bp2x","bp2y","p2x","p2y","bezierCurveTo","filtIdxs","rad","_u$bbox","lft","wid","hgt","drawPoint","pi","forEach","flags","_drawAcc","accX","minY","maxY","inY","outY","drawAccH","drawAccV","linear","alignGaps","drawAcc","pixelForY","drawnAtX","_paths","band","lftIdx","rgtIdx","lftX","rgtX","hasGap","_bandFillClipDirs","_bandFillClipDirs2","bandClipDir","fillToVal","fillTo","fillToY","_gaps3","apply","_toConsumableArray","stepped","ascDesc","_u$bbox2","prevYPos","firstXPos","prevXPos","firstXPosExt","yVal1","prevXPosExt","_bandFillClipDirs3","_bandFillClipDirs4","_gaps5","halfStroke","startsOffset","endsOffset","bars","extraGap","ro","radius","radiusFn","gapFactor","maxWidth","minWidth","disp","_each","each","dispFills","dispStrokes","valRadius","baseRadius","_radiusFn","_radiusFn2","_radiusFn3","_radiusFn4","xShift","barWid","_dirX","_dirY","_bandFillClipDirs5","_bandFillClipDirs6","y0Pos","strokeWidth","multiPath","fillColors","fillPaths","strokeColors","strokePaths","color","unit","pct","posToVal","sizes","colWid","prevIdx","minDelta","gapWid","dataY0","radVal","radBase","xVal","btm","barHgt","rv","rb","splineInterp","interp","xCoords","yCoords","_bandFillClipDirs7","_bandFillClipDirs8","_gaps7","monotoneCubic","_monotoneCubic","ds","dys","dxs","isFinite","cursorPlots","invalidateRects","_step","_iterator","_createForOfIteratorHelper","done","syncRect","err","f","uPlot","linearPath","pointsPath","setDefaults","xo","yo","initY","d2","setDefault","setDefaults2","xyo","snapNumX","snapTimeX","snapNumY","snapLogY","snapLogX","snapAsinhY","snapAsinhX","findIncr","minVal","maxVal","intDigits","incrIdx","pxRatioFont","fontSize","fontSizeCss","syncFontSize","getValPct","_val","getHPos","getVPos","getPos","ready","status","root","id","class","title","textContent","can","ctx","getContext","wrap","didDrag","mouseLeft0","mouseTop0","under","appendChild","over","plugins","xScaleKey","drawOrderMap","drawAxesGrid","drawSeries","drawOrder","initScale","scaleOpts","isTime","rn","range","rangeIsArr","xScaleDistr","pendScales","legendEl","_tzDate","ts","_fmtDate","_timeAxisSplits","_timeAxisVals","_timeSeriesVal","activeIdxs","legend","showLegend","legendCols","legendRows","legendCells","multiValLegend","NULL_LEGEND_VALUES","getMultiVals","son","soff","initLegendRow","cells","row","childNodes","label","indic","text","onMouse","_lock","ctrlKey","metaKey","some","setSeries","syncOpts","cursorFocus","FOCUS_TRUE","mouseListeners","targListeners","listener","offMouse","delete","fullWidCss","fullHgtCss","plotWidCss","plotHgtCss","plotLftCss","plotTopCss","shouldSetScales","shouldSetSize","shouldConvergeSize","shouldSetCursor","shouldSetSelect","shouldSetLegend","_setSize","force","calcSize","resetYSeries","commit","calcPlotRect","calcAxesRects","bb","CYCLE_LIMIT","convergeSize","converged","cycleNum","axesConverged","axesCalc","paddingConverged","paddingCalc","setSize","_ref","hasTopAxis","hasBtmAxis","hasRgtAxis","hasLftAxis","_show","_size","isVt","fullSize","sidesWithAxes","_padding","off1","off2","off3","off0","incrOffset","_pos","_lpos","cursorPts","initCursorPt","initSeries","sv","paths","_focus","_ptDia","rowCells","splice","fire","addSeries","delSeries","tr","firstChild","initAxis","av","_rotate","_incrs","_found","_splits","_values","_el","autoPadSide","_sidesWithAxes","dataLen","ctxStroke","ctxFill","ctxWidth","ctxDash","ctxJoin","ctxCap","ctxFont","ctxAlign","ctxBaseline","ctxAlpha","padding","i0","i1","data0","viaAutoScaleX","setData","_resetScales","xsc","autoScaleX","_setScale","_rangeLog","_rangeLog2","_rangeAsinh","_rangeAsinh2","_rangeNum2","_rangeNum3","setCtxStyle","cap","_dash","_cap","_join","strokeStyle","fillStyle","lineWidth","lineJoin","lineCap","setLineDash","setFontStyle","baseline","textAlign","textBaseline","accScale","wsc","psc","setScales","wipScales","_s$facets","xFacet","yFacet","yScaleKey","_data$i","yData","changed","anyChanged","getOuterIdxs","ydata","_idxs","globalAlpha","cacheStrokeFill","drawPath","_gaps","_points","_s$_paths","gapsClip","boundsClip","offset","_pxAlign","translate","halfWid","strokeFill","fillStroke","lineDash","fillPath","didStrokeFill","bi","gapsClip2","lowerEdge","lowerData","bandClip","_fillStyle","CLIP_FILL_STROKE","save","doFill","doStroke","restore","getIncrSpace","fullDim","incrSpace","drawOrthoLines","filts","pos0","beginPath","pos1","_getIncrSpace","_getIncrSpace2","_p","_loop","shiftDir","shiftAmt","baseLpos","fillText","_axis$_found","plotDim","plotOff","axisGap","tickSize","angle","basePos","finalPos","lineHeight","canOffs","_parts","xCursor","yCursor","vCursor","hCursor","rawMouseLeft0","rawMouseTop0","rawMouseLeft1","rawMouseTop1","queuedCommit","_commit","_ref2","posOffset","clearRect","select","setSelect","updateCursor","setLegend","redraw","rebuildPaths","recalcAxes","dragging","dragX","dragY","closestDist","closestSeries","focusedSeries","selectDiv","_fire","prop","_hideProps","toggleDOM","onOff","_pub","setFocus","pubSync","setBand","addBand","delBand","setAlpha","opacity","allFocused","_setAlpha","i2","isFocused","pos","closestIdxFromXpos","batch","setSelH","setSelV","valToIdx","posToIdx","setCursor","setSelX","setSelY","syncLegend","vals","nodeValue","didx","sidx","setLegendValues","_s$values","_cursor$move","_cursor$move2","noDataInRange","mouseXPos","valAtPosX","idx2","yVal2","xPos2","mouseYPos","mouseYVal","seriesYValSign","mouseYValSign","hPos","vPos","ptWid","ptHgt","ptLft","ptTop","getBBox","_syncOpts$scales","xKey","yKey","_syncOpts$match","match","matchXKeys","matchYKeys","_src$cursor$sync$scal","sync","xKeySrc","yKeySrc","sdrag","sOff","sDim","_src$select","sori","sPosToVal","matchingX","matchingY","hideSelect","rawDX","rawDY","_rawDX","syncKey","_syncOpts$scales2","xSyncKey","ySyncKey","shouldPub","defer","getBoundingClientRect","mouseMove","_l","_t","_w","_h","_i","movementX","movementY","cacheMouse","initial","snap","clientX","clientY","_syncOpts$scales3","syncOptsSrc","_syncOptsSrc$values","xValSrc","yValSrc","_syncOptsSrc$scales","_syncOpts$match2","rotSrc","_xDim","_yDim","_xPos","_yPos","__l","_cursor$move3","_cursor$move4","mouseDown","mouseUp","hasSelect","mouseLeave","_dragging","dragH","dragV","snapH","snapV","snapProx","dblClick","syncPxRatio","hooks","evName","a1","a2","filters","destroy","_legendEl","clear","_init","HTMLElement","spline","___CSS_LOADER_EXPORT___","module","exports","utils","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","transitionalDefaults","AxiosError","CanceledError","parseProtocol","config","onCanceled","requestData","requestHeaders","headers","responseType","cancelToken","signal","isFormData","isStandardBrowserEnv","request","XMLHttpRequest","auth","username","password","unescape","encodeURIComponent","Authorization","btoa","fullPath","baseURL","onloadend","responseHeaders","getAllResponseHeaders","responseData","response","responseText","statusText","method","toUpperCase","paramsSerializer","timeout","onreadystatechange","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","ETIMEDOUT","xsrfValue","withCredentials","xsrfCookieName","read","xsrfHeaderName","setRequestHeader","isUndefined","onDownloadProgress","onUploadProgress","upload","cancel","abort","aborted","ERR_BAD_REQUEST","Axios","mergeConfig","defaults","createInstance","defaultConfig","context","instance","instanceConfig","axios","CancelToken","isCancel","VERSION","toFormData","Cancel","all","promises","spread","isAxiosError","executor","TypeError","resolvePromise","promise","token","_listeners","onfulfilled","_resolve","throwIfRequested","index","source","ERR_CANCELED","inherits","__CANCEL__","InterceptorManager","dispatchRequest","validator","validators","interceptors","configOrUrl","assertOptions","silentJSONParsing","boolean","forcedJSONParsing","requestInterceptorChain","synchronousRequestInterceptors","interceptor","runWhen","synchronous","unshift","fulfilled","rejected","responseInterceptorChain","chain","shift","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","code","Error","toJSON","description","number","fileName","lineNumber","columnNumber","stack","descriptors","defineProperties","defineProperty","customProps","axiosError","toFlatObject","obj","handlers","use","options","eject","isAbsoluteURL","combineURLs","requestedURL","transformData","throwIfCancellationRequested","transformRequest","merge","common","adapter","transformResponse","config1","config2","getMergedValue","target","isPlainObject","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","keys","configValue","validateStatus","ERR_BAD_RESPONSE","fns","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","process","toString","stringifySafely","rawValue","parser","encoder","isString","trim","isArrayBuffer","isBuffer","isStream","isFile","isBlob","isArrayBufferView","buffer","isURLSearchParams","isFileList","isObjectPayload","isObject","contentType","_FormData","env","FormData","strictJSONParsing","maxContentLength","maxBodyLength","thisArg","encode","serializedParams","isDate","toISOString","hashmarkIndex","relativeURL","write","expires","domain","secure","cookie","isNumber","toGMTString","RegExp","decodeURIComponent","payload","originURL","msie","userAgent","urlParsingNode","resolveURL","setAttribute","host","search","hash","hostname","port","pathname","charAt","location","requestURL","parsed","normalizedName","ignoreDuplicateOf","line","substr","callback","formData","convertValue","isTypedArray","Blob","Buffer","build","parentKey","fullKey","endsWith","toArray","append","pop","thing","deprecatedWarnings","schema","allowUnknown","ERR_BAD_OPTION_VALUE","opt","result","ERR_BAD_OPTION","version","formatMessage","desc","ERR_DEPRECATED","warn","kindOf","cache","kindOfTest","ArrayBuffer","isView","isFunction","pipe","pattern","product","hasOwnProperty","assignValue","stripBOM","content","charCodeAt","superConstructor","props","sourceObj","destObj","merged","getOwnPropertyNames","searchString","position","String","lastIndex","haystack","needle","comparator","low","high","cmp","RangeError","DataView","NAME","Constructor","Prototype","NATIVE_ARRAY_BUFFER","DESCRIPTORS","global","isCallable","hasOwn","classof","tryToString","createNonEnumerableProperty","defineBuiltIn","defineBuiltInAccessor","isPrototypeOf","setPrototypeOf","wellKnownSymbol","uid","InternalStateModule","enforceInternalState","enforce","getInternalState","Int8Array","Int8ArrayPrototype","Uint8ClampedArray","Uint8ClampedArrayPrototype","TypedArrayPrototype","ObjectPrototype","TO_STRING_TAG","TYPED_ARRAY_TAG","TYPED_ARRAY_CONSTRUCTOR","NATIVE_ARRAY_BUFFER_VIEWS","opera","TYPED_ARRAY_TAG_REQUIRED","TypedArrayConstructorsList","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigIntArrayConstructorsList","BigInt64Array","BigUint64Array","it","klass","getTypedArrayConstructor","proto","aTypedArray","aTypedArrayConstructor","C","exportTypedArrayMethod","KEY","property","forced","ARRAY","TypedArrayConstructor","error2","exportTypedArrayStaticMethod","Function","configurable","uncurryThis","FunctionName","defineBuiltIns","fails","anInstance","toIntegerOrInfinity","toLength","toIndex","IEEE754","arrayFill","arraySlice","setToStringTag","PROPER_FUNCTION_NAME","PROPER","CONFIGURABLE_FUNCTION_NAME","CONFIGURABLE","ARRAY_BUFFER","DATA_VIEW","PROTOTYPE","WRONG_LENGTH","WRONG_INDEX","getInternalArrayBufferState","getterFor","getInternalDataViewState","setInternalState","NativeArrayBuffer","$ArrayBuffer","ArrayBufferPrototype","$DataView","DataViewPrototype","packIEEE754","pack","unpackIEEE754","unpack","packInt8","packInt16","packInt32","unpackInt32","packFloat32","packFloat64","addGetter","view","count","isLittleEndian","intIndex","store","byteLength","bytes","byteOffset","conversion","INCORRECT_ARRAY_BUFFER_NAME","NaN","testView","$setInt8","setInt8","getInt8","setUint8","unsafe","detached","bufferState","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","toObject","toAbsoluteIndex","lengthOfArrayLike","deletePropertyOrThrow","copyWithin","O","end","inc","list","IndexedObject","createMethod","TYPE","IS_FIND_LAST_INDEX","$this","callbackfn","that","boundFunction","findLast","findLastIndex","toIndexedObject","arrayMethodIsStrict","$lastIndexOf","lastIndexOf","NEGATIVE_ZERO","STRICT_METHOD","FORCED","searchElement","A","$RangeError","relativeIndex","actualIndex","isNullOrUndefined","iterate","defineIterator","createIterResultObject","setSpecies","fastKey","internalStateGetterFor","getConstructor","wrapper","CONSTRUCTOR_NAME","IS_MAP","ADDER","iterable","first","last","AS_ENTRIES","define","previous","entry","getEntry","removed","prev","has","setStrong","ITERATOR_NAME","getInternalCollectionState","getInternalIteratorState","iterated","kind","getWeakData","anObject","ArrayIterationModule","findIndex","uncaughtFrozenStore","frozen","UncaughtFrozenStore","entries","findUncaughtFrozen","$","isForced","InternalMetadataModule","checkCorrectnessOfIteration","inheritIfRequired","IS_WEAK","NativeConstructor","NativePrototype","exported","fixMethod","uncurriedNativeMethod","REPLACE","enable","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","dummy","doesNotExceedSafeInteger","flattenIntoArray","original","sourceLen","depth","mapper","elementLen","targetIndex","sourceIndex","mapFn","$Array","LN2","mantissaLength","exponent","mantissa","exponentLength","eMax","eBias","rt","nBits","$expm1","expm1","LOG10E","whitespaces","$parseFloat","parseFloat","Symbol","ITERATOR","iterator","string","trimmedString","$repeat","requireObjectCoercible","repeat","stringSlice","IS_END","maxLength","fillString","fillLen","stringFiller","S","intMaxLength","stringLength","fillStr","toPrimitive","$TypeError","argument","prim","BigInt","toPositiveInteger","BYTES","TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS","ArrayBufferViewCore","ArrayBufferModule","createPropertyDescriptor","isIntegralNumber","toOffset","toPropertyKey","isSymbol","typedArrayFrom","definePropertyModule","getOwnPropertyDescriptorModule","nativeDefineProperty","nativeGetOwnPropertyDescriptor","BYTES_PER_ELEMENT","fromList","isTypedArrayIndex","wrappedGetOwnPropertyDescriptor","wrappedDefineProperty","descriptor","writable","enumerable","stat","getOwnPropertyDescriptor","CLAMPED","GETTER","SETTER","NativeTypedArrayConstructor","TypedArrayConstructorPrototype","getter","setter","addElement","typedArrayOffset","$length","$len","sham","arrayFromConstructorAndList","typedArraySpeciesConstructor","aConstructor","getIterator","getIteratorMethod","isArrayIteratorMethod","isBigIntArray","toBigInt","thisIsBigIntArray","step","argumentsLength","mapfn","mapping","iteratorMethod","speciesConstructor","originalArray","aCallable","arraySpeciesCreate","flatMap","setArrayLength","createProperty","arrayMethodHasSpeciesSupport","HAS_SPECIES_SUPPORT","deleteCount","insertCount","actualDeleteCount","actualStart","addToUnscopables","collection","collectionStrong","init","$asinh","sqrt","E","nonConfigurable","nonWritable","$entries","regExpFlags","RegExpPrototype","INDICES_SUPPORT","calls","expected","chr","pairs","dotAll","ignoreCase","multiline","sticky","hasIndices","$padStart","WEBKIT_BUG","padStart","isRegExp","getMethod","getRegExpFlags","getSubstitution","IS_PURE","stringIndexOf","searchValue","fromIndex","replaceAll","replaceValue","IS_REG_EXP","replacer","functionalReplace","searchLength","advanceBy","replacement","endOfLastMatch","fixRegExpWellKnownSymbolLogic","sameValue","regExpExec","SEARCH","nativeSearch","maybeCallNative","regexp","searcher","rx","res","previousLastIndex","defineWellKnownSymbol","getBuiltIn","$ArrayCopyWithin","u$ArrayCopyWithin","$every","$fill","CONVERSION_BUG","valueOf","actualValue","$filter","fromSpeciesAndList","$findIndex","predicate","$findLastIndex","$findLast","$find","$forEach","$includes","$indexOf","ArrayIterators","arrayValues","arrayKeys","arrayEntries","GENERIC","ITERATOR_IS_VALUES","typedArrayValues","$join","separator","$map","$reduceRight","$reduce","middle","$set","WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS","array","TO_OBJECT_BUG","arrayLike","$some","internalSort","FF","IE_OR_EDGE","V8","WEBKIT","nativeSort","ACCEPT_INCORRECT_ARGUMENTS","STABLE_SORT","mod","getSortCompare","comparefn","$toLocaleString","TO_LOCALE_STRING_BUG","arrayToReversed","compareFn","Uint8ArrayPrototype","arrayToString","IS_NOT_ARRAY_METHOD","createTypedArrayConstructor","arrayWith","PROPER_ORDER","InternalWeakMap","FREEZING","collectionWeak","NATIVE_WEAK_MAP","$Object","isExtensible","isFrozen","isSealed","freeze","seal","FROZEN","SEALED","IS_IE11","ActiveXObject","$WeakMap","WeakMapPrototype","nativeSet","hasMSEdgeFreezingBug","frozenArray","nativeDelete","nativeHas","nativeGet","arrayIntegrityLevel","microtask","validateArgumentsLength","IS_NODE","dontCallGetSet","formatDistanceLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","formatDistance","tokenValue","addSuffix","comparison","buildFormatLongFn","defaultWidth","formats","dateFormats","full","long","medium","short","timeFormats","dateTimeFormats","formatLong","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","formatRelative","_date","_baseDate","_options","buildLocalizeFn","dirtyIndex","valuesArray","formattingValues","defaultFormattingWidth","_defaultWidth","_width","argumentCallback","eraValues","narrow","abbreviated","wide","quarterValues","monthValues","dayValues","dayPeriodValues","am","pm","midnight","noon","morning","afternoon","evening","night","formattingDayPeriodValues","ordinalNumber","dirtyNumber","rem100","localize","era","quarter","month","day","dayPeriod","buildMatchFn","matchPattern","matchPatterns","defaultMatchWidth","matchResult","matchedString","parsePatterns","defaultParseWidth","findKey","valueCallback","rest","buildMatchPatternFn","parseResult","parsePattern","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","any","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","parseInt","locale","weekStartsOn","firstWeekContainsDate","defaultOptions","getDefaultOptions","dateLongFormatter","timeLongFormatter","dateTimeLongFormatter","dateTimeFormat","datePattern","timePattern","longFormatters","P","getTimezoneOffsetInMilliseconds","utcDate","UTC","setUTCFullYear","startOfUTCISOWeekYear","dirtyDate","requiredArgs","year","getUTCISOWeekYear","fourthOfJanuary","setUTCHours","startOfUTCISOWeek","MILLISECONDS_IN_WEEK","getUTCISOWeek","toDate","diff","getUTCFullYear","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfUTCWeekYear","_ref3","_options$firstWeekCon","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","toInteger","getUTCWeekYear","firstWeek","startOfUTCWeek","getUTCWeek","firstWeekOfNextYear","firstWeekOfThisYear","protectedDayOfYearTokens","protectedWeekYearTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","throwProtectedError","input","required","getUTCDay","setUTCDate","getUTCDate","_options$weekStartsOn","isNaN","MILLISECONDS_IN_DAY","getUTCDayOfYear","timestamp","setUTCMonth","startOfYearTimestamp","difference","addLeadingZeros","targetLength","output","formatters","signedYear","getUTCMonth","dayPeriodEnumValue","getUTCHours","getUTCMinutes","getUTCSeconds","numberOfDigits","milliseconds","getUTCMilliseconds","fractionalSeconds","dayPeriodEnum","G","lightFormatters","Y","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","Q","q","L","week","I","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","B","K","X","_localize","originalDate","_originalDate","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","z","T","dirtyDelimiter","absOffset","minutes","delimiter","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","dirtyFormatStr","_ref4","_options$locale2","_options$locale2$opti","_ref5","_ref6","_ref7","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatStr","defaultLocale","isValid","subMilliseconds","formatterOptions","substring","firstCharacter","longFormatter","cleanEscapedString","formatter","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","matched","TIMEZONE_UNIT_PRIORITY","Setter","_utcDate","ValueSetter","_Setter","_super","validateValue","setValue","priority","subPriority","_this","DateToSystemTimezoneSetter","_Setter2","_super2","_this2","_len","_key","timestampIsSet","convertedDate","setFullYear","setHours","Parser","dateString","validate","_value","EraParser","_Parser","millisecondsInMinute","millisecondsInHour","millisecondsInSecond","numericPatterns","hour23h","hour24h","hour11h","hour12h","minute","second","singleDigit","twoDigits","threeDigits","fourDigits","anyDigitsSigned","singleDigitSigned","twoDigitsSigned","threeDigitsSigned","fourDigitsSigned","timezonePatterns","basicOptionalMinutes","basic","basicOptionalSeconds","extended","extendedOptionalSeconds","mapValue","parseFnResult","parseNumericPattern","parseTimezonePattern","seconds","parseAnyDigitsSigned","parseNDigits","parseNDigitsSigned","dayPeriodEnumToHours","normalizeTwoDigitYear","currentYear","isCommonEra","absCurrentYear","rangeEnd","rangeEndCentury","isPreviousCentury","isLeapYearIndex","YearParser","isTwoDigitYear","normalizedTwoDigitYear","LocalWeekYearParser","ISOWeekYearParser","_flags","firstWeekOfYear","ExtendedYearParser","QuarterParser","StandAloneQuarterParser","MonthParser","StandAloneMonthParser","setUTCWeek","dirtyWeek","LocalWeekParser","setUTCISOWeek","dirtyISOWeek","ISOWeekParser","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","DateParser","isLeapYear","DayOfYearParser","setUTCDay","dirtyDay","currentDay","remainder","dayIndex","DayParser","LocalDayParser","wholeWeekDays","StandAloneLocalDayParser","setUTCISODay","ISODayParser","AMPMParser","AMPMMidnightParser","DayPeriodParser","Hour1to12Parser","isPM","Hour0to23Parser","Hour0To11Parser","Hour1To24Parser","MinuteParser","setUTCMinutes","SecondParser","setUTCSeconds","FractionOfSecondParser","setUTCMilliseconds","ISOTimezoneWithZParser","ISOTimezoneParser","TimestampSecondsParser","TimestampMillisecondsParser","parsers","notWhitespaceRegExp","dirtyDateString","dirtyFormatString","dirtyReferenceDate","formatString","subFnOptions","setters","tokens","usedTokens","incompatibleTokens","incompatibleToken","usedToken","includes","fullToken","run","_ret","uniquePrioritySetters","setterArray","_step2","_iterator2","addMilliseconds","dirtyAmount","amount","argStr","GRID_INSTANCES","ITEM_ELEMENT_MAP","ACTION_SWAP","ACTION_MOVE","EVENT_SYNCHRONIZE","EVENT_LAYOUT_START","EVENT_LAYOUT_END","EVENT_LAYOUT_ABORT","EVENT_ADD","EVENT_REMOVE","EVENT_SHOW_START","EVENT_SHOW_END","EVENT_HIDE_START","EVENT_HIDE_END","EVENT_FILTER","EVENT_SORT","EVENT_MOVE","EVENT_SEND","EVENT_BEFORE_SEND","EVENT_RECEIVE","EVENT_BEFORE_RECEIVE","EVENT_DRAG_INIT","EVENT_DRAG_START","EVENT_DRAG_MOVE","EVENT_DRAG_SCROLL","EVENT_DRAG_END","EVENT_DRAG_RELEASE_START","EVENT_DRAG_RELEASE_END","EVENT_DESTROY","HAS_TOUCH_EVENTS","HAS_POINTER_EVENTS","PointerEvent","HAS_MS_POINTER_EVENTS","msPointerEnabled","MAX_SAFE_FLOAT32_INTEGER","Emitter","_events","_queue","_counter","_clearOnEmit","listeners","emit","queue","startIndex","argsLength","endIndex","burst","countListeners","pointerout","waitDuration","EdgeHack","dragger","_dragger","_timeout","_outEvent","_isActive","_addBehaviour","_removeBehaviour","_onTimeout","_resetData","_onStart","_onOut","pointerType","_getTrackedTouch","_onCancel","vendorPrefixes","cache$2","getPrefixedPropName","prefixedProp","camelProp","hasPassiveEvents","isPassiveEventsSupported","passiveOpts","ua","isEdge","isIE","isFirefox","isAndroid","listenerOptions","taProp","taPropPrefixed","documentElement","taDefaultValue","Dragger","cssProps","_element","_emitter","_isDestroyed","_cssProps","_touchAction","_pointerId","_startTime","_startX","_startY","_currentX","_currentY","_onMove","_onEnd","_edgeHack","setCssProps","setTouchAction","_preventDefault","_inputEvents","_pointerEvents","_msPointerEvents","_touchEvents","_mouseEvents","_emitterEvents","_activeInstances","preventDefault","cancelable","_activateInstance","_bindListeners","_deactivateInstance","_unbindListeners","_getEventPointerId","pointerId","changedTouches","_getTouchById","_reset","_createEvent","touch","srcEvent","distance","getDistance","deltaX","getDeltaX","deltaY","getDeltaY","deltaTime","getDeltaTime","isFirst","isFinal","touches","screenX","screenY","pageX","pageY","_emit","newProps","currentProps","dt","raf","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","Ticker","numLanes","_nextStep","_lanes","_stepQueue","_stepCallbacks","TickerLane","indices","callbacks","laneQueue","laneCallbacks","laneIndices","lanes","stepQueue","stepCallbacks","laneIndex","LAYOUT_READ","LAYOUT_WRITE","VISIBILITY_READ","VISIBILITY_WRITE","DRAG_START_READ","DRAG_START_WRITE","DRAG_MOVE_READ","DRAG_MOVE_WRITE","DRAG_SCROLL_READ","DRAG_SCROLL_WRITE","DRAG_SORT_READ","PLACEHOLDER_LAYOUT_READ","PLACEHOLDER_LAYOUT_WRITE","PLACEHOLDER_RESIZE_WRITE","AUTO_SCROLL_READ","AUTO_SCROLL_WRITE","DEBOUNCE_READ","LANE_READ","LANE_READ_TAIL","LANE_WRITE","ticker","addLayoutTick","itemId","cancelLayoutTick","addVisibilityTick","cancelVisibilityTick","addDragStartTick","cancelDragStartTick","addDragMoveTick","cancelDragMoveTick","addDragScrollTick","cancelDragScrollTick","addDragSortTick","cancelDragSortTick","addPlaceholderLayoutTick","cancelPlaceholderLayoutTick","addPlaceholderResizeTick","cancelPlaceholderResizeTick","addAutoScrollTick","cancelAutoScrollTick","addDebounceTick","debounceId","cancelDebounceTick","AXIS_X","AXIS_Y","FORWARD","BACKWARD","UP","DOWN","functionType","cache$1","getStyle","styles","getComputedStyle","getPropertyValue","getStyleAsFloat","DOC_ELEM","BODY","body","THRESHOLD_DATA","getScrollElement","getScrollLeft","pageXOffset","scrollLeft","getScrollTop","pageYOffset","scrollTop","getScrollLeftMax","scrollWidth","clientWidth","getScrollTopMax","scrollHeight","clientHeight","getContentRect","right","bottom","bcr","borderLeft","clientLeft","borderTop","clientTop","getItemAutoScrollSettings","item","_drag","_getGrid","_settings","dragAutoScroll","prepareItemScrollSync","_prepareScroll","applyItemScrollSync","_scrollDiffX","_scrollDiffY","_setTranslate","_left","_top","computeThreshold","threshold","safeZone","itemSize","targetSize","ScrollRequest","reset","ScrollAction","requestX","requestY","Pool","createItem","releaseItem","pool","isOverlapping","getIntersectionArea","getIntersectionScore","area","maxArea","onStop","isEnding","direction","maxValue","speed","duration","hasReachedEnd","computeCurrentScrollValue","computeNextScrollValue","nextValue","computeSpeed","tick","onStart","addRequest","removeRequest","computeScrollValues","scrollTo","pick","release","RECT_1","RECT_2","AutoScroller","_isTicking","_tickTime","_tickDeltaTime","_items","_actions","_requests","_requestOverlapCheck","_dragPositions","_dragDirections","_overlapCheckInterval","_requestPool","_actionPool","_readTick","_writeTick","smoothSpeed","maxSpeed","acceleration","deceleration","targetSpeed","factor","currentSpeed","nextSpeed","pointerHandle","pointerSize","pX","pY","_updateRequests","_updateActions","_applyActions","_startTicking","_stopTicking","_getItemHandleRect","itemDrag","_dragMoveEvent","_dragStartEvent","_clientX","_clientY","_height","_requestItemScroll","reqMap","_id","_cancelItemScroll","_checkItemOverlap","checkX","checkY","settings","targets","dragDirections","dragDirectionX","dragDirectionY","itemRect","testRect","testElement","testAxisX","testAxisY","testScore","testPriority","testThreshold","testDirection","testDistance","testMaxScrollX","testMaxScrollY","xElement","xPriority","xThreshold","xScore","xDirection","xDistance","xMaxScroll","yElement","yPriority","yThreshold","yScore","yDirection","yDistance","yMaxScroll","_updateScrollRequest","scrollRequest","targetCount","testIsAxisX","testScroll","testMaxScroll","smoothStop","reqX","reqY","checkTime","needsCheck","items","requestsX","requestsY","_requestAction","actions","isAxisX","requests","_updateDragDirection","dragPositions","addItem","updateItem","removeItem","isItemScrollingX","isItemScrollingY","isItemScrolling","ElProto","Element","matchesFn","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","elementMatches","selector","className","tempArray","numberType","arrayInsert","normalizeArrayIndex","sizeOffset","maxIndex","arrayMove","arraySwap","withIndex","temp","indexA","indexB","transformProp","styleNameRegEx","prefixRegex","msPrefixRegex","getStyleName","styleName","transformStyle","transformNone$1","displayInline","displayNone","displayStyle","isTransformed","display","getContainingBlock","parentElement","offsetA","offsetB","offsetDiff","getOffset","offsetData","getOffsetDiff","elemA","elemB","compareContainingBlocks","isScrollableOverflow","isScrollable","getScrollableAncestors","getRootNode","DocumentFragment","parentNode","translateValue","transformNone","rxMat3d","rxMatTx","rxMat3dTx","rxNextItem","getTranslate","isMat3d","tX","tY","removeClass","IS_IOS","platform","maxTouchPoints","START_PREDICATE_INACTIVE","START_PREDICATE_PENDING","START_PREDICATE_RESOLVED","SCROLL_LISTENER_OPTIONS","ItemDrag","getGrid","_item","_gridId","_isMigrating","_startPredicate","dragStartPredicate","defaultStartPredicate","_startPredicateState","_startPredicateResult","_isSortNeeded","_sortTimer","_blockedSortIndex","_sortX1","_sortX2","_sortY1","_sortY2","_preStartCheck","_preEndCheck","_onScroll","_prepareStart","_applyStart","_prepareMove","_applyMove","_applyScroll","_handleSort","_handleSortDelayed","_handle","dragHandle","dragCssProps","openAnchorHref","tagName","getCurrentStyles","autoScroller","isTrusted","defaultPrevented","_startPredicateData","delay","delayTimer","_resolveStartPredicate","_forceResolveStartPredicate","_resetStartPredicate","_finishStartPredicate","defaultSortPredicate","targetRect","returnData","gridsArray","minThreshold","maxThreshold","getTargetGrid","rootGrid","gridScore","grids","container","containerRect","dragSort","bestScore","_updateBoundingRect","innerWidth","_right","innerHeight","_bottom","sortThreshold","sortAction","migrateAction","score","isMigration","gridOffsetLeft","gridOffsetTop","matchScore","matchIndex","hasValidTargets","_gridX","_marginLeft","_gridY","_marginTop","_updateBorders","_borderLeft","_borderTop","_finishMigration","_cancelSort","_isStarted","_unbindScrollListeners","draggingClass","itemDraggingClass","_container","_containingBlock","_dragPrevMoveEvent","_scrollEvent","_scrollers","_moveDiffX","_moveDiffY","_containerDiffX","_containerDiffY","_bindScrollListeners","gridScrollers","gridContainer","dragContainer","scrollers","isClick","_resetHeuristics","_checkHeuristics","dragSortHeuristics","minDist","minDragDistance","diffX","diffY","canCheckBounceBack","minBounceBackAngle","atan2","prevAngle","deltaAngle","sin","cos","sortDuringScroll","shouldSort","sortInterval","_checkOverlap","_finishSort","isSortEnabled","needsFinalCheck","currentGrid","currentIndex","targetGrid","targetItem","dragSortPredicate","_hasListeners","fromGrid","toGrid","_sortData","appendTo","layoutSender","layoutReceiver","layout","_dragRelease","targetGridElement","targetSettings","targetContainer","currentSettings","currentContainer","currentVisClass","itemVisibleClass","itemHiddenClass","nextVisClass","itemClass","_refreshDimensions","dragEnabled","_visibility","setStyles","visibleStyles","hiddenStyles","isResolved","containingBlock","elementRect","hasDragContainer","migrate","_migrate","isPositioning","_layout","isReleasing","dragPlaceholder","_dragPlaceholder","dragAxis","nextEvent","prevEvent","moveDiffX","moveDiffY","scrollDiffX","scrollDiffY","unprefixRegEx","getUnprefixedPropName","nativeCode","isNative","feat","HAS_WEB_ANIMATIONS","animate","HAS_NATIVE_WEB_ANIMATIONS","Animator","_animation","_duration","_easing","_callback","_props","_onFinish","createFrame","prefix","frame","getTranslateString","ItemDragPlaceholder","_className","_didMigrate","_resetAfterLayout","_transX","_transY","_nextTransX","_nextTransY","_setupAnimation","_startAnimation","_updateDimensions","_onLayoutStart","_onLayoutEnd","_onReleaseEnd","_onMigrate","_onHide","ItemDragRelease","_isPositioningStarted","propsFrom","propsTo","onFinish","propName","propCount","propIndex","animation","currentValues","easing","cancelAnimation","onfinish","isAnimating","isInstant","nextLeft","nextTop","currentLeft","currentTop","nextX","nextY","animEnabled","layoutDuration","getElement","currentX","currentY","currentStyles","targetStyles","layoutEasing","nextGrid","itemPlaceholderClass","onCreate","removeChild","onRemove","updateDimensions","itemReleasingClass","dragRelease","useDragContainer","_placeToGrid","_nextLayoutData","didReparent","isJustReleased","needsReflow","releasingClass","MIN_ANIMATION_DISTANCE","ItemLayout","elementStyle","_isInterrupted","_currentStyles","_targetStyles","_nextLeft","_nextTop","_offsetLeft","_offsetTop","_skipNextAnimation","_animOptions","_finish","ItemMigrate","ItemVisibility","childElement","children","_isHidden","_isHiding","_isShowing","_childElement","_currentStyleProps","_finishShow","_finishHide","instant","gridSettings","animDuration","animEasing","_updateOffsets","processCallbackQueue","itemPositioningClass","_tX","_tY","xDiff","yDiff","containerDiff","translateX","translateY","isVisible","targetElement","targetItems","getItem","gridElement","hide","currentStyleProps","_removeCurrentStyles","toVisible","showDuration","hideDuration","showEasing","hideEasing","createUid","Item","_marginRight","_marginBottom","createPackerProcessor","isWorker","FILL_GAPS","HORIZONTAL","ALIGN_RIGHT","ALIGN_BOTTOM","ROUNDING","EPS","MIN_SLOT_SIZE","roundNumber","PackerProcessor","currentRects","nextRects","rectTarget","rectStore","slotSizes","rectId","slotIndex","slotData","sortRectsLeftTop","sortRectsTopLeft","computeLayout","bump","slotWidth","slotHeight","slot","slots","fillGaps","horizontal","alignRight","alignBottom","rounding","isPreProcessed","computeNextSlot","shards","ignoreCurrentRects","getRect","addRect","splitRect","purgeRects","hole","isRectAWithinRectB","rectA","rectB","rectIds","aId","bId","PACKET_INDEX_WIDTH","PACKET_INDEX_HEIGHT","PACKET_INDEX_OPTIONS","PACKET_HEADER_SLOTS","processor","onmessage","msg","subarray","postMessage","getWidth","getHeight","getMargin","getPosition","isShowing","isHiding","isDragging","isDestroyed","_refreshSortData","getters","sortData","_addToLayout","_removeFromLayout","_canSkipLayout","_destroy","removeElement","blobUrl","activeWorkers","createWorkerProcessors","workers","URL","createObjectURL","worker","Worker","destroyWorkerProcessors","onmessageerror","terminate","revokeObjectURL","isWorkerProcessorsSupported","PACKET_INDEX_ID","Packer","numWorkers","_processor","_layoutQueue","_layouts","_layoutCallbacks","_layoutWorkers","_layoutWorkerData","_workers","_onWorkerMessage","setOptions","_sendToWorker","layoutId","_finalizeLayout","_grid","isHorizontal","isBorderBox","_boxSizing","_borderRight","_borderBottom","createLayout","cancelLayout","queueIndex","debounce","durationMs","timer","lastTime","isCanceled","htmlCollectionType","nodeListType","isNodeList","objectType","objectToStringType","NUMBER_TYPE","STRING_TYPE","INSTANT_LAYOUT","Grid","isElementInDom","composed","mergeSettings","normalizeStyles","_isLayoutFinished","_onLayoutDataReceived","containerClass","bindLayoutOnResize","layoutOnResize","getInitialGridElements","layoutOnInit","defaultSettings","userSettings","mergeObjects","isSourceObject","sourceKeys","elements","_resizeHandler","refreshItems","unbindLayoutOnResize","normalized","docElemStyle","createIndexMap","compareIndexMap","indexMap","itemA","itemB","defaultPacker","touchAction","userSelect","userDrag","tapHighlightColor","touchCallout","contentZooming","getItems","hiddenItemStyles","visibility","refreshSortData","synchronize","fragment","createDocumentFragment","unfinishedLayout","nextLayoutId","layoutItems","gridWidth","gridHeight","layoutSettings","newItems","needsLayout","active","allItems","removeElements","_setItemsVisibility","itemsToShow","itemsToHide","isPredicateString","isPredicateFn","syncWithLayout","tryFinishCounter","tryFinish","sortComparer","isDescending","origItems","defaultComparer","criteriaName","criteriaOrder","valA","valB","customComparer","comparer","descending","isSwap","fromItem","toItem","layoutStyles","itemsToLayout","numItems","counter","hasLayoutChanged","startEvent","endEvent","completedItems","hiddenItems","triggerVisibilityChange","interrupted","__esModule","default","locals","asyncGeneratorStep","gen","_next","_throw","arg","info","_asyncToGenerator","allowArrayLike","unsupportedIterableToArray","F","_e","normalCompletion","didErr","_e2","_regeneratorRuntime","Op","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","invoke","record","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","displayName","isGeneratorFunction","genFun","ctor","mark","__proto__","awrap","async","iter","skipTempReset","rootRecord","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","_arrayWithoutHoles","arrayLikeToArray","_iterableToArray","_nonIterableSpread","arrayWithoutHoles","iterableToArray","nonIterableSpread"],"sourceRoot":""}