) {}\n\n peek(): LexToken {\n if (!this.#peek) {\n const next = this.tokens.next();\n this.#peek = next.value;\n }\n return this.#peek;\n }\n\n tryConsume(type: TokenType): string | undefined {\n const token = this.peek();\n if (token.type !== type) return;\n this.#peek = undefined; // Reset after consumed.\n return token.value;\n }\n\n consume(type: TokenType): string {\n const value = this.tryConsume(type);\n if (value !== undefined) return value;\n const { type: nextType, index } = this.peek();\n throw new TypeError(\n `Unexpected ${nextType} at ${index}, expected ${type}: ${DEBUG_URL}`,\n );\n }\n\n text(): string {\n let result = \"\";\n let value: string | undefined;\n while ((value = this.tryConsume(\"CHAR\") || this.tryConsume(\"ESCAPED\"))) {\n result += value;\n }\n return result;\n }\n}\n\n/**\n * Plain text.\n */\nexport interface Text {\n type: \"text\";\n value: string;\n}\n\n/**\n * A parameter designed to match arbitrary text within a segment.\n */\nexport interface Parameter {\n type: \"param\";\n name: string;\n}\n\n/**\n * A wildcard parameter designed to match multiple segments.\n */\nexport interface Wildcard {\n type: \"wildcard\";\n name: string;\n}\n\n/**\n * A set of possible tokens to expand when matching.\n */\nexport interface Group {\n type: \"group\";\n tokens: Token[];\n}\n\n/**\n * A sequence of path match characters.\n */\nexport type Token = Text | Parameter | Wildcard | Group;\n\n/**\n * Tokenized path instance.\n */\nexport class TokenData {\n constructor(public readonly tokens: Token[]) {}\n}\n\n/**\n * Parse a string for the raw tokens.\n */\nexport function parse(str: string, options: ParseOptions = {}): TokenData {\n const { encodePath = NOOP_VALUE } = options;\n const it = new Iter(lexer(str));\n\n function consume(endType: TokenType): Token[] {\n const tokens: Token[] = [];\n\n while (true) {\n const path = it.text();\n if (path) tokens.push({ type: \"text\", value: encodePath(path) });\n\n const param = it.tryConsume(\"PARAM\");\n if (param) {\n tokens.push({\n type: \"param\",\n name: param,\n });\n continue;\n }\n\n const wildcard = it.tryConsume(\"WILDCARD\");\n if (wildcard) {\n tokens.push({\n type: \"wildcard\",\n name: wildcard,\n });\n continue;\n }\n\n const open = it.tryConsume(\"{\");\n if (open) {\n tokens.push({\n type: \"group\",\n tokens: consume(\"}\"),\n });\n continue;\n }\n\n it.consume(endType);\n return tokens;\n }\n }\n\n const tokens = consume(\"END\");\n return new TokenData(tokens);\n}\n\n/**\n * Transform tokens into a path building function.\n */\nfunction $compile(\n data: TokenData,\n options: CompileOptions,\n): PathFunction
{\n const { encode = encodeURIComponent, delimiter = DEFAULT_DELIMITER } =\n options;\n const fn = tokensToFunction(data.tokens, delimiter, encode);\n\n return function path(data: P = {} as P) {\n const [path, ...missing] = fn(data);\n if (missing.length) {\n throw new TypeError(`Missing parameters: ${missing.join(\", \")}`);\n }\n return path;\n };\n}\n\n/**\n * Compile a string to a template function for the path.\n */\nexport function compile
(\n path: Path,\n options: CompileOptions & ParseOptions = {},\n) {\n return $compile
(\n path instanceof TokenData ? path : parse(path, options),\n options,\n );\n}\n\nexport type ParamData = Partial>;\nexport type PathFunction = (data?: P) => string;\n\nfunction tokensToFunction(\n tokens: Token[],\n delimiter: string,\n encode: Encode | false,\n) {\n const encoders = tokens.map((token) =>\n tokenToFunction(token, delimiter, encode),\n );\n\n return (data: ParamData) => {\n const result: string[] = [\"\"];\n\n for (const encoder of encoders) {\n const [value, ...extras] = encoder(data);\n result[0] += value;\n result.push(...extras);\n }\n\n return result;\n };\n}\n\n/**\n * Convert a single token into a path building function.\n */\nfunction tokenToFunction(\n token: Token,\n delimiter: string,\n encode: Encode | false,\n): (data: ParamData) => string[] {\n if (token.type === \"text\") return () => [token.value];\n\n if (token.type === \"group\") {\n const fn = tokensToFunction(token.tokens, delimiter, encode);\n\n return (data) => {\n const [value, ...missing] = fn(data);\n if (!missing.length) return [value];\n return [\"\"];\n };\n }\n\n const encodeValue = encode || NOOP_VALUE;\n\n if (token.type === \"wildcard\" && encode !== false) {\n return (data) => {\n const value = data[token.name];\n if (value == null) return [\"\", token.name];\n\n if (!Array.isArray(value) || value.length === 0) {\n throw new TypeError(`Expected \"${token.name}\" to be a non-empty array`);\n }\n\n return [\n value\n .map((value, index) => {\n if (typeof value !== \"string\") {\n throw new TypeError(\n `Expected \"${token.name}/${index}\" to be a string`,\n );\n }\n\n return encodeValue(value);\n })\n .join(delimiter),\n ];\n };\n }\n\n return (data) => {\n const value = data[token.name];\n if (value == null) return [\"\", token.name];\n\n if (typeof value !== \"string\") {\n throw new TypeError(`Expected \"${token.name}\" to be a string`);\n }\n\n return [encodeValue(value)];\n };\n}\n\n/**\n * A match result contains data about the path match.\n */\nexport interface MatchResult
{\n path: string;\n params: P;\n}\n\n/**\n * A match is either `false` (no match) or a match result.\n */\nexport type Match
= false | MatchResult
;\n\n/**\n * The match function takes a string and returns whether it matched the path.\n */\nexport type MatchFunction
= (path: string) => Match
;\n\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nfunction $match
(\n data: TokenData[],\n options: MatchOptions = {},\n): MatchFunction
{\n const {\n decode = decodeURIComponent,\n delimiter = DEFAULT_DELIMITER,\n end = true,\n trailing = true,\n } = options;\n const flags = toFlags(options);\n const sources: string[] = [];\n const keys: Array = [];\n\n for (const { tokens } of data) {\n for (const seq of flatten(tokens, 0, [])) {\n const regexp = sequenceToRegExp(seq, delimiter, keys);\n sources.push(regexp);\n }\n }\n\n let pattern = `^(?:${sources.join(\"|\")})`;\n if (trailing) pattern += `(?:${escape(delimiter)}$)?`;\n pattern += end ? \"$\" : `(?=${escape(delimiter)}|$)`;\n\n const re = new RegExp(pattern, flags);\n\n const decoders = keys.map((key) => {\n if (decode === false) return NOOP_VALUE;\n if (key.type === \"param\") return decode;\n return (value: string) => value.split(delimiter).map(decode);\n });\n\n return Object.assign(\n function match(input: string) {\n const m = re.exec(input);\n if (!m) return false;\n\n const { 0: path } = m;\n const params = Object.create(null);\n\n for (let i = 1; i < m.length; i++) {\n if (m[i] === undefined) continue;\n\n const key = keys[i - 1];\n const decoder = decoders[i - 1];\n params[key.name] = decoder(m[i]);\n }\n\n return { path, params };\n },\n { re },\n );\n}\n\nexport type Path = string | TokenData;\n\nexport function match(\n path: Path | Path[],\n options: MatchOptions & ParseOptions = {},\n): MatchFunction
{\n const paths = Array.isArray(path) ? path : [path];\n const items = paths.map((path) =>\n path instanceof TokenData ? path : parse(path, options),\n );\n\n return $match(items, options);\n}\n\n/**\n * Flattened token set.\n */\ntype Flattened = Text | Parameter | Wildcard;\n\n/**\n * Generate a flat list of sequence tokens from the given tokens.\n */\nfunction* flatten(\n tokens: Token[],\n index: number,\n init: Flattened[],\n): Generator {\n if (index === tokens.length) {\n return yield init;\n }\n\n const token = tokens[index];\n\n if (token.type === \"group\") {\n const fork = init.slice();\n for (const seq of flatten(token.tokens, 0, fork)) {\n yield* flatten(tokens, index + 1, seq);\n }\n } else {\n init.push(token);\n }\n\n yield* flatten(tokens, index + 1, init);\n}\n\n/**\n * Transform a flat sequence of tokens into a regular expression.\n */\nfunction sequenceToRegExp(\n tokens: Flattened[],\n delimiter: string,\n keys: Array,\n): string {\n let result = \"\";\n let backtrack = \"\";\n let isSafeSegmentParam = true;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.type === \"text\") {\n result += escape(token.value);\n backtrack = token.value;\n isSafeSegmentParam ||= token.value.includes(delimiter);\n continue;\n }\n\n if (token.type === \"param\" || token.type === \"wildcard\") {\n if (!isSafeSegmentParam && !backtrack) {\n throw new TypeError(`Missing text after \"${token.name}\": ${DEBUG_URL}`);\n }\n\n if (token.type === \"param\") {\n result += `(${negate(delimiter, isSafeSegmentParam ? \"\" : backtrack)}+)`;\n } else {\n result += `(.+)`;\n }\n\n keys.push(token);\n backtrack = \"\";\n isSafeSegmentParam = false;\n continue;\n }\n }\n\n return result;\n}\n\nfunction negate(delimiter: string, backtrack: string) {\n const values = [delimiter, backtrack].filter(Boolean);\n const isSimple = values.every((value) => value.length === 1);\n if (isSimple) return `[^${escape(values.join(\"\"))}]`;\n return `(?:(?!${values.map(escape).join(\"|\")}).)`;\n}\n","var initialState = {\n animating: false,\n autoplaying: null,\n currentDirection: 0,\n currentLeft: null,\n currentSlide: 0,\n direction: 1,\n dragging: false,\n edgeDragged: false,\n initialized: false,\n lazyLoadedList: [],\n listHeight: null,\n listWidth: null,\n scrolling: false,\n slideCount: null,\n slideHeight: null,\n slideWidth: null,\n swipeLeft: null,\n swiped: false,\n // used by swipeEvent. differentites between touch and swipe.\n swiping: false,\n touchObject: {\n startX: 0,\n startY: 0,\n curX: 0,\n curY: 0\n },\n trackStyle: {},\n trackWidth: 0,\n targetSlide: 0\n};\nexport default initialState;","import React from \"react\";\nvar defaultProps = {\n accessibility: true,\n adaptiveHeight: false,\n afterChange: null,\n appendDots: function appendDots(dots) {\n return /*#__PURE__*/React.createElement(\"ul\", {\n style: {\n display: \"block\"\n }\n }, dots);\n },\n arrows: true,\n autoplay: false,\n autoplaySpeed: 3000,\n beforeChange: null,\n centerMode: false,\n centerPadding: \"50px\",\n className: \"\",\n cssEase: \"ease\",\n customPaging: function customPaging(i) {\n return /*#__PURE__*/React.createElement(\"button\", null, i + 1);\n },\n dots: false,\n dotsClass: \"slick-dots\",\n draggable: true,\n easing: \"linear\",\n edgeFriction: 0.35,\n fade: false,\n focusOnSelect: false,\n infinite: true,\n initialSlide: 0,\n lazyLoad: null,\n nextArrow: null,\n onEdge: null,\n onInit: null,\n onLazyLoadError: null,\n onReInit: null,\n pauseOnDotsHover: false,\n pauseOnFocus: false,\n pauseOnHover: true,\n prevArrow: null,\n responsive: null,\n rows: 1,\n rtl: false,\n slide: \"div\",\n slidesPerRow: 1,\n slidesToScroll: 1,\n slidesToShow: 1,\n speed: 500,\n swipe: true,\n swipeEvent: null,\n swipeToSlide: false,\n touchMove: true,\n touchThreshold: 5,\n useCSS: true,\n useTransform: true,\n variableWidth: false,\n vertical: false,\n waitForAnimate: true,\n asNavFor: null\n};\nexport default defaultProps;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport React from \"react\";\nimport defaultProps from \"../default-props\";\nexport function clamp(number, lowerBound, upperBound) {\n return Math.max(lowerBound, Math.min(number, upperBound));\n}\nexport var safePreventDefault = function safePreventDefault(event) {\n var passiveEvents = [\"onTouchStart\", \"onTouchMove\", \"onWheel\"];\n if (!passiveEvents.includes(event._reactName)) {\n event.preventDefault();\n }\n};\nexport var getOnDemandLazySlides = function getOnDemandLazySlides(spec) {\n var onDemandSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {\n onDemandSlides.push(slideIndex);\n }\n }\n return onDemandSlides;\n};\n\n// return list of slides that need to be present\nexport var getRequiredLazySlides = function getRequiredLazySlides(spec) {\n var requiredSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n requiredSlides.push(slideIndex);\n }\n return requiredSlides;\n};\n\n// startIndex that needs to be present\nexport var lazyStartIndex = function lazyStartIndex(spec) {\n return spec.currentSlide - lazySlidesOnLeft(spec);\n};\nexport var lazyEndIndex = function lazyEndIndex(spec) {\n return spec.currentSlide + lazySlidesOnRight(spec);\n};\nexport var lazySlidesOnLeft = function lazySlidesOnLeft(spec) {\n return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;\n};\nexport var lazySlidesOnRight = function lazySlidesOnRight(spec) {\n return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;\n};\n\n// get width of an element\nexport var getWidth = function getWidth(elem) {\n return elem && elem.offsetWidth || 0;\n};\nexport var getHeight = function getHeight(elem) {\n return elem && elem.offsetHeight || 0;\n};\nexport var getSwipeDirection = function getSwipeDirection(touchObject) {\n var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var xDist, yDist, r, swipeAngle;\n xDist = touchObject.startX - touchObject.curX;\n yDist = touchObject.startY - touchObject.curY;\n r = Math.atan2(yDist, xDist);\n swipeAngle = Math.round(r * 180 / Math.PI);\n if (swipeAngle < 0) {\n swipeAngle = 360 - Math.abs(swipeAngle);\n }\n if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {\n return \"left\";\n }\n if (swipeAngle >= 135 && swipeAngle <= 225) {\n return \"right\";\n }\n if (verticalSwiping === true) {\n if (swipeAngle >= 35 && swipeAngle <= 135) {\n return \"up\";\n } else {\n return \"down\";\n }\n }\n return \"vertical\";\n};\n\n// whether or not we can go next\nexport var canGoNext = function canGoNext(spec) {\n var canGo = true;\n if (!spec.infinite) {\n if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {\n canGo = false;\n } else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {\n canGo = false;\n }\n }\n return canGo;\n};\n\n// given an object and a list of keys, return new object with given keys\nexport var extractObject = function extractObject(spec, keys) {\n var newObject = {};\n keys.forEach(function (key) {\n return newObject[key] = spec[key];\n });\n return newObject;\n};\n\n// get initialized state\nexport var initializedState = function initializedState(spec) {\n // spec also contains listRef, trackRef\n var slideCount = React.Children.count(spec.children);\n var listNode = spec.listRef;\n var listWidth = Math.ceil(getWidth(listNode));\n var trackNode = spec.trackRef && spec.trackRef.node;\n var trackWidth = Math.ceil(getWidth(trackNode));\n var slideWidth;\n if (!spec.vertical) {\n var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;\n if (typeof spec.centerPadding === \"string\" && spec.centerPadding.slice(-1) === \"%\") {\n centerPaddingAdj *= listWidth / 100;\n }\n slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);\n } else {\n slideWidth = listWidth;\n }\n var slideHeight = listNode && getHeight(listNode.querySelector('[data-index=\"0\"]'));\n var listHeight = slideHeight * spec.slidesToShow;\n var currentSlide = spec.currentSlide === undefined ? spec.initialSlide : spec.currentSlide;\n if (spec.rtl && spec.currentSlide === undefined) {\n currentSlide = slideCount - 1 - spec.initialSlide;\n }\n var lazyLoadedList = spec.lazyLoadedList || [];\n var slidesToLoad = getOnDemandLazySlides(_objectSpread(_objectSpread({}, spec), {}, {\n currentSlide: currentSlide,\n lazyLoadedList: lazyLoadedList\n }));\n lazyLoadedList = lazyLoadedList.concat(slidesToLoad);\n var state = {\n slideCount: slideCount,\n slideWidth: slideWidth,\n listWidth: listWidth,\n trackWidth: trackWidth,\n currentSlide: currentSlide,\n slideHeight: slideHeight,\n listHeight: listHeight,\n lazyLoadedList: lazyLoadedList\n };\n if (spec.autoplaying === null && spec.autoplay) {\n state[\"autoplaying\"] = \"playing\";\n }\n return state;\n};\nexport var slideHandler = function slideHandler(spec) {\n var waitForAnimate = spec.waitForAnimate,\n animating = spec.animating,\n fade = spec.fade,\n infinite = spec.infinite,\n index = spec.index,\n slideCount = spec.slideCount,\n lazyLoad = spec.lazyLoad,\n currentSlide = spec.currentSlide,\n centerMode = spec.centerMode,\n slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n useCSS = spec.useCSS;\n var lazyLoadedList = spec.lazyLoadedList;\n if (waitForAnimate && animating) return {};\n var animationSlide = index,\n finalSlide,\n animationLeft,\n finalLeft;\n var state = {},\n nextState = {};\n var targetSlide = infinite ? index : clamp(index, 0, slideCount - 1);\n if (fade) {\n if (!infinite && (index < 0 || index >= slideCount)) return {};\n if (index < 0) {\n animationSlide = index + slideCount;\n } else if (index >= slideCount) {\n animationSlide = index - slideCount;\n }\n if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {\n lazyLoadedList = lazyLoadedList.concat(animationSlide);\n }\n state = {\n animating: true,\n currentSlide: animationSlide,\n lazyLoadedList: lazyLoadedList,\n targetSlide: animationSlide\n };\n nextState = {\n animating: false,\n targetSlide: animationSlide\n };\n } else {\n finalSlide = animationSlide;\n if (animationSlide < 0) {\n finalSlide = animationSlide + slideCount;\n if (!infinite) finalSlide = 0;else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;\n } else if (!canGoNext(spec) && animationSlide > currentSlide) {\n animationSlide = finalSlide = currentSlide;\n } else if (centerMode && animationSlide >= slideCount) {\n animationSlide = infinite ? slideCount : slideCount - 1;\n finalSlide = infinite ? 0 : slideCount - 1;\n } else if (animationSlide >= slideCount) {\n finalSlide = animationSlide - slideCount;\n if (!infinite) finalSlide = slideCount - slidesToShow;else if (slideCount % slidesToScroll !== 0) finalSlide = 0;\n }\n if (!infinite && animationSlide + slidesToShow >= slideCount) {\n finalSlide = slideCount - slidesToShow;\n }\n animationLeft = getTrackLeft(_objectSpread(_objectSpread({}, spec), {}, {\n slideIndex: animationSlide\n }));\n finalLeft = getTrackLeft(_objectSpread(_objectSpread({}, spec), {}, {\n slideIndex: finalSlide\n }));\n if (!infinite) {\n if (animationLeft === finalLeft) animationSlide = finalSlide;\n animationLeft = finalLeft;\n }\n if (lazyLoad) {\n lazyLoadedList = lazyLoadedList.concat(getOnDemandLazySlides(_objectSpread(_objectSpread({}, spec), {}, {\n currentSlide: animationSlide\n })));\n }\n if (!useCSS) {\n state = {\n currentSlide: finalSlide,\n trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: finalLeft\n })),\n lazyLoadedList: lazyLoadedList,\n targetSlide: targetSlide\n };\n } else {\n state = {\n animating: true,\n currentSlide: finalSlide,\n trackStyle: getTrackAnimateCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: animationLeft\n })),\n lazyLoadedList: lazyLoadedList,\n targetSlide: targetSlide\n };\n nextState = {\n animating: false,\n currentSlide: finalSlide,\n trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: finalLeft\n })),\n swipeLeft: null,\n targetSlide: targetSlide\n };\n }\n }\n return {\n state: state,\n nextState: nextState\n };\n};\nexport var changeSlide = function changeSlide(spec, options) {\n var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;\n var slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n slideCount = spec.slideCount,\n currentSlide = spec.currentSlide,\n previousTargetSlide = spec.targetSlide,\n lazyLoad = spec.lazyLoad,\n infinite = spec.infinite;\n unevenOffset = slideCount % slidesToScroll !== 0;\n indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;\n if (options.message === \"previous\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;\n targetSlide = currentSlide - slideOffset;\n if (lazyLoad && !infinite) {\n previousInt = currentSlide - slideOffset;\n targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;\n }\n if (!infinite) {\n targetSlide = previousTargetSlide - slidesToScroll;\n }\n } else if (options.message === \"next\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;\n targetSlide = currentSlide + slideOffset;\n if (lazyLoad && !infinite) {\n targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;\n }\n if (!infinite) {\n targetSlide = previousTargetSlide + slidesToScroll;\n }\n } else if (options.message === \"dots\") {\n // Click on dots\n targetSlide = options.index * options.slidesToScroll;\n } else if (options.message === \"children\") {\n // Click on the slides\n targetSlide = options.index;\n if (infinite) {\n var direction = siblingDirection(_objectSpread(_objectSpread({}, spec), {}, {\n targetSlide: targetSlide\n }));\n if (targetSlide > options.currentSlide && direction === \"left\") {\n targetSlide = targetSlide - slideCount;\n } else if (targetSlide < options.currentSlide && direction === \"right\") {\n targetSlide = targetSlide + slideCount;\n }\n }\n } else if (options.message === \"index\") {\n targetSlide = Number(options.index);\n }\n return targetSlide;\n};\nexport var keyHandler = function keyHandler(e, accessibility, rtl) {\n if (e.target.tagName.match(\"TEXTAREA|INPUT|SELECT\") || !accessibility) return \"\";\n if (e.keyCode === 37) return rtl ? \"next\" : \"previous\";\n if (e.keyCode === 39) return rtl ? \"previous\" : \"next\";\n return \"\";\n};\nexport var swipeStart = function swipeStart(e, swipe, draggable) {\n e.target.tagName === \"IMG\" && safePreventDefault(e);\n if (!swipe || !draggable && e.type.indexOf(\"mouse\") !== -1) return \"\";\n return {\n dragging: true,\n touchObject: {\n startX: e.touches ? e.touches[0].pageX : e.clientX,\n startY: e.touches ? e.touches[0].pageY : e.clientY,\n curX: e.touches ? e.touches[0].pageX : e.clientX,\n curY: e.touches ? e.touches[0].pageY : e.clientY\n }\n };\n};\nexport var swipeMove = function swipeMove(e, spec) {\n // spec also contains, trackRef and slideIndex\n var scrolling = spec.scrolling,\n animating = spec.animating,\n vertical = spec.vertical,\n swipeToSlide = spec.swipeToSlide,\n verticalSwiping = spec.verticalSwiping,\n rtl = spec.rtl,\n currentSlide = spec.currentSlide,\n edgeFriction = spec.edgeFriction,\n edgeDragged = spec.edgeDragged,\n onEdge = spec.onEdge,\n swiped = spec.swiped,\n swiping = spec.swiping,\n slideCount = spec.slideCount,\n slidesToScroll = spec.slidesToScroll,\n infinite = spec.infinite,\n touchObject = spec.touchObject,\n swipeEvent = spec.swipeEvent,\n listHeight = spec.listHeight,\n listWidth = spec.listWidth;\n if (scrolling) return;\n if (animating) return safePreventDefault(e);\n if (vertical && swipeToSlide && verticalSwiping) safePreventDefault(e);\n var swipeLeft,\n state = {};\n var curLeft = getTrackLeft(spec);\n touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;\n touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;\n touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));\n var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));\n if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {\n return {\n scrolling: true\n };\n }\n if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;\n var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);\n if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;\n var dotCount = Math.ceil(slideCount / slidesToScroll);\n var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);\n var touchSwipeLength = touchObject.swipeLength;\n if (!infinite) {\n if (currentSlide === 0 && (swipeDirection === \"right\" || swipeDirection === \"down\") || currentSlide + 1 >= dotCount && (swipeDirection === \"left\" || swipeDirection === \"up\") || !canGoNext(spec) && (swipeDirection === \"left\" || swipeDirection === \"up\")) {\n touchSwipeLength = touchObject.swipeLength * edgeFriction;\n if (edgeDragged === false && onEdge) {\n onEdge(swipeDirection);\n state[\"edgeDragged\"] = true;\n }\n }\n }\n if (!swiped && swipeEvent) {\n swipeEvent(swipeDirection);\n state[\"swiped\"] = true;\n }\n if (!vertical) {\n if (!rtl) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n } else {\n swipeLeft = curLeft - touchSwipeLength * positionOffset;\n }\n } else {\n swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;\n }\n if (verticalSwiping) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n }\n state = _objectSpread(_objectSpread({}, state), {}, {\n touchObject: touchObject,\n swipeLeft: swipeLeft,\n trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: swipeLeft\n }))\n });\n if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {\n return state;\n }\n if (touchObject.swipeLength > 10) {\n state[\"swiping\"] = true;\n safePreventDefault(e);\n }\n return state;\n};\nexport var swipeEnd = function swipeEnd(e, spec) {\n var dragging = spec.dragging,\n swipe = spec.swipe,\n touchObject = spec.touchObject,\n listWidth = spec.listWidth,\n touchThreshold = spec.touchThreshold,\n verticalSwiping = spec.verticalSwiping,\n listHeight = spec.listHeight,\n swipeToSlide = spec.swipeToSlide,\n scrolling = spec.scrolling,\n onSwipe = spec.onSwipe,\n targetSlide = spec.targetSlide,\n currentSlide = spec.currentSlide,\n infinite = spec.infinite;\n if (!dragging) {\n if (swipe) safePreventDefault(e);\n return {};\n }\n var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;\n var swipeDirection = getSwipeDirection(touchObject, verticalSwiping);\n // reset the state of touch related state variables.\n var state = {\n dragging: false,\n edgeDragged: false,\n scrolling: false,\n swiping: false,\n swiped: false,\n swipeLeft: null,\n touchObject: {}\n };\n if (scrolling) {\n return state;\n }\n if (!touchObject.swipeLength) {\n return state;\n }\n if (touchObject.swipeLength > minSwipe) {\n safePreventDefault(e);\n if (onSwipe) {\n onSwipe(swipeDirection);\n }\n var slideCount, newSlide;\n var activeSlide = infinite ? currentSlide : targetSlide;\n switch (swipeDirection) {\n case \"left\":\n case \"up\":\n newSlide = activeSlide + getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 0;\n break;\n case \"right\":\n case \"down\":\n newSlide = activeSlide - getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 1;\n break;\n default:\n slideCount = activeSlide;\n }\n state[\"triggerSlideHandler\"] = slideCount;\n } else {\n // Adjust the track back to it's original position.\n var currentLeft = getTrackLeft(spec);\n state[\"trackStyle\"] = getTrackAnimateCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: currentLeft\n }));\n }\n return state;\n};\nexport var getNavigableIndexes = function getNavigableIndexes(spec) {\n var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;\n var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;\n var counter = spec.infinite ? spec.slidesToShow * -1 : 0;\n var indexes = [];\n while (breakpoint < max) {\n indexes.push(breakpoint);\n breakpoint = counter + spec.slidesToScroll;\n counter += Math.min(spec.slidesToScroll, spec.slidesToShow);\n }\n return indexes;\n};\nexport var checkNavigable = function checkNavigable(spec, index) {\n var navigables = getNavigableIndexes(spec);\n var prevNavigable = 0;\n if (index > navigables[navigables.length - 1]) {\n index = navigables[navigables.length - 1];\n } else {\n for (var n in navigables) {\n if (index < navigables[n]) {\n index = prevNavigable;\n break;\n }\n prevNavigable = navigables[n];\n }\n }\n return index;\n};\nexport var getSlideCount = function getSlideCount(spec) {\n var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;\n if (spec.swipeToSlide) {\n var swipedSlide;\n var slickList = spec.listRef;\n var slides = slickList.querySelectorAll && slickList.querySelectorAll(\".slick-slide\") || [];\n Array.from(slides).every(function (slide) {\n if (!spec.vertical) {\n if (slide.offsetLeft - centerOffset + getWidth(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n } else {\n if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n }\n return true;\n });\n if (!swipedSlide) {\n return 0;\n }\n var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;\n var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;\n return slidesTraversed;\n } else {\n return spec.slidesToScroll;\n }\n};\nexport var checkSpecKeys = function checkSpecKeys(spec, keysArray) {\n return (\n // eslint-disable-next-line no-prototype-builtins\n keysArray.reduce(function (value, key) {\n return value && spec.hasOwnProperty(key);\n }, true) ? null : console.error(\"Keys Missing:\", spec)\n );\n};\nexport var getTrackCSS = function getTrackCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\"]);\n var trackWidth, trackHeight;\n if (!spec.vertical) {\n trackWidth = getTotalSlides(spec) * spec.slideWidth;\n } else {\n var trackChildren = spec.unslick ? spec.slideCount : spec.slideCount + 2 * spec.slidesToShow;\n trackHeight = trackChildren * spec.slideHeight;\n }\n var style = {\n opacity: 1,\n transition: \"\",\n WebkitTransition: \"\"\n };\n if (spec.useTransform) {\n var WebkitTransform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var transform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var msTransform = !spec.vertical ? \"translateX(\" + spec.left + \"px)\" : \"translateY(\" + spec.left + \"px)\";\n style = _objectSpread(_objectSpread({}, style), {}, {\n WebkitTransform: WebkitTransform,\n transform: transform,\n msTransform: msTransform\n });\n } else {\n if (spec.vertical) {\n style[\"top\"] = spec.left;\n } else {\n style[\"left\"] = spec.left;\n }\n }\n if (spec.fade) style = {\n opacity: 1\n };\n if (trackWidth) style.width = trackWidth;\n if (trackHeight) style.height = trackHeight;\n\n // Fallback for IE8\n if (window && !window.addEventListener && window.attachEvent) {\n if (!spec.vertical) {\n style.marginLeft = spec.left + \"px\";\n } else {\n style.marginTop = spec.left + \"px\";\n }\n }\n return style;\n};\nexport var getTrackAnimateCSS = function getTrackAnimateCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\", \"speed\", \"cssEase\"]);\n var style = getTrackCSS(spec);\n // useCSS is true by default so it can be undefined\n if (spec.useTransform) {\n style.WebkitTransition = \"-webkit-transform \" + spec.speed + \"ms \" + spec.cssEase;\n style.transition = \"transform \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n if (spec.vertical) {\n style.transition = \"top \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n style.transition = \"left \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n return style;\n};\nexport var getTrackLeft = function getTrackLeft(spec) {\n if (spec.unslick) {\n return 0;\n }\n checkSpecKeys(spec, [\"slideIndex\", \"trackRef\", \"infinite\", \"centerMode\", \"slideCount\", \"slidesToShow\", \"slidesToScroll\", \"slideWidth\", \"listWidth\", \"variableWidth\", \"slideHeight\"]);\n var slideIndex = spec.slideIndex,\n trackRef = spec.trackRef,\n infinite = spec.infinite,\n centerMode = spec.centerMode,\n slideCount = spec.slideCount,\n slidesToShow = spec.slidesToShow,\n slidesToScroll = spec.slidesToScroll,\n slideWidth = spec.slideWidth,\n listWidth = spec.listWidth,\n variableWidth = spec.variableWidth,\n slideHeight = spec.slideHeight,\n fade = spec.fade,\n vertical = spec.vertical;\n var slideOffset = 0;\n var targetLeft;\n var targetSlide;\n var verticalOffset = 0;\n if (fade || spec.slideCount === 1) {\n return 0;\n }\n var slidesToOffset = 0;\n if (infinite) {\n slidesToOffset = -getPreClones(spec); // bring active slide to the beginning of visual area\n // if next scroll doesn't have enough children, just reach till the end of original slides instead of shifting slidesToScroll children\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);\n }\n // shift current slide to center of the frame\n if (centerMode) {\n slidesToOffset += parseInt(slidesToShow / 2);\n }\n } else {\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = slidesToShow - slideCount % slidesToScroll;\n }\n if (centerMode) {\n slidesToOffset = parseInt(slidesToShow / 2);\n }\n }\n slideOffset = slidesToOffset * slideWidth;\n verticalOffset = slidesToOffset * slideHeight;\n if (!vertical) {\n targetLeft = slideIndex * slideWidth * -1 + slideOffset;\n } else {\n targetLeft = slideIndex * slideHeight * -1 + verticalOffset;\n }\n if (variableWidth === true) {\n var targetSlideIndex;\n var trackElem = trackRef && trackRef.node;\n targetSlideIndex = slideIndex + getPreClones(spec);\n targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];\n targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;\n if (centerMode === true) {\n targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;\n targetSlide = trackElem && trackElem.children[targetSlideIndex];\n targetLeft = 0;\n for (var slide = 0; slide < targetSlideIndex; slide++) {\n targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;\n }\n targetLeft -= parseInt(spec.centerPadding);\n targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;\n }\n }\n return targetLeft;\n};\nexport var getPreClones = function getPreClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n if (spec.variableWidth) {\n return spec.slideCount;\n }\n return spec.slidesToShow + (spec.centerMode ? 1 : 0);\n};\nexport var getPostClones = function getPostClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n return spec.slideCount;\n};\nexport var getTotalSlides = function getTotalSlides(spec) {\n return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);\n};\nexport var siblingDirection = function siblingDirection(spec) {\n if (spec.targetSlide > spec.currentSlide) {\n if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {\n return \"left\";\n }\n return \"right\";\n } else {\n if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {\n return \"right\";\n }\n return \"left\";\n }\n};\nexport var slidesOnRight = function slidesOnRight(_ref) {\n var slidesToShow = _ref.slidesToShow,\n centerMode = _ref.centerMode,\n rtl = _ref.rtl,\n centerPadding = _ref.centerPadding;\n // returns no of slides on the right of active slide\n if (centerMode) {\n var right = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) right += 1;\n if (rtl && slidesToShow % 2 === 0) right += 1;\n return right;\n }\n if (rtl) {\n return 0;\n }\n return slidesToShow - 1;\n};\nexport var slidesOnLeft = function slidesOnLeft(_ref2) {\n var slidesToShow = _ref2.slidesToShow,\n centerMode = _ref2.centerMode,\n rtl = _ref2.rtl,\n centerPadding = _ref2.centerPadding;\n // returns no of slides on the left of active slide\n if (centerMode) {\n var left = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) left += 1;\n if (!rtl && slidesToShow % 2 === 0) left += 1;\n return left;\n }\n if (rtl) {\n return slidesToShow - 1;\n }\n return 0;\n};\nexport var canUseDOM = function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n};\nexport var validSettings = Object.keys(defaultProps);\nexport function filterSettings(settings) {\n return validSettings.reduce(function (acc, settingName) {\n if (settings.hasOwnProperty(settingName)) {\n acc[settingName] = settings[settingName];\n }\n return acc;\n }, {});\n}","\"use strict\";\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nimport React from \"react\";\nimport classnames from \"classnames\";\nimport { lazyStartIndex, lazyEndIndex, getPreClones } from \"./utils/innerSliderUtils\";\n\n// given specifications/props for a slide, fetch all the classes that need to be applied to the slide\nvar getSlideClasses = function getSlideClasses(spec) {\n var slickActive, slickCenter, slickCloned;\n var centerOffset, index;\n if (spec.rtl) {\n index = spec.slideCount - 1 - spec.index;\n } else {\n index = spec.index;\n }\n slickCloned = index < 0 || index >= spec.slideCount;\n if (spec.centerMode) {\n centerOffset = Math.floor(spec.slidesToShow / 2);\n slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;\n if (index > spec.currentSlide - centerOffset - 1 && index <= spec.currentSlide + centerOffset) {\n slickActive = true;\n }\n } else {\n slickActive = spec.currentSlide <= index && index < spec.currentSlide + spec.slidesToShow;\n }\n var focusedSlide;\n if (spec.targetSlide < 0) {\n focusedSlide = spec.targetSlide + spec.slideCount;\n } else if (spec.targetSlide >= spec.slideCount) {\n focusedSlide = spec.targetSlide - spec.slideCount;\n } else {\n focusedSlide = spec.targetSlide;\n }\n var slickCurrent = index === focusedSlide;\n return {\n \"slick-slide\": true,\n \"slick-active\": slickActive,\n \"slick-center\": slickCenter,\n \"slick-cloned\": slickCloned,\n \"slick-current\": slickCurrent // dubious in case of RTL\n };\n};\nvar getSlideStyle = function getSlideStyle(spec) {\n var style = {};\n if (spec.variableWidth === undefined || spec.variableWidth === false) {\n style.width = spec.slideWidth;\n }\n if (spec.fade) {\n style.position = \"relative\";\n if (spec.vertical && spec.slideHeight) {\n style.top = -spec.index * parseInt(spec.slideHeight);\n } else {\n style.left = -spec.index * parseInt(spec.slideWidth);\n }\n style.opacity = spec.currentSlide === spec.index ? 1 : 0;\n style.zIndex = spec.currentSlide === spec.index ? 999 : 998;\n if (spec.useCSS) {\n style.transition = \"opacity \" + spec.speed + \"ms \" + spec.cssEase + \", \" + \"visibility \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n return style;\n};\nvar getKey = function getKey(child, fallbackKey) {\n return child.key + \"-\" + fallbackKey;\n};\nvar renderSlides = function renderSlides(spec) {\n var key;\n var slides = [];\n var preCloneSlides = [];\n var postCloneSlides = [];\n var childrenCount = React.Children.count(spec.children);\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n React.Children.forEach(spec.children, function (elem, index) {\n var child;\n var childOnClickOptions = {\n message: \"children\",\n index: index,\n slidesToScroll: spec.slidesToScroll,\n currentSlide: spec.currentSlide\n };\n\n // in case of lazyLoad, whether or not we want to fetch the slide\n if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0) {\n child = elem;\n } else {\n child = /*#__PURE__*/React.createElement(\"div\", null);\n }\n var childStyle = getSlideStyle(_objectSpread(_objectSpread({}, spec), {}, {\n index: index\n }));\n var slideClass = child.props.className || \"\";\n var slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {\n index: index\n }));\n // push a cloned element of the desired slide\n slides.push( /*#__PURE__*/React.cloneElement(child, {\n key: \"original\" + getKey(child, index),\n \"data-index\": index,\n className: classnames(slideClasses, slideClass),\n tabIndex: \"-1\",\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: _objectSpread(_objectSpread({\n outline: \"none\"\n }, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n\n // if slide needs to be precloned or postcloned\n if (spec.infinite && childrenCount > 1 && spec.fade === false && !spec.unslick) {\n var preCloneNo = childrenCount - index;\n if (preCloneNo <= getPreClones(spec)) {\n key = -preCloneNo;\n if (key >= startIndex) {\n child = elem;\n }\n slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {\n index: key\n }));\n preCloneSlides.push( /*#__PURE__*/React.cloneElement(child, {\n key: \"precloned\" + getKey(child, key),\n \"data-index\": key,\n tabIndex: \"-1\",\n className: classnames(slideClasses, slideClass),\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: _objectSpread(_objectSpread({}, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n }\n key = childrenCount + index;\n if (key < endIndex) {\n child = elem;\n }\n slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {\n index: key\n }));\n postCloneSlides.push( /*#__PURE__*/React.cloneElement(child, {\n key: \"postcloned\" + getKey(child, key),\n \"data-index\": key,\n tabIndex: \"-1\",\n className: classnames(slideClasses, slideClass),\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: _objectSpread(_objectSpread({}, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n }\n });\n if (spec.rtl) {\n return preCloneSlides.concat(slides, postCloneSlides).reverse();\n } else {\n return preCloneSlides.concat(slides, postCloneSlides);\n }\n};\nexport var Track = /*#__PURE__*/function (_React$PureComponent) {\n function Track() {\n var _this;\n _classCallCheck(this, Track);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _callSuper(this, Track, [].concat(args));\n _defineProperty(_this, \"node\", null);\n _defineProperty(_this, \"handleRef\", function (ref) {\n _this.node = ref;\n });\n return _this;\n }\n _inherits(Track, _React$PureComponent);\n return _createClass(Track, [{\n key: \"render\",\n value: function render() {\n var slides = renderSlides(this.props);\n var _this$props = this.props,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseOver = _this$props.onMouseOver,\n onMouseLeave = _this$props.onMouseLeave;\n var mouseEvents = {\n onMouseEnter: onMouseEnter,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n };\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: this.handleRef,\n className: \"slick-track\",\n style: this.props.trackStyle\n }, mouseEvents), slides);\n }\n }]);\n}(React.PureComponent);","\"use strict\";\n\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nimport React from \"react\";\nimport classnames from \"classnames\";\nimport { clamp } from \"./utils/innerSliderUtils\";\nvar getDotCount = function getDotCount(spec) {\n var dots;\n if (spec.infinite) {\n dots = Math.ceil(spec.slideCount / spec.slidesToScroll);\n } else {\n dots = Math.ceil((spec.slideCount - spec.slidesToShow) / spec.slidesToScroll) + 1;\n }\n return dots;\n};\nexport var Dots = /*#__PURE__*/function (_React$PureComponent) {\n function Dots() {\n _classCallCheck(this, Dots);\n return _callSuper(this, Dots, arguments);\n }\n _inherits(Dots, _React$PureComponent);\n return _createClass(Dots, [{\n key: \"clickHandler\",\n value: function clickHandler(options, e) {\n // In Autoplay the focus stays on clicked button even after transition\n // to next slide. That only goes away by click somewhere outside\n e.preventDefault();\n this.props.clickHandler(options);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseOver = _this$props.onMouseOver,\n onMouseLeave = _this$props.onMouseLeave,\n infinite = _this$props.infinite,\n slidesToScroll = _this$props.slidesToScroll,\n slidesToShow = _this$props.slidesToShow,\n slideCount = _this$props.slideCount,\n currentSlide = _this$props.currentSlide;\n var dotCount = getDotCount({\n slideCount: slideCount,\n slidesToScroll: slidesToScroll,\n slidesToShow: slidesToShow,\n infinite: infinite\n });\n var mouseEvents = {\n onMouseEnter: onMouseEnter,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n };\n var dots = [];\n for (var i = 0; i < dotCount; i++) {\n var _rightBound = (i + 1) * slidesToScroll - 1;\n var rightBound = infinite ? _rightBound : clamp(_rightBound, 0, slideCount - 1);\n var _leftBound = rightBound - (slidesToScroll - 1);\n var leftBound = infinite ? _leftBound : clamp(_leftBound, 0, slideCount - 1);\n var className = classnames({\n \"slick-active\": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound\n });\n var dotOptions = {\n message: \"dots\",\n index: i,\n slidesToScroll: slidesToScroll,\n currentSlide: currentSlide\n };\n var onClick = this.clickHandler.bind(this, dotOptions);\n dots = dots.concat( /*#__PURE__*/React.createElement(\"li\", {\n key: i,\n className: className\n }, /*#__PURE__*/React.cloneElement(this.props.customPaging(i), {\n onClick: onClick\n })));\n }\n return /*#__PURE__*/React.cloneElement(this.props.appendDots(dots), _objectSpread({\n className: this.props.dotsClass\n }, mouseEvents));\n }\n }]);\n}(React.PureComponent);","\"use strict\";\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nimport React from \"react\";\nimport classnames from \"classnames\";\nimport { canGoNext } from \"./utils/innerSliderUtils\";\nexport var PrevArrow = /*#__PURE__*/function (_React$PureComponent) {\n function PrevArrow() {\n _classCallCheck(this, PrevArrow);\n return _callSuper(this, PrevArrow, arguments);\n }\n _inherits(PrevArrow, _React$PureComponent);\n return _createClass(PrevArrow, [{\n key: \"clickHandler\",\n value: function clickHandler(options, e) {\n if (e) {\n e.preventDefault();\n }\n this.props.clickHandler(options, e);\n }\n }, {\n key: \"render\",\n value: function render() {\n var prevClasses = {\n \"slick-arrow\": true,\n \"slick-prev\": true\n };\n var prevHandler = this.clickHandler.bind(this, {\n message: \"previous\"\n });\n if (!this.props.infinite && (this.props.currentSlide === 0 || this.props.slideCount <= this.props.slidesToShow)) {\n prevClasses[\"slick-disabled\"] = true;\n prevHandler = null;\n }\n var prevArrowProps = {\n key: \"0\",\n \"data-role\": \"none\",\n className: classnames(prevClasses),\n style: {\n display: \"block\"\n },\n onClick: prevHandler\n };\n var customProps = {\n currentSlide: this.props.currentSlide,\n slideCount: this.props.slideCount\n };\n var prevArrow;\n if (this.props.prevArrow) {\n prevArrow = /*#__PURE__*/React.cloneElement(this.props.prevArrow, _objectSpread(_objectSpread({}, prevArrowProps), customProps));\n } else {\n prevArrow = /*#__PURE__*/React.createElement(\"button\", _extends({\n key: \"0\",\n type: \"button\"\n }, prevArrowProps), \" \", \"Previous\");\n }\n return prevArrow;\n }\n }]);\n}(React.PureComponent);\nexport var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {\n function NextArrow() {\n _classCallCheck(this, NextArrow);\n return _callSuper(this, NextArrow, arguments);\n }\n _inherits(NextArrow, _React$PureComponent2);\n return _createClass(NextArrow, [{\n key: \"clickHandler\",\n value: function clickHandler(options, e) {\n if (e) {\n e.preventDefault();\n }\n this.props.clickHandler(options, e);\n }\n }, {\n key: \"render\",\n value: function render() {\n var nextClasses = {\n \"slick-arrow\": true,\n \"slick-next\": true\n };\n var nextHandler = this.clickHandler.bind(this, {\n message: \"next\"\n });\n if (!canGoNext(this.props)) {\n nextClasses[\"slick-disabled\"] = true;\n nextHandler = null;\n }\n var nextArrowProps = {\n key: \"1\",\n \"data-role\": \"none\",\n className: classnames(nextClasses),\n style: {\n display: \"block\"\n },\n onClick: nextHandler\n };\n var customProps = {\n currentSlide: this.props.currentSlide,\n slideCount: this.props.slideCount\n };\n var nextArrow;\n if (this.props.nextArrow) {\n nextArrow = /*#__PURE__*/React.cloneElement(this.props.nextArrow, _objectSpread(_objectSpread({}, nextArrowProps), customProps));\n } else {\n nextArrow = /*#__PURE__*/React.createElement(\"button\", _extends({\n key: \"1\",\n type: \"button\"\n }, nextArrowProps), \" \", \"Next\");\n }\n return nextArrow;\n }\n }]);\n}(React.PureComponent);","\"use strict\";\n\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"animating\"];\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nimport React from \"react\";\nimport initialState from \"./initial-state\";\nimport { debounce } from \"throttle-debounce\";\nimport classnames from \"classnames\";\nimport { getOnDemandLazySlides, extractObject, initializedState, getHeight, canGoNext, slideHandler, changeSlide, keyHandler, swipeStart, swipeMove, swipeEnd, getPreClones, getPostClones, getTrackLeft, getTrackCSS } from \"./utils/innerSliderUtils\";\nimport { Track } from \"./track\";\nimport { Dots } from \"./dots\";\nimport { PrevArrow, NextArrow } from \"./arrows\";\nimport ResizeObserver from \"resize-observer-polyfill\";\nexport var InnerSlider = /*#__PURE__*/function (_React$Component) {\n function InnerSlider(props) {\n var _this;\n _classCallCheck(this, InnerSlider);\n _this = _callSuper(this, InnerSlider, [props]);\n _defineProperty(_this, \"listRefHandler\", function (ref) {\n return _this.list = ref;\n });\n _defineProperty(_this, \"trackRefHandler\", function (ref) {\n return _this.track = ref;\n });\n _defineProperty(_this, \"adaptHeight\", function () {\n if (_this.props.adaptiveHeight && _this.list) {\n var elem = _this.list.querySelector(\"[data-index=\\\"\".concat(_this.state.currentSlide, \"\\\"]\"));\n _this.list.style.height = getHeight(elem) + \"px\";\n }\n });\n _defineProperty(_this, \"componentDidMount\", function () {\n _this.props.onInit && _this.props.onInit();\n if (_this.props.lazyLoad) {\n var slidesToLoad = getOnDemandLazySlides(_objectSpread(_objectSpread({}, _this.props), _this.state));\n if (slidesToLoad.length > 0) {\n _this.setState(function (prevState) {\n return {\n lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)\n };\n });\n if (_this.props.onLazyLoad) {\n _this.props.onLazyLoad(slidesToLoad);\n }\n }\n }\n var spec = _objectSpread({\n listRef: _this.list,\n trackRef: _this.track\n }, _this.props);\n _this.updateState(spec, true, function () {\n _this.adaptHeight();\n _this.props.autoplay && _this.autoPlay(\"playing\");\n });\n if (_this.props.lazyLoad === \"progressive\") {\n _this.lazyLoadTimer = setInterval(_this.progressiveLazyLoad, 1000);\n }\n _this.ro = new ResizeObserver(function () {\n if (_this.state.animating) {\n _this.onWindowResized(false); // don't set trackStyle hence don't break animation\n _this.callbackTimers.push(setTimeout(function () {\n return _this.onWindowResized();\n }, _this.props.speed));\n } else {\n _this.onWindowResized();\n }\n });\n _this.ro.observe(_this.list);\n document.querySelectorAll && Array.prototype.forEach.call(document.querySelectorAll(\".slick-slide\"), function (slide) {\n slide.onfocus = _this.props.pauseOnFocus ? _this.onSlideFocus : null;\n slide.onblur = _this.props.pauseOnFocus ? _this.onSlideBlur : null;\n });\n if (window.addEventListener) {\n window.addEventListener(\"resize\", _this.onWindowResized);\n } else {\n window.attachEvent(\"onresize\", _this.onWindowResized);\n }\n });\n _defineProperty(_this, \"componentWillUnmount\", function () {\n if (_this.animationEndCallback) {\n clearTimeout(_this.animationEndCallback);\n }\n if (_this.lazyLoadTimer) {\n clearInterval(_this.lazyLoadTimer);\n }\n if (_this.callbackTimers.length) {\n _this.callbackTimers.forEach(function (timer) {\n return clearTimeout(timer);\n });\n _this.callbackTimers = [];\n }\n if (window.addEventListener) {\n window.removeEventListener(\"resize\", _this.onWindowResized);\n } else {\n window.detachEvent(\"onresize\", _this.onWindowResized);\n }\n if (_this.autoplayTimer) {\n clearInterval(_this.autoplayTimer);\n }\n _this.ro.disconnect();\n });\n _defineProperty(_this, \"componentDidUpdate\", function (prevProps) {\n _this.checkImagesLoad();\n _this.props.onReInit && _this.props.onReInit();\n if (_this.props.lazyLoad) {\n var slidesToLoad = getOnDemandLazySlides(_objectSpread(_objectSpread({}, _this.props), _this.state));\n if (slidesToLoad.length > 0) {\n _this.setState(function (prevState) {\n return {\n lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)\n };\n });\n if (_this.props.onLazyLoad) {\n _this.props.onLazyLoad(slidesToLoad);\n }\n }\n }\n // if (this.props.onLazyLoad) {\n // this.props.onLazyLoad([leftMostSlide])\n // }\n _this.adaptHeight();\n var spec = _objectSpread(_objectSpread({\n listRef: _this.list,\n trackRef: _this.track\n }, _this.props), _this.state);\n var setTrackStyle = _this.didPropsChange(prevProps);\n setTrackStyle && _this.updateState(spec, setTrackStyle, function () {\n if (_this.state.currentSlide >= React.Children.count(_this.props.children)) {\n _this.changeSlide({\n message: \"index\",\n index: React.Children.count(_this.props.children) - _this.props.slidesToShow,\n currentSlide: _this.state.currentSlide\n });\n }\n if (prevProps.autoplay !== _this.props.autoplay || prevProps.autoplaySpeed !== _this.props.autoplaySpeed) {\n if (!prevProps.autoplay && _this.props.autoplay) {\n _this.autoPlay(\"playing\");\n } else if (_this.props.autoplay) {\n _this.autoPlay(\"update\");\n } else {\n _this.pause(\"paused\");\n }\n }\n });\n });\n _defineProperty(_this, \"onWindowResized\", function (setTrackStyle) {\n if (_this.debouncedResize) _this.debouncedResize.cancel();\n _this.debouncedResize = debounce(50, function () {\n return _this.resizeWindow(setTrackStyle);\n });\n _this.debouncedResize();\n });\n _defineProperty(_this, \"resizeWindow\", function () {\n var setTrackStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var isTrackMounted = Boolean(_this.track && _this.track.node);\n // prevent warning: setting state on unmounted component (server side rendering)\n if (!isTrackMounted) return;\n var spec = _objectSpread(_objectSpread({\n listRef: _this.list,\n trackRef: _this.track\n }, _this.props), _this.state);\n _this.updateState(spec, setTrackStyle, function () {\n if (_this.props.autoplay) _this.autoPlay(\"update\");else _this.pause(\"paused\");\n });\n // animating state should be cleared while resizing, otherwise autoplay stops working\n _this.setState({\n animating: false\n });\n clearTimeout(_this.animationEndCallback);\n delete _this.animationEndCallback;\n });\n _defineProperty(_this, \"updateState\", function (spec, setTrackStyle, callback) {\n var updatedState = initializedState(spec);\n spec = _objectSpread(_objectSpread(_objectSpread({}, spec), updatedState), {}, {\n slideIndex: updatedState.currentSlide\n });\n var targetLeft = getTrackLeft(spec);\n spec = _objectSpread(_objectSpread({}, spec), {}, {\n left: targetLeft\n });\n var trackStyle = getTrackCSS(spec);\n if (setTrackStyle || React.Children.count(_this.props.children) !== React.Children.count(spec.children)) {\n updatedState[\"trackStyle\"] = trackStyle;\n }\n _this.setState(updatedState, callback);\n });\n _defineProperty(_this, \"ssrInit\", function () {\n if (_this.props.variableWidth) {\n var _trackWidth = 0,\n _trackLeft = 0;\n var childrenWidths = [];\n var preClones = getPreClones(_objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n slideCount: _this.props.children.length\n }));\n var postClones = getPostClones(_objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n slideCount: _this.props.children.length\n }));\n _this.props.children.forEach(function (child) {\n childrenWidths.push(child.props.style.width);\n _trackWidth += child.props.style.width;\n });\n for (var i = 0; i < preClones; i++) {\n _trackLeft += childrenWidths[childrenWidths.length - 1 - i];\n _trackWidth += childrenWidths[childrenWidths.length - 1 - i];\n }\n for (var _i = 0; _i < postClones; _i++) {\n _trackWidth += childrenWidths[_i];\n }\n for (var _i2 = 0; _i2 < _this.state.currentSlide; _i2++) {\n _trackLeft += childrenWidths[_i2];\n }\n var _trackStyle = {\n width: _trackWidth + \"px\",\n left: -_trackLeft + \"px\"\n };\n if (_this.props.centerMode) {\n var currentWidth = \"\".concat(childrenWidths[_this.state.currentSlide], \"px\");\n _trackStyle.left = \"calc(\".concat(_trackStyle.left, \" + (100% - \").concat(currentWidth, \") / 2 ) \");\n }\n return {\n trackStyle: _trackStyle\n };\n }\n var childrenCount = React.Children.count(_this.props.children);\n var spec = _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n slideCount: childrenCount\n });\n var slideCount = getPreClones(spec) + getPostClones(spec) + childrenCount;\n var trackWidth = 100 / _this.props.slidesToShow * slideCount;\n var slideWidth = 100 / slideCount;\n var trackLeft = -slideWidth * (getPreClones(spec) + _this.state.currentSlide) * trackWidth / 100;\n if (_this.props.centerMode) {\n trackLeft += (100 - slideWidth * trackWidth / 100) / 2;\n }\n var trackStyle = {\n width: trackWidth + \"%\",\n left: trackLeft + \"%\"\n };\n return {\n slideWidth: slideWidth + \"%\",\n trackStyle: trackStyle\n };\n });\n _defineProperty(_this, \"checkImagesLoad\", function () {\n var images = _this.list && _this.list.querySelectorAll && _this.list.querySelectorAll(\".slick-slide img\") || [];\n var imagesCount = images.length,\n loadedCount = 0;\n Array.prototype.forEach.call(images, function (image) {\n var handler = function handler() {\n return ++loadedCount && loadedCount >= imagesCount && _this.onWindowResized();\n };\n if (!image.onclick) {\n image.onclick = function () {\n return image.parentNode.focus();\n };\n } else {\n var prevClickHandler = image.onclick;\n image.onclick = function (e) {\n prevClickHandler(e);\n image.parentNode.focus();\n };\n }\n if (!image.onload) {\n if (_this.props.lazyLoad) {\n image.onload = function () {\n _this.adaptHeight();\n _this.callbackTimers.push(setTimeout(_this.onWindowResized, _this.props.speed));\n };\n } else {\n image.onload = handler;\n image.onerror = function () {\n handler();\n _this.props.onLazyLoadError && _this.props.onLazyLoadError();\n };\n }\n }\n });\n });\n _defineProperty(_this, \"progressiveLazyLoad\", function () {\n var slidesToLoad = [];\n var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);\n for (var index = _this.state.currentSlide; index < _this.state.slideCount + getPostClones(spec); index++) {\n if (_this.state.lazyLoadedList.indexOf(index) < 0) {\n slidesToLoad.push(index);\n break;\n }\n }\n for (var _index = _this.state.currentSlide - 1; _index >= -getPreClones(spec); _index--) {\n if (_this.state.lazyLoadedList.indexOf(_index) < 0) {\n slidesToLoad.push(_index);\n break;\n }\n }\n if (slidesToLoad.length > 0) {\n _this.setState(function (state) {\n return {\n lazyLoadedList: state.lazyLoadedList.concat(slidesToLoad)\n };\n });\n if (_this.props.onLazyLoad) {\n _this.props.onLazyLoad(slidesToLoad);\n }\n } else {\n if (_this.lazyLoadTimer) {\n clearInterval(_this.lazyLoadTimer);\n delete _this.lazyLoadTimer;\n }\n }\n });\n _defineProperty(_this, \"slideHandler\", function (index) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var _this$props = _this.props,\n asNavFor = _this$props.asNavFor,\n beforeChange = _this$props.beforeChange,\n onLazyLoad = _this$props.onLazyLoad,\n speed = _this$props.speed,\n afterChange = _this$props.afterChange;\n // capture currentslide before state is updated\n var currentSlide = _this.state.currentSlide;\n var _slideHandler = slideHandler(_objectSpread(_objectSpread(_objectSpread({\n index: index\n }, _this.props), _this.state), {}, {\n trackRef: _this.track,\n useCSS: _this.props.useCSS && !dontAnimate\n })),\n state = _slideHandler.state,\n nextState = _slideHandler.nextState;\n if (!state) return;\n beforeChange && beforeChange(currentSlide, state.currentSlide);\n var slidesToLoad = state.lazyLoadedList.filter(function (value) {\n return _this.state.lazyLoadedList.indexOf(value) < 0;\n });\n onLazyLoad && slidesToLoad.length > 0 && onLazyLoad(slidesToLoad);\n if (!_this.props.waitForAnimate && _this.animationEndCallback) {\n clearTimeout(_this.animationEndCallback);\n afterChange && afterChange(currentSlide);\n delete _this.animationEndCallback;\n }\n _this.setState(state, function () {\n // asNavForIndex check is to avoid recursive calls of slideHandler in waitForAnimate=false mode\n if (asNavFor && _this.asNavForIndex !== index) {\n _this.asNavForIndex = index;\n asNavFor.innerSlider.slideHandler(index);\n }\n if (!nextState) return;\n _this.animationEndCallback = setTimeout(function () {\n var animating = nextState.animating,\n firstBatch = _objectWithoutProperties(nextState, _excluded);\n _this.setState(firstBatch, function () {\n _this.callbackTimers.push(setTimeout(function () {\n return _this.setState({\n animating: animating\n });\n }, 10));\n afterChange && afterChange(state.currentSlide);\n delete _this.animationEndCallback;\n });\n }, speed);\n });\n });\n _defineProperty(_this, \"changeSlide\", function (options) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);\n var targetSlide = changeSlide(spec, options);\n if (targetSlide !== 0 && !targetSlide) return;\n if (dontAnimate === true) {\n _this.slideHandler(targetSlide, dontAnimate);\n } else {\n _this.slideHandler(targetSlide);\n }\n _this.props.autoplay && _this.autoPlay(\"update\");\n if (_this.props.focusOnSelect) {\n var nodes = _this.list.querySelectorAll(\".slick-current\");\n nodes[0] && nodes[0].focus();\n }\n });\n _defineProperty(_this, \"clickHandler\", function (e) {\n if (_this.clickable === false) {\n e.stopPropagation();\n e.preventDefault();\n }\n _this.clickable = true;\n });\n _defineProperty(_this, \"keyHandler\", function (e) {\n var dir = keyHandler(e, _this.props.accessibility, _this.props.rtl);\n dir !== \"\" && _this.changeSlide({\n message: dir\n });\n });\n _defineProperty(_this, \"selectHandler\", function (options) {\n _this.changeSlide(options);\n });\n _defineProperty(_this, \"disableBodyScroll\", function () {\n var preventDefault = function preventDefault(e) {\n e = e || window.event;\n if (e.preventDefault) e.preventDefault();\n e.returnValue = false;\n };\n window.ontouchmove = preventDefault;\n });\n _defineProperty(_this, \"enableBodyScroll\", function () {\n window.ontouchmove = null;\n });\n _defineProperty(_this, \"swipeStart\", function (e) {\n if (_this.props.verticalSwiping) {\n _this.disableBodyScroll();\n }\n var state = swipeStart(e, _this.props.swipe, _this.props.draggable);\n state !== \"\" && _this.setState(state);\n });\n _defineProperty(_this, \"swipeMove\", function (e) {\n var state = swipeMove(e, _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n trackRef: _this.track,\n listRef: _this.list,\n slideIndex: _this.state.currentSlide\n }));\n if (!state) return;\n if (state[\"swiping\"]) {\n _this.clickable = false;\n }\n _this.setState(state);\n });\n _defineProperty(_this, \"swipeEnd\", function (e) {\n var state = swipeEnd(e, _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n trackRef: _this.track,\n listRef: _this.list,\n slideIndex: _this.state.currentSlide\n }));\n if (!state) return;\n var triggerSlideHandler = state[\"triggerSlideHandler\"];\n delete state[\"triggerSlideHandler\"];\n _this.setState(state);\n if (triggerSlideHandler === undefined) return;\n _this.slideHandler(triggerSlideHandler);\n if (_this.props.verticalSwiping) {\n _this.enableBodyScroll();\n }\n });\n _defineProperty(_this, \"touchEnd\", function (e) {\n _this.swipeEnd(e);\n _this.clickable = true;\n });\n _defineProperty(_this, \"slickPrev\", function () {\n // this and fellow methods are wrapped in setTimeout\n // to make sure initialize setState has happened before\n // any of such methods are called\n _this.callbackTimers.push(setTimeout(function () {\n return _this.changeSlide({\n message: \"previous\"\n });\n }, 0));\n });\n _defineProperty(_this, \"slickNext\", function () {\n _this.callbackTimers.push(setTimeout(function () {\n return _this.changeSlide({\n message: \"next\"\n });\n }, 0));\n });\n _defineProperty(_this, \"slickGoTo\", function (slide) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n slide = Number(slide);\n if (isNaN(slide)) return \"\";\n _this.callbackTimers.push(setTimeout(function () {\n return _this.changeSlide({\n message: \"index\",\n index: slide,\n currentSlide: _this.state.currentSlide\n }, dontAnimate);\n }, 0));\n });\n _defineProperty(_this, \"play\", function () {\n var nextIndex;\n if (_this.props.rtl) {\n nextIndex = _this.state.currentSlide - _this.props.slidesToScroll;\n } else {\n if (canGoNext(_objectSpread(_objectSpread({}, _this.props), _this.state))) {\n nextIndex = _this.state.currentSlide + _this.props.slidesToScroll;\n } else {\n return false;\n }\n }\n _this.slideHandler(nextIndex);\n });\n _defineProperty(_this, \"autoPlay\", function (playType) {\n if (_this.autoplayTimer) {\n clearInterval(_this.autoplayTimer);\n }\n var autoplaying = _this.state.autoplaying;\n if (playType === \"update\") {\n if (autoplaying === \"hovered\" || autoplaying === \"focused\" || autoplaying === \"paused\") {\n return;\n }\n } else if (playType === \"leave\") {\n if (autoplaying === \"paused\" || autoplaying === \"focused\") {\n return;\n }\n } else if (playType === \"blur\") {\n if (autoplaying === \"paused\" || autoplaying === \"hovered\") {\n return;\n }\n }\n _this.autoplayTimer = setInterval(_this.play, _this.props.autoplaySpeed + 50);\n _this.setState({\n autoplaying: \"playing\"\n });\n });\n _defineProperty(_this, \"pause\", function (pauseType) {\n if (_this.autoplayTimer) {\n clearInterval(_this.autoplayTimer);\n _this.autoplayTimer = null;\n }\n var autoplaying = _this.state.autoplaying;\n if (pauseType === \"paused\") {\n _this.setState({\n autoplaying: \"paused\"\n });\n } else if (pauseType === \"focused\") {\n if (autoplaying === \"hovered\" || autoplaying === \"playing\") {\n _this.setState({\n autoplaying: \"focused\"\n });\n }\n } else {\n // pauseType is 'hovered'\n if (autoplaying === \"playing\") {\n _this.setState({\n autoplaying: \"hovered\"\n });\n }\n }\n });\n _defineProperty(_this, \"onDotsOver\", function () {\n return _this.props.autoplay && _this.pause(\"hovered\");\n });\n _defineProperty(_this, \"onDotsLeave\", function () {\n return _this.props.autoplay && _this.state.autoplaying === \"hovered\" && _this.autoPlay(\"leave\");\n });\n _defineProperty(_this, \"onTrackOver\", function () {\n return _this.props.autoplay && _this.pause(\"hovered\");\n });\n _defineProperty(_this, \"onTrackLeave\", function () {\n return _this.props.autoplay && _this.state.autoplaying === \"hovered\" && _this.autoPlay(\"leave\");\n });\n _defineProperty(_this, \"onSlideFocus\", function () {\n return _this.props.autoplay && _this.pause(\"focused\");\n });\n _defineProperty(_this, \"onSlideBlur\", function () {\n return _this.props.autoplay && _this.state.autoplaying === \"focused\" && _this.autoPlay(\"blur\");\n });\n _defineProperty(_this, \"render\", function () {\n var className = classnames(\"slick-slider\", _this.props.className, {\n \"slick-vertical\": _this.props.vertical,\n \"slick-initialized\": true\n });\n var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);\n var trackProps = extractObject(spec, [\"fade\", \"cssEase\", \"speed\", \"infinite\", \"centerMode\", \"focusOnSelect\", \"currentSlide\", \"lazyLoad\", \"lazyLoadedList\", \"rtl\", \"slideWidth\", \"slideHeight\", \"listHeight\", \"vertical\", \"slidesToShow\", \"slidesToScroll\", \"slideCount\", \"trackStyle\", \"variableWidth\", \"unslick\", \"centerPadding\", \"targetSlide\", \"useCSS\"]);\n var pauseOnHover = _this.props.pauseOnHover;\n trackProps = _objectSpread(_objectSpread({}, trackProps), {}, {\n onMouseEnter: pauseOnHover ? _this.onTrackOver : null,\n onMouseLeave: pauseOnHover ? _this.onTrackLeave : null,\n onMouseOver: pauseOnHover ? _this.onTrackOver : null,\n focusOnSelect: _this.props.focusOnSelect && _this.clickable ? _this.selectHandler : null\n });\n var dots;\n if (_this.props.dots === true && _this.state.slideCount >= _this.props.slidesToShow) {\n var dotProps = extractObject(spec, [\"dotsClass\", \"slideCount\", \"slidesToShow\", \"currentSlide\", \"slidesToScroll\", \"clickHandler\", \"children\", \"customPaging\", \"infinite\", \"appendDots\"]);\n var pauseOnDotsHover = _this.props.pauseOnDotsHover;\n dotProps = _objectSpread(_objectSpread({}, dotProps), {}, {\n clickHandler: _this.changeSlide,\n onMouseEnter: pauseOnDotsHover ? _this.onDotsLeave : null,\n onMouseOver: pauseOnDotsHover ? _this.onDotsOver : null,\n onMouseLeave: pauseOnDotsHover ? _this.onDotsLeave : null\n });\n dots = /*#__PURE__*/React.createElement(Dots, dotProps);\n }\n var prevArrow, nextArrow;\n var arrowProps = extractObject(spec, [\"infinite\", \"centerMode\", \"currentSlide\", \"slideCount\", \"slidesToShow\", \"prevArrow\", \"nextArrow\"]);\n arrowProps.clickHandler = _this.changeSlide;\n if (_this.props.arrows) {\n prevArrow = /*#__PURE__*/React.createElement(PrevArrow, arrowProps);\n nextArrow = /*#__PURE__*/React.createElement(NextArrow, arrowProps);\n }\n var verticalHeightStyle = null;\n if (_this.props.vertical) {\n verticalHeightStyle = {\n height: _this.state.listHeight\n };\n }\n var centerPaddingStyle = null;\n if (_this.props.vertical === false) {\n if (_this.props.centerMode === true) {\n centerPaddingStyle = {\n padding: \"0px \" + _this.props.centerPadding\n };\n }\n } else {\n if (_this.props.centerMode === true) {\n centerPaddingStyle = {\n padding: _this.props.centerPadding + \" 0px\"\n };\n }\n }\n var listStyle = _objectSpread(_objectSpread({}, verticalHeightStyle), centerPaddingStyle);\n var touchMove = _this.props.touchMove;\n var listProps = {\n className: \"slick-list\",\n style: listStyle,\n onClick: _this.clickHandler,\n onMouseDown: touchMove ? _this.swipeStart : null,\n onMouseMove: _this.state.dragging && touchMove ? _this.swipeMove : null,\n onMouseUp: touchMove ? _this.swipeEnd : null,\n onMouseLeave: _this.state.dragging && touchMove ? _this.swipeEnd : null,\n onTouchStart: touchMove ? _this.swipeStart : null,\n onTouchMove: _this.state.dragging && touchMove ? _this.swipeMove : null,\n onTouchEnd: touchMove ? _this.touchEnd : null,\n onTouchCancel: _this.state.dragging && touchMove ? _this.swipeEnd : null,\n onKeyDown: _this.props.accessibility ? _this.keyHandler : null\n };\n var innerSliderProps = {\n className: className,\n dir: \"ltr\",\n style: _this.props.style\n };\n if (_this.props.unslick) {\n listProps = {\n className: \"slick-list\"\n };\n innerSliderProps = {\n className: className,\n style: _this.props.style\n };\n }\n return /*#__PURE__*/React.createElement(\"div\", innerSliderProps, !_this.props.unslick ? prevArrow : \"\", /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: _this.listRefHandler\n }, listProps), /*#__PURE__*/React.createElement(Track, _extends({\n ref: _this.trackRefHandler\n }, trackProps), _this.props.children)), !_this.props.unslick ? nextArrow : \"\", !_this.props.unslick ? dots : \"\");\n });\n _this.list = null;\n _this.track = null;\n _this.state = _objectSpread(_objectSpread({}, initialState), {}, {\n currentSlide: _this.props.initialSlide,\n targetSlide: _this.props.initialSlide ? _this.props.initialSlide : 0,\n slideCount: React.Children.count(_this.props.children)\n });\n _this.callbackTimers = [];\n _this.clickable = true;\n _this.debouncedResize = null;\n var ssrState = _this.ssrInit();\n _this.state = _objectSpread(_objectSpread({}, _this.state), ssrState);\n return _this;\n }\n _inherits(InnerSlider, _React$Component);\n return _createClass(InnerSlider, [{\n key: \"didPropsChange\",\n value: function didPropsChange(prevProps) {\n var setTrackStyle = false;\n for (var _i3 = 0, _Object$keys = Object.keys(this.props); _i3 < _Object$keys.length; _i3++) {\n var key = _Object$keys[_i3];\n // eslint-disable-next-line no-prototype-builtins\n if (!prevProps.hasOwnProperty(key)) {\n setTrackStyle = true;\n break;\n }\n if (_typeof(prevProps[key]) === \"object\" || typeof prevProps[key] === \"function\" || isNaN(prevProps[key])) {\n continue;\n }\n if (prevProps[key] !== this.props[key]) {\n setTrackStyle = true;\n break;\n }\n }\n return setTrackStyle || React.Children.count(this.props.children) !== React.Children.count(prevProps.children);\n }\n }]);\n}(React.Component);","import Slider from \"./slider\";\nexport default Slider;","\"use strict\";\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nimport React from \"react\";\nimport { InnerSlider } from \"./inner-slider\";\nimport json2mq from \"json2mq\";\nimport defaultProps from \"./default-props\";\nimport { canUseDOM, filterSettings } from \"./utils/innerSliderUtils\";\nvar Slider = /*#__PURE__*/function (_React$Component) {\n function Slider(props) {\n var _this;\n _classCallCheck(this, Slider);\n _this = _callSuper(this, Slider, [props]);\n _defineProperty(_this, \"innerSliderRefHandler\", function (ref) {\n return _this.innerSlider = ref;\n });\n _defineProperty(_this, \"slickPrev\", function () {\n return _this.innerSlider.slickPrev();\n });\n _defineProperty(_this, \"slickNext\", function () {\n return _this.innerSlider.slickNext();\n });\n _defineProperty(_this, \"slickGoTo\", function (slide) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return _this.innerSlider.slickGoTo(slide, dontAnimate);\n });\n _defineProperty(_this, \"slickPause\", function () {\n return _this.innerSlider.pause(\"paused\");\n });\n _defineProperty(_this, \"slickPlay\", function () {\n return _this.innerSlider.autoPlay(\"play\");\n });\n _this.state = {\n breakpoint: null\n };\n _this._responsiveMediaHandlers = [];\n return _this;\n }\n _inherits(Slider, _React$Component);\n return _createClass(Slider, [{\n key: \"media\",\n value: function media(query, handler) {\n // javascript handler for css media query\n var mql = window.matchMedia(query);\n var listener = function listener(_ref) {\n var matches = _ref.matches;\n if (matches) {\n handler();\n }\n };\n mql.addListener(listener);\n listener(mql);\n this._responsiveMediaHandlers.push({\n mql: mql,\n query: query,\n listener: listener\n });\n }\n\n // handles responsive breakpoints\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n // performance monitoring\n //if (process.env.NODE_ENV !== 'production') {\n //const { whyDidYouUpdate } = require('why-did-you-update')\n //whyDidYouUpdate(React)\n //}\n if (this.props.responsive) {\n var breakpoints = this.props.responsive.map(function (breakpt) {\n return breakpt.breakpoint;\n });\n // sort them in increasing order of their numerical value\n breakpoints.sort(function (x, y) {\n return x - y;\n });\n breakpoints.forEach(function (breakpoint, index) {\n // media query for each breakpoint\n var bQuery;\n if (index === 0) {\n bQuery = json2mq({\n minWidth: 0,\n maxWidth: breakpoint\n });\n } else {\n bQuery = json2mq({\n minWidth: breakpoints[index - 1] + 1,\n maxWidth: breakpoint\n });\n }\n // when not using server side rendering\n canUseDOM() && _this2.media(bQuery, function () {\n _this2.setState({\n breakpoint: breakpoint\n });\n });\n });\n\n // Register media query for full screen. Need to support resize from small to large\n // convert javascript object to media query string\n var query = json2mq({\n minWidth: breakpoints.slice(-1)[0]\n });\n canUseDOM() && this.media(query, function () {\n _this2.setState({\n breakpoint: null\n });\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this._responsiveMediaHandlers.forEach(function (obj) {\n obj.mql.removeListener(obj.listener);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n var settings;\n var newProps;\n if (this.state.breakpoint) {\n newProps = this.props.responsive.filter(function (resp) {\n return resp.breakpoint === _this3.state.breakpoint;\n });\n settings = newProps[0].settings === \"unslick\" ? \"unslick\" : _objectSpread(_objectSpread(_objectSpread({}, defaultProps), this.props), newProps[0].settings);\n } else {\n settings = _objectSpread(_objectSpread({}, defaultProps), this.props);\n }\n\n // force scrolling by one if centerMode is on\n if (settings.centerMode) {\n if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToScroll should be equal to 1 in centerMode, you are using \".concat(settings.slidesToScroll));\n }\n settings.slidesToScroll = 1;\n }\n // force showing one slide and scrolling by one if the fade mode is on\n if (settings.fade) {\n if (settings.slidesToShow > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToShow should be equal to 1 when fade is true, you're using \".concat(settings.slidesToShow));\n }\n if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToScroll should be equal to 1 when fade is true, you're using \".concat(settings.slidesToScroll));\n }\n settings.slidesToShow = 1;\n settings.slidesToScroll = 1;\n }\n\n // makes sure that children is an array, even when there is only 1 child\n var children = React.Children.toArray(this.props.children);\n\n // Children may contain false or null, so we should filter them\n // children may also contain string filled with spaces (in certain cases where we use jsx strings)\n children = children.filter(function (child) {\n if (typeof child === \"string\") {\n return !!child.trim();\n }\n return !!child;\n });\n\n // rows and slidesPerRow logic is handled here\n if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) {\n console.warn(\"variableWidth is not supported in case of rows > 1 or slidesPerRow > 1\");\n settings.variableWidth = false;\n }\n var newChildren = [];\n var currentWidth = null;\n for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) {\n var newSlide = [];\n for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) {\n var row = [];\n for (var k = j; k < j + settings.slidesPerRow; k += 1) {\n if (settings.variableWidth && children[k].props.style) {\n currentWidth = children[k].props.style.width;\n }\n if (k >= children.length) break;\n row.push( /*#__PURE__*/React.cloneElement(children[k], {\n key: 100 * i + 10 * j + k,\n tabIndex: -1,\n style: {\n width: \"\".concat(100 / settings.slidesPerRow, \"%\"),\n display: \"inline-block\"\n }\n }));\n }\n newSlide.push( /*#__PURE__*/React.createElement(\"div\", {\n key: 10 * i + j\n }, row));\n }\n if (settings.variableWidth) {\n newChildren.push( /*#__PURE__*/React.createElement(\"div\", {\n key: i,\n style: {\n width: currentWidth\n }\n }, newSlide));\n } else {\n newChildren.push( /*#__PURE__*/React.createElement(\"div\", {\n key: i\n }, newSlide));\n }\n }\n if (settings === \"unslick\") {\n var className = \"regular slider \" + (this.props.className || \"\");\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className\n }, children);\n } else if (newChildren.length <= settings.slidesToShow && !settings.infinite) {\n settings.unslick = true;\n }\n return /*#__PURE__*/React.createElement(InnerSlider, _extends({\n style: this.props.style,\n ref: this.innerSliderRefHandler\n }, filterSettings(settings)), newChildren);\n }\n }]);\n}(React.Component);\nexport { Slider as default };","import { bound01, pad2 } from './util.js';\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * \n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\nexport function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\nexport function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, l: l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * (6 * t);\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n if (s === 0) {\n // achromatic\n g = l;\n b = l;\n r = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\nexport function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var v = max;\n var d = max - min;\n var s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0; // achromatic\n }\n else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n var mod = i % 6;\n var r = [v, q, p, p, t, v][mod];\n var g = [t, v, v, q, p, p][mod];\n var b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\nexport function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\nexport function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}\n/** Converts a decimal to a hex value */\nexport function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\nexport function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\nexport function parseIntFromHex(val) {\n return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n return {\n r: color >> 16,\n g: (color & 0xff00) >> 8,\n b: color & 0xff,\n };\n}\n","// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n/**\n * @hidden\n */\nexport var names = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n goldenrod: '#daa520',\n gold: '#ffd700',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavenderblush: '#fff0f5',\n lavender: '#e6e6fa',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32',\n};\n","/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb, } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { boundAlpha, convertToPercentage } from './util.js';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\nexport function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}\n// \nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n// \nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\");\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n/**\n * Permissive string parsing. Take in a number of formats, and output an object\n * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\nexport function stringInputToObject(color) {\n color = color.trim().toLowerCase();\n if (color.length === 0) {\n return false;\n }\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color === 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match = matchers.rgb.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n match = matchers.rgba.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n match = matchers.hsl.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n match = matchers.hsla.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n match = matchers.hsv.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n match = matchers.hsva.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n match = matchers.hex8.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex6.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n match = matchers.hex4.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n a: convertHexToDecimal(match[4] + match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex3.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\nexport function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}\n","import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util.js';\nvar TinyColor = /** @class */ (function () {\n function TinyColor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n var _a;\n // If input is already a tinycolor, return itself\n if (color instanceof TinyColor) {\n // eslint-disable-next-line no-constructor-return\n return color;\n }\n if (typeof color === 'number') {\n color = numberInputToObject(color);\n }\n this.originalInput = color;\n var rgb = inputToRGB(color);\n this.originalInput = color;\n this.r = rgb.r;\n this.g = rgb.g;\n this.b = rgb.b;\n this.a = rgb.a;\n this.roundA = Math.round(100 * this.a) / 100;\n this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n this.gradientType = opts.gradientType;\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this.r < 1) {\n this.r = Math.round(this.r);\n }\n if (this.g < 1) {\n this.g = Math.round(this.g);\n }\n if (this.b < 1) {\n this.b = Math.round(this.b);\n }\n this.isValid = rgb.ok;\n }\n TinyColor.prototype.isDark = function () {\n return this.getBrightness() < 128;\n };\n TinyColor.prototype.isLight = function () {\n return !this.isDark();\n };\n /**\n * Returns the perceived brightness of the color, from 0-255.\n */\n TinyColor.prototype.getBrightness = function () {\n // http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n };\n /**\n * Returns the perceived luminance of a color, from 0-1.\n */\n TinyColor.prototype.getLuminance = function () {\n // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var R;\n var G;\n var B;\n var RsRGB = rgb.r / 255;\n var GsRGB = rgb.g / 255;\n var BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) {\n R = RsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n }\n if (GsRGB <= 0.03928) {\n G = GsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n }\n if (BsRGB <= 0.03928) {\n B = BsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n }\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n };\n /**\n * Returns the alpha value of a color, from 0-1.\n */\n TinyColor.prototype.getAlpha = function () {\n return this.a;\n };\n /**\n * Sets the alpha value on the current color.\n *\n * @param alpha - The new alpha value. The accepted range is 0-1.\n */\n TinyColor.prototype.setAlpha = function (alpha) {\n this.a = boundAlpha(alpha);\n this.roundA = Math.round(100 * this.a) / 100;\n return this;\n };\n /**\n * Returns whether the color is monochrome.\n */\n TinyColor.prototype.isMonochrome = function () {\n var s = this.toHsl().s;\n return s === 0;\n };\n /**\n * Returns the object as a HSVA object.\n */\n TinyColor.prototype.toHsv = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };\n };\n /**\n * Returns the hsva values interpolated into a string with the following format:\n * \"hsva(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHsvString = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n var h = Math.round(hsv.h * 360);\n var s = Math.round(hsv.s * 100);\n var v = Math.round(hsv.v * 100);\n return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a HSLA object.\n */\n TinyColor.prototype.toHsl = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };\n };\n /**\n * Returns the hsla values interpolated into a string with the following format:\n * \"hsla(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHslString = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n var h = Math.round(hsl.h * 360);\n var s = Math.round(hsl.s * 100);\n var l = Math.round(hsl.l * 100);\n return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the hex value of the color.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHex = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return rgbToHex(this.r, this.g, this.b, allow3Char);\n };\n /**\n * Returns the hex value of the color -with a # prefixed.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHexString = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return '#' + this.toHex(allow3Char);\n };\n /**\n * Returns the hex 8 value of the color.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8 = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n };\n /**\n * Returns the hex 8 value of the color -with a # prefixed.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8String = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return '#' + this.toHex8(allow4Char);\n };\n /**\n * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.\n * @param allowShortChar will shorten hex value to 3 or 4 char if possible\n */\n TinyColor.prototype.toHexShortString = function (allowShortChar) {\n if (allowShortChar === void 0) { allowShortChar = false; }\n return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toRgb = function () {\n return {\n r: Math.round(this.r),\n g: Math.round(this.g),\n b: Math.round(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA values interpolated into a string with the following format:\n * \"RGBA(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toRgbString = function () {\n var r = Math.round(this.r);\n var g = Math.round(this.g);\n var b = Math.round(this.b);\n return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toPercentageRgb = function () {\n var fmt = function (x) { return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\"); };\n return {\n r: fmt(this.r),\n g: fmt(this.g),\n b: fmt(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA relative values interpolated into a string\n */\n TinyColor.prototype.toPercentageRgbString = function () {\n var rnd = function (x) { return Math.round(bound01(x, 255) * 100); };\n return this.a === 1\n ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\")\n : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n };\n /**\n * The 'real' name of the color -if there is one.\n */\n TinyColor.prototype.toName = function () {\n if (this.a === 0) {\n return 'transparent';\n }\n if (this.a < 1) {\n return false;\n }\n var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n if (hex === value) {\n return key;\n }\n }\n return false;\n };\n TinyColor.prototype.toString = function (format) {\n var formatSet = Boolean(format);\n format = format !== null && format !== void 0 ? format : this.format;\n var formattedString = false;\n var hasAlpha = this.a < 1 && this.a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this.a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n };\n TinyColor.prototype.toNumber = function () {\n return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n };\n TinyColor.prototype.clone = function () {\n return new TinyColor(this.toString());\n };\n /**\n * Lighten the color a given amount. Providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.lighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Brighten the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.brighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var rgb = this.toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return new TinyColor(rgb);\n };\n /**\n * Darken the color a given amount, from 0 to 100.\n * Providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.darken = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.tint = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('white', amount);\n };\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.shade = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('black', amount);\n };\n /**\n * Desaturate the color a given amount, from 0 to 100.\n * Providing 100 will is the same as calling greyscale\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.desaturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Saturate the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.saturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Completely desaturates a color into greyscale.\n * Same as calling `desaturate(100)`\n */\n TinyColor.prototype.greyscale = function () {\n return this.desaturate(100);\n };\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n TinyColor.prototype.spin = function (amount) {\n var hsl = this.toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return new TinyColor(hsl);\n };\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n TinyColor.prototype.mix = function (color, amount) {\n if (amount === void 0) { amount = 50; }\n var rgb1 = this.toRgb();\n var rgb2 = new TinyColor(color).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a,\n };\n return new TinyColor(rgba);\n };\n TinyColor.prototype.analogous = function (results, slices) {\n if (results === void 0) { results = 6; }\n if (slices === void 0) { slices = 30; }\n var hsl = this.toHsl();\n var part = 360 / slices;\n var ret = [this];\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(new TinyColor(hsl));\n }\n return ret;\n };\n /**\n * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n */\n TinyColor.prototype.complement = function () {\n var hsl = this.toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return new TinyColor(hsl);\n };\n TinyColor.prototype.monochromatic = function (results) {\n if (results === void 0) { results = 6; }\n var hsv = this.toHsv();\n var h = hsv.h;\n var s = hsv.s;\n var v = hsv.v;\n var res = [];\n var modification = 1 / results;\n while (results--) {\n res.push(new TinyColor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n return res;\n };\n TinyColor.prototype.splitcomplement = function () {\n var hsl = this.toHsl();\n var h = hsl.h;\n return [\n this,\n new TinyColor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n new TinyColor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n ];\n };\n /**\n * Compute how the color would appear on a background\n */\n TinyColor.prototype.onBackground = function (background) {\n var fg = this.toRgb();\n var bg = new TinyColor(background).toRgb();\n var alpha = fg.a + bg.a * (1 - fg.a);\n return new TinyColor({\n r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,\n g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,\n b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,\n a: alpha,\n });\n };\n /**\n * Alias for `polyad(3)`\n */\n TinyColor.prototype.triad = function () {\n return this.polyad(3);\n };\n /**\n * Alias for `polyad(4)`\n */\n TinyColor.prototype.tetrad = function () {\n return this.polyad(4);\n };\n /**\n * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n */\n TinyColor.prototype.polyad = function (n) {\n var hsl = this.toHsl();\n var h = hsl.h;\n var result = [this];\n var increment = 360 / n;\n for (var i = 1; i < n; i++) {\n result.push(new TinyColor({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));\n }\n return result;\n };\n /**\n * compare color vs current color\n */\n TinyColor.prototype.equals = function (color) {\n return this.toRgbString() === new TinyColor(color).toRgbString();\n };\n return TinyColor;\n}());\nexport { TinyColor };\n// kept for backwards compatability with v1\nexport function tinycolor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n return new TinyColor(color, opts);\n}\n","import { TinyColor } from './index.js';\n// Readability Functions\n// ---------------------\n// false\n * new TinyColor().isReadable('#000', '#111', { level: 'AA', size: 'large' }) => false\n * ```\n */\nexport function isReadable(color1, color2, wcag2) {\n var _a, _b;\n if (wcag2 === void 0) { wcag2 = { level: 'AA', size: 'small' }; }\n var readabilityLevel = readability(color1, color2);\n switch (((_a = wcag2.level) !== null && _a !== void 0 ? _a : 'AA') + ((_b = wcag2.size) !== null && _b !== void 0 ? _b : 'small')) {\n case 'AAsmall':\n case 'AAAlarge':\n return readabilityLevel >= 4.5;\n case 'AAlarge':\n return readabilityLevel >= 3;\n case 'AAAsmall':\n return readabilityLevel >= 7;\n default:\n return false;\n }\n}\n/**\n * Given a base color and a list of possible foreground or background\n * colors for that base, returns the most readable color.\n * Optionally returns Black or White if the most readable color is unreadable.\n *\n * @param baseColor - the base color.\n * @param colorList - array of colors to pick the most readable one from.\n * @param args - and object with extra arguments\n *\n * Example\n * ```ts\n * new TinyColor().mostReadable('#123', ['#124\", \"#125'], { includeFallbackColors: false }).toHexString(); // \"#112255\"\n * new TinyColor().mostReadable('#123', ['#124\", \"#125'],{ includeFallbackColors: true }).toHexString(); // \"#ffffff\"\n * new TinyColor().mostReadable('#a8015a', [\"#faf3f3\"], { includeFallbackColors:true, level: 'AAA', size: 'large' }).toHexString(); // \"#faf3f3\"\n * new TinyColor().mostReadable('#a8015a', [\"#faf3f3\"], { includeFallbackColors:true, level: 'AAA', size: 'small' }).toHexString(); // \"#ffffff\"\n * ```\n */\nexport function mostReadable(baseColor, colorList, args) {\n if (args === void 0) { args = { includeFallbackColors: false, level: 'AA', size: 'small' }; }\n var bestColor = null;\n var bestScore = 0;\n var includeFallbackColors = args.includeFallbackColors, level = args.level, size = args.size;\n for (var _i = 0, colorList_1 = colorList; _i < colorList_1.length; _i++) {\n var color = colorList_1[_i];\n var score = readability(baseColor, color);\n if (score > bestScore) {\n bestScore = score;\n bestColor = new TinyColor(color);\n }\n }\n if (isReadable(baseColor, bestColor, { level: level, size: size }) || !includeFallbackColors) {\n return bestColor;\n }\n args.includeFallbackColors = false;\n return mostReadable(baseColor, ['#fff', '#000'], args);\n}\n","import { rgbaToArgbHex } from './conversion.js';\nimport { TinyColor } from './index.js';\n/**\n * Returns the color represented as a Microsoft filter for use in old versions of IE.\n */\nexport function toMsFilter(firstColor, secondColor) {\n var color = new TinyColor(firstColor);\n var hex8String = '#' + rgbaToArgbHex(color.r, color.g, color.b, color.a);\n var secondHex8String = hex8String;\n var gradientType = color.gradientType ? 'GradientType = 1, ' : '';\n if (secondColor) {\n var s = new TinyColor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s.r, s.g, s.b, s.a);\n }\n return \"progid:DXImageTransform.Microsoft.gradient(\".concat(gradientType, \"startColorstr=\").concat(hex8String, \",endColorstr=\").concat(secondHex8String, \")\");\n}\n","import { TinyColor } from './index.js';\nimport { convertToPercentage } from './util.js';\n/**\n * If input is an object, force 1 into \"1.0\" to handle ratios properly\n * String input requires \"1.0\" as input, so 1 will be treated as 1\n */\nexport function fromRatio(ratio, opts) {\n var newColor = {\n r: convertToPercentage(ratio.r),\n g: convertToPercentage(ratio.g),\n b: convertToPercentage(ratio.b),\n };\n if (ratio.a !== undefined) {\n newColor.a = Number(ratio.a);\n }\n return new TinyColor(newColor, opts);\n}\n/** old random function */\nexport function legacyRandom() {\n return new TinyColor({\n r: Math.random(),\n g: Math.random(),\n b: Math.random(),\n });\n}\n","/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n// randomColor by David Merfield under the CC0 license\n// https://github.com/davidmerfield/randomColor/\nimport { TinyColor } from './index.js';\nexport function random(options) {\n if (options === void 0) { options = {}; }\n // Check if we need to generate multiple colors\n if (options.count !== undefined &&\n options.count !== null) {\n var totalColors = options.count;\n var colors = [];\n options.count = undefined;\n while (totalColors > colors.length) {\n // Since we're generating multiple colors,\n // incremement the seed. Otherwise we'd just\n // generate the same color each time...\n options.count = null;\n if (options.seed) {\n options.seed += 1;\n }\n colors.push(random(options));\n }\n options.count = totalColors;\n return colors;\n }\n // First we pick a hue (H)\n var h = pickHue(options.hue, options.seed);\n // Then use H to determine saturation (S)\n var s = pickSaturation(h, options);\n // Then use S and H to determine brightness (B).\n var v = pickBrightness(h, s, options);\n var res = { h: h, s: s, v: v };\n if (options.alpha !== undefined) {\n res.a = options.alpha;\n }\n // Then we return the HSB color in the desired format\n return new TinyColor(res);\n}\nfunction pickHue(hue, seed) {\n var hueRange = getHueRange(hue);\n var res = randomWithin(hueRange, seed);\n // Instead of storing red as two seperate ranges,\n // we group them, using negative numbers\n if (res < 0) {\n res = 360 + res;\n }\n return res;\n}\nfunction pickSaturation(hue, options) {\n if (options.hue === 'monochrome') {\n return 0;\n }\n if (options.luminosity === 'random') {\n return randomWithin([0, 100], options.seed);\n }\n var saturationRange = getColorInfo(hue).saturationRange;\n var sMin = saturationRange[0];\n var sMax = saturationRange[1];\n switch (options.luminosity) {\n case 'bright':\n sMin = 55;\n break;\n case 'dark':\n sMin = sMax - 10;\n break;\n case 'light':\n sMax = 55;\n break;\n default:\n break;\n }\n return randomWithin([sMin, sMax], options.seed);\n}\nfunction pickBrightness(H, S, options) {\n var bMin = getMinimumBrightness(H, S);\n var bMax = 100;\n switch (options.luminosity) {\n case 'dark':\n bMax = bMin + 20;\n break;\n case 'light':\n bMin = (bMax + bMin) / 2;\n break;\n case 'random':\n bMin = 0;\n bMax = 100;\n break;\n default:\n break;\n }\n return randomWithin([bMin, bMax], options.seed);\n}\nfunction getMinimumBrightness(H, S) {\n var lowerBounds = getColorInfo(H).lowerBounds;\n for (var i = 0; i < lowerBounds.length - 1; i++) {\n var s1 = lowerBounds[i][0];\n var v1 = lowerBounds[i][1];\n var s2 = lowerBounds[i + 1][0];\n var v2 = lowerBounds[i + 1][1];\n if (S >= s1 && S <= s2) {\n var m = (v2 - v1) / (s2 - s1);\n var b = v1 - m * s1;\n return m * S + b;\n }\n }\n return 0;\n}\nfunction getHueRange(colorInput) {\n var num = parseInt(colorInput, 10);\n if (!Number.isNaN(num) && num < 360 && num > 0) {\n return [num, num];\n }\n if (typeof colorInput === 'string') {\n var namedColor = bounds.find(function (n) { return n.name === colorInput; });\n if (namedColor) {\n var color = defineColor(namedColor);\n if (color.hueRange) {\n return color.hueRange;\n }\n }\n var parsed = new TinyColor(colorInput);\n if (parsed.isValid) {\n var hue = parsed.toHsv().h;\n return [hue, hue];\n }\n }\n return [0, 360];\n}\nfunction getColorInfo(hue) {\n // Maps red colors to make picking hue easier\n if (hue >= 334 && hue <= 360) {\n hue -= 360;\n }\n for (var _i = 0, bounds_1 = bounds; _i < bounds_1.length; _i++) {\n var bound = bounds_1[_i];\n var color = defineColor(bound);\n if (color.hueRange && hue >= color.hueRange[0] && hue <= color.hueRange[1]) {\n return color;\n }\n }\n throw Error('Color not found');\n}\nfunction randomWithin(range, seed) {\n if (seed === undefined) {\n return Math.floor(range[0] + Math.random() * (range[1] + 1 - range[0]));\n }\n // Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/\n var max = range[1] || 1;\n var min = range[0] || 0;\n seed = (seed * 9301 + 49297) % 233280;\n var rnd = seed / 233280.0;\n return Math.floor(min + rnd * (max - min));\n}\nfunction defineColor(bound) {\n var sMin = bound.lowerBounds[0][0];\n var sMax = bound.lowerBounds[bound.lowerBounds.length - 1][0];\n var bMin = bound.lowerBounds[bound.lowerBounds.length - 1][1];\n var bMax = bound.lowerBounds[0][1];\n return {\n name: bound.name,\n hueRange: bound.hueRange,\n lowerBounds: bound.lowerBounds,\n saturationRange: [sMin, sMax],\n brightnessRange: [bMin, bMax],\n };\n}\n/**\n * @hidden\n */\nexport var bounds = [\n {\n name: 'monochrome',\n hueRange: null,\n lowerBounds: [\n [0, 0],\n [100, 0],\n ],\n },\n {\n name: 'red',\n hueRange: [-26, 18],\n lowerBounds: [\n [20, 100],\n [30, 92],\n [40, 89],\n [50, 85],\n [60, 78],\n [70, 70],\n [80, 60],\n [90, 55],\n [100, 50],\n ],\n },\n {\n name: 'orange',\n hueRange: [19, 46],\n lowerBounds: [\n [20, 100],\n [30, 93],\n [40, 88],\n [50, 86],\n [60, 85],\n [70, 70],\n [100, 70],\n ],\n },\n {\n name: 'yellow',\n hueRange: [47, 62],\n lowerBounds: [\n [25, 100],\n [40, 94],\n [50, 89],\n [60, 86],\n [70, 84],\n [80, 82],\n [90, 80],\n [100, 75],\n ],\n },\n {\n name: 'green',\n hueRange: [63, 178],\n lowerBounds: [\n [30, 100],\n [40, 90],\n [50, 85],\n [60, 81],\n [70, 74],\n [80, 64],\n [90, 50],\n [100, 40],\n ],\n },\n {\n name: 'blue',\n hueRange: [179, 257],\n lowerBounds: [\n [20, 100],\n [30, 86],\n [40, 80],\n [50, 74],\n [60, 60],\n [70, 52],\n [80, 44],\n [90, 39],\n [100, 35],\n ],\n },\n {\n name: 'purple',\n hueRange: [258, 282],\n lowerBounds: [\n [20, 100],\n [30, 87],\n [40, 79],\n [50, 70],\n [60, 65],\n [70, 59],\n [80, 52],\n [90, 45],\n [100, 42],\n ],\n },\n {\n name: 'pink',\n hueRange: [283, 334],\n lowerBounds: [\n [20, 100],\n [30, 90],\n [40, 86],\n [60, 84],\n [80, 80],\n [90, 75],\n [100, 73],\n ],\n },\n];\n","import { tinycolor } from './index.js';\nexport * from './index.js';\nexport * from './css-color-names.js';\nexport * from './readability.js';\nexport * from './to-ms-filter.js';\nexport * from './from-ratio.js';\nexport * from './format-input.js';\nexport * from './random.js';\nexport * from './interfaces.js';\nexport * from './conversion.js';\n// kept for backwards compatability with v1\nexport default tinycolor;\n","/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nexport function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * \n * @hidden\n */\nexport function isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nexport function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nexport function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nexport function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nexport function pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\n","export function newMessages() {\n return {\n default: 'Validation error on field %s',\n required: '%s is required',\n enum: '%s must be one of %s',\n whitespace: '%s cannot be empty',\n date: {\n format: '%s date %s is invalid for format %s',\n parse: '%s date could not be parsed, %s is invalid ',\n invalid: '%s date %s is invalid'\n },\n types: {\n string: '%s is not a %s',\n method: '%s is not a %s (function)',\n array: '%s is not an %s',\n object: '%s is not an %s',\n number: '%s is not a %s',\n date: '%s is not a %s',\n boolean: '%s is not a %s',\n integer: '%s is not an %s',\n float: '%s is not a %s',\n regexp: '%s is not a valid %s',\n email: '%s is not a valid %s',\n url: '%s is not a valid %s',\n hex: '%s is not a valid %s'\n },\n string: {\n len: '%s must be exactly %s characters',\n min: '%s must be at least %s characters',\n max: '%s cannot be longer than %s characters',\n range: '%s must be between %s and %s characters'\n },\n number: {\n len: '%s must equal %s',\n min: '%s cannot be less than %s',\n max: '%s cannot be greater than %s',\n range: '%s must be between %s and %s'\n },\n array: {\n len: '%s must be exactly %s in length',\n min: '%s cannot be less than %s in length',\n max: '%s cannot be greater than %s in length',\n range: '%s must be between %s and %s in length'\n },\n pattern: {\n mismatch: '%s value %s does not match pattern %s'\n },\n clone: function clone() {\n var cloned = JSON.parse(JSON.stringify(this));\n cloned.clone = this.clone;\n return cloned;\n }\n };\n}\nexport var messages = newMessages();","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nfunction _wrapNativeSuper(t) {\n var r = \"function\" == typeof Map ? new Map() : void 0;\n return _wrapNativeSuper = function _wrapNativeSuper(t) {\n if (null === t || !isNativeFunction(t)) return t;\n if (\"function\" != typeof t) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== r) {\n if (r.has(t)) return r.get(t);\n r.set(t, Wrapper);\n }\n function Wrapper() {\n return construct(t, arguments, getPrototypeOf(this).constructor);\n }\n return Wrapper.prototype = Object.create(t.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }), setPrototypeOf(Wrapper, t);\n }, _wrapNativeSuper(t);\n}\nexport { _wrapNativeSuper as default };","function _isNativeFunction(t) {\n try {\n return -1 !== Function.toString.call(t).indexOf(\"[native code]\");\n } catch (n) {\n return \"function\" == typeof t;\n }\n}\nexport { _isNativeFunction as default };","import isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}\nexport { _construct as default };","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\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 _wrapNativeSuper from \"@babel/runtime/helpers/esm/wrapNativeSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\n/* eslint no-console:0 */\n\nvar formatRegExp = /%[sdj%]/g;\nexport var warning = function warning() {};\n\n// don't print warning message when in production env or node runtime\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {\n warning = function warning(type, errors) {\n if (typeof console !== 'undefined' && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined') {\n if (errors.every(function (e) {\n return typeof e === 'string';\n })) {\n console.warn(type, errors);\n }\n }\n };\n}\nexport function convertFieldsError(errors) {\n if (!errors || !errors.length) return null;\n var fields = {};\n errors.forEach(function (error) {\n var field = error.field;\n fields[field] = fields[field] || [];\n fields[field].push(error);\n });\n return fields;\n}\nexport function format(template) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n var i = 0;\n var len = args.length;\n if (typeof template === 'function') {\n // eslint-disable-next-line prefer-spread\n return template.apply(null, args);\n }\n if (typeof template === 'string') {\n var str = template.replace(formatRegExp, function (x) {\n if (x === '%%') {\n return '%';\n }\n if (i >= len) {\n return x;\n }\n switch (x) {\n case '%s':\n return String(args[i++]);\n case '%d':\n return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n break;\n default:\n return x;\n }\n });\n return str;\n }\n return template;\n}\nfunction isNativeStringType(type) {\n return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';\n}\nexport function isEmptyValue(value, type) {\n if (value === undefined || value === null) {\n return true;\n }\n if (type === 'array' && Array.isArray(value) && !value.length) {\n return true;\n }\n if (isNativeStringType(type) && typeof value === 'string' && !value) {\n return true;\n }\n return false;\n}\nexport function isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction asyncParallelArray(arr, func, callback) {\n var results = [];\n var total = 0;\n var arrLength = arr.length;\n function count(errors) {\n results.push.apply(results, _toConsumableArray(errors || []));\n total++;\n if (total === arrLength) {\n callback(results);\n }\n }\n arr.forEach(function (a) {\n func(a, count);\n });\n}\nfunction asyncSerialArray(arr, func, callback) {\n var index = 0;\n var arrLength = arr.length;\n function next(errors) {\n if (errors && errors.length) {\n callback(errors);\n return;\n }\n var original = index;\n index = index + 1;\n if (original < arrLength) {\n func(arr[original], next);\n } else {\n callback([]);\n }\n }\n next([]);\n}\nfunction flattenObjArr(objArr) {\n var ret = [];\n Object.keys(objArr).forEach(function (k) {\n ret.push.apply(ret, _toConsumableArray(objArr[k] || []));\n });\n return ret;\n}\nexport var AsyncValidationError = /*#__PURE__*/function (_Error) {\n _inherits(AsyncValidationError, _Error);\n var _super = _createSuper(AsyncValidationError);\n function AsyncValidationError(errors, fields) {\n var _this;\n _classCallCheck(this, AsyncValidationError);\n _this = _super.call(this, 'Async Validation Error');\n _defineProperty(_assertThisInitialized(_this), \"errors\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"fields\", void 0);\n _this.errors = errors;\n _this.fields = fields;\n return _this;\n }\n return _createClass(AsyncValidationError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\nexport function asyncMap(objArr, option, func, callback, source) {\n if (option.first) {\n var _pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n callback(errors);\n return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);\n };\n var flattenArr = flattenObjArr(objArr);\n asyncSerialArray(flattenArr, func, next);\n });\n _pending.catch(function (e) {\n return e;\n });\n return _pending;\n }\n var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];\n var objArrKeys = Object.keys(objArr);\n var objArrLength = objArrKeys.length;\n var total = 0;\n var results = [];\n var pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n // eslint-disable-next-line prefer-spread\n results.push.apply(results, errors);\n total++;\n if (total === objArrLength) {\n callback(results);\n return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);\n }\n };\n if (!objArrKeys.length) {\n callback(results);\n resolve(source);\n }\n objArrKeys.forEach(function (key) {\n var arr = objArr[key];\n if (firstFields.indexOf(key) !== -1) {\n asyncSerialArray(arr, func, next);\n } else {\n asyncParallelArray(arr, func, next);\n }\n });\n });\n pending.catch(function (e) {\n return e;\n });\n return pending;\n}\nfunction isErrorObj(obj) {\n return !!(obj && obj.message !== undefined);\n}\nfunction getValue(value, path) {\n var v = value;\n for (var i = 0; i < path.length; i++) {\n if (v == undefined) {\n return v;\n }\n v = v[path[i]];\n }\n return v;\n}\nexport function complementError(rule, source) {\n return function (oe) {\n var fieldValue;\n if (rule.fullFields) {\n fieldValue = getValue(source, rule.fullFields);\n } else {\n fieldValue = source[oe.field || rule.fullField];\n }\n if (isErrorObj(oe)) {\n oe.field = oe.field || rule.fullField;\n oe.fieldValue = fieldValue;\n return oe;\n }\n return {\n message: typeof oe === 'function' ? oe() : oe,\n fieldValue: fieldValue,\n field: oe.field || rule.fullField\n };\n };\n}\nexport function deepMerge(target, source) {\n if (source) {\n for (var s in source) {\n if (source.hasOwnProperty(s)) {\n var value = source[s];\n if (_typeof(value) === 'object' && _typeof(target[s]) === 'object') {\n target[s] = _objectSpread(_objectSpread({}, target[s]), value);\n } else {\n target[s] = value;\n }\n }\n }\n }\n return target;\n}","import { format } from \"../util\";\nvar ENUM = 'enum';\nvar enumerable = function enumerable(rule, value, source, errors, options) {\n rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];\n if (rule[ENUM].indexOf(value) === -1) {\n errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));\n }\n};\nexport default enumerable;","import { format, isEmptyValue } from \"../util\";\nvar required = function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {\n errors.push(format(options.messages.required, rule.fullField));\n }\n};\nexport default required;","// https://github.com/kevva/url-regex/blob/master/index.js\nvar urlReg;\nexport default (function () {\n if (urlReg) {\n return urlReg;\n }\n var word = '[a-fA-F\\\\d:]';\n var b = function b(options) {\n return options && options.includeBoundaries ? \"(?:(?<=\\\\s|^)(?=\".concat(word, \")|(?<=\").concat(word, \")(?=\\\\s|$))\") : '';\n };\n var v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n var v6seg = '[a-fA-F\\\\d]{1,4}';\n var v6List = [\"(?:\".concat(v6seg, \":){7}(?:\").concat(v6seg, \"|:)\"), // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n \"(?:\".concat(v6seg, \":){6}(?:\").concat(v4, \"|:\").concat(v6seg, \"|:)\"), // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::\n \"(?:\".concat(v6seg, \":){5}(?::\").concat(v4, \"|(?::\").concat(v6seg, \"){1,2}|:)\"), // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::\n \"(?:\".concat(v6seg, \":){4}(?:(?::\").concat(v6seg, \"){0,1}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,3}|:)\"), // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::\n \"(?:\".concat(v6seg, \":){3}(?:(?::\").concat(v6seg, \"){0,2}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,4}|:)\"), // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::\n \"(?:\".concat(v6seg, \":){2}(?:(?::\").concat(v6seg, \"){0,3}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,5}|:)\"), // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::\n \"(?:\".concat(v6seg, \":){1}(?:(?::\").concat(v6seg, \"){0,4}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,6}|:)\"), // 1:: 1::3:4:5:6:7:8 1::8 1::\n \"(?::(?:(?::\".concat(v6seg, \"){0,5}:\").concat(v4, \"|(?::\").concat(v6seg, \"){1,7}|:))\") // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::\n ];\n var v6Eth0 = \"(?:%[0-9a-zA-Z]{1,})?\"; // %eth0 %1\n\n var v6 = \"(?:\".concat(v6List.join('|'), \")\").concat(v6Eth0);\n\n // Pre-compile only the exact regexes because adding a global flag make regexes stateful\n var v46Exact = new RegExp(\"(?:^\".concat(v4, \"$)|(?:^\").concat(v6, \"$)\"));\n var v4exact = new RegExp(\"^\".concat(v4, \"$\"));\n var v6exact = new RegExp(\"^\".concat(v6, \"$\"));\n var ip = function ip(options) {\n return options && options.exact ? v46Exact : new RegExp(\"(?:\".concat(b(options)).concat(v4).concat(b(options), \")|(?:\").concat(b(options)).concat(v6).concat(b(options), \")\"), 'g');\n };\n ip.v4 = function (options) {\n return options && options.exact ? v4exact : new RegExp(\"\".concat(b(options)).concat(v4).concat(b(options)), 'g');\n };\n ip.v6 = function (options) {\n return options && options.exact ? v6exact : new RegExp(\"\".concat(b(options)).concat(v6).concat(b(options)), 'g');\n };\n var protocol = \"(?:(?:[a-z]+:)?//)\";\n var auth = '(?:\\\\S+(?::\\\\S*)?@)?';\n var ipv4 = ip.v4().source;\n var ipv6 = ip.v6().source;\n var host = \"(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)\";\n var domain = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*\";\n var tld = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))\";\n var port = '(?::\\\\d{2,5})?';\n var path = '(?:[/?#][^\\\\s\"]*)?';\n var regex = \"(?:\".concat(protocol, \"|www\\\\.)\").concat(auth, \"(?:localhost|\").concat(ipv4, \"|\").concat(ipv6, \"|\").concat(host).concat(domain).concat(tld, \")\").concat(port).concat(path);\n urlReg = new RegExp(\"(?:^\".concat(regex, \"$)\"), 'i');\n return urlReg;\n});","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { format } from \"../util\";\nimport required from \"./required\";\nimport getUrlRegex from \"./url\";\n/* eslint max-len:0 */\n\nvar pattern = {\n // http://emailregex.com/\n email: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+\\.)+[a-zA-Z\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}))$/,\n // url: new RegExp(\n // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\\\S+(?::\\\\S*)?@)?(?:(?:(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[0-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,})))|localhost)(?::\\\\d{2,5})?(?:(/|\\\\?|#)[^\\\\s]*)?$',\n // 'i',\n // ),\n hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i\n};\nvar types = {\n integer: function integer(value) {\n return types.number(value) && parseInt(value, 10) === value;\n },\n float: function float(value) {\n return types.number(value) && !types.integer(value);\n },\n array: function array(value) {\n return Array.isArray(value);\n },\n regexp: function regexp(value) {\n if (value instanceof RegExp) {\n return true;\n }\n try {\n return !!new RegExp(value);\n } catch (e) {\n return false;\n }\n },\n date: function date(value) {\n return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime());\n },\n number: function number(value) {\n if (isNaN(value)) {\n return false;\n }\n return typeof value === 'number';\n },\n object: function object(value) {\n return _typeof(value) === 'object' && !types.array(value);\n },\n method: function method(value) {\n return typeof value === 'function';\n },\n email: function email(value) {\n return typeof value === 'string' && value.length <= 320 && !!value.match(pattern.email);\n },\n url: function url(value) {\n return typeof value === 'string' && value.length <= 2048 && !!value.match(getUrlRegex());\n },\n hex: function hex(value) {\n return typeof value === 'string' && !!value.match(pattern.hex);\n }\n};\nvar type = function type(rule, value, source, errors, options) {\n if (rule.required && value === undefined) {\n required(rule, value, source, errors, options);\n return;\n }\n var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];\n var ruleType = rule.type;\n if (custom.indexOf(ruleType) > -1) {\n if (!types[ruleType](value)) {\n errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));\n }\n // straight typeof check\n } else if (ruleType && _typeof(value) !== rule.type) {\n errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));\n }\n};\nexport default type;","import { format } from \"../util\";\n\n/**\n * Rule for validating whitespace.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nvar whitespace = function whitespace(rule, value, source, errors, options) {\n if (/^\\s+$/.test(value) || value === '') {\n errors.push(format(options.messages.whitespace, rule.fullField));\n }\n};\nexport default whitespace;","import enumRule from \"./enum\";\nimport pattern from \"./pattern\";\nimport range from \"./range\";\nimport required from \"./required\";\nimport type from \"./type\";\nimport whitespace from \"./whitespace\";\nexport default {\n required: required,\n whitespace: whitespace,\n type: type,\n range: range,\n enum: enumRule,\n pattern: pattern\n};","import { format } from \"../util\";\nvar range = function range(rule, value, source, errors, options) {\n var len = typeof rule.len === 'number';\n var min = typeof rule.min === 'number';\n var max = typeof rule.max === 'number';\n // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)\n var spRegexp = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n var val = value;\n var key = null;\n var num = typeof value === 'number';\n var str = typeof value === 'string';\n var arr = Array.isArray(value);\n if (num) {\n key = 'number';\n } else if (str) {\n key = 'string';\n } else if (arr) {\n key = 'array';\n }\n // if the value is not of a supported type for range validation\n // the validation rule rule should use the\n // type property to also test for a particular type\n if (!key) {\n return false;\n }\n if (arr) {\n val = value.length;\n }\n if (str) {\n // 处理码点大于U+010000的文字length属性不准确的bug,如\"𠮷𠮷𠮷\".length !== 3\n val = value.replace(spRegexp, '_').length;\n }\n if (len) {\n if (val !== rule.len) {\n errors.push(format(options.messages[key].len, rule.fullField, rule.len));\n }\n } else if (min && !max && val < rule.min) {\n errors.push(format(options.messages[key].min, rule.fullField, rule.min));\n } else if (max && !min && val > rule.max) {\n errors.push(format(options.messages[key].max, rule.fullField, rule.max));\n } else if (min && max && (val < rule.min || val > rule.max)) {\n errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));\n }\n};\nexport default range;","import { format } from \"../util\";\nvar pattern = function pattern(rule, value, source, errors, options) {\n if (rule.pattern) {\n if (rule.pattern instanceof RegExp) {\n // if a RegExp instance is passed, reset `lastIndex` in case its `global`\n // flag is accidentally set to `true`, which in a validation scenario\n // is not necessary and the result might be misleading\n rule.pattern.lastIndex = 0;\n if (!rule.pattern.test(value)) {\n errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n }\n } else if (typeof rule.pattern === 'string') {\n var _pattern = new RegExp(rule.pattern);\n if (!_pattern.test(value)) {\n errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n }\n }\n }\n};\nexport default pattern;","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport rules from \"../rule\";\nvar required = function required(rule, value, callback, source, options) {\n var errors = [];\n var type = Array.isArray(value) ? 'array' : _typeof(value);\n rules.required(rule, value, source, errors, options, type);\n callback(errors);\n};\nexport default required;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar type = function type(rule, value, callback, source, options) {\n var ruleType = rule.type;\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value, ruleType) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, ruleType);\n if (!isEmptyValue(value, ruleType)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default type;","import any from \"./any\";\nimport array from \"./array\";\nimport boolean from \"./boolean\";\nimport date from \"./date\";\nimport enumValidator from \"./enum\";\nimport float from \"./float\";\nimport integer from \"./integer\";\nimport method from \"./method\";\nimport number from \"./number\";\nimport object from \"./object\";\nimport pattern from \"./pattern\";\nimport regexp from \"./regexp\";\nimport required from \"./required\";\nimport string from \"./string\";\nimport type from \"./type\";\nexport default {\n string: string,\n method: method,\n number: number,\n boolean: boolean,\n regexp: regexp,\n integer: integer,\n float: float,\n array: array,\n object: object,\n enum: enumValidator,\n pattern: pattern,\n date: date,\n url: type,\n hex: type,\n email: type,\n required: required,\n any: any\n};","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar string = function string(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, 'string');\n if (!isEmptyValue(value, 'string')) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n rules.pattern(rule, value, source, errors, options);\n if (rule.whitespace === true) {\n rules.whitespace(rule, value, source, errors, options);\n }\n }\n }\n callback(errors);\n};\nexport default string;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar method = function method(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default method;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar number = function number(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (value === '') {\n // eslint-disable-next-line no-param-reassign\n value = undefined;\n }\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default number;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar boolean = function boolean(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default boolean;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar regexp = function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default regexp;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar integer = function integer(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default integer;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar floatFn = function floatFn(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default floatFn;","import rules from \"../rule/index\";\nvar array = function array(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((value === undefined || value === null) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, 'array');\n if (value !== undefined && value !== null) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default array;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar object = function object(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default object;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar ENUM = 'enum';\nvar enumerable = function enumerable(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules[ENUM](rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default enumerable;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar pattern = function pattern(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value, 'string')) {\n rules.pattern(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\nexport default pattern;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar date = function date(rule, value, callback, source, options) {\n // console.log('integer rule called %j', rule);\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n // console.log('validate on %s value', value);\n if (validate) {\n if (isEmptyValue(value, 'date') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value, 'date')) {\n var dateObject;\n if (value instanceof Date) {\n dateObject = value;\n } else {\n dateObject = new Date(value);\n }\n rules.type(rule, dateObject, source, errors, options);\n if (dateObject) {\n rules.range(rule, dateObject.getTime(), source, errors, options);\n }\n }\n }\n callback(errors);\n};\nexport default date;","import rules from \"../rule\";\nimport { isEmptyValue } from \"../util\";\nvar any = function any(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n }\n callback(errors);\n};\nexport default any;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { messages as defaultMessages, newMessages } from \"./messages\";\nimport { asyncMap, complementError, convertFieldsError, deepMerge, format, warning } from \"./util\";\nimport validators from \"./validator/index\";\nexport * from \"./interface\";\n\n/**\n * Encapsulates a validation schema.\n *\n * @param descriptor An object declaring validation rules\n * for this schema.\n */\nvar Schema = /*#__PURE__*/function () {\n function Schema(descriptor) {\n _classCallCheck(this, Schema);\n // ======================== Instance ========================\n _defineProperty(this, \"rules\", null);\n _defineProperty(this, \"_messages\", defaultMessages);\n this.define(descriptor);\n }\n _createClass(Schema, [{\n key: \"define\",\n value: function define(rules) {\n var _this = this;\n if (!rules) {\n throw new Error('Cannot configure a schema with no rules');\n }\n if (_typeof(rules) !== 'object' || Array.isArray(rules)) {\n throw new Error('Rules must be an object');\n }\n this.rules = {};\n Object.keys(rules).forEach(function (name) {\n var item = rules[name];\n _this.rules[name] = Array.isArray(item) ? item : [item];\n });\n }\n }, {\n key: \"messages\",\n value: function messages(_messages) {\n if (_messages) {\n this._messages = deepMerge(newMessages(), _messages);\n }\n return this._messages;\n }\n }, {\n key: \"validate\",\n value: function validate(source_) {\n var _this2 = this;\n var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var oc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n var source = source_;\n var options = o;\n var callback = oc;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (!this.rules || Object.keys(this.rules).length === 0) {\n if (callback) {\n callback(null, source);\n }\n return Promise.resolve(source);\n }\n function complete(results) {\n var errors = [];\n var fields = {};\n function add(e) {\n if (Array.isArray(e)) {\n var _errors;\n errors = (_errors = errors).concat.apply(_errors, _toConsumableArray(e));\n } else {\n errors.push(e);\n }\n }\n for (var i = 0; i < results.length; i++) {\n add(results[i]);\n }\n if (!errors.length) {\n callback(null, source);\n } else {\n fields = convertFieldsError(errors);\n callback(errors, fields);\n }\n }\n if (options.messages) {\n var messages = this.messages();\n if (messages === defaultMessages) {\n messages = newMessages();\n }\n deepMerge(messages, options.messages);\n options.messages = messages;\n } else {\n options.messages = this.messages();\n }\n var series = {};\n var keys = options.keys || Object.keys(this.rules);\n keys.forEach(function (z) {\n var arr = _this2.rules[z];\n var value = source[z];\n arr.forEach(function (r) {\n var rule = r;\n if (typeof rule.transform === 'function') {\n if (source === source_) {\n source = _objectSpread({}, source);\n }\n value = source[z] = rule.transform(value);\n if (value !== undefined && value !== null) {\n rule.type = rule.type || (Array.isArray(value) ? 'array' : _typeof(value));\n }\n }\n if (typeof rule === 'function') {\n rule = {\n validator: rule\n };\n } else {\n rule = _objectSpread({}, rule);\n }\n\n // Fill validator. Skip if nothing need to validate\n rule.validator = _this2.getValidationMethod(rule);\n if (!rule.validator) {\n return;\n }\n rule.field = z;\n rule.fullField = rule.fullField || z;\n rule.type = _this2.getType(rule);\n series[z] = series[z] || [];\n series[z].push({\n rule: rule,\n value: value,\n source: source,\n field: z\n });\n });\n });\n var errorFields = {};\n return asyncMap(series, options, function (data, doIt) {\n var rule = data.rule;\n var deep = (rule.type === 'object' || rule.type === 'array') && (_typeof(rule.fields) === 'object' || _typeof(rule.defaultField) === 'object');\n deep = deep && (rule.required || !rule.required && data.value);\n rule.field = data.field;\n function addFullField(key, schema) {\n return _objectSpread(_objectSpread({}, schema), {}, {\n fullField: \"\".concat(rule.fullField, \".\").concat(key),\n fullFields: rule.fullFields ? [].concat(_toConsumableArray(rule.fullFields), [key]) : [key]\n });\n }\n function cb() {\n var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var errorList = Array.isArray(e) ? e : [e];\n if (!options.suppressWarning && errorList.length) {\n Schema.warning('async-validator:', errorList);\n }\n if (errorList.length && rule.message !== undefined) {\n errorList = [].concat(rule.message);\n }\n\n // Fill error info\n var filledErrors = errorList.map(complementError(rule, source));\n if (options.first && filledErrors.length) {\n errorFields[rule.field] = 1;\n return doIt(filledErrors);\n }\n if (!deep) {\n doIt(filledErrors);\n } else {\n // if rule is required but the target object\n // does not exist fail at the rule level and don't\n // go deeper\n if (rule.required && !data.value) {\n if (rule.message !== undefined) {\n filledErrors = [].concat(rule.message).map(complementError(rule, source));\n } else if (options.error) {\n filledErrors = [options.error(rule, format(options.messages.required, rule.field))];\n }\n return doIt(filledErrors);\n }\n var fieldsSchema = {};\n if (rule.defaultField) {\n Object.keys(data.value).map(function (key) {\n fieldsSchema[key] = rule.defaultField;\n });\n }\n fieldsSchema = _objectSpread(_objectSpread({}, fieldsSchema), data.rule.fields);\n var paredFieldsSchema = {};\n Object.keys(fieldsSchema).forEach(function (field) {\n var fieldSchema = fieldsSchema[field];\n var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];\n paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));\n });\n var schema = new Schema(paredFieldsSchema);\n schema.messages(options.messages);\n if (data.rule.options) {\n data.rule.options.messages = options.messages;\n data.rule.options.error = options.error;\n }\n schema.validate(data.value, data.rule.options || options, function (errs) {\n var finalErrors = [];\n if (filledErrors && filledErrors.length) {\n finalErrors.push.apply(finalErrors, _toConsumableArray(filledErrors));\n }\n if (errs && errs.length) {\n finalErrors.push.apply(finalErrors, _toConsumableArray(errs));\n }\n doIt(finalErrors.length ? finalErrors : null);\n });\n }\n }\n var res;\n if (rule.asyncValidator) {\n res = rule.asyncValidator(rule, data.value, cb, data.source, options);\n } else if (rule.validator) {\n try {\n res = rule.validator(rule, data.value, cb, data.source, options);\n } catch (error) {\n var _console$error, _console;\n (_console$error = (_console = console).error) === null || _console$error === void 0 || _console$error.call(_console, error);\n // rethrow to report error\n if (!options.suppressValidatorError) {\n setTimeout(function () {\n throw error;\n }, 0);\n }\n cb(error.message);\n }\n if (res === true) {\n cb();\n } else if (res === false) {\n cb(typeof rule.message === 'function' ? rule.message(rule.fullField || rule.field) : rule.message || \"\".concat(rule.fullField || rule.field, \" fails\"));\n } else if (res instanceof Array) {\n cb(res);\n } else if (res instanceof Error) {\n cb(res.message);\n }\n }\n if (res && res.then) {\n res.then(function () {\n return cb();\n }, function (e) {\n return cb(e);\n });\n }\n }, function (results) {\n complete(results);\n }, source);\n }\n }, {\n key: \"getType\",\n value: function getType(rule) {\n if (rule.type === undefined && rule.pattern instanceof RegExp) {\n rule.type = 'pattern';\n }\n if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {\n throw new Error(format('Unknown rule type %s', rule.type));\n }\n return rule.type || 'string';\n }\n }, {\n key: \"getValidationMethod\",\n value: function getValidationMethod(rule) {\n if (typeof rule.validator === 'function') {\n return rule.validator;\n }\n var keys = Object.keys(rule);\n var messageIndex = keys.indexOf('message');\n if (messageIndex !== -1) {\n keys.splice(messageIndex, 1);\n }\n if (keys.length === 1 && keys[0] === 'required') {\n return validators.required;\n }\n return validators[this.getType(rule)] || undefined;\n }\n }]);\n return Schema;\n}();\n// ========================= Static =========================\n_defineProperty(Schema, \"register\", function register(type, validator) {\n if (typeof validator !== 'function') {\n throw new Error('Cannot register a validator by type, validator is not a function');\n }\n validators[type] = validator;\n});\n_defineProperty(Schema, \"warning\", warning);\n_defineProperty(Schema, \"messages\", defaultMessages);\n_defineProperty(Schema, \"validators\", validators);\nexport default Schema;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nconst round = Math.round;\n\n/**\n * Support format, alpha unit will check the % mark:\n * - rgba(102, 204, 255, .5) -> [102, 204, 255, 0.5]\n * - rgb(102 204 255 / .5) -> [102, 204, 255, 0.5]\n * - rgb(100%, 50%, 0% / 50%) -> [255, 128, 0, 0.5]\n * - hsl(270, 60, 40, .5) -> [270, 60, 40, 0.5]\n * - hsl(270deg 60% 40% / 50%) -> [270, 60, 40, 0.5]\n *\n * When `base` is provided, the percentage value will be divided by `base`.\n */\nfunction splitColorStr(str, parseNum) {\n const match = str\n // Remove str before `(`\n .replace(/^[^(]*\\((.*)/, '$1')\n // Remove str after `)`\n .replace(/\\).*/, '').match(/\\d*\\.?\\d+%?/g) || [];\n const numList = match.map(item => parseFloat(item));\n for (let i = 0; i < 3; i += 1) {\n numList[i] = parseNum(numList[i] || 0, match[i] || '', i);\n }\n\n // For alpha. 50% should be 0.5\n if (match[3]) {\n numList[3] = match[3].includes('%') ? numList[3] / 100 : numList[3];\n } else {\n // By default, alpha is 1\n numList[3] = 1;\n }\n return numList;\n}\nconst parseHSVorHSL = (num, _, index) => index === 0 ? num : num / 100;\n\n/** round and limit number to integer between 0-255 */\nfunction limitRange(value, max) {\n const mergedMax = max || 255;\n if (value > mergedMax) {\n return mergedMax;\n }\n if (value < 0) {\n return 0;\n }\n return value;\n}\nexport class FastColor {\n constructor(input) {\n /**\n * All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.\n */\n _defineProperty(this, \"isValid\", true);\n /**\n * Red, R in RGB\n */\n _defineProperty(this, \"r\", 0);\n /**\n * Green, G in RGB\n */\n _defineProperty(this, \"g\", 0);\n /**\n * Blue, B in RGB\n */\n _defineProperty(this, \"b\", 0);\n /**\n * Alpha/Opacity, A in RGBA/HSLA\n */\n _defineProperty(this, \"a\", 1);\n // HSV privates\n _defineProperty(this, \"_h\", void 0);\n _defineProperty(this, \"_s\", void 0);\n _defineProperty(this, \"_l\", void 0);\n _defineProperty(this, \"_v\", void 0);\n // intermediate variables to calculate HSL/HSV\n _defineProperty(this, \"_max\", void 0);\n _defineProperty(this, \"_min\", void 0);\n _defineProperty(this, \"_brightness\", void 0);\n /**\n * Always check 3 char in the object to determine the format.\n * We not use function in check to save bundle size.\n * e.g. 'rgb' -> { r: 0, g: 0, b: 0 }.\n */\n function matchFormat(str) {\n return str[0] in input && str[1] in input && str[2] in input;\n }\n if (!input) {\n // Do nothing since already initialized\n } else if (typeof input === 'string') {\n const trimStr = input.trim();\n function matchPrefix(prefix) {\n return trimStr.startsWith(prefix);\n }\n if (/^#?[A-F\\d]{3,8}$/i.test(trimStr)) {\n this.fromHexString(trimStr);\n } else if (matchPrefix('rgb')) {\n this.fromRgbString(trimStr);\n } else if (matchPrefix('hsl')) {\n this.fromHslString(trimStr);\n } else if (matchPrefix('hsv') || matchPrefix('hsb')) {\n this.fromHsvString(trimStr);\n }\n } else if (input instanceof FastColor) {\n this.r = input.r;\n this.g = input.g;\n this.b = input.b;\n this.a = input.a;\n this._h = input._h;\n this._s = input._s;\n this._l = input._l;\n this._v = input._v;\n } else if (matchFormat('rgb')) {\n this.r = limitRange(input.r);\n this.g = limitRange(input.g);\n this.b = limitRange(input.b);\n this.a = typeof input.a === 'number' ? limitRange(input.a, 1) : 1;\n } else if (matchFormat('hsl')) {\n this.fromHsl(input);\n } else if (matchFormat('hsv')) {\n this.fromHsv(input);\n } else {\n throw new Error('@ant-design/fast-color: unsupported input ' + JSON.stringify(input));\n }\n }\n\n // ======================= Setter =======================\n\n setR(value) {\n return this._sc('r', value);\n }\n setG(value) {\n return this._sc('g', value);\n }\n setB(value) {\n return this._sc('b', value);\n }\n setA(value) {\n return this._sc('a', value, 1);\n }\n setHue(value) {\n const hsv = this.toHsv();\n hsv.h = value;\n return this._c(hsv);\n }\n\n // ======================= Getter =======================\n /**\n * Returns the perceived luminance of a color, from 0-1.\n * @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n */\n getLuminance() {\n function adjustGamma(raw) {\n const val = raw / 255;\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }\n const R = adjustGamma(this.r);\n const G = adjustGamma(this.g);\n const B = adjustGamma(this.b);\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n }\n getHue() {\n if (typeof this._h === 'undefined') {\n const delta = this.getMax() - this.getMin();\n if (delta === 0) {\n this._h = 0;\n } else {\n this._h = round(60 * (this.r === this.getMax() ? (this.g - this.b) / delta + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / delta + 2 : (this.r - this.g) / delta + 4));\n }\n }\n return this._h;\n }\n getSaturation() {\n if (typeof this._s === 'undefined') {\n const delta = this.getMax() - this.getMin();\n if (delta === 0) {\n this._s = 0;\n } else {\n this._s = delta / this.getMax();\n }\n }\n return this._s;\n }\n getLightness() {\n if (typeof this._l === 'undefined') {\n this._l = (this.getMax() + this.getMin()) / 510;\n }\n return this._l;\n }\n getValue() {\n if (typeof this._v === 'undefined') {\n this._v = this.getMax() / 255;\n }\n return this._v;\n }\n\n /**\n * Returns the perceived brightness of the color, from 0-255.\n * Note: this is not the b of HSB\n * @see http://www.w3.org/TR/AERT#color-contrast\n */\n getBrightness() {\n if (typeof this._brightness === 'undefined') {\n this._brightness = (this.r * 299 + this.g * 587 + this.b * 114) / 1000;\n }\n return this._brightness;\n }\n\n // ======================== Func ========================\n\n darken(amount = 10) {\n const h = this.getHue();\n const s = this.getSaturation();\n let l = this.getLightness() - amount / 100;\n if (l < 0) {\n l = 0;\n }\n return this._c({\n h,\n s,\n l,\n a: this.a\n });\n }\n lighten(amount = 10) {\n const h = this.getHue();\n const s = this.getSaturation();\n let l = this.getLightness() + amount / 100;\n if (l > 1) {\n l = 1;\n }\n return this._c({\n h,\n s,\n l,\n a: this.a\n });\n }\n\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n mix(input, amount = 50) {\n const color = this._c(input);\n const p = amount / 100;\n const calc = key => (color[key] - this[key]) * p + this[key];\n const rgba = {\n r: round(calc('r')),\n g: round(calc('g')),\n b: round(calc('b')),\n a: round(calc('a') * 100) / 100\n };\n return this._c(rgba);\n }\n\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n */\n tint(amount = 10) {\n return this.mix({\n r: 255,\n g: 255,\n b: 255,\n a: 1\n }, amount);\n }\n\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n */\n shade(amount = 10) {\n return this.mix({\n r: 0,\n g: 0,\n b: 0,\n a: 1\n }, amount);\n }\n onBackground(background) {\n const bg = this._c(background);\n const alpha = this.a + bg.a * (1 - this.a);\n const calc = key => {\n return round((this[key] * this.a + bg[key] * bg.a * (1 - this.a)) / alpha);\n };\n return this._c({\n r: calc('r'),\n g: calc('g'),\n b: calc('b'),\n a: alpha\n });\n }\n\n // ======================= Status =======================\n isDark() {\n return this.getBrightness() < 128;\n }\n isLight() {\n return this.getBrightness() >= 128;\n }\n\n // ======================== MISC ========================\n equals(other) {\n return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;\n }\n clone() {\n return this._c(this);\n }\n\n // ======================= Format =======================\n toHexString() {\n let hex = '#';\n const rHex = (this.r || 0).toString(16);\n hex += rHex.length === 2 ? rHex : '0' + rHex;\n const gHex = (this.g || 0).toString(16);\n hex += gHex.length === 2 ? gHex : '0' + gHex;\n const bHex = (this.b || 0).toString(16);\n hex += bHex.length === 2 ? bHex : '0' + bHex;\n if (typeof this.a === 'number' && this.a >= 0 && this.a < 1) {\n const aHex = round(this.a * 255).toString(16);\n hex += aHex.length === 2 ? aHex : '0' + aHex;\n }\n return hex;\n }\n\n /** CSS support color pattern */\n toHsl() {\n return {\n h: this.getHue(),\n s: this.getSaturation(),\n l: this.getLightness(),\n a: this.a\n };\n }\n\n /** CSS support color pattern */\n toHslString() {\n const h = this.getHue();\n const s = round(this.getSaturation() * 100);\n const l = round(this.getLightness() * 100);\n return this.a !== 1 ? `hsla(${h},${s}%,${l}%,${this.a})` : `hsl(${h},${s}%,${l}%)`;\n }\n\n /** Same as toHsb */\n toHsv() {\n return {\n h: this.getHue(),\n s: this.getSaturation(),\n v: this.getValue(),\n a: this.a\n };\n }\n toRgb() {\n return {\n r: this.r,\n g: this.g,\n b: this.b,\n a: this.a\n };\n }\n toRgbString() {\n return this.a !== 1 ? `rgba(${this.r},${this.g},${this.b},${this.a})` : `rgb(${this.r},${this.g},${this.b})`;\n }\n toString() {\n return this.toRgbString();\n }\n\n // ====================== Privates ======================\n /** Return a new FastColor object with one channel changed */\n _sc(rgb, value, max) {\n const clone = this.clone();\n clone[rgb] = limitRange(value, max);\n return clone;\n }\n _c(input) {\n return new this.constructor(input);\n }\n getMax() {\n if (typeof this._max === 'undefined') {\n this._max = Math.max(this.r, this.g, this.b);\n }\n return this._max;\n }\n getMin() {\n if (typeof this._min === 'undefined') {\n this._min = Math.min(this.r, this.g, this.b);\n }\n return this._min;\n }\n fromHexString(trimStr) {\n const withoutPrefix = trimStr.replace('#', '');\n function connectNum(index1, index2) {\n return parseInt(withoutPrefix[index1] + withoutPrefix[index2 || index1], 16);\n }\n if (withoutPrefix.length < 6) {\n // #rgb or #rgba\n this.r = connectNum(0);\n this.g = connectNum(1);\n this.b = connectNum(2);\n this.a = withoutPrefix[3] ? connectNum(3) / 255 : 1;\n } else {\n // #rrggbb or #rrggbbaa\n this.r = connectNum(0, 1);\n this.g = connectNum(2, 3);\n this.b = connectNum(4, 5);\n this.a = withoutPrefix[6] ? connectNum(6, 7) / 255 : 1;\n }\n }\n fromHsl({\n h,\n s,\n l,\n a\n }) {\n this._h = h % 360;\n this._s = s;\n this._l = l;\n this.a = typeof a === 'number' ? a : 1;\n if (s <= 0) {\n const rgb = round(l * 255);\n this.r = rgb;\n this.g = rgb;\n this.b = rgb;\n }\n let r = 0,\n g = 0,\n b = 0;\n const huePrime = h / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * s;\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n if (huePrime >= 0 && huePrime < 1) {\n r = chroma;\n g = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n r = secondComponent;\n g = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n g = chroma;\n b = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n g = secondComponent;\n b = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n r = secondComponent;\n b = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n r = chroma;\n b = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n this.r = round((r + lightnessModification) * 255);\n this.g = round((g + lightnessModification) * 255);\n this.b = round((b + lightnessModification) * 255);\n }\n fromHsv({\n h,\n s,\n v,\n a\n }) {\n this._h = h % 360;\n this._s = s;\n this._v = v;\n this.a = typeof a === 'number' ? a : 1;\n const vv = round(v * 255);\n this.r = vv;\n this.g = vv;\n this.b = vv;\n if (s <= 0) {\n return;\n }\n const hh = h / 60;\n const i = Math.floor(hh);\n const ff = hh - i;\n const p = round(v * (1.0 - s) * 255);\n const q = round(v * (1.0 - s * ff) * 255);\n const t = round(v * (1.0 - s * (1.0 - ff)) * 255);\n switch (i) {\n case 0:\n this.g = t;\n this.b = p;\n break;\n case 1:\n this.r = q;\n this.b = p;\n break;\n case 2:\n this.r = p;\n this.b = t;\n break;\n case 3:\n this.r = p;\n this.g = q;\n break;\n case 4:\n this.r = t;\n this.g = p;\n break;\n case 5:\n default:\n this.g = p;\n this.b = q;\n break;\n }\n }\n fromHsvString(trimStr) {\n const cells = splitColorStr(trimStr, parseHSVorHSL);\n this.fromHsv({\n h: cells[0],\n s: cells[1],\n v: cells[2],\n a: cells[3]\n });\n }\n fromHslString(trimStr) {\n const cells = splitColorStr(trimStr, parseHSVorHSL);\n this.fromHsl({\n h: cells[0],\n s: cells[1],\n l: cells[2],\n a: cells[3]\n });\n }\n fromRgbString(trimStr) {\n const cells = splitColorStr(trimStr, (num, txt) =>\n // Convert percentage to number. e.g. 50% -> 128\n txt.includes('%') ? round(num / 100 * 255) : num);\n this.r = cells[0];\n this.g = cells[1];\n this.b = cells[2];\n this.a = cells[3];\n }\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar _excluded = [\"b\"],\n _excluded2 = [\"v\"];\nimport { FastColor } from '@ant-design/fast-color';\nexport var getRoundNumber = function getRoundNumber(value) {\n return Math.round(Number(value || 0));\n};\nvar convertHsb2Hsv = function convertHsb2Hsv(color) {\n if (color instanceof FastColor) {\n return color;\n }\n if (color && _typeof(color) === 'object' && 'h' in color && 'b' in color) {\n var _ref = color,\n b = _ref.b,\n resets = _objectWithoutProperties(_ref, _excluded);\n return _objectSpread(_objectSpread({}, resets), {}, {\n v: b\n });\n }\n if (typeof color === 'string' && /hsb/.test(color)) {\n return color.replace(/hsb/, 'hsv');\n }\n return color;\n};\nexport var Color = /*#__PURE__*/function (_FastColor) {\n _inherits(Color, _FastColor);\n var _super = _createSuper(Color);\n function Color(color) {\n _classCallCheck(this, Color);\n return _super.call(this, convertHsb2Hsv(color));\n }\n _createClass(Color, [{\n key: \"toHsbString\",\n value: function toHsbString() {\n var hsb = this.toHsb();\n var saturation = getRoundNumber(hsb.s * 100);\n var lightness = getRoundNumber(hsb.b * 100);\n var hue = getRoundNumber(hsb.h);\n var alpha = hsb.a;\n var hsbString = \"hsb(\".concat(hue, \", \").concat(saturation, \"%, \").concat(lightness, \"%)\");\n var hsbaString = \"hsba(\".concat(hue, \", \").concat(saturation, \"%, \").concat(lightness, \"%, \").concat(alpha.toFixed(alpha === 0 ? 0 : 2), \")\");\n return alpha === 1 ? hsbString : hsbaString;\n }\n }, {\n key: \"toHsb\",\n value: function toHsb() {\n var _this$toHsv = this.toHsv(),\n v = _this$toHsv.v,\n resets = _objectWithoutProperties(_this$toHsv, _excluded2);\n return _objectSpread(_objectSpread({}, resets), {}, {\n b: v,\n a: this.a\n });\n }\n }]);\n return Color;\n}(FastColor);","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport { Color } from \"./color\";\nexport var ColorPickerPrefixCls = 'rc-color-picker';\nexport var generateColor = function generateColor(color) {\n if (color instanceof Color) {\n return color;\n }\n return new Color(color);\n};\nexport var defaultColor = generateColor('#1677ff');\nexport var calculateColor = function calculateColor(props) {\n var offset = props.offset,\n targetRef = props.targetRef,\n containerRef = props.containerRef,\n color = props.color,\n type = props.type;\n var _containerRef$current = containerRef.current.getBoundingClientRect(),\n width = _containerRef$current.width,\n height = _containerRef$current.height;\n var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),\n targetWidth = _targetRef$current$ge.width,\n targetHeight = _targetRef$current$ge.height;\n var centerOffsetX = targetWidth / 2;\n var centerOffsetY = targetHeight / 2;\n var saturation = (offset.x + centerOffsetX) / width;\n var bright = 1 - (offset.y + centerOffsetY) / height;\n var hsb = color.toHsb();\n var alphaOffset = saturation;\n var hueOffset = (offset.x + centerOffsetX) / width * 360;\n if (type) {\n switch (type) {\n case 'hue':\n return generateColor(_objectSpread(_objectSpread({}, hsb), {}, {\n h: hueOffset <= 0 ? 0 : hueOffset\n }));\n case 'alpha':\n return generateColor(_objectSpread(_objectSpread({}, hsb), {}, {\n a: alphaOffset <= 0 ? 0 : alphaOffset\n }));\n }\n }\n return generateColor({\n h: hsb.h,\n s: saturation <= 0 ? 0 : saturation,\n b: bright >= 1 ? 1 : bright,\n a: hsb.a\n });\n};\nexport var calcOffset = function calcOffset(color, type) {\n var hsb = color.toHsb();\n switch (type) {\n case 'hue':\n return {\n x: hsb.h / 360 * 100,\n y: 50\n };\n case 'alpha':\n return {\n x: color.a * 100,\n y: 50\n };\n\n // Picker panel\n default:\n return {\n x: hsb.s * 100,\n y: (1 - hsb.b) * 100\n };\n }\n};","import classNames from 'classnames';\nimport React from 'react';\nvar ColorBlock = function ColorBlock(_ref) {\n var color = _ref.color,\n prefixCls = _ref.prefixCls,\n className = _ref.className,\n style = _ref.style,\n onClick = _ref.onClick;\n var colorBlockCls = \"\".concat(prefixCls, \"-color-block\");\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(colorBlockCls, className),\n style: style,\n onClick: onClick\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(colorBlockCls, \"-inner\"),\n style: {\n background: color\n }\n }));\n};\nexport default ColorBlock;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useEffect, useRef, useState } from 'react';\nfunction getPosition(e) {\n var obj = 'touches' in e ? e.touches[0] : e;\n var scrollXOffset = document.documentElement.scrollLeft || document.body.scrollLeft || window.pageXOffset;\n var scrollYOffset = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;\n return {\n pageX: obj.pageX - scrollXOffset,\n pageY: obj.pageY - scrollYOffset\n };\n}\nfunction useColorDrag(props) {\n var targetRef = props.targetRef,\n containerRef = props.containerRef,\n direction = props.direction,\n onDragChange = props.onDragChange,\n onDragChangeComplete = props.onDragChangeComplete,\n calculate = props.calculate,\n color = props.color,\n disabledDrag = props.disabledDrag;\n var _useState = useState({\n x: 0,\n y: 0\n }),\n _useState2 = _slicedToArray(_useState, 2),\n offsetValue = _useState2[0],\n setOffsetValue = _useState2[1];\n var mouseMoveRef = useRef(null);\n var mouseUpRef = useRef(null);\n\n // Always get position from `color`\n useEffect(function () {\n setOffsetValue(calculate());\n }, [color]);\n useEffect(function () {\n return function () {\n document.removeEventListener('mousemove', mouseMoveRef.current);\n document.removeEventListener('mouseup', mouseUpRef.current);\n document.removeEventListener('touchmove', mouseMoveRef.current);\n document.removeEventListener('touchend', mouseUpRef.current);\n mouseMoveRef.current = null;\n mouseUpRef.current = null;\n };\n }, []);\n var updateOffset = function updateOffset(e) {\n var _getPosition = getPosition(e),\n pageX = _getPosition.pageX,\n pageY = _getPosition.pageY;\n var _containerRef$current = containerRef.current.getBoundingClientRect(),\n rectX = _containerRef$current.x,\n rectY = _containerRef$current.y,\n width = _containerRef$current.width,\n height = _containerRef$current.height;\n var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),\n targetWidth = _targetRef$current$ge.width,\n targetHeight = _targetRef$current$ge.height;\n var centerOffsetX = targetWidth / 2;\n var centerOffsetY = targetHeight / 2;\n var offsetX = Math.max(0, Math.min(pageX - rectX, width)) - centerOffsetX;\n var offsetY = Math.max(0, Math.min(pageY - rectY, height)) - centerOffsetY;\n var calcOffset = {\n x: offsetX,\n y: direction === 'x' ? offsetValue.y : offsetY\n };\n\n // Exclusion of boundary cases\n if (targetWidth === 0 && targetHeight === 0 || targetWidth !== targetHeight) {\n return false;\n }\n onDragChange === null || onDragChange === void 0 || onDragChange(calcOffset);\n };\n var onDragMove = function onDragMove(e) {\n e.preventDefault();\n updateOffset(e);\n };\n var onDragStop = function onDragStop(e) {\n e.preventDefault();\n document.removeEventListener('mousemove', mouseMoveRef.current);\n document.removeEventListener('mouseup', mouseUpRef.current);\n document.removeEventListener('touchmove', mouseMoveRef.current);\n document.removeEventListener('touchend', mouseUpRef.current);\n mouseMoveRef.current = null;\n mouseUpRef.current = null;\n onDragChangeComplete === null || onDragChangeComplete === void 0 || onDragChangeComplete();\n };\n var onDragStart = function onDragStart(e) {\n // https://github.com/ant-design/ant-design/issues/43529\n document.removeEventListener('mousemove', mouseMoveRef.current);\n document.removeEventListener('mouseup', mouseUpRef.current);\n if (disabledDrag) {\n return;\n }\n updateOffset(e);\n document.addEventListener('mousemove', onDragMove);\n document.addEventListener('mouseup', onDragStop);\n document.addEventListener('touchmove', onDragMove);\n document.addEventListener('touchend', onDragStop);\n mouseMoveRef.current = onDragMove;\n mouseUpRef.current = onDragStop;\n };\n return [offsetValue, onDragStart];\n}\nexport default useColorDrag;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport classNames from 'classnames';\nimport React from 'react';\nvar Handler = function Handler(_ref) {\n var _ref$size = _ref.size,\n size = _ref$size === void 0 ? 'default' : _ref$size,\n color = _ref.color,\n prefixCls = _ref.prefixCls;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-handler\"), _defineProperty({}, \"\".concat(prefixCls, \"-handler-sm\"), size === 'small')),\n style: {\n backgroundColor: color\n }\n });\n};\nexport default Handler;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport React from 'react';\nvar Palette = function Palette(_ref) {\n var children = _ref.children,\n style = _ref.style,\n prefixCls = _ref.prefixCls;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-palette\"),\n style: _objectSpread({\n position: 'relative'\n }, style)\n }, children);\n};\nexport default Palette;","import React, { forwardRef } from 'react';\nvar Transform = /*#__PURE__*/forwardRef(function (props, ref) {\n var children = props.children,\n x = props.x,\n y = props.y;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: ref,\n style: {\n position: 'absolute',\n left: \"\".concat(x, \"%\"),\n top: \"\".concat(y, \"%\"),\n zIndex: 1,\n transform: 'translate(-50%, -50%)'\n }\n }, children);\n});\nexport default Transform;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport React, { useRef } from 'react';\nimport useColorDrag from \"../hooks/useColorDrag\";\nimport { calcOffset, calculateColor } from \"../util\";\nimport { useEvent } from 'rc-util';\nimport Handler from \"./Handler\";\nimport Palette from \"./Palette\";\nimport Transform from \"./Transform\";\nvar Picker = function Picker(_ref) {\n var color = _ref.color,\n onChange = _ref.onChange,\n prefixCls = _ref.prefixCls,\n onChangeComplete = _ref.onChangeComplete,\n disabled = _ref.disabled;\n var pickerRef = useRef();\n var transformRef = useRef();\n var colorRef = useRef(color);\n var onDragChange = useEvent(function (offsetValue) {\n var calcColor = calculateColor({\n offset: offsetValue,\n targetRef: transformRef,\n containerRef: pickerRef,\n color: color\n });\n colorRef.current = calcColor;\n onChange(calcColor);\n });\n var _useColorDrag = useColorDrag({\n color: color,\n containerRef: pickerRef,\n targetRef: transformRef,\n calculate: function calculate() {\n return calcOffset(color);\n },\n onDragChange: onDragChange,\n onDragChangeComplete: function onDragChangeComplete() {\n return onChangeComplete === null || onChangeComplete === void 0 ? void 0 : onChangeComplete(colorRef.current);\n },\n disabledDrag: disabled\n }),\n _useColorDrag2 = _slicedToArray(_useColorDrag, 2),\n offset = _useColorDrag2[0],\n dragStartHandle = _useColorDrag2[1];\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: pickerRef,\n className: \"\".concat(prefixCls, \"-select\"),\n onMouseDown: dragStartHandle,\n onTouchStart: dragStartHandle\n }, /*#__PURE__*/React.createElement(Palette, {\n prefixCls: prefixCls\n }, /*#__PURE__*/React.createElement(Transform, {\n x: offset.x,\n y: offset.y,\n ref: transformRef\n }, /*#__PURE__*/React.createElement(Handler, {\n color: color.toRgbString(),\n prefixCls: prefixCls\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-saturation\"),\n style: {\n backgroundColor: \"hsl(\".concat(color.toHsb().h, \",100%, 50%)\"),\n backgroundImage: 'linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))'\n }\n })));\n};\nexport default Picker;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useMergedState } from 'rc-util';\nimport { useMemo } from 'react';\nimport { generateColor } from \"../util\";\nvar useColorState = function useColorState(defaultValue, value) {\n var _useMergedState = useMergedState(defaultValue, {\n value: value\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n mergedValue = _useMergedState2[0],\n setValue = _useMergedState2[1];\n var color = useMemo(function () {\n return generateColor(mergedValue);\n }, [mergedValue]);\n return [color, setValue];\n};\nexport default useColorState;","import React, { useMemo } from 'react';\nimport { Color } from \"../color\";\nimport { generateColor } from \"../util\";\nvar Gradient = function Gradient(_ref) {\n var colors = _ref.colors,\n children = _ref.children,\n _ref$direction = _ref.direction,\n direction = _ref$direction === void 0 ? 'to right' : _ref$direction,\n type = _ref.type,\n prefixCls = _ref.prefixCls;\n var gradientColors = useMemo(function () {\n return colors.map(function (color, idx) {\n var result = generateColor(color);\n if (type === 'alpha' && idx === colors.length - 1) {\n result = new Color(result.setA(1));\n }\n return result.toRgbString();\n }).join(',');\n }, [colors, type]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-gradient\"),\n style: {\n position: 'absolute',\n inset: 0,\n background: \"linear-gradient(\".concat(direction, \", \").concat(gradientColors, \")\")\n }\n }, children);\n};\nexport default Gradient;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport React, { useRef } from 'react';\nimport useColorDrag from \"../hooks/useColorDrag\";\nimport Palette from \"./Palette\";\nimport classNames from 'classnames';\nimport { useEvent } from 'rc-util';\nimport { Color } from \"../color\";\nimport { calcOffset, calculateColor } from \"../util\";\nimport Gradient from \"./Gradient\";\nimport Handler from \"./Handler\";\nimport Transform from \"./Transform\";\nvar Slider = function Slider(props) {\n var prefixCls = props.prefixCls,\n colors = props.colors,\n disabled = props.disabled,\n onChange = props.onChange,\n onChangeComplete = props.onChangeComplete,\n color = props.color,\n type = props.type;\n var sliderRef = useRef();\n var transformRef = useRef();\n var colorRef = useRef(color);\n var getValue = function getValue(c) {\n return type === 'hue' ? c.getHue() : c.a * 100;\n };\n var onDragChange = useEvent(function (offsetValue) {\n var calcColor = calculateColor({\n offset: offsetValue,\n targetRef: transformRef,\n containerRef: sliderRef,\n color: color,\n type: type\n });\n colorRef.current = calcColor;\n onChange(getValue(calcColor));\n });\n var _useColorDrag = useColorDrag({\n color: color,\n targetRef: transformRef,\n containerRef: sliderRef,\n calculate: function calculate() {\n return calcOffset(color, type);\n },\n onDragChange: onDragChange,\n onDragChangeComplete: function onDragChangeComplete() {\n onChangeComplete(getValue(colorRef.current));\n },\n direction: 'x',\n disabledDrag: disabled\n }),\n _useColorDrag2 = _slicedToArray(_useColorDrag, 2),\n offset = _useColorDrag2[0],\n dragStartHandle = _useColorDrag2[1];\n var handleColor = React.useMemo(function () {\n if (type === 'hue') {\n var hsb = color.toHsb();\n hsb.s = 1;\n hsb.b = 1;\n hsb.a = 1;\n var lightColor = new Color(hsb);\n return lightColor;\n }\n return color;\n }, [color, type]);\n\n // ========================= Gradient =========================\n var gradientList = React.useMemo(function () {\n return colors.map(function (info) {\n return \"\".concat(info.color, \" \").concat(info.percent, \"%\");\n });\n }, [colors]);\n\n // ========================== Render ==========================\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: sliderRef,\n className: classNames(\"\".concat(prefixCls, \"-slider\"), \"\".concat(prefixCls, \"-slider-\").concat(type)),\n onMouseDown: dragStartHandle,\n onTouchStart: dragStartHandle\n }, /*#__PURE__*/React.createElement(Palette, {\n prefixCls: prefixCls\n }, /*#__PURE__*/React.createElement(Transform, {\n x: offset.x,\n y: offset.y,\n ref: transformRef\n }, /*#__PURE__*/React.createElement(Handler, {\n size: \"small\",\n color: handleColor.toHexString(),\n prefixCls: prefixCls\n })), /*#__PURE__*/React.createElement(Gradient, {\n colors: gradientList,\n type: type,\n prefixCls: prefixCls\n })));\n};\nexport default Slider;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport React, { forwardRef, useMemo } from 'react';\nimport { ColorPickerPrefixCls, defaultColor } from \"./util\";\nimport classNames from 'classnames';\nimport { Color } from \"./color\";\nimport ColorBlock from \"./components/ColorBlock\";\nimport Picker from \"./components/Picker\";\nimport useColorState from \"./hooks/useColorState\";\nimport useComponent from \"./hooks/useComponent\";\nvar HUE_COLORS = [{\n color: 'rgb(255, 0, 0)',\n percent: 0\n}, {\n color: 'rgb(255, 255, 0)',\n percent: 17\n}, {\n color: 'rgb(0, 255, 0)',\n percent: 33\n}, {\n color: 'rgb(0, 255, 255)',\n percent: 50\n}, {\n color: 'rgb(0, 0, 255)',\n percent: 67\n}, {\n color: 'rgb(255, 0, 255)',\n percent: 83\n}, {\n color: 'rgb(255, 0, 0)',\n percent: 100\n}];\nvar ColorPicker = /*#__PURE__*/forwardRef(function (props, ref) {\n var value = props.value,\n defaultValue = props.defaultValue,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? ColorPickerPrefixCls : _props$prefixCls,\n onChange = props.onChange,\n onChangeComplete = props.onChangeComplete,\n className = props.className,\n style = props.style,\n panelRender = props.panelRender,\n _props$disabledAlpha = props.disabledAlpha,\n disabledAlpha = _props$disabledAlpha === void 0 ? false : _props$disabledAlpha,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n components = props.components;\n\n // ========================== Components ==========================\n var _useComponent = useComponent(components),\n _useComponent2 = _slicedToArray(_useComponent, 1),\n Slider = _useComponent2[0];\n\n // ============================ Color =============================\n var _useColorState = useColorState(defaultValue || defaultColor, value),\n _useColorState2 = _slicedToArray(_useColorState, 2),\n colorValue = _useColorState2[0],\n setColorValue = _useColorState2[1];\n var alphaColor = useMemo(function () {\n return colorValue.setA(1).toRgbString();\n }, [colorValue]);\n\n // ============================ Events ============================\n var handleChange = function handleChange(data, type) {\n if (!value) {\n setColorValue(data);\n }\n onChange === null || onChange === void 0 || onChange(data, type);\n };\n\n // Convert\n var getHueColor = function getHueColor(hue) {\n return new Color(colorValue.setHue(hue));\n };\n var getAlphaColor = function getAlphaColor(alpha) {\n return new Color(colorValue.setA(alpha / 100));\n };\n\n // Slider change\n var onHueChange = function onHueChange(hue) {\n handleChange(getHueColor(hue), {\n type: 'hue',\n value: hue\n });\n };\n var onAlphaChange = function onAlphaChange(alpha) {\n handleChange(getAlphaColor(alpha), {\n type: 'alpha',\n value: alpha\n });\n };\n\n // Complete\n var onHueChangeComplete = function onHueChangeComplete(hue) {\n if (onChangeComplete) {\n onChangeComplete(getHueColor(hue));\n }\n };\n var onAlphaChangeComplete = function onAlphaChangeComplete(alpha) {\n if (onChangeComplete) {\n onChangeComplete(getAlphaColor(alpha));\n }\n };\n\n // ============================ Render ============================\n var mergeCls = classNames(\"\".concat(prefixCls, \"-panel\"), className, _defineProperty({}, \"\".concat(prefixCls, \"-panel-disabled\"), disabled));\n var sharedSliderProps = {\n prefixCls: prefixCls,\n disabled: disabled,\n color: colorValue\n };\n var defaultPanel = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Picker, _extends({\n onChange: handleChange\n }, sharedSliderProps, {\n onChangeComplete: onChangeComplete\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-slider-container\")\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-slider-group\"), _defineProperty({}, \"\".concat(prefixCls, \"-slider-group-disabled-alpha\"), disabledAlpha))\n }, /*#__PURE__*/React.createElement(Slider, _extends({}, sharedSliderProps, {\n type: \"hue\",\n colors: HUE_COLORS,\n min: 0,\n max: 359,\n value: colorValue.getHue(),\n onChange: onHueChange,\n onChangeComplete: onHueChangeComplete\n })), !disabledAlpha && /*#__PURE__*/React.createElement(Slider, _extends({}, sharedSliderProps, {\n type: \"alpha\",\n colors: [{\n percent: 0,\n color: 'rgba(255, 0, 4, 0)'\n }, {\n percent: 100,\n color: alphaColor\n }],\n min: 0,\n max: 100,\n value: colorValue.a * 100,\n onChange: onAlphaChange,\n onChangeComplete: onAlphaChangeComplete\n }))), /*#__PURE__*/React.createElement(ColorBlock, {\n color: colorValue.toRgbString(),\n prefixCls: prefixCls\n })));\n return /*#__PURE__*/React.createElement(\"div\", {\n className: mergeCls,\n style: style,\n ref: ref\n }, typeof panelRender === 'function' ? panelRender(defaultPanel) : defaultPanel);\n});\nif (process.env.NODE_ENV !== 'production') {\n ColorPicker.displayName = 'ColorPicker';\n}\nexport default ColorPicker;","import * as React from 'react';\nimport Slider from \"../components/Slider\";\nexport default function useComponent(components) {\n return React.useMemo(function () {\n var _ref = components || {},\n slider = _ref.slider;\n return [slider || Slider];\n }, [components]);\n}","import ColorPicker from \"./ColorPicker\";\nexport { Color } from \"./color\";\nexport { default as ColorBlock } from \"./components/ColorBlock\";\nexport * from \"./interface\";\nexport default ColorPicker;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport React from 'react';\nvar DomWrapper = /*#__PURE__*/function (_React$Component) {\n _inherits(DomWrapper, _React$Component);\n var _super = _createSuper(DomWrapper);\n function DomWrapper() {\n _classCallCheck(this, DomWrapper);\n return _super.apply(this, arguments);\n }\n _createClass(DomWrapper, [{\n key: \"render\",\n value: function render() {\n return this.props.children;\n }\n }]);\n return DomWrapper;\n}(React.Component);\nexport default DomWrapper;","import canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport * as React from 'react';\nvar defaultOptions = {\n subtree: true,\n childList: true,\n attributeFilter: ['style', 'class']\n};\nexport default function useMutateObserver(nodeOrList, callback) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOptions;\n React.useEffect(function () {\n if (!canUseDom() || !nodeOrList) {\n return;\n }\n var instance;\n var nodeList = Array.isArray(nodeOrList) ? nodeOrList : [nodeOrList];\n if ('MutationObserver' in window) {\n instance = new MutationObserver(callback);\n nodeList.forEach(function (element) {\n instance.observe(element, options);\n });\n }\n return function () {\n var _instance, _instance2;\n (_instance = instance) === null || _instance === void 0 ? void 0 : _instance.takeRecords();\n (_instance2 = instance) === null || _instance2 === void 0 ? void 0 : _instance2.disconnect();\n };\n }, [options, nodeOrList]);\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport React from 'react';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport { supportRef, useComposeRef } from \"rc-util/es/ref\";\nimport findDOMNode from \"rc-util/es/Dom/findDOMNode\";\nimport useEvent from \"rc-util/es/hooks/useEvent\";\nimport DomWrapper from \"./wrapper\";\nimport useMutateObserver from \"./useMutateObserver\";\nvar MutateObserver = function MutateObserver(props) {\n var children = props.children,\n options = props.options,\n _props$onMutate = props.onMutate,\n onMutate = _props$onMutate === void 0 ? function () {} : _props$onMutate;\n var callback = useEvent(onMutate);\n var wrapperRef = React.useRef(null);\n var elementRef = React.useRef(null);\n var canRef = /*#__PURE__*/React.isValidElement(children) && supportRef(children);\n var mergedRef = useComposeRef(elementRef, canRef ? children.ref : null);\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n target = _React$useState2[0],\n setTarget = _React$useState2[1];\n useMutateObserver(target, callback, options);\n\n // =========================== Effect ===========================\n // Bind target\n useLayoutEffect(function () {\n setTarget(findDOMNode(elementRef.current) || findDOMNode(wrapperRef.current));\n });\n\n // =========================== Render ===========================\n if (!children) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('MutationObserver need children props');\n }\n return null;\n }\n return /*#__PURE__*/React.createElement(DomWrapper, {\n ref: wrapperRef\n }, canRef ? /*#__PURE__*/React.cloneElement(children, {\n ref: mergedRef\n }) : children);\n};\nexport default MutateObserver;","import MutateObserver from \"./MutateObserver\";\nimport useMutateObserver from \"./useMutateObserver\";\nexport { useMutateObserver };\nexport default MutateObserver;","import * as React from 'react';\nvar OrderContext = /*#__PURE__*/React.createContext(null);\nexport default OrderContext;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport OrderContext from \"./Context\";\nvar EMPTY_LIST = [];\n\n/**\n * Will add `div` to document. Nest call will keep order\n * @param render Render DOM in document\n */\nexport default function useDom(render, debug) {\n var _React$useState = React.useState(function () {\n if (!canUseDom()) {\n return null;\n }\n var defaultEle = document.createElement('div');\n if (process.env.NODE_ENV !== 'production' && debug) {\n defaultEle.setAttribute('data-debug', debug);\n }\n return defaultEle;\n }),\n _React$useState2 = _slicedToArray(_React$useState, 1),\n ele = _React$useState2[0];\n\n // ========================== Order ==========================\n var appendedRef = React.useRef(false);\n var queueCreate = React.useContext(OrderContext);\n var _React$useState3 = React.useState(EMPTY_LIST),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n queue = _React$useState4[0],\n setQueue = _React$useState4[1];\n var mergedQueueCreate = queueCreate || (appendedRef.current ? undefined : function (appendFn) {\n setQueue(function (origin) {\n var newQueue = [appendFn].concat(_toConsumableArray(origin));\n return newQueue;\n });\n });\n\n // =========================== DOM ===========================\n function append() {\n if (!ele.parentElement) {\n document.body.appendChild(ele);\n }\n appendedRef.current = true;\n }\n function cleanup() {\n var _ele$parentElement;\n (_ele$parentElement = ele.parentElement) === null || _ele$parentElement === void 0 ? void 0 : _ele$parentElement.removeChild(ele);\n appendedRef.current = false;\n }\n useLayoutEffect(function () {\n if (render) {\n if (queueCreate) {\n queueCreate(append);\n } else {\n append();\n }\n } else {\n cleanup();\n }\n return cleanup;\n }, [render]);\n useLayoutEffect(function () {\n if (queue.length) {\n queue.forEach(function (appendFn) {\n return appendFn();\n });\n setQueue(EMPTY_LIST);\n }\n }, [queue]);\n return [ele, mergedQueueCreate];\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { updateCSS, removeCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport { getTargetScrollBarSize } from \"rc-util/es/getScrollBarSize\";\nimport { isBodyOverflowing } from \"./util\";\nvar UNIQUE_ID = \"rc-util-locker-\".concat(Date.now());\nvar uuid = 0;\nexport default function useScrollLocker(lock) {\n var mergedLock = !!lock;\n var _React$useState = React.useState(function () {\n uuid += 1;\n return \"\".concat(UNIQUE_ID, \"_\").concat(uuid);\n }),\n _React$useState2 = _slicedToArray(_React$useState, 1),\n id = _React$useState2[0];\n useLayoutEffect(function () {\n if (mergedLock) {\n var scrollbarSize = getTargetScrollBarSize(document.body).width;\n var isOverflow = isBodyOverflowing();\n updateCSS(\"\\nhtml body {\\n overflow-y: hidden;\\n \".concat(isOverflow ? \"width: calc(100% - \".concat(scrollbarSize, \"px);\") : '', \"\\n}\"), id);\n } else {\n removeCSS(id);\n }\n return function () {\n removeCSS(id);\n };\n }, [mergedLock, id]);\n}","/**\n * Test usage export. Do not use in your production\n */\nexport function isBodyOverflowing() {\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;\n}","export var inline = false;\nexport function inlineMock(nextInline) {\n if (typeof nextInline === 'boolean') {\n inline = nextInline;\n }\n return inline;\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport warning from \"rc-util/es/warning\";\nimport { supportRef, useComposeRef } from \"rc-util/es/ref\";\nimport OrderContext from \"./Context\";\nimport useDom from \"./useDom\";\nimport useScrollLocker from \"./useScrollLocker\";\nimport { inlineMock } from \"./mock\";\nvar getPortalContainer = function getPortalContainer(getContainer) {\n if (getContainer === false) {\n return false;\n }\n if (!canUseDom() || !getContainer) {\n return null;\n }\n if (typeof getContainer === 'string') {\n return document.querySelector(getContainer);\n }\n if (typeof getContainer === 'function') {\n return getContainer();\n }\n return getContainer;\n};\nvar Portal = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var open = props.open,\n autoLock = props.autoLock,\n getContainer = props.getContainer,\n debug = props.debug,\n _props$autoDestroy = props.autoDestroy,\n autoDestroy = _props$autoDestroy === void 0 ? true : _props$autoDestroy,\n children = props.children;\n var _React$useState = React.useState(open),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n shouldRender = _React$useState2[0],\n setShouldRender = _React$useState2[1];\n var mergedRender = shouldRender || open;\n\n // ========================= Warning =========================\n if (process.env.NODE_ENV !== 'production') {\n warning(canUseDom() || !open, \"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR.\");\n }\n\n // ====================== Should Render ======================\n React.useEffect(function () {\n if (autoDestroy || open) {\n setShouldRender(open);\n }\n }, [open, autoDestroy]);\n\n // ======================== Container ========================\n var _React$useState3 = React.useState(function () {\n return getPortalContainer(getContainer);\n }),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n innerContainer = _React$useState4[0],\n setInnerContainer = _React$useState4[1];\n React.useEffect(function () {\n var customizeContainer = getPortalContainer(getContainer);\n\n // Tell component that we check this in effect which is safe to be `null`\n setInnerContainer(customizeContainer !== null && customizeContainer !== void 0 ? customizeContainer : null);\n });\n var _useDom = useDom(mergedRender && !innerContainer, debug),\n _useDom2 = _slicedToArray(_useDom, 2),\n defaultContainer = _useDom2[0],\n queueCreate = _useDom2[1];\n var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer;\n\n // ========================= Locker ==========================\n useScrollLocker(autoLock && open && canUseDom() && (mergedContainer === defaultContainer || mergedContainer === document.body));\n\n // =========================== Ref ===========================\n var childRef = null;\n if (children && supportRef(children) && ref) {\n var _ref = children;\n childRef = _ref.ref;\n }\n var mergedRef = useComposeRef(childRef, ref);\n\n // ========================= Render ==========================\n // Do not render when nothing need render\n // When innerContainer is `undefined`, it may not ready since user use ref in the same render\n if (!mergedRender || !canUseDom() || innerContainer === undefined) {\n return null;\n }\n\n // Render inline\n var renderInline = mergedContainer === false || inlineMock();\n var reffedChildren = children;\n if (ref) {\n reffedChildren = /*#__PURE__*/React.cloneElement(children, {\n ref: mergedRef\n });\n }\n return /*#__PURE__*/React.createElement(OrderContext.Provider, {\n value: queueCreate\n }, renderInline ? reffedChildren : /*#__PURE__*/createPortal(reffedChildren, mergedContainer));\n});\nif (process.env.NODE_ENV !== 'production') {\n Portal.displayName = 'Portal';\n}\nexport default Portal;","import Portal from \"./Portal\";\nimport { inlineMock } from \"./mock\";\nexport { inlineMock };\nexport default Portal;","import _createForOfIteratorHelper from \"@babel/runtime/helpers/esm/createForOfIteratorHelper\";\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 _class, _class2;\n// Copyright (c) Project Nayuki. (MIT License)\n// https://www.nayuki.io/page/qr-code-generator-library\n\n// Modification with code reorder and prettier\n\n// --------------------------------------------\n\n// Appends the given number of low-order bits of the given value\n// to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.\nfunction appendBits(val, len, bb) {\n if (len < 0 || len > 31 || val >>> len != 0) throw new RangeError('Value out of range');\n for (var i = len - 1; i >= 0; i-- // Append bit by bit\n ) bb.push(val >>> i & 1);\n}\n\n// Returns true iff the i'th bit of x is set to 1.\nfunction getBit(x, i) {\n return (x >>> i & 1) != 0;\n}\n\n// Throws an exception if the given condition is false.\nfunction assert(cond) {\n if (!cond) throw new Error('Assertion error');\n}\n\n/*---- Public helper enumeration ----*/\n/*\n * Describes how a segment's data bits are numbererpreted. Immutable.\n */\nexport var Mode = /*#__PURE__*/function () {\n function Mode(modeBits, numBitsCharCount) {\n _classCallCheck(this, Mode);\n /*-- Constructor and fields --*/\n // The mode indicator bits, which is a unumber4 value (range 0 to 15).\n _defineProperty(this, \"modeBits\", void 0);\n // Number of character count bits for three different version ranges.\n _defineProperty(this, \"numBitsCharCount\", void 0);\n this.modeBits = modeBits;\n this.numBitsCharCount = numBitsCharCount;\n }\n\n /*-- Method --*/\n\n // (Package-private) Returns the bit width of the character count field for a segment in\n // this mode in a QR Code at the given version number. The result is in the range [0, 16].\n _createClass(Mode, [{\n key: \"numCharCountBits\",\n value: function numCharCountBits(ver) {\n return this.numBitsCharCount[Math.floor((ver + 7) / 17)];\n }\n }]);\n return Mode;\n}();\n\n/*---- Public helper enumeration ----*/\n\n/*\n * The error correction level in a QR Code symbol. Immutable.\n */\n_class = Mode;\n/*-- Constants --*/\n_defineProperty(Mode, \"NUMERIC\", new _class(0x1, [10, 12, 14]));\n_defineProperty(Mode, \"ALPHANUMERIC\", new _class(0x2, [9, 11, 13]));\n_defineProperty(Mode, \"BYTE\", new _class(0x4, [8, 16, 16]));\n_defineProperty(Mode, \"KANJI\", new _class(0x8, [8, 10, 12]));\n_defineProperty(Mode, \"ECI\", new _class(0x7, [0, 0, 0]));\nexport var Ecc = /*#__PURE__*/_createClass(function Ecc(ordinal, formatBits) {\n _classCallCheck(this, Ecc);\n // The QR Code can tolerate about 30% erroneous codewords\n /*-- Constructor and fields --*/\n // In the range 0 to 3 (unsigned 2-bit numbereger).\n _defineProperty(this, \"ordinal\", void 0);\n // (Package-private) In the range 0 to 3 (unsigned 2-bit numbereger).\n _defineProperty(this, \"formatBits\", void 0);\n this.ordinal = ordinal;\n this.formatBits = formatBits;\n});\n\n/*\n * A segment of character/binary/control data in a QR Code symbol.\n * Instances of this class are immutable.\n * The mid-level way to create a segment is to take the payload data\n * and call a static factory function such as QrSegment.makeNumeric().\n * The low-level way to create a segment is to custom-make the bit buffer\n * and call the QrSegment() constructor with appropriate values.\n * This segment class imposes no length restrictions, but QR Codes have restrictions.\n * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.\n * Any segment longer than this is meaningless for the purpose of generating QR Codes.\n */\n_class2 = Ecc;\n/*-- Constants --*/\n_defineProperty(Ecc, \"LOW\", new _class2(0, 1));\n// The QR Code can tolerate about 7% erroneous codewords\n_defineProperty(Ecc, \"MEDIUM\", new _class2(1, 0));\n// The QR Code can tolerate about 15% erroneous codewords\n_defineProperty(Ecc, \"QUARTILE\", new _class2(2, 3));\n// The QR Code can tolerate about 25% erroneous codewords\n_defineProperty(Ecc, \"HIGH\", new _class2(3, 2));\nexport var QrSegment = /*#__PURE__*/function () {\n // Creates a new QR Code segment with the given attributes and data.\n // The character count (numChars) must agree with the mode and the bit buffer length,\n // but the constranumber isn't checked. The given bit buffer is cloned and stored.\n function QrSegment(mode, numChars, bitData) {\n _classCallCheck(this, QrSegment);\n /*-- Constructor (low level) and fields --*/\n // The mode indicator of this segment.\n _defineProperty(this, \"mode\", void 0);\n // The length of this segment's unencoded data. Measured in characters for\n // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.\n // Always zero or positive. Not the same as the data's bit length.\n _defineProperty(this, \"numChars\", void 0);\n // The data bits of this segment. Accessed through getData().\n _defineProperty(this, \"bitData\", void 0);\n this.mode = mode;\n this.numChars = numChars;\n this.bitData = bitData;\n if (numChars < 0) throw new RangeError('Invalid argument');\n this.bitData = bitData.slice(); // Make defensive copy\n }\n\n /*-- Methods --*/\n\n // Returns a new copy of the data bits of this segment.\n _createClass(QrSegment, [{\n key: \"getData\",\n value: function getData() {\n return this.bitData.slice(); // Make defensive copy\n }\n\n // (Package-private) Calculates and returns the number of bits needed to encode the given segments at\n // the given version. The result is infinity if a segment has too many characters to fit its length field.\n }], [{\n key: \"makeBytes\",\n value: /*-- Static factory functions (mid level) --*/\n\n // Returns a segment representing the given binary data encoded in\n // byte mode. All input byte arrays are acceptable. Any text string\n // can be converted to UTF-8 bytes and encoded as a byte mode segment.\n function makeBytes(data) {\n var bb = [];\n var _iterator = _createForOfIteratorHelper(data),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var b = _step.value;\n appendBits(b, 8, bb);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return new QrSegment(Mode.BYTE, data.length, bb);\n }\n\n // Returns a segment representing the given string of decimal digits encoded in numeric mode.\n }, {\n key: \"makeNumeric\",\n value: function makeNumeric(digits) {\n if (!QrSegment.isNumeric(digits)) throw new RangeError('String contains non-numeric characters');\n var bb = [];\n for (var i = 0; i < digits.length;) {\n // Consume up to 3 digits per iteration\n var n = Math.min(digits.length - i, 3);\n appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb);\n i += n;\n }\n return new QrSegment(Mode.NUMERIC, digits.length, bb);\n }\n\n // Returns a segment representing the given text string encoded in alphanumeric mode.\n // The characters allowed are: 0 to 9, A to Z (uppercase only), space,\n // dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n }, {\n key: \"makeAlphanumeric\",\n value: function makeAlphanumeric(text) {\n if (!QrSegment.isAlphanumeric(text)) throw new RangeError('String contains unencodable characters in alphanumeric mode');\n var bb = [];\n var i;\n for (i = 0; i + 2 <= text.length; i += 2) {\n // Process groups of 2\n var temp = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45;\n temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1));\n appendBits(temp, 11, bb);\n }\n if (i < text.length)\n // 1 character remaining\n appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb);\n return new QrSegment(Mode.ALPHANUMERIC, text.length, bb);\n }\n\n // Returns a new mutable list of zero or more segments to represent the given Unicode text string.\n // The result may use various segment modes and switch modes to optimize the length of the bit stream.\n }, {\n key: \"makeSegments\",\n value: function makeSegments(text) {\n // Select the most efficient segment encoding automatically\n if (text == '') return [];else if (QrSegment.isNumeric(text)) return [QrSegment.makeNumeric(text)];else if (QrSegment.isAlphanumeric(text)) return [QrSegment.makeAlphanumeric(text)];else return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))];\n }\n\n // Returns a segment representing an Extended Channel Interpretation\n // (ECI) designator with the given assignment value.\n }, {\n key: \"makeEci\",\n value: function makeEci(assignVal) {\n var bb = [];\n if (assignVal < 0) throw new RangeError('ECI assignment value out of range');else if (assignVal < 1 << 7) appendBits(assignVal, 8, bb);else if (assignVal < 1 << 14) {\n appendBits(2, 2, bb);\n appendBits(assignVal, 14, bb);\n } else if (assignVal < 1000000) {\n appendBits(6, 3, bb);\n appendBits(assignVal, 21, bb);\n } else throw new RangeError('ECI assignment value out of range');\n return new QrSegment(Mode.ECI, 0, bb);\n }\n\n // Tests whether the given string can be encoded as a segment in numeric mode.\n // A string is encodable iff each character is in the range 0 to 9.\n }, {\n key: \"isNumeric\",\n value: function isNumeric(text) {\n return QrSegment.NUMERIC_REGEX.test(text);\n }\n\n // Tests whether the given string can be encoded as a segment in alphanumeric mode.\n // A string is encodable iff each character is in the following set: 0 to 9, A to Z\n // (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.\n }, {\n key: \"isAlphanumeric\",\n value: function isAlphanumeric(text) {\n return QrSegment.ALPHANUMERIC_REGEX.test(text);\n }\n }, {\n key: \"getTotalBits\",\n value: function getTotalBits(segs, version) {\n var result = 0;\n var _iterator2 = _createForOfIteratorHelper(segs),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var seg = _step2.value;\n var ccbits = seg.mode.numCharCountBits(version);\n if (seg.numChars >= 1 << ccbits) return Infinity; // The segment's length doesn't fit the field's bit width\n result += 4 + ccbits + seg.bitData.length;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n return result;\n }\n\n // Returns a new array of bytes representing the given string encoded in UTF-8.\n }, {\n key: \"toUtf8ByteArray\",\n value: function toUtf8ByteArray(input) {\n var str = encodeURI(input);\n var result = [];\n for (var i = 0; i < str.length; i++) {\n if (str.charAt(i) != '%') result.push(str.charCodeAt(i));else {\n result.push(parseInt(str.substring(i + 1, i + 3), 16));\n i += 2;\n }\n }\n return result;\n }\n\n /*-- Constants --*/\n\n // Describes precisely all strings that are encodable in numeric mode.\n }]);\n return QrSegment;\n}();\n\n/*\n * A QR Code symbol, which is a type of two-dimension barcode.\n * Invented by Denso Wave and described in the ISO/IEC 18004 standard.\n * Instances of this class represent an immutable square grid of dark and light cells.\n * The class provides static factory functions to create a QR Code from text or binary data.\n * The class covers the QR Code Model 2 specification, supporting all versions (sizes)\n * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.\n *\n * Ways to create a QR Code object:\n * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().\n * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().\n * - Low level: Custom-make the array of data codeword bytes (including\n * segment headers and final padding, excluding error correction codewords),\n * supply the appropriate version number, and call the QrCode() constructor.\n * (Note that all ways require supplying the desired error correction level.)\n */\n_defineProperty(QrSegment, \"NUMERIC_REGEX\", /^[0-9]*$/);\n// Describes precisely all strings that are encodable in alphanumeric mode.\n_defineProperty(QrSegment, \"ALPHANUMERIC_REGEX\", /^[A-Z0-9 $%*+.\\/:-]*$/);\n// The set of all legal characters in alphanumeric mode,\n// where each character value maps to the index in the string.\n_defineProperty(QrSegment, \"ALPHANUMERIC_CHARSET\", '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:');\nexport var QrCode = /*#__PURE__*/function () {\n // Creates a new QR Code with the given version number,\n // error correction level, data codeword bytes, and mask number.\n // This is a low-level API that most users should not use directly.\n // A mid-level API is the encodeSegments() function.\n function QrCode(\n // The version number of this QR Code, which is between 1 and 40 (inclusive).\n // This determines the size of this barcode.\n version,\n // The error correction level used in this QR Code.\n errorCorrectionLevel, dataCodewords, oriMsk) {\n _classCallCheck(this, QrCode);\n /*-- Fields --*/\n // The width and height of this QR Code, measured in modules, between\n // 21 and 177 (inclusive). This is equal to version * 4 + 17.\n _defineProperty(this, \"size\", void 0);\n // The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).\n // Even if a QR Code is created with automatic masking requested (mask = -1),\n // the resulting object still has a mask value between 0 and 7.\n _defineProperty(this, \"mask\", void 0);\n // The modules of this QR Code (false = light, true = dark).\n // Immutable after constructor finishes. Accessed through getModule().\n _defineProperty(this, \"modules\", []);\n // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.\n _defineProperty(this, \"isFunction\", []);\n /*-- Constructor (low level) and fields --*/\n // The version number of this QR Code, which is between 1 and 40 (inclusive).\n // This determines the size of this barcode.\n _defineProperty(this, \"version\", void 0);\n // The error correction level used in this QR Code.\n _defineProperty(this, \"errorCorrectionLevel\", void 0);\n var msk = oriMsk;\n this.version = version;\n this.errorCorrectionLevel = errorCorrectionLevel;\n // Check scalar arguments\n if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION) throw new RangeError('Version value out of range');\n if (msk < -1 || msk > 7) throw new RangeError('Mask value out of range');\n this.size = version * 4 + 17;\n\n // Initialize both grids to be size*size arrays of Boolean false\n var row = [];\n for (var i = 0; i < this.size; i++) row.push(false);\n for (var _i = 0; _i < this.size; _i++) {\n this.modules.push(row.slice()); // Initially all light\n this.isFunction.push(row.slice());\n }\n\n // Compute ECC, draw modules\n this.drawFunctionPatterns();\n var allCodewords = this.addEccAndInterleave(dataCodewords);\n this.drawCodewords(allCodewords);\n\n // Do masking\n if (msk == -1) {\n // Automatically choose best mask\n var minPenalty = 1000000000;\n for (var _i2 = 0; _i2 < 8; _i2++) {\n this.applyMask(_i2);\n this.drawFormatBits(_i2);\n var penalty = this.getPenaltyScore();\n if (penalty < minPenalty) {\n msk = _i2;\n minPenalty = penalty;\n }\n this.applyMask(_i2); // Undoes the mask due to XOR\n }\n }\n assert(0 <= msk && msk <= 7);\n this.mask = msk;\n this.applyMask(msk); // Apply the final choice of mask\n this.drawFormatBits(msk); // Overwrite old format bits\n\n this.isFunction = [];\n }\n\n /*-- Accessor methods --*/\n\n // Returns the color of the module (pixel) at the given coordinates, which is false\n // for light or true for dark. The top left corner has the coordinates (x=0, y=0).\n // If the given coordinates are out of bounds, then false (light) is returned.\n _createClass(QrCode, [{\n key: \"getModule\",\n value: function getModule(x, y) {\n return 0 <= x && x < this.size && 0 <= y && y < this.size && this.modules[y][x];\n }\n\n // Modified to expose modules for easy access\n }, {\n key: \"getModules\",\n value: function getModules() {\n return this.modules;\n }\n\n /*-- Private helper methods for constructor: Drawing function modules --*/\n\n // Reads this object's version field, and draws and marks all function modules.\n }, {\n key: \"drawFunctionPatterns\",\n value: function drawFunctionPatterns() {\n // Draw horizontal and vertical timing patterns\n for (var i = 0; i < this.size; i++) {\n this.setFunctionModule(6, i, i % 2 == 0);\n this.setFunctionModule(i, 6, i % 2 == 0);\n }\n\n // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)\n this.drawFinderPattern(3, 3);\n this.drawFinderPattern(this.size - 4, 3);\n this.drawFinderPattern(3, this.size - 4);\n\n // Draw numerous alignment patterns\n var alignPatPos = this.getAlignmentPatternPositions();\n var numAlign = alignPatPos.length;\n for (var _i3 = 0; _i3 < numAlign; _i3++) {\n for (var j = 0; j < numAlign; j++) {\n // Don't draw on the three finder corners\n if (!(_i3 == 0 && j == 0 || _i3 == 0 && j == numAlign - 1 || _i3 == numAlign - 1 && j == 0)) this.drawAlignmentPattern(alignPatPos[_i3], alignPatPos[j]);\n }\n }\n\n // Draw configuration data\n this.drawFormatBits(0); // Dummy mask value; overwritten later in the constructor\n this.drawVersion();\n }\n\n // Draws two copies of the format bits (with its own error correction code)\n // based on the given mask and this object's error correction level field.\n }, {\n key: \"drawFormatBits\",\n value: function drawFormatBits(mask) {\n // Calculate error correction code and pack bits\n var data = this.errorCorrectionLevel.formatBits << 3 | mask; // errCorrLvl is unumber2, mask is unumber3\n var rem = data;\n for (var i = 0; i < 10; i++) rem = rem << 1 ^ (rem >>> 9) * 0x537;\n var bits = (data << 10 | rem) ^ 0x5412; // unumber15\n assert(bits >>> 15 == 0);\n\n // Draw first copy\n for (var _i4 = 0; _i4 <= 5; _i4++) this.setFunctionModule(8, _i4, getBit(bits, _i4));\n this.setFunctionModule(8, 7, getBit(bits, 6));\n this.setFunctionModule(8, 8, getBit(bits, 7));\n this.setFunctionModule(7, 8, getBit(bits, 8));\n for (var _i5 = 9; _i5 < 15; _i5++) this.setFunctionModule(14 - _i5, 8, getBit(bits, _i5));\n\n // Draw second copy\n for (var _i6 = 0; _i6 < 8; _i6++) this.setFunctionModule(this.size - 1 - _i6, 8, getBit(bits, _i6));\n for (var _i7 = 8; _i7 < 15; _i7++) this.setFunctionModule(8, this.size - 15 + _i7, getBit(bits, _i7));\n this.setFunctionModule(8, this.size - 8, true); // Always dark\n }\n\n // Draws two copies of the version bits (with its own error correction code),\n // based on this object's version field, iff 7 <= version <= 40.\n }, {\n key: \"drawVersion\",\n value: function drawVersion() {\n if (this.version < 7) return;\n\n // Calculate error correction code and pack bits\n var rem = this.version; // version is unumber6, in the range [7, 40]\n for (var i = 0; i < 12; i++) rem = rem << 1 ^ (rem >>> 11) * 0x1f25;\n var bits = this.version << 12 | rem; // unumber18\n assert(bits >>> 18 == 0);\n\n // Draw two copies\n for (var _i8 = 0; _i8 < 18; _i8++) {\n var color = getBit(bits, _i8);\n var a = this.size - 11 + _i8 % 3;\n var b = Math.floor(_i8 / 3);\n this.setFunctionModule(a, b, color);\n this.setFunctionModule(b, a, color);\n }\n }\n\n // Draws a 9*9 finder pattern including the border separator,\n // with the center module at (x, y). Modules can be out of bounds.\n }, {\n key: \"drawFinderPattern\",\n value: function drawFinderPattern(x, y) {\n for (var dy = -4; dy <= 4; dy++) {\n for (var dx = -4; dx <= 4; dx++) {\n var dist = Math.max(Math.abs(dx), Math.abs(dy)); // Chebyshev/infinity norm\n var xx = x + dx;\n var yy = y + dy;\n if (0 <= xx && xx < this.size && 0 <= yy && yy < this.size) this.setFunctionModule(xx, yy, dist != 2 && dist != 4);\n }\n }\n }\n\n // Draws a 5*5 alignment pattern, with the center module\n // at (x, y). All modules must be in bounds.\n }, {\n key: \"drawAlignmentPattern\",\n value: function drawAlignmentPattern(x, y) {\n for (var dy = -2; dy <= 2; dy++) {\n for (var dx = -2; dx <= 2; dx++) this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1);\n }\n }\n\n // Sets the color of a module and marks it as a function module.\n // Only used by the constructor. Coordinates must be in bounds.\n }, {\n key: \"setFunctionModule\",\n value: function setFunctionModule(x, y, isDark) {\n this.modules[y][x] = isDark;\n this.isFunction[y][x] = true;\n }\n\n /*-- Private helper methods for constructor: Codewords and masking --*/\n\n // Returns a new byte string representing the given data with the appropriate error correction\n // codewords appended to it, based on this object's version and error correction level.\n }, {\n key: \"addEccAndInterleave\",\n value: function addEccAndInterleave(data) {\n var ver = this.version;\n var ecl = this.errorCorrectionLevel;\n if (data.length != QrCode.getNumDataCodewords(ver, ecl)) throw new RangeError('Invalid argument');\n\n // Calculate parameter numbers\n var numBlocks = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n var blockEccLen = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver];\n var rawCodewords = Math.floor(QrCode.getNumRawDataModules(ver) / 8);\n var numShortBlocks = numBlocks - rawCodewords % numBlocks;\n var shortBlockLen = Math.floor(rawCodewords / numBlocks);\n\n // Split data numbero blocks and append ECC to each block\n var blocks = [];\n var rsDiv = QrCode.reedSolomonComputeDivisor(blockEccLen);\n for (var i = 0, k = 0; i < numBlocks; i++) {\n var dat = data.slice(k, k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1));\n k += dat.length;\n var ecc = QrCode.reedSolomonComputeRemainder(dat, rsDiv);\n if (i < numShortBlocks) dat.push(0);\n blocks.push(dat.concat(ecc));\n }\n\n // Interleave (not concatenate) the bytes from every block numbero a single sequence\n var result = [];\n var _loop = function _loop(_i9) {\n blocks.forEach(function (block, j) {\n // Skip the padding byte in short blocks\n if (_i9 != shortBlockLen - blockEccLen || j >= numShortBlocks) result.push(block[_i9]);\n });\n };\n for (var _i9 = 0; _i9 < blocks[0].length; _i9++) {\n _loop(_i9);\n }\n assert(result.length == rawCodewords);\n return result;\n }\n\n // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire\n // data area of this QR Code. Function modules need to be marked off before this is called.\n }, {\n key: \"drawCodewords\",\n value: function drawCodewords(data) {\n if (data.length != Math.floor(QrCode.getNumRawDataModules(this.version) / 8)) throw new RangeError('Invalid argument');\n var i = 0; // Bit index numbero the data\n // Do the funny zigzag scan\n for (var right = this.size - 1; right >= 1; right -= 2) {\n // Index of right column in each column pair\n if (right == 6) right = 5;\n for (var vert = 0; vert < this.size; vert++) {\n // Vertical counter\n for (var j = 0; j < 2; j++) {\n var x = right - j; // Actual x coordinate\n var upward = (right + 1 & 2) == 0;\n var y = upward ? this.size - 1 - vert : vert; // Actual y coordinate\n if (!this.isFunction[y][x] && i < data.length * 8) {\n this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7));\n i++;\n }\n // If this QR Code has any remainder bits (0 to 7), they were assigned as\n // 0/false/light by the constructor and are left unchanged by this method\n }\n }\n }\n assert(i == data.length * 8);\n }\n\n // XORs the codeword modules in this QR Code with the given mask pattern.\n // The function modules must be marked and the codeword bits must be drawn\n // before masking. Due to the arithmetic of XOR, calling applyMask() with\n // the same mask value a second time will undo the mask. A final well-formed\n // QR Code needs exactly one (not zero, two, etc.) mask applied.\n }, {\n key: \"applyMask\",\n value: function applyMask(mask) {\n if (mask < 0 || mask > 7) throw new RangeError('Mask value out of range');\n for (var y = 0; y < this.size; y++) {\n for (var x = 0; x < this.size; x++) {\n var invert = void 0;\n switch (mask) {\n case 0:\n invert = (x + y) % 2 == 0;\n break;\n case 1:\n invert = y % 2 == 0;\n break;\n case 2:\n invert = x % 3 == 0;\n break;\n case 3:\n invert = (x + y) % 3 == 0;\n break;\n case 4:\n invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0;\n break;\n case 5:\n invert = x * y % 2 + x * y % 3 == 0;\n break;\n case 6:\n invert = (x * y % 2 + x * y % 3) % 2 == 0;\n break;\n case 7:\n invert = ((x + y) % 2 + x * y % 3) % 2 == 0;\n break;\n default:\n throw new Error('Unreachable');\n }\n if (!this.isFunction[y][x] && invert) this.modules[y][x] = !this.modules[y][x];\n }\n }\n }\n\n // Calculates and returns the penalty score based on state of this QR Code's current modules.\n // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.\n }, {\n key: \"getPenaltyScore\",\n value: function getPenaltyScore() {\n var result = 0;\n\n // Adjacent modules in row having same color, and finder-like patterns\n for (var y = 0; y < this.size; y++) {\n var runColor = false;\n var runX = 0;\n var runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (var x = 0; x < this.size; x++) {\n if (this.modules[y][x] == runColor) {\n runX++;\n if (runX == 5) result += QrCode.PENALTY_N1;else if (runX > 5) result++;\n } else {\n this.finderPenaltyAddHistory(runX, runHistory);\n if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3;\n runColor = this.modules[y][x];\n runX = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3;\n }\n // Adjacent modules in column having same color, and finder-like patterns\n for (var _x = 0; _x < this.size; _x++) {\n var _runColor = false;\n var runY = 0;\n var _runHistory = [0, 0, 0, 0, 0, 0, 0];\n for (var _y = 0; _y < this.size; _y++) {\n if (this.modules[_y][_x] == _runColor) {\n runY++;\n if (runY == 5) result += QrCode.PENALTY_N1;else if (runY > 5) result++;\n } else {\n this.finderPenaltyAddHistory(runY, _runHistory);\n if (!_runColor) result += this.finderPenaltyCountPatterns(_runHistory) * QrCode.PENALTY_N3;\n _runColor = this.modules[_y][_x];\n runY = 1;\n }\n }\n result += this.finderPenaltyTerminateAndCount(_runColor, runY, _runHistory) * QrCode.PENALTY_N3;\n }\n\n // 2*2 blocks of modules having same color\n for (var _y2 = 0; _y2 < this.size - 1; _y2++) {\n for (var _x2 = 0; _x2 < this.size - 1; _x2++) {\n var color = this.modules[_y2][_x2];\n if (color == this.modules[_y2][_x2 + 1] && color == this.modules[_y2 + 1][_x2] && color == this.modules[_y2 + 1][_x2 + 1]) result += QrCode.PENALTY_N2;\n }\n }\n\n // Balance of dark and light modules\n var dark = 0;\n var _iterator3 = _createForOfIteratorHelper(this.modules),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var row = _step3.value;\n dark = row.reduce(function (sum, color) {\n return sum + (color ? 1 : 0);\n }, dark);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n var total = this.size * this.size; // Note that size is odd, so dark/total != 1/2\n // Compute the smallest numbereger k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%\n var k = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1;\n assert(0 <= k && k <= 9);\n result += k * QrCode.PENALTY_N4;\n assert(0 <= result && result <= 2568888); // Non-tight upper bound based on default values of PENALTY_N1, ..., N4\n return result;\n }\n\n /*-- Private helper functions --*/\n\n // Returns an ascending list of positions of alignment patterns for this version number.\n // Each position is in the range [0,177), and are used on both the x and y axes.\n // This could be implemented as lookup table of 40 variable-length lists of numberegers.\n }, {\n key: \"getAlignmentPatternPositions\",\n value: function getAlignmentPatternPositions() {\n if (this.version == 1) return [];else {\n var numAlign = Math.floor(this.version / 7) + 2;\n var step = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;\n var result = [6];\n for (var pos = this.size - 7; result.length < numAlign; pos -= step) result.splice(1, 0, pos);\n return result;\n }\n }\n\n // Returns the number of data bits that can be stored in a QR Code of the given version number, after\n // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.\n // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.\n }, {\n key: \"finderPenaltyCountPatterns\",\n value:\n // Can only be called immediately after a light run is added, and\n // returns either 0, 1, or 2. A helper function for getPenaltyScore().\n function finderPenaltyCountPatterns(runHistory) {\n var n = runHistory[1];\n assert(n <= this.size * 3);\n var core = n > 0 && runHistory[2] == n && runHistory[3] == n * 3 && runHistory[4] == n && runHistory[5] == n;\n return (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0) + (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0);\n }\n\n // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().\n }, {\n key: \"finderPenaltyTerminateAndCount\",\n value: function finderPenaltyTerminateAndCount(currentRunColor, oriCurrentRunLength, runHistory) {\n var currentRunLength = oriCurrentRunLength;\n if (currentRunColor) {\n // Terminate dark run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n currentRunLength = 0;\n }\n currentRunLength += this.size; // Add light border to final run\n this.finderPenaltyAddHistory(currentRunLength, runHistory);\n return this.finderPenaltyCountPatterns(runHistory);\n }\n\n // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().\n }, {\n key: \"finderPenaltyAddHistory\",\n value: function finderPenaltyAddHistory(oriCurrentRunLength, runHistory) {\n var currentRunLength = oriCurrentRunLength;\n if (runHistory[0] == 0) currentRunLength += this.size; // Add light border to initial run\n runHistory.pop();\n runHistory.unshift(currentRunLength);\n }\n\n /*-- Constants and tables --*/\n\n // The minimum version number supported in the QR Code Model 2 standard.\n }], [{\n key: \"encodeText\",\n value: /*-- Static factory functions (high level) --*/\n\n // Returns a QR Code representing the given Unicode text string at the given error correction level.\n // As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer\n // Unicode code ponumbers (not UTF-16 code units) if the low error correction level is used. The smallest possible\n // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the\n // ecl argument if it can be done without increasing the version.\n function encodeText(text, ecl) {\n var segs = QrSegment.makeSegments(text);\n return QrCode.encodeSegments(segs, ecl);\n }\n\n // Returns a QR Code representing the given binary data at the given error correction level.\n // This function always encodes using the binary segment mode, not any text mode. The maximum number of\n // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.\n // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.\n }, {\n key: \"encodeBinary\",\n value: function encodeBinary(data, ecl) {\n var seg = QrSegment.makeBytes(data);\n return QrCode.encodeSegments([seg], ecl);\n }\n\n /*-- Static factory functions (mid level) --*/\n\n // Returns a QR Code representing the given segments with the given encoding parameters.\n // The smallest possible QR Code version within the given range is automatically\n // chosen for the output. Iff boostEcl is true, then the ECC level of the result\n // may be higher than the ecl argument if it can be done without increasing the\n // version. The mask number is either between 0 to 7 (inclusive) to force that\n // mask, or -1 to automatically choose an appropriate mask (which may be slow).\n // This function allows the user to create a custom sequence of segments that switches\n // between modes (such as alphanumeric and byte) to encode text in less space.\n // This is a mid-level API; the high-level API is encodeText() and encodeBinary().\n }, {\n key: \"encodeSegments\",\n value: function encodeSegments(segs, oriEcl) {\n var minVersion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var maxVersion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 40;\n var mask = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;\n var boostEcl = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n if (!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION) || mask < -1 || mask > 7) throw new RangeError('Invalid value');\n\n // Find the minimal version number to use\n var version;\n var dataUsedBits;\n for (version = minVersion;; version++) {\n var _dataCapacityBits = QrCode.getNumDataCodewords(version, oriEcl) * 8; // Number of data bits available\n var usedBits = QrSegment.getTotalBits(segs, version);\n if (usedBits <= _dataCapacityBits) {\n dataUsedBits = usedBits;\n break; // This version number is found to be suitable\n }\n if (version >= maxVersion)\n // All versions in the range could not fit the given data\n throw new RangeError('Data too long');\n }\n var ecl = oriEcl;\n // Increase the error correction level while the data still fits in the current version number\n for (var _i10 = 0, _arr = [Ecc.MEDIUM, Ecc.QUARTILE, Ecc.HIGH]; _i10 < _arr.length; _i10++) {\n var newEcl = _arr[_i10];\n // From low to high\n if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8) ecl = newEcl;\n }\n\n // Concatenate all segments to create the data bit string\n var bb = [];\n var _iterator4 = _createForOfIteratorHelper(segs),\n _step4;\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var seg = _step4.value;\n appendBits(seg.mode.modeBits, 4, bb);\n appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);\n var _iterator5 = _createForOfIteratorHelper(seg.getData()),\n _step5;\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var b = _step5.value;\n bb.push(b);\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n assert(bb.length == dataUsedBits);\n\n // Add terminator and pad up to a byte if applicable\n var dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8;\n assert(bb.length <= dataCapacityBits);\n appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb);\n appendBits(0, (8 - bb.length % 8) % 8, bb);\n assert(bb.length % 8 == 0);\n\n // Pad with alternating bytes until data capacity is reached\n for (var padByte = 0xec; bb.length < dataCapacityBits; padByte ^= 0xec ^ 0x11) appendBits(padByte, 8, bb);\n\n // Pack bits numbero bytes in big endian\n var dataCodewords = [];\n while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0);\n bb.forEach(function (b, i) {\n return dataCodewords[i >>> 3] |= b << 7 - (i & 7);\n });\n\n // Create the QR Code object\n return new QrCode(version, ecl, dataCodewords, mask);\n }\n }, {\n key: \"getNumRawDataModules\",\n value: function getNumRawDataModules(ver) {\n if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION) throw new RangeError('Version number out of range');\n var result = (16 * ver + 128) * ver + 64;\n if (ver >= 2) {\n var numAlign = Math.floor(ver / 7) + 2;\n result -= (25 * numAlign - 10) * numAlign - 55;\n if (ver >= 7) result -= 36;\n }\n assert(208 <= result && result <= 29648);\n return result;\n }\n\n // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any\n // QR Code of the given version number and error correction level, with remainder bits discarded.\n // This stateless pure function could be implemented as a (40*4)-cell lookup table.\n }, {\n key: \"getNumDataCodewords\",\n value: function getNumDataCodewords(ver, ecl) {\n return Math.floor(QrCode.getNumRawDataModules(ver) / 8) - QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] * QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver];\n }\n\n // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be\n // implemented as a lookup table over all possible parameter values, instead of as an algorithm.\n }, {\n key: \"reedSolomonComputeDivisor\",\n value: function reedSolomonComputeDivisor(degree) {\n if (degree < 1 || degree > 255) throw new RangeError('Degree out of range');\n // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.\n // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the unumber8 array [255, 8, 93].\n var result = [];\n for (var i = 0; i < degree - 1; i++) result.push(0);\n result.push(1); // Start off with the monomial x^0\n\n // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),\n // and drop the highest monomial term which is always 1x^degree.\n // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).\n var root = 1;\n for (var _i11 = 0; _i11 < degree; _i11++) {\n // Multiply the current product by (x - r^i)\n for (var j = 0; j < result.length; j++) {\n result[j] = QrCode.reedSolomonMultiply(result[j], root);\n if (j + 1 < result.length) result[j] ^= result[j + 1];\n }\n root = QrCode.reedSolomonMultiply(root, 0x02);\n }\n return result;\n }\n\n // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.\n }, {\n key: \"reedSolomonComputeRemainder\",\n value: function reedSolomonComputeRemainder(data, divisor) {\n var result = divisor.map(function () {\n return 0;\n });\n var _iterator6 = _createForOfIteratorHelper(data),\n _step6;\n try {\n var _loop2 = function _loop2() {\n var b = _step6.value;\n // Polynomial division\n var factor = b ^ result.shift();\n result.push(0);\n divisor.forEach(function (coef, i) {\n return result[i] ^= QrCode.reedSolomonMultiply(coef, factor);\n });\n };\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n _loop2();\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n return result;\n }\n\n // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result\n // are unsigned 8-bit numberegers. This could be implemented as a lookup table of 256*256 entries of unumber8.\n }, {\n key: \"reedSolomonMultiply\",\n value: function reedSolomonMultiply(x, y) {\n if (x >>> 8 != 0 || y >>> 8 != 0) throw new RangeError('Byte out of range');\n // Russian peasant multiplication\n var z = 0;\n for (var i = 7; i >= 0; i--) {\n z = z << 1 ^ (z >>> 7) * 0x11d;\n z ^= (y >>> i & 1) * x;\n }\n assert(z >>> 8 == 0);\n return z;\n }\n }]);\n return QrCode;\n}();\n_defineProperty(QrCode, \"MIN_VERSION\", 1);\n// The maximum version number supported in the QR Code Model 2 standard.\n_defineProperty(QrCode, \"MAX_VERSION\", 40);\n// For use in getPenaltyScore(), when evaluating which mask is best.\n_defineProperty(QrCode, \"PENALTY_N1\", 3);\n_defineProperty(QrCode, \"PENALTY_N2\", 3);\n_defineProperty(QrCode, \"PENALTY_N3\", 40);\n_defineProperty(QrCode, \"PENALTY_N4\", 10);\n_defineProperty(QrCode, \"ECC_CODEWORDS_PER_BLOCK\", [\n// Version: (note that index 0 is for padding, and is set to an illegal value)\n//0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n[-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],\n// Low\n[-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],\n// Medium\n[-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],\n// Quartile\n[-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30] // High\n]);\n_defineProperty(QrCode, \"NUM_ERROR_CORRECTION_BLOCKS\", [\n// Version: (note that index 0 is for padding, and is set to an illegal value)\n//0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level\n[-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25],\n// Low\n[-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49],\n// Medium\n[-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68],\n// Quartile\n[-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81] // High\n]);","// Part logic is from `qrcode.react`. (ISC License)\n// https://github.com/zpao/qrcode.react\n\n// ==========================================================\n\nimport { Ecc } from \"./libs/qrcodegen\";\n\n// =================== ERROR_LEVEL ==========================\nexport var ERROR_LEVEL_MAP = {\n L: Ecc.LOW,\n M: Ecc.MEDIUM,\n Q: Ecc.QUARTILE,\n H: Ecc.HIGH\n};\n\n// =================== DEFAULT_VALUE ==========================\nexport var DEFAULT_SIZE = 128;\nexport var DEFAULT_LEVEL = 'L';\nexport var DEFAULT_BACKGROUND_COLOR = '#FFFFFF';\nexport var DEFAULT_FRONT_COLOR = '#000000';\nexport var DEFAULT_NEED_MARGIN = false;\nexport var DEFAULT_MINVERSION = 1;\nexport var SPEC_MARGIN_SIZE = 4;\nexport var DEFAULT_MARGIN_SIZE = 0;\nexport var DEFAULT_IMG_SCALE = 0.1;\n\n// =================== UTILS ==========================\n/**\n * Generate a path string from modules\n * @param modules\n * @param margin \n * @returns \n */\nexport function generatePath(modules) {\n var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var ops = [];\n modules.forEach(function (row, y) {\n var start = null;\n row.forEach(function (cell, x) {\n if (!cell && start !== null) {\n ops.push(\"M\".concat(start + margin, \" \").concat(y + margin, \"h\").concat(x - start, \"v1H\").concat(start + margin, \"z\"));\n start = null;\n return;\n }\n if (x === row.length - 1) {\n if (!cell) {\n return;\n }\n if (start === null) {\n ops.push(\"M\".concat(x + margin, \",\").concat(y + margin, \" h1v1H\").concat(x + margin, \"z\"));\n } else {\n ops.push(\"M\".concat(start + margin, \",\").concat(y + margin, \" h\").concat(x + 1 - start, \"v1H\").concat(start + margin, \"z\"));\n }\n return;\n }\n if (cell && start === null) {\n start = x;\n }\n });\n });\n return ops.join('');\n}\n/**\n * Excavate modules\n * @param modules \n * @param excavation \n * @returns \n */\nexport function excavateModules(modules, excavation) {\n return modules.slice().map(function (row, y) {\n if (y < excavation.y || y >= excavation.y + excavation.h) {\n return row;\n }\n return row.map(function (cell, x) {\n if (x < excavation.x || x >= excavation.x + excavation.w) {\n return cell;\n }\n return false;\n });\n });\n}\n\n/**\n * Get image settings\n * @param cells The modules of the QR code\n * @param size The size of the QR code\n * @param margin \n * @param imageSettings \n * @returns \n */\nexport function getImageSettings(cells, size, margin, imageSettings) {\n if (imageSettings == null) {\n return null;\n }\n var numCells = cells.length + margin * 2;\n var defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);\n var scale = numCells / size;\n var w = (imageSettings.width || defaultSize) * scale;\n var h = (imageSettings.height || defaultSize) * scale;\n var x = imageSettings.x == null ? cells.length / 2 - w / 2 : imageSettings.x * scale;\n var y = imageSettings.y == null ? cells.length / 2 - h / 2 : imageSettings.y * scale;\n var opacity = imageSettings.opacity == null ? 1 : imageSettings.opacity;\n var excavation = null;\n if (imageSettings.excavate) {\n var floorX = Math.floor(x);\n var floorY = Math.floor(y);\n var ceilW = Math.ceil(w + x - floorX);\n var ceilH = Math.ceil(h + y - floorY);\n excavation = {\n x: floorX,\n y: floorY,\n w: ceilW,\n h: ceilH\n };\n }\n var crossOrigin = imageSettings.crossOrigin;\n return {\n x: x,\n y: y,\n h: h,\n w: w,\n excavation: excavation,\n opacity: opacity,\n crossOrigin: crossOrigin\n };\n}\n\n/**\n * Get margin size\n * @param needMargin Whether need margin\n * @param marginSize Custom margin size\n * @returns \n */\nexport function getMarginSize(needMargin, marginSize) {\n if (marginSize != null) {\n return Math.floor(marginSize);\n }\n return needMargin ? SPEC_MARGIN_SIZE : DEFAULT_MARGIN_SIZE;\n}\n/**\n * Check if Path2D is supported\n */\nexport var isSupportPath2d = function () {\n try {\n new Path2D().addPath(new Path2D());\n } catch (e) {\n return false;\n }\n return true;\n}();","import { QrCode, QrSegment } from \"../libs/qrcodegen\";\nimport { ERROR_LEVEL_MAP, getImageSettings, getMarginSize } from \"../utils\";\nimport { useMemo } from 'react';\nexport function useQRCode(_ref) {\n var value = _ref.value,\n level = _ref.level,\n minVersion = _ref.minVersion,\n includeMargin = _ref.includeMargin,\n marginSize = _ref.marginSize,\n imageSettings = _ref.imageSettings,\n size = _ref.size;\n var qrcode = useMemo(function () {\n var segments = QrSegment.makeSegments(value);\n return QrCode.encodeSegments(segments, ERROR_LEVEL_MAP[level], minVersion);\n }, [value, level, minVersion]);\n var _useMemo = useMemo(function () {\n var cs = qrcode.getModules();\n var mg = getMarginSize(includeMargin, marginSize);\n var ncs = cs.length + mg * 2;\n var cis = getImageSettings(cs, size, mg, imageSettings);\n return {\n cells: cs,\n margin: mg,\n numCells: ncs,\n calculatedImageSettings: cis\n };\n }, [qrcode, size, imageSettings, includeMargin, marginSize]),\n cells = _useMemo.cells,\n margin = _useMemo.margin,\n numCells = _useMemo.numCells,\n calculatedImageSettings = _useMemo.calculatedImageSettings;\n return {\n qrcode: qrcode,\n margin: margin,\n cells: cells,\n numCells: numCells,\n calculatedImageSettings: calculatedImageSettings\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"value\", \"size\", \"level\", \"bgColor\", \"fgColor\", \"includeMargin\", \"minVersion\", \"marginSize\", \"style\", \"imageSettings\"];\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useQRCode } from \"./hooks/useQRCode\";\nimport { DEFAULT_BACKGROUND_COLOR, DEFAULT_FRONT_COLOR, DEFAULT_NEED_MARGIN, DEFAULT_LEVEL, DEFAULT_MINVERSION, DEFAULT_SIZE, isSupportPath2d, excavateModules, generatePath } from \"./utils\";\nvar QRCodeCanvas = /*#__PURE__*/React.forwardRef(function QRCodeCanvas(props, forwardedRef) {\n var value = props.value,\n _props$size = props.size,\n size = _props$size === void 0 ? DEFAULT_SIZE : _props$size,\n _props$level = props.level,\n level = _props$level === void 0 ? DEFAULT_LEVEL : _props$level,\n _props$bgColor = props.bgColor,\n bgColor = _props$bgColor === void 0 ? DEFAULT_BACKGROUND_COLOR : _props$bgColor,\n _props$fgColor = props.fgColor,\n fgColor = _props$fgColor === void 0 ? DEFAULT_FRONT_COLOR : _props$fgColor,\n _props$includeMargin = props.includeMargin,\n includeMargin = _props$includeMargin === void 0 ? DEFAULT_NEED_MARGIN : _props$includeMargin,\n _props$minVersion = props.minVersion,\n minVersion = _props$minVersion === void 0 ? DEFAULT_MINVERSION : _props$minVersion,\n marginSize = props.marginSize,\n style = props.style,\n imageSettings = props.imageSettings,\n otherProps = _objectWithoutProperties(props, _excluded);\n var imgSrc = imageSettings === null || imageSettings === void 0 ? void 0 : imageSettings.src;\n var _canvas = useRef(null);\n var _image = useRef(null);\n var setCanvasRef = useCallback(function (node) {\n _canvas.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }, [forwardedRef]);\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n setIsImageLoaded = _useState2[1];\n var _useQRCode = useQRCode({\n value: value,\n level: level,\n minVersion: minVersion,\n includeMargin: includeMargin,\n marginSize: marginSize,\n imageSettings: imageSettings,\n size: size\n }),\n margin = _useQRCode.margin,\n cells = _useQRCode.cells,\n numCells = _useQRCode.numCells,\n calculatedImageSettings = _useQRCode.calculatedImageSettings;\n useEffect(function () {\n if (_canvas.current != null) {\n var canvas = _canvas.current;\n var ctx = canvas.getContext('2d');\n if (!ctx) {\n return;\n }\n var cellsToDraw = cells;\n var image = _image.current;\n var haveImageToRender = calculatedImageSettings != null && image !== null && image.complete && image.naturalHeight !== 0 && image.naturalWidth !== 0;\n if (haveImageToRender) {\n if (calculatedImageSettings.excavation != null) {\n cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);\n }\n }\n var pixelRatio = window.devicePixelRatio || 1;\n canvas.height = canvas.width = size * pixelRatio;\n var scale = size / numCells * pixelRatio;\n ctx.scale(scale, scale);\n ctx.fillStyle = bgColor;\n ctx.fillRect(0, 0, numCells, numCells);\n ctx.fillStyle = fgColor;\n if (isSupportPath2d) {\n ctx.fill(new Path2D(generatePath(cellsToDraw, margin)));\n } else {\n cells.forEach(function (row, rdx) {\n row.forEach(function (cell, cdx) {\n if (cell) {\n ctx.fillRect(cdx + margin, rdx + margin, 1, 1);\n }\n });\n });\n }\n if (calculatedImageSettings) {\n ctx.globalAlpha = calculatedImageSettings.opacity;\n }\n if (haveImageToRender) {\n ctx.drawImage(image, calculatedImageSettings.x + margin, calculatedImageSettings.y + margin, calculatedImageSettings.w, calculatedImageSettings.h);\n }\n }\n });\n useEffect(function () {\n setIsImageLoaded(false);\n }, [imgSrc]);\n var canvasStyle = _objectSpread({\n height: size,\n width: size\n }, style);\n var img = null;\n if (imgSrc != null) {\n img = /*#__PURE__*/React.createElement(\"img\", {\n src: imgSrc,\n key: imgSrc,\n style: {\n display: 'none'\n },\n onLoad: function onLoad() {\n setIsImageLoaded(true);\n },\n ref: _image\n // when crossOrigin is not set, the image will be tainted\n // and the canvas cannot be exported to an image\n ,\n crossOrigin: calculatedImageSettings === null || calculatedImageSettings === void 0 ? void 0 : calculatedImageSettings.crossOrigin\n });\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"canvas\", _extends({\n style: canvasStyle,\n height: size,\n width: size,\n ref: setCanvasRef,\n role: \"img\"\n }, otherProps)), img);\n});\nQRCodeCanvas.displayName = 'QRCodeCanvas';\nexport { QRCodeCanvas };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"value\", \"size\", \"level\", \"bgColor\", \"fgColor\", \"includeMargin\", \"minVersion\", \"title\", \"marginSize\", \"imageSettings\"];\nimport React from 'react';\nimport { DEFAULT_BACKGROUND_COLOR, DEFAULT_FRONT_COLOR, DEFAULT_NEED_MARGIN, DEFAULT_LEVEL, DEFAULT_MINVERSION, DEFAULT_SIZE, excavateModules, generatePath } from \"./utils\";\nimport { useQRCode } from \"./hooks/useQRCode\";\nvar QRCodeSVG = /*#__PURE__*/React.forwardRef(function QRCodeSVG(props, forwardedRef) {\n var value = props.value,\n _props$size = props.size,\n size = _props$size === void 0 ? DEFAULT_SIZE : _props$size,\n _props$level = props.level,\n level = _props$level === void 0 ? DEFAULT_LEVEL : _props$level,\n _props$bgColor = props.bgColor,\n bgColor = _props$bgColor === void 0 ? DEFAULT_BACKGROUND_COLOR : _props$bgColor,\n _props$fgColor = props.fgColor,\n fgColor = _props$fgColor === void 0 ? DEFAULT_FRONT_COLOR : _props$fgColor,\n _props$includeMargin = props.includeMargin,\n includeMargin = _props$includeMargin === void 0 ? DEFAULT_NEED_MARGIN : _props$includeMargin,\n _props$minVersion = props.minVersion,\n minVersion = _props$minVersion === void 0 ? DEFAULT_MINVERSION : _props$minVersion,\n title = props.title,\n marginSize = props.marginSize,\n imageSettings = props.imageSettings,\n otherProps = _objectWithoutProperties(props, _excluded);\n var _useQRCode = useQRCode({\n value: value,\n level: level,\n minVersion: minVersion,\n includeMargin: includeMargin,\n marginSize: marginSize,\n imageSettings: imageSettings,\n size: size\n }),\n margin = _useQRCode.margin,\n cells = _useQRCode.cells,\n numCells = _useQRCode.numCells,\n calculatedImageSettings = _useQRCode.calculatedImageSettings;\n var cellsToDraw = cells;\n var image = null;\n if (imageSettings != null && calculatedImageSettings != null) {\n if (calculatedImageSettings.excavation != null) {\n cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);\n }\n image = /*#__PURE__*/React.createElement(\"image\", {\n href: imageSettings.src,\n height: calculatedImageSettings.h,\n width: calculatedImageSettings.w,\n x: calculatedImageSettings.x + margin,\n y: calculatedImageSettings.y + margin,\n preserveAspectRatio: \"none\",\n opacity: calculatedImageSettings.opacity\n // when crossOrigin is not set, the image will be tainted\n // and the canvas cannot be exported to an image\n ,\n crossOrigin: calculatedImageSettings.crossOrigin\n });\n }\n var fgPath = generatePath(cellsToDraw, margin);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n height: size,\n width: size,\n viewBox: \"0 0 \".concat(numCells, \" \").concat(numCells),\n ref: forwardedRef,\n role: \"img\"\n }, otherProps), !!title && /*#__PURE__*/React.createElement(\"title\", null, title), /*#__PURE__*/React.createElement(\"path\", {\n fill: bgColor,\n d: \"M0,0 h\".concat(numCells, \"v\").concat(numCells, \"H0z\"),\n shapeRendering: \"crispEdges\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n fill: fgColor,\n d: fgPath,\n shapeRendering: \"crispEdges\"\n }), image);\n});\nQRCodeSVG.displayName = 'QRCodeSVG';\nexport { QRCodeSVG };","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport * as React from 'react';\nfunction isConfigObj(closable) {\n return closable !== null && _typeof(closable) === 'object';\n}\n/**\n * Convert `closable` to ClosableConfig.\n * When `preset` is true, will auto fill ClosableConfig with default value.\n */\nfunction getClosableConfig(closable, closeIcon, preset) {\n if (closable === false || closeIcon === false && (!isConfigObj(closable) || !closable.closeIcon)) {\n return null;\n }\n var mergedCloseIcon = typeof closeIcon !== 'boolean' ? closeIcon : undefined;\n if (isConfigObj(closable)) {\n var _closable$closeIcon;\n return _objectSpread(_objectSpread({}, closable), {}, {\n closeIcon: (_closable$closeIcon = closable.closeIcon) !== null && _closable$closeIcon !== void 0 ? _closable$closeIcon : mergedCloseIcon\n });\n }\n\n // When StepClosable no need auto fill, but RootClosable need this.\n return preset || closable || closeIcon ? {\n closeIcon: mergedCloseIcon\n } : 'empty';\n}\nexport function useClosable(stepClosable, stepCloseIcon, closable, closeIcon) {\n return React.useMemo(function () {\n var stepClosableConfig = getClosableConfig(stepClosable, stepCloseIcon, false);\n var rootClosableConfig = getClosableConfig(closable, closeIcon, true);\n if (stepClosableConfig !== 'empty') {\n return stepClosableConfig;\n }\n return rootClosableConfig;\n }, [closable, closeIcon, stepClosable, stepCloseIcon]);\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport useEvent from \"rc-util/es/hooks/useEvent\";\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport { useMemo, useState } from 'react';\nimport { isInViewPort } from \"../util\";\nfunction isValidNumber(val) {\n return typeof val === 'number' && !Number.isNaN(val);\n}\nexport default function useTarget(target, open, gap, scrollIntoViewOptions) {\n // ========================= Target =========================\n // We trade `undefined` as not get target by function yet.\n // `null` as empty target.\n var _useState = useState(undefined),\n _useState2 = _slicedToArray(_useState, 2),\n targetElement = _useState2[0],\n setTargetElement = _useState2[1];\n useLayoutEffect(function () {\n var nextElement = typeof target === 'function' ? target() : target;\n setTargetElement(nextElement || null);\n });\n\n // ========================= Align ==========================\n var _useState3 = useState(null),\n _useState4 = _slicedToArray(_useState3, 2),\n posInfo = _useState4[0],\n setPosInfo = _useState4[1];\n var updatePos = useEvent(function () {\n if (targetElement) {\n // Exist target element. We should scroll and get target position\n if (!isInViewPort(targetElement) && open) {\n targetElement.scrollIntoView(scrollIntoViewOptions);\n }\n var _targetElement$getBou = targetElement.getBoundingClientRect(),\n left = _targetElement$getBou.left,\n top = _targetElement$getBou.top,\n width = _targetElement$getBou.width,\n height = _targetElement$getBou.height;\n var nextPosInfo = {\n left: left,\n top: top,\n width: width,\n height: height,\n radius: 0\n };\n setPosInfo(function (origin) {\n if (JSON.stringify(origin) !== JSON.stringify(nextPosInfo)) {\n return nextPosInfo;\n }\n return origin;\n });\n } else {\n // Not exist target which means we just show in center\n setPosInfo(null);\n }\n });\n var getGapOffset = function getGapOffset(index) {\n var _ref;\n return (_ref = Array.isArray(gap === null || gap === void 0 ? void 0 : gap.offset) ? gap === null || gap === void 0 ? void 0 : gap.offset[index] : gap === null || gap === void 0 ? void 0 : gap.offset) !== null && _ref !== void 0 ? _ref : 6;\n };\n useLayoutEffect(function () {\n updatePos();\n // update when window resize\n window.addEventListener('resize', updatePos);\n return function () {\n window.removeEventListener('resize', updatePos);\n };\n }, [targetElement, open, updatePos]);\n\n // ======================== PosInfo =========================\n var mergedPosInfo = useMemo(function () {\n if (!posInfo) {\n return posInfo;\n }\n var gapOffsetX = getGapOffset(0);\n var gapOffsetY = getGapOffset(1);\n var gapRadius = isValidNumber(gap === null || gap === void 0 ? void 0 : gap.radius) ? gap === null || gap === void 0 ? void 0 : gap.radius : 2;\n return {\n left: posInfo.left - gapOffsetX,\n top: posInfo.top - gapOffsetY,\n width: posInfo.width + gapOffsetX * 2,\n height: posInfo.height + gapOffsetY * 2,\n radius: gapRadius\n };\n }, [posInfo, gap]);\n return [mergedPosInfo, targetElement];\n}","export function isInViewPort(element) {\n var viewWidth = window.innerWidth || document.documentElement.clientWidth;\n var viewHeight = window.innerHeight || document.documentElement.clientHeight;\n var _element$getBoundingC = element.getBoundingClientRect(),\n top = _element$getBoundingC.top,\n right = _element$getBoundingC.right,\n bottom = _element$getBoundingC.bottom,\n left = _element$getBoundingC.left;\n return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;\n}\nexport function getPlacement(targetElement, placement, stepPlacement) {\n var _ref;\n return (_ref = stepPlacement !== null && stepPlacement !== void 0 ? stepPlacement : placement) !== null && _ref !== void 0 ? _ref : targetElement === null ? 'center' : 'bottom';\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport Portal from '@rc-component/portal';\nimport useId from \"rc-util/es/hooks/useId\";\nvar COVER_PROPS = {\n fill: 'transparent',\n pointerEvents: 'auto'\n};\nvar Mask = function Mask(props) {\n var prefixCls = props.prefixCls,\n rootClassName = props.rootClassName,\n pos = props.pos,\n showMask = props.showMask,\n _props$style = props.style,\n style = _props$style === void 0 ? {} : _props$style,\n _props$fill = props.fill,\n fill = _props$fill === void 0 ? \"rgba(0,0,0,0.5)\" : _props$fill,\n open = props.open,\n animated = props.animated,\n zIndex = props.zIndex,\n disabledInteraction = props.disabledInteraction;\n var id = useId();\n var maskId = \"\".concat(prefixCls, \"-mask-\").concat(id);\n var mergedAnimated = _typeof(animated) === 'object' ? animated === null || animated === void 0 ? void 0 : animated.placeholder : animated;\n var isSafari = typeof navigator !== 'undefined' && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n var maskRectSize = isSafari ? {\n width: '100%',\n height: '100%'\n } : {\n width: '100vw',\n height: '100vh'\n };\n return /*#__PURE__*/React.createElement(Portal, {\n open: open,\n autoLock: true\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-mask\"), rootClassName),\n style: _objectSpread({\n position: 'fixed',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n zIndex: zIndex,\n pointerEvents: pos && !disabledInteraction ? 'none' : 'auto'\n }, style)\n }, showMask ? /*#__PURE__*/React.createElement(\"svg\", {\n style: {\n width: '100%',\n height: '100%'\n }\n }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"mask\", {\n id: maskId\n }, /*#__PURE__*/React.createElement(\"rect\", _extends({\n x: \"0\",\n y: \"0\"\n }, maskRectSize, {\n fill: \"white\"\n })), pos && /*#__PURE__*/React.createElement(\"rect\", {\n x: pos.left,\n y: pos.top,\n rx: pos.radius,\n width: pos.width,\n height: pos.height,\n fill: \"black\",\n className: mergedAnimated ? \"\".concat(prefixCls, \"-placeholder-animated\") : ''\n }))), /*#__PURE__*/React.createElement(\"rect\", {\n x: \"0\",\n y: \"0\",\n width: \"100%\",\n height: \"100%\",\n fill: fill,\n mask: \"url(#\".concat(maskId, \")\")\n }), pos && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n x: \"0\",\n y: \"0\",\n width: \"100%\",\n height: pos.top\n })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n x: \"0\",\n y: \"0\",\n width: pos.left,\n height: \"100%\"\n })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n x: \"0\",\n y: pos.top + pos.height,\n width: \"100%\",\n height: \"calc(100vh - \".concat(pos.top + pos.height, \"px)\")\n })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n x: pos.left + pos.width,\n y: \"0\",\n width: \"calc(100vw - \".concat(pos.left + pos.width, \"px)\"),\n height: \"100%\"\n })))) : null));\n};\nexport default Mask;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nvar autoAdjustOverflow = {\n adjustX: 1,\n adjustY: 1\n};\nvar targetOffset = [0, 0];\nvar basePlacements = {\n left: {\n points: ['cr', 'cl'],\n offset: [-8, 0]\n },\n right: {\n points: ['cl', 'cr'],\n offset: [8, 0]\n },\n top: {\n points: ['bc', 'tc'],\n offset: [0, -8]\n },\n bottom: {\n points: ['tc', 'bc'],\n offset: [0, 8]\n },\n topLeft: {\n points: ['bl', 'tl'],\n offset: [0, -8]\n },\n leftTop: {\n points: ['tr', 'tl'],\n offset: [-8, 0]\n },\n topRight: {\n points: ['br', 'tr'],\n offset: [0, -8]\n },\n rightTop: {\n points: ['tl', 'tr'],\n offset: [8, 0]\n },\n bottomRight: {\n points: ['tr', 'br'],\n offset: [0, 8]\n },\n rightBottom: {\n points: ['bl', 'br'],\n offset: [8, 0]\n },\n bottomLeft: {\n points: ['tl', 'bl'],\n offset: [0, 8]\n },\n leftBottom: {\n points: ['br', 'bl'],\n offset: [-8, 0]\n }\n};\nexport function getPlacements() {\n var arrowPointAtCenter = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var placements = {};\n Object.keys(basePlacements).forEach(function (key) {\n placements[key] = _objectSpread(_objectSpread({}, basePlacements[key]), {}, {\n autoArrow: arrowPointAtCenter,\n targetOffset: targetOffset\n });\n });\n return placements;\n}\nexport var placements = getPlacements();","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nexport default function DefaultPanel(props) {\n var _closable$closeIcon;\n var prefixCls = props.prefixCls,\n current = props.current,\n total = props.total,\n title = props.title,\n description = props.description,\n onClose = props.onClose,\n onPrev = props.onPrev,\n onNext = props.onNext,\n onFinish = props.onFinish,\n className = props.className,\n closable = props.closable;\n var ariaProps = pickAttrs(closable || {}, true);\n var closeIcon = (_closable$closeIcon = closable === null || closable === void 0 ? void 0 : closable.closeIcon) !== null && _closable$closeIcon !== void 0 ? _closable$closeIcon : /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-close-x\")\n }, \"\\xD7\");\n var mergedClosable = !!closable;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-content\"), className)\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-inner\")\n }, mergedClosable && /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n onClick: onClose,\n \"aria-label\": \"Close\"\n }, ariaProps, {\n className: \"\".concat(prefixCls, \"-close\")\n }), closeIcon), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-header\")\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-title\")\n }, title)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-description\")\n }, description), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-footer\")\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-sliders\")\n }, total > 1 ? _toConsumableArray(Array.from({\n length: total\n }).keys()).map(function (item, index) {\n return /*#__PURE__*/React.createElement(\"span\", {\n key: item,\n className: index === current ? 'active' : ''\n });\n }) : null), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-buttons\")\n }, current !== 0 ? /*#__PURE__*/React.createElement(\"button\", {\n className: \"\".concat(prefixCls, \"-prev-btn\"),\n onClick: onPrev\n }, \"Prev\") : null, current === total - 1 ? /*#__PURE__*/React.createElement(\"button\", {\n className: \"\".concat(prefixCls, \"-finish-btn\"),\n onClick: onFinish\n }, \"Finish\") : /*#__PURE__*/React.createElement(\"button\", {\n className: \"\".concat(prefixCls, \"-next-btn\"),\n onClick: onNext\n }, \"Next\")))));\n}","import * as React from 'react';\nimport DefaultPanel from \"./DefaultPanel\";\nvar TourStep = function TourStep(props) {\n var current = props.current,\n renderPanel = props.renderPanel;\n return /*#__PURE__*/React.createElement(React.Fragment, null, typeof renderPanel === 'function' ? renderPanel(props, current) : /*#__PURE__*/React.createElement(DefaultPanel, props));\n};\nexport default TourStep;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"prefixCls\", \"steps\", \"defaultCurrent\", \"current\", \"onChange\", \"onClose\", \"onFinish\", \"open\", \"mask\", \"arrow\", \"rootClassName\", \"placement\", \"renderPanel\", \"gap\", \"animated\", \"scrollIntoViewOptions\", \"zIndex\", \"closeIcon\", \"closable\", \"builtinPlacements\", \"disabledInteraction\"];\nimport * as React from 'react';\nimport Portal from '@rc-component/portal';\nimport Trigger from '@rc-component/trigger';\nimport classNames from 'classnames';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport { useMemo } from 'react';\nimport { useClosable } from \"./hooks/useClosable\";\nimport useTarget from \"./hooks/useTarget\";\nimport Mask from \"./Mask\";\nimport { getPlacements } from \"./placements\";\nimport TourStep from \"./TourStep\";\nimport { getPlacement } from \"./util\";\nvar CENTER_PLACEHOLDER = {\n left: '50%',\n top: '50%',\n width: 1,\n height: 1\n};\nvar defaultScrollIntoViewOptions = {\n block: 'center',\n inline: 'center'\n};\nvar Tour = function Tour(props) {\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-tour' : _props$prefixCls,\n _props$steps = props.steps,\n steps = _props$steps === void 0 ? [] : _props$steps,\n defaultCurrent = props.defaultCurrent,\n current = props.current,\n onChange = props.onChange,\n onClose = props.onClose,\n _onFinish = props.onFinish,\n open = props.open,\n _props$mask = props.mask,\n mask = _props$mask === void 0 ? true : _props$mask,\n _props$arrow = props.arrow,\n arrow = _props$arrow === void 0 ? true : _props$arrow,\n rootClassName = props.rootClassName,\n placement = props.placement,\n renderPanel = props.renderPanel,\n gap = props.gap,\n animated = props.animated,\n _props$scrollIntoView = props.scrollIntoViewOptions,\n scrollIntoViewOptions = _props$scrollIntoView === void 0 ? defaultScrollIntoViewOptions : _props$scrollIntoView,\n _props$zIndex = props.zIndex,\n zIndex = _props$zIndex === void 0 ? 1001 : _props$zIndex,\n closeIcon = props.closeIcon,\n closable = props.closable,\n builtinPlacements = props.builtinPlacements,\n disabledInteraction = props.disabledInteraction,\n restProps = _objectWithoutProperties(props, _excluded);\n var triggerRef = React.useRef();\n var _useMergedState = useMergedState(0, {\n value: current,\n defaultValue: defaultCurrent\n }),\n _useMergedState2 = _slicedToArray(_useMergedState, 2),\n mergedCurrent = _useMergedState2[0],\n setMergedCurrent = _useMergedState2[1];\n var _useMergedState3 = useMergedState(undefined, {\n value: open,\n postState: function postState(origin) {\n return mergedCurrent < 0 || mergedCurrent >= steps.length ? false : origin !== null && origin !== void 0 ? origin : true;\n }\n }),\n _useMergedState4 = _slicedToArray(_useMergedState3, 2),\n mergedOpen = _useMergedState4[0],\n setMergedOpen = _useMergedState4[1];\n\n // Record if already rended in the DOM to avoid `findDOMNode` issue\n var _React$useState = React.useState(mergedOpen),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n hasOpened = _React$useState2[0],\n setHasOpened = _React$useState2[1];\n var openRef = React.useRef(mergedOpen);\n useLayoutEffect(function () {\n if (mergedOpen) {\n if (!openRef.current) {\n setMergedCurrent(0);\n }\n setHasOpened(true);\n }\n openRef.current = mergedOpen;\n }, [mergedOpen]);\n var _ref = steps[mergedCurrent] || {},\n target = _ref.target,\n stepPlacement = _ref.placement,\n stepStyle = _ref.style,\n stepArrow = _ref.arrow,\n stepClassName = _ref.className,\n stepMask = _ref.mask,\n _ref$scrollIntoViewOp = _ref.scrollIntoViewOptions,\n stepScrollIntoViewOptions = _ref$scrollIntoViewOp === void 0 ? defaultScrollIntoViewOptions : _ref$scrollIntoViewOp,\n stepCloseIcon = _ref.closeIcon,\n stepClosable = _ref.closable;\n var mergedClosable = useClosable(stepClosable, stepCloseIcon, closable, closeIcon);\n var mergedMask = mergedOpen && (stepMask !== null && stepMask !== void 0 ? stepMask : mask);\n var mergedScrollIntoViewOptions = stepScrollIntoViewOptions !== null && stepScrollIntoViewOptions !== void 0 ? stepScrollIntoViewOptions : scrollIntoViewOptions;\n var _useTarget = useTarget(target, open, gap, mergedScrollIntoViewOptions),\n _useTarget2 = _slicedToArray(_useTarget, 2),\n posInfo = _useTarget2[0],\n targetElement = _useTarget2[1];\n var mergedPlacement = getPlacement(targetElement, placement, stepPlacement);\n\n // ========================= arrow =========================\n var mergedArrow = targetElement ? typeof stepArrow === 'undefined' ? arrow : stepArrow : false;\n var arrowPointAtCenter = _typeof(mergedArrow) === 'object' ? mergedArrow.pointAtCenter : false;\n useLayoutEffect(function () {\n var _triggerRef$current;\n (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.forceAlign();\n }, [arrowPointAtCenter, mergedCurrent]);\n\n // ========================= Change =========================\n var onInternalChange = function onInternalChange(nextCurrent) {\n setMergedCurrent(nextCurrent);\n onChange === null || onChange === void 0 ? void 0 : onChange(nextCurrent);\n };\n var mergedBuiltinPlacements = useMemo(function () {\n if (builtinPlacements) {\n return typeof builtinPlacements === 'function' ? builtinPlacements({\n arrowPointAtCenter: arrowPointAtCenter\n }) : builtinPlacements;\n }\n return getPlacements(arrowPointAtCenter);\n }, [builtinPlacements, arrowPointAtCenter]);\n\n // ========================= Render =========================\n // Skip if not init yet\n if (targetElement === undefined || !hasOpened) {\n return null;\n }\n var handleClose = function handleClose() {\n setMergedOpen(false);\n onClose === null || onClose === void 0 ? void 0 : onClose(mergedCurrent);\n };\n var getPopupElement = function getPopupElement() {\n return /*#__PURE__*/React.createElement(TourStep, _extends({\n arrow: mergedArrow,\n key: \"content\",\n prefixCls: prefixCls,\n total: steps.length,\n renderPanel: renderPanel,\n onPrev: function onPrev() {\n onInternalChange(mergedCurrent - 1);\n },\n onNext: function onNext() {\n onInternalChange(mergedCurrent + 1);\n },\n onClose: handleClose,\n current: mergedCurrent,\n onFinish: function onFinish() {\n handleClose();\n _onFinish === null || _onFinish === void 0 ? void 0 : _onFinish();\n }\n }, steps[mergedCurrent], {\n closable: mergedClosable\n }));\n };\n var mergedShowMask = typeof mergedMask === 'boolean' ? mergedMask : !!mergedMask;\n var mergedMaskStyle = typeof mergedMask === 'boolean' ? undefined : mergedMask;\n\n // when targetElement is not exist, use body as triggerDOMNode\n var getTriggerDOMNode = function getTriggerDOMNode(node) {\n return node || targetElement || document.body;\n };\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {\n zIndex: zIndex,\n prefixCls: prefixCls,\n pos: posInfo,\n showMask: mergedShowMask,\n style: mergedMaskStyle === null || mergedMaskStyle === void 0 ? void 0 : mergedMaskStyle.style,\n fill: mergedMaskStyle === null || mergedMaskStyle === void 0 ? void 0 : mergedMaskStyle.color,\n open: mergedOpen,\n animated: animated,\n rootClassName: rootClassName,\n disabledInteraction: disabledInteraction\n }), /*#__PURE__*/React.createElement(Trigger, _extends({}, restProps, {\n builtinPlacements: mergedBuiltinPlacements,\n ref: triggerRef,\n popupStyle: stepStyle,\n popupPlacement: mergedPlacement,\n popupVisible: mergedOpen,\n popupClassName: classNames(rootClassName, stepClassName),\n prefixCls: prefixCls,\n popup: getPopupElement,\n forceRender: false,\n destroyPopupOnHide: true,\n zIndex: zIndex,\n getTriggerDOMNode: getTriggerDOMNode,\n arrow: !!mergedArrow\n }), /*#__PURE__*/React.createElement(Portal, {\n open: mergedOpen,\n autoLock: true\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(rootClassName, \"\".concat(prefixCls, \"-target-placeholder\")),\n style: _objectSpread(_objectSpread({}, posInfo || CENTER_PLACEHOLDER), {}, {\n position: 'fixed',\n pointerEvents: 'none'\n })\n }))));\n};\nexport default Tour;","import Tour from \"./Tour\";\nexport default Tour;","import classNames from 'classnames';\nimport * as React from 'react';\nexport default function Arrow(props) {\n var prefixCls = props.prefixCls,\n align = props.align,\n arrow = props.arrow,\n arrowPos = props.arrowPos;\n var _ref = arrow || {},\n className = _ref.className,\n content = _ref.content;\n var _arrowPos$x = arrowPos.x,\n x = _arrowPos$x === void 0 ? 0 : _arrowPos$x,\n _arrowPos$y = arrowPos.y,\n y = _arrowPos$y === void 0 ? 0 : _arrowPos$y;\n var arrowRef = React.useRef();\n\n // Skip if no align\n if (!align || !align.points) {\n return null;\n }\n var alignStyle = {\n position: 'absolute'\n };\n\n // Skip if no need to align\n if (align.autoArrow !== false) {\n var popupPoints = align.points[0];\n var targetPoints = align.points[1];\n var popupTB = popupPoints[0];\n var popupLR = popupPoints[1];\n var targetTB = targetPoints[0];\n var targetLR = targetPoints[1];\n\n // Top & Bottom\n if (popupTB === targetTB || !['t', 'b'].includes(popupTB)) {\n alignStyle.top = y;\n } else if (popupTB === 't') {\n alignStyle.top = 0;\n } else {\n alignStyle.bottom = 0;\n }\n\n // Left & Right\n if (popupLR === targetLR || !['l', 'r'].includes(popupLR)) {\n alignStyle.left = x;\n } else if (popupLR === 'l') {\n alignStyle.left = 0;\n } else {\n alignStyle.right = 0;\n }\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: arrowRef,\n className: classNames(\"\".concat(prefixCls, \"-arrow\"), className),\n style: alignStyle\n }, content);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport * as React from 'react';\nexport default function Mask(props) {\n var prefixCls = props.prefixCls,\n open = props.open,\n zIndex = props.zIndex,\n mask = props.mask,\n motion = props.motion;\n if (!mask) {\n return null;\n }\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({}, motion, {\n motionAppear: true,\n visible: open,\n removeOnLeave: true\n }), function (_ref) {\n var className = _ref.className;\n return /*#__PURE__*/React.createElement(\"div\", {\n style: {\n zIndex: zIndex\n },\n className: classNames(\"\".concat(prefixCls, \"-mask\"), className)\n });\n });\n}","import * as React from 'react';\nvar PopupContent = /*#__PURE__*/React.memo(function (_ref) {\n var children = _ref.children;\n return children;\n}, function (_, next) {\n return next.cache;\n});\nif (process.env.NODE_ENV !== 'production') {\n PopupContent.displayName = 'PopupContent';\n}\nexport default PopupContent;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport ResizeObserver from 'rc-resize-observer';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport { composeRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport Arrow from \"./Arrow\";\nimport Mask from \"./Mask\";\nimport PopupContent from \"./PopupContent\";\nvar Popup = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var popup = props.popup,\n className = props.className,\n prefixCls = props.prefixCls,\n style = props.style,\n target = props.target,\n _onVisibleChanged = props.onVisibleChanged,\n open = props.open,\n keepDom = props.keepDom,\n fresh = props.fresh,\n onClick = props.onClick,\n mask = props.mask,\n arrow = props.arrow,\n arrowPos = props.arrowPos,\n align = props.align,\n motion = props.motion,\n maskMotion = props.maskMotion,\n forceRender = props.forceRender,\n getPopupContainer = props.getPopupContainer,\n autoDestroy = props.autoDestroy,\n Portal = props.portal,\n zIndex = props.zIndex,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n onPointerEnter = props.onPointerEnter,\n onPointerDownCapture = props.onPointerDownCapture,\n ready = props.ready,\n offsetX = props.offsetX,\n offsetY = props.offsetY,\n offsetR = props.offsetR,\n offsetB = props.offsetB,\n onAlign = props.onAlign,\n onPrepare = props.onPrepare,\n stretch = props.stretch,\n targetWidth = props.targetWidth,\n targetHeight = props.targetHeight;\n var childNode = typeof popup === 'function' ? popup() : popup;\n\n // We can not remove holder only when motion finished.\n var isNodeVisible = open || keepDom;\n\n // ======================= Container ========================\n var getPopupContainerNeedParams = (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer.length) > 0;\n var _React$useState = React.useState(!getPopupContainer || !getPopupContainerNeedParams),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n show = _React$useState2[0],\n setShow = _React$useState2[1];\n\n // Delay to show since `getPopupContainer` need target element\n useLayoutEffect(function () {\n if (!show && getPopupContainerNeedParams && target) {\n setShow(true);\n }\n }, [show, getPopupContainerNeedParams, target]);\n\n // ========================= Render =========================\n if (!show) {\n return null;\n }\n\n // >>>>> Offset\n var AUTO = 'auto';\n var offsetStyle = {\n left: '-1000vw',\n top: '-1000vh',\n right: AUTO,\n bottom: AUTO\n };\n\n // Set align style\n if (ready || !open) {\n var _experimental;\n var points = align.points;\n var dynamicInset = align.dynamicInset || ((_experimental = align._experimental) === null || _experimental === void 0 ? void 0 : _experimental.dynamicInset);\n var alignRight = dynamicInset && points[0][1] === 'r';\n var alignBottom = dynamicInset && points[0][0] === 'b';\n if (alignRight) {\n offsetStyle.right = offsetR;\n offsetStyle.left = AUTO;\n } else {\n offsetStyle.left = offsetX;\n offsetStyle.right = AUTO;\n }\n if (alignBottom) {\n offsetStyle.bottom = offsetB;\n offsetStyle.top = AUTO;\n } else {\n offsetStyle.top = offsetY;\n offsetStyle.bottom = AUTO;\n }\n }\n\n // >>>>> Misc\n var miscStyle = {};\n if (stretch) {\n if (stretch.includes('height') && targetHeight) {\n miscStyle.height = targetHeight;\n } else if (stretch.includes('minHeight') && targetHeight) {\n miscStyle.minHeight = targetHeight;\n }\n if (stretch.includes('width') && targetWidth) {\n miscStyle.width = targetWidth;\n } else if (stretch.includes('minWidth') && targetWidth) {\n miscStyle.minWidth = targetWidth;\n }\n }\n if (!open) {\n miscStyle.pointerEvents = 'none';\n }\n return /*#__PURE__*/React.createElement(Portal, {\n open: forceRender || isNodeVisible,\n getContainer: getPopupContainer && function () {\n return getPopupContainer(target);\n },\n autoDestroy: autoDestroy\n }, /*#__PURE__*/React.createElement(Mask, {\n prefixCls: prefixCls,\n open: open,\n zIndex: zIndex,\n mask: mask,\n motion: maskMotion\n }), /*#__PURE__*/React.createElement(ResizeObserver, {\n onResize: onAlign,\n disabled: !open\n }, function (resizeObserverRef) {\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n motionAppear: true,\n motionEnter: true,\n motionLeave: true,\n removeOnLeave: false,\n forceRender: forceRender,\n leavedClassName: \"\".concat(prefixCls, \"-hidden\")\n }, motion, {\n onAppearPrepare: onPrepare,\n onEnterPrepare: onPrepare,\n visible: open,\n onVisibleChanged: function onVisibleChanged(nextVisible) {\n var _motion$onVisibleChan;\n motion === null || motion === void 0 || (_motion$onVisibleChan = motion.onVisibleChanged) === null || _motion$onVisibleChan === void 0 || _motion$onVisibleChan.call(motion, nextVisible);\n _onVisibleChanged(nextVisible);\n }\n }), function (_ref, motionRef) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n var cls = classNames(prefixCls, motionClassName, className);\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: composeRef(resizeObserverRef, ref, motionRef),\n className: cls,\n style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({\n '--arrow-x': \"\".concat(arrowPos.x || 0, \"px\"),\n '--arrow-y': \"\".concat(arrowPos.y || 0, \"px\")\n }, offsetStyle), miscStyle), motionStyle), {}, {\n boxSizing: 'border-box',\n zIndex: zIndex\n }, style),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onPointerEnter: onPointerEnter,\n onClick: onClick,\n onPointerDownCapture: onPointerDownCapture\n }, arrow && /*#__PURE__*/React.createElement(Arrow, {\n prefixCls: prefixCls,\n arrow: arrow,\n arrowPos: arrowPos,\n align: align\n }), /*#__PURE__*/React.createElement(PopupContent, {\n cache: !open && !fresh\n }, childNode));\n });\n }));\n});\nif (process.env.NODE_ENV !== 'production') {\n Popup.displayName = 'Popup';\n}\nexport default Popup;","import { fillRef, supportRef, useComposeRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nvar TriggerWrapper = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var children = props.children,\n getTriggerDOMNode = props.getTriggerDOMNode;\n var canUseRef = supportRef(children);\n\n // When use `getTriggerDOMNode`, we should do additional work to get the real dom\n var setRef = React.useCallback(function (node) {\n fillRef(ref, getTriggerDOMNode ? getTriggerDOMNode(node) : node);\n }, [getTriggerDOMNode]);\n var mergedRef = useComposeRef(setRef, children.ref);\n return canUseRef ? /*#__PURE__*/React.cloneElement(children, {\n ref: mergedRef\n }) : children;\n});\nif (process.env.NODE_ENV !== 'production') {\n TriggerWrapper.displayName = 'TriggerWrapper';\n}\nexport default TriggerWrapper;","import * as React from 'react';\nvar TriggerContext = /*#__PURE__*/React.createContext(null);\nexport default TriggerContext;","import * as React from 'react';\nfunction toArray(val) {\n return val ? Array.isArray(val) ? val : [val] : [];\n}\nexport default function useAction(mobile, action, showAction, hideAction) {\n return React.useMemo(function () {\n var mergedShowAction = toArray(showAction !== null && showAction !== void 0 ? showAction : action);\n var mergedHideAction = toArray(hideAction !== null && hideAction !== void 0 ? hideAction : action);\n var showActionSet = new Set(mergedShowAction);\n var hideActionSet = new Set(mergedHideAction);\n if (mobile) {\n if (showActionSet.has('hover')) {\n showActionSet.delete('hover');\n showActionSet.add('click');\n }\n if (hideActionSet.has('hover')) {\n hideActionSet.delete('hover');\n hideActionSet.add('click');\n }\n }\n return [showActionSet, hideActionSet];\n }, [mobile, action, showAction, hideAction]);\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nfunction isPointsEq() {\n var a1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var a2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var isAlignPoint = arguments.length > 2 ? arguments[2] : undefined;\n if (isAlignPoint) {\n return a1[0] === a2[0];\n }\n return a1[0] === a2[0] && a1[1] === a2[1];\n}\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n var points = align.points;\n var placements = Object.keys(builtinPlacements);\n for (var i = 0; i < placements.length; i += 1) {\n var _builtinPlacements$pl;\n var placement = placements[i];\n if (isPointsEq((_builtinPlacements$pl = builtinPlacements[placement]) === null || _builtinPlacements$pl === void 0 ? void 0 : _builtinPlacements$pl.points, points, isAlignPoint)) {\n return \"\".concat(prefixCls, \"-placement-\").concat(placement);\n }\n }\n return '';\n}\n\n/** @deprecated We should not use this if we can refactor all deps */\nexport function getMotion(prefixCls, motion, animation, transitionName) {\n if (motion) {\n return motion;\n }\n if (animation) {\n return {\n motionName: \"\".concat(prefixCls, \"-\").concat(animation)\n };\n }\n if (transitionName) {\n return {\n motionName: transitionName\n };\n }\n return null;\n}\nexport function getWin(ele) {\n return ele.ownerDocument.defaultView;\n}\n\n/**\n * Get all the scrollable parent elements of the element\n * @param ele The element to be detected\n * @param areaOnly Only return the parent which will cut visible area\n */\nexport function collectScroller(ele) {\n var scrollerList = [];\n var current = ele === null || ele === void 0 ? void 0 : ele.parentElement;\n var scrollStyle = ['hidden', 'scroll', 'clip', 'auto'];\n while (current) {\n var _getWin$getComputedSt = getWin(current).getComputedStyle(current),\n overflowX = _getWin$getComputedSt.overflowX,\n overflowY = _getWin$getComputedSt.overflowY,\n overflow = _getWin$getComputedSt.overflow;\n if ([overflowX, overflowY, overflow].some(function (o) {\n return scrollStyle.includes(o);\n })) {\n scrollerList.push(current);\n }\n current = current.parentElement;\n }\n return scrollerList;\n}\nexport function toNum(num) {\n var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return Number.isNaN(num) ? defaultValue : num;\n}\nfunction getPxValue(val) {\n return toNum(parseFloat(val), 0);\n}\n/**\n *\n *\n * **************************************\n * * Border *\n * * ************************** *\n * * * * * *\n * * B * * S * B *\n * * o * * c * o *\n * * r * Content * r * r *\n * * d * * o * d *\n * * e * * l * e *\n * * r ******************** l * r *\n * * * Scroll * *\n * * ************************** *\n * * Border *\n * **************************************\n *\n */\n/**\n * Get visible area of element\n */\nexport function getVisibleArea(initArea, scrollerList) {\n var visibleArea = _objectSpread({}, initArea);\n (scrollerList || []).forEach(function (ele) {\n if (ele instanceof HTMLBodyElement || ele instanceof HTMLHtmlElement) {\n return;\n }\n\n // Skip if static position which will not affect visible area\n var _getWin$getComputedSt2 = getWin(ele).getComputedStyle(ele),\n overflow = _getWin$getComputedSt2.overflow,\n overflowClipMargin = _getWin$getComputedSt2.overflowClipMargin,\n borderTopWidth = _getWin$getComputedSt2.borderTopWidth,\n borderBottomWidth = _getWin$getComputedSt2.borderBottomWidth,\n borderLeftWidth = _getWin$getComputedSt2.borderLeftWidth,\n borderRightWidth = _getWin$getComputedSt2.borderRightWidth;\n var eleRect = ele.getBoundingClientRect();\n var eleOutHeight = ele.offsetHeight,\n eleInnerHeight = ele.clientHeight,\n eleOutWidth = ele.offsetWidth,\n eleInnerWidth = ele.clientWidth;\n var borderTopNum = getPxValue(borderTopWidth);\n var borderBottomNum = getPxValue(borderBottomWidth);\n var borderLeftNum = getPxValue(borderLeftWidth);\n var borderRightNum = getPxValue(borderRightWidth);\n var scaleX = toNum(Math.round(eleRect.width / eleOutWidth * 1000) / 1000);\n var scaleY = toNum(Math.round(eleRect.height / eleOutHeight * 1000) / 1000);\n\n // Original visible area\n var eleScrollWidth = (eleOutWidth - eleInnerWidth - borderLeftNum - borderRightNum) * scaleX;\n var eleScrollHeight = (eleOutHeight - eleInnerHeight - borderTopNum - borderBottomNum) * scaleY;\n\n // Cut border size\n var scaledBorderTopWidth = borderTopNum * scaleY;\n var scaledBorderBottomWidth = borderBottomNum * scaleY;\n var scaledBorderLeftWidth = borderLeftNum * scaleX;\n var scaledBorderRightWidth = borderRightNum * scaleX;\n\n // Clip margin\n var clipMarginWidth = 0;\n var clipMarginHeight = 0;\n if (overflow === 'clip') {\n var clipNum = getPxValue(overflowClipMargin);\n clipMarginWidth = clipNum * scaleX;\n clipMarginHeight = clipNum * scaleY;\n }\n\n // Region\n var eleLeft = eleRect.x + scaledBorderLeftWidth - clipMarginWidth;\n var eleTop = eleRect.y + scaledBorderTopWidth - clipMarginHeight;\n var eleRight = eleLeft + eleRect.width + 2 * clipMarginWidth - scaledBorderLeftWidth - scaledBorderRightWidth - eleScrollWidth;\n var eleBottom = eleTop + eleRect.height + 2 * clipMarginHeight - scaledBorderTopWidth - scaledBorderBottomWidth - eleScrollHeight;\n visibleArea.left = Math.max(visibleArea.left, eleLeft);\n visibleArea.top = Math.max(visibleArea.top, eleTop);\n visibleArea.right = Math.min(visibleArea.right, eleRight);\n visibleArea.bottom = Math.min(visibleArea.bottom, eleBottom);\n });\n return visibleArea;\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { isDOM } from \"rc-util/es/Dom/findDOMNode\";\nimport isVisible from \"rc-util/es/Dom/isVisible\";\nimport useEvent from \"rc-util/es/hooks/useEvent\";\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport * as React from 'react';\nimport { collectScroller, getVisibleArea, getWin, toNum } from \"../util\";\nfunction getUnitOffset(size) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var offsetStr = \"\".concat(offset);\n var cells = offsetStr.match(/^(.*)\\%$/);\n if (cells) {\n return size * (parseFloat(cells[1]) / 100);\n }\n return parseFloat(offsetStr);\n}\nfunction getNumberOffset(rect, offset) {\n var _ref = offset || [],\n _ref2 = _slicedToArray(_ref, 2),\n offsetX = _ref2[0],\n offsetY = _ref2[1];\n return [getUnitOffset(rect.width, offsetX), getUnitOffset(rect.height, offsetY)];\n}\nfunction splitPoints() {\n var points = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return [points[0], points[1]];\n}\nfunction getAlignPoint(rect, points) {\n var topBottom = points[0];\n var leftRight = points[1];\n var x;\n var y;\n\n // Top & Bottom\n if (topBottom === 't') {\n y = rect.y;\n } else if (topBottom === 'b') {\n y = rect.y + rect.height;\n } else {\n y = rect.y + rect.height / 2;\n }\n\n // Left & Right\n if (leftRight === 'l') {\n x = rect.x;\n } else if (leftRight === 'r') {\n x = rect.x + rect.width;\n } else {\n x = rect.x + rect.width / 2;\n }\n return {\n x: x,\n y: y\n };\n}\nfunction reversePoints(points, index) {\n var reverseMap = {\n t: 'b',\n b: 't',\n l: 'r',\n r: 'l'\n };\n return points.map(function (point, i) {\n if (i === index) {\n return reverseMap[point] || 'c';\n }\n return point;\n }).join('');\n}\nexport default function useAlign(open, popupEle, target, placement, builtinPlacements, popupAlign, onPopupAlign) {\n var _React$useState = React.useState({\n ready: false,\n offsetX: 0,\n offsetY: 0,\n offsetR: 0,\n offsetB: 0,\n arrowX: 0,\n arrowY: 0,\n scaleX: 1,\n scaleY: 1,\n align: builtinPlacements[placement] || {}\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n offsetInfo = _React$useState2[0],\n setOffsetInfo = _React$useState2[1];\n var alignCountRef = React.useRef(0);\n var scrollerList = React.useMemo(function () {\n if (!popupEle) {\n return [];\n }\n return collectScroller(popupEle);\n }, [popupEle]);\n\n // ========================= Flip ==========================\n // We will memo flip info.\n // If size change to make flip, it will memo the flip info and use it in next align.\n var prevFlipRef = React.useRef({});\n var resetFlipCache = function resetFlipCache() {\n prevFlipRef.current = {};\n };\n if (!open) {\n resetFlipCache();\n }\n\n // ========================= Align =========================\n var onAlign = useEvent(function () {\n if (popupEle && target && open) {\n var _popupElement$parentE, _popupRect$x, _popupRect$y, _popupElement$parentE2;\n var popupElement = popupEle;\n var doc = popupElement.ownerDocument;\n var win = getWin(popupElement);\n var _win$getComputedStyle = win.getComputedStyle(popupElement),\n width = _win$getComputedStyle.width,\n height = _win$getComputedStyle.height,\n popupPosition = _win$getComputedStyle.position;\n var originLeft = popupElement.style.left;\n var originTop = popupElement.style.top;\n var originRight = popupElement.style.right;\n var originBottom = popupElement.style.bottom;\n var originOverflow = popupElement.style.overflow;\n\n // Placement\n var placementInfo = _objectSpread(_objectSpread({}, builtinPlacements[placement]), popupAlign);\n\n // placeholder element\n var placeholderElement = doc.createElement('div');\n (_popupElement$parentE = popupElement.parentElement) === null || _popupElement$parentE === void 0 || _popupElement$parentE.appendChild(placeholderElement);\n placeholderElement.style.left = \"\".concat(popupElement.offsetLeft, \"px\");\n placeholderElement.style.top = \"\".concat(popupElement.offsetTop, \"px\");\n placeholderElement.style.position = popupPosition;\n placeholderElement.style.height = \"\".concat(popupElement.offsetHeight, \"px\");\n placeholderElement.style.width = \"\".concat(popupElement.offsetWidth, \"px\");\n\n // Reset first\n popupElement.style.left = '0';\n popupElement.style.top = '0';\n popupElement.style.right = 'auto';\n popupElement.style.bottom = 'auto';\n popupElement.style.overflow = 'hidden';\n\n // Calculate align style, we should consider `transform` case\n var targetRect;\n if (Array.isArray(target)) {\n targetRect = {\n x: target[0],\n y: target[1],\n width: 0,\n height: 0\n };\n } else {\n var _rect$x, _rect$y;\n var rect = target.getBoundingClientRect();\n rect.x = (_rect$x = rect.x) !== null && _rect$x !== void 0 ? _rect$x : rect.left;\n rect.y = (_rect$y = rect.y) !== null && _rect$y !== void 0 ? _rect$y : rect.top;\n targetRect = {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n };\n }\n var popupRect = popupElement.getBoundingClientRect();\n popupRect.x = (_popupRect$x = popupRect.x) !== null && _popupRect$x !== void 0 ? _popupRect$x : popupRect.left;\n popupRect.y = (_popupRect$y = popupRect.y) !== null && _popupRect$y !== void 0 ? _popupRect$y : popupRect.top;\n var _doc$documentElement = doc.documentElement,\n clientWidth = _doc$documentElement.clientWidth,\n clientHeight = _doc$documentElement.clientHeight,\n scrollWidth = _doc$documentElement.scrollWidth,\n scrollHeight = _doc$documentElement.scrollHeight,\n scrollTop = _doc$documentElement.scrollTop,\n scrollLeft = _doc$documentElement.scrollLeft;\n var popupHeight = popupRect.height;\n var popupWidth = popupRect.width;\n var targetHeight = targetRect.height;\n var targetWidth = targetRect.width;\n\n // Get bounding of visible area\n var visibleRegion = {\n left: 0,\n top: 0,\n right: clientWidth,\n bottom: clientHeight\n };\n var scrollRegion = {\n left: -scrollLeft,\n top: -scrollTop,\n right: scrollWidth - scrollLeft,\n bottom: scrollHeight - scrollTop\n };\n var htmlRegion = placementInfo.htmlRegion;\n var VISIBLE = 'visible';\n var VISIBLE_FIRST = 'visibleFirst';\n if (htmlRegion !== 'scroll' && htmlRegion !== VISIBLE_FIRST) {\n htmlRegion = VISIBLE;\n }\n var isVisibleFirst = htmlRegion === VISIBLE_FIRST;\n var scrollRegionArea = getVisibleArea(scrollRegion, scrollerList);\n var visibleRegionArea = getVisibleArea(visibleRegion, scrollerList);\n var visibleArea = htmlRegion === VISIBLE ? visibleRegionArea : scrollRegionArea;\n\n // When set to `visibleFirst`,\n // the check `adjust` logic will use `visibleRegion` for check first.\n var adjustCheckVisibleArea = isVisibleFirst ? visibleRegionArea : visibleArea;\n\n // Record right & bottom align data\n popupElement.style.left = 'auto';\n popupElement.style.top = 'auto';\n popupElement.style.right = '0';\n popupElement.style.bottom = '0';\n var popupMirrorRect = popupElement.getBoundingClientRect();\n\n // Reset back\n popupElement.style.left = originLeft;\n popupElement.style.top = originTop;\n popupElement.style.right = originRight;\n popupElement.style.bottom = originBottom;\n popupElement.style.overflow = originOverflow;\n (_popupElement$parentE2 = popupElement.parentElement) === null || _popupElement$parentE2 === void 0 || _popupElement$parentE2.removeChild(placeholderElement);\n\n // Calculate scale\n var _scaleX = toNum(Math.round(popupWidth / parseFloat(width) * 1000) / 1000);\n var _scaleY = toNum(Math.round(popupHeight / parseFloat(height) * 1000) / 1000);\n\n // No need to align since it's not visible in view\n if (_scaleX === 0 || _scaleY === 0 || isDOM(target) && !isVisible(target)) {\n return;\n }\n\n // Offset\n var offset = placementInfo.offset,\n targetOffset = placementInfo.targetOffset;\n var _getNumberOffset = getNumberOffset(popupRect, offset),\n _getNumberOffset2 = _slicedToArray(_getNumberOffset, 2),\n popupOffsetX = _getNumberOffset2[0],\n popupOffsetY = _getNumberOffset2[1];\n var _getNumberOffset3 = getNumberOffset(targetRect, targetOffset),\n _getNumberOffset4 = _slicedToArray(_getNumberOffset3, 2),\n targetOffsetX = _getNumberOffset4[0],\n targetOffsetY = _getNumberOffset4[1];\n targetRect.x -= targetOffsetX;\n targetRect.y -= targetOffsetY;\n\n // Points\n var _ref3 = placementInfo.points || [],\n _ref4 = _slicedToArray(_ref3, 2),\n popupPoint = _ref4[0],\n targetPoint = _ref4[1];\n var targetPoints = splitPoints(targetPoint);\n var popupPoints = splitPoints(popupPoint);\n var targetAlignPoint = getAlignPoint(targetRect, targetPoints);\n var popupAlignPoint = getAlignPoint(popupRect, popupPoints);\n\n // Real align info may not same as origin one\n var nextAlignInfo = _objectSpread({}, placementInfo);\n\n // Next Offset\n var nextOffsetX = targetAlignPoint.x - popupAlignPoint.x + popupOffsetX;\n var nextOffsetY = targetAlignPoint.y - popupAlignPoint.y + popupOffsetY;\n\n // ============== Intersection ===============\n // Get area by position. Used for check if flip area is better\n function getIntersectionVisibleArea(offsetX, offsetY) {\n var area = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : visibleArea;\n var l = popupRect.x + offsetX;\n var t = popupRect.y + offsetY;\n var r = l + popupWidth;\n var b = t + popupHeight;\n var visibleL = Math.max(l, area.left);\n var visibleT = Math.max(t, area.top);\n var visibleR = Math.min(r, area.right);\n var visibleB = Math.min(b, area.bottom);\n return Math.max(0, (visibleR - visibleL) * (visibleB - visibleT));\n }\n var originIntersectionVisibleArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY);\n\n // As `visibleFirst`, we prepare this for check\n var originIntersectionRecommendArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY, visibleRegionArea);\n\n // ========================== Overflow ===========================\n var targetAlignPointTL = getAlignPoint(targetRect, ['t', 'l']);\n var popupAlignPointTL = getAlignPoint(popupRect, ['t', 'l']);\n var targetAlignPointBR = getAlignPoint(targetRect, ['b', 'r']);\n var popupAlignPointBR = getAlignPoint(popupRect, ['b', 'r']);\n var overflow = placementInfo.overflow || {};\n var adjustX = overflow.adjustX,\n adjustY = overflow.adjustY,\n shiftX = overflow.shiftX,\n shiftY = overflow.shiftY;\n var supportAdjust = function supportAdjust(val) {\n if (typeof val === 'boolean') {\n return val;\n }\n return val >= 0;\n };\n\n // Prepare position\n var nextPopupY;\n var nextPopupBottom;\n var nextPopupX;\n var nextPopupRight;\n function syncNextPopupPosition() {\n nextPopupY = popupRect.y + nextOffsetY;\n nextPopupBottom = nextPopupY + popupHeight;\n nextPopupX = popupRect.x + nextOffsetX;\n nextPopupRight = nextPopupX + popupWidth;\n }\n syncNextPopupPosition();\n\n // >>>>>>>>>> Top & Bottom\n var needAdjustY = supportAdjust(adjustY);\n var sameTB = popupPoints[0] === targetPoints[0];\n\n // Bottom to Top\n if (needAdjustY && popupPoints[0] === 't' && (nextPopupBottom > adjustCheckVisibleArea.bottom || prevFlipRef.current.bt)) {\n var tmpNextOffsetY = nextOffsetY;\n if (sameTB) {\n tmpNextOffsetY -= popupHeight - targetHeight;\n } else {\n tmpNextOffsetY = targetAlignPointTL.y - popupAlignPointBR.y - popupOffsetY;\n }\n var newVisibleArea = getIntersectionVisibleArea(nextOffsetX, tmpNextOffsetY);\n var newVisibleRecommendArea = getIntersectionVisibleArea(nextOffsetX, tmpNextOffsetY, visibleRegionArea);\n if (\n // Of course use larger one\n newVisibleArea > originIntersectionVisibleArea || newVisibleArea === originIntersectionVisibleArea && (!isVisibleFirst ||\n // Choose recommend one\n newVisibleRecommendArea >= originIntersectionRecommendArea)) {\n prevFlipRef.current.bt = true;\n nextOffsetY = tmpNextOffsetY;\n popupOffsetY = -popupOffsetY;\n nextAlignInfo.points = [reversePoints(popupPoints, 0), reversePoints(targetPoints, 0)];\n } else {\n prevFlipRef.current.bt = false;\n }\n }\n\n // Top to Bottom\n if (needAdjustY && popupPoints[0] === 'b' && (nextPopupY < adjustCheckVisibleArea.top || prevFlipRef.current.tb)) {\n var _tmpNextOffsetY = nextOffsetY;\n if (sameTB) {\n _tmpNextOffsetY += popupHeight - targetHeight;\n } else {\n _tmpNextOffsetY = targetAlignPointBR.y - popupAlignPointTL.y - popupOffsetY;\n }\n var _newVisibleArea = getIntersectionVisibleArea(nextOffsetX, _tmpNextOffsetY);\n var _newVisibleRecommendArea = getIntersectionVisibleArea(nextOffsetX, _tmpNextOffsetY, visibleRegionArea);\n if (\n // Of course use larger one\n _newVisibleArea > originIntersectionVisibleArea || _newVisibleArea === originIntersectionVisibleArea && (!isVisibleFirst ||\n // Choose recommend one\n _newVisibleRecommendArea >= originIntersectionRecommendArea)) {\n prevFlipRef.current.tb = true;\n nextOffsetY = _tmpNextOffsetY;\n popupOffsetY = -popupOffsetY;\n nextAlignInfo.points = [reversePoints(popupPoints, 0), reversePoints(targetPoints, 0)];\n } else {\n prevFlipRef.current.tb = false;\n }\n }\n\n // >>>>>>>>>> Left & Right\n var needAdjustX = supportAdjust(adjustX);\n\n // >>>>> Flip\n var sameLR = popupPoints[1] === targetPoints[1];\n\n // Right to Left\n if (needAdjustX && popupPoints[1] === 'l' && (nextPopupRight > adjustCheckVisibleArea.right || prevFlipRef.current.rl)) {\n var tmpNextOffsetX = nextOffsetX;\n if (sameLR) {\n tmpNextOffsetX -= popupWidth - targetWidth;\n } else {\n tmpNextOffsetX = targetAlignPointTL.x - popupAlignPointBR.x - popupOffsetX;\n }\n var _newVisibleArea2 = getIntersectionVisibleArea(tmpNextOffsetX, nextOffsetY);\n var _newVisibleRecommendArea2 = getIntersectionVisibleArea(tmpNextOffsetX, nextOffsetY, visibleRegionArea);\n if (\n // Of course use larger one\n _newVisibleArea2 > originIntersectionVisibleArea || _newVisibleArea2 === originIntersectionVisibleArea && (!isVisibleFirst ||\n // Choose recommend one\n _newVisibleRecommendArea2 >= originIntersectionRecommendArea)) {\n prevFlipRef.current.rl = true;\n nextOffsetX = tmpNextOffsetX;\n popupOffsetX = -popupOffsetX;\n nextAlignInfo.points = [reversePoints(popupPoints, 1), reversePoints(targetPoints, 1)];\n } else {\n prevFlipRef.current.rl = false;\n }\n }\n\n // Left to Right\n if (needAdjustX && popupPoints[1] === 'r' && (nextPopupX < adjustCheckVisibleArea.left || prevFlipRef.current.lr)) {\n var _tmpNextOffsetX = nextOffsetX;\n if (sameLR) {\n _tmpNextOffsetX += popupWidth - targetWidth;\n } else {\n _tmpNextOffsetX = targetAlignPointBR.x - popupAlignPointTL.x - popupOffsetX;\n }\n var _newVisibleArea3 = getIntersectionVisibleArea(_tmpNextOffsetX, nextOffsetY);\n var _newVisibleRecommendArea3 = getIntersectionVisibleArea(_tmpNextOffsetX, nextOffsetY, visibleRegionArea);\n if (\n // Of course use larger one\n _newVisibleArea3 > originIntersectionVisibleArea || _newVisibleArea3 === originIntersectionVisibleArea && (!isVisibleFirst ||\n // Choose recommend one\n _newVisibleRecommendArea3 >= originIntersectionRecommendArea)) {\n prevFlipRef.current.lr = true;\n nextOffsetX = _tmpNextOffsetX;\n popupOffsetX = -popupOffsetX;\n nextAlignInfo.points = [reversePoints(popupPoints, 1), reversePoints(targetPoints, 1)];\n } else {\n prevFlipRef.current.lr = false;\n }\n }\n\n // ============================ Shift ============================\n syncNextPopupPosition();\n var numShiftX = shiftX === true ? 0 : shiftX;\n if (typeof numShiftX === 'number') {\n // Left\n if (nextPopupX < visibleRegionArea.left) {\n nextOffsetX -= nextPopupX - visibleRegionArea.left - popupOffsetX;\n if (targetRect.x + targetWidth < visibleRegionArea.left + numShiftX) {\n nextOffsetX += targetRect.x - visibleRegionArea.left + targetWidth - numShiftX;\n }\n }\n\n // Right\n if (nextPopupRight > visibleRegionArea.right) {\n nextOffsetX -= nextPopupRight - visibleRegionArea.right - popupOffsetX;\n if (targetRect.x > visibleRegionArea.right - numShiftX) {\n nextOffsetX += targetRect.x - visibleRegionArea.right + numShiftX;\n }\n }\n }\n var numShiftY = shiftY === true ? 0 : shiftY;\n if (typeof numShiftY === 'number') {\n // Top\n if (nextPopupY < visibleRegionArea.top) {\n nextOffsetY -= nextPopupY - visibleRegionArea.top - popupOffsetY;\n\n // When target if far away from visible area\n // Stop shift\n if (targetRect.y + targetHeight < visibleRegionArea.top + numShiftY) {\n nextOffsetY += targetRect.y - visibleRegionArea.top + targetHeight - numShiftY;\n }\n }\n\n // Bottom\n if (nextPopupBottom > visibleRegionArea.bottom) {\n nextOffsetY -= nextPopupBottom - visibleRegionArea.bottom - popupOffsetY;\n if (targetRect.y > visibleRegionArea.bottom - numShiftY) {\n nextOffsetY += targetRect.y - visibleRegionArea.bottom + numShiftY;\n }\n }\n }\n\n // ============================ Arrow ============================\n // Arrow center align\n var popupLeft = popupRect.x + nextOffsetX;\n var popupRight = popupLeft + popupWidth;\n var popupTop = popupRect.y + nextOffsetY;\n var popupBottom = popupTop + popupHeight;\n var targetLeft = targetRect.x;\n var targetRight = targetLeft + targetWidth;\n var targetTop = targetRect.y;\n var targetBottom = targetTop + targetHeight;\n var maxLeft = Math.max(popupLeft, targetLeft);\n var minRight = Math.min(popupRight, targetRight);\n var xCenter = (maxLeft + minRight) / 2;\n var nextArrowX = xCenter - popupLeft;\n var maxTop = Math.max(popupTop, targetTop);\n var minBottom = Math.min(popupBottom, targetBottom);\n var yCenter = (maxTop + minBottom) / 2;\n var nextArrowY = yCenter - popupTop;\n onPopupAlign === null || onPopupAlign === void 0 || onPopupAlign(popupEle, nextAlignInfo);\n\n // Additional calculate right & bottom position\n var offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);\n var offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);\n if (_scaleX === 1) {\n nextOffsetX = Math.round(nextOffsetX);\n offsetX4Right = Math.round(offsetX4Right);\n }\n if (_scaleY === 1) {\n nextOffsetY = Math.round(nextOffsetY);\n offsetY4Bottom = Math.round(offsetY4Bottom);\n }\n var nextOffsetInfo = {\n ready: true,\n offsetX: nextOffsetX / _scaleX,\n offsetY: nextOffsetY / _scaleY,\n offsetR: offsetX4Right / _scaleX,\n offsetB: offsetY4Bottom / _scaleY,\n arrowX: nextArrowX / _scaleX,\n arrowY: nextArrowY / _scaleY,\n scaleX: _scaleX,\n scaleY: _scaleY,\n align: nextAlignInfo\n };\n setOffsetInfo(nextOffsetInfo);\n }\n });\n var triggerAlign = function triggerAlign() {\n alignCountRef.current += 1;\n var id = alignCountRef.current;\n\n // Merge all align requirement into one frame\n Promise.resolve().then(function () {\n if (alignCountRef.current === id) {\n onAlign();\n }\n });\n };\n\n // Reset ready status when placement & open changed\n var resetReady = function resetReady() {\n setOffsetInfo(function (ori) {\n return _objectSpread(_objectSpread({}, ori), {}, {\n ready: false\n });\n });\n };\n useLayoutEffect(resetReady, [placement]);\n useLayoutEffect(function () {\n if (!open) {\n resetReady();\n }\n }, [open]);\n return [offsetInfo.ready, offsetInfo.offsetX, offsetInfo.offsetY, offsetInfo.offsetR, offsetInfo.offsetB, offsetInfo.arrowX, offsetInfo.arrowY, offsetInfo.scaleX, offsetInfo.scaleY, offsetInfo.align, triggerAlign];\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"prefixCls\", \"children\", \"action\", \"showAction\", \"hideAction\", \"popupVisible\", \"defaultPopupVisible\", \"onPopupVisibleChange\", \"afterPopupVisibleChange\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"focusDelay\", \"blurDelay\", \"mask\", \"maskClosable\", \"getPopupContainer\", \"forceRender\", \"autoDestroy\", \"destroyPopupOnHide\", \"popup\", \"popupClassName\", \"popupStyle\", \"popupPlacement\", \"builtinPlacements\", \"popupAlign\", \"zIndex\", \"stretch\", \"getPopupClassNameFromAlign\", \"fresh\", \"alignPoint\", \"onPopupClick\", \"onPopupAlign\", \"arrow\", \"popupMotion\", \"maskMotion\", \"popupTransitionName\", \"popupAnimation\", \"maskTransitionName\", \"maskAnimation\", \"className\", \"getTriggerDOMNode\"];\nimport Portal from '@rc-component/portal';\nimport classNames from 'classnames';\nimport ResizeObserver from 'rc-resize-observer';\nimport { isDOM } from \"rc-util/es/Dom/findDOMNode\";\nimport { getShadowRoot } from \"rc-util/es/Dom/shadow\";\nimport useEvent from \"rc-util/es/hooks/useEvent\";\nimport useId from \"rc-util/es/hooks/useId\";\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport isMobile from \"rc-util/es/isMobile\";\nimport * as React from 'react';\nimport Popup from \"./Popup\";\nimport TriggerWrapper from \"./TriggerWrapper\";\nimport TriggerContext from \"./context\";\nimport useAction from \"./hooks/useAction\";\nimport useAlign from \"./hooks/useAlign\";\nimport useWatch from \"./hooks/useWatch\";\nimport useWinClick from \"./hooks/useWinClick\";\nimport { getAlignPopupClassName, getMotion } from \"./util\";\n\n// Removed Props List\n// Seems this can be auto\n// getDocument?: (element?: HTMLElement) => Document;\n\n// New version will not wrap popup with `rc-trigger-popup-content` when multiple children\n\nexport function generateTrigger() {\n var PortalComponent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Portal;\n var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-trigger-popup' : _props$prefixCls,\n children = props.children,\n _props$action = props.action,\n action = _props$action === void 0 ? 'hover' : _props$action,\n showAction = props.showAction,\n hideAction = props.hideAction,\n popupVisible = props.popupVisible,\n defaultPopupVisible = props.defaultPopupVisible,\n onPopupVisibleChange = props.onPopupVisibleChange,\n afterPopupVisibleChange = props.afterPopupVisibleChange,\n mouseEnterDelay = props.mouseEnterDelay,\n _props$mouseLeaveDela = props.mouseLeaveDelay,\n mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,\n focusDelay = props.focusDelay,\n blurDelay = props.blurDelay,\n mask = props.mask,\n _props$maskClosable = props.maskClosable,\n maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,\n getPopupContainer = props.getPopupContainer,\n forceRender = props.forceRender,\n autoDestroy = props.autoDestroy,\n destroyPopupOnHide = props.destroyPopupOnHide,\n popup = props.popup,\n popupClassName = props.popupClassName,\n popupStyle = props.popupStyle,\n popupPlacement = props.popupPlacement,\n _props$builtinPlaceme = props.builtinPlacements,\n builtinPlacements = _props$builtinPlaceme === void 0 ? {} : _props$builtinPlaceme,\n popupAlign = props.popupAlign,\n zIndex = props.zIndex,\n stretch = props.stretch,\n getPopupClassNameFromAlign = props.getPopupClassNameFromAlign,\n fresh = props.fresh,\n alignPoint = props.alignPoint,\n onPopupClick = props.onPopupClick,\n onPopupAlign = props.onPopupAlign,\n arrow = props.arrow,\n popupMotion = props.popupMotion,\n maskMotion = props.maskMotion,\n popupTransitionName = props.popupTransitionName,\n popupAnimation = props.popupAnimation,\n maskTransitionName = props.maskTransitionName,\n maskAnimation = props.maskAnimation,\n className = props.className,\n getTriggerDOMNode = props.getTriggerDOMNode,\n restProps = _objectWithoutProperties(props, _excluded);\n var mergedAutoDestroy = autoDestroy || destroyPopupOnHide || false;\n\n // =========================== Mobile ===========================\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n mobile = _React$useState2[0],\n setMobile = _React$useState2[1];\n useLayoutEffect(function () {\n setMobile(isMobile());\n }, []);\n\n // ========================== Context ===========================\n var subPopupElements = React.useRef({});\n var parentContext = React.useContext(TriggerContext);\n var context = React.useMemo(function () {\n return {\n registerSubPopup: function registerSubPopup(id, subPopupEle) {\n subPopupElements.current[id] = subPopupEle;\n parentContext === null || parentContext === void 0 || parentContext.registerSubPopup(id, subPopupEle);\n }\n };\n }, [parentContext]);\n\n // =========================== Popup ============================\n var id = useId();\n var _React$useState3 = React.useState(null),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n popupEle = _React$useState4[0],\n setPopupEle = _React$useState4[1];\n\n // Used for forwardRef popup. Not use internal\n var externalPopupRef = React.useRef(null);\n var setPopupRef = useEvent(function (node) {\n externalPopupRef.current = node;\n if (isDOM(node) && popupEle !== node) {\n setPopupEle(node);\n }\n parentContext === null || parentContext === void 0 || parentContext.registerSubPopup(id, node);\n });\n\n // =========================== Target ===========================\n // Use state to control here since `useRef` update not trigger render\n var _React$useState5 = React.useState(null),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n targetEle = _React$useState6[0],\n setTargetEle = _React$useState6[1];\n\n // Used for forwardRef target. Not use internal\n var externalForwardRef = React.useRef(null);\n var setTargetRef = useEvent(function (node) {\n if (isDOM(node) && targetEle !== node) {\n setTargetEle(node);\n externalForwardRef.current = node;\n }\n });\n\n // ========================== Children ==========================\n var child = React.Children.only(children);\n var originChildProps = (child === null || child === void 0 ? void 0 : child.props) || {};\n var cloneProps = {};\n var inPopupOrChild = useEvent(function (ele) {\n var _getShadowRoot, _getShadowRoot2;\n var childDOM = targetEle;\n return (childDOM === null || childDOM === void 0 ? void 0 : childDOM.contains(ele)) || ((_getShadowRoot = getShadowRoot(childDOM)) === null || _getShadowRoot === void 0 ? void 0 : _getShadowRoot.host) === ele || ele === childDOM || (popupEle === null || popupEle === void 0 ? void 0 : popupEle.contains(ele)) || ((_getShadowRoot2 = getShadowRoot(popupEle)) === null || _getShadowRoot2 === void 0 ? void 0 : _getShadowRoot2.host) === ele || ele === popupEle || Object.values(subPopupElements.current).some(function (subPopupEle) {\n return (subPopupEle === null || subPopupEle === void 0 ? void 0 : subPopupEle.contains(ele)) || ele === subPopupEle;\n });\n });\n\n // =========================== Motion ===========================\n var mergePopupMotion = getMotion(prefixCls, popupMotion, popupAnimation, popupTransitionName);\n var mergeMaskMotion = getMotion(prefixCls, maskMotion, maskAnimation, maskTransitionName);\n\n // ============================ Open ============================\n var _React$useState7 = React.useState(defaultPopupVisible || false),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n internalOpen = _React$useState8[0],\n setInternalOpen = _React$useState8[1];\n\n // Render still use props as first priority\n var mergedOpen = popupVisible !== null && popupVisible !== void 0 ? popupVisible : internalOpen;\n\n // We use effect sync here in case `popupVisible` back to `undefined`\n var setMergedOpen = useEvent(function (nextOpen) {\n if (popupVisible === undefined) {\n setInternalOpen(nextOpen);\n }\n });\n useLayoutEffect(function () {\n setInternalOpen(popupVisible || false);\n }, [popupVisible]);\n var openRef = React.useRef(mergedOpen);\n openRef.current = mergedOpen;\n var lastTriggerRef = React.useRef([]);\n lastTriggerRef.current = [];\n var internalTriggerOpen = useEvent(function (nextOpen) {\n var _lastTriggerRef$curre;\n setMergedOpen(nextOpen);\n\n // Enter or Pointer will both trigger open state change\n // We only need take one to avoid duplicated change event trigger\n // Use `lastTriggerRef` to record last open type\n if (((_lastTriggerRef$curre = lastTriggerRef.current[lastTriggerRef.current.length - 1]) !== null && _lastTriggerRef$curre !== void 0 ? _lastTriggerRef$curre : mergedOpen) !== nextOpen) {\n lastTriggerRef.current.push(nextOpen);\n onPopupVisibleChange === null || onPopupVisibleChange === void 0 || onPopupVisibleChange(nextOpen);\n }\n });\n\n // Trigger for delay\n var delayRef = React.useRef();\n var clearDelay = function clearDelay() {\n clearTimeout(delayRef.current);\n };\n var triggerOpen = function triggerOpen(nextOpen) {\n var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n clearDelay();\n if (delay === 0) {\n internalTriggerOpen(nextOpen);\n } else {\n delayRef.current = setTimeout(function () {\n internalTriggerOpen(nextOpen);\n }, delay * 1000);\n }\n };\n React.useEffect(function () {\n return clearDelay;\n }, []);\n\n // ========================== Motion ============================\n var _React$useState9 = React.useState(false),\n _React$useState10 = _slicedToArray(_React$useState9, 2),\n inMotion = _React$useState10[0],\n setInMotion = _React$useState10[1];\n useLayoutEffect(function (firstMount) {\n if (!firstMount || mergedOpen) {\n setInMotion(true);\n }\n }, [mergedOpen]);\n var _React$useState11 = React.useState(null),\n _React$useState12 = _slicedToArray(_React$useState11, 2),\n motionPrepareResolve = _React$useState12[0],\n setMotionPrepareResolve = _React$useState12[1];\n\n // =========================== Align ============================\n var _React$useState13 = React.useState(null),\n _React$useState14 = _slicedToArray(_React$useState13, 2),\n mousePos = _React$useState14[0],\n setMousePos = _React$useState14[1];\n var setMousePosByEvent = function setMousePosByEvent(event) {\n setMousePos([event.clientX, event.clientY]);\n };\n var _useAlign = useAlign(mergedOpen, popupEle, alignPoint && mousePos !== null ? mousePos : targetEle, popupPlacement, builtinPlacements, popupAlign, onPopupAlign),\n _useAlign2 = _slicedToArray(_useAlign, 11),\n ready = _useAlign2[0],\n offsetX = _useAlign2[1],\n offsetY = _useAlign2[2],\n offsetR = _useAlign2[3],\n offsetB = _useAlign2[4],\n arrowX = _useAlign2[5],\n arrowY = _useAlign2[6],\n scaleX = _useAlign2[7],\n scaleY = _useAlign2[8],\n alignInfo = _useAlign2[9],\n onAlign = _useAlign2[10];\n var _useAction = useAction(mobile, action, showAction, hideAction),\n _useAction2 = _slicedToArray(_useAction, 2),\n showActions = _useAction2[0],\n hideActions = _useAction2[1];\n var clickToShow = showActions.has('click');\n var clickToHide = hideActions.has('click') || hideActions.has('contextMenu');\n var triggerAlign = useEvent(function () {\n if (!inMotion) {\n onAlign();\n }\n });\n var onScroll = function onScroll() {\n if (openRef.current && alignPoint && clickToHide) {\n triggerOpen(false);\n }\n };\n useWatch(mergedOpen, targetEle, popupEle, triggerAlign, onScroll);\n useLayoutEffect(function () {\n triggerAlign();\n }, [mousePos, popupPlacement]);\n\n // When no builtinPlacements and popupAlign changed\n useLayoutEffect(function () {\n if (mergedOpen && !(builtinPlacements !== null && builtinPlacements !== void 0 && builtinPlacements[popupPlacement])) {\n triggerAlign();\n }\n }, [JSON.stringify(popupAlign)]);\n var alignedClassName = React.useMemo(function () {\n var baseClassName = getAlignPopupClassName(builtinPlacements, prefixCls, alignInfo, alignPoint);\n return classNames(baseClassName, getPopupClassNameFromAlign === null || getPopupClassNameFromAlign === void 0 ? void 0 : getPopupClassNameFromAlign(alignInfo));\n }, [alignInfo, getPopupClassNameFromAlign, builtinPlacements, prefixCls, alignPoint]);\n\n // ============================ Refs ============================\n React.useImperativeHandle(ref, function () {\n return {\n nativeElement: externalForwardRef.current,\n popupElement: externalPopupRef.current,\n forceAlign: triggerAlign\n };\n });\n\n // ========================== Stretch ===========================\n var _React$useState15 = React.useState(0),\n _React$useState16 = _slicedToArray(_React$useState15, 2),\n targetWidth = _React$useState16[0],\n setTargetWidth = _React$useState16[1];\n var _React$useState17 = React.useState(0),\n _React$useState18 = _slicedToArray(_React$useState17, 2),\n targetHeight = _React$useState18[0],\n setTargetHeight = _React$useState18[1];\n var syncTargetSize = function syncTargetSize() {\n if (stretch && targetEle) {\n var rect = targetEle.getBoundingClientRect();\n setTargetWidth(rect.width);\n setTargetHeight(rect.height);\n }\n };\n var onTargetResize = function onTargetResize() {\n syncTargetSize();\n triggerAlign();\n };\n\n // ========================== Motion ============================\n var onVisibleChanged = function onVisibleChanged(visible) {\n setInMotion(false);\n onAlign();\n afterPopupVisibleChange === null || afterPopupVisibleChange === void 0 || afterPopupVisibleChange(visible);\n };\n\n // We will trigger align when motion is in prepare\n var onPrepare = function onPrepare() {\n return new Promise(function (resolve) {\n syncTargetSize();\n setMotionPrepareResolve(function () {\n return resolve;\n });\n });\n };\n useLayoutEffect(function () {\n if (motionPrepareResolve) {\n onAlign();\n motionPrepareResolve();\n setMotionPrepareResolve(null);\n }\n }, [motionPrepareResolve]);\n\n // =========================== Action ===========================\n /**\n * Util wrapper for trigger action\n */\n function wrapperAction(eventName, nextOpen, delay, preEvent) {\n cloneProps[eventName] = function (event) {\n var _originChildProps$eve;\n preEvent === null || preEvent === void 0 || preEvent(event);\n triggerOpen(nextOpen, delay);\n\n // Pass to origin\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n (_originChildProps$eve = originChildProps[eventName]) === null || _originChildProps$eve === void 0 || _originChildProps$eve.call.apply(_originChildProps$eve, [originChildProps, event].concat(args));\n };\n }\n\n // ======================= Action: Click ========================\n if (clickToShow || clickToHide) {\n cloneProps.onClick = function (event) {\n var _originChildProps$onC;\n if (openRef.current && clickToHide) {\n triggerOpen(false);\n } else if (!openRef.current && clickToShow) {\n setMousePosByEvent(event);\n triggerOpen(true);\n }\n\n // Pass to origin\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n (_originChildProps$onC = originChildProps.onClick) === null || _originChildProps$onC === void 0 || _originChildProps$onC.call.apply(_originChildProps$onC, [originChildProps, event].concat(args));\n };\n }\n\n // Click to hide is special action since click popup element should not hide\n var onPopupPointerDown = useWinClick(mergedOpen, clickToHide, targetEle, popupEle, mask, maskClosable, inPopupOrChild, triggerOpen);\n\n // ======================= Action: Hover ========================\n var hoverToShow = showActions.has('hover');\n var hoverToHide = hideActions.has('hover');\n var onPopupMouseEnter;\n var onPopupMouseLeave;\n if (hoverToShow) {\n // Compatible with old browser which not support pointer event\n wrapperAction('onMouseEnter', true, mouseEnterDelay, function (event) {\n setMousePosByEvent(event);\n });\n wrapperAction('onPointerEnter', true, mouseEnterDelay, function (event) {\n setMousePosByEvent(event);\n });\n onPopupMouseEnter = function onPopupMouseEnter(event) {\n // Only trigger re-open when popup is visible\n if ((mergedOpen || inMotion) && popupEle !== null && popupEle !== void 0 && popupEle.contains(event.target)) {\n triggerOpen(true, mouseEnterDelay);\n }\n };\n\n // Align Point\n if (alignPoint) {\n cloneProps.onMouseMove = function (event) {\n var _originChildProps$onM;\n // setMousePosByEvent(event);\n (_originChildProps$onM = originChildProps.onMouseMove) === null || _originChildProps$onM === void 0 || _originChildProps$onM.call(originChildProps, event);\n };\n }\n }\n if (hoverToHide) {\n wrapperAction('onMouseLeave', false, mouseLeaveDelay);\n wrapperAction('onPointerLeave', false, mouseLeaveDelay);\n onPopupMouseLeave = function onPopupMouseLeave() {\n triggerOpen(false, mouseLeaveDelay);\n };\n }\n\n // ======================= Action: Focus ========================\n if (showActions.has('focus')) {\n wrapperAction('onFocus', true, focusDelay);\n }\n if (hideActions.has('focus')) {\n wrapperAction('onBlur', false, blurDelay);\n }\n\n // ==================== Action: ContextMenu =====================\n if (showActions.has('contextMenu')) {\n cloneProps.onContextMenu = function (event) {\n var _originChildProps$onC2;\n if (openRef.current && hideActions.has('contextMenu')) {\n triggerOpen(false);\n } else {\n setMousePosByEvent(event);\n triggerOpen(true);\n }\n event.preventDefault();\n\n // Pass to origin\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n (_originChildProps$onC2 = originChildProps.onContextMenu) === null || _originChildProps$onC2 === void 0 || _originChildProps$onC2.call.apply(_originChildProps$onC2, [originChildProps, event].concat(args));\n };\n }\n\n // ========================= ClassName ==========================\n if (className) {\n cloneProps.className = classNames(originChildProps.className, className);\n }\n\n // =========================== Render ===========================\n var mergedChildrenProps = _objectSpread(_objectSpread({}, originChildProps), cloneProps);\n\n // Pass props into cloneProps for nest usage\n var passedProps = {};\n var passedEventList = ['onContextMenu', 'onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur'];\n passedEventList.forEach(function (eventName) {\n if (restProps[eventName]) {\n passedProps[eventName] = function () {\n var _mergedChildrenProps$;\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n (_mergedChildrenProps$ = mergedChildrenProps[eventName]) === null || _mergedChildrenProps$ === void 0 || _mergedChildrenProps$.call.apply(_mergedChildrenProps$, [mergedChildrenProps].concat(args));\n restProps[eventName].apply(restProps, args);\n };\n }\n });\n\n // Child Node\n var triggerNode = /*#__PURE__*/React.cloneElement(child, _objectSpread(_objectSpread({}, mergedChildrenProps), passedProps));\n var arrowPos = {\n x: arrowX,\n y: arrowY\n };\n var innerArrow = arrow ? _objectSpread({}, arrow !== true ? arrow : {}) : null;\n\n // Render\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ResizeObserver, {\n disabled: !mergedOpen,\n ref: setTargetRef,\n onResize: onTargetResize\n }, /*#__PURE__*/React.createElement(TriggerWrapper, {\n getTriggerDOMNode: getTriggerDOMNode\n }, triggerNode)), /*#__PURE__*/React.createElement(TriggerContext.Provider, {\n value: context\n }, /*#__PURE__*/React.createElement(Popup, {\n portal: PortalComponent,\n ref: setPopupRef,\n prefixCls: prefixCls,\n popup: popup,\n className: classNames(popupClassName, alignedClassName),\n style: popupStyle,\n target: targetEle,\n onMouseEnter: onPopupMouseEnter,\n onMouseLeave: onPopupMouseLeave\n // https://github.com/ant-design/ant-design/issues/43924\n ,\n onPointerEnter: onPopupMouseEnter,\n zIndex: zIndex\n // Open\n ,\n open: mergedOpen,\n keepDom: inMotion,\n fresh: fresh\n // Click\n ,\n onClick: onPopupClick,\n onPointerDownCapture: onPopupPointerDown\n // Mask\n ,\n mask: mask\n // Motion\n ,\n motion: mergePopupMotion,\n maskMotion: mergeMaskMotion,\n onVisibleChanged: onVisibleChanged,\n onPrepare: onPrepare\n // Portal\n ,\n forceRender: forceRender,\n autoDestroy: mergedAutoDestroy,\n getPopupContainer: getPopupContainer\n // Arrow\n ,\n align: alignInfo,\n arrow: innerArrow,\n arrowPos: arrowPos\n // Align\n ,\n ready: ready,\n offsetX: offsetX,\n offsetY: offsetY,\n offsetR: offsetR,\n offsetB: offsetB,\n onAlign: triggerAlign\n // Stretch\n ,\n stretch: stretch,\n targetWidth: targetWidth / scaleX,\n targetHeight: targetHeight / scaleY\n })));\n });\n if (process.env.NODE_ENV !== 'production') {\n Trigger.displayName = 'Trigger';\n }\n return Trigger;\n}\nexport default generateTrigger(Portal);","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport { collectScroller, getWin } from \"../util\";\nexport default function useWatch(open, target, popup, onAlign, onScroll) {\n useLayoutEffect(function () {\n if (open && target && popup) {\n var targetElement = target;\n var popupElement = popup;\n var targetScrollList = collectScroller(targetElement);\n var popupScrollList = collectScroller(popupElement);\n var win = getWin(popupElement);\n var mergedList = new Set([win].concat(_toConsumableArray(targetScrollList), _toConsumableArray(popupScrollList)));\n function notifyScroll() {\n onAlign();\n onScroll();\n }\n mergedList.forEach(function (scroller) {\n scroller.addEventListener('scroll', notifyScroll, {\n passive: true\n });\n });\n win.addEventListener('resize', notifyScroll, {\n passive: true\n });\n\n // First time always do align\n onAlign();\n return function () {\n mergedList.forEach(function (scroller) {\n scroller.removeEventListener('scroll', notifyScroll);\n win.removeEventListener('resize', notifyScroll);\n });\n };\n }\n }, [open, target, popup]);\n}","import { getShadowRoot } from \"rc-util/es/Dom/shadow\";\nimport { warning } from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport { getWin } from \"../util\";\nexport default function useWinClick(open, clickToHide, targetEle, popupEle, mask, maskClosable, inPopupOrChild, triggerOpen) {\n var openRef = React.useRef(open);\n openRef.current = open;\n var popupPointerDownRef = React.useRef(false);\n\n // Click to hide is special action since click popup element should not hide\n React.useEffect(function () {\n if (clickToHide && popupEle && (!mask || maskClosable)) {\n var onPointerDown = function onPointerDown() {\n popupPointerDownRef.current = false;\n };\n var onTriggerClose = function onTriggerClose(e) {\n var _e$composedPath;\n if (openRef.current && !inPopupOrChild(((_e$composedPath = e.composedPath) === null || _e$composedPath === void 0 || (_e$composedPath = _e$composedPath.call(e)) === null || _e$composedPath === void 0 ? void 0 : _e$composedPath[0]) || e.target) && !popupPointerDownRef.current) {\n triggerOpen(false);\n }\n };\n var win = getWin(popupEle);\n win.addEventListener('pointerdown', onPointerDown, true);\n win.addEventListener('mousedown', onTriggerClose, true);\n win.addEventListener('contextmenu', onTriggerClose, true);\n\n // shadow root\n var targetShadowRoot = getShadowRoot(targetEle);\n if (targetShadowRoot) {\n targetShadowRoot.addEventListener('mousedown', onTriggerClose, true);\n targetShadowRoot.addEventListener('contextmenu', onTriggerClose, true);\n }\n\n // Warning if target and popup not in same root\n if (process.env.NODE_ENV !== 'production') {\n var _targetEle$getRootNod, _popupEle$getRootNode;\n var targetRoot = targetEle === null || targetEle === void 0 || (_targetEle$getRootNod = targetEle.getRootNode) === null || _targetEle$getRootNod === void 0 ? void 0 : _targetEle$getRootNod.call(targetEle);\n var popupRoot = (_popupEle$getRootNode = popupEle.getRootNode) === null || _popupEle$getRootNode === void 0 ? void 0 : _popupEle$getRootNode.call(popupEle);\n warning(targetRoot === popupRoot, \"trigger element and popup element should in same shadow root.\");\n }\n return function () {\n win.removeEventListener('pointerdown', onPointerDown, true);\n win.removeEventListener('mousedown', onTriggerClose, true);\n win.removeEventListener('contextmenu', onTriggerClose, true);\n if (targetShadowRoot) {\n targetShadowRoot.removeEventListener('mousedown', onTriggerClose, true);\n targetShadowRoot.removeEventListener('contextmenu', onTriggerClose, true);\n }\n };\n }\n }, [clickToHide, targetEle, popupEle, mask, maskClosable]);\n function onPopupPointerDown() {\n popupPointerDownRef.current = true;\n }\n return onPopupPointerDown;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.pathToRegexp = exports.tokensToRegexp = exports.regexpToFunction = exports.match = exports.tokensToFunction = exports.compile = exports.parse = void 0;\n/**\n * Tokenize input string.\n */\n\nfunction lexer(str) {\n var tokens = [];\n var i = 0;\n\n while (i < str.length) {\n var char = str[i];\n\n if (char === '*' || char === '+' || char === '?') {\n tokens.push({\n type: 'MODIFIER',\n index: i,\n value: str[i++]\n });\n continue;\n }\n\n if (char === '\\\\') {\n tokens.push({\n type: 'ESCAPED_CHAR',\n index: i++,\n value: str[i++]\n });\n continue;\n }\n\n if (char === '{') {\n tokens.push({\n type: 'OPEN',\n index: i,\n value: str[i++]\n });\n continue;\n }\n\n if (char === '}') {\n tokens.push({\n type: 'CLOSE',\n index: i,\n value: str[i++]\n });\n continue;\n }\n\n if (char === ':') {\n var name = '';\n var j = i + 1;\n\n while (j < str.length) {\n var code = str.charCodeAt(j);\n\n if ( // `0-9`\n code >= 48 && code <= 57 || // `A-Z`\n code >= 65 && code <= 90 || // `a-z`\n code >= 97 && code <= 122 || // `_`\n code === 95) {\n name += str[j++];\n continue;\n }\n\n break;\n }\n\n if (!name) throw new TypeError('Missing parameter name at ' + i);\n tokens.push({\n type: 'NAME',\n index: i,\n value: name\n });\n i = j;\n continue;\n }\n\n if (char === '(') {\n var count = 1;\n var pattern = '';\n var j = i + 1;\n\n if (str[j] === '?') {\n throw new TypeError('Pattern cannot start with \"?\" at ' + j);\n }\n\n while (j < str.length) {\n if (str[j] === '\\\\') {\n pattern += str[j++] + str[j++];\n continue;\n }\n\n if (str[j] === ')') {\n count--;\n\n if (count === 0) {\n j++;\n break;\n }\n } else if (str[j] === '(') {\n count++;\n\n if (str[j + 1] !== '?') {\n throw new TypeError('Capturing groups are not allowed at ' + j);\n }\n }\n\n pattern += str[j++];\n }\n\n if (count) throw new TypeError('Unbalanced pattern at ' + i);\n if (!pattern) throw new TypeError('Missing pattern at ' + i);\n tokens.push({\n type: 'PATTERN',\n index: i,\n value: pattern\n });\n i = j;\n continue;\n }\n\n tokens.push({\n type: 'CHAR',\n index: i,\n value: str[i++]\n });\n }\n\n tokens.push({\n type: 'END',\n index: i,\n value: ''\n });\n return tokens;\n}\n/**\n * Parse a string for the raw tokens.\n */\n\n\nfunction parse(str, options) {\n if (options === void 0) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n }\n\n var tokens = lexer(str);\n var _a = options.prefixes,\n prefixes = _a === void 0 ? './' : _a;\n var defaultPattern = '[^' + escapeString(options.delimiter || '/#?') + ']+?';\n var result = [];\n var key = 0;\n var i = 0;\n var path = '';\n\n var tryConsume = function tryConsume(type) {\n if (i < tokens.length && tokens[i].type === type) return tokens[i++].value;\n };\n\n var mustConsume = function mustConsume(type) {\n var value = tryConsume(type);\n if (value !== undefined) return value;\n var _a = tokens[i],\n nextType = _a.type,\n index = _a.index;\n throw new TypeError('Unexpected ' + nextType + ' at ' + index + ', expected ' + type);\n };\n\n var consumeText = function consumeText() {\n var result = '';\n var value; // tslint:disable-next-line\n\n while (value = tryConsume('CHAR') || tryConsume('ESCAPED_CHAR')) {\n result += value;\n }\n\n return result;\n };\n\n while (i < tokens.length) {\n var char = tryConsume('CHAR');\n var name = tryConsume('NAME');\n var pattern = tryConsume('PATTERN');\n\n if (name || pattern) {\n var prefix = char || '';\n\n if (prefixes.indexOf(prefix) === -1) {\n path += prefix;\n prefix = '';\n }\n\n if (path) {\n result.push(path);\n path = '';\n }\n\n result.push({\n name: name || key++,\n prefix: prefix,\n suffix: '',\n pattern: pattern || defaultPattern,\n modifier: tryConsume('MODIFIER') || ''\n });\n continue;\n }\n\n var value = char || tryConsume('ESCAPED_CHAR');\n\n if (value) {\n path += value;\n continue;\n }\n\n if (path) {\n result.push(path);\n path = '';\n }\n\n var open = tryConsume('OPEN');\n\n if (open) {\n var prefix = consumeText();\n var name_1 = tryConsume('NAME') || '';\n var pattern_1 = tryConsume('PATTERN') || '';\n var suffix = consumeText();\n mustConsume('CLOSE');\n result.push({\n name: name_1 || (pattern_1 ? key++ : ''),\n pattern: name_1 && !pattern_1 ? defaultPattern : pattern_1,\n prefix: prefix,\n suffix: suffix,\n modifier: tryConsume('MODIFIER') || ''\n });\n continue;\n }\n\n mustConsume('END');\n }\n\n return result;\n}\n\nexports.parse = parse;\n/**\n * Compile a string to a template function for the path.\n */\n\nfunction compile(str, options) {\n return tokensToFunction(parse(str, options), options);\n}\n\nexports.compile = compile;\n/**\n * Expose a method for transforming tokens into the path function.\n */\n\nfunction tokensToFunction(tokens, options) {\n if (options === void 0) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n }\n\n var reFlags = flags(options);\n var _a = options.encode,\n encode = _a === void 0 ? function (x) {\n return x;\n } : _a,\n _b = options.validate,\n validate = _b === void 0 ? true : _b; // Compile all the tokens into regexps.\n\n var matches = tokens.map(function (token) {\n if (_typeof(token) === 'object') {\n return new RegExp('^(?:' + token.pattern + ')$', reFlags);\n }\n });\n return function (data) {\n var path = '';\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data ? data[token.name] : undefined;\n var optional = token.modifier === '?' || token.modifier === '*';\n var repeat = token.modifier === '*' || token.modifier === '+';\n\n if (Array.isArray(value)) {\n if (!repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got an array');\n }\n\n if (value.length === 0) {\n if (optional) continue;\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n\n for (var j = 0; j < value.length; j++) {\n var segment = encode(value[j], token);\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"');\n }\n\n path += token.prefix + segment + token.suffix;\n }\n\n continue;\n }\n\n if (typeof value === 'string' || typeof value === 'number') {\n var segment = encode(String(value), token);\n\n if (validate && !matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"');\n }\n\n path += token.prefix + segment + token.suffix;\n continue;\n }\n\n if (optional) continue;\n var typeOfMessage = repeat ? 'an array' : 'a string';\n throw new TypeError('Expected \"' + token.name + '\" to be ' + typeOfMessage);\n }\n\n return path;\n };\n}\n\nexports.tokensToFunction = tokensToFunction;\n/**\n * Create path match function from `path-to-regexp` spec.\n */\n\nfunction match(str, options) {\n var keys = [];\n var re = pathToRegexp(str, keys, options);\n return regexpToFunction(re, keys, options);\n}\n\nexports.match = match;\n/**\n * Create a path match function from `path-to-regexp` output.\n */\n\nfunction regexpToFunction(re, keys, options) {\n if (options === void 0) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n }\n\n var _a = options.decode,\n decode = _a === void 0 ? function (x) {\n return x;\n } : _a;\n return function (pathname) {\n var m = re.exec(pathname);\n if (!m) return false;\n var path = m[0],\n index = m.index;\n var params = Object.create(null);\n\n var _loop_1 = function _loop_1(i) {\n // tslint:disable-next-line\n if (m[i] === undefined) return 'continue';\n var key = keys[i - 1];\n\n if (key.modifier === '*' || key.modifier === '+') {\n params[key.name] = m[i].split(key.prefix + key.suffix).map(function (value) {\n return decode(value, key);\n });\n } else {\n params[key.name] = decode(m[i], key);\n }\n };\n\n for (var i = 1; i < m.length; i++) {\n _loop_1(i);\n }\n\n return {\n path: path,\n index: index,\n params: params\n };\n };\n}\n\nexports.regexpToFunction = regexpToFunction;\n/**\n * Escape a regular expression string.\n */\n\nfunction escapeString(str) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1');\n}\n/**\n * Get the flags for a regexp from the options.\n */\n\n\nfunction flags(options) {\n return options && options.sensitive ? '' : 'i';\n}\n/**\n * Pull out keys from a regexp.\n */\n\n\nfunction regexpToRegexp(path, keys) {\n if (!keys) return path; // Use a negative lookahead to match only capturing groups.\n\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: '',\n suffix: '',\n modifier: '',\n pattern: ''\n });\n }\n }\n\n return path;\n}\n/**\n * Transform an array into a regexp.\n */\n\n\nfunction arrayToRegexp(paths, keys, options) {\n var parts = paths.map(function (path) {\n return pathToRegexp(path, keys, options).source;\n });\n return new RegExp('(?:' + parts.join('|') + ')', flags(options));\n}\n/**\n * Create a path regexp from string input.\n */\n\n\nfunction stringToRegexp(path, keys, options) {\n return tokensToRegexp(parse(path, options), keys, options);\n}\n/**\n * Expose a function for taking tokens and returning a RegExp.\n */\n\n\nfunction tokensToRegexp(tokens, keys, options) {\n if (options === void 0) {\n // eslint-disable-next-line no-param-reassign\n options = {};\n }\n\n var _a = options.strict,\n strict = _a === void 0 ? false : _a,\n _b = options.start,\n start = _b === void 0 ? true : _b,\n _c = options.end,\n end = _c === void 0 ? true : _c,\n _d = options.encode,\n encode = _d === void 0 ? function (x) {\n return x;\n } : _d;\n var endsWith = '[' + escapeString(options.endsWith || '') + ']|$';\n var delimiter = '[' + escapeString(options.delimiter || '/#?') + ']';\n var route = start ? '^' : ''; // Iterate over the tokens and create our regexp string.\n\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n\n if (typeof token === 'string') {\n route += escapeString(encode(token));\n } else {\n var prefix = escapeString(encode(token.prefix));\n var suffix = escapeString(encode(token.suffix));\n\n if (token.pattern) {\n if (keys) keys.push(token);\n\n if (prefix || suffix) {\n if (token.modifier === '+' || token.modifier === '*') {\n var mod = token.modifier === '*' ? '?' : '';\n route += '(?:' + prefix + '((?:' + token.pattern + ')(?:' + suffix + prefix + '(?:' + token.pattern + '))*)' + suffix + ')' + mod;\n } else {\n route += '(?:' + prefix + '(' + token.pattern + ')' + suffix + ')' + token.modifier;\n }\n } else {\n route += '(' + token.pattern + ')' + token.modifier;\n }\n } else {\n route += '(?:' + prefix + suffix + ')' + token.modifier;\n }\n }\n }\n\n if (end) {\n if (!strict) route += delimiter + '?';\n route += !options.endsWith ? '$' : '(?=' + endsWith + ')';\n } else {\n var endToken = tokens[tokens.length - 1];\n var isEndDelimited = typeof endToken === 'string' ? delimiter.indexOf(endToken[endToken.length - 1]) > -1 : // tslint:disable-next-line\n endToken === undefined;\n\n if (!strict) {\n route += '(?:' + delimiter + '(?=' + endsWith + '))?';\n }\n\n if (!isEndDelimited) {\n route += '(?=' + delimiter + '|' + endsWith + ')';\n }\n }\n\n return new RegExp(route, flags(options));\n}\n\nexports.tokensToRegexp = tokensToRegexp;\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n */\n\nfunction pathToRegexp(path, keys, options) {\n if (path instanceof RegExp) return regexpToRegexp(path, keys);\n if (Array.isArray(path)) return arrayToRegexp(path, keys, options);\n return stringToRegexp(path, keys, options);\n}\n\nexports.pathToRegexp = pathToRegexp;","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('xlsx')) :\n typeof define === 'function' && define.amd ? define(['xlsx'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.TableExport = factory(global.XLSX));\n}(this, (function (XLSX) { 'use strict';\n\n function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\n var XLSX__default = /*#__PURE__*/_interopDefaultLegacy(XLSX);\n\n /**\r\n * 通过 Table 相关数据:dataSource, columns 来下载表格\r\n */\r\n var Export = /** @class */ (function () {\r\n function Export(dataSource, columns) {\r\n this.dataJson = [];\r\n this.headers = [];\r\n this.dataJson = this.genDataJson(dataSource, columns);\r\n this.headers = this.genHeaders(columns);\r\n }\r\n Export.prototype.genDataJson = function (dataSource, columns) {\r\n if (!dataSource) {\r\n return [];\r\n }\r\n return dataSource.map(function (item) {\r\n var newItem = {};\r\n columns.forEach(function (column) {\r\n newItem[column.title] = item[column.dataIndex];\r\n });\r\n return newItem;\r\n });\r\n };\r\n Export.prototype.genHeaders = function (columns) {\r\n return columns.map(function (column) { return column.title; });\r\n };\r\n Export.prototype.download = function (fileName, fileType) {\r\n if (fileType === void 0) { fileType = \"xlsx\"; }\r\n switch (fileType) {\r\n case \"xlsx\":\r\n case \"xls\":\r\n return this.downloadXLSX(fileName);\r\n default:\r\n return this.downloadXLSX(fileName);\r\n }\r\n };\r\n Export.prototype.downloadXLSX = function (fileName) {\r\n var wb = XLSX__default['default'].utils.book_new();\r\n var ws = XLSX__default['default'].utils.json_to_sheet(this.dataJson, {\r\n header: this.headers,\r\n });\r\n XLSX__default['default'].utils.book_append_sheet(wb, ws, \"sheet1\");\r\n return XLSX__default['default'].writeFile(wb, fileName + \".xlsx\");\r\n };\r\n return Export;\r\n }());\n\n return Export;\n\n})));\n","/*! cpexcel.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/*jshint -W100 */\nvar cptable = {version:\"1.15.0\"};\ncptable[437] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[620] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàąçêëèïîćÄĄĘęłôöĆûùŚÖÜ¢Ł¥śƒŹŻóÓńŃźż¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[737] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[850] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´±‗¾¶§÷¸°¨·¹³²■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[852] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´˝˛ˇ˘§÷¸°¨˙űŘř■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[857] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´±�¾¶§÷¸°¨·¹³²■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[861] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[865] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[866] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[874] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[895] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ČüéďäĎŤčěĚĹÍľǪÄÁÉžŽôöÓůÚýÖÜŠĽÝŘťáíóúňŇŮÔšřŕŔ¼§«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[932] = (function(){ var d = [], e = {}, D = [], j;\nD[0] = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~���������������������������������。「」、・ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙゚��������������������������������\".split(\"\");\nfor(j = 0; j != D[0].length; ++j) if(D[0][j].charCodeAt(0) !== 0xFFFD) { e[D[0][j]] = 0 + j; d[0 + j] = D[0][j];}\nD[129] = \"���������������������������������������������������������������� 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈〉《》「」『』【】+-±×�÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓�����������∈∋⊆⊇⊂⊃∪∩��������∧∨¬⇒⇔∀∃�����������∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬�������ʼn♯♭♪†‡¶����◯���\".split(\"\");\nfor(j = 0; j != D[129].length; ++j) if(D[129][j].charCodeAt(0) !== 0xFFFD) { e[D[129][j]] = 33024 + j; d[33024 + j] = D[129][j];}\nD[130] = \"�������������������������������������������������������������������������������0123456789�������ABCDEFGHIJKLMNOPQRSTUVWXYZ�������abcdefghijklmnopqrstuvwxyz����ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをん��������������\".split(\"\");\nfor(j = 0; j != D[130].length; ++j) if(D[130][j].charCodeAt(0) !== 0xFFFD) { e[D[130][j]] = 33280 + j; d[33280 + j] = D[130][j];}\nD[131] = \"����������������������������������������������������������������ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミ�ムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ��������ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ��������αβγδεζηθικλμνξοπρστυφχψω�����������������������������������������\".split(\"\");\nfor(j = 0; j != D[131].length; ++j) if(D[131][j].charCodeAt(0) !== 0xFFFD) { e[D[131][j]] = 33536 + j; d[33536 + j] = D[131][j];}\nD[132] = \"����������������������������������������������������������������АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ���������������абвгдеёжзийклмн�опрстуфхцчшщъыьэюя�������������─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂�����������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[132].length; ++j) if(D[132][j].charCodeAt(0) !== 0xFFFD) { e[D[132][j]] = 33792 + j; d[33792 + j] = D[132][j];}\nD[135] = \"����������������������������������������������������������������①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩ�㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡��������㍻�〝〟№㏍℡㊤㊥㊦㊧㊨㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪���������������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[135].length; ++j) if(D[135][j].charCodeAt(0) !== 0xFFFD) { e[D[135][j]] = 34560 + j; d[34560 + j] = D[135][j];}\nD[136] = \"���������������������������������������������������������������������������������������������������������������������������������������������������������������亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭���\".split(\"\");\nfor(j = 0; j != D[136].length; ++j) if(D[136][j].charCodeAt(0) !== 0xFFFD) { e[D[136][j]] = 34816 + j; d[34816 + j] = D[136][j];}\nD[137] = \"����������������������������������������������������������������院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円�園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改���\".split(\"\");\nfor(j = 0; j != D[137].length; ++j) if(D[137][j].charCodeAt(0) !== 0xFFFD) { e[D[137][j]] = 35072 + j; d[35072 + j] = D[137][j];}\nD[138] = \"����������������������������������������������������������������魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫�橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄���\".split(\"\");\nfor(j = 0; j != D[138].length; ++j) if(D[138][j].charCodeAt(0) !== 0xFFFD) { e[D[138][j]] = 35328 + j; d[35328 + j] = D[138][j];}\nD[139] = \"����������������������������������������������������������������機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救�朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈���\".split(\"\");\nfor(j = 0; j != D[139].length; ++j) if(D[139][j].charCodeAt(0) !== 0xFFFD) { e[D[139][j]] = 35584 + j; d[35584 + j] = D[139][j];}\nD[140] = \"����������������������������������������������������������������掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨�劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向���\".split(\"\");\nfor(j = 0; j != D[140].length; ++j) if(D[140][j].charCodeAt(0) !== 0xFFFD) { e[D[140][j]] = 35840 + j; d[35840 + j] = D[140][j];}\nD[141] = \"����������������������������������������������������������������后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降�項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷���\".split(\"\");\nfor(j = 0; j != D[141].length; ++j) if(D[141][j].charCodeAt(0) !== 0xFFFD) { e[D[141][j]] = 36096 + j; d[36096 + j] = D[141][j];}\nD[142] = \"����������������������������������������������������������������察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止�死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周���\".split(\"\");\nfor(j = 0; j != D[142].length; ++j) if(D[142][j].charCodeAt(0) !== 0xFFFD) { e[D[142][j]] = 36352 + j; d[36352 + j] = D[142][j];}\nD[143] = \"����������������������������������������������������������������宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳�準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾���\".split(\"\");\nfor(j = 0; j != D[143].length; ++j) if(D[143][j].charCodeAt(0) !== 0xFFFD) { e[D[143][j]] = 36608 + j; d[36608 + j] = D[143][j];}\nD[144] = \"����������������������������������������������������������������拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨�逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線���\".split(\"\");\nfor(j = 0; j != D[144].length; ++j) if(D[144][j].charCodeAt(0) !== 0xFFFD) { e[D[144][j]] = 36864 + j; d[36864 + j] = D[144][j];}\nD[145] = \"����������������������������������������������������������������繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻�操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只���\".split(\"\");\nfor(j = 0; j != D[145].length; ++j) if(D[145][j].charCodeAt(0) !== 0xFFFD) { e[D[145][j]] = 37120 + j; d[37120 + j] = D[145][j];}\nD[146] = \"����������������������������������������������������������������叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄�逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓���\".split(\"\");\nfor(j = 0; j != D[146].length; ++j) if(D[146][j].charCodeAt(0) !== 0xFFFD) { e[D[146][j]] = 37376 + j; d[37376 + j] = D[146][j];}\nD[147] = \"����������������������������������������������������������������邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬�凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入���\".split(\"\");\nfor(j = 0; j != D[147].length; ++j) if(D[147][j].charCodeAt(0) !== 0xFFFD) { e[D[147][j]] = 37632 + j; d[37632 + j] = D[147][j];}\nD[148] = \"����������������������������������������������������������������如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅�楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美���\".split(\"\");\nfor(j = 0; j != D[148].length; ++j) if(D[148][j].charCodeAt(0) !== 0xFFFD) { e[D[148][j]] = 37888 + j; d[37888 + j] = D[148][j];}\nD[149] = \"����������������������������������������������������������������鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷�斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋���\".split(\"\");\nfor(j = 0; j != D[149].length; ++j) if(D[149][j].charCodeAt(0) !== 0xFFFD) { e[D[149][j]] = 38144 + j; d[38144 + j] = D[149][j];}\nD[150] = \"����������������������������������������������������������������法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆�摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒���\".split(\"\");\nfor(j = 0; j != D[150].length; ++j) if(D[150][j].charCodeAt(0) !== 0xFFFD) { e[D[150][j]] = 38400 + j; d[38400 + j] = D[150][j];}\nD[151] = \"����������������������������������������������������������������諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲�沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯���\".split(\"\");\nfor(j = 0; j != D[151].length; ++j) if(D[151][j].charCodeAt(0) !== 0xFFFD) { e[D[151][j]] = 38656 + j; d[38656 + j] = D[151][j];}\nD[152] = \"����������������������������������������������������������������蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕��������������������������������������������弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲���\".split(\"\");\nfor(j = 0; j != D[152].length; ++j) if(D[152][j].charCodeAt(0) !== 0xFFFD) { e[D[152][j]] = 38912 + j; d[38912 + j] = D[152][j];}\nD[153] = \"����������������������������������������������������������������僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭�凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨���\".split(\"\");\nfor(j = 0; j != D[153].length; ++j) if(D[153][j].charCodeAt(0) !== 0xFFFD) { e[D[153][j]] = 39168 + j; d[39168 + j] = D[153][j];}\nD[154] = \"����������������������������������������������������������������咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸�噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩���\".split(\"\");\nfor(j = 0; j != D[154].length; ++j) if(D[154][j].charCodeAt(0) !== 0xFFFD) { e[D[154][j]] = 39424 + j; d[39424 + j] = D[154][j];}\nD[155] = \"����������������������������������������������������������������奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀�它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏���\".split(\"\");\nfor(j = 0; j != D[155].length; ++j) if(D[155][j].charCodeAt(0) !== 0xFFFD) { e[D[155][j]] = 39680 + j; d[39680 + j] = D[155][j];}\nD[156] = \"����������������������������������������������������������������廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠�怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛���\".split(\"\");\nfor(j = 0; j != D[156].length; ++j) if(D[156][j].charCodeAt(0) !== 0xFFFD) { e[D[156][j]] = 39936 + j; d[39936 + j] = D[156][j];}\nD[157] = \"����������������������������������������������������������������戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫�捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼���\".split(\"\");\nfor(j = 0; j != D[157].length; ++j) if(D[157][j].charCodeAt(0) !== 0xFFFD) { e[D[157][j]] = 40192 + j; d[40192 + j] = D[157][j];}\nD[158] = \"����������������������������������������������������������������曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎�梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣���\".split(\"\");\nfor(j = 0; j != D[158].length; ++j) if(D[158][j].charCodeAt(0) !== 0xFFFD) { e[D[158][j]] = 40448 + j; d[40448 + j] = D[158][j];}\nD[159] = \"����������������������������������������������������������������檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯�麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌���\".split(\"\");\nfor(j = 0; j != D[159].length; ++j) if(D[159][j].charCodeAt(0) !== 0xFFFD) { e[D[159][j]] = 40704 + j; d[40704 + j] = D[159][j];}\nD[224] = \"����������������������������������������������������������������漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝�烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱���\".split(\"\");\nfor(j = 0; j != D[224].length; ++j) if(D[224][j].charCodeAt(0) !== 0xFFFD) { e[D[224][j]] = 57344 + j; d[57344 + j] = D[224][j];}\nD[225] = \"����������������������������������������������������������������瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿�痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬���\".split(\"\");\nfor(j = 0; j != D[225].length; ++j) if(D[225][j].charCodeAt(0) !== 0xFFFD) { e[D[225][j]] = 57600 + j; d[57600 + j] = D[225][j];}\nD[226] = \"����������������������������������������������������������������磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰�窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆���\".split(\"\");\nfor(j = 0; j != D[226].length; ++j) if(D[226][j].charCodeAt(0) !== 0xFFFD) { e[D[226][j]] = 57856 + j; d[57856 + j] = D[226][j];}\nD[227] = \"����������������������������������������������������������������紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷�縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋���\".split(\"\");\nfor(j = 0; j != D[227].length; ++j) if(D[227][j].charCodeAt(0) !== 0xFFFD) { e[D[227][j]] = 58112 + j; d[58112 + j] = D[227][j];}\nD[228] = \"����������������������������������������������������������������隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤�艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈���\".split(\"\");\nfor(j = 0; j != D[228].length; ++j) if(D[228][j].charCodeAt(0) !== 0xFFFD) { e[D[228][j]] = 58368 + j; d[58368 + j] = D[228][j];}\nD[229] = \"����������������������������������������������������������������蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬�蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞���\".split(\"\");\nfor(j = 0; j != D[229].length; ++j) if(D[229][j].charCodeAt(0) !== 0xFFFD) { e[D[229][j]] = 58624 + j; d[58624 + j] = D[229][j];}\nD[230] = \"����������������������������������������������������������������襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧�諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊���\".split(\"\");\nfor(j = 0; j != D[230].length; ++j) if(D[230][j].charCodeAt(0) !== 0xFFFD) { e[D[230][j]] = 58880 + j; d[58880 + j] = D[230][j];}\nD[231] = \"����������������������������������������������������������������蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜�轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮���\".split(\"\");\nfor(j = 0; j != D[231].length; ++j) if(D[231][j].charCodeAt(0) !== 0xFFFD) { e[D[231][j]] = 59136 + j; d[59136 + j] = D[231][j];}\nD[232] = \"����������������������������������������������������������������錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙�閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰���\".split(\"\");\nfor(j = 0; j != D[232].length; ++j) if(D[232][j].charCodeAt(0) !== 0xFFFD) { e[D[232][j]] = 59392 + j; d[59392 + j] = D[232][j];}\nD[233] = \"����������������������������������������������������������������顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃�騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈���\".split(\"\");\nfor(j = 0; j != D[233].length; ++j) if(D[233][j].charCodeAt(0) !== 0xFFFD) { e[D[233][j]] = 59648 + j; d[59648 + j] = D[233][j];}\nD[234] = \"����������������������������������������������������������������鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯�黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙�������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[234].length; ++j) if(D[234][j].charCodeAt(0) !== 0xFFFD) { e[D[234][j]] = 59904 + j; d[59904 + j] = D[234][j];}\nD[237] = \"����������������������������������������������������������������纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏�塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱���\".split(\"\");\nfor(j = 0; j != D[237].length; ++j) if(D[237][j].charCodeAt(0) !== 0xFFFD) { e[D[237][j]] = 60672 + j; d[60672 + j] = D[237][j];}\nD[238] = \"����������������������������������������������������������������犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙�蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑��ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹ¬¦'"���\".split(\"\");\nfor(j = 0; j != D[238].length; ++j) if(D[238][j].charCodeAt(0) !== 0xFFFD) { e[D[238][j]] = 60928 + j; d[60928 + j] = D[238][j];}\nD[250] = \"����������������������������������������������������������������ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩ¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊�兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯���\".split(\"\");\nfor(j = 0; j != D[250].length; ++j) if(D[250][j].charCodeAt(0) !== 0xFFFD) { e[D[250][j]] = 64000 + j; d[64000 + j] = D[250][j];}\nD[251] = \"����������������������������������������������������������������涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神�祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙���\".split(\"\");\nfor(j = 0; j != D[251].length; ++j) if(D[251][j].charCodeAt(0) !== 0xFFFD) { e[D[251][j]] = 64256 + j; d[64256 + j] = D[251][j];}\nD[252] = \"����������������������������������������������������������������髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[252].length; ++j) if(D[252][j].charCodeAt(0) !== 0xFFFD) { e[D[252][j]] = 64512 + j; d[64512 + j] = D[252][j];}\nreturn {\"enc\": e, \"dec\": d }; })();\ncptable[936] = (function(){ var d = [], e = {}, D = [], j;\nD[0] = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�������������������������������������������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[0].length; ++j) if(D[0][j].charCodeAt(0) !== 0xFFFD) { e[D[0][j]] = 0 + j; d[0 + j] = D[0][j];}\nD[129] = \"����������������������������������������������������������������丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪乫乬乭乮乯乲乴乵乶乷乸乹乺乻乼乽乿亀亁亂亃亄亅亇亊�亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂伃伄伅伆伇伈伋伌伒伓伔伕伖伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾伿佀佁佂佄佅佇佈佉佊佋佌佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢�\".split(\"\");\nfor(j = 0; j != D[129].length; ++j) if(D[129][j].charCodeAt(0) !== 0xFFFD) { e[D[129][j]] = 33024 + j; d[33024 + j] = D[129][j];}\nD[130] = \"����������������������������������������������������������������侤侫侭侰侱侲侳侴侶侷侸侹侺侻侼侽侾俀俁係俆俇俈俉俋俌俍俒俓俔俕俖俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿倀倁倂倃倄倅倆倇倈倉倊�個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯倰倱倲倳倴倵倶倷倸倹倻倽倿偀偁偂偄偅偆偉偊偋偍偐偑偒偓偔偖偗偘偙偛偝偞偟偠偡偢偣偤偦偧偨偩偪偫偭偮偯偰偱偲偳側偵偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎傏傐傑傒傓傔傕傖傗傘備傚傛傜傝傞傟傠傡傢傤傦傪傫傭傮傯傰傱傳傴債傶傷傸傹傼�\".split(\"\");\nfor(j = 0; j != D[130].length; ++j) if(D[130][j].charCodeAt(0) !== 0xFFFD) { e[D[130][j]] = 33280 + j; d[33280 + j] = D[130][j];}\nD[131] = \"����������������������������������������������������������������傽傾傿僀僁僂僃僄僅僆僇僈僉僊僋僌働僎僐僑僒僓僔僕僗僘僙僛僜僝僞僟僠僡僢僣僤僥僨僩僪僫僯僰僱僲僴僶僷僸價僺僼僽僾僿儀儁儂儃億儅儈�儉儊儌儍儎儏儐儑儓儔儕儖儗儘儙儚儛儜儝儞償儠儢儣儤儥儦儧儨儩優儫儬儭儮儯儰儱儲儳儴儵儶儷儸儹儺儻儼儽儾兂兇兊兌兎兏児兒兓兗兘兙兛兝兞兟兠兡兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦冧冨冩冪冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒凓凔凕凖凗�\".split(\"\");\nfor(j = 0; j != D[131].length; ++j) if(D[131][j].charCodeAt(0) !== 0xFFFD) { e[D[131][j]] = 33536 + j; d[33536 + j] = D[131][j];}\nD[132] = \"����������������������������������������������������������������凘凙凚凜凞凟凢凣凥処凧凨凩凪凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄剅剆則剈剉剋剎剏剒剓剕剗剘�剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳剴創剶剷剸剹剺剻剼剾劀劃劄劅劆劇劉劊劋劌劍劎劏劑劒劔劕劖劗劘劙劚劜劤劥劦劧劮劯劰労劵劶劷劸効劺劻劼劽勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務勚勛勜勝勞勠勡勢勣勥勦勧勨勩勪勫勬勭勮勯勱勲勳勴勵勶勷勸勻勼勽匁匂匃匄匇匉匊匋匌匎�\".split(\"\");\nfor(j = 0; j != D[132].length; ++j) if(D[132][j].charCodeAt(0) !== 0xFFFD) { e[D[132][j]] = 33792 + j; d[33792 + j] = D[132][j];}\nD[133] = \"����������������������������������������������������������������匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯匰匱匲匳匴匵匶匷匸匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏�厐厑厒厓厔厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯厰厱厲厳厴厵厷厸厹厺厼厽厾叀參叄叅叆叇収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝呞呟呠呡呣呥呧呩呪呫呬呭呮呯呰呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡�\".split(\"\");\nfor(j = 0; j != D[133].length; ++j) if(D[133][j].charCodeAt(0) !== 0xFFFD) { e[D[133][j]] = 34048 + j; d[34048 + j] = D[133][j];}\nD[134] = \"����������������������������������������������������������������咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠員哢哣哤哫哬哯哰哱哴哵哶哷哸哹哻哾唀唂唃唄唅唈唊唋唌唍唎唒唓唕唖唗唘唙唚唜唝唞唟唡唥唦�唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋啌啍啎問啑啒啓啔啗啘啙啚啛啝啞啟啠啢啣啨啩啫啯啰啱啲啳啴啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠喡喢喣喤喥喦喨喩喪喫喬喭單喯喰喲喴営喸喺喼喿嗀嗁嗂嗃嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗嗘嗙嗚嗛嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸嗹嗺嗻嗼嗿嘂嘃嘄嘅�\".split(\"\");\nfor(j = 0; j != D[134].length; ++j) if(D[134][j].charCodeAt(0) !== 0xFFFD) { e[D[134][j]] = 34304 + j; d[34304 + j] = D[134][j];}\nD[135] = \"����������������������������������������������������������������嘆嘇嘊嘋嘍嘐嘑嘒嘓嘔嘕嘖嘗嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀噁噂噃噄噅噆噇噈噉噊噋噏噐噑噒噓噕噖噚噛噝噞噟噠噡�噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽噾噿嚀嚁嚂嚃嚄嚇嚈嚉嚊嚋嚌嚍嚐嚑嚒嚔嚕嚖嚗嚘嚙嚚嚛嚜嚝嚞嚟嚠嚡嚢嚤嚥嚦嚧嚨嚩嚪嚫嚬嚭嚮嚰嚱嚲嚳嚴嚵嚶嚸嚹嚺嚻嚽嚾嚿囀囁囂囃囄囅囆囇囈囉囋囌囍囎囏囐囑囒囓囕囖囘囙囜団囥囦囧囨囩囪囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國圌圍圎圏圐圑�\".split(\"\");\nfor(j = 0; j != D[135].length; ++j) if(D[135][j].charCodeAt(0) !== 0xFFFD) { e[D[135][j]] = 34560 + j; d[34560 + j] = D[135][j];}\nD[136] = \"����������������������������������������������������������������園圓圔圕圖圗團圙圚圛圝圞圠圡圢圤圥圦圧圫圱圲圴圵圶圷圸圼圽圿坁坃坄坅坆坈坉坋坒坓坔坕坖坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀�垁垇垈垉垊垍垎垏垐垑垔垕垖垗垘垙垚垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹垺垻垼垽垾垿埀埁埄埅埆埇埈埉埊埌埍埐埑埓埖埗埛埜埞埡埢埣埥埦埧埨埩埪埫埬埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥堦堧堨堩堫堬堭堮堯報堲堳場堶堷堸堹堺堻堼堽�\".split(\"\");\nfor(j = 0; j != D[136].length; ++j) if(D[136][j].charCodeAt(0) !== 0xFFFD) { e[D[136][j]] = 34816 + j; d[34816 + j] = D[136][j];}\nD[137] = \"����������������������������������������������������������������堾堿塀塁塂塃塅塆塇塈塉塊塋塎塏塐塒塓塕塖塗塙塚塛塜塝塟塠塡塢塣塤塦塧塨塩塪塭塮塯塰塱塲塳塴塵塶塷塸塹塺塻塼塽塿墂墄墆墇墈墊墋墌�墍墎墏墐墑墔墕墖増墘墛墜墝墠墡墢墣墤墥墦墧墪墫墬墭墮墯墰墱墲墳墴墵墶墷墸墹墺墻墽墾墿壀壂壃壄壆壇壈壉壊壋壌壍壎壏壐壒壓壔壖壗壘壙壚壛壜壝壞壟壠壡壢壣壥壦壧壨壩壪壭壯壱売壴壵壷壸壺壻壼壽壾壿夀夁夃夅夆夈変夊夋夌夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻�\".split(\"\");\nfor(j = 0; j != D[137].length; ++j) if(D[137][j].charCodeAt(0) !== 0xFFFD) { e[D[137][j]] = 35072 + j; d[35072 + j] = D[137][j];}\nD[138] = \"����������������������������������������������������������������夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛奜奝奞奟奡奣奤奦奧奨奩奪奫奬奭奮奯奰奱奲奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦�妧妬妭妰妱妳妴妵妶妷妸妺妼妽妿姀姁姂姃姄姅姇姈姉姌姍姎姏姕姖姙姛姞姟姠姡姢姤姦姧姩姪姫姭姮姯姰姱姲姳姴姵姶姷姸姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪娫娬娭娮娯娰娳娵娷娸娹娺娻娽娾娿婁婂婃婄婅婇婈婋婌婍婎婏婐婑婒婓婔婖婗婘婙婛婜婝婞婟婠�\".split(\"\");\nfor(j = 0; j != D[138].length; ++j) if(D[138][j].charCodeAt(0) !== 0xFFFD) { e[D[138][j]] = 35328 + j; d[35328 + j] = D[138][j];}\nD[139] = \"����������������������������������������������������������������婡婣婤婥婦婨婩婫婬婭婮婯婰婱婲婳婸婹婻婼婽婾媀媁媂媃媄媅媆媇媈媉媊媋媌媍媎媏媐媑媓媔媕媖媗媘媙媜媝媞媟媠媡媢媣媤媥媦媧媨媩媫媬�媭媮媯媰媱媴媶媷媹媺媻媼媽媿嫀嫃嫄嫅嫆嫇嫈嫊嫋嫍嫎嫏嫐嫑嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬嫭嫮嫯嫰嫲嫳嫴嫵嫶嫷嫸嫹嫺嫻嫼嫽嫾嫿嬀嬁嬂嬃嬄嬅嬆嬇嬈嬊嬋嬌嬍嬎嬏嬐嬑嬒嬓嬔嬕嬘嬙嬚嬛嬜嬝嬞嬟嬠嬡嬢嬣嬤嬥嬦嬧嬨嬩嬪嬫嬬嬭嬮嬯嬰嬱嬳嬵嬶嬸嬹嬺嬻嬼嬽嬾嬿孁孂孃孄孅孆孇�\".split(\"\");\nfor(j = 0; j != D[139].length; ++j) if(D[139][j].charCodeAt(0) !== 0xFFFD) { e[D[139][j]] = 35584 + j; d[35584 + j] = D[139][j];}\nD[140] = \"����������������������������������������������������������������孈孉孊孋孌孍孎孏孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏�寑寔寕寖寗寘寙寚寛寜寠寢寣實寧審寪寫寬寭寯寱寲寳寴寵寶寷寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧屨屩屪屫屬屭屰屲屳屴屵屶屷屸屻屼屽屾岀岃岄岅岆岇岉岊岋岎岏岒岓岕岝岞岟岠岡岤岥岦岧岨�\".split(\"\");\nfor(j = 0; j != D[140].length; ++j) if(D[140][j].charCodeAt(0) !== 0xFFFD) { e[D[140][j]] = 35840 + j; d[35840 + j] = D[140][j];}\nD[141] = \"����������������������������������������������������������������岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅峆峇峈峉峊峌峍峎峏峐峑峓峔峕峖峗峘峚峛峜峝峞峟峠峢峣峧峩峫峬峮峯峱峲峳峴峵島峷峸峹峺峼峽峾峿崀�崁崄崅崈崉崊崋崌崍崏崐崑崒崓崕崗崘崙崚崜崝崟崠崡崢崣崥崨崪崫崬崯崰崱崲崳崵崶崷崸崹崺崻崼崿嵀嵁嵂嵃嵄嵅嵆嵈嵉嵍嵎嵏嵐嵑嵒嵓嵔嵕嵖嵗嵙嵚嵜嵞嵟嵠嵡嵢嵣嵤嵥嵦嵧嵨嵪嵭嵮嵰嵱嵲嵳嵵嵶嵷嵸嵹嵺嵻嵼嵽嵾嵿嶀嶁嶃嶄嶅嶆嶇嶈嶉嶊嶋嶌嶍嶎嶏嶐嶑嶒嶓嶔嶕嶖嶗嶘嶚嶛嶜嶞嶟嶠�\".split(\"\");\nfor(j = 0; j != D[141].length; ++j) if(D[141][j].charCodeAt(0) !== 0xFFFD) { e[D[141][j]] = 36096 + j; d[36096 + j] = D[141][j];}\nD[142] = \"����������������������������������������������������������������嶡嶢嶣嶤嶥嶦嶧嶨嶩嶪嶫嶬嶭嶮嶯嶰嶱嶲嶳嶴嶵嶶嶸嶹嶺嶻嶼嶽嶾嶿巀巁巂巃巄巆巇巈巉巊巋巌巎巏巐巑巒巓巔巕巖巗巘巙巚巜巟巠巣巤巪巬巭�巰巵巶巸巹巺巻巼巿帀帄帇帉帊帋帍帎帒帓帗帞帟帠帡帢帣帤帥帨帩帪師帬帯帰帲帳帴帵帶帹帺帾帿幀幁幃幆幇幈幉幊幋幍幎幏幐幑幒幓幖幗幘幙幚幜幝幟幠幣幤幥幦幧幨幩幪幫幬幭幮幯幰幱幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨庩庪庫庬庮庯庰庱庲庴庺庻庼庽庿廀廁廂廃廄廅�\".split(\"\");\nfor(j = 0; j != D[142].length; ++j) if(D[142][j].charCodeAt(0) !== 0xFFFD) { e[D[142][j]] = 36352 + j; d[36352 + j] = D[142][j];}\nD[143] = \"����������������������������������������������������������������廆廇廈廋廌廍廎廏廐廔廕廗廘廙廚廜廝廞廟廠廡廢廣廤廥廦廧廩廫廬廭廮廯廰廱廲廳廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤�弨弫弬弮弰弲弳弴張弶強弸弻弽弾弿彁彂彃彄彅彆彇彈彉彊彋彌彍彎彏彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢徣徤徥徦徧復徫徬徯徰徱徲徳徴徶徸徹徺徻徾徿忀忁忂忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇�\".split(\"\");\nfor(j = 0; j != D[143].length; ++j) if(D[143][j].charCodeAt(0) !== 0xFFFD) { e[D[143][j]] = 36608 + j; d[36608 + j] = D[143][j];}\nD[144] = \"����������������������������������������������������������������怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰怱怲怳怴怶怷怸怹怺怽怾恀恄恅恆恇恈恉恊恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀�悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽悾悿惀惁惂惃惄惇惈惉惌惍惎惏惐惒惓惔惖惗惙惛惞惡惢惣惤惥惪惱惲惵惷惸惻惼惽惾惿愂愃愄愅愇愊愋愌愐愑愒愓愔愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬愭愮愯愰愱愲愳愴愵愶愷愸愹愺愻愼愽愾慀慁慂慃慄慅慆�\".split(\"\");\nfor(j = 0; j != D[144].length; ++j) if(D[144][j].charCodeAt(0) !== 0xFFFD) { e[D[144][j]] = 36864 + j; d[36864 + j] = D[144][j];}\nD[145] = \"����������������������������������������������������������������慇慉態慍慏慐慒慓慔慖慗慘慙慚慛慜慞慟慠慡慣慤慥慦慩慪慫慬慭慮慯慱慲慳慴慶慸慹慺慻慼慽慾慿憀憁憂憃憄憅憆憇憈憉憊憌憍憏憐憑憒憓憕�憖憗憘憙憚憛憜憞憟憠憡憢憣憤憥憦憪憫憭憮憯憰憱憲憳憴憵憶憸憹憺憻憼憽憿懀懁懃懄懅懆懇應懌懍懎懏懐懓懕懖懗懘懙懚懛懜懝懞懟懠懡懢懣懤懥懧懨懩懪懫懬懭懮懯懰懱懲懳懴懶懷懸懹懺懻懼懽懾戀戁戂戃戄戅戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸戹戺戻戼扂扄扅扆扊�\".split(\"\");\nfor(j = 0; j != D[145].length; ++j) if(D[145][j].charCodeAt(0) !== 0xFFFD) { e[D[145][j]] = 37120 + j; d[37120 + j] = D[145][j];}\nD[146] = \"����������������������������������������������������������������扏扐払扖扗扙扚扜扝扞扟扠扡扢扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋抌抍抎抏抐抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁�拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳挴挵挶挷挸挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖捗捘捙捚捛捜捝捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙掚掛掜掝掞掟採掤掦掫掯掱掲掵掶掹掻掽掿揀�\".split(\"\");\nfor(j = 0; j != D[146].length; ++j) if(D[146][j].charCodeAt(0) !== 0xFFFD) { e[D[146][j]] = 37376 + j; d[37376 + j] = D[146][j];}\nD[147] = \"����������������������������������������������������������������揁揂揃揅揇揈揊揋揌揑揓揔揕揗揘揙揚換揜揝揟揢揤揥揦揧揨揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆搇搈搉搊損搎搑搒搕搖搗搘搙搚搝搟搢搣搤�搥搧搨搩搫搮搯搰搱搲搳搵搶搷搸搹搻搼搾摀摂摃摉摋摌摍摎摏摐摑摓摕摖摗摙摚摛摜摝摟摠摡摢摣摤摥摦摨摪摫摬摮摯摰摱摲摳摴摵摶摷摻摼摽摾摿撀撁撃撆撈撉撊撋撌撍撎撏撐撓撔撗撘撚撛撜撝撟撠撡撢撣撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆擇擈擉擊擋擌擏擑擓擔擕擖擙據�\".split(\"\");\nfor(j = 0; j != D[147].length; ++j) if(D[147][j].charCodeAt(0) !== 0xFFFD) { e[D[147][j]] = 37632 + j; d[37632 + j] = D[147][j];}\nD[148] = \"����������������������������������������������������������������擛擜擝擟擠擡擣擥擧擨擩擪擫擬擭擮擯擰擱擲擳擴擵擶擷擸擹擺擻擼擽擾擿攁攂攃攄攅攆攇攈攊攋攌攍攎攏攐攑攓攔攕攖攗攙攚攛攜攝攞攟攠攡�攢攣攤攦攧攨攩攪攬攭攰攱攲攳攷攺攼攽敀敁敂敃敄敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數敹敺敻敼敽敾敿斀斁斂斃斄斅斆斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱斲斳斴斵斶斷斸斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘旙旚旛旜旝旞旟旡旣旤旪旫�\".split(\"\");\nfor(j = 0; j != D[148].length; ++j) if(D[148][j].charCodeAt(0) !== 0xFFFD) { e[D[148][j]] = 37888 + j; d[37888 + j] = D[148][j];}\nD[149] = \"����������������������������������������������������������������旲旳旴旵旸旹旻旼旽旾旿昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷昸昹昺昻昽昿晀時晄晅晆晇晈晉晊晍晎晐晑晘�晙晛晜晝晞晠晢晣晥晧晩晪晫晬晭晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘暙暚暛暜暞暟暠暡暢暣暤暥暦暩暪暫暬暭暯暰暱暲暳暵暶暷暸暺暻暼暽暿曀曁曂曃曄曅曆曇曈曉曊曋曌曍曎曏曐曑曒曓曔曕曖曗曘曚曞曟曠曡曢曣曤曥曧曨曪曫曬曭曮曯曱曵曶書曺曻曽朁朂會�\".split(\"\");\nfor(j = 0; j != D[149].length; ++j) if(D[149][j].charCodeAt(0) !== 0xFFFD) { e[D[149][j]] = 38144 + j; d[38144 + j] = D[149][j];}\nD[150] = \"����������������������������������������������������������������朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠朡朢朣朤朥朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗杘杙杚杛杝杢杣杤杦杧杫杬杮東杴杶�杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹枺枻枼枽枾枿柀柂柅柆柇柈柉柊柋柌柍柎柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵柶柷柸柹柺査柼柾栁栂栃栄栆栍栐栒栔栕栘栙栚栛栜栞栟栠栢栣栤栥栦栧栨栫栬栭栮栯栰栱栴栵栶栺栻栿桇桋桍桏桒桖桗桘桙桚桛�\".split(\"\");\nfor(j = 0; j != D[150].length; ++j) if(D[150][j].charCodeAt(0) !== 0xFFFD) { e[D[150][j]] = 38400 + j; d[38400 + j] = D[150][j];}\nD[151] = \"����������������������������������������������������������������桜桝桞桟桪桬桭桮桯桰桱桲桳桵桸桹桺桻桼桽桾桿梀梂梄梇梈梉梊梋梌梍梎梐梑梒梔梕梖梘梙梚梛梜條梞梟梠梡梣梤梥梩梪梫梬梮梱梲梴梶梷梸�梹梺梻梼梽梾梿棁棃棄棅棆棇棈棊棌棎棏棐棑棓棔棖棗棙棛棜棝棞棟棡棢棤棥棦棧棨棩棪棫棬棭棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆椇椈椉椊椌椏椑椓椔椕椖椗椘椙椚椛検椝椞椡椢椣椥椦椧椨椩椪椫椬椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃楄楅楆楇楈楉楊楋楌楍楎楏楐楑楒楓楕楖楘楙楛楜楟�\".split(\"\");\nfor(j = 0; j != D[151].length; ++j) if(D[151][j].charCodeAt(0) !== 0xFFFD) { e[D[151][j]] = 38656 + j; d[38656 + j] = D[151][j];}\nD[152] = \"����������������������������������������������������������������楡楢楤楥楧楨楩楪楬業楯楰楲楳楴極楶楺楻楽楾楿榁榃榅榊榋榌榎榏榐榑榒榓榖榗榙榚榝榞榟榠榡榢榣榤榥榦榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽�榾榿槀槂槃槄槅槆槇槈槉構槍槏槑槒槓槕槖槗様槙槚槜槝槞槡槢槣槤槥槦槧槨槩槪槫槬槮槯槰槱槳槴槵槶槷槸槹槺槻槼槾樀樁樂樃樄樅樆樇樈樉樋樌樍樎樏樐樑樒樓樔樕樖標樚樛樜樝樞樠樢樣樤樥樦樧権樫樬樭樮樰樲樳樴樶樷樸樹樺樻樼樿橀橁橂橃橅橆橈橉橊橋橌橍橎橏橑橒橓橔橕橖橗橚�\".split(\"\");\nfor(j = 0; j != D[152].length; ++j) if(D[152][j].charCodeAt(0) !== 0xFFFD) { e[D[152][j]] = 38912 + j; d[38912 + j] = D[152][j];}\nD[153] = \"����������������������������������������������������������������橜橝橞機橠橢橣橤橦橧橨橩橪橫橬橭橮橯橰橲橳橴橵橶橷橸橺橻橽橾橿檁檂檃檅檆檇檈檉檊檋檌檍檏檒檓檔檕檖檘檙檚檛檜檝檞檟檡檢檣檤檥檦�檧檨檪檭檮檯檰檱檲檳檴檵檶檷檸檹檺檻檼檽檾檿櫀櫁櫂櫃櫄櫅櫆櫇櫈櫉櫊櫋櫌櫍櫎櫏櫐櫑櫒櫓櫔櫕櫖櫗櫘櫙櫚櫛櫜櫝櫞櫟櫠櫡櫢櫣櫤櫥櫦櫧櫨櫩櫪櫫櫬櫭櫮櫯櫰櫱櫲櫳櫴櫵櫶櫷櫸櫹櫺櫻櫼櫽櫾櫿欀欁欂欃欄欅欆欇欈欉權欋欌欍欎欏欐欑欒欓欔欕欖欗欘欙欚欛欜欝欞欟欥欦欨欩欪欫欬欭欮�\".split(\"\");\nfor(j = 0; j != D[153].length; ++j) if(D[153][j].charCodeAt(0) !== 0xFFFD) { e[D[153][j]] = 39168 + j; d[39168 + j] = D[153][j];}\nD[154] = \"����������������������������������������������������������������欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍歎歏歐歑歒歓歔歕歖歗歘歚歛歜歝歞歟歠歡歨歩歫歬歭歮歯歰歱歲歳歴歵歶歷歸歺歽歾歿殀殅殈�殌殎殏殐殑殔殕殗殘殙殜殝殞殟殠殢殣殤殥殦殧殨殩殫殬殭殮殯殰殱殲殶殸殹殺殻殼殽殾毀毃毄毆毇毈毉毊毌毎毐毑毘毚毜毝毞毟毠毢毣毤毥毦毧毨毩毬毭毮毰毱毲毴毶毷毸毺毻毼毾毿氀氁氂氃氄氈氉氊氋氌氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋汌汍汎汏汑汒汓汖汘�\".split(\"\");\nfor(j = 0; j != D[154].length; ++j) if(D[154][j].charCodeAt(0) !== 0xFFFD) { e[D[154][j]] = 39424 + j; d[39424 + j] = D[154][j];}\nD[155] = \"����������������������������������������������������������������汙汚汢汣汥汦汧汫汬汭汮汯汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘�泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟洠洡洢洣洤洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽浾浿涀涁涃涄涆涇涊涋涍涏涐涒涖涗涘涙涚涜涢涥涬涭涰涱涳涴涶涷涹涺涻涼涽涾淁淂淃淈淉淊�\".split(\"\");\nfor(j = 0; j != D[155].length; ++j) if(D[155][j].charCodeAt(0) !== 0xFFFD) { e[D[155][j]] = 39680 + j; d[39680 + j] = D[155][j];}\nD[156] = \"����������������������������������������������������������������淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽淾淿渀渁渂渃渄渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵�渶渷渹渻渼渽渾渿湀湁湂湅湆湇湈湉湊湋湌湏湐湑湒湕湗湙湚湜湝湞湠湡湢湣湤湥湦湧湨湩湪湬湭湯湰湱湲湳湴湵湶湷湸湹湺湻湼湽満溁溂溄溇溈溊溋溌溍溎溑溒溓溔溕準溗溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪滫滬滭滮滯�\".split(\"\");\nfor(j = 0; j != D[156].length; ++j) if(D[156][j].charCodeAt(0) !== 0xFFFD) { e[D[156][j]] = 39936 + j; d[39936 + j] = D[156][j];}\nD[157] = \"����������������������������������������������������������������滰滱滲滳滵滶滷滸滺滻滼滽滾滿漀漁漃漄漅漇漈漊漋漌漍漎漐漑漒漖漗漘漙漚漛漜漝漞漟漡漢漣漥漦漧漨漬漮漰漲漴漵漷漸漹漺漻漼漽漿潀潁潂�潃潄潅潈潉潊潌潎潏潐潑潒潓潔潕潖潗潙潚潛潝潟潠潡潣潤潥潧潨潩潪潫潬潯潰潱潳潵潶潷潹潻潽潾潿澀澁澂澃澅澆澇澊澋澏澐澑澒澓澔澕澖澗澘澙澚澛澝澞澟澠澢澣澤澥澦澨澩澪澫澬澭澮澯澰澱澲澴澵澷澸澺澻澼澽澾澿濁濃濄濅濆濇濈濊濋濌濍濎濏濐濓濔濕濖濗濘濙濚濛濜濝濟濢濣濤濥�\".split(\"\");\nfor(j = 0; j != D[157].length; ++j) if(D[157][j].charCodeAt(0) !== 0xFFFD) { e[D[157][j]] = 40192 + j; d[40192 + j] = D[157][j];}\nD[158] = \"����������������������������������������������������������������濦濧濨濩濪濫濬濭濰濱濲濳濴濵濶濷濸濹濺濻濼濽濾濿瀀瀁瀂瀃瀄瀅瀆瀇瀈瀉瀊瀋瀌瀍瀎瀏瀐瀒瀓瀔瀕瀖瀗瀘瀙瀜瀝瀞瀟瀠瀡瀢瀤瀥瀦瀧瀨瀩瀪�瀫瀬瀭瀮瀯瀰瀱瀲瀳瀴瀶瀷瀸瀺瀻瀼瀽瀾瀿灀灁灂灃灄灅灆灇灈灉灊灋灍灎灐灑灒灓灔灕灖灗灘灙灚灛灜灝灟灠灡灢灣灤灥灦灧灨灩灪灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞炟炠炡炢炣炤炥炦炧炨炩炪炰炲炴炵炶為炾炿烄烅烆烇烉烋烌烍烎烏烐烑烒烓烔烕烖烗烚�\".split(\"\");\nfor(j = 0; j != D[158].length; ++j) if(D[158][j].charCodeAt(0) !== 0xFFFD) { e[D[158][j]] = 40448 + j; d[40448 + j] = D[158][j];}\nD[159] = \"����������������������������������������������������������������烜烝烞烠烡烢烣烥烪烮烰烱烲烳烴烵烶烸烺烻烼烾烿焀焁焂焃焄焅焆焇焈焋焌焍焎焏焑焒焔焗焛焜焝焞焟焠無焢焣焤焥焧焨焩焪焫焬焭焮焲焳焴�焵焷焸焹焺焻焼焽焾焿煀煁煂煃煄煆煇煈煉煋煍煏煐煑煒煓煔煕煖煗煘煙煚煛煝煟煠煡煢煣煥煩煪煫煬煭煯煰煱煴煵煶煷煹煻煼煾煿熀熁熂熃熅熆熇熈熉熋熌熍熎熐熑熒熓熕熖熗熚熛熜熝熞熡熢熣熤熥熦熧熩熪熫熭熮熯熰熱熲熴熶熷熸熺熻熼熽熾熿燀燁燂燄燅燆燇燈燉燊燋燌燍燏燐燑燒燓�\".split(\"\");\nfor(j = 0; j != D[159].length; ++j) if(D[159][j].charCodeAt(0) !== 0xFFFD) { e[D[159][j]] = 40704 + j; d[40704 + j] = D[159][j];}\nD[160] = \"����������������������������������������������������������������燖燗燘燙燚燛燜燝燞營燡燢燣燤燦燨燩燪燫燬燭燯燰燱燲燳燴燵燶燷燸燺燻燼燽燾燿爀爁爂爃爄爅爇爈爉爊爋爌爍爎爏爐爑爒爓爔爕爖爗爘爙爚�爛爜爞爟爠爡爢爣爤爥爦爧爩爫爭爮爯爲爳爴爺爼爾牀牁牂牃牄牅牆牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅犆犇犈犉犌犎犐犑犓犔犕犖犗犘犙犚犛犜犝犞犠犡犢犣犤犥犦犧犨犩犪犫犮犱犲犳犵犺犻犼犽犾犿狀狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛�\".split(\"\");\nfor(j = 0; j != D[160].length; ++j) if(D[160][j].charCodeAt(0) !== 0xFFFD) { e[D[160][j]] = 40960 + j; d[40960 + j] = D[160][j];}\nD[161] = \"����������������������������������������������������������������������������������������������������������������������������������������������������������������� 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈〉《》「」『』〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓�\".split(\"\");\nfor(j = 0; j != D[161].length; ++j) if(D[161][j].charCodeAt(0) !== 0xFFFD) { e[D[161][j]] = 41216 + j; d[41216 + j] = D[161][j];}\nD[162] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹ������⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇①②③④⑤⑥⑦⑧⑨⑩��㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩��ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ���\".split(\"\");\nfor(j = 0; j != D[162].length; ++j) if(D[162][j].charCodeAt(0) !== 0xFFFD) { e[D[162][j]] = 41472 + j; d[41472 + j] = D[162][j];}\nD[163] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������!"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} ̄�\".split(\"\");\nfor(j = 0; j != D[163].length; ++j) if(D[163][j].charCodeAt(0) !== 0xFFFD) { e[D[163][j]] = 41728 + j; d[41728 + j] = D[163][j];}\nD[164] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをん������������\".split(\"\");\nfor(j = 0; j != D[164].length; ++j) if(D[164][j].charCodeAt(0) !== 0xFFFD) { e[D[164][j]] = 41984 + j; d[41984 + j] = D[164][j];}\nD[165] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ���������\".split(\"\");\nfor(j = 0; j != D[165].length; ++j) if(D[165][j].charCodeAt(0) !== 0xFFFD) { e[D[165][j]] = 42240 + j; d[42240 + j] = D[165][j];}\nD[166] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ��������αβγδεζηθικλμνξοπρστυφχψω�������︵︶︹︺︿﹀︽︾﹁﹂﹃﹄��︻︼︷︸︱�︳︴����������\".split(\"\");\nfor(j = 0; j != D[166].length; ++j) if(D[166][j].charCodeAt(0) !== 0xFFFD) { e[D[166][j]] = 42496 + j; d[42496 + j] = D[166][j];}\nD[167] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ���������������абвгдеёжзийклмнопрстуфхцчшщъыьэюя��������������\".split(\"\");\nfor(j = 0; j != D[167].length; ++j) if(D[167][j].charCodeAt(0) !== 0xFFFD) { e[D[167][j]] = 42752 + j; d[42752 + j] = D[167][j];}\nD[168] = \"����������������������������������������������������������������ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳▁▂▃▄▅▆▇�█▉▊▋▌▍▎▏▓▔▕▼▽◢◣◤◥☉⊕〒〝〞�����������āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ�ńň�ɡ����ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦㄧㄨㄩ����������������������\".split(\"\");\nfor(j = 0; j != D[168].length; ++j) if(D[168][j].charCodeAt(0) !== 0xFFFD) { e[D[168][j]] = 43008 + j; d[43008 + j] = D[168][j];}\nD[169] = \"����������������������������������������������������������������〡〢〣〤〥〦〧〨〩㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦�℡㈱�‐���ー゛゜ヽヾ〆ゝゞ﹉﹊﹋﹌﹍﹎﹏﹐﹑﹒﹔﹕﹖﹗﹙﹚﹛﹜﹝﹞﹟﹠﹡�﹢﹣﹤﹥﹦﹨﹩﹪﹫�������������〇�������������─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋����������������\".split(\"\");\nfor(j = 0; j != D[169].length; ++j) if(D[169][j].charCodeAt(0) !== 0xFFFD) { e[D[169][j]] = 43264 + j; d[43264 + j] = D[169][j];}\nD[170] = \"����������������������������������������������������������������狜狝狟狢狣狤狥狦狧狪狫狵狶狹狽狾狿猀猂猄猅猆猇猈猉猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀獁獂獃獄獅獆獇獈�獉獊獋獌獎獏獑獓獔獕獖獘獙獚獛獜獝獞獟獡獢獣獤獥獦獧獨獩獪獫獮獰獱�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[170].length; ++j) if(D[170][j].charCodeAt(0) !== 0xFFFD) { e[D[170][j]] = 43520 + j; d[43520 + j] = D[170][j];}\nD[171] = \"����������������������������������������������������������������獲獳獴獵獶獷獸獹獺獻獼獽獿玀玁玂玃玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣玤玥玦玧玨玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃珄珅珆珇�珋珌珎珒珓珔珕珖珗珘珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳珴珵珶珷�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[171].length; ++j) if(D[171][j].charCodeAt(0) !== 0xFFFD) { e[D[171][j]] = 43776 + j; d[43776 + j] = D[171][j];}\nD[172] = \"����������������������������������������������������������������珸珹珺珻珼珽現珿琀琁琂琄琇琈琋琌琍琎琑琒琓琔琕琖琗琘琙琜琝琞琟琠琡琣琤琧琩琫琭琯琱琲琷琸琹琺琻琽琾琿瑀瑂瑃瑄瑅瑆瑇瑈瑉瑊瑋瑌瑍�瑎瑏瑐瑑瑒瑓瑔瑖瑘瑝瑠瑡瑢瑣瑤瑥瑦瑧瑨瑩瑪瑫瑬瑮瑯瑱瑲瑳瑴瑵瑸瑹瑺�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[172].length; ++j) if(D[172][j].charCodeAt(0) !== 0xFFFD) { e[D[172][j]] = 44032 + j; d[44032 + j] = D[172][j];}\nD[173] = \"����������������������������������������������������������������瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑璒璓璔璕璖璗璘璙璚璛璝璟璠璡璢璣璤璥璦璪璫璬璭璮璯環璱璲璳璴璵璶璷璸璹璻璼璽璾璿瓀瓁瓂瓃瓄瓅瓆瓇�瓈瓉瓊瓋瓌瓍瓎瓏瓐瓑瓓瓔瓕瓖瓗瓘瓙瓚瓛瓝瓟瓡瓥瓧瓨瓩瓪瓫瓬瓭瓰瓱瓲�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[173].length; ++j) if(D[173][j].charCodeAt(0) !== 0xFFFD) { e[D[173][j]] = 44288 + j; d[44288 + j] = D[173][j];}\nD[174] = \"����������������������������������������������������������������瓳瓵瓸瓹瓺瓻瓼瓽瓾甀甁甂甃甅甆甇甈甉甊甋甌甎甐甒甔甕甖甗甛甝甞甠甡產産甤甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘�畝畞畟畠畡畢畣畤畧畨畩畫畬畭畮畯異畱畳畵當畷畺畻畼畽畾疀疁疂疄疅疇�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[174].length; ++j) if(D[174][j].charCodeAt(0) !== 0xFFFD) { e[D[174][j]] = 44544 + j; d[44544 + j] = D[174][j];}\nD[175] = \"����������������������������������������������������������������疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦疧疨疩疪疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇�瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[175].length; ++j) if(D[175][j].charCodeAt(0) !== 0xFFFD) { e[D[175][j]] = 44800 + j; d[44800 + j] = D[175][j];}\nD[176] = \"����������������������������������������������������������������癅癆癇癈癉癊癋癎癏癐癑癒癓癕癗癘癙癚癛癝癟癠癡癢癤癥癦癧癨癩癪癬癭癮癰癱癲癳癴癵癶癷癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛�皜皝皞皟皠皡皢皣皥皦皧皨皩皪皫皬皭皯皰皳皵皶皷皸皹皺皻皼皽皾盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥�\".split(\"\");\nfor(j = 0; j != D[176].length; ++j) if(D[176][j].charCodeAt(0) !== 0xFFFD) { e[D[176][j]] = 45056 + j; d[45056 + j] = D[176][j];}\nD[177] = \"����������������������������������������������������������������盄盇盉盋盌盓盕盙盚盜盝盞盠盡盢監盤盦盧盨盩盪盫盬盭盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎眏眐眑眒眓眔眕眖眗眘眛眜眝眞眡眣眤眥眧眪眫�眬眮眰眱眲眳眴眹眻眽眾眿睂睄睅睆睈睉睊睋睌睍睎睏睒睓睔睕睖睗睘睙睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳�\".split(\"\");\nfor(j = 0; j != D[177].length; ++j) if(D[177][j].charCodeAt(0) !== 0xFFFD) { e[D[177][j]] = 45312 + j; d[45312 + j] = D[177][j];}\nD[178] = \"����������������������������������������������������������������睝睞睟睠睤睧睩睪睭睮睯睰睱睲睳睴睵睶睷睸睺睻睼瞁瞂瞃瞆瞇瞈瞉瞊瞋瞏瞐瞓瞔瞕瞖瞗瞘瞙瞚瞛瞜瞝瞞瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶瞷瞸瞹瞺�瞼瞾矀矁矂矃矄矅矆矇矈矉矊矋矌矎矏矐矑矒矓矔矕矖矘矙矚矝矞矟矠矡矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖�\".split(\"\");\nfor(j = 0; j != D[178].length; ++j) if(D[178][j].charCodeAt(0) !== 0xFFFD) { e[D[178][j]] = 45568 + j; d[45568 + j] = D[178][j];}\nD[179] = \"����������������������������������������������������������������矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃砄砅砆砇砈砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚�硛硜硞硟硠硡硢硣硤硥硦硧硨硩硯硰硱硲硳硴硵硶硸硹硺硻硽硾硿碀碁碂碃场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚�\".split(\"\");\nfor(j = 0; j != D[179].length; ++j) if(D[179][j].charCodeAt(0) !== 0xFFFD) { e[D[179][j]] = 45824 + j; d[45824 + j] = D[179][j];}\nD[180] = \"����������������������������������������������������������������碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨碩碪碫碬碭碮碯碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚磛磜磝磞磟磠磡磢磣�磤磥磦磧磩磪磫磭磮磯磰磱磳磵磶磸磹磻磼磽磾磿礀礂礃礄礆礇礈礉礊礋礌础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮�\".split(\"\");\nfor(j = 0; j != D[180].length; ++j) if(D[180][j].charCodeAt(0) !== 0xFFFD) { e[D[180][j]] = 46080 + j; d[46080 + j] = D[180][j];}\nD[181] = \"����������������������������������������������������������������礍礎礏礐礑礒礔礕礖礗礘礙礚礛礜礝礟礠礡礢礣礥礦礧礨礩礪礫礬礭礮礯礰礱礲礳礵礶礷礸礹礽礿祂祃祄祅祇祊祋祌祍祎祏祐祑祒祔祕祘祙祡祣�祤祦祩祪祫祬祮祰祱祲祳祴祵祶祹祻祼祽祾祿禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠�\".split(\"\");\nfor(j = 0; j != D[181].length; ++j) if(D[181][j].charCodeAt(0) !== 0xFFFD) { e[D[181][j]] = 46336 + j; d[46336 + j] = D[181][j];}\nD[182] = \"����������������������������������������������������������������禓禔禕禖禗禘禙禛禜禝禞禟禠禡禢禣禤禥禦禨禩禪禫禬禭禮禯禰禱禲禴禵禶禷禸禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙秚秛秜秝秞秠秡秢秥秨秪�秬秮秱秲秳秴秵秶秷秹秺秼秾秿稁稄稅稇稈稉稊稌稏稐稑稒稓稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二�\".split(\"\");\nfor(j = 0; j != D[182].length; ++j) if(D[182][j].charCodeAt(0) !== 0xFFFD) { e[D[182][j]] = 46592 + j; d[46592 + j] = D[182][j];}\nD[183] = \"����������������������������������������������������������������稝稟稡稢稤稥稦稧稨稩稪稫稬稭種稯稰稱稲稴稵稶稸稺稾穀穁穂穃穄穅穇穈穉穊穋穌積穎穏穐穒穓穔穕穖穘穙穚穛穜穝穞穟穠穡穢穣穤穥穦穧穨�穩穪穫穬穭穮穯穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服�\".split(\"\");\nfor(j = 0; j != D[183].length; ++j) if(D[183][j].charCodeAt(0) !== 0xFFFD) { e[D[183][j]] = 46848 + j; d[46848 + j] = D[183][j];}\nD[184] = \"����������������������������������������������������������������窣窤窧窩窪窫窮窯窰窱窲窴窵窶窷窸窹窺窻窼窽窾竀竁竂竃竄竅竆竇竈竉竊竌竍竎竏竐竑竒竓竔竕竗竘竚竛竜竝竡竢竤竧竨竩竪竫竬竮竰竱竲竳�竴竵競竷竸竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹�\".split(\"\");\nfor(j = 0; j != D[184].length; ++j) if(D[184][j].charCodeAt(0) !== 0xFFFD) { e[D[184][j]] = 47104 + j; d[47104 + j] = D[184][j];}\nD[185] = \"����������������������������������������������������������������笯笰笲笴笵笶笷笹笻笽笿筀筁筂筃筄筆筈筊筍筎筓筕筗筙筜筞筟筡筣筤筥筦筧筨筩筪筫筬筭筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆箇箈箉箊箋箌箎箏�箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹箺箻箼箽箾箿節篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈�\".split(\"\");\nfor(j = 0; j != D[185].length; ++j) if(D[185][j].charCodeAt(0) !== 0xFFFD) { e[D[185][j]] = 47360 + j; d[47360 + j] = D[185][j];}\nD[186] = \"����������������������������������������������������������������篅篈築篊篋篍篎篏篐篒篔篕篖篗篘篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲篳篴篵篶篸篹篺篻篽篿簀簁簂簃簄簅簆簈簉簊簍簎簐簑簒簓簔簕簗簘簙�簚簛簜簝簞簠簡簢簣簤簥簨簩簫簬簭簮簯簰簱簲簳簴簵簶簷簹簺簻簼簽簾籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖�\".split(\"\");\nfor(j = 0; j != D[186].length; ++j) if(D[186][j].charCodeAt(0) !== 0xFFFD) { e[D[186][j]] = 47616 + j; d[47616 + j] = D[186][j];}\nD[187] = \"����������������������������������������������������������������籃籄籅籆籇籈籉籊籋籌籎籏籐籑籒籓籔籕籖籗籘籙籚籛籜籝籞籟籠籡籢籣籤籥籦籧籨籩籪籫籬籭籮籯籰籱籲籵籶籷籸籹籺籾籿粀粁粂粃粄粅粆粇�粈粊粋粌粍粎粏粐粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴粵粶粷粸粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕�\".split(\"\");\nfor(j = 0; j != D[187].length; ++j) if(D[187][j].charCodeAt(0) !== 0xFFFD) { e[D[187][j]] = 47872 + j; d[47872 + j] = D[187][j];}\nD[188] = \"����������������������������������������������������������������粿糀糂糃糄糆糉糋糎糏糐糑糒糓糔糘糚糛糝糞糡糢糣糤糥糦糧糩糪糫糬糭糮糰糱糲糳糴糵糶糷糹糺糼糽糾糿紀紁紂紃約紅紆紇紈紉紋紌納紎紏紐�紑紒紓純紕紖紗紘紙級紛紜紝紞紟紡紣紤紥紦紨紩紪紬紭紮細紱紲紳紴紵紶肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件�\".split(\"\");\nfor(j = 0; j != D[188].length; ++j) if(D[188][j].charCodeAt(0) !== 0xFFFD) { e[D[188][j]] = 48128 + j; d[48128 + j] = D[188][j];}\nD[189] = \"����������������������������������������������������������������紷紸紹紺紻紼紽紾紿絀絁終絃組絅絆絇絈絉絊絋経絍絎絏結絑絒絓絔絕絖絗絘絙絚絛絜絝絞絟絠絡絢絣絤絥給絧絨絩絪絫絬絭絯絰統絲絳絴絵絶�絸絹絺絻絼絽絾絿綀綁綂綃綄綅綆綇綈綉綊綋綌綍綎綏綐綑綒經綔綕綖綗綘健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸�\".split(\"\");\nfor(j = 0; j != D[189].length; ++j) if(D[189][j].charCodeAt(0) !== 0xFFFD) { e[D[189][j]] = 48384 + j; d[48384 + j] = D[189][j];}\nD[190] = \"����������������������������������������������������������������継続綛綜綝綞綟綠綡綢綣綤綥綧綨綩綪綫綬維綯綰綱網綳綴綵綶綷綸綹綺綻綼綽綾綿緀緁緂緃緄緅緆緇緈緉緊緋緌緍緎総緐緑緒緓緔緕緖緗緘緙�線緛緜緝緞緟締緡緢緣緤緥緦緧編緩緪緫緬緭緮緯緰緱緲緳練緵緶緷緸緹緺尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻�\".split(\"\");\nfor(j = 0; j != D[190].length; ++j) if(D[190][j].charCodeAt(0) !== 0xFFFD) { e[D[190][j]] = 48640 + j; d[48640 + j] = D[190][j];}\nD[191] = \"����������������������������������������������������������������緻緼緽緾緿縀縁縂縃縄縅縆縇縈縉縊縋縌縍縎縏縐縑縒縓縔縕縖縗縘縙縚縛縜縝縞縟縠縡縢縣縤縥縦縧縨縩縪縫縬縭縮縯縰縱縲縳縴縵縶縷縸縹�縺縼總績縿繀繂繃繄繅繆繈繉繊繋繌繍繎繏繐繑繒繓織繕繖繗繘繙繚繛繜繝俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀�\".split(\"\");\nfor(j = 0; j != D[191].length; ++j) if(D[191][j].charCodeAt(0) !== 0xFFFD) { e[D[191][j]] = 48896 + j; d[48896 + j] = D[191][j];}\nD[192] = \"����������������������������������������������������������������繞繟繠繡繢繣繤繥繦繧繨繩繪繫繬繭繮繯繰繱繲繳繴繵繶繷繸繹繺繻繼繽繾繿纀纁纃纄纅纆纇纈纉纊纋續纍纎纏纐纑纒纓纔纕纖纗纘纙纚纜纝纞�纮纴纻纼绖绤绬绹缊缐缞缷缹缻缼缽缾缿罀罁罃罆罇罈罉罊罋罌罍罎罏罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐�\".split(\"\");\nfor(j = 0; j != D[192].length; ++j) if(D[192][j].charCodeAt(0) !== 0xFFFD) { e[D[192][j]] = 49152 + j; d[49152 + j] = D[192][j];}\nD[193] = \"����������������������������������������������������������������罖罙罛罜罝罞罠罣罤罥罦罧罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂羃羄羅羆羇羈羉羋羍羏羐羑羒羓羕羖羗羘羙羛羜羠羢羣羥羦羨義羪羫羬羭羮羱�羳羴羵羶羷羺羻羾翀翂翃翄翆翇翈翉翋翍翏翐翑習翓翖翗翙翚翛翜翝翞翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿�\".split(\"\");\nfor(j = 0; j != D[193].length; ++j) if(D[193][j].charCodeAt(0) !== 0xFFFD) { e[D[193][j]] = 49408 + j; d[49408 + j] = D[193][j];}\nD[194] = \"����������������������������������������������������������������翤翧翨翪翫翬翭翯翲翴翵翶翷翸翹翺翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫耬耭耮耯耰耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗�聙聛聜聝聞聟聠聡聢聣聤聥聦聧聨聫聬聭聮聯聰聲聳聴聵聶職聸聹聺聻聼聽隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫�\".split(\"\");\nfor(j = 0; j != D[194].length; ++j) if(D[194][j].charCodeAt(0) !== 0xFFFD) { e[D[194][j]] = 49664 + j; d[49664 + j] = D[194][j];}\nD[195] = \"����������������������������������������������������������������聾肁肂肅肈肊肍肎肏肐肑肒肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇胈胉胊胋胏胐胑胒胓胔胕胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋�脌脕脗脙脛脜脝脟脠脡脢脣脤脥脦脧脨脩脪脫脭脮脰脳脴脵脷脹脺脻脼脽脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸�\".split(\"\");\nfor(j = 0; j != D[195].length; ++j) if(D[195][j].charCodeAt(0) !== 0xFFFD) { e[D[195][j]] = 49920 + j; d[49920 + j] = D[195][j];}\nD[196] = \"����������������������������������������������������������������腀腁腂腃腄腅腇腉腍腎腏腒腖腗腘腛腜腝腞腟腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃膄膅膆膇膉膋膌膍膎膐膒膓膔膕膖膗膙膚膞膟膠膡膢膤膥�膧膩膫膬膭膮膯膰膱膲膴膵膶膷膸膹膼膽膾膿臄臅臇臈臉臋臍臎臏臐臑臒臓摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁�\".split(\"\");\nfor(j = 0; j != D[196].length; ++j) if(D[196][j].charCodeAt(0) !== 0xFFFD) { e[D[196][j]] = 50176 + j; d[50176 + j] = D[196][j];}\nD[197] = \"����������������������������������������������������������������臔臕臖臗臘臙臚臛臜臝臞臟臠臡臢臤臥臦臨臩臫臮臯臰臱臲臵臶臷臸臹臺臽臿舃與興舉舊舋舎舏舑舓舕舖舗舘舙舚舝舠舤舥舦舧舩舮舲舺舼舽舿�艀艁艂艃艅艆艈艊艌艍艎艐艑艒艓艔艕艖艗艙艛艜艝艞艠艡艢艣艤艥艦艧艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗�\".split(\"\");\nfor(j = 0; j != D[197].length; ++j) if(D[197][j].charCodeAt(0) !== 0xFFFD) { e[D[197][j]] = 50432 + j; d[50432 + j] = D[197][j];}\nD[198] = \"����������������������������������������������������������������艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸�苺苼苽苾苿茀茊茋茍茐茒茓茖茘茙茝茞茟茠茡茢茣茤茥茦茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐�\".split(\"\");\nfor(j = 0; j != D[198].length; ++j) if(D[198][j].charCodeAt(0) !== 0xFFFD) { e[D[198][j]] = 50688 + j; d[50688 + j] = D[198][j];}\nD[199] = \"����������������������������������������������������������������茾茿荁荂荄荅荈荊荋荌荍荎荓荕荖荗荘荙荝荢荰荱荲荳荴荵荶荹荺荾荿莀莁莂莃莄莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡莢莣莤莥莦莧莬莭莮�莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠�\".split(\"\");\nfor(j = 0; j != D[199].length; ++j) if(D[199][j].charCodeAt(0) !== 0xFFFD) { e[D[199][j]] = 50944 + j; d[50944 + j] = D[199][j];}\nD[200] = \"����������������������������������������������������������������菮華菳菴菵菶菷菺菻菼菾菿萀萂萅萇萈萉萊萐萒萓萔萕萖萗萙萚萛萞萟萠萡萢萣萩萪萫萬萭萮萯萰萲萳萴萵萶萷萹萺萻萾萿葀葁葂葃葄葅葇葈葉�葊葋葌葍葎葏葐葒葓葔葕葖葘葝葞葟葠葢葤葥葦葧葨葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁�\".split(\"\");\nfor(j = 0; j != D[200].length; ++j) if(D[200][j].charCodeAt(0) !== 0xFFFD) { e[D[200][j]] = 51200 + j; d[51200 + j] = D[200][j];}\nD[201] = \"����������������������������������������������������������������葽葾葿蒀蒁蒃蒄蒅蒆蒊蒍蒏蒐蒑蒒蒓蒔蒕蒖蒘蒚蒛蒝蒞蒟蒠蒢蒣蒤蒥蒦蒧蒨蒩蒪蒫蒬蒭蒮蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗�蓘蓙蓚蓛蓜蓞蓡蓢蓤蓧蓨蓩蓪蓫蓭蓮蓯蓱蓲蓳蓴蓵蓶蓷蓸蓹蓺蓻蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳�\".split(\"\");\nfor(j = 0; j != D[201].length; ++j) if(D[201][j].charCodeAt(0) !== 0xFFFD) { e[D[201][j]] = 51456 + j; d[51456 + j] = D[201][j];}\nD[202] = \"����������������������������������������������������������������蔃蔄蔅蔆蔇蔈蔉蔊蔋蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢蔣蔤蔥蔦蔧蔨蔩蔪蔭蔮蔯蔰蔱蔲蔳蔴蔵蔶蔾蔿蕀蕁蕂蕄蕅蕆蕇蕋蕌蕍蕎蕏蕐蕑蕒蕓蕔蕕�蕗蕘蕚蕛蕜蕝蕟蕠蕡蕢蕣蕥蕦蕧蕩蕪蕫蕬蕭蕮蕯蕰蕱蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱�\".split(\"\");\nfor(j = 0; j != D[202].length; ++j) if(D[202][j].charCodeAt(0) !== 0xFFFD) { e[D[202][j]] = 51712 + j; d[51712 + j] = D[202][j];}\nD[203] = \"����������������������������������������������������������������薂薃薆薈薉薊薋薌薍薎薐薑薒薓薔薕薖薗薘薙薚薝薞薟薠薡薢薣薥薦薧薩薫薬薭薱薲薳薴薵薶薸薺薻薼薽薾薿藀藂藃藄藅藆藇藈藊藋藌藍藎藑藒�藔藖藗藘藙藚藛藝藞藟藠藡藢藣藥藦藧藨藪藫藬藭藮藯藰藱藲藳藴藵藶藷藸恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔�\".split(\"\");\nfor(j = 0; j != D[203].length; ++j) if(D[203][j].charCodeAt(0) !== 0xFFFD) { e[D[203][j]] = 51968 + j; d[51968 + j] = D[203][j];}\nD[204] = \"����������������������������������������������������������������藹藺藼藽藾蘀蘁蘂蘃蘄蘆蘇蘈蘉蘊蘋蘌蘍蘎蘏蘐蘒蘓蘔蘕蘗蘘蘙蘚蘛蘜蘝蘞蘟蘠蘡蘢蘣蘤蘥蘦蘨蘪蘫蘬蘭蘮蘯蘰蘱蘲蘳蘴蘵蘶蘷蘹蘺蘻蘽蘾蘿虀�虁虂虃虄虅虆虇虈虉虊虋虌虒虓處虖虗虘虙虛虜虝號虠虡虣虤虥虦虧虨虩虪獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃�\".split(\"\");\nfor(j = 0; j != D[204].length; ++j) if(D[204][j].charCodeAt(0) !== 0xFFFD) { e[D[204][j]] = 52224 + j; d[52224 + j] = D[204][j];}\nD[205] = \"����������������������������������������������������������������虭虯虰虲虳虴虵虶虷虸蚃蚄蚅蚆蚇蚈蚉蚎蚏蚐蚑蚒蚔蚖蚗蚘蚙蚚蚛蚞蚟蚠蚡蚢蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻蚼蚽蚾蚿蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜�蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威�\".split(\"\");\nfor(j = 0; j != D[205].length; ++j) if(D[205][j].charCodeAt(0) !== 0xFFFD) { e[D[205][j]] = 52480 + j; d[52480 + j] = D[205][j];}\nD[206] = \"����������������������������������������������������������������蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀蝁蝂蝃蝄蝅蝆蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚蝛蝜蝝蝞蝟蝡蝢蝦蝧蝨蝩蝪蝫蝬蝭蝯蝱蝲蝳蝵�蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎螏螐螑螒螔螕螖螘螙螚螛螜螝螞螠螡螢螣螤巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺�\".split(\"\");\nfor(j = 0; j != D[206].length; ++j) if(D[206][j].charCodeAt(0) !== 0xFFFD) { e[D[206][j]] = 52736 + j; d[52736 + j] = D[206][j];}\nD[207] = \"����������������������������������������������������������������螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁蟂蟃蟄蟅蟇蟈蟉蟌蟍蟎蟏蟐蟔蟕蟖蟗蟘蟙蟚蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯蟰蟱蟲蟳蟴蟵蟶蟷蟸�蟺蟻蟼蟽蟿蠀蠁蠂蠄蠅蠆蠇蠈蠉蠋蠌蠍蠎蠏蠐蠑蠒蠔蠗蠘蠙蠚蠜蠝蠞蠟蠠蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓�\".split(\"\");\nfor(j = 0; j != D[207].length; ++j) if(D[207][j].charCodeAt(0) !== 0xFFFD) { e[D[207][j]] = 52992 + j; d[52992 + j] = D[207][j];}\nD[208] = \"����������������������������������������������������������������蠤蠥蠦蠧蠨蠩蠪蠫蠬蠭蠮蠯蠰蠱蠳蠴蠵蠶蠷蠸蠺蠻蠽蠾蠿衁衂衃衆衇衈衉衊衋衎衏衐衑衒術衕衖衘衚衛衜衝衞衟衠衦衧衪衭衯衱衳衴衵衶衸衹衺�衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗袘袙袚袛袝袞袟袠袡袣袥袦袧袨袩袪小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄�\".split(\"\");\nfor(j = 0; j != D[208].length; ++j) if(D[208][j].charCodeAt(0) !== 0xFFFD) { e[D[208][j]] = 53248 + j; d[53248 + j] = D[208][j];}\nD[209] = \"����������������������������������������������������������������袬袮袯袰袲袳袴袵袶袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚裛補裝裞裠裡裦裧裩裪裫裬裭裮裯裲裵裶裷裺裻製裿褀褁褃褄褅褆複褈�褉褋褌褍褎褏褑褔褕褖褗褘褜褝褞褟褠褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶�\".split(\"\");\nfor(j = 0; j != D[209].length; ++j) if(D[209][j].charCodeAt(0) !== 0xFFFD) { e[D[209][j]] = 53504 + j; d[53504 + j] = D[209][j];}\nD[210] = \"����������������������������������������������������������������褸褹褺褻褼褽褾褿襀襂襃襅襆襇襈襉襊襋襌襍襎襏襐襑襒襓襔襕襖襗襘襙襚襛襜襝襠襡襢襣襤襥襧襨襩襪襫襬襭襮襯襰襱襲襳襴襵襶襷襸襹襺襼�襽襾覀覂覄覅覇覈覉覊見覌覍覎規覐覑覒覓覔覕視覗覘覙覚覛覜覝覞覟覠覡摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐�\".split(\"\");\nfor(j = 0; j != D[210].length; ++j) if(D[210][j].charCodeAt(0) !== 0xFFFD) { e[D[210][j]] = 53760 + j; d[53760 + j] = D[210][j];}\nD[211] = \"����������������������������������������������������������������覢覣覤覥覦覧覨覩親覫覬覭覮覯覰覱覲観覴覵覶覷覸覹覺覻覼覽覾覿觀觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴觵觶觷觸觹觺�觻觼觽觾觿訁訂訃訄訅訆計訉訊訋訌訍討訏訐訑訒訓訔訕訖託記訙訚訛訜訝印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉�\".split(\"\");\nfor(j = 0; j != D[211].length; ++j) if(D[211][j].charCodeAt(0) !== 0xFFFD) { e[D[211][j]] = 54016 + j; d[54016 + j] = D[211][j];}\nD[212] = \"����������������������������������������������������������������訞訟訠訡訢訣訤訥訦訧訨訩訪訫訬設訮訯訰許訲訳訴訵訶訷訸訹診註証訽訿詀詁詂詃詄詅詆詇詉詊詋詌詍詎詏詐詑詒詓詔評詖詗詘詙詚詛詜詝詞�詟詠詡詢詣詤詥試詧詨詩詪詫詬詭詮詯詰話該詳詴詵詶詷詸詺詻詼詽詾詿誀浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧�\".split(\"\");\nfor(j = 0; j != D[212].length; ++j) if(D[212][j].charCodeAt(0) !== 0xFFFD) { e[D[212][j]] = 54272 + j; d[54272 + j] = D[212][j];}\nD[213] = \"����������������������������������������������������������������誁誂誃誄誅誆誇誈誋誌認誎誏誐誑誒誔誕誖誗誘誙誚誛誜誝語誟誠誡誢誣誤誥誦誧誨誩說誫説読誮誯誰誱課誳誴誵誶誷誸誹誺誻誼誽誾調諀諁諂�諃諄諅諆談諈諉諊請諌諍諎諏諐諑諒諓諔諕論諗諘諙諚諛諜諝諞諟諠諡諢諣铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政�\".split(\"\");\nfor(j = 0; j != D[213].length; ++j) if(D[213][j].charCodeAt(0) !== 0xFFFD) { e[D[213][j]] = 54528 + j; d[54528 + j] = D[213][j];}\nD[214] = \"����������������������������������������������������������������諤諥諦諧諨諩諪諫諬諭諮諯諰諱諲諳諴諵諶諷諸諹諺諻諼諽諾諿謀謁謂謃謄謅謆謈謉謊謋謌謍謎謏謐謑謒謓謔謕謖謗謘謙謚講謜謝謞謟謠謡謢謣�謤謥謧謨謩謪謫謬謭謮謯謰謱謲謳謴謵謶謷謸謹謺謻謼謽謾謿譀譁譂譃譄譅帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑�\".split(\"\");\nfor(j = 0; j != D[214].length; ++j) if(D[214][j].charCodeAt(0) !== 0xFFFD) { e[D[214][j]] = 54784 + j; d[54784 + j] = D[214][j];}\nD[215] = \"����������������������������������������������������������������譆譇譈證譊譋譌譍譎譏譐譑譒譓譔譕譖譗識譙譚譛譜譝譞譟譠譡譢譣譤譥譧譨譩譪譫譭譮譯議譱譲譳譴譵譶護譸譹譺譻譼譽譾譿讀讁讂讃讄讅讆�讇讈讉變讋讌讍讎讏讐讑讒讓讔讕讖讗讘讙讚讛讜讝讞讟讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座������\".split(\"\");\nfor(j = 0; j != D[215].length; ++j) if(D[215][j].charCodeAt(0) !== 0xFFFD) { e[D[215][j]] = 55040 + j; d[55040 + j] = D[215][j];}\nD[216] = \"����������������������������������������������������������������谸谹谺谻谼谽谾谿豀豂豃豄豅豈豊豋豍豎豏豐豑豒豓豔豖豗豘豙豛豜豝豞豟豠豣豤豥豦豧豨豩豬豭豮豯豰豱豲豴豵豶豷豻豼豽豾豿貀貁貃貄貆貇�貈貋貍貎貏貐貑貒貓貕貖貗貙貚貛貜貝貞貟負財貢貣貤貥貦貧貨販貪貫責貭亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝�\".split(\"\");\nfor(j = 0; j != D[216].length; ++j) if(D[216][j].charCodeAt(0) !== 0xFFFD) { e[D[216][j]] = 55296 + j; d[55296 + j] = D[216][j];}\nD[217] = \"����������������������������������������������������������������貮貯貰貱貲貳貴貵貶買貸貹貺費貼貽貾貿賀賁賂賃賄賅賆資賈賉賊賋賌賍賎賏賐賑賒賓賔賕賖賗賘賙賚賛賜賝賞賟賠賡賢賣賤賥賦賧賨賩質賫賬�賭賮賯賰賱賲賳賴賵賶賷賸賹賺賻購賽賾賿贀贁贂贃贄贅贆贇贈贉贊贋贌贍佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼�\".split(\"\");\nfor(j = 0; j != D[217].length; ++j) if(D[217][j].charCodeAt(0) !== 0xFFFD) { e[D[217][j]] = 55552 + j; d[55552 + j] = D[217][j];}\nD[218] = \"����������������������������������������������������������������贎贏贐贑贒贓贔贕贖贗贘贙贚贛贜贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸赹赺赻赼赽赾赿趀趂趃趆趇趈趉趌趍趎趏趐趒趓趕趖趗趘趙趚趛趜趝趞趠趡�趢趤趥趦趧趨趩趪趫趬趭趮趯趰趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺�\".split(\"\");\nfor(j = 0; j != D[218].length; ++j) if(D[218][j].charCodeAt(0) !== 0xFFFD) { e[D[218][j]] = 55808 + j; d[55808 + j] = D[218][j];}\nD[219] = \"����������������������������������������������������������������跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾跿踀踁踂踃踄踆踇踈踋踍踎踐踑踒踓踕踖踗踘踙踚踛踜踠踡踤踥踦踧踨踫踭踰踲踳踴踶踷踸踻踼踾�踿蹃蹅蹆蹌蹍蹎蹏蹐蹓蹔蹕蹖蹗蹘蹚蹛蹜蹝蹞蹟蹠蹡蹢蹣蹤蹥蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝�\".split(\"\");\nfor(j = 0; j != D[219].length; ++j) if(D[219][j].charCodeAt(0) !== 0xFFFD) { e[D[219][j]] = 56064 + j; d[56064 + j] = D[219][j];}\nD[220] = \"����������������������������������������������������������������蹳蹵蹷蹸蹹蹺蹻蹽蹾躀躂躃躄躆躈躉躊躋躌躍躎躑躒躓躕躖躗躘躙躚躛躝躟躠躡躢躣躤躥躦躧躨躩躪躭躮躰躱躳躴躵躶躷躸躹躻躼躽躾躿軀軁軂�軃軄軅軆軇軈軉車軋軌軍軏軐軑軒軓軔軕軖軗軘軙軚軛軜軝軞軟軠軡転軣軤堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥�\".split(\"\");\nfor(j = 0; j != D[220].length; ++j) if(D[220][j].charCodeAt(0) !== 0xFFFD) { e[D[220][j]] = 56320 + j; d[56320 + j] = D[220][j];}\nD[221] = \"����������������������������������������������������������������軥軦軧軨軩軪軫軬軭軮軯軰軱軲軳軴軵軶軷軸軹軺軻軼軽軾軿輀輁輂較輄輅輆輇輈載輊輋輌輍輎輏輐輑輒輓輔輕輖輗輘輙輚輛輜輝輞輟輠輡輢輣�輤輥輦輧輨輩輪輫輬輭輮輯輰輱輲輳輴輵輶輷輸輹輺輻輼輽輾輿轀轁轂轃轄荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺�\".split(\"\");\nfor(j = 0; j != D[221].length; ++j) if(D[221][j].charCodeAt(0) !== 0xFFFD) { e[D[221][j]] = 56576 + j; d[56576 + j] = D[221][j];}\nD[222] = \"����������������������������������������������������������������轅轆轇轈轉轊轋轌轍轎轏轐轑轒轓轔轕轖轗轘轙轚轛轜轝轞轟轠轡轢轣轤轥轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆�迉迊迋迌迍迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖�\".split(\"\");\nfor(j = 0; j != D[222].length; ++j) if(D[222][j].charCodeAt(0) !== 0xFFFD) { e[D[222][j]] = 56832 + j; d[56832 + j] = D[222][j];}\nD[223] = \"����������������������������������������������������������������這逜連逤逥逧逨逩逪逫逬逰週進逳逴逷逹逺逽逿遀遃遅遆遈遉遊運遌過達違遖遙遚遜遝遞遟遠遡遤遦遧適遪遫遬遯遰遱遲遳遶遷選遹遺遻遼遾邁�還邅邆邇邉邊邌邍邎邏邐邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼�\".split(\"\");\nfor(j = 0; j != D[223].length; ++j) if(D[223][j].charCodeAt(0) !== 0xFFFD) { e[D[223][j]] = 57088 + j; d[57088 + j] = D[223][j];}\nD[224] = \"����������������������������������������������������������������郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅鄆鄇鄈鄉鄊鄋鄌鄍鄎鄏鄐鄑鄒鄓鄔鄕鄖鄗鄘鄚鄛鄜�鄝鄟鄠鄡鄤鄥鄦鄧鄨鄩鄪鄫鄬鄭鄮鄰鄲鄳鄴鄵鄶鄷鄸鄺鄻鄼鄽鄾鄿酀酁酂酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼�\".split(\"\");\nfor(j = 0; j != D[224].length; ++j) if(D[224][j].charCodeAt(0) !== 0xFFFD) { e[D[224][j]] = 57344 + j; d[57344 + j] = D[224][j];}\nD[225] = \"����������������������������������������������������������������酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀醁醂醃醄醆醈醊醎醏醓醔醕醖醗醘醙醜醝醞醟醠醡醤醥醦醧醨醩醫醬醰醱醲醳醶醷醸醹醻�醼醽醾醿釀釁釂釃釄釅釆釈釋釐釒釓釔釕釖釗釘釙釚釛針釞釟釠釡釢釣釤釥帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺�\".split(\"\");\nfor(j = 0; j != D[225].length; ++j) if(D[225][j].charCodeAt(0) !== 0xFFFD) { e[D[225][j]] = 57600 + j; d[57600 + j] = D[225][j];}\nD[226] = \"����������������������������������������������������������������釦釧釨釩釪釫釬釭釮釯釰釱釲釳釴釵釶釷釸釹釺釻釼釽釾釿鈀鈁鈂鈃鈄鈅鈆鈇鈈鈉鈊鈋鈌鈍鈎鈏鈐鈑鈒鈓鈔鈕鈖鈗鈘鈙鈚鈛鈜鈝鈞鈟鈠鈡鈢鈣鈤�鈥鈦鈧鈨鈩鈪鈫鈬鈭鈮鈯鈰鈱鈲鈳鈴鈵鈶鈷鈸鈹鈺鈻鈼鈽鈾鈿鉀鉁鉂鉃鉄鉅狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧饨饩饪饫饬饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂�\".split(\"\");\nfor(j = 0; j != D[226].length; ++j) if(D[226][j].charCodeAt(0) !== 0xFFFD) { e[D[226][j]] = 57856 + j; d[57856 + j] = D[226][j];}\nD[227] = \"����������������������������������������������������������������鉆鉇鉈鉉鉊鉋鉌鉍鉎鉏鉐鉑鉒鉓鉔鉕鉖鉗鉘鉙鉚鉛鉜鉝鉞鉟鉠鉡鉢鉣鉤鉥鉦鉧鉨鉩鉪鉫鉬鉭鉮鉯鉰鉱鉲鉳鉵鉶鉷鉸鉹鉺鉻鉼鉽鉾鉿銀銁銂銃銄銅�銆銇銈銉銊銋銌銍銏銐銑銒銓銔銕銖銗銘銙銚銛銜銝銞銟銠銡銢銣銤銥銦銧恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾�\".split(\"\");\nfor(j = 0; j != D[227].length; ++j) if(D[227][j].charCodeAt(0) !== 0xFFFD) { e[D[227][j]] = 58112 + j; d[58112 + j] = D[227][j];}\nD[228] = \"����������������������������������������������������������������銨銩銪銫銬銭銯銰銱銲銳銴銵銶銷銸銹銺銻銼銽銾銿鋀鋁鋂鋃鋄鋅鋆鋇鋉鋊鋋鋌鋍鋎鋏鋐鋑鋒鋓鋔鋕鋖鋗鋘鋙鋚鋛鋜鋝鋞鋟鋠鋡鋢鋣鋤鋥鋦鋧鋨�鋩鋪鋫鋬鋭鋮鋯鋰鋱鋲鋳鋴鋵鋶鋷鋸鋹鋺鋻鋼鋽鋾鋿錀錁錂錃錄錅錆錇錈錉洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑�\".split(\"\");\nfor(j = 0; j != D[228].length; ++j) if(D[228][j].charCodeAt(0) !== 0xFFFD) { e[D[228][j]] = 58368 + j; d[58368 + j] = D[228][j];}\nD[229] = \"����������������������������������������������������������������錊錋錌錍錎錏錐錑錒錓錔錕錖錗錘錙錚錛錜錝錞錟錠錡錢錣錤錥錦錧錨錩錪錫錬錭錮錯錰錱録錳錴錵錶錷錸錹錺錻錼錽錿鍀鍁鍂鍃鍄鍅鍆鍇鍈鍉�鍊鍋鍌鍍鍎鍏鍐鍑鍒鍓鍔鍕鍖鍗鍘鍙鍚鍛鍜鍝鍞鍟鍠鍡鍢鍣鍤鍥鍦鍧鍨鍩鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣�\".split(\"\");\nfor(j = 0; j != D[229].length; ++j) if(D[229][j].charCodeAt(0) !== 0xFFFD) { e[D[229][j]] = 58624 + j; d[58624 + j] = D[229][j];}\nD[230] = \"����������������������������������������������������������������鍬鍭鍮鍯鍰鍱鍲鍳鍴鍵鍶鍷鍸鍹鍺鍻鍼鍽鍾鍿鎀鎁鎂鎃鎄鎅鎆鎇鎈鎉鎊鎋鎌鎍鎎鎐鎑鎒鎓鎔鎕鎖鎗鎘鎙鎚鎛鎜鎝鎞鎟鎠鎡鎢鎣鎤鎥鎦鎧鎨鎩鎪鎫�鎬鎭鎮鎯鎰鎱鎲鎳鎴鎵鎶鎷鎸鎹鎺鎻鎼鎽鎾鎿鏀鏁鏂鏃鏄鏅鏆鏇鏈鏉鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩�\".split(\"\");\nfor(j = 0; j != D[230].length; ++j) if(D[230][j].charCodeAt(0) !== 0xFFFD) { e[D[230][j]] = 58880 + j; d[58880 + j] = D[230][j];}\nD[231] = \"����������������������������������������������������������������鏎鏏鏐鏑鏒鏓鏔鏕鏗鏘鏙鏚鏛鏜鏝鏞鏟鏠鏡鏢鏣鏤鏥鏦鏧鏨鏩鏪鏫鏬鏭鏮鏯鏰鏱鏲鏳鏴鏵鏶鏷鏸鏹鏺鏻鏼鏽鏾鏿鐀鐁鐂鐃鐄鐅鐆鐇鐈鐉鐊鐋鐌鐍�鐎鐏鐐鐑鐒鐓鐔鐕鐖鐗鐘鐙鐚鐛鐜鐝鐞鐟鐠鐡鐢鐣鐤鐥鐦鐧鐨鐩鐪鐫鐬鐭鐮纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡缢缣缤缥缦缧缪缫缬缭缯缰缱缲缳缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬�\".split(\"\");\nfor(j = 0; j != D[231].length; ++j) if(D[231][j].charCodeAt(0) !== 0xFFFD) { e[D[231][j]] = 59136 + j; d[59136 + j] = D[231][j];}\nD[232] = \"����������������������������������������������������������������鐯鐰鐱鐲鐳鐴鐵鐶鐷鐸鐹鐺鐻鐼鐽鐿鑀鑁鑂鑃鑄鑅鑆鑇鑈鑉鑊鑋鑌鑍鑎鑏鑐鑑鑒鑓鑔鑕鑖鑗鑘鑙鑚鑛鑜鑝鑞鑟鑠鑡鑢鑣鑤鑥鑦鑧鑨鑩鑪鑬鑭鑮鑯�鑰鑱鑲鑳鑴鑵鑶鑷鑸鑹鑺鑻鑼鑽鑾鑿钀钁钂钃钄钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹�\".split(\"\");\nfor(j = 0; j != D[232].length; ++j) if(D[232][j].charCodeAt(0) !== 0xFFFD) { e[D[232][j]] = 59392 + j; d[59392 + j] = D[232][j];}\nD[233] = \"����������������������������������������������������������������锧锳锽镃镈镋镕镚镠镮镴镵長镸镹镺镻镼镽镾門閁閂閃閄閅閆閇閈閉閊開閌閍閎閏閐閑閒間閔閕閖閗閘閙閚閛閜閝閞閟閠閡関閣閤閥閦閧閨閩閪�閫閬閭閮閯閰閱閲閳閴閵閶閷閸閹閺閻閼閽閾閿闀闁闂闃闄闅闆闇闈闉闊闋椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋�\".split(\"\");\nfor(j = 0; j != D[233].length; ++j) if(D[233][j].charCodeAt(0) !== 0xFFFD) { e[D[233][j]] = 59648 + j; d[59648 + j] = D[233][j];}\nD[234] = \"����������������������������������������������������������������闌闍闎闏闐闑闒闓闔闕闖闗闘闙闚闛關闝闞闟闠闡闢闣闤闥闦闧闬闿阇阓阘阛阞阠阣阤阥阦阧阨阩阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗�陘陙陚陜陝陞陠陣陥陦陫陭陮陯陰陱陳陸陹険陻陼陽陾陿隀隁隂隃隄隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰�\".split(\"\");\nfor(j = 0; j != D[234].length; ++j) if(D[234][j].charCodeAt(0) !== 0xFFFD) { e[D[234][j]] = 59904 + j; d[59904 + j] = D[234][j];}\nD[235] = \"����������������������������������������������������������������隌階隑隒隓隕隖隚際隝隞隟隠隡隢隣隤隥隦隨隩險隫隬隭隮隯隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖雗雘雙雚雛雜雝雞雟雡離難雤雥雦雧雫�雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗霘霙霚霛霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻�\".split(\"\");\nfor(j = 0; j != D[235].length; ++j) if(D[235][j].charCodeAt(0) !== 0xFFFD) { e[D[235][j]] = 60160 + j; d[60160 + j] = D[235][j];}\nD[236] = \"����������������������������������������������������������������霡霢霣霤霥霦霧霨霩霫霬霮霯霱霳霴霵霶霷霺霻霼霽霿靀靁靂靃靄靅靆靇靈靉靊靋靌靍靎靏靐靑靔靕靗靘靚靜靝靟靣靤靦靧靨靪靫靬靭靮靯靰靱�靲靵靷靸靹靺靻靽靾靿鞀鞁鞂鞃鞄鞆鞇鞈鞉鞊鞌鞎鞏鞐鞓鞕鞖鞗鞙鞚鞛鞜鞝臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐�\".split(\"\");\nfor(j = 0; j != D[236].length; ++j) if(D[236][j].charCodeAt(0) !== 0xFFFD) { e[D[236][j]] = 60416 + j; d[60416 + j] = D[236][j];}\nD[237] = \"����������������������������������������������������������������鞞鞟鞡鞢鞤鞥鞦鞧鞨鞩鞪鞬鞮鞰鞱鞳鞵鞶鞷鞸鞹鞺鞻鞼鞽鞾鞿韀韁韂韃韄韅韆韇韈韉韊韋韌韍韎韏韐韑韒韓韔韕韖韗韘韙韚韛韜韝韞韟韠韡韢韣�韤韥韨韮韯韰韱韲韴韷韸韹韺韻韼韽韾響頀頁頂頃頄項順頇須頉頊頋頌頍頎怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨�\".split(\"\");\nfor(j = 0; j != D[237].length; ++j) if(D[237][j].charCodeAt(0) !== 0xFFFD) { e[D[237][j]] = 60672 + j; d[60672 + j] = D[237][j];}\nD[238] = \"����������������������������������������������������������������頏預頑頒頓頔頕頖頗領頙頚頛頜頝頞頟頠頡頢頣頤頥頦頧頨頩頪頫頬頭頮頯頰頱頲頳頴頵頶頷頸頹頺頻頼頽頾頿顀顁顂顃顄顅顆顇顈顉顊顋題額�顎顏顐顑顒顓顔顕顖顗願顙顚顛顜顝類顟顠顡顢顣顤顥顦顧顨顩顪顫顬顭顮睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶钷钸钹钺钼钽钿铄铈铉铊铋铌铍铎铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪�\".split(\"\");\nfor(j = 0; j != D[238].length; ++j) if(D[238][j].charCodeAt(0) !== 0xFFFD) { e[D[238][j]] = 60928 + j; d[60928 + j] = D[238][j];}\nD[239] = \"����������������������������������������������������������������顯顰顱顲顳顴颋颎颒颕颙颣風颩颪颫颬颭颮颯颰颱颲颳颴颵颶颷颸颹颺颻颼颽颾颿飀飁飂飃飄飅飆飇飈飉飊飋飌飍飏飐飔飖飗飛飜飝飠飡飢飣飤�飥飦飩飪飫飬飭飮飯飰飱飲飳飴飵飶飷飸飹飺飻飼飽飾飿餀餁餂餃餄餅餆餇铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒锓锔锕锖锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤镥镦镧镨镩镪镫镬镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔�\".split(\"\");\nfor(j = 0; j != D[239].length; ++j) if(D[239][j].charCodeAt(0) !== 0xFFFD) { e[D[239][j]] = 61184 + j; d[61184 + j] = D[239][j];}\nD[240] = \"����������������������������������������������������������������餈餉養餋餌餎餏餑餒餓餔餕餖餗餘餙餚餛餜餝餞餟餠餡餢餣餤餥餦餧館餩餪餫餬餭餯餰餱餲餳餴餵餶餷餸餹餺餻餼餽餾餿饀饁饂饃饄饅饆饇饈饉�饊饋饌饍饎饏饐饑饒饓饖饗饘饙饚饛饜饝饞饟饠饡饢饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨鸩鸪鸫鸬鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦鹧鹨鹩鹪鹫鹬鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙�\".split(\"\");\nfor(j = 0; j != D[240].length; ++j) if(D[240][j].charCodeAt(0) !== 0xFFFD) { e[D[240][j]] = 61440 + j; d[61440 + j] = D[240][j];}\nD[241] = \"����������������������������������������������������������������馌馎馚馛馜馝馞馟馠馡馢馣馤馦馧馩馪馫馬馭馮馯馰馱馲馳馴馵馶馷馸馹馺馻馼馽馾馿駀駁駂駃駄駅駆駇駈駉駊駋駌駍駎駏駐駑駒駓駔駕駖駗駘�駙駚駛駜駝駞駟駠駡駢駣駤駥駦駧駨駩駪駫駬駭駮駯駰駱駲駳駴駵駶駷駸駹瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃�\".split(\"\");\nfor(j = 0; j != D[241].length; ++j) if(D[241][j].charCodeAt(0) !== 0xFFFD) { e[D[241][j]] = 61696 + j; d[61696 + j] = D[241][j];}\nD[242] = \"����������������������������������������������������������������駺駻駼駽駾駿騀騁騂騃騄騅騆騇騈騉騊騋騌騍騎騏騐騑騒験騔騕騖騗騘騙騚騛騜騝騞騟騠騡騢騣騤騥騦騧騨騩騪騫騬騭騮騯騰騱騲騳騴騵騶騷騸�騹騺騻騼騽騾騿驀驁驂驃驄驅驆驇驈驉驊驋驌驍驎驏驐驑驒驓驔驕驖驗驘驙颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒�\".split(\"\");\nfor(j = 0; j != D[242].length; ++j) if(D[242][j].charCodeAt(0) !== 0xFFFD) { e[D[242][j]] = 61952 + j; d[61952 + j] = D[242][j];}\nD[243] = \"����������������������������������������������������������������驚驛驜驝驞驟驠驡驢驣驤驥驦驧驨驩驪驫驲骃骉骍骎骔骕骙骦骩骪骫骬骭骮骯骲骳骴骵骹骻骽骾骿髃髄髆髇髈髉髊髍髎髏髐髒體髕髖髗髙髚髛髜�髝髞髠髢髣髤髥髧髨髩髪髬髮髰髱髲髳髴髵髶髷髸髺髼髽髾髿鬀鬁鬂鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋�\".split(\"\");\nfor(j = 0; j != D[243].length; ++j) if(D[243][j].charCodeAt(0) !== 0xFFFD) { e[D[243][j]] = 62208 + j; d[62208 + j] = D[243][j];}\nD[244] = \"����������������������������������������������������������������鬇鬉鬊鬋鬌鬍鬎鬐鬑鬒鬔鬕鬖鬗鬘鬙鬚鬛鬜鬝鬞鬠鬡鬢鬤鬥鬦鬧鬨鬩鬪鬫鬬鬭鬮鬰鬱鬳鬴鬵鬶鬷鬸鬹鬺鬽鬾鬿魀魆魊魋魌魎魐魒魓魕魖魗魘魙魚�魛魜魝魞魟魠魡魢魣魤魥魦魧魨魩魪魫魬魭魮魯魰魱魲魳魴魵魶魷魸魹魺魻簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤�\".split(\"\");\nfor(j = 0; j != D[244].length; ++j) if(D[244][j].charCodeAt(0) !== 0xFFFD) { e[D[244][j]] = 62464 + j; d[62464 + j] = D[244][j];}\nD[245] = \"����������������������������������������������������������������魼魽魾魿鮀鮁鮂鮃鮄鮅鮆鮇鮈鮉鮊鮋鮌鮍鮎鮏鮐鮑鮒鮓鮔鮕鮖鮗鮘鮙鮚鮛鮜鮝鮞鮟鮠鮡鮢鮣鮤鮥鮦鮧鮨鮩鮪鮫鮬鮭鮮鮯鮰鮱鮲鮳鮴鮵鮶鮷鮸鮹鮺�鮻鮼鮽鮾鮿鯀鯁鯂鯃鯄鯅鯆鯇鯈鯉鯊鯋鯌鯍鯎鯏鯐鯑鯒鯓鯔鯕鯖鯗鯘鯙鯚鯛酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜�\".split(\"\");\nfor(j = 0; j != D[245].length; ++j) if(D[245][j].charCodeAt(0) !== 0xFFFD) { e[D[245][j]] = 62720 + j; d[62720 + j] = D[245][j];}\nD[246] = \"����������������������������������������������������������������鯜鯝鯞鯟鯠鯡鯢鯣鯤鯥鯦鯧鯨鯩鯪鯫鯬鯭鯮鯯鯰鯱鯲鯳鯴鯵鯶鯷鯸鯹鯺鯻鯼鯽鯾鯿鰀鰁鰂鰃鰄鰅鰆鰇鰈鰉鰊鰋鰌鰍鰎鰏鰐鰑鰒鰓鰔鰕鰖鰗鰘鰙鰚�鰛鰜鰝鰞鰟鰠鰡鰢鰣鰤鰥鰦鰧鰨鰩鰪鰫鰬鰭鰮鰯鰰鰱鰲鰳鰴鰵鰶鰷鰸鰹鰺鰻觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅龆龇龈龉龊龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞鲟鲠鲡鲢鲣鲥鲦鲧鲨鲩鲫鲭鲮鲰鲱鲲鲳鲴鲵鲶鲷鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋�\".split(\"\");\nfor(j = 0; j != D[246].length; ++j) if(D[246][j].charCodeAt(0) !== 0xFFFD) { e[D[246][j]] = 62976 + j; d[62976 + j] = D[246][j];}\nD[247] = \"����������������������������������������������������������������鰼鰽鰾鰿鱀鱁鱂鱃鱄鱅鱆鱇鱈鱉鱊鱋鱌鱍鱎鱏鱐鱑鱒鱓鱔鱕鱖鱗鱘鱙鱚鱛鱜鱝鱞鱟鱠鱡鱢鱣鱤鱥鱦鱧鱨鱩鱪鱫鱬鱭鱮鱯鱰鱱鱲鱳鱴鱵鱶鱷鱸鱹鱺�鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾鲿鳀鳁鳂鳈鳉鳑鳒鳚鳛鳠鳡鳌鳍鳎鳏鳐鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄�\".split(\"\");\nfor(j = 0; j != D[247].length; ++j) if(D[247][j].charCodeAt(0) !== 0xFFFD) { e[D[247][j]] = 63232 + j; d[63232 + j] = D[247][j];}\nD[248] = \"����������������������������������������������������������������鳣鳤鳥鳦鳧鳨鳩鳪鳫鳬鳭鳮鳯鳰鳱鳲鳳鳴鳵鳶鳷鳸鳹鳺鳻鳼鳽鳾鳿鴀鴁鴂鴃鴄鴅鴆鴇鴈鴉鴊鴋鴌鴍鴎鴏鴐鴑鴒鴓鴔鴕鴖鴗鴘鴙鴚鴛鴜鴝鴞鴟鴠鴡�鴢鴣鴤鴥鴦鴧鴨鴩鴪鴫鴬鴭鴮鴯鴰鴱鴲鴳鴴鴵鴶鴷鴸鴹鴺鴻鴼鴽鴾鴿鵀鵁鵂�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[248].length; ++j) if(D[248][j].charCodeAt(0) !== 0xFFFD) { e[D[248][j]] = 63488 + j; d[63488 + j] = D[248][j];}\nD[249] = \"����������������������������������������������������������������鵃鵄鵅鵆鵇鵈鵉鵊鵋鵌鵍鵎鵏鵐鵑鵒鵓鵔鵕鵖鵗鵘鵙鵚鵛鵜鵝鵞鵟鵠鵡鵢鵣鵤鵥鵦鵧鵨鵩鵪鵫鵬鵭鵮鵯鵰鵱鵲鵳鵴鵵鵶鵷鵸鵹鵺鵻鵼鵽鵾鵿鶀鶁�鶂鶃鶄鶅鶆鶇鶈鶉鶊鶋鶌鶍鶎鶏鶐鶑鶒鶓鶔鶕鶖鶗鶘鶙鶚鶛鶜鶝鶞鶟鶠鶡鶢�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[249].length; ++j) if(D[249][j].charCodeAt(0) !== 0xFFFD) { e[D[249][j]] = 63744 + j; d[63744 + j] = D[249][j];}\nD[250] = \"����������������������������������������������������������������鶣鶤鶥鶦鶧鶨鶩鶪鶫鶬鶭鶮鶯鶰鶱鶲鶳鶴鶵鶶鶷鶸鶹鶺鶻鶼鶽鶾鶿鷀鷁鷂鷃鷄鷅鷆鷇鷈鷉鷊鷋鷌鷍鷎鷏鷐鷑鷒鷓鷔鷕鷖鷗鷘鷙鷚鷛鷜鷝鷞鷟鷠鷡�鷢鷣鷤鷥鷦鷧鷨鷩鷪鷫鷬鷭鷮鷯鷰鷱鷲鷳鷴鷵鷶鷷鷸鷹鷺鷻鷼鷽鷾鷿鸀鸁鸂�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[250].length; ++j) if(D[250][j].charCodeAt(0) !== 0xFFFD) { e[D[250][j]] = 64000 + j; d[64000 + j] = D[250][j];}\nD[251] = \"����������������������������������������������������������������鸃鸄鸅鸆鸇鸈鸉鸊鸋鸌鸍鸎鸏鸐鸑鸒鸓鸔鸕鸖鸗鸘鸙鸚鸛鸜鸝鸞鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴鹵鹶鹷鹸鹹鹺鹻鹼鹽麀�麁麃麄麅麆麉麊麌麍麎麏麐麑麔麕麖麗麘麙麚麛麜麞麠麡麢麣麤麥麧麨麩麪�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[251].length; ++j) if(D[251][j].charCodeAt(0) !== 0xFFFD) { e[D[251][j]] = 64256 + j; d[64256 + j] = D[251][j];}\nD[252] = \"����������������������������������������������������������������麫麬麭麮麯麰麱麲麳麵麶麷麹麺麼麿黀黁黂黃黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰黱黲黳黴黵黶黷黸黺黽黿鼀鼁鼂鼃鼄鼅�鼆鼇鼈鼉鼊鼌鼏鼑鼒鼔鼕鼖鼘鼚鼛鼜鼝鼞鼟鼡鼣鼤鼥鼦鼧鼨鼩鼪鼫鼭鼮鼰鼱�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[252].length; ++j) if(D[252][j].charCodeAt(0) !== 0xFFFD) { e[D[252][j]] = 64512 + j; d[64512 + j] = D[252][j];}\nD[253] = \"����������������������������������������������������������������鼲鼳鼴鼵鼶鼸鼺鼼鼿齀齁齂齃齅齆齇齈齉齊齋齌齍齎齏齒齓齔齕齖齗齘齙齚齛齜齝齞齟齠齡齢齣齤齥齦齧齨齩齪齫齬齭齮齯齰齱齲齳齴齵齶齷齸�齹齺齻齼齽齾龁龂龍龎龏龐龑龒龓龔龕龖龗龘龜龝龞龡龢龣龤龥郎凉秊裏隣�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[253].length; ++j) if(D[253][j].charCodeAt(0) !== 0xFFFD) { e[D[253][j]] = 64768 + j; d[64768 + j] = D[253][j];}\nD[254] = \"����������������������������������������������������������������兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[254].length; ++j) if(D[254][j].charCodeAt(0) !== 0xFFFD) { e[D[254][j]] = 65024 + j; d[65024 + j] = D[254][j];}\nreturn {\"enc\": e, \"dec\": d }; })();\ncptable[949] = (function(){ var d = [], e = {}, D = [], j;\nD[0] = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~��������������������������������������������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[0].length; ++j) if(D[0][j].charCodeAt(0) !== 0xFFFD) { e[D[0][j]] = 0 + j; d[0 + j] = D[0][j];}\nD[129] = \"�����������������������������������������������������������������갂갃갅갆갋갌갍갎갏갘갞갟갡갢갣갥갦갧갨갩갪갫갮갲갳갴������갵갶갷갺갻갽갾갿걁걂걃걄걅걆걇걈걉걊걌걎걏걐걑걒걓걕������걖걗걙걚걛걝걞걟걠걡걢걣걤걥걦걧걨걩걪걫걬걭걮걯걲걳걵걶걹걻걼걽걾걿겂겇겈겍겎겏겑겒겓겕겖겗겘겙겚겛겞겢겣겤겥겦겧겫겭겮겱겲겳겴겵겶겷겺겾겿곀곂곃곅곆곇곉곊곋곍곎곏곐곑곒곓곔곖곘곙곚곛곜곝곞곟곢곣곥곦곩곫곭곮곲곴곷곸곹곺곻곾곿괁괂괃괅괇괈괉괊괋괎괐괒괓�\".split(\"\");\nfor(j = 0; j != D[129].length; ++j) if(D[129][j].charCodeAt(0) !== 0xFFFD) { e[D[129][j]] = 33024 + j; d[33024 + j] = D[129][j];}\nD[130] = \"�����������������������������������������������������������������괔괕괖괗괙괚괛괝괞괟괡괢괣괤괥괦괧괨괪괫괮괯괰괱괲괳������괶괷괹괺괻괽괾괿굀굁굂굃굆굈굊굋굌굍굎굏굑굒굓굕굖굗������굙굚굛굜굝굞굟굠굢굤굥굦굧굨굩굪굫굮굯굱굲굷굸굹굺굾궀궃궄궅궆궇궊궋궍궎궏궑궒궓궔궕궖궗궘궙궚궛궞궟궠궡궢궣궥궦궧궨궩궪궫궬궭궮궯궰궱궲궳궴궵궶궸궹궺궻궼궽궾궿귂귃귅귆귇귉귊귋귌귍귎귏귒귔귕귖귗귘귙귚귛귝귞귟귡귢귣귥귦귧귨귩귪귫귬귭귮귯귰귱귲귳귴귵귶귷�\".split(\"\");\nfor(j = 0; j != D[130].length; ++j) if(D[130][j].charCodeAt(0) !== 0xFFFD) { e[D[130][j]] = 33280 + j; d[33280 + j] = D[130][j];}\nD[131] = \"�����������������������������������������������������������������귺귻귽귾긂긃긄긅긆긇긊긌긎긏긐긑긒긓긕긖긗긘긙긚긛긜������긝긞긟긠긡긢긣긤긥긦긧긨긩긪긫긬긭긮긯긲긳긵긶긹긻긼������긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗깘깙깚깛깞깢깣깤깦깧깪깫깭깮깯깱깲깳깴깵깶깷깺깾깿꺀꺁꺂꺃꺆꺇꺈꺉꺊꺋꺍꺎꺏꺐꺑꺒꺓꺔꺕꺖꺗꺘꺙꺚꺛꺜꺝꺞꺟꺠꺡꺢꺣꺤꺥꺦꺧꺨꺩꺪꺫꺬꺭꺮꺯꺰꺱꺲꺳꺴꺵꺶꺷꺸꺹꺺꺻꺿껁껂껃껅껆껇껈껉껊껋껎껒껓껔껕껖껗껚껛껝껞껟껠껡껢껣껤껥�\".split(\"\");\nfor(j = 0; j != D[131].length; ++j) if(D[131][j].charCodeAt(0) !== 0xFFFD) { e[D[131][j]] = 33536 + j; d[33536 + j] = D[131][j];}\nD[132] = \"�����������������������������������������������������������������껦껧껩껪껬껮껯껰껱껲껳껵껶껷껹껺껻껽껾껿꼀꼁꼂꼃꼄꼅������꼆꼉꼊꼋꼌꼎꼏꼑꼒꼓꼔꼕꼖꼗꼘꼙꼚꼛꼜꼝꼞꼟꼠꼡꼢꼣������꼤꼥꼦꼧꼨꼩꼪꼫꼮꼯꼱꼳꼵꼶꼷꼸꼹꼺꼻꼾꽀꽄꽅꽆꽇꽊꽋꽌꽍꽎꽏꽑꽒꽓꽔꽕꽖꽗꽘꽙꽚꽛꽞꽟꽠꽡꽢꽣꽦꽧꽨꽩꽪꽫꽬꽭꽮꽯꽰꽱꽲꽳꽴꽵꽶꽷꽸꽺꽻꽼꽽꽾꽿꾁꾂꾃꾅꾆꾇꾉꾊꾋꾌꾍꾎꾏꾒꾓꾔꾖꾗꾘꾙꾚꾛꾝꾞꾟꾠꾡꾢꾣꾤꾥꾦꾧꾨꾩꾪꾫꾬꾭꾮꾯꾰꾱꾲꾳꾴꾵꾶꾷꾺꾻꾽꾾�\".split(\"\");\nfor(j = 0; j != D[132].length; ++j) if(D[132][j].charCodeAt(0) !== 0xFFFD) { e[D[132][j]] = 33792 + j; d[33792 + j] = D[132][j];}\nD[133] = \"�����������������������������������������������������������������꾿꿁꿂꿃꿄꿅꿆꿊꿌꿏꿐꿑꿒꿓꿕꿖꿗꿘꿙꿚꿛꿝꿞꿟꿠꿡������꿢꿣꿤꿥꿦꿧꿪꿫꿬꿭꿮꿯꿲꿳꿵꿶꿷꿹꿺꿻꿼꿽꿾꿿뀂뀃������뀅뀆뀇뀈뀉뀊뀋뀍뀎뀏뀑뀒뀓뀕뀖뀗뀘뀙뀚뀛뀞뀟뀠뀡뀢뀣뀤뀥뀦뀧뀩뀪뀫뀬뀭뀮뀯뀰뀱뀲뀳뀴뀵뀶뀷뀸뀹뀺뀻뀼뀽뀾뀿끀끁끂끃끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞끟끠끡끢끣끤끥끦끧끨끩끪끫끬끭끮끯끰끱끲끳끴끵끶끷끸끹끺끻끾끿낁낂낃낅낆낇낈낉낊낋낎낐낒낓낔낕낖낗낛낝낞낣낤�\".split(\"\");\nfor(j = 0; j != D[133].length; ++j) if(D[133][j].charCodeAt(0) !== 0xFFFD) { e[D[133][j]] = 34048 + j; d[34048 + j] = D[133][j];}\nD[134] = \"�����������������������������������������������������������������낥낦낧낪낰낲낶낷낹낺낻낽낾낿냀냁냂냃냆냊냋냌냍냎냏냒������냓냕냖냗냙냚냛냜냝냞냟냡냢냣냤냦냧냨냩냪냫냬냭냮냯냰������냱냲냳냴냵냶냷냸냹냺냻냼냽냾냿넀넁넂넃넄넅넆넇넊넍넎넏넑넔넕넖넗넚넞넟넠넡넢넦넧넩넪넫넭넮넯넰넱넲넳넶넺넻넼넽넾넿녂녃녅녆녇녉녊녋녌녍녎녏녒녓녖녗녙녚녛녝녞녟녡녢녣녤녥녦녧녨녩녪녫녬녭녮녯녰녱녲녳녴녵녶녷녺녻녽녾녿놁놃놄놅놆놇놊놌놎놏놐놑놕놖놗놙놚놛놝�\".split(\"\");\nfor(j = 0; j != D[134].length; ++j) if(D[134][j].charCodeAt(0) !== 0xFFFD) { e[D[134][j]] = 34304 + j; d[34304 + j] = D[134][j];}\nD[135] = \"�����������������������������������������������������������������놞놟놠놡놢놣놤놥놦놧놩놪놫놬놭놮놯놰놱놲놳놴놵놶놷놸������놹놺놻놼놽놾놿뇀뇁뇂뇃뇄뇅뇆뇇뇈뇉뇊뇋뇍뇎뇏뇑뇒뇓뇕������뇖뇗뇘뇙뇚뇛뇞뇠뇡뇢뇣뇤뇥뇦뇧뇪뇫뇭뇮뇯뇱뇲뇳뇴뇵뇶뇷뇸뇺뇼뇾뇿눀눁눂눃눆눇눉눊눍눎눏눐눑눒눓눖눘눚눛눜눝눞눟눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눵눶눷눸눹눺눻눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉙뉚뉛뉝뉞뉟뉡뉢뉣뉤뉥뉦뉧뉪뉫뉬뉭뉮�\".split(\"\");\nfor(j = 0; j != D[135].length; ++j) if(D[135][j].charCodeAt(0) !== 0xFFFD) { e[D[135][j]] = 34560 + j; d[34560 + j] = D[135][j];}\nD[136] = \"�����������������������������������������������������������������뉯뉰뉱뉲뉳뉶뉷뉸뉹뉺뉻뉽뉾뉿늀늁늂늃늆늇늈늊늋늌늍늎������늏늒늓늕늖늗늛늜늝늞늟늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷������늸늹늺늻늼늽늾늿닀닁닂닃닄닅닆닇닊닋닍닎닏닑닓닔닕닖닗닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉댊댋댌댍댎댏댒댖댗댘댙댚댛댝댞댟댠댡댢댣댤댥댦댧댨댩댪댫댬댭댮댯댰댱댲댳댴댵댶댷댸댹댺댻댼댽댾댿덀덁덂덃덄덅덆덇덈덉덊덋덌덍덎덏덐덑덒덓덗덙덚덝덠덡덢덣�\".split(\"\");\nfor(j = 0; j != D[136].length; ++j) if(D[136][j].charCodeAt(0) !== 0xFFFD) { e[D[136][j]] = 34816 + j; d[34816 + j] = D[136][j];}\nD[137] = \"�����������������������������������������������������������������덦덨덪덬덭덯덲덳덵덶덷덹덺덻덼덽덾덿뎂뎆뎇뎈뎉뎊뎋뎍������뎎뎏뎑뎒뎓뎕뎖뎗뎘뎙뎚뎛뎜뎝뎞뎟뎢뎣뎤뎥뎦뎧뎩뎪뎫뎭������뎮뎯뎰뎱뎲뎳뎴뎵뎶뎷뎸뎹뎺뎻뎼뎽뎾뎿돀돁돂돃돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩돪돫돬돭돮돯돰돱돲돳돴돵돶돷돸돹돺돻돽돾돿됀됁됂됃됄됅됆됇됈됉됊됋됌됍됎됏됑됒됓됔됕됖됗됙됚됛됝됞됟됡됢됣됤됥됦됧됪됬됭됮됯됰됱됲됳됵됶됷됸됹됺됻됼됽됾됿둀둁둂둃둄�\".split(\"\");\nfor(j = 0; j != D[137].length; ++j) if(D[137][j].charCodeAt(0) !== 0xFFFD) { e[D[137][j]] = 35072 + j; d[35072 + j] = D[137][j];}\nD[138] = \"�����������������������������������������������������������������둅둆둇둈둉둊둋둌둍둎둏둒둓둕둖둗둙둚둛둜둝둞둟둢둤둦������둧둨둩둪둫둭둮둯둰둱둲둳둴둵둶둷둸둹둺둻둼둽둾둿뒁뒂������뒃뒄뒅뒆뒇뒉뒊뒋뒌뒍뒎뒏뒐뒑뒒뒓뒔뒕뒖뒗뒘뒙뒚뒛뒜뒞뒟뒠뒡뒢뒣뒥뒦뒧뒩뒪뒫뒭뒮뒯뒰뒱뒲뒳뒴뒶뒸뒺뒻뒼뒽뒾뒿듁듂듃듅듆듇듉듊듋듌듍듎듏듑듒듓듔듖듗듘듙듚듛듞듟듡듢듥듧듨듩듪듫듮듰듲듳듴듵듶듷듹듺듻듼듽듾듿딀딁딂딃딄딅딆딇딈딉딊딋딌딍딎딏딐딑딒딓딖딗딙딚딝�\".split(\"\");\nfor(j = 0; j != D[138].length; ++j) if(D[138][j].charCodeAt(0) !== 0xFFFD) { e[D[138][j]] = 35328 + j; d[35328 + j] = D[138][j];}\nD[139] = \"�����������������������������������������������������������������딞딟딠딡딢딣딦딫딬딭딮딯딲딳딵딶딷딹딺딻딼딽딾딿땂땆������땇땈땉땊땎땏땑땒땓땕땖땗땘땙땚땛땞땢땣땤땥땦땧땨땩땪������땫땬땭땮땯땰땱땲땳땴땵땶땷땸땹땺땻땼땽땾땿떀떁떂떃떄떅떆떇떈떉떊떋떌떍떎떏떐떑떒떓떔떕떖떗떘떙떚떛떜떝떞떟떢떣떥떦떧떩떬떭떮떯떲떶떷떸떹떺떾떿뗁뗂뗃뗅뗆뗇뗈뗉뗊뗋뗎뗒뗓뗔뗕뗖뗗뗙뗚뗛뗜뗝뗞뗟뗠뗡뗢뗣뗤뗥뗦뗧뗨뗩뗪뗫뗭뗮뗯뗰뗱뗲뗳뗴뗵뗶뗷뗸뗹뗺뗻뗼뗽뗾뗿�\".split(\"\");\nfor(j = 0; j != D[139].length; ++j) if(D[139][j].charCodeAt(0) !== 0xFFFD) { e[D[139][j]] = 35584 + j; d[35584 + j] = D[139][j];}\nD[140] = \"�����������������������������������������������������������������똀똁똂똃똄똅똆똇똈똉똊똋똌똍똎똏똒똓똕똖똗똙똚똛똜똝������똞똟똠똡똢똣똤똦똧똨똩똪똫똭똮똯똰똱똲똳똵똶똷똸똹똺������똻똼똽똾똿뙀뙁뙂뙃뙄뙅뙆뙇뙉뙊뙋뙌뙍뙎뙏뙐뙑뙒뙓뙔뙕뙖뙗뙘뙙뙚뙛뙜뙝뙞뙟뙠뙡뙢뙣뙥뙦뙧뙩뙪뙫뙬뙭뙮뙯뙰뙱뙲뙳뙴뙵뙶뙷뙸뙹뙺뙻뙼뙽뙾뙿뚀뚁뚂뚃뚄뚅뚆뚇뚈뚉뚊뚋뚌뚍뚎뚏뚐뚑뚒뚓뚔뚕뚖뚗뚘뚙뚚뚛뚞뚟뚡뚢뚣뚥뚦뚧뚨뚩뚪뚭뚮뚯뚰뚲뚳뚴뚵뚶뚷뚸뚹뚺뚻뚼뚽뚾뚿뛀뛁뛂�\".split(\"\");\nfor(j = 0; j != D[140].length; ++j) if(D[140][j].charCodeAt(0) !== 0xFFFD) { e[D[140][j]] = 35840 + j; d[35840 + j] = D[140][j];}\nD[141] = \"�����������������������������������������������������������������뛃뛄뛅뛆뛇뛈뛉뛊뛋뛌뛍뛎뛏뛐뛑뛒뛓뛕뛖뛗뛘뛙뛚뛛뛜뛝������뛞뛟뛠뛡뛢뛣뛤뛥뛦뛧뛨뛩뛪뛫뛬뛭뛮뛯뛱뛲뛳뛵뛶뛷뛹뛺������뛻뛼뛽뛾뛿뜂뜃뜄뜆뜇뜈뜉뜊뜋뜌뜍뜎뜏뜐뜑뜒뜓뜔뜕뜖뜗뜘뜙뜚뜛뜜뜝뜞뜟뜠뜡뜢뜣뜤뜥뜦뜧뜪뜫뜭뜮뜱뜲뜳뜴뜵뜶뜷뜺뜼뜽뜾뜿띀띁띂띃띅띆띇띉띊띋띍띎띏띐띑띒띓띖띗띘띙띚띛띜띝띞띟띡띢띣띥띦띧띩띪띫띬띭띮띯띲띴띶띷띸띹띺띻띾띿랁랂랃랅랆랇랈랉랊랋랎랓랔랕랚랛랝랞�\".split(\"\");\nfor(j = 0; j != D[141].length; ++j) if(D[141][j].charCodeAt(0) !== 0xFFFD) { e[D[141][j]] = 36096 + j; d[36096 + j] = D[141][j];}\nD[142] = \"�����������������������������������������������������������������랟랡랢랣랤랥랦랧랪랮랯랰랱랲랳랶랷랹랺랻랼랽랾랿럀럁������럂럃럄럅럆럈럊럋럌럍럎럏럐럑럒럓럔럕럖럗럘럙럚럛럜럝������럞럟럠럡럢럣럤럥럦럧럨럩럪럫럮럯럱럲럳럵럶럷럸럹럺럻럾렂렃렄렅렆렊렋렍렎렏렑렒렓렔렕렖렗렚렜렞렟렠렡렢렣렦렧렩렪렫렭렮렯렰렱렲렳렶렺렻렼렽렾렿롁롂롃롅롆롇롈롉롊롋롌롍롎롏롐롒롔롕롖롗롘롙롚롛롞롟롡롢롣롥롦롧롨롩롪롫롮롰롲롳롴롵롶롷롹롺롻롽롾롿뢀뢁뢂뢃뢄�\".split(\"\");\nfor(j = 0; j != D[142].length; ++j) if(D[142][j].charCodeAt(0) !== 0xFFFD) { e[D[142][j]] = 36352 + j; d[36352 + j] = D[142][j];}\nD[143] = \"�����������������������������������������������������������������뢅뢆뢇뢈뢉뢊뢋뢌뢎뢏뢐뢑뢒뢓뢔뢕뢖뢗뢘뢙뢚뢛뢜뢝뢞뢟������뢠뢡뢢뢣뢤뢥뢦뢧뢩뢪뢫뢬뢭뢮뢯뢱뢲뢳뢵뢶뢷뢹뢺뢻뢼뢽������뢾뢿룂룄룆룇룈룉룊룋룍룎룏룑룒룓룕룖룗룘룙룚룛룜룞룠룢룣룤룥룦룧룪룫룭룮룯룱룲룳룴룵룶룷룺룼룾룿뤀뤁뤂뤃뤅뤆뤇뤈뤉뤊뤋뤌뤍뤎뤏뤐뤑뤒뤓뤔뤕뤖뤗뤙뤚뤛뤜뤝뤞뤟뤡뤢뤣뤤뤥뤦뤧뤨뤩뤪뤫뤬뤭뤮뤯뤰뤱뤲뤳뤴뤵뤶뤷뤸뤹뤺뤻뤾뤿륁륂륃륅륆륇륈륉륊륋륍륎륐륒륓륔륕륖륗�\".split(\"\");\nfor(j = 0; j != D[143].length; ++j) if(D[143][j].charCodeAt(0) !== 0xFFFD) { e[D[143][j]] = 36608 + j; d[36608 + j] = D[143][j];}\nD[144] = \"�����������������������������������������������������������������륚륛륝륞륟륡륢륣륤륥륦륧륪륬륮륯륰륱륲륳륶륷륹륺륻륽������륾륿릀릁릂릃릆릈릋릌릏릐릑릒릓릔릕릖릗릘릙릚릛릜릝릞������릟릠릡릢릣릤릥릦릧릨릩릪릫릮릯릱릲릳릵릶릷릸릹릺릻릾맀맂맃맄맅맆맇맊맋맍맓맔맕맖맗맚맜맟맠맢맦맧맩맪맫맭맮맯맰맱맲맳맶맻맼맽맾맿먂먃먄먅먆먇먉먊먋먌먍먎먏먐먑먒먓먔먖먗먘먙먚먛먜먝먞먟먠먡먢먣먤먥먦먧먨먩먪먫먬먭먮먯먰먱먲먳먴먵먶먷먺먻먽먾먿멁멃멄멅멆�\".split(\"\");\nfor(j = 0; j != D[144].length; ++j) if(D[144][j].charCodeAt(0) !== 0xFFFD) { e[D[144][j]] = 36864 + j; d[36864 + j] = D[144][j];}\nD[145] = \"�����������������������������������������������������������������멇멊멌멏멐멑멒멖멗멙멚멛멝멞멟멠멡멢멣멦멪멫멬멭멮멯������멲멳멵멶멷멹멺멻멼멽멾멿몀몁몂몆몈몉몊몋몍몎몏몐몑몒������몓몔몕몖몗몘몙몚몛몜몝몞몟몠몡몢몣몤몥몦몧몪몭몮몯몱몳몴몵몶몷몺몼몾몿뫀뫁뫂뫃뫅뫆뫇뫉뫊뫋뫌뫍뫎뫏뫐뫑뫒뫓뫔뫕뫖뫗뫚뫛뫜뫝뫞뫟뫠뫡뫢뫣뫤뫥뫦뫧뫨뫩뫪뫫뫬뫭뫮뫯뫰뫱뫲뫳뫴뫵뫶뫷뫸뫹뫺뫻뫽뫾뫿묁묂묃묅묆묇묈묉묊묋묌묎묐묒묓묔묕묖묗묙묚묛묝묞묟묡묢묣묤묥묦묧�\".split(\"\");\nfor(j = 0; j != D[145].length; ++j) if(D[145][j].charCodeAt(0) !== 0xFFFD) { e[D[145][j]] = 37120 + j; d[37120 + j] = D[145][j];}\nD[146] = \"�����������������������������������������������������������������묨묪묬묭묮묯묰묱묲묳묷묹묺묿뭀뭁뭂뭃뭆뭈뭊뭋뭌뭎뭑뭒������뭓뭕뭖뭗뭙뭚뭛뭜뭝뭞뭟뭠뭢뭤뭥뭦뭧뭨뭩뭪뭫뭭뭮뭯뭰뭱������뭲뭳뭴뭵뭶뭷뭸뭹뭺뭻뭼뭽뭾뭿뮀뮁뮂뮃뮄뮅뮆뮇뮉뮊뮋뮍뮎뮏뮑뮒뮓뮔뮕뮖뮗뮘뮙뮚뮛뮜뮝뮞뮟뮠뮡뮢뮣뮥뮦뮧뮩뮪뮫뮭뮮뮯뮰뮱뮲뮳뮵뮶뮸뮹뮺뮻뮼뮽뮾뮿믁믂믃믅믆믇믉믊믋믌믍믎믏믑믒믔믕믖믗믘믙믚믛믜믝믞믟믠믡믢믣믤믥믦믧믨믩믪믫믬믭믮믯믰믱믲믳믴믵믶믷믺믻믽믾밁�\".split(\"\");\nfor(j = 0; j != D[146].length; ++j) if(D[146][j].charCodeAt(0) !== 0xFFFD) { e[D[146][j]] = 37376 + j; d[37376 + j] = D[146][j];}\nD[147] = \"�����������������������������������������������������������������밃밄밅밆밇밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵������밶밷밹밺밻밼밽밾밿뱂뱆뱇뱈뱊뱋뱎뱏뱑뱒뱓뱔뱕뱖뱗뱘뱙������뱚뱛뱜뱞뱟뱠뱡뱢뱣뱤뱥뱦뱧뱨뱩뱪뱫뱬뱭뱮뱯뱰뱱뱲뱳뱴뱵뱶뱷뱸뱹뱺뱻뱼뱽뱾뱿벀벁벂벃벆벇벉벊벍벏벐벑벒벓벖벘벛벜벝벞벟벢벣벥벦벩벪벫벬벭벮벯벲벶벷벸벹벺벻벾벿볁볂볃볅볆볇볈볉볊볋볌볎볒볓볔볖볗볙볚볛볝볞볟볠볡볢볣볤볥볦볧볨볩볪볫볬볭볮볯볰볱볲볳볷볹볺볻볽�\".split(\"\");\nfor(j = 0; j != D[147].length; ++j) if(D[147][j].charCodeAt(0) !== 0xFFFD) { e[D[147][j]] = 37632 + j; d[37632 + j] = D[147][j];}\nD[148] = \"�����������������������������������������������������������������볾볿봀봁봂봃봆봈봊봋봌봍봎봏봑봒봓봕봖봗봘봙봚봛봜봝������봞봟봠봡봢봣봥봦봧봨봩봪봫봭봮봯봰봱봲봳봴봵봶봷봸봹������봺봻봼봽봾봿뵁뵂뵃뵄뵅뵆뵇뵊뵋뵍뵎뵏뵑뵒뵓뵔뵕뵖뵗뵚뵛뵜뵝뵞뵟뵠뵡뵢뵣뵥뵦뵧뵩뵪뵫뵬뵭뵮뵯뵰뵱뵲뵳뵴뵵뵶뵷뵸뵹뵺뵻뵼뵽뵾뵿붂붃붅붆붋붌붍붎붏붒붔붖붗붘붛붝붞붟붠붡붢붣붥붦붧붨붩붪붫붬붭붮붯붱붲붳붴붵붶붷붹붺붻붼붽붾붿뷀뷁뷂뷃뷄뷅뷆뷇뷈뷉뷊뷋뷌뷍뷎뷏뷐뷑�\".split(\"\");\nfor(j = 0; j != D[148].length; ++j) if(D[148][j].charCodeAt(0) !== 0xFFFD) { e[D[148][j]] = 37888 + j; d[37888 + j] = D[148][j];}\nD[149] = \"�����������������������������������������������������������������뷒뷓뷖뷗뷙뷚뷛뷝뷞뷟뷠뷡뷢뷣뷤뷥뷦뷧뷨뷪뷫뷬뷭뷮뷯뷱������뷲뷳뷵뷶뷷뷹뷺뷻뷼뷽뷾뷿븁븂븄븆븇븈븉븊븋븎븏븑븒븓������븕븖븗븘븙븚븛븞븠븡븢븣븤븥븦븧븨븩븪븫븬븭븮븯븰븱븲븳븴븵븶븷븸븹븺븻븼븽븾븿빀빁빂빃빆빇빉빊빋빍빏빐빑빒빓빖빘빜빝빞빟빢빣빥빦빧빩빫빬빭빮빯빲빶빷빸빹빺빾빿뺁뺂뺃뺅뺆뺇뺈뺉뺊뺋뺎뺒뺓뺔뺕뺖뺗뺚뺛뺜뺝뺞뺟뺠뺡뺢뺣뺤뺥뺦뺧뺩뺪뺫뺬뺭뺮뺯뺰뺱뺲뺳뺴뺵뺶뺷�\".split(\"\");\nfor(j = 0; j != D[149].length; ++j) if(D[149][j].charCodeAt(0) !== 0xFFFD) { e[D[149][j]] = 38144 + j; d[38144 + j] = D[149][j];}\nD[150] = \"�����������������������������������������������������������������뺸뺹뺺뺻뺼뺽뺾뺿뻀뻁뻂뻃뻄뻅뻆뻇뻈뻉뻊뻋뻌뻍뻎뻏뻒뻓������뻕뻖뻙뻚뻛뻜뻝뻞뻟뻡뻢뻦뻧뻨뻩뻪뻫뻭뻮뻯뻰뻱뻲뻳뻴뻵������뻶뻷뻸뻹뻺뻻뻼뻽뻾뻿뼀뼂뼃뼄뼅뼆뼇뼊뼋뼌뼍뼎뼏뼐뼑뼒뼓뼔뼕뼖뼗뼚뼞뼟뼠뼡뼢뼣뼤뼥뼦뼧뼨뼩뼪뼫뼬뼭뼮뼯뼰뼱뼲뼳뼴뼵뼶뼷뼸뼹뼺뼻뼼뼽뼾뼿뽂뽃뽅뽆뽇뽉뽊뽋뽌뽍뽎뽏뽒뽓뽔뽖뽗뽘뽙뽚뽛뽜뽝뽞뽟뽠뽡뽢뽣뽤뽥뽦뽧뽨뽩뽪뽫뽬뽭뽮뽯뽰뽱뽲뽳뽴뽵뽶뽷뽸뽹뽺뽻뽼뽽뽾뽿뾀뾁뾂�\".split(\"\");\nfor(j = 0; j != D[150].length; ++j) if(D[150][j].charCodeAt(0) !== 0xFFFD) { e[D[150][j]] = 38400 + j; d[38400 + j] = D[150][j];}\nD[151] = \"�����������������������������������������������������������������뾃뾄뾅뾆뾇뾈뾉뾊뾋뾌뾍뾎뾏뾐뾑뾒뾓뾕뾖뾗뾘뾙뾚뾛뾜뾝������뾞뾟뾠뾡뾢뾣뾤뾥뾦뾧뾨뾩뾪뾫뾬뾭뾮뾯뾱뾲뾳뾴뾵뾶뾷뾸������뾹뾺뾻뾼뾽뾾뾿뿀뿁뿂뿃뿄뿆뿇뿈뿉뿊뿋뿎뿏뿑뿒뿓뿕뿖뿗뿘뿙뿚뿛뿝뿞뿠뿢뿣뿤뿥뿦뿧뿨뿩뿪뿫뿬뿭뿮뿯뿰뿱뿲뿳뿴뿵뿶뿷뿸뿹뿺뿻뿼뿽뿾뿿쀀쀁쀂쀃쀄쀅쀆쀇쀈쀉쀊쀋쀌쀍쀎쀏쀐쀑쀒쀓쀔쀕쀖쀗쀘쀙쀚쀛쀜쀝쀞쀟쀠쀡쀢쀣쀤쀥쀦쀧쀨쀩쀪쀫쀬쀭쀮쀯쀰쀱쀲쀳쀴쀵쀶쀷쀸쀹쀺쀻쀽쀾쀿�\".split(\"\");\nfor(j = 0; j != D[151].length; ++j) if(D[151][j].charCodeAt(0) !== 0xFFFD) { e[D[151][j]] = 38656 + j; d[38656 + j] = D[151][j];}\nD[152] = \"�����������������������������������������������������������������쁀쁁쁂쁃쁄쁅쁆쁇쁈쁉쁊쁋쁌쁍쁎쁏쁐쁒쁓쁔쁕쁖쁗쁙쁚쁛������쁝쁞쁟쁡쁢쁣쁤쁥쁦쁧쁪쁫쁬쁭쁮쁯쁰쁱쁲쁳쁴쁵쁶쁷쁸쁹������쁺쁻쁼쁽쁾쁿삀삁삂삃삄삅삆삇삈삉삊삋삌삍삎삏삒삓삕삖삗삙삚삛삜삝삞삟삢삤삦삧삨삩삪삫삮삱삲삷삸삹삺삻삾샂샃샄샆샇샊샋샍샎샏샑샒샓샔샕샖샗샚샞샟샠샡샢샣샦샧샩샪샫샭샮샯샰샱샲샳샶샸샺샻샼샽샾샿섁섂섃섅섆섇섉섊섋섌섍섎섏섑섒섓섔섖섗섘섙섚섛섡섢섥섨섩섪섫섮�\".split(\"\");\nfor(j = 0; j != D[152].length; ++j) if(D[152][j].charCodeAt(0) !== 0xFFFD) { e[D[152][j]] = 38912 + j; d[38912 + j] = D[152][j];}\nD[153] = \"�����������������������������������������������������������������섲섳섴섵섷섺섻섽섾섿셁셂셃셄셅셆셇셊셎셏셐셑셒셓셖셗������셙셚셛셝셞셟셠셡셢셣셦셪셫셬셭셮셯셱셲셳셵셶셷셹셺셻������셼셽셾셿솀솁솂솃솄솆솇솈솉솊솋솏솑솒솓솕솗솘솙솚솛솞솠솢솣솤솦솧솪솫솭솮솯솱솲솳솴솵솶솷솸솹솺솻솼솾솿쇀쇁쇂쇃쇅쇆쇇쇉쇊쇋쇍쇎쇏쇐쇑쇒쇓쇕쇖쇙쇚쇛쇜쇝쇞쇟쇡쇢쇣쇥쇦쇧쇩쇪쇫쇬쇭쇮쇯쇲쇴쇵쇶쇷쇸쇹쇺쇻쇾쇿숁숂숃숅숆숇숈숉숊숋숎숐숒숓숔숕숖숗숚숛숝숞숡숢숣�\".split(\"\");\nfor(j = 0; j != D[153].length; ++j) if(D[153][j].charCodeAt(0) !== 0xFFFD) { e[D[153][j]] = 39168 + j; d[39168 + j] = D[153][j];}\nD[154] = \"�����������������������������������������������������������������숤숥숦숧숪숬숮숰숳숵숶숷숸숹숺숻숼숽숾숿쉀쉁쉂쉃쉄쉅������쉆쉇쉉쉊쉋쉌쉍쉎쉏쉒쉓쉕쉖쉗쉙쉚쉛쉜쉝쉞쉟쉡쉢쉣쉤쉦������쉧쉨쉩쉪쉫쉮쉯쉱쉲쉳쉵쉶쉷쉸쉹쉺쉻쉾슀슂슃슄슅슆슇슊슋슌슍슎슏슑슒슓슔슕슖슗슙슚슜슞슟슠슡슢슣슦슧슩슪슫슮슯슰슱슲슳슶슸슺슻슼슽슾슿싀싁싂싃싄싅싆싇싈싉싊싋싌싍싎싏싐싑싒싓싔싕싖싗싘싙싚싛싞싟싡싢싥싦싧싨싩싪싮싰싲싳싴싵싷싺싽싾싿쌁쌂쌃쌄쌅쌆쌇쌊쌋쌎쌏�\".split(\"\");\nfor(j = 0; j != D[154].length; ++j) if(D[154][j].charCodeAt(0) !== 0xFFFD) { e[D[154][j]] = 39424 + j; d[39424 + j] = D[154][j];}\nD[155] = \"�����������������������������������������������������������������쌐쌑쌒쌖쌗쌙쌚쌛쌝쌞쌟쌠쌡쌢쌣쌦쌧쌪쌫쌬쌭쌮쌯쌰쌱쌲������쌳쌴쌵쌶쌷쌸쌹쌺쌻쌼쌽쌾쌿썀썁썂썃썄썆썇썈썉썊썋썌썍������썎썏썐썑썒썓썔썕썖썗썘썙썚썛썜썝썞썟썠썡썢썣썤썥썦썧썪썫썭썮썯썱썳썴썵썶썷썺썻썾썿쎀쎁쎂쎃쎅쎆쎇쎉쎊쎋쎍쎎쎏쎐쎑쎒쎓쎔쎕쎖쎗쎘쎙쎚쎛쎜쎝쎞쎟쎠쎡쎢쎣쎤쎥쎦쎧쎨쎩쎪쎫쎬쎭쎮쎯쎰쎱쎲쎳쎴쎵쎶쎷쎸쎹쎺쎻쎼쎽쎾쎿쏁쏂쏃쏄쏅쏆쏇쏈쏉쏊쏋쏌쏍쏎쏏쏐쏑쏒쏓쏔쏕쏖쏗쏚�\".split(\"\");\nfor(j = 0; j != D[155].length; ++j) if(D[155][j].charCodeAt(0) !== 0xFFFD) { e[D[155][j]] = 39680 + j; d[39680 + j] = D[155][j];}\nD[156] = \"�����������������������������������������������������������������쏛쏝쏞쏡쏣쏤쏥쏦쏧쏪쏫쏬쏮쏯쏰쏱쏲쏳쏶쏷쏹쏺쏻쏼쏽쏾������쏿쐀쐁쐂쐃쐄쐅쐆쐇쐉쐊쐋쐌쐍쐎쐏쐑쐒쐓쐔쐕쐖쐗쐘쐙쐚������쐛쐜쐝쐞쐟쐠쐡쐢쐣쐥쐦쐧쐨쐩쐪쐫쐭쐮쐯쐱쐲쐳쐵쐶쐷쐸쐹쐺쐻쐾쐿쑀쑁쑂쑃쑄쑅쑆쑇쑉쑊쑋쑌쑍쑎쑏쑐쑑쑒쑓쑔쑕쑖쑗쑘쑙쑚쑛쑜쑝쑞쑟쑠쑡쑢쑣쑦쑧쑩쑪쑫쑭쑮쑯쑰쑱쑲쑳쑶쑷쑸쑺쑻쑼쑽쑾쑿쒁쒂쒃쒄쒅쒆쒇쒈쒉쒊쒋쒌쒍쒎쒏쒐쒑쒒쒓쒕쒖쒗쒘쒙쒚쒛쒝쒞쒟쒠쒡쒢쒣쒤쒥쒦쒧쒨쒩�\".split(\"\");\nfor(j = 0; j != D[156].length; ++j) if(D[156][j].charCodeAt(0) !== 0xFFFD) { e[D[156][j]] = 39936 + j; d[39936 + j] = D[156][j];}\nD[157] = \"�����������������������������������������������������������������쒪쒫쒬쒭쒮쒯쒰쒱쒲쒳쒴쒵쒶쒷쒹쒺쒻쒽쒾쒿쓀쓁쓂쓃쓄쓅������쓆쓇쓈쓉쓊쓋쓌쓍쓎쓏쓐쓑쓒쓓쓔쓕쓖쓗쓘쓙쓚쓛쓜쓝쓞쓟������쓠쓡쓢쓣쓤쓥쓦쓧쓨쓪쓫쓬쓭쓮쓯쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂씃씄씅씆씇씈씉씊씋씍씎씏씑씒씓씕씖씗씘씙씚씛씝씞씟씠씡씢씣씤씥씦씧씪씫씭씮씯씱씲씳씴씵씶씷씺씼씾씿앀앁앂앃앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩앪앫앬앭앮앯앲앶앷앸앹앺앻앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔�\".split(\"\");\nfor(j = 0; j != D[157].length; ++j) if(D[157][j].charCodeAt(0) !== 0xFFFD) { e[D[157][j]] = 40192 + j; d[40192 + j] = D[157][j];}\nD[158] = \"�����������������������������������������������������������������얖얙얚얛얝얞얟얡얢얣얤얥얦얧얨얪얫얬얭얮얯얰얱얲얳얶������얷얺얿엀엁엂엃엋엍엏엒엓엕엖엗엙엚엛엜엝엞엟엢엤엦엧������엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑옒옓옔옕옖옗옚옝옞옟옠옡옢옣옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉왊왋왌왍왎왏왒왖왗왘왙왚왛왞왟왡왢왣왤왥왦왧왨왩왪왫왭왮왰왲왳왴왵왶왷왺왻왽왾왿욁욂욃욄욅욆욇욊욌욎욏욐욑욒욓욖욗욙욚욛욝욞욟욠욡욢욣욦�\".split(\"\");\nfor(j = 0; j != D[158].length; ++j) if(D[158][j].charCodeAt(0) !== 0xFFFD) { e[D[158][j]] = 40448 + j; d[40448 + j] = D[158][j];}\nD[159] = \"�����������������������������������������������������������������욨욪욫욬욭욮욯욲욳욵욶욷욻욼욽욾욿웂웄웆웇웈웉웊웋웎������웏웑웒웓웕웖웗웘웙웚웛웞웟웢웣웤웥웦웧웪웫웭웮웯웱웲������웳웴웵웶웷웺웻웼웾웿윀윁윂윃윆윇윉윊윋윍윎윏윐윑윒윓윖윘윚윛윜윝윞윟윢윣윥윦윧윩윪윫윬윭윮윯윲윴윶윸윹윺윻윾윿읁읂읃읅읆읇읈읉읋읎읐읙읚읛읝읞읟읡읢읣읤읥읦읧읩읪읬읭읮읯읰읱읲읳읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛잜잝잞잟잢잧잨잩잪잫잮잯잱잲잳잵잶잷�\".split(\"\");\nfor(j = 0; j != D[159].length; ++j) if(D[159][j].charCodeAt(0) !== 0xFFFD) { e[D[159][j]] = 40704 + j; d[40704 + j] = D[159][j];}\nD[160] = \"�����������������������������������������������������������������잸잹잺잻잾쟂쟃쟄쟅쟆쟇쟊쟋쟍쟏쟑쟒쟓쟔쟕쟖쟗쟙쟚쟛쟜������쟞쟟쟠쟡쟢쟣쟥쟦쟧쟩쟪쟫쟭쟮쟯쟰쟱쟲쟳쟴쟵쟶쟷쟸쟹쟺������쟻쟼쟽쟾쟿젂젃젅젆젇젉젋젌젍젎젏젒젔젗젘젙젚젛젞젟젡젢젣젥젦젧젨젩젪젫젮젰젲젳젴젵젶젷젹젺젻젽젾젿졁졂졃졄졅졆졇졊졋졎졏졐졑졒졓졕졖졗졘졙졚졛졜졝졞졟졠졡졢졣졤졥졦졧졨졩졪졫졬졭졮졯졲졳졵졶졷졹졻졼졽졾졿좂좄좈좉좊좎좏좐좑좒좓좕좖좗좘좙좚좛좜좞좠좢좣좤�\".split(\"\");\nfor(j = 0; j != D[160].length; ++j) if(D[160][j].charCodeAt(0) !== 0xFFFD) { e[D[160][j]] = 40960 + j; d[40960 + j] = D[160][j];}\nD[161] = \"�����������������������������������������������������������������좥좦좧좩좪좫좬좭좮좯좰좱좲좳좴좵좶좷좸좹좺좻좾좿죀죁������죂죃죅죆죇죉죊죋죍죎죏죐죑죒죓죖죘죚죛죜죝죞죟죢죣죥������죦죧죨죩죪죫죬죭죮죯죰죱죲죳죴죶죷죸죹죺죻죾죿줁줂줃줇줈줉줊줋줎 、。·‥…¨〃―∥\∼‘’“”〔〕〈〉《》「」『』【】±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬�\".split(\"\");\nfor(j = 0; j != D[161].length; ++j) if(D[161][j].charCodeAt(0) !== 0xFFFD) { e[D[161][j]] = 41216 + j; d[41216 + j] = D[161][j];}\nD[162] = \"�����������������������������������������������������������������줐줒줓줔줕줖줗줙줚줛줜줝줞줟줠줡줢줣줤줥줦줧줨줩줪줫������줭줮줯줰줱줲줳줵줶줷줸줹줺줻줼줽줾줿쥀쥁쥂쥃쥄쥅쥆쥇������쥈쥉쥊쥋쥌쥍쥎쥏쥒쥓쥕쥖쥗쥙쥚쥛쥜쥝쥞쥟쥢쥤쥥쥦쥧쥨쥩쥪쥫쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®������������������������\".split(\"\");\nfor(j = 0; j != D[162].length; ++j) if(D[162][j].charCodeAt(0) !== 0xFFFD) { e[D[162][j]] = 41472 + j; d[41472 + j] = D[162][j];}\nD[163] = \"�����������������������������������������������������������������쥱쥲쥳쥵쥶쥷쥸쥹쥺쥻쥽쥾쥿즀즁즂즃즄즅즆즇즊즋즍즎즏������즑즒즓즔즕즖즗즚즜즞즟즠즡즢즣즤즥즦즧즨즩즪즫즬즭즮������즯즰즱즲즳즴즵즶즷즸즹즺즻즼즽즾즿짂짃짅짆짉짋짌짍짎짏짒짔짗짘짛!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[₩]^_`abcdefghijklmnopqrstuvwxyz{|} ̄�\".split(\"\");\nfor(j = 0; j != D[163].length; ++j) if(D[163][j].charCodeAt(0) !== 0xFFFD) { e[D[163][j]] = 41728 + j; d[41728 + j] = D[163][j];}\nD[164] = \"�����������������������������������������������������������������짞짟짡짣짥짦짨짩짪짫짮짲짳짴짵짶짷짺짻짽짾짿쨁쨂쨃쨄������쨅쨆쨇쨊쨎쨏쨐쨑쨒쨓쨕쨖쨗쨙쨚쨛쨜쨝쨞쨟쨠쨡쨢쨣쨤쨥������쨦쨧쨨쨪쨫쨬쨭쨮쨯쨰쨱쨲쨳쨴쨵쨶쨷쨸쨹쨺쨻쨼쨽쨾쨿쩀쩁쩂쩃쩄쩅쩆ㄱㄲㄳㄴㄵㄶㄷㄸㄹㄺㄻㄼㄽㄾㄿㅀㅁㅂㅃㅄㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎㅏㅐㅑㅒㅓㅔㅕㅖㅗㅘㅙㅚㅛㅜㅝㅞㅟㅠㅡㅢㅣㅤㅥㅦㅧㅨㅩㅪㅫㅬㅭㅮㅯㅰㅱㅲㅳㅴㅵㅶㅷㅸㅹㅺㅻㅼㅽㅾㅿㆀㆁㆂㆃㆄㆅㆆㆇㆈㆉㆊㆋㆌㆍㆎ�\".split(\"\");\nfor(j = 0; j != D[164].length; ++j) if(D[164][j].charCodeAt(0) !== 0xFFFD) { e[D[164][j]] = 41984 + j; d[41984 + j] = D[164][j];}\nD[165] = \"�����������������������������������������������������������������쩇쩈쩉쩊쩋쩎쩏쩑쩒쩓쩕쩖쩗쩘쩙쩚쩛쩞쩢쩣쩤쩥쩦쩧쩩쩪������쩫쩬쩭쩮쩯쩰쩱쩲쩳쩴쩵쩶쩷쩸쩹쩺쩻쩼쩾쩿쪀쪁쪂쪃쪅쪆������쪇쪈쪉쪊쪋쪌쪍쪎쪏쪐쪑쪒쪓쪔쪕쪖쪗쪙쪚쪛쪜쪝쪞쪟쪠쪡쪢쪣쪤쪥쪦쪧ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹ�����ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩ�������ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ��������αβγδεζηθικλμνξοπρστυφχψω�������\".split(\"\");\nfor(j = 0; j != D[165].length; ++j) if(D[165][j].charCodeAt(0) !== 0xFFFD) { e[D[165][j]] = 42240 + j; d[42240 + j] = D[165][j];}\nD[166] = \"�����������������������������������������������������������������쪨쪩쪪쪫쪬쪭쪮쪯쪰쪱쪲쪳쪴쪵쪶쪷쪸쪹쪺쪻쪾쪿쫁쫂쫃쫅������쫆쫇쫈쫉쫊쫋쫎쫐쫒쫔쫕쫖쫗쫚쫛쫜쫝쫞쫟쫡쫢쫣쫤쫥쫦쫧������쫨쫩쫪쫫쫭쫮쫯쫰쫱쫲쫳쫵쫶쫷쫸쫹쫺쫻쫼쫽쫾쫿쬀쬁쬂쬃쬄쬅쬆쬇쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃╄╅╆╇╈╉╊���������������������������\".split(\"\");\nfor(j = 0; j != D[166].length; ++j) if(D[166][j].charCodeAt(0) !== 0xFFFD) { e[D[166][j]] = 42496 + j; d[42496 + j] = D[166][j];}\nD[167] = \"�����������������������������������������������������������������쬋쬌쬍쬎쬏쬑쬒쬓쬕쬖쬗쬙쬚쬛쬜쬝쬞쬟쬢쬣쬤쬥쬦쬧쬨쬩������쬪쬫쬬쬭쬮쬯쬰쬱쬲쬳쬴쬵쬶쬷쬸쬹쬺쬻쬼쬽쬾쬿쭀쭂쭃쭄������쭅쭆쭇쭊쭋쭍쭎쭏쭑쭒쭓쭔쭕쭖쭗쭚쭛쭜쭞쭟쭠쭡쭢쭣쭥쭦쭧쭨쭩쭪쭫쭬㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙㎚㎛㎜㎝㎞㎟㎠㎡㎢㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰㎱㎲㎳㎴㎵㎶㎷㎸㎹㎀㎁㎂㎃㎄㎺㎻㎼㎽㎾㎿㎐㎑㎒㎓㎔Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆����������������\".split(\"\");\nfor(j = 0; j != D[167].length; ++j) if(D[167][j].charCodeAt(0) !== 0xFFFD) { e[D[167][j]] = 42752 + j; d[42752 + j] = D[167][j];}\nD[168] = \"�����������������������������������������������������������������쭭쭮쭯쭰쭱쭲쭳쭴쭵쭶쭷쭺쭻쭼쭽쭾쭿쮀쮁쮂쮃쮄쮅쮆쮇쮈������쮉쮊쮋쮌쮍쮎쮏쮐쮑쮒쮓쮔쮕쮖쮗쮘쮙쮚쮛쮝쮞쮟쮠쮡쮢쮣������쮤쮥쮦쮧쮨쮩쮪쮫쮬쮭쮮쮯쮰쮱쮲쮳쮴쮵쮶쮷쮹쮺쮻쮼쮽쮾쮿쯀쯁쯂쯃쯄ÆЪĦ�IJ�ĿŁØŒºÞŦŊ�㉠㉡㉢㉣㉤㉥㉦㉧㉨㉩㉪㉫㉬㉭㉮㉯㉰㉱㉲㉳㉴㉵㉶㉷㉸㉹㉺㉻ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮½⅓⅔¼¾⅛⅜⅝⅞�\".split(\"\");\nfor(j = 0; j != D[168].length; ++j) if(D[168][j].charCodeAt(0) !== 0xFFFD) { e[D[168][j]] = 43008 + j; d[43008 + j] = D[168][j];}\nD[169] = \"�����������������������������������������������������������������쯅쯆쯇쯈쯉쯊쯋쯌쯍쯎쯏쯐쯑쯒쯓쯕쯖쯗쯘쯙쯚쯛쯜쯝쯞쯟������쯠쯡쯢쯣쯥쯦쯨쯪쯫쯬쯭쯮쯯쯰쯱쯲쯳쯴쯵쯶쯷쯸쯹쯺쯻쯼������쯽쯾쯿찀찁찂찃찄찅찆찇찈찉찊찋찎찏찑찒찓찕찖찗찘찙찚찛찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀㈁㈂㈃㈄㈅㈆㈇㈈㈉㈊㈋㈌㈍㈎㈏㈐㈑㈒㈓㈔㈕㈖㈗㈘㈙㈚㈛⒜⒝⒞⒟⒠⒡⒢⒣⒤⒥⒦⒧⒨⒩⒪⒫⒬⒭⒮⒯⒰⒱⒲⒳⒴⒵⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂¹²³⁴ⁿ₁₂₃₄�\".split(\"\");\nfor(j = 0; j != D[169].length; ++j) if(D[169][j].charCodeAt(0) !== 0xFFFD) { e[D[169][j]] = 43264 + j; d[43264 + j] = D[169][j];}\nD[170] = \"�����������������������������������������������������������������찥찦찪찫찭찯찱찲찳찴찵찶찷찺찿챀챁챂챃챆챇챉챊챋챍챎������챏챐챑챒챓챖챚챛챜챝챞챟챡챢챣챥챧챩챪챫챬챭챮챯챱챲������챳챴챶챷챸챹챺챻챼챽챾챿첀첁첂첃첄첅첆첇첈첉첊첋첌첍첎첏첐첑첒첓ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをん������������\".split(\"\");\nfor(j = 0; j != D[170].length; ++j) if(D[170][j].charCodeAt(0) !== 0xFFFD) { e[D[170][j]] = 43520 + j; d[43520 + j] = D[170][j];}\nD[171] = \"�����������������������������������������������������������������첔첕첖첗첚첛첝첞첟첡첢첣첤첥첦첧첪첮첯첰첱첲첳첶첷첹������첺첻첽첾첿쳀쳁쳂쳃쳆쳈쳊쳋쳌쳍쳎쳏쳑쳒쳓쳕쳖쳗쳘쳙쳚������쳛쳜쳝쳞쳟쳠쳡쳢쳣쳥쳦쳧쳨쳩쳪쳫쳭쳮쳯쳱쳲쳳쳴쳵쳶쳷쳸쳹쳺쳻쳼쳽ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ���������\".split(\"\");\nfor(j = 0; j != D[171].length; ++j) if(D[171][j].charCodeAt(0) !== 0xFFFD) { e[D[171][j]] = 43776 + j; d[43776 + j] = D[171][j];}\nD[172] = \"�����������������������������������������������������������������쳾쳿촀촂촃촄촅촆촇촊촋촍촎촏촑촒촓촔촕촖촗촚촜촞촟촠������촡촢촣촥촦촧촩촪촫촭촮촯촰촱촲촳촴촵촶촷촸촺촻촼촽촾������촿쵀쵁쵂쵃쵄쵅쵆쵇쵈쵉쵊쵋쵌쵍쵎쵏쵐쵑쵒쵓쵔쵕쵖쵗쵘쵙쵚쵛쵝쵞쵟АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ���������������абвгдеёжзийклмнопрстуфхцчшщъыьэюя��������������\".split(\"\");\nfor(j = 0; j != D[172].length; ++j) if(D[172][j].charCodeAt(0) !== 0xFFFD) { e[D[172][j]] = 44032 + j; d[44032 + j] = D[172][j];}\nD[173] = \"�����������������������������������������������������������������쵡쵢쵣쵥쵦쵧쵨쵩쵪쵫쵮쵰쵲쵳쵴쵵쵶쵷쵹쵺쵻쵼쵽쵾쵿춀������춁춂춃춄춅춆춇춉춊춋춌춍춎춏춐춑춒춓춖춗춙춚춛춝춞춟������춠춡춢춣춦춨춪춫춬춭춮춯춱춲춳춴춵춶춷춸춹춺춻춼춽춾춿췀췁췂췃췅�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[173].length; ++j) if(D[173][j].charCodeAt(0) !== 0xFFFD) { e[D[173][j]] = 44288 + j; d[44288 + j] = D[173][j];}\nD[174] = \"�����������������������������������������������������������������췆췇췈췉췊췋췍췎췏췑췒췓췔췕췖췗췘췙췚췛췜췝췞췟췠췡������췢췣췤췥췦췧췩췪췫췭췮췯췱췲췳췴췵췶췷췺췼췾췿츀츁츂������츃츅츆츇츉츊츋츍츎츏츐츑츒츓츕츖츗츘츚츛츜츝츞츟츢츣츥츦츧츩츪츫�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[174].length; ++j) if(D[174][j].charCodeAt(0) !== 0xFFFD) { e[D[174][j]] = 44544 + j; d[44544 + j] = D[174][j];}\nD[175] = \"�����������������������������������������������������������������츬츭츮츯츲츴츶츷츸츹츺츻츼츽츾츿칀칁칂칃칄칅칆칇칈칉������칊칋칌칍칎칏칐칑칒칓칔칕칖칗칚칛칝칞칢칣칤칥칦칧칪칬������칮칯칰칱칲칳칶칷칹칺칻칽칾칿캀캁캂캃캆캈캊캋캌캍캎캏캒캓캕캖캗캙�����������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[175].length; ++j) if(D[175][j].charCodeAt(0) !== 0xFFFD) { e[D[175][j]] = 44800 + j; d[44800 + j] = D[175][j];}\nD[176] = \"�����������������������������������������������������������������캚캛캜캝캞캟캢캦캧캨캩캪캫캮캯캰캱캲캳캴캵캶캷캸캹캺������캻캼캽캾캿컀컂컃컄컅컆컇컈컉컊컋컌컍컎컏컐컑컒컓컔컕������컖컗컘컙컚컛컜컝컞컟컠컡컢컣컦컧컩컪컭컮컯컰컱컲컳컶컺컻컼컽컾컿가각간갇갈갉갊감갑값갓갔강갖갗같갚갛개객갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆�\".split(\"\");\nfor(j = 0; j != D[176].length; ++j) if(D[176][j].charCodeAt(0) !== 0xFFFD) { e[D[176][j]] = 45056 + j; d[45056 + j] = D[176][j];}\nD[177] = \"�����������������������������������������������������������������켂켃켅켆켇켉켊켋켌켍켎켏켒켔켖켗켘켙켚켛켝켞켟켡켢켣������켥켦켧켨켩켪켫켮켲켳켴켵켶켷켹켺켻켼켽켾켿콀콁콂콃콄������콅콆콇콈콉콊콋콌콍콎콏콐콑콒콓콖콗콙콚콛콝콞콟콠콡콢콣콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸�\".split(\"\");\nfor(j = 0; j != D[177].length; ++j) if(D[177][j].charCodeAt(0) !== 0xFFFD) { e[D[177][j]] = 45312 + j; d[45312 + j] = D[177][j];}\nD[178] = \"�����������������������������������������������������������������콭콮콯콲콳콵콶콷콹콺콻콼콽콾콿쾁쾂쾃쾄쾆쾇쾈쾉쾊쾋쾍������쾎쾏쾐쾑쾒쾓쾔쾕쾖쾗쾘쾙쾚쾛쾜쾝쾞쾟쾠쾢쾣쾤쾥쾦쾧쾩������쾪쾫쾬쾭쾮쾯쾱쾲쾳쾴쾵쾶쾷쾸쾹쾺쾻쾼쾽쾾쾿쿀쿁쿂쿃쿅쿆쿇쿈쿉쿊쿋깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙�\".split(\"\");\nfor(j = 0; j != D[178].length; ++j) if(D[178][j].charCodeAt(0) !== 0xFFFD) { e[D[178][j]] = 45568 + j; d[45568 + j] = D[178][j];}\nD[179] = \"�����������������������������������������������������������������쿌쿍쿎쿏쿐쿑쿒쿓쿔쿕쿖쿗쿘쿙쿚쿛쿜쿝쿞쿟쿢쿣쿥쿦쿧쿩������쿪쿫쿬쿭쿮쿯쿲쿴쿶쿷쿸쿹쿺쿻쿽쿾쿿퀁퀂퀃퀅퀆퀇퀈퀉퀊������퀋퀌퀍퀎퀏퀐퀒퀓퀔퀕퀖퀗퀙퀚퀛퀜퀝퀞퀟퀠퀡퀢퀣퀤퀥퀦퀧퀨퀩퀪퀫퀬끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫났낭낮낯낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝�\".split(\"\");\nfor(j = 0; j != D[179].length; ++j) if(D[179][j].charCodeAt(0) !== 0xFFFD) { e[D[179][j]] = 45824 + j; d[45824 + j] = D[179][j];}\nD[180] = \"�����������������������������������������������������������������퀮퀯퀰퀱퀲퀳퀶퀷퀹퀺퀻퀽퀾퀿큀큁큂큃큆큈큊큋큌큍큎큏������큑큒큓큕큖큗큙큚큛큜큝큞큟큡큢큣큤큥큦큧큨큩큪큫큮큯������큱큲큳큵큶큷큸큹큺큻큾큿킀킂킃킄킅킆킇킈킉킊킋킌킍킎킏킐킑킒킓킔뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫달닭닮닯닳담답닷닸당닺닻닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥�\".split(\"\");\nfor(j = 0; j != D[180].length; ++j) if(D[180][j].charCodeAt(0) !== 0xFFFD) { e[D[180][j]] = 46080 + j; d[46080 + j] = D[180][j];}\nD[181] = \"�����������������������������������������������������������������킕킖킗킘킙킚킛킜킝킞킟킠킡킢킣킦킧킩킪킫킭킮킯킰킱킲������킳킶킸킺킻킼킽킾킿탂탃탅탆탇탊탋탌탍탎탏탒탖탗탘탙탚������탛탞탟탡탢탣탥탦탧탨탩탪탫탮탲탳탴탵탶탷탹탺탻탼탽탾탿턀턁턂턃턄덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸�\".split(\"\");\nfor(j = 0; j != D[181].length; ++j) if(D[181][j].charCodeAt(0) !== 0xFFFD) { e[D[181][j]] = 46336 + j; d[46336 + j] = D[181][j];}\nD[182] = \"�����������������������������������������������������������������턅턆턇턈턉턊턋턌턎턏턐턑턒턓턔턕턖턗턘턙턚턛턜턝턞턟������턠턡턢턣턤턥턦턧턨턩턪턫턬턭턮턯턲턳턵턶턷턹턻턼턽턾������턿텂텆텇텈텉텊텋텎텏텑텒텓텕텖텗텘텙텚텛텞텠텢텣텤텥텦텧텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗�\".split(\"\");\nfor(j = 0; j != D[182].length; ++j) if(D[182][j].charCodeAt(0) !== 0xFFFD) { e[D[182][j]] = 46592 + j; d[46592 + j] = D[182][j];}\nD[183] = \"�����������������������������������������������������������������텮텯텰텱텲텳텴텵텶텷텸텹텺텻텽텾텿톀톁톂톃톅톆톇톉톊������톋톌톍톎톏톐톑톒톓톔톕톖톗톘톙톚톛톜톝톞톟톢톣톥톦톧������톩톪톫톬톭톮톯톲톴톶톷톸톹톻톽톾톿퇁퇂퇃퇄퇅퇆퇇퇈퇉퇊퇋퇌퇍퇎퇏래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩�\".split(\"\");\nfor(j = 0; j != D[183].length; ++j) if(D[183][j].charCodeAt(0) !== 0xFFFD) { e[D[183][j]] = 46848 + j; d[46848 + j] = D[183][j];}\nD[184] = \"�����������������������������������������������������������������퇐퇑퇒퇓퇔퇕퇖퇗퇙퇚퇛퇜퇝퇞퇟퇠퇡퇢퇣퇤퇥퇦퇧퇨퇩퇪������퇫퇬퇭퇮퇯퇰퇱퇲퇳퇵퇶퇷퇹퇺퇻퇼퇽퇾퇿툀툁툂툃툄툅툆������툈툊툋툌툍툎툏툑툒툓툔툕툖툗툘툙툚툛툜툝툞툟툠툡툢툣툤툥툦툧툨툩륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많맏말맑맒맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼�\".split(\"\");\nfor(j = 0; j != D[184].length; ++j) if(D[184][j].charCodeAt(0) !== 0xFFFD) { e[D[184][j]] = 47104 + j; d[47104 + j] = D[184][j];}\nD[185] = \"�����������������������������������������������������������������툪툫툮툯툱툲툳툵툶툷툸툹툺툻툾퉀퉂퉃퉄퉅퉆퉇퉉퉊퉋퉌������퉍퉎퉏퉐퉑퉒퉓퉔퉕퉖퉗퉘퉙퉚퉛퉝퉞퉟퉠퉡퉢퉣퉥퉦퉧퉨������퉩퉪퉫퉬퉭퉮퉯퉰퉱퉲퉳퉴퉵퉶퉷퉸퉹퉺퉻퉼퉽퉾퉿튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바박밖밗반받발밝밞밟밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗�\".split(\"\");\nfor(j = 0; j != D[185].length; ++j) if(D[185][j].charCodeAt(0) !== 0xFFFD) { e[D[185][j]] = 47360 + j; d[47360 + j] = D[185][j];}\nD[186] = \"�����������������������������������������������������������������튍튎튏튒튓튔튖튗튘튙튚튛튝튞튟튡튢튣튥튦튧튨튩튪튫튭������튮튯튰튲튳튴튵튶튷튺튻튽튾틁틃틄틅틆틇틊틌틍틎틏틐틑������틒틓틕틖틗틙틚틛틝틞틟틠틡틢틣틦틧틨틩틪틫틬틭틮틯틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤�\".split(\"\");\nfor(j = 0; j != D[186].length; ++j) if(D[186][j].charCodeAt(0) !== 0xFFFD) { e[D[186][j]] = 47616 + j; d[47616 + j] = D[186][j];}\nD[187] = \"�����������������������������������������������������������������틻틼틽틾틿팂팄팆팇팈팉팊팋팏팑팒팓팕팗팘팙팚팛팞팢팣������팤팦팧팪팫팭팮팯팱팲팳팴팵팶팷팺팾팿퍀퍁퍂퍃퍆퍇퍈퍉������퍊퍋퍌퍍퍎퍏퍐퍑퍒퍓퍔퍕퍖퍗퍘퍙퍚퍛퍜퍝퍞퍟퍠퍡퍢퍣퍤퍥퍦퍧퍨퍩빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤�\".split(\"\");\nfor(j = 0; j != D[187].length; ++j) if(D[187][j].charCodeAt(0) !== 0xFFFD) { e[D[187][j]] = 47872 + j; d[47872 + j] = D[187][j];}\nD[188] = \"�����������������������������������������������������������������퍪퍫퍬퍭퍮퍯퍰퍱퍲퍳퍴퍵퍶퍷퍸퍹퍺퍻퍾퍿펁펂펃펅펆펇������펈펉펊펋펎펒펓펔펕펖펗펚펛펝펞펟펡펢펣펤펥펦펧펪펬펮������펯펰펱펲펳펵펶펷펹펺펻펽펾펿폀폁폂폃폆폇폊폋폌폍폎폏폑폒폓폔폕폖샥샨샬샴샵샷샹섀섄섈섐섕서석섞섟선섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭�\".split(\"\");\nfor(j = 0; j != D[188].length; ++j) if(D[188][j].charCodeAt(0) !== 0xFFFD) { e[D[188][j]] = 48128 + j; d[48128 + j] = D[188][j];}\nD[189] = \"�����������������������������������������������������������������폗폙폚폛폜폝폞폟폠폢폤폥폦폧폨폩폪폫폮폯폱폲폳폵폶폷������폸폹폺폻폾퐀퐂퐃퐄퐅퐆퐇퐉퐊퐋퐌퐍퐎퐏퐐퐑퐒퐓퐔퐕퐖������퐗퐘퐙퐚퐛퐜퐞퐟퐠퐡퐢퐣퐤퐥퐦퐧퐨퐩퐪퐫퐬퐭퐮퐯퐰퐱퐲퐳퐴퐵퐶퐷숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰�\".split(\"\");\nfor(j = 0; j != D[189].length; ++j) if(D[189][j].charCodeAt(0) !== 0xFFFD) { e[D[189][j]] = 48384 + j; d[48384 + j] = D[189][j];}\nD[190] = \"�����������������������������������������������������������������퐸퐹퐺퐻퐼퐽퐾퐿푁푂푃푅푆푇푈푉푊푋푌푍푎푏푐푑푒푓������푔푕푖푗푘푙푚푛푝푞푟푡푢푣푥푦푧푨푩푪푫푬푮푰푱푲������푳푴푵푶푷푺푻푽푾풁풃풄풅풆풇풊풌풎풏풐풑풒풓풕풖풗풘풙풚풛풜풝쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄업없엇었엉엊엌엎�\".split(\"\");\nfor(j = 0; j != D[190].length; ++j) if(D[190][j].charCodeAt(0) !== 0xFFFD) { e[D[190][j]] = 48640 + j; d[48640 + j] = D[190][j];}\nD[191] = \"�����������������������������������������������������������������풞풟풠풡풢풣풤풥풦풧풨풪풫풬풭풮풯풰풱풲풳풴풵풶풷풸������풹풺풻풼풽풾풿퓀퓁퓂퓃퓄퓅퓆퓇퓈퓉퓊퓋퓍퓎퓏퓑퓒퓓퓕������퓖퓗퓘퓙퓚퓛퓝퓞퓠퓡퓢퓣퓤퓥퓦퓧퓩퓪퓫퓭퓮퓯퓱퓲퓳퓴퓵퓶퓷퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염엽엾엿였영옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨�\".split(\"\");\nfor(j = 0; j != D[191].length; ++j) if(D[191][j].charCodeAt(0) !== 0xFFFD) { e[D[191][j]] = 48896 + j; d[48896 + j] = D[191][j];}\nD[192] = \"�����������������������������������������������������������������퓾퓿픀픁픂픃픅픆픇픉픊픋픍픎픏픐픑픒픓픖픘픙픚픛픜픝������픞픟픠픡픢픣픤픥픦픧픨픩픪픫픬픭픮픯픰픱픲픳픴픵픶픷������픸픹픺픻픾픿핁핂핃핅핆핇핈핉핊핋핎핐핒핓핔핕핖핗핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응읒읓읔읕읖읗의읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊�\".split(\"\");\nfor(j = 0; j != D[192].length; ++j) if(D[192][j].charCodeAt(0) !== 0xFFFD) { e[D[192][j]] = 49152 + j; d[49152 + j] = D[192][j];}\nD[193] = \"�����������������������������������������������������������������핤핦핧핪핬핮핯핰핱핲핳핶핷핹핺핻핽핾핿햀햁햂햃햆햊햋������햌햍햎햏햑햒햓햔햕햖햗햘햙햚햛햜햝햞햟햠햡햢햣햤햦햧������햨햩햪햫햬햭햮햯햰햱햲햳햴햵햶햷햸햹햺햻햼햽햾햿헀헁헂헃헄헅헆헇점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓�\".split(\"\");\nfor(j = 0; j != D[193].length; ++j) if(D[193][j].charCodeAt(0) !== 0xFFFD) { e[D[193][j]] = 49408 + j; d[49408 + j] = D[193][j];}\nD[194] = \"�����������������������������������������������������������������헊헋헍헎헏헑헓헔헕헖헗헚헜헞헟헠헡헢헣헦헧헩헪헫헭헮������헯헰헱헲헳헶헸헺헻헼헽헾헿혂혃혅혆혇혉혊혋혌혍혎혏혒������혖혗혘혙혚혛혝혞혟혡혢혣혥혦혧혨혩혪혫혬혮혯혰혱혲혳혴혵혶혷혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻�\".split(\"\");\nfor(j = 0; j != D[194].length; ++j) if(D[194][j].charCodeAt(0) !== 0xFFFD) { e[D[194][j]] = 49664 + j; d[49664 + j] = D[194][j];}\nD[195] = \"�����������������������������������������������������������������혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝홞홟홠홡������홢홣홤홥홦홨홪홫홬홭홮홯홲홳홵홶홷홸홹홺홻홼홽홾홿횀������횁횂횄횆횇횈횉횊횋횎횏횑횒횓횕횖횗횘횙횚횛횜횞횠횢횣횤횥횦횧횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층�\".split(\"\");\nfor(j = 0; j != D[195].length; ++j) if(D[195][j].charCodeAt(0) !== 0xFFFD) { e[D[195][j]] = 49920 + j; d[49920 + j] = D[195][j];}\nD[196] = \"�����������������������������������������������������������������횫횭횮횯횱횲횳횴횵횶횷횸횺횼횽횾횿훀훁훂훃훆훇훉훊훋������훍훎훏훐훒훓훕훖훘훚훛훜훝훞훟훡훢훣훥훦훧훩훪훫훬훭������훮훯훱훲훳훴훶훷훸훹훺훻훾훿휁휂휃휅휆휇휈휉휊휋휌휍휎휏휐휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼�\".split(\"\");\nfor(j = 0; j != D[196].length; ++j) if(D[196][j].charCodeAt(0) !== 0xFFFD) { e[D[196][j]] = 50176 + j; d[50176 + j] = D[196][j];}\nD[197] = \"�����������������������������������������������������������������휕휖휗휚휛휝휞휟휡휢휣휤휥휦휧휪휬휮휯휰휱휲휳휶휷휹������휺휻휽휾휿흀흁흂흃흅흆흈흊흋흌흍흎흏흒흓흕흚흛흜흝흞������흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵흶흷흸흹흺흻흾흿힀힂힃힄힅힆힇힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜�\".split(\"\");\nfor(j = 0; j != D[197].length; ++j) if(D[197][j].charCodeAt(0) !== 0xFFFD) { e[D[197][j]] = 50432 + j; d[50432 + j] = D[197][j];}\nD[198] = \"�����������������������������������������������������������������힍힎힏힑힒힓힔힕힖힗힚힜힞힟힠힡힢힣������������������������������������������������������������������������������퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁�\".split(\"\");\nfor(j = 0; j != D[198].length; ++j) if(D[198][j].charCodeAt(0) !== 0xFFFD) { e[D[198][j]] = 50688 + j; d[50688 + j] = D[198][j];}\nD[199] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠�\".split(\"\");\nfor(j = 0; j != D[199].length; ++j) if(D[199][j].charCodeAt(0) !== 0xFFFD) { e[D[199][j]] = 50944 + j; d[50944 + j] = D[199][j];}\nD[200] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝�\".split(\"\");\nfor(j = 0; j != D[200].length; ++j) if(D[200][j].charCodeAt(0) !== 0xFFFD) { e[D[200][j]] = 51200 + j; d[51200 + j] = D[200][j];}\nD[202] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕�\".split(\"\");\nfor(j = 0; j != D[202].length; ++j) if(D[202][j].charCodeAt(0) !== 0xFFFD) { e[D[202][j]] = 51712 + j; d[51712 + j] = D[202][j];}\nD[203] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢�\".split(\"\");\nfor(j = 0; j != D[203].length; ++j) if(D[203][j].charCodeAt(0) !== 0xFFFD) { e[D[203][j]] = 51968 + j; d[51968 + j] = D[203][j];}\nD[204] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械�\".split(\"\");\nfor(j = 0; j != D[204].length; ++j) if(D[204][j].charCodeAt(0) !== 0xFFFD) { e[D[204][j]] = 52224 + j; d[52224 + j] = D[204][j];}\nD[205] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜�\".split(\"\");\nfor(j = 0; j != D[205].length; ++j) if(D[205][j].charCodeAt(0) !== 0xFFFD) { e[D[205][j]] = 52480 + j; d[52480 + j] = D[205][j];}\nD[206] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾�\".split(\"\");\nfor(j = 0; j != D[206].length; ++j) if(D[206][j].charCodeAt(0) !== 0xFFFD) { e[D[206][j]] = 52736 + j; d[52736 + j] = D[206][j];}\nD[207] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴�\".split(\"\");\nfor(j = 0; j != D[207].length; ++j) if(D[207][j].charCodeAt(0) !== 0xFFFD) { e[D[207][j]] = 52992 + j; d[52992 + j] = D[207][j];}\nD[208] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣�\".split(\"\");\nfor(j = 0; j != D[208].length; ++j) if(D[208][j].charCodeAt(0) !== 0xFFFD) { e[D[208][j]] = 53248 + j; d[53248 + j] = D[208][j];}\nD[209] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩羅蘿螺裸邏那樂洛烙珞落諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉�\".split(\"\");\nfor(j = 0; j != D[209].length; ++j) if(D[209][j].charCodeAt(0) !== 0xFFFD) { e[D[209][j]] = 53504 + j; d[53504 + j] = D[209][j];}\nD[210] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������納臘蠟衲囊娘廊朗浪狼郎乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧老蘆虜路露駑魯鷺碌祿綠菉錄鹿論壟弄濃籠聾膿農惱牢磊腦賂雷尿壘屢樓淚漏累縷陋嫩訥杻紐勒肋凜凌稜綾能菱陵尼泥匿溺多茶�\".split(\"\");\nfor(j = 0; j != D[210].length; ++j) if(D[210][j].charCodeAt(0) !== 0xFFFD) { e[D[210][j]] = 53760 + j; d[53760 + j] = D[210][j];}\nD[211] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃�\".split(\"\");\nfor(j = 0; j != D[211].length; ++j) if(D[211][j].charCodeAt(0) !== 0xFFFD) { e[D[211][j]] = 54016 + j; d[54016 + j] = D[211][j];}\nD[212] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅�\".split(\"\");\nfor(j = 0; j != D[212].length; ++j) if(D[212][j].charCodeAt(0) !== 0xFFFD) { e[D[212][j]] = 54272 + j; d[54272 + j] = D[212][j];}\nD[213] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣�\".split(\"\");\nfor(j = 0; j != D[213].length; ++j) if(D[213][j].charCodeAt(0) !== 0xFFFD) { e[D[213][j]] = 54528 + j; d[54528 + j] = D[213][j];}\nD[214] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼�\".split(\"\");\nfor(j = 0; j != D[214].length; ++j) if(D[214][j].charCodeAt(0) !== 0xFFFD) { e[D[214][j]] = 54784 + j; d[54784 + j] = D[214][j];}\nD[215] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬�\".split(\"\");\nfor(j = 0; j != D[215].length; ++j) if(D[215][j].charCodeAt(0) !== 0xFFFD) { e[D[215][j]] = 55040 + j; d[55040 + j] = D[215][j];}\nD[216] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅�\".split(\"\");\nfor(j = 0; j != D[216].length; ++j) if(D[216][j].charCodeAt(0) !== 0xFFFD) { e[D[216][j]] = 55296 + j; d[55296 + j] = D[216][j];}\nD[217] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文�\".split(\"\");\nfor(j = 0; j != D[217].length; ++j) if(D[217][j].charCodeAt(0) !== 0xFFFD) { e[D[217][j]] = 55552 + j; d[55552 + j] = D[217][j];}\nD[218] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑�\".split(\"\");\nfor(j = 0; j != D[218].length; ++j) if(D[218][j].charCodeAt(0) !== 0xFFFD) { e[D[218][j]] = 55808 + j; d[55808 + j] = D[218][j];}\nD[219] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖�\".split(\"\");\nfor(j = 0; j != D[219].length; ++j) if(D[219][j].charCodeAt(0) !== 0xFFFD) { e[D[219][j]] = 56064 + j; d[56064 + j] = D[219][j];}\nD[220] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦�\".split(\"\");\nfor(j = 0; j != D[220].length; ++j) if(D[220][j].charCodeAt(0) !== 0xFFFD) { e[D[220][j]] = 56320 + j; d[56320 + j] = D[220][j];}\nD[221] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥�\".split(\"\");\nfor(j = 0; j != D[221].length; ++j) if(D[221][j].charCodeAt(0) !== 0xFFFD) { e[D[221][j]] = 56576 + j; d[56576 + j] = D[221][j];}\nD[222] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索�\".split(\"\");\nfor(j = 0; j != D[222].length; ++j) if(D[222][j].charCodeAt(0) !== 0xFFFD) { e[D[222][j]] = 56832 + j; d[56832 + j] = D[222][j];}\nD[223] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署�\".split(\"\");\nfor(j = 0; j != D[223].length; ++j) if(D[223][j].charCodeAt(0) !== 0xFFFD) { e[D[223][j]] = 57088 + j; d[57088 + j] = D[223][j];}\nD[224] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬�\".split(\"\");\nfor(j = 0; j != D[224].length; ++j) if(D[224][j].charCodeAt(0) !== 0xFFFD) { e[D[224][j]] = 57344 + j; d[57344 + j] = D[224][j];}\nD[225] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁�\".split(\"\");\nfor(j = 0; j != D[225].length; ++j) if(D[225][j].charCodeAt(0) !== 0xFFFD) { e[D[225][j]] = 57600 + j; d[57600 + j] = D[225][j];}\nD[226] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧�\".split(\"\");\nfor(j = 0; j != D[226].length; ++j) if(D[226][j].charCodeAt(0) !== 0xFFFD) { e[D[226][j]] = 57856 + j; d[57856 + j] = D[226][j];}\nD[227] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁�\".split(\"\");\nfor(j = 0; j != D[227].length; ++j) if(D[227][j].charCodeAt(0) !== 0xFFFD) { e[D[227][j]] = 58112 + j; d[58112 + j] = D[227][j];}\nD[228] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額�\".split(\"\");\nfor(j = 0; j != D[228].length; ++j) if(D[228][j].charCodeAt(0) !== 0xFFFD) { e[D[228][j]] = 58368 + j; d[58368 + j] = D[228][j];}\nD[229] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬�\".split(\"\");\nfor(j = 0; j != D[229].length; ++j) if(D[229][j].charCodeAt(0) !== 0xFFFD) { e[D[229][j]] = 58624 + j; d[58624 + j] = D[229][j];}\nD[230] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒�\".split(\"\");\nfor(j = 0; j != D[230].length; ++j) if(D[230][j].charCodeAt(0) !== 0xFFFD) { e[D[230][j]] = 58880 + j; d[58880 + j] = D[230][j];}\nD[231] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳�\".split(\"\");\nfor(j = 0; j != D[231].length; ++j) if(D[231][j].charCodeAt(0) !== 0xFFFD) { e[D[231][j]] = 59136 + j; d[59136 + j] = D[231][j];}\nD[232] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療�\".split(\"\");\nfor(j = 0; j != D[232].length; ++j) if(D[232][j].charCodeAt(0) !== 0xFFFD) { e[D[232][j]] = 59392 + j; d[59392 + j] = D[232][j];}\nD[233] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓�\".split(\"\");\nfor(j = 0; j != D[233].length; ++j) if(D[233][j].charCodeAt(0) !== 0xFFFD) { e[D[233][j]] = 59648 + j; d[59648 + j] = D[233][j];}\nD[234] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜�\".split(\"\");\nfor(j = 0; j != D[234].length; ++j) if(D[234][j].charCodeAt(0) !== 0xFFFD) { e[D[234][j]] = 59904 + j; d[59904 + j] = D[234][j];}\nD[235] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼�\".split(\"\");\nfor(j = 0; j != D[235].length; ++j) if(D[235][j].charCodeAt(0) !== 0xFFFD) { e[D[235][j]] = 60160 + j; d[60160 + j] = D[235][j];}\nD[236] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄�\".split(\"\");\nfor(j = 0; j != D[236].length; ++j) if(D[236][j].charCodeAt(0) !== 0xFFFD) { e[D[236][j]] = 60416 + j; d[60416 + j] = D[236][j];}\nD[237] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長�\".split(\"\");\nfor(j = 0; j != D[237].length; ++j) if(D[237][j].charCodeAt(0) !== 0xFFFD) { e[D[237][j]] = 60672 + j; d[60672 + j] = D[237][j];}\nD[238] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱�\".split(\"\");\nfor(j = 0; j != D[238].length; ++j) if(D[238][j].charCodeAt(0) !== 0xFFFD) { e[D[238][j]] = 60928 + j; d[60928 + j] = D[238][j];}\nD[239] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖�\".split(\"\");\nfor(j = 0; j != D[239].length; ++j) if(D[239][j].charCodeAt(0) !== 0xFFFD) { e[D[239][j]] = 61184 + j; d[61184 + j] = D[239][j];}\nD[240] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫�\".split(\"\");\nfor(j = 0; j != D[240].length; ++j) if(D[240][j].charCodeAt(0) !== 0xFFFD) { e[D[240][j]] = 61440 + j; d[61440 + j] = D[240][j];}\nD[241] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只�\".split(\"\");\nfor(j = 0; j != D[241].length; ++j) if(D[241][j].charCodeAt(0) !== 0xFFFD) { e[D[241][j]] = 61696 + j; d[61696 + j] = D[241][j];}\nD[242] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯�\".split(\"\");\nfor(j = 0; j != D[242].length; ++j) if(D[242][j].charCodeAt(0) !== 0xFFFD) { e[D[242][j]] = 61952 + j; d[61952 + j] = D[242][j];}\nD[243] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策�\".split(\"\");\nfor(j = 0; j != D[243].length; ++j) if(D[243][j].charCodeAt(0) !== 0xFFFD) { e[D[243][j]] = 62208 + j; d[62208 + j] = D[243][j];}\nD[244] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢�\".split(\"\");\nfor(j = 0; j != D[244].length; ++j) if(D[244][j].charCodeAt(0) !== 0xFFFD) { e[D[244][j]] = 62464 + j; d[62464 + j] = D[244][j];}\nD[245] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃�\".split(\"\");\nfor(j = 0; j != D[245].length; ++j) if(D[245][j].charCodeAt(0) !== 0xFFFD) { e[D[245][j]] = 62720 + j; d[62720 + j] = D[245][j];}\nD[246] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託�\".split(\"\");\nfor(j = 0; j != D[246].length; ++j) if(D[246][j].charCodeAt(0) !== 0xFFFD) { e[D[246][j]] = 62976 + j; d[62976 + j] = D[246][j];}\nD[247] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑�\".split(\"\");\nfor(j = 0; j != D[247].length; ++j) if(D[247][j].charCodeAt(0) !== 0xFFFD) { e[D[247][j]] = 63232 + j; d[63232 + j] = D[247][j];}\nD[248] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃�\".split(\"\");\nfor(j = 0; j != D[248].length; ++j) if(D[248][j].charCodeAt(0) !== 0xFFFD) { e[D[248][j]] = 63488 + j; d[63488 + j] = D[248][j];}\nD[249] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航�\".split(\"\");\nfor(j = 0; j != D[249].length; ++j) if(D[249][j].charCodeAt(0) !== 0xFFFD) { e[D[249][j]] = 63744 + j; d[63744 + j] = D[249][j];}\nD[250] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型�\".split(\"\");\nfor(j = 0; j != D[250].length; ++j) if(D[250][j].charCodeAt(0) !== 0xFFFD) { e[D[250][j]] = 64000 + j; d[64000 + j] = D[250][j];}\nD[251] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵�\".split(\"\");\nfor(j = 0; j != D[251].length; ++j) if(D[251][j].charCodeAt(0) !== 0xFFFD) { e[D[251][j]] = 64256 + j; d[64256 + j] = D[251][j];}\nD[252] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆�\".split(\"\");\nfor(j = 0; j != D[252].length; ++j) if(D[252][j].charCodeAt(0) !== 0xFFFD) { e[D[252][j]] = 64512 + j; d[64512 + j] = D[252][j];}\nD[253] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰�\".split(\"\");\nfor(j = 0; j != D[253].length; ++j) if(D[253][j].charCodeAt(0) !== 0xFFFD) { e[D[253][j]] = 64768 + j; d[64768 + j] = D[253][j];}\nreturn {\"enc\": e, \"dec\": d }; })();\ncptable[950] = (function(){ var d = [], e = {}, D = [], j;\nD[0] = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~��������������������������������������������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[0].length; ++j) if(D[0][j].charCodeAt(0) !== 0xFFFD) { e[D[0][j]] = 0 + j; d[0 + j] = D[0][j];}\nD[161] = \"���������������������������������������������������������������� ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚����������������������������������﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢﹣﹤﹥﹦~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/�\".split(\"\");\nfor(j = 0; j != D[161].length; ++j) if(D[161][j].charCodeAt(0) !== 0xFFFD) { e[D[161][j]] = 41216 + j; d[41216 + j] = D[161][j];}\nD[162] = \"����������������������������������������������������������������\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁▂▃▄▅▆▇█▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭����������������������������������╮╰╯═╞╪╡◢◣◥◤╱╲╳0123456789ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩ〡〢〣〤〥〦〧〨〩十卄卅ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv�\".split(\"\");\nfor(j = 0; j != D[162].length; ++j) if(D[162][j].charCodeAt(0) !== 0xFFFD) { e[D[162][j]] = 41472 + j; d[41472 + j] = D[162][j];}\nD[163] = \"����������������������������������������������������������������wxyzΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψωㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏ����������������������������������ㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦㄧㄨㄩ˙ˉˊˇˋ���������������������������������€������������������������������\".split(\"\");\nfor(j = 0; j != D[163].length; ++j) if(D[163][j].charCodeAt(0) !== 0xFFFD) { e[D[163][j]] = 41728 + j; d[41728 + j] = D[163][j];}\nD[164] = \"����������������������������������������������������������������一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才����������������������������������丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙�\".split(\"\");\nfor(j = 0; j != D[164].length; ++j) if(D[164][j].charCodeAt(0) !== 0xFFFD) { e[D[164][j]] = 41984 + j; d[41984 + j] = D[164][j];}\nD[165] = \"����������������������������������������������������������������世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外����������������������������������央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全�\".split(\"\");\nfor(j = 0; j != D[165].length; ++j) if(D[165][j].charCodeAt(0) !== 0xFFFD) { e[D[165][j]] = 42240 + j; d[42240 + j] = D[165][j];}\nD[166] = \"����������������������������������������������������������������共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年����������������������������������式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣�\".split(\"\");\nfor(j = 0; j != D[166].length; ++j) if(D[166][j].charCodeAt(0) !== 0xFFFD) { e[D[166][j]] = 42496 + j; d[42496 + j] = D[166][j];}\nD[167] = \"����������������������������������������������������������������作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍����������������������������������均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠�\".split(\"\");\nfor(j = 0; j != D[167].length; ++j) if(D[167][j].charCodeAt(0) !== 0xFFFD) { e[D[167][j]] = 42752 + j; d[42752 + j] = D[167][j];}\nD[168] = \"����������������������������������������������������������������杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒����������������������������������芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵�\".split(\"\");\nfor(j = 0; j != D[168].length; ++j) if(D[168][j].charCodeAt(0) !== 0xFFFD) { e[D[168][j]] = 43008 + j; d[43008 + j] = D[168][j];}\nD[169] = \"����������������������������������������������������������������咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居����������������������������������屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊�\".split(\"\");\nfor(j = 0; j != D[169].length; ++j) if(D[169][j].charCodeAt(0) !== 0xFFFD) { e[D[169][j]] = 43264 + j; d[43264 + j] = D[169][j];}\nD[170] = \"����������������������������������������������������������������昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠����������������������������������炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附�\".split(\"\");\nfor(j = 0; j != D[170].length; ++j) if(D[170][j].charCodeAt(0) !== 0xFFFD) { e[D[170][j]] = 43520 + j; d[43520 + j] = D[170][j];}\nD[171] = \"����������������������������������������������������������������陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品����������������������������������哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷�\".split(\"\");\nfor(j = 0; j != D[171].length; ++j) if(D[171][j].charCodeAt(0) !== 0xFFFD) { e[D[171][j]] = 43776 + j; d[43776 + j] = D[171][j];}\nD[172] = \"����������������������������������������������������������������拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗����������������������������������活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄�\".split(\"\");\nfor(j = 0; j != D[172].length; ++j) if(D[172][j].charCodeAt(0) !== 0xFFFD) { e[D[172][j]] = 44032 + j; d[44032 + j] = D[172][j];}\nD[173] = \"����������������������������������������������������������������耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥����������������������������������迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪�\".split(\"\");\nfor(j = 0; j != D[173].length; ++j) if(D[173][j].charCodeAt(0) !== 0xFFFD) { e[D[173][j]] = 44288 + j; d[44288 + j] = D[173][j];}\nD[174] = \"����������������������������������������������������������������哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙����������������������������������恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓�\".split(\"\");\nfor(j = 0; j != D[174].length; ++j) if(D[174][j].charCodeAt(0) !== 0xFFFD) { e[D[174][j]] = 44544 + j; d[44544 + j] = D[174][j];}\nD[175] = \"����������������������������������������������������������������浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷����������������������������������砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃�\".split(\"\");\nfor(j = 0; j != D[175].length; ++j) if(D[175][j].charCodeAt(0) !== 0xFFFD) { e[D[175][j]] = 44800 + j; d[44800 + j] = D[175][j];}\nD[176] = \"����������������������������������������������������������������虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡����������������������������������陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀�\".split(\"\");\nfor(j = 0; j != D[176].length; ++j) if(D[176][j].charCodeAt(0) !== 0xFFFD) { e[D[176][j]] = 45056 + j; d[45056 + j] = D[176][j];}\nD[177] = \"����������������������������������������������������������������娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽����������������������������������情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺�\".split(\"\");\nfor(j = 0; j != D[177].length; ++j) if(D[177][j].charCodeAt(0) !== 0xFFFD) { e[D[177][j]] = 45312 + j; d[45312 + j] = D[177][j];}\nD[178] = \"����������������������������������������������������������������毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶����������������������������������瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼�\".split(\"\");\nfor(j = 0; j != D[178].length; ++j) if(D[178][j].charCodeAt(0) !== 0xFFFD) { e[D[178][j]] = 45568 + j; d[45568 + j] = D[178][j];}\nD[179] = \"����������������������������������������������������������������莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途����������������������������������部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠�\".split(\"\");\nfor(j = 0; j != D[179].length; ++j) if(D[179][j].charCodeAt(0) !== 0xFFFD) { e[D[179][j]] = 45824 + j; d[45824 + j] = D[179][j];}\nD[180] = \"����������������������������������������������������������������婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍����������������������������������插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋�\".split(\"\");\nfor(j = 0; j != D[180].length; ++j) if(D[180][j].charCodeAt(0) !== 0xFFFD) { e[D[180][j]] = 46080 + j; d[46080 + j] = D[180][j];}\nD[181] = \"����������������������������������������������������������������溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘����������������������������������窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁�\".split(\"\");\nfor(j = 0; j != D[181].length; ++j) if(D[181][j].charCodeAt(0) !== 0xFFFD) { e[D[181][j]] = 46336 + j; d[46336 + j] = D[181][j];}\nD[182] = \"����������������������������������������������������������������詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑����������������������������������間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼�\".split(\"\");\nfor(j = 0; j != D[182].length; ++j) if(D[182][j].charCodeAt(0) !== 0xFFFD) { e[D[182][j]] = 46592 + j; d[46592 + j] = D[182][j];}\nD[183] = \"����������������������������������������������������������������媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業����������������������������������楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督�\".split(\"\");\nfor(j = 0; j != D[183].length; ++j) if(D[183][j].charCodeAt(0) !== 0xFFFD) { e[D[183][j]] = 46848 + j; d[46848 + j] = D[183][j];}\nD[184] = \"����������������������������������������������������������������睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫����������������������������������腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊�\".split(\"\");\nfor(j = 0; j != D[184].length; ++j) if(D[184][j].charCodeAt(0) !== 0xFFFD) { e[D[184][j]] = 47104 + j; d[47104 + j] = D[184][j];}\nD[185] = \"����������������������������������������������������������������辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴����������������������������������飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇�\".split(\"\");\nfor(j = 0; j != D[185].length; ++j) if(D[185][j].charCodeAt(0) !== 0xFFFD) { e[D[185][j]] = 47360 + j; d[47360 + j] = D[185][j];}\nD[186] = \"����������������������������������������������������������������愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢����������������������������������滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬�\".split(\"\");\nfor(j = 0; j != D[186].length; ++j) if(D[186][j].charCodeAt(0) !== 0xFFFD) { e[D[186][j]] = 47616 + j; d[47616 + j] = D[186][j];}\nD[187] = \"����������������������������������������������������������������罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤����������������������������������說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜�\".split(\"\");\nfor(j = 0; j != D[187].length; ++j) if(D[187][j].charCodeAt(0) !== 0xFFFD) { e[D[187][j]] = 47872 + j; d[47872 + j] = D[187][j];}\nD[188] = \"����������������������������������������������������������������劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂����������������������������������慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃�\".split(\"\");\nfor(j = 0; j != D[188].length; ++j) if(D[188][j].charCodeAt(0) !== 0xFFFD) { e[D[188][j]] = 48128 + j; d[48128 + j] = D[188][j];}\nD[189] = \"����������������������������������������������������������������瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯����������������������������������翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞�\".split(\"\");\nfor(j = 0; j != D[189].length; ++j) if(D[189][j].charCodeAt(0) !== 0xFFFD) { e[D[189][j]] = 48384 + j; d[48384 + j] = D[189][j];}\nD[190] = \"����������������������������������������������������������������輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉����������������������������������鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡�\".split(\"\");\nfor(j = 0; j != D[190].length; ++j) if(D[190][j].charCodeAt(0) !== 0xFFFD) { e[D[190][j]] = 48640 + j; d[48640 + j] = D[190][j];}\nD[191] = \"����������������������������������������������������������������濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊����������������������������������縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚�\".split(\"\");\nfor(j = 0; j != D[191].length; ++j) if(D[191][j].charCodeAt(0) !== 0xFFFD) { e[D[191][j]] = 48896 + j; d[48896 + j] = D[191][j];}\nD[192] = \"����������������������������������������������������������������錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇����������������������������������嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬�\".split(\"\");\nfor(j = 0; j != D[192].length; ++j) if(D[192][j].charCodeAt(0) !== 0xFFFD) { e[D[192][j]] = 49152 + j; d[49152 + j] = D[192][j];}\nD[193] = \"����������������������������������������������������������������瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪����������������������������������薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁�\".split(\"\");\nfor(j = 0; j != D[193].length; ++j) if(D[193][j].charCodeAt(0) !== 0xFFFD) { e[D[193][j]] = 49408 + j; d[49408 + j] = D[193][j];}\nD[194] = \"����������������������������������������������������������������駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘����������������������������������癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦�\".split(\"\");\nfor(j = 0; j != D[194].length; ++j) if(D[194][j].charCodeAt(0) !== 0xFFFD) { e[D[194][j]] = 49664 + j; d[49664 + j] = D[194][j];}\nD[195] = \"����������������������������������������������������������������鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸����������������������������������獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類�\".split(\"\");\nfor(j = 0; j != D[195].length; ++j) if(D[195][j].charCodeAt(0) !== 0xFFFD) { e[D[195][j]] = 49920 + j; d[49920 + j] = D[195][j];}\nD[196] = \"����������������������������������������������������������������願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼����������������������������������纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴�\".split(\"\");\nfor(j = 0; j != D[196].length; ++j) if(D[196][j].charCodeAt(0) !== 0xFFFD) { e[D[196][j]] = 50176 + j; d[50176 + j] = D[196][j];}\nD[197] = \"����������������������������������������������������������������護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬����������������������������������禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒�\".split(\"\");\nfor(j = 0; j != D[197].length; ++j) if(D[197][j].charCodeAt(0) !== 0xFFFD) { e[D[197][j]] = 50432 + j; d[50432 + j] = D[197][j];}\nD[198] = \"����������������������������������������������������������������讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲���������������������������������������������������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[198].length; ++j) if(D[198][j].charCodeAt(0) !== 0xFFFD) { e[D[198][j]] = 50688 + j; d[50688 + j] = D[198][j];}\nD[201] = \"����������������������������������������������������������������乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕����������������������������������氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋�\".split(\"\");\nfor(j = 0; j != D[201].length; ++j) if(D[201][j].charCodeAt(0) !== 0xFFFD) { e[D[201][j]] = 51456 + j; d[51456 + j] = D[201][j];}\nD[202] = \"����������������������������������������������������������������汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘����������������������������������吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇�\".split(\"\");\nfor(j = 0; j != D[202].length; ++j) if(D[202][j].charCodeAt(0) !== 0xFFFD) { e[D[202][j]] = 51712 + j; d[51712 + j] = D[202][j];}\nD[203] = \"����������������������������������������������������������������杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓����������������������������������芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢�\".split(\"\");\nfor(j = 0; j != D[203].length; ++j) if(D[203][j].charCodeAt(0) !== 0xFFFD) { e[D[203][j]] = 51968 + j; d[51968 + j] = D[203][j];}\nD[204] = \"����������������������������������������������������������������坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋����������������������������������怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲�\".split(\"\");\nfor(j = 0; j != D[204].length; ++j) if(D[204][j].charCodeAt(0) !== 0xFFFD) { e[D[204][j]] = 52224 + j; d[52224 + j] = D[204][j];}\nD[205] = \"����������������������������������������������������������������泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺����������������������������������矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏�\".split(\"\");\nfor(j = 0; j != D[205].length; ++j) if(D[205][j].charCodeAt(0) !== 0xFFFD) { e[D[205][j]] = 52480 + j; d[52480 + j] = D[205][j];}\nD[206] = \"����������������������������������������������������������������哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛����������������������������������峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺�\".split(\"\");\nfor(j = 0; j != D[206].length; ++j) if(D[206][j].charCodeAt(0) !== 0xFFFD) { e[D[206][j]] = 52736 + j; d[52736 + j] = D[206][j];}\nD[207] = \"����������������������������������������������������������������柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂����������������������������������洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀�\".split(\"\");\nfor(j = 0; j != D[207].length; ++j) if(D[207][j].charCodeAt(0) !== 0xFFFD) { e[D[207][j]] = 52992 + j; d[52992 + j] = D[207][j];}\nD[208] = \"����������������������������������������������������������������穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪����������������������������������苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱�\".split(\"\");\nfor(j = 0; j != D[208].length; ++j) if(D[208][j].charCodeAt(0) !== 0xFFFD) { e[D[208][j]] = 53248 + j; d[53248 + j] = D[208][j];}\nD[209] = \"����������������������������������������������������������������唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧����������������������������������恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤�\".split(\"\");\nfor(j = 0; j != D[209].length; ++j) if(D[209][j].charCodeAt(0) !== 0xFFFD) { e[D[209][j]] = 53504 + j; d[53504 + j] = D[209][j];}\nD[210] = \"����������������������������������������������������������������毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸����������������������������������牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐�\".split(\"\");\nfor(j = 0; j != D[210].length; ++j) if(D[210][j].charCodeAt(0) !== 0xFFFD) { e[D[210][j]] = 53760 + j; d[53760 + j] = D[210][j];}\nD[211] = \"����������������������������������������������������������������笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢����������������������������������荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐�\".split(\"\");\nfor(j = 0; j != D[211].length; ++j) if(D[211][j].charCodeAt(0) !== 0xFFFD) { e[D[211][j]] = 54016 + j; d[54016 + j] = D[211][j];}\nD[212] = \"����������������������������������������������������������������酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅����������������������������������唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏�\".split(\"\");\nfor(j = 0; j != D[212].length; ++j) if(D[212][j].charCodeAt(0) !== 0xFFFD) { e[D[212][j]] = 54272 + j; d[54272 + j] = D[212][j];}\nD[213] = \"����������������������������������������������������������������崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟����������������������������������捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉�\".split(\"\");\nfor(j = 0; j != D[213].length; ++j) if(D[213][j].charCodeAt(0) !== 0xFFFD) { e[D[213][j]] = 54528 + j; d[54528 + j] = D[213][j];}\nD[214] = \"����������������������������������������������������������������淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏����������������������������������痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟�\".split(\"\");\nfor(j = 0; j != D[214].length; ++j) if(D[214][j].charCodeAt(0) !== 0xFFFD) { e[D[214][j]] = 54784 + j; d[54784 + j] = D[214][j];}\nD[215] = \"����������������������������������������������������������������耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷����������������������������������蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪�\".split(\"\");\nfor(j = 0; j != D[215].length; ++j) if(D[215][j].charCodeAt(0) !== 0xFFFD) { e[D[215][j]] = 55040 + j; d[55040 + j] = D[215][j];}\nD[216] = \"����������������������������������������������������������������釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷����������������������������������堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔�\".split(\"\");\nfor(j = 0; j != D[216].length; ++j) if(D[216][j].charCodeAt(0) !== 0xFFFD) { e[D[216][j]] = 55296 + j; d[55296 + j] = D[216][j];}\nD[217] = \"����������������������������������������������������������������惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒����������������������������������晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞�\".split(\"\");\nfor(j = 0; j != D[217].length; ++j) if(D[217][j].charCodeAt(0) !== 0xFFFD) { e[D[217][j]] = 55552 + j; d[55552 + j] = D[217][j];}\nD[218] = \"����������������������������������������������������������������湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖����������������������������������琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥�\".split(\"\");\nfor(j = 0; j != D[218].length; ++j) if(D[218][j].charCodeAt(0) !== 0xFFFD) { e[D[218][j]] = 55808 + j; d[55808 + j] = D[218][j];}\nD[219] = \"����������������������������������������������������������������罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳����������������������������������菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺�\".split(\"\");\nfor(j = 0; j != D[219].length; ++j) if(D[219][j].charCodeAt(0) !== 0xFFFD) { e[D[219][j]] = 56064 + j; d[56064 + j] = D[219][j];}\nD[220] = \"����������������������������������������������������������������軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈����������������������������������隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆�\".split(\"\");\nfor(j = 0; j != D[220].length; ++j) if(D[220][j].charCodeAt(0) !== 0xFFFD) { e[D[220][j]] = 56320 + j; d[56320 + j] = D[220][j];}\nD[221] = \"����������������������������������������������������������������媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤����������������������������������搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼�\".split(\"\");\nfor(j = 0; j != D[221].length; ++j) if(D[221][j].charCodeAt(0) !== 0xFFFD) { e[D[221][j]] = 56576 + j; d[56576 + j] = D[221][j];}\nD[222] = \"����������������������������������������������������������������毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓����������������������������������煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓�\".split(\"\");\nfor(j = 0; j != D[222].length; ++j) if(D[222][j].charCodeAt(0) !== 0xFFFD) { e[D[222][j]] = 56832 + j; d[56832 + j] = D[222][j];}\nD[223] = \"����������������������������������������������������������������稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯����������������������������������腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤�\".split(\"\");\nfor(j = 0; j != D[223].length; ++j) if(D[223][j].charCodeAt(0) !== 0xFFFD) { e[D[223][j]] = 57088 + j; d[57088 + j] = D[223][j];}\nD[224] = \"����������������������������������������������������������������觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿����������������������������������遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠�\".split(\"\");\nfor(j = 0; j != D[224].length; ++j) if(D[224][j].charCodeAt(0) !== 0xFFFD) { e[D[224][j]] = 57344 + j; d[57344 + j] = D[224][j];}\nD[225] = \"����������������������������������������������������������������凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠����������������������������������寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉�\".split(\"\");\nfor(j = 0; j != D[225].length; ++j) if(D[225][j].charCodeAt(0) !== 0xFFFD) { e[D[225][j]] = 57600 + j; d[57600 + j] = D[225][j];}\nD[226] = \"����������������������������������������������������������������榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊����������������������������������漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓�\".split(\"\");\nfor(j = 0; j != D[226].length; ++j) if(D[226][j].charCodeAt(0) !== 0xFFFD) { e[D[226][j]] = 57856 + j; d[57856 + j] = D[226][j];}\nD[227] = \"����������������������������������������������������������������禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞����������������������������������耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻�\".split(\"\");\nfor(j = 0; j != D[227].length; ++j) if(D[227][j].charCodeAt(0) !== 0xFFFD) { e[D[227][j]] = 58112 + j; d[58112 + j] = D[227][j];}\nD[228] = \"����������������������������������������������������������������裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍����������������������������������銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘�\".split(\"\");\nfor(j = 0; j != D[228].length; ++j) if(D[228][j].charCodeAt(0) !== 0xFFFD) { e[D[228][j]] = 58368 + j; d[58368 + j] = D[228][j];}\nD[229] = \"����������������������������������������������������������������噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉����������������������������������憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒�\".split(\"\");\nfor(j = 0; j != D[229].length; ++j) if(D[229][j].charCodeAt(0) !== 0xFFFD) { e[D[229][j]] = 58624 + j; d[58624 + j] = D[229][j];}\nD[230] = \"����������������������������������������������������������������澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙����������������������������������獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟�\".split(\"\");\nfor(j = 0; j != D[230].length; ++j) if(D[230][j].charCodeAt(0) !== 0xFFFD) { e[D[230][j]] = 58880 + j; d[58880 + j] = D[230][j];}\nD[231] = \"����������������������������������������������������������������膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢����������������������������������蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧�\".split(\"\");\nfor(j = 0; j != D[231].length; ++j) if(D[231][j].charCodeAt(0) !== 0xFFFD) { e[D[231][j]] = 59136 + j; d[59136 + j] = D[231][j];}\nD[232] = \"����������������������������������������������������������������踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓����������������������������������銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮�\".split(\"\");\nfor(j = 0; j != D[232].length; ++j) if(D[232][j].charCodeAt(0) !== 0xFFFD) { e[D[232][j]] = 59392 + j; d[59392 + j] = D[232][j];}\nD[233] = \"����������������������������������������������������������������噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺����������������������������������憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸�\".split(\"\");\nfor(j = 0; j != D[233].length; ++j) if(D[233][j].charCodeAt(0) !== 0xFFFD) { e[D[233][j]] = 59648 + j; d[59648 + j] = D[233][j];}\nD[234] = \"����������������������������������������������������������������澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙����������������������������������瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘�\".split(\"\");\nfor(j = 0; j != D[234].length; ++j) if(D[234][j].charCodeAt(0) !== 0xFFFD) { e[D[234][j]] = 59904 + j; d[59904 + j] = D[234][j];}\nD[235] = \"����������������������������������������������������������������蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠����������������������������������諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌�\".split(\"\");\nfor(j = 0; j != D[235].length; ++j) if(D[235][j].charCodeAt(0) !== 0xFFFD) { e[D[235][j]] = 60160 + j; d[60160 + j] = D[235][j];}\nD[236] = \"����������������������������������������������������������������錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕����������������������������������魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎�\".split(\"\");\nfor(j = 0; j != D[236].length; ++j) if(D[236][j].charCodeAt(0) !== 0xFFFD) { e[D[236][j]] = 60416 + j; d[60416 + j] = D[236][j];}\nD[237] = \"����������������������������������������������������������������檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶����������������������������������瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞�\".split(\"\");\nfor(j = 0; j != D[237].length; ++j) if(D[237][j].charCodeAt(0) !== 0xFFFD) { e[D[237][j]] = 60672 + j; d[60672 + j] = D[237][j];}\nD[238] = \"����������������������������������������������������������������蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞����������������������������������謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜�\".split(\"\");\nfor(j = 0; j != D[238].length; ++j) if(D[238][j].charCodeAt(0) !== 0xFFFD) { e[D[238][j]] = 60928 + j; d[60928 + j] = D[238][j];}\nD[239] = \"����������������������������������������������������������������鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰����������������������������������鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶�\".split(\"\");\nfor(j = 0; j != D[239].length; ++j) if(D[239][j].charCodeAt(0) !== 0xFFFD) { e[D[239][j]] = 61184 + j; d[61184 + j] = D[239][j];}\nD[240] = \"����������������������������������������������������������������璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒����������������������������������臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧�\".split(\"\");\nfor(j = 0; j != D[240].length; ++j) if(D[240][j].charCodeAt(0) !== 0xFFFD) { e[D[240][j]] = 61440 + j; d[61440 + j] = D[240][j];}\nD[241] = \"����������������������������������������������������������������蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪����������������������������������鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰�\".split(\"\");\nfor(j = 0; j != D[241].length; ++j) if(D[241][j].charCodeAt(0) !== 0xFFFD) { e[D[241][j]] = 61696 + j; d[61696 + j] = D[241][j];}\nD[242] = \"����������������������������������������������������������������徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛����������������������������������礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕�\".split(\"\");\nfor(j = 0; j != D[242].length; ++j) if(D[242][j].charCodeAt(0) !== 0xFFFD) { e[D[242][j]] = 61952 + j; d[61952 + j] = D[242][j];}\nD[243] = \"����������������������������������������������������������������譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦����������������������������������鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲�\".split(\"\");\nfor(j = 0; j != D[243].length; ++j) if(D[243][j].charCodeAt(0) !== 0xFFFD) { e[D[243][j]] = 62208 + j; d[62208 + j] = D[243][j];}\nD[244] = \"����������������������������������������������������������������嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩����������������������������������禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿�\".split(\"\");\nfor(j = 0; j != D[244].length; ++j) if(D[244][j].charCodeAt(0) !== 0xFFFD) { e[D[244][j]] = 62464 + j; d[62464 + j] = D[244][j];}\nD[245] = \"����������������������������������������������������������������鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛����������������������������������鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥�\".split(\"\");\nfor(j = 0; j != D[245].length; ++j) if(D[245][j].charCodeAt(0) !== 0xFFFD) { e[D[245][j]] = 62720 + j; d[62720 + j] = D[245][j];}\nD[246] = \"����������������������������������������������������������������蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺����������������������������������騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚�\".split(\"\");\nfor(j = 0; j != D[246].length; ++j) if(D[246][j].charCodeAt(0) !== 0xFFFD) { e[D[246][j]] = 62976 + j; d[62976 + j] = D[246][j];}\nD[247] = \"����������������������������������������������������������������糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊����������������������������������驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾�\".split(\"\");\nfor(j = 0; j != D[247].length; ++j) if(D[247][j].charCodeAt(0) !== 0xFFFD) { e[D[247][j]] = 63232 + j; d[63232 + j] = D[247][j];}\nD[248] = \"����������������������������������������������������������������讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏����������������������������������齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚�\".split(\"\");\nfor(j = 0; j != D[248].length; ++j) if(D[248][j].charCodeAt(0) !== 0xFFFD) { e[D[248][j]] = 63488 + j; d[63488 + j] = D[248][j];}\nD[249] = \"����������������������������������������������������������������纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊����������������������������������龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓�\".split(\"\");\nfor(j = 0; j != D[249].length; ++j) if(D[249][j].charCodeAt(0) !== 0xFFFD) { e[D[249][j]] = 63744 + j; d[63744 + j] = D[249][j];}\nreturn {\"enc\": e, \"dec\": d }; })();\ncptable[1250] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[1251] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[1252] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[1253] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[1254] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[1255] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹ�ֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת���\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[1256] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œں ،¢£¤¥¦§¨©ھ«¬®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûüے\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[1257] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[1258] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[10000] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[10006] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[10007] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[10008] = (function(){ var d = [], e = {}, D = [], j;\nD[0] = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~���������������������������������������������������������������������������������������\".split(\"\");\nfor(j = 0; j != D[0].length; ++j) if(D[0][j].charCodeAt(0) !== 0xFFFD) { e[D[0][j]] = 0 + j; d[0 + j] = D[0][j];}\nD[161] = \"����������������������������������������������������������������������������������������������������������������������������������������������������������������� 、。・ˉˇ¨〃々―~�…‘’“”〔〕〈〉《》「」『』〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓�\".split(\"\");\nfor(j = 0; j != D[161].length; ++j) if(D[161][j].charCodeAt(0) !== 0xFFFD) { e[D[161][j]] = 41216 + j; d[41216 + j] = D[161][j];}\nD[162] = \"���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇①②③④⑤⑥⑦⑧⑨⑩��㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩��ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ���\".split(\"\");\nfor(j = 0; j != D[162].length; ++j) if(D[162][j].charCodeAt(0) !== 0xFFFD) { e[D[162][j]] = 41472 + j; d[41472 + j] = D[162][j];}\nD[163] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������!"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} ̄�\".split(\"\");\nfor(j = 0; j != D[163].length; ++j) if(D[163][j].charCodeAt(0) !== 0xFFFD) { e[D[163][j]] = 41728 + j; d[41728 + j] = D[163][j];}\nD[164] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをん������������\".split(\"\");\nfor(j = 0; j != D[164].length; ++j) if(D[164][j].charCodeAt(0) !== 0xFFFD) { e[D[164][j]] = 41984 + j; d[41984 + j] = D[164][j];}\nD[165] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ���������\".split(\"\");\nfor(j = 0; j != D[165].length; ++j) if(D[165][j].charCodeAt(0) !== 0xFFFD) { e[D[165][j]] = 42240 + j; d[42240 + j] = D[165][j];}\nD[166] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ��������αβγδεζηθικλμνξοπρστυφχψω���������������������������������������\".split(\"\");\nfor(j = 0; j != D[166].length; ++j) if(D[166][j].charCodeAt(0) !== 0xFFFD) { e[D[166][j]] = 42496 + j; d[42496 + j] = D[166][j];}\nD[167] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ���������������абвгдеёжзийклмнопрстуфхцчшщъыьэюя��������������\".split(\"\");\nfor(j = 0; j != D[167].length; ++j) if(D[167][j].charCodeAt(0) !== 0xFFFD) { e[D[167][j]] = 42752 + j; d[42752 + j] = D[167][j];}\nD[168] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüê����������ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦㄧㄨㄩ����������������������\".split(\"\");\nfor(j = 0; j != D[168].length; ++j) if(D[168][j].charCodeAt(0) !== 0xFFFD) { e[D[168][j]] = 43008 + j; d[43008 + j] = D[168][j];}\nD[169] = \"��������������������������������������������������������������������������������������������������������������������������������������������������������������������─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋����������������\".split(\"\");\nfor(j = 0; j != D[169].length; ++j) if(D[169][j].charCodeAt(0) !== 0xFFFD) { e[D[169][j]] = 43264 + j; d[43264 + j] = D[169][j];}\nD[176] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥�\".split(\"\");\nfor(j = 0; j != D[176].length; ++j) if(D[176][j].charCodeAt(0) !== 0xFFFD) { e[D[176][j]] = 45056 + j; d[45056 + j] = D[176][j];}\nD[177] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳�\".split(\"\");\nfor(j = 0; j != D[177].length; ++j) if(D[177][j].charCodeAt(0) !== 0xFFFD) { e[D[177][j]] = 45312 + j; d[45312 + j] = D[177][j];}\nD[178] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖�\".split(\"\");\nfor(j = 0; j != D[178].length; ++j) if(D[178][j].charCodeAt(0) !== 0xFFFD) { e[D[178][j]] = 45568 + j; d[45568 + j] = D[178][j];}\nD[179] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚�\".split(\"\");\nfor(j = 0; j != D[179].length; ++j) if(D[179][j].charCodeAt(0) !== 0xFFFD) { e[D[179][j]] = 45824 + j; d[45824 + j] = D[179][j];}\nD[180] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮�\".split(\"\");\nfor(j = 0; j != D[180].length; ++j) if(D[180][j].charCodeAt(0) !== 0xFFFD) { e[D[180][j]] = 46080 + j; d[46080 + j] = D[180][j];}\nD[181] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠�\".split(\"\");\nfor(j = 0; j != D[181].length; ++j) if(D[181][j].charCodeAt(0) !== 0xFFFD) { e[D[181][j]] = 46336 + j; d[46336 + j] = D[181][j];}\nD[182] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二�\".split(\"\");\nfor(j = 0; j != D[182].length; ++j) if(D[182][j].charCodeAt(0) !== 0xFFFD) { e[D[182][j]] = 46592 + j; d[46592 + j] = D[182][j];}\nD[183] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服�\".split(\"\");\nfor(j = 0; j != D[183].length; ++j) if(D[183][j].charCodeAt(0) !== 0xFFFD) { e[D[183][j]] = 46848 + j; d[46848 + j] = D[183][j];}\nD[184] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹�\".split(\"\");\nfor(j = 0; j != D[184].length; ++j) if(D[184][j].charCodeAt(0) !== 0xFFFD) { e[D[184][j]] = 47104 + j; d[47104 + j] = D[184][j];}\nD[185] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈�\".split(\"\");\nfor(j = 0; j != D[185].length; ++j) if(D[185][j].charCodeAt(0) !== 0xFFFD) { e[D[185][j]] = 47360 + j; d[47360 + j] = D[185][j];}\nD[186] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖�\".split(\"\");\nfor(j = 0; j != D[186].length; ++j) if(D[186][j].charCodeAt(0) !== 0xFFFD) { e[D[186][j]] = 47616 + j; d[47616 + j] = D[186][j];}\nD[187] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕�\".split(\"\");\nfor(j = 0; j != D[187].length; ++j) if(D[187][j].charCodeAt(0) !== 0xFFFD) { e[D[187][j]] = 47872 + j; d[47872 + j] = D[187][j];}\nD[188] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件�\".split(\"\");\nfor(j = 0; j != D[188].length; ++j) if(D[188][j].charCodeAt(0) !== 0xFFFD) { e[D[188][j]] = 48128 + j; d[48128 + j] = D[188][j];}\nD[189] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸�\".split(\"\");\nfor(j = 0; j != D[189].length; ++j) if(D[189][j].charCodeAt(0) !== 0xFFFD) { e[D[189][j]] = 48384 + j; d[48384 + j] = D[189][j];}\nD[190] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻�\".split(\"\");\nfor(j = 0; j != D[190].length; ++j) if(D[190][j].charCodeAt(0) !== 0xFFFD) { e[D[190][j]] = 48640 + j; d[48640 + j] = D[190][j];}\nD[191] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀�\".split(\"\");\nfor(j = 0; j != D[191].length; ++j) if(D[191][j].charCodeAt(0) !== 0xFFFD) { e[D[191][j]] = 48896 + j; d[48896 + j] = D[191][j];}\nD[192] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐�\".split(\"\");\nfor(j = 0; j != D[192].length; ++j) if(D[192][j].charCodeAt(0) !== 0xFFFD) { e[D[192][j]] = 49152 + j; d[49152 + j] = D[192][j];}\nD[193] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿�\".split(\"\");\nfor(j = 0; j != D[193].length; ++j) if(D[193][j].charCodeAt(0) !== 0xFFFD) { e[D[193][j]] = 49408 + j; d[49408 + j] = D[193][j];}\nD[194] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫�\".split(\"\");\nfor(j = 0; j != D[194].length; ++j) if(D[194][j].charCodeAt(0) !== 0xFFFD) { e[D[194][j]] = 49664 + j; d[49664 + j] = D[194][j];}\nD[195] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸�\".split(\"\");\nfor(j = 0; j != D[195].length; ++j) if(D[195][j].charCodeAt(0) !== 0xFFFD) { e[D[195][j]] = 49920 + j; d[49920 + j] = D[195][j];}\nD[196] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁�\".split(\"\");\nfor(j = 0; j != D[196].length; ++j) if(D[196][j].charCodeAt(0) !== 0xFFFD) { e[D[196][j]] = 50176 + j; d[50176 + j] = D[196][j];}\nD[197] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗�\".split(\"\");\nfor(j = 0; j != D[197].length; ++j) if(D[197][j].charCodeAt(0) !== 0xFFFD) { e[D[197][j]] = 50432 + j; d[50432 + j] = D[197][j];}\nD[198] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐�\".split(\"\");\nfor(j = 0; j != D[198].length; ++j) if(D[198][j].charCodeAt(0) !== 0xFFFD) { e[D[198][j]] = 50688 + j; d[50688 + j] = D[198][j];}\nD[199] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠�\".split(\"\");\nfor(j = 0; j != D[199].length; ++j) if(D[199][j].charCodeAt(0) !== 0xFFFD) { e[D[199][j]] = 50944 + j; d[50944 + j] = D[199][j];}\nD[200] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁�\".split(\"\");\nfor(j = 0; j != D[200].length; ++j) if(D[200][j].charCodeAt(0) !== 0xFFFD) { e[D[200][j]] = 51200 + j; d[51200 + j] = D[200][j];}\nD[201] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳�\".split(\"\");\nfor(j = 0; j != D[201].length; ++j) if(D[201][j].charCodeAt(0) !== 0xFFFD) { e[D[201][j]] = 51456 + j; d[51456 + j] = D[201][j];}\nD[202] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱�\".split(\"\");\nfor(j = 0; j != D[202].length; ++j) if(D[202][j].charCodeAt(0) !== 0xFFFD) { e[D[202][j]] = 51712 + j; d[51712 + j] = D[202][j];}\nD[203] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔�\".split(\"\");\nfor(j = 0; j != D[203].length; ++j) if(D[203][j].charCodeAt(0) !== 0xFFFD) { e[D[203][j]] = 51968 + j; d[51968 + j] = D[203][j];}\nD[204] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃�\".split(\"\");\nfor(j = 0; j != D[204].length; ++j) if(D[204][j].charCodeAt(0) !== 0xFFFD) { e[D[204][j]] = 52224 + j; d[52224 + j] = D[204][j];}\nD[205] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威�\".split(\"\");\nfor(j = 0; j != D[205].length; ++j) if(D[205][j].charCodeAt(0) !== 0xFFFD) { e[D[205][j]] = 52480 + j; d[52480 + j] = D[205][j];}\nD[206] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺�\".split(\"\");\nfor(j = 0; j != D[206].length; ++j) if(D[206][j].charCodeAt(0) !== 0xFFFD) { e[D[206][j]] = 52736 + j; d[52736 + j] = D[206][j];}\nD[207] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓�\".split(\"\");\nfor(j = 0; j != D[207].length; ++j) if(D[207][j].charCodeAt(0) !== 0xFFFD) { e[D[207][j]] = 52992 + j; d[52992 + j] = D[207][j];}\nD[208] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄�\".split(\"\");\nfor(j = 0; j != D[208].length; ++j) if(D[208][j].charCodeAt(0) !== 0xFFFD) { e[D[208][j]] = 53248 + j; d[53248 + j] = D[208][j];}\nD[209] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶�\".split(\"\");\nfor(j = 0; j != D[209].length; ++j) if(D[209][j].charCodeAt(0) !== 0xFFFD) { e[D[209][j]] = 53504 + j; d[53504 + j] = D[209][j];}\nD[210] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐�\".split(\"\");\nfor(j = 0; j != D[210].length; ++j) if(D[210][j].charCodeAt(0) !== 0xFFFD) { e[D[210][j]] = 53760 + j; d[53760 + j] = D[210][j];}\nD[211] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉�\".split(\"\");\nfor(j = 0; j != D[211].length; ++j) if(D[211][j].charCodeAt(0) !== 0xFFFD) { e[D[211][j]] = 54016 + j; d[54016 + j] = D[211][j];}\nD[212] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧�\".split(\"\");\nfor(j = 0; j != D[212].length; ++j) if(D[212][j].charCodeAt(0) !== 0xFFFD) { e[D[212][j]] = 54272 + j; d[54272 + j] = D[212][j];}\nD[213] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政�\".split(\"\");\nfor(j = 0; j != D[213].length; ++j) if(D[213][j].charCodeAt(0) !== 0xFFFD) { e[D[213][j]] = 54528 + j; d[54528 + j] = D[213][j];}\nD[214] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑�\".split(\"\");\nfor(j = 0; j != D[214].length; ++j) if(D[214][j].charCodeAt(0) !== 0xFFFD) { e[D[214][j]] = 54784 + j; d[54784 + j] = D[214][j];}\nD[215] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座������\".split(\"\");\nfor(j = 0; j != D[215].length; ++j) if(D[215][j].charCodeAt(0) !== 0xFFFD) { e[D[215][j]] = 55040 + j; d[55040 + j] = D[215][j];}\nD[216] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝�\".split(\"\");\nfor(j = 0; j != D[216].length; ++j) if(D[216][j].charCodeAt(0) !== 0xFFFD) { e[D[216][j]] = 55296 + j; d[55296 + j] = D[216][j];}\nD[217] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼�\".split(\"\");\nfor(j = 0; j != D[217].length; ++j) if(D[217][j].charCodeAt(0) !== 0xFFFD) { e[D[217][j]] = 55552 + j; d[55552 + j] = D[217][j];}\nD[218] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺�\".split(\"\");\nfor(j = 0; j != D[218].length; ++j) if(D[218][j].charCodeAt(0) !== 0xFFFD) { e[D[218][j]] = 55808 + j; d[55808 + j] = D[218][j];}\nD[219] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝�\".split(\"\");\nfor(j = 0; j != D[219].length; ++j) if(D[219][j].charCodeAt(0) !== 0xFFFD) { e[D[219][j]] = 56064 + j; d[56064 + j] = D[219][j];}\nD[220] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥�\".split(\"\");\nfor(j = 0; j != D[220].length; ++j) if(D[220][j].charCodeAt(0) !== 0xFFFD) { e[D[220][j]] = 56320 + j; d[56320 + j] = D[220][j];}\nD[221] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺�\".split(\"\");\nfor(j = 0; j != D[221].length; ++j) if(D[221][j].charCodeAt(0) !== 0xFFFD) { e[D[221][j]] = 56576 + j; d[56576 + j] = D[221][j];}\nD[222] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖�\".split(\"\");\nfor(j = 0; j != D[222].length; ++j) if(D[222][j].charCodeAt(0) !== 0xFFFD) { e[D[222][j]] = 56832 + j; d[56832 + j] = D[222][j];}\nD[223] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼�\".split(\"\");\nfor(j = 0; j != D[223].length; ++j) if(D[223][j].charCodeAt(0) !== 0xFFFD) { e[D[223][j]] = 57088 + j; d[57088 + j] = D[223][j];}\nD[224] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼�\".split(\"\");\nfor(j = 0; j != D[224].length; ++j) if(D[224][j].charCodeAt(0) !== 0xFFFD) { e[D[224][j]] = 57344 + j; d[57344 + j] = D[224][j];}\nD[225] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺�\".split(\"\");\nfor(j = 0; j != D[225].length; ++j) if(D[225][j].charCodeAt(0) !== 0xFFFD) { e[D[225][j]] = 57600 + j; d[57600 + j] = D[225][j];}\nD[226] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧饨饩饪饫饬饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂�\".split(\"\");\nfor(j = 0; j != D[226].length; ++j) if(D[226][j].charCodeAt(0) !== 0xFFFD) { e[D[226][j]] = 57856 + j; d[57856 + j] = D[226][j];}\nD[227] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾�\".split(\"\");\nfor(j = 0; j != D[227].length; ++j) if(D[227][j].charCodeAt(0) !== 0xFFFD) { e[D[227][j]] = 58112 + j; d[58112 + j] = D[227][j];}\nD[228] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑�\".split(\"\");\nfor(j = 0; j != D[228].length; ++j) if(D[228][j].charCodeAt(0) !== 0xFFFD) { e[D[228][j]] = 58368 + j; d[58368 + j] = D[228][j];}\nD[229] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣�\".split(\"\");\nfor(j = 0; j != D[229].length; ++j) if(D[229][j].charCodeAt(0) !== 0xFFFD) { e[D[229][j]] = 58624 + j; d[58624 + j] = D[229][j];}\nD[230] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩�\".split(\"\");\nfor(j = 0; j != D[230].length; ++j) if(D[230][j].charCodeAt(0) !== 0xFFFD) { e[D[230][j]] = 58880 + j; d[58880 + j] = D[230][j];}\nD[231] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡缢缣缤缥缦缧缪缫缬缭缯缰缱缲缳缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬�\".split(\"\");\nfor(j = 0; j != D[231].length; ++j) if(D[231][j].charCodeAt(0) !== 0xFFFD) { e[D[231][j]] = 59136 + j; d[59136 + j] = D[231][j];}\nD[232] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹�\".split(\"\");\nfor(j = 0; j != D[232].length; ++j) if(D[232][j].charCodeAt(0) !== 0xFFFD) { e[D[232][j]] = 59392 + j; d[59392 + j] = D[232][j];}\nD[233] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋�\".split(\"\");\nfor(j = 0; j != D[233].length; ++j) if(D[233][j].charCodeAt(0) !== 0xFFFD) { e[D[233][j]] = 59648 + j; d[59648 + j] = D[233][j];}\nD[234] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰�\".split(\"\");\nfor(j = 0; j != D[234].length; ++j) if(D[234][j].charCodeAt(0) !== 0xFFFD) { e[D[234][j]] = 59904 + j; d[59904 + j] = D[234][j];}\nD[235] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻�\".split(\"\");\nfor(j = 0; j != D[235].length; ++j) if(D[235][j].charCodeAt(0) !== 0xFFFD) { e[D[235][j]] = 60160 + j; d[60160 + j] = D[235][j];}\nD[236] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐�\".split(\"\");\nfor(j = 0; j != D[236].length; ++j) if(D[236][j].charCodeAt(0) !== 0xFFFD) { e[D[236][j]] = 60416 + j; d[60416 + j] = D[236][j];}\nD[237] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨�\".split(\"\");\nfor(j = 0; j != D[237].length; ++j) if(D[237][j].charCodeAt(0) !== 0xFFFD) { e[D[237][j]] = 60672 + j; d[60672 + j] = D[237][j];}\nD[238] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶钷钸钹钺钼钽钿铄铈铉铊铋铌铍铎铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪�\".split(\"\");\nfor(j = 0; j != D[238].length; ++j) if(D[238][j].charCodeAt(0) !== 0xFFFD) { e[D[238][j]] = 60928 + j; d[60928 + j] = D[238][j];}\nD[239] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒锓锔锕锖锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤镥镦镧镨镩镪镫镬镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔�\".split(\"\");\nfor(j = 0; j != D[239].length; ++j) if(D[239][j].charCodeAt(0) !== 0xFFFD) { e[D[239][j]] = 61184 + j; d[61184 + j] = D[239][j];}\nD[240] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨鸩鸪鸫鸬鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦鹧鹨鹩鹪鹫鹬鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙�\".split(\"\");\nfor(j = 0; j != D[240].length; ++j) if(D[240][j].charCodeAt(0) !== 0xFFFD) { e[D[240][j]] = 61440 + j; d[61440 + j] = D[240][j];}\nD[241] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃�\".split(\"\");\nfor(j = 0; j != D[241].length; ++j) if(D[241][j].charCodeAt(0) !== 0xFFFD) { e[D[241][j]] = 61696 + j; d[61696 + j] = D[241][j];}\nD[242] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒�\".split(\"\");\nfor(j = 0; j != D[242].length; ++j) if(D[242][j].charCodeAt(0) !== 0xFFFD) { e[D[242][j]] = 61952 + j; d[61952 + j] = D[242][j];}\nD[243] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋�\".split(\"\");\nfor(j = 0; j != D[243].length; ++j) if(D[243][j].charCodeAt(0) !== 0xFFFD) { e[D[243][j]] = 62208 + j; d[62208 + j] = D[243][j];}\nD[244] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤�\".split(\"\");\nfor(j = 0; j != D[244].length; ++j) if(D[244][j].charCodeAt(0) !== 0xFFFD) { e[D[244][j]] = 62464 + j; d[62464 + j] = D[244][j];}\nD[245] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜�\".split(\"\");\nfor(j = 0; j != D[245].length; ++j) if(D[245][j].charCodeAt(0) !== 0xFFFD) { e[D[245][j]] = 62720 + j; d[62720 + j] = D[245][j];}\nD[246] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅龆龇龈龉龊龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞鲟鲠鲡鲢鲣鲥鲦鲧鲨鲩鲫鲭鲮鲰鲱鲲鲳鲴鲵鲶鲷鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋�\".split(\"\");\nfor(j = 0; j != D[246].length; ++j) if(D[246][j].charCodeAt(0) !== 0xFFFD) { e[D[246][j]] = 62976 + j; d[62976 + j] = D[246][j];}\nD[247] = \"�����������������������������������������������������������������������������������������������������������������������������������������������������������������鳌鳍鳎鳏鳐鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄�\".split(\"\");\nfor(j = 0; j != D[247].length; ++j) if(D[247][j].charCodeAt(0) !== 0xFFFD) { e[D[247][j]] = 63232 + j; d[63232 + j] = D[247][j];}\nreturn {\"enc\": e, \"dec\": d }; })();\ncptable[10029] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[10079] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[10081] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\ncptable[28591] = (function(){ var d = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {\"enc\": e, \"dec\": D }; })();\n// eslint-disable-next-line no-undef\nif (typeof module !== 'undefined' && module.exports && typeof DO_NOT_EXPORT_CODEPAGE === 'undefined') module.exports = cptable;\n/*! cputils.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/* vim: set ft=javascript: */\n/*jshint newcap: false */\n(function(root, factory) {\n /*jshint ignore:start */\n /*eslint-disable */\n \"use strict\";\n if(typeof cptable === \"undefined\") {\n if(typeof require !== \"undefined\"){\n var cpt = cptable;\n if (typeof module !== 'undefined' && module.exports && typeof DO_NOT_EXPORT_CODEPAGE === 'undefined') module.exports = factory(cpt);\n else root.cptable = factory(cpt);\n } else throw new Error(\"cptable not found\");\n } else cptable = factory(cptable);\n /*eslint-enable */\n /*jshint ignore:end */\n}(this, function(cpt){\n \"use strict\";\n /*global module, Buffer */\n var magic = {\n \"1200\":\"utf16le\",\n \"1201\":\"utf16be\",\n \"12000\":\"utf32le\",\n \"12001\":\"utf32be\",\n \"16969\":\"utf64le\",\n \"20127\":\"ascii\",\n \"65000\":\"utf7\",\n \"65001\":\"utf8\"\n };\n\n var sbcs_cache = [874,1250,1251,1252,1253,1254,1255,1256,10000];\n var dbcs_cache = [932,936,949,950];\n var magic_cache = [65001];\n var magic_decode = {};\n var magic_encode = {};\n var cpdcache = {};\n var cpecache = {};\n\n var sfcc = function sfcc(x) { return String.fromCharCode(x); };\n var cca = function cca(x) { return x.charCodeAt(0); };\n\n var has_buf = (typeof Buffer !== 'undefined');\n var Buffer_from = function(){};\n if(has_buf) {\n var nbfs = !Buffer.from;\n if(!nbfs) try { Buffer.from(\"foo\", \"utf8\"); } catch(e) { nbfs = true; }\n Buffer_from = nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer);\n // $FlowIgnore\n if(!Buffer.allocUnsafe) Buffer.allocUnsafe = function(n) { return new Buffer(n); };\n\n var mdl = 1024, mdb = Buffer.allocUnsafe(mdl);\n var make_EE = function make_EE(E){\n var EE = Buffer.allocUnsafe(65536);\n for(var i = 0; i < 65536;++i) EE[i] = 0;\n var keys = Object.keys(E), len = keys.length;\n for(var ee = 0, e = keys[ee]; ee < len; ++ee) {\n if(!(e = keys[ee])) continue;\n EE[e.charCodeAt(0)] = E[e];\n }\n return EE;\n };\n var sbcs_encode = function make_sbcs_encode(cp) {\n var EE = make_EE(cpt[cp].enc);\n return function sbcs_e(data, ofmt) {\n var len = data.length;\n var out, i=0, j=0, D=0, w=0;\n if(typeof data === 'string') {\n out = Buffer.allocUnsafe(len);\n for(i = 0; i < len; ++i) out[i] = EE[data.charCodeAt(i)];\n } else if(Buffer.isBuffer(data)) {\n out = Buffer.allocUnsafe(2*len);\n j = 0;\n for(i = 0; i < len; ++i) {\n D = data[i];\n if(D < 128) out[j++] = EE[D];\n else if(D < 224) { out[j++] = EE[((D&31)<<6)+(data[i+1]&63)]; ++i; }\n else if(D < 240) { out[j++] = EE[((D&15)<<12)+((data[i+1]&63)<<6)+(data[i+2]&63)]; i+=2; }\n else {\n w = ((D&7)<<18)+((data[i+1]&63)<<12)+((data[i+2]&63)<<6)+(data[i+3]&63); i+=3;\n if(w < 65536) out[j++] = EE[w];\n else { w -= 65536; out[j++] = EE[0xD800 + ((w>>10)&1023)]; out[j++] = EE[0xDC00 + (w&1023)]; }\n }\n }\n out = out.slice(0,j);\n } else {\n out = Buffer.allocUnsafe(len);\n for(i = 0; i < len; ++i) out[i] = EE[data[i].charCodeAt(0)];\n }\n if(!ofmt || ofmt === 'buf') return out;\n if(ofmt !== 'arr') return out.toString('binary');\n return [].slice.call(out);\n };\n };\n var sbcs_decode = function make_sbcs_decode(cp) {\n var D = cpt[cp].dec;\n var DD = Buffer.allocUnsafe(131072), d=0, c=\"\";\n for(d=0;d>8;\n }\n return function sbcs_d(data) {\n var len = data.length, i=0, j=0;\n if(2 * len > mdl) { mdl = 2 * len; mdb = Buffer.allocUnsafe(mdl); }\n if(Buffer.isBuffer(data)) {\n for(i = 0; i < len; i++) {\n j = 2*data[i];\n mdb[2*i] = DD[j]; mdb[2*i+1] = DD[j+1];\n }\n } else if(typeof data === \"string\") {\n for(i = 0; i < len; i++) {\n j = 2*data.charCodeAt(i);\n mdb[2*i] = DD[j]; mdb[2*i+1] = DD[j+1];\n }\n } else {\n for(i = 0; i < len; i++) {\n j = 2*data[i];\n mdb[2*i] = DD[j]; mdb[2*i+1] = DD[j+1];\n }\n }\n return mdb.slice(0, 2 * len).toString('ucs2');\n };\n };\n var dbcs_encode = function make_dbcs_encode(cp) {\n var E = cpt[cp].enc;\n var EE = Buffer.allocUnsafe(131072);\n for(var i = 0; i < 131072; ++i) EE[i] = 0;\n var keys = Object.keys(E);\n for(var ee = 0, e = keys[ee]; ee < keys.length; ++ee) {\n if(!(e = keys[ee])) continue;\n var f = e.charCodeAt(0);\n EE[2*f] = E[e] & 255; EE[2*f+1] = E[e]>>8;\n }\n return function dbcs_e(data, ofmt) {\n var len = data.length, out = Buffer.allocUnsafe(2*len), i=0, j=0, jj=0, k=0, D=0;\n if(typeof data === 'string') {\n for(i = k = 0; i < len; ++i) {\n j = data.charCodeAt(i)*2;\n out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j];\n }\n out = out.slice(0,k);\n } else if(Buffer.isBuffer(data)) {\n for(i = k = 0; i < len; ++i) {\n D = data[i];\n if(D < 128) j = D;\n else if(D < 224) { j = ((D&31)<<6)+(data[i+1]&63); ++i; }\n else if(D < 240) { j = ((D&15)<<12)+((data[i+1]&63)<<6)+(data[i+2]&63); i+=2; }\n else { j = ((D&7)<<18)+((data[i+1]&63)<<12)+((data[i+2]&63)<<6)+(data[i+3]&63); i+=3; }\n if(j<65536) { j*=2; out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j]; }\n else { jj = j-65536;\n j=2*(0xD800 + ((jj>>10)&1023)); out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j];\n j=2*(0xDC00 + (jj&1023)); out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j];\n }\n }\n out = out.slice(0,k);\n } else {\n for(i = k = 0; i < len; i++) {\n j = data[i].charCodeAt(0)*2;\n out[k++] = EE[j+1] || EE[j]; if(EE[j+1] > 0) out[k++] = EE[j];\n }\n }\n if(!ofmt || ofmt === 'buf') return out;\n if(ofmt !== 'arr') return out.toString('binary');\n return [].slice.call(out);\n };\n };\n var dbcs_decode = function make_dbcs_decode(cp) {\n var D = cpt[cp].dec;\n var DD = Buffer.allocUnsafe(131072), d=0, c, w=0, j=0, i=0;\n for(i = 0; i < 65536; ++i) { DD[2*i] = 0xFF; DD[2*i+1] = 0xFD;}\n for(d = 0; d < D.length; ++d) {\n if(!(c=D[d])) continue;\n w = c.charCodeAt(0);\n j = 2*d;\n DD[j] = w&255; DD[j+1] = w>>8;\n }\n return function dbcs_d(data) {\n var len = data.length, out = Buffer.allocUnsafe(2*len), i=0, j=0, k=0;\n if(Buffer.isBuffer(data)) {\n for(i = 0; i < len; i++) {\n j = 2*data[i];\n if(DD[j]===0xFF && DD[j+1]===0xFD) { j=2*((data[i]<<8)+data[i+1]); ++i; }\n out[k++] = DD[j]; out[k++] = DD[j+1];\n }\n } else if(typeof data === \"string\") {\n for(i = 0; i < len; i++) {\n j = 2*data.charCodeAt(i);\n if(DD[j]===0xFF && DD[j+1]===0xFD) { j=2*((data.charCodeAt(i)<<8)+data.charCodeAt(i+1)); ++i; }\n out[k++] = DD[j]; out[k++] = DD[j+1];\n }\n } else {\n for(i = 0; i < len; i++) {\n j = 2*data[i];\n if(DD[j]===0xFF && DD[j+1]===0xFD) { j=2*((data[i]<<8)+data[i+1]); ++i; }\n out[k++] = DD[j]; out[k++] = DD[j+1];\n }\n }\n return out.slice(0,k).toString('ucs2');\n };\n };\n magic_decode[65001] = function utf8_d(data) {\n if(typeof data === \"string\") return utf8_d(data.split(\"\").map(cca));\n var len = data.length, w = 0, ww = 0;\n if(4 * len > mdl) { mdl = 4 * len; mdb = Buffer.allocUnsafe(mdl); }\n var i = 0;\n if(len >= 3 && data[0] == 0xEF) if(data[1] == 0xBB && data[2] == 0xBF) i = 3;\n for(var j = 1, k = 0, D = 0; i < len; i+=j) {\n j = 1; D = data[i];\n if(D < 128) w = D;\n else if(D < 224) { w=(D&31)*64+(data[i+1]&63); j=2; }\n else if(D < 240) { w=((D&15)<<12)+(data[i+1]&63)*64+(data[i+2]&63); j=3; }\n else { w=(D&7)*262144+((data[i+1]&63)<<12)+(data[i+2]&63)*64+(data[i+3]&63); j=4; }\n if(w < 65536) { mdb[k++] = w&255; mdb[k++] = w>>8; }\n else {\n w -= 65536; ww = 0xD800 + ((w>>10)&1023); w = 0xDC00 + (w&1023);\n mdb[k++] = ww&255; mdb[k++] = ww>>>8; mdb[k++] = w&255; mdb[k++] = (w>>>8)&255;\n }\n }\n return mdb.slice(0,k).toString('ucs2');\n };\n magic_encode[65001] = function utf8_e(data, ofmt) {\n if(has_buf && Buffer.isBuffer(data)) {\n if(!ofmt || ofmt === 'buf') return data;\n if(ofmt !== 'arr') return data.toString('binary');\n return [].slice.call(data);\n }\n var len = data.length, w = 0, ww = 0, j = 0;\n var direct = typeof data === \"string\";\n if(4 * len > mdl) { mdl = 4 * len; mdb = Buffer.allocUnsafe(mdl); }\n for(var i = 0; i < len; ++i) {\n w = direct ? data.charCodeAt(i) : data[i].charCodeAt(0);\n if(w <= 0x007F) mdb[j++] = w;\n else if(w <= 0x07FF) {\n mdb[j++] = 192 + (w >> 6);\n mdb[j++] = 128 + (w&63);\n } else if(w >= 0xD800 && w <= 0xDFFF) {\n w -= 0xD800; ++i;\n ww = (direct ? data.charCodeAt(i) : data[i].charCodeAt(0)) - 0xDC00 + (w << 10);\n mdb[j++] = 240 + ((ww>>>18) & 0x07);\n mdb[j++] = 144 + ((ww>>>12) & 0x3F);\n mdb[j++] = 128 + ((ww>>>6) & 0x3F);\n mdb[j++] = 128 + (ww & 0x3F);\n } else {\n mdb[j++] = 224 + (w >> 12);\n mdb[j++] = 128 + ((w >> 6)&63);\n mdb[j++] = 128 + (w&63);\n }\n }\n if(!ofmt || ofmt === 'buf') return mdb.slice(0,j);\n if(ofmt !== 'arr') return mdb.slice(0,j).toString('binary');\n return [].slice.call(mdb, 0, j);\n };\n }\n\n var encache = function encache() {\n if(has_buf) {\n if(cpdcache[sbcs_cache[0]]) return;\n var i=0, s=0;\n for(i = 0; i < sbcs_cache.length; ++i) {\n s = sbcs_cache[i];\n if(cpt[s]) {\n cpdcache[s] = sbcs_decode(s);\n cpecache[s] = sbcs_encode(s);\n }\n }\n for(i = 0; i < dbcs_cache.length; ++i) {\n s = dbcs_cache[i];\n if(cpt[s]) {\n cpdcache[s] = dbcs_decode(s);\n cpecache[s] = dbcs_encode(s);\n }\n }\n for(i = 0; i < magic_cache.length; ++i) {\n s = magic_cache[i];\n if(magic_decode[s]) cpdcache[s] = magic_decode[s];\n if(magic_encode[s]) cpecache[s] = magic_encode[s];\n }\n }\n };\n var null_enc = function(data, ofmt) { void ofmt; return \"\"; };\n var cp_decache = function cp_decache(cp) { delete cpdcache[cp]; delete cpecache[cp]; };\n var decache = function decache() {\n if(has_buf) {\n if(!cpdcache[sbcs_cache[0]]) return;\n sbcs_cache.forEach(cp_decache);\n dbcs_cache.forEach(cp_decache);\n magic_cache.forEach(cp_decache);\n }\n last_enc = null_enc; last_cp = 0;\n };\n var cache = {\n encache: encache,\n decache: decache,\n sbcs: sbcs_cache,\n dbcs: dbcs_cache\n };\n\n encache();\n\n var BM = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var SetD = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'(),-./:?\";\n var last_enc = null_enc, last_cp = 0;\n var encode = function encode(cp, data, ofmt) {\n if(cp === last_cp && last_enc) { return last_enc(data, ofmt); }\n if(cpecache[cp]) { last_enc = cpecache[last_cp=cp]; return last_enc(data, ofmt); }\n if(has_buf && Buffer.isBuffer(data)) data = data.toString('utf8');\n var len = data.length;\n var out = has_buf ? Buffer.allocUnsafe(4*len) : [], w=0, i=0, j = 0, ww=0;\n var C = cpt[cp], E, M = \"\";\n var isstr = typeof data === 'string';\n if(C && (E=C.enc)) for(i = 0; i < len; ++i, ++j) {\n w = E[isstr? data.charAt(i) : data[i]];\n if(w > 255) {\n out[j] = w>>8;\n out[++j] = w&255;\n } else out[j] = w&255;\n }\n else if((M=magic[cp])) switch(M) {\n case \"utf8\":\n if(has_buf && isstr) { out = Buffer_from(data, M); j = out.length; break; }\n for(i = 0; i < len; ++i, ++j) {\n w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);\n if(w <= 0x007F) out[j] = w;\n else if(w <= 0x07FF) {\n out[j] = 192 + (w >> 6);\n out[++j] = 128 + (w&63);\n } else if(w >= 0xD800 && w <= 0xDFFF) {\n w -= 0xD800;\n ww = (isstr ? data.charCodeAt(++i) : data[++i].charCodeAt(0)) - 0xDC00 + (w << 10);\n out[j] = 240 + ((ww>>>18) & 0x07);\n out[++j] = 144 + ((ww>>>12) & 0x3F);\n out[++j] = 128 + ((ww>>>6) & 0x3F);\n out[++j] = 128 + (ww & 0x3F);\n } else {\n out[j] = 224 + (w >> 12);\n out[++j] = 128 + ((w >> 6)&63);\n out[++j] = 128 + (w&63);\n }\n }\n break;\n case \"ascii\":\n if(has_buf && typeof data === \"string\") { out = Buffer_from(data, M); j = out.length; break; }\n for(i = 0; i < len; ++i, ++j) {\n w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);\n if(w <= 0x007F) out[j] = w;\n else throw new Error(\"bad ascii \" + w);\n }\n break;\n case \"utf16le\":\n if(has_buf && typeof data === \"string\") { out = Buffer_from(data, M); j = out.length; break; }\n for(i = 0; i < len; ++i) {\n w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);\n out[j++] = w&255;\n out[j++] = w>>8;\n }\n break;\n case \"utf16be\":\n for(i = 0; i < len; ++i) {\n w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);\n out[j++] = w>>8;\n out[j++] = w&255;\n }\n break;\n case \"utf32le\":\n for(i = 0; i < len; ++i) {\n w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);\n if(w >= 0xD800 && w <= 0xDFFF) w = 0x10000 + ((w - 0xD800) << 10) + (data[++i].charCodeAt(0) - 0xDC00);\n out[j++] = w&255; w >>= 8;\n out[j++] = w&255; w >>= 8;\n out[j++] = w&255; w >>= 8;\n out[j++] = w&255;\n }\n break;\n case \"utf32be\":\n for(i = 0; i < len; ++i) {\n w = isstr ? data.charCodeAt(i) : data[i].charCodeAt(0);\n if(w >= 0xD800 && w <= 0xDFFF) w = 0x10000 + ((w - 0xD800) << 10) + (data[++i].charCodeAt(0) - 0xDC00);\n out[j+3] = w&255; w >>= 8;\n out[j+2] = w&255; w >>= 8;\n out[j+1] = w&255; w >>= 8;\n out[j] = w&255;\n j+=4;\n }\n break;\n case \"utf7\":\n for(i = 0; i < len; i++) {\n var c = isstr ? data.charAt(i) : data[i].charAt(0);\n if(c === \"+\") { out[j++] = 0x2b; out[j++] = 0x2d; continue; }\n if(SetD.indexOf(c) > -1) { out[j++] = c.charCodeAt(0); continue; }\n var tt = encode(1201, c);\n out[j++] = 0x2b;\n out[j++] = BM.charCodeAt(tt[0]>>2);\n out[j++] = BM.charCodeAt(((tt[0]&0x03)<<4) + ((tt[1]||0)>>4));\n out[j++] = BM.charCodeAt(((tt[1]&0x0F)<<2) + ((tt[2]||0)>>6));\n out[j++] = 0x2d;\n }\n break;\n default: throw new Error(\"Unsupported magic: \" + cp + \" \" + magic[cp]);\n }\n else throw new Error(\"Unrecognized CP: \" + cp);\n out = out.slice(0,j);\n if(!has_buf) return (ofmt == 'str') ? (out).map(sfcc).join(\"\") : out;\n if(!ofmt || ofmt === 'buf') return out;\n if(ofmt !== 'arr') return out.toString('binary');\n return [].slice.call(out);\n };\n var decode = function decode(cp, data) {\n var F; if((F=cpdcache[cp])) return F(data);\n if(typeof data === \"string\") return decode(cp, data.split(\"\").map(cca));\n var len = data.length, out = new Array(len), s=\"\", w=0, i=0, j=1, k=0, ww=0;\n var C = cpt[cp], D, M=\"\";\n if(C && (D=C.dec)) {\n for(i = 0; i < len; i+=j) {\n j = 2;\n s = D[(data[i]<<8)+ data[i+1]];\n if(!s) {\n j = 1;\n s = D[data[i]];\n }\n if(!s) throw new Error('Unrecognized code: ' + data[i] + ' ' + data[i+j-1] + ' ' + i + ' ' + j + ' ' + D[data[i]]);\n out[k++] = s;\n }\n }\n else if((M=magic[cp])) switch(M) {\n case \"utf8\":\n if(len >= 3 && data[0] == 0xEF) if(data[1] == 0xBB && data[2] == 0xBF) i = 3;\n for(; i < len; i+=j) {\n j = 1;\n if(data[i] < 128) w = data[i];\n else if(data[i] < 224) { w=(data[i]&31)*64+(data[i+1]&63); j=2; }\n else if(data[i] < 240) { w=((data[i]&15)<<12)+(data[i+1]&63)*64+(data[i+2]&63); j=3; }\n else { w=(data[i]&7)*262144+((data[i+1]&63)<<12)+(data[i+2]&63)*64+(data[i+3]&63); j=4; }\n if(w < 65536) { out[k++] = String.fromCharCode(w); }\n else {\n w -= 65536; ww = 0xD800 + ((w>>10)&1023); w = 0xDC00 + (w&1023);\n out[k++] = String.fromCharCode(ww); out[k++] = String.fromCharCode(w);\n }\n }\n break;\n case \"ascii\":\n if(has_buf && Buffer.isBuffer(data)) return data.toString(M);\n for(i = 0; i < len; i++) out[i] = String.fromCharCode(data[i]);\n k = len; break;\n case \"utf16le\":\n if(len >= 2 && data[0] == 0xFF) if(data[1] == 0xFE) i = 2;\n if(has_buf && Buffer.isBuffer(data)) return data.toString(M);\n j = 2;\n for(; i+1 < len; i+=j) {\n out[k++] = String.fromCharCode((data[i+1]<<8) + data[i]);\n }\n break;\n case \"utf16be\":\n if(len >= 2 && data[0] == 0xFE) if(data[1] == 0xFF) i = 2;\n j = 2;\n for(; i+1 < len; i+=j) {\n out[k++] = String.fromCharCode((data[i]<<8) + data[i+1]);\n }\n break;\n case \"utf32le\":\n if(len >= 4 && data[0] == 0xFF) if(data[1] == 0xFE && data[2] === 0 && data[3] === 0) i = 4;\n j = 4;\n for(; i < len; i+=j) {\n w = (data[i+3]<<24) + (data[i+2]<<16) + (data[i+1]<<8) + (data[i]);\n if(w > 0xFFFF) {\n w -= 0x10000;\n out[k++] = String.fromCharCode(0xD800 + ((w >> 10) & 0x3FF));\n out[k++] = String.fromCharCode(0xDC00 + (w & 0x3FF));\n }\n else out[k++] = String.fromCharCode(w);\n }\n break;\n case \"utf32be\":\n if(len >= 4 && data[3] == 0xFF) if(data[2] == 0xFE && data[1] === 0 && data[0] === 0) i = 4;\n j = 4;\n for(; i < len; i+=j) {\n w = (data[i]<<24) + (data[i+1]<<16) + (data[i+2]<<8) + (data[i+3]);\n if(w > 0xFFFF) {\n w -= 0x10000;\n out[k++] = String.fromCharCode(0xD800 + ((w >> 10) & 0x3FF));\n out[k++] = String.fromCharCode(0xDC00 + (w & 0x3FF));\n }\n else out[k++] = String.fromCharCode(w);\n }\n break;\n case \"utf7\":\n if(len >= 4 && data[0] == 0x2B && data[1] == 0x2F && data[2] == 0x76) {\n if(len >= 5 && data[3] == 0x38 && data[4] == 0x2D) i = 5;\n else if(data[3] == 0x38 || data[3] == 0x39 || data[3] == 0x2B || data[3] == 0x2F) i = 4;\n }\n for(; i < len; i+=j) {\n if(data[i] !== 0x2b) { j=1; out[k++] = String.fromCharCode(data[i]); continue; }\n j=1;\n if(data[i+1] === 0x2d) { j = 2; out[k++] = \"+\"; continue; }\n // eslint-disable-next-line no-useless-escape\n while(String.fromCharCode(data[i+j]).match(/[A-Za-z0-9+\\/]/)) j++;\n var dash = 0;\n if(data[i+j] === 0x2d) { ++j; dash=1; }\n var tt = [];\n var o64 = \"\";\n var c1=0, c2=0, c3=0;\n var e1=0, e2=0, e3=0, e4=0;\n for(var l = 1; l < j - dash;) {\n e1 = BM.indexOf(String.fromCharCode(data[i+l++]));\n e2 = BM.indexOf(String.fromCharCode(data[i+l++]));\n c1 = e1 << 2 | e2 >> 4;\n tt.push(c1);\n e3 = BM.indexOf(String.fromCharCode(data[i+l++]));\n if(e3 === -1) break;\n c2 = (e2 & 15) << 4 | e3 >> 2;\n tt.push(c2);\n e4 = BM.indexOf(String.fromCharCode(data[i+l++]));\n if(e4 === -1) break;\n c3 = (e3 & 3) << 6 | e4;\n if(e4 < 64) tt.push(c3);\n }\n o64 = decode(1201, tt);\n for(l = 0; l < o64.length; ++l) out[k++] = o64.charAt(l);\n }\n break;\n default: throw new Error(\"Unsupported magic: \" + cp + \" \" + magic[cp]);\n }\n else throw new Error(\"Unrecognized CP: \" + cp);\n return out.slice(0,k).join(\"\");\n };\n var hascp = function hascp(cp) { return !!(cpt[cp] || magic[cp]); };\n cpt.utils = { decode: decode, encode: encode, hascp: hascp, magic: magic, cache:cache };\n return cpt;\n}));\n","/*\n\nJSZip - A Javascript class for generating and reading zip files\n\n\n(c) 2009-2014 Stuart Knightley \nDual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.\n\nJSZip uses the library pako released under the MIT license :\nhttps://github.com/nodeca/pako/blob/master/LICENSE\n\nNote: since JSZip 3 removed critical functionality, this version assigns to the\n`JSZipSync` variable. Another JSZip version can be loaded in parallel.\n*/\n(function(e){\n\tif(\"object\"==typeof exports&&\"undefined\"!=typeof module&&\"undefined\"==typeof DO_NOT_EXPORT_JSZIP)module.exports=e();\n\telse if(\"function\"==typeof define&&define.amd&&\"undefined\"==typeof DO_NOT_EXPORT_JSZIP){JSZipSync=e();define('j',[],e);}\n\telse{\n\t\tvar f;\n\t\t\"undefined\"!=typeof globalThis?f=globalThis:\n\t\t\"undefined\"!=typeof window?f=window:\n\t\t\"undefined\"!=typeof global?f=global:\n\t\t\"undefined\"!=typeof $ && $.global?f=$.global:\n\t\t\"undefined\"!=typeof self&&(f=self),f.JSZipSync=e()\n\t}\n}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error(\"Cannot find module '\"+o+\"'\")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n }\n else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n\n }\n\n return output;\n};\n\n// public method for decoding\nexports.decode = function(input, utf8) {\n var output = \"\";\n var chr1, chr2, chr3;\n var enc1, enc2, enc3, enc4;\n var i = 0;\n\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n while (i < input.length) {\n\n enc1 = _keyStr.indexOf(input.charAt(i++));\n enc2 = _keyStr.indexOf(input.charAt(i++));\n enc3 = _keyStr.indexOf(input.charAt(i++));\n enc4 = _keyStr.indexOf(input.charAt(i++));\n\n chr1 = (enc1 << 2) | (enc2 >> 4);\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n chr3 = ((enc3 & 3) << 6) | enc4;\n\n output = output + String.fromCharCode(chr1);\n\n if (enc3 != 64) {\n output = output + String.fromCharCode(chr2);\n }\n if (enc4 != 64) {\n output = output + String.fromCharCode(chr3);\n }\n\n }\n\n return output;\n\n};\n\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nfunction CompressedObject() {\n this.compressedSize = 0;\n this.uncompressedSize = 0;\n this.crc32 = 0;\n this.compressionMethod = null;\n this.compressedContent = null;\n}\n\nCompressedObject.prototype = {\n /**\n * Return the decompressed content in an unspecified format.\n * The format will depend on the decompressor.\n * @return {Object} the decompressed content.\n */\n getContent: function() {\n return null; // see implementation\n },\n /**\n * Return the compressed content in an unspecified format.\n * The format will depend on the compressed conten source.\n * @return {Object} the compressed content.\n */\n getCompressedContent: function() {\n return null; // see implementation\n }\n};\nmodule.exports = CompressedObject;\n\n},{}],3:[function(_dereq_,module,exports){\n'use strict';\nexports.STORE = {\n magic: \"\\x00\\x00\",\n compress: function(content) {\n return content; // no compression\n },\n uncompress: function(content) {\n return content; // no compression\n },\n compressInputType: null,\n uncompressInputType: null\n};\nexports.DEFLATE = _dereq_('./flate');\n\n},{\"./flate\":8}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar utils = _dereq_('./utils');\n\nvar table = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D\n];\n\n/**\n *\n * Javascript crc32\n * http://www.webtoolkit.info/\n *\n */\nmodule.exports = function crc32(input, crc) {\n if (typeof input === \"undefined\" || !input.length) {\n return 0;\n }\n\n var isArray = utils.getTypeOf(input) !== \"string\";\n\n if (typeof(crc) == \"undefined\") {\n crc = 0;\n }\n var x = 0;\n var y = 0;\n var b = 0;\n\n crc = crc ^ (-1);\n for (var i = 0, iTop = input.length; i < iTop; i++) {\n b = isArray ? input[i] : input.charCodeAt(i);\n y = (crc ^ b) & 0xFF;\n x = table[y];\n crc = (crc >>> 8) ^ x;\n }\n\n return crc ^ (-1);\n};\n// vim: set shiftwidth=4 softtabstop=4:\n\n},{\"./utils\":21}],5:[function(_dereq_,module,exports){\n'use strict';\nvar utils = _dereq_('./utils');\n\nfunction DataReader(data) {\n this.data = null; // type : see implementation\n this.length = 0;\n this.index = 0;\n}\nDataReader.prototype = {\n /**\n * Check that the offset will not go too far.\n * @param {string} offset the additional offset to check.\n * @throws {Error} an Error if the offset is out of bounds.\n */\n checkOffset: function(offset) {\n this.checkIndex(this.index + offset);\n },\n /**\n * Check that the specifed index will not be too far.\n * @param {string} newIndex the index to check.\n * @throws {Error} an Error if the index is out of bounds.\n */\n checkIndex: function(newIndex) {\n if (this.length < newIndex || newIndex < 0) {\n throw new Error(\"End of data reached (data length = \" + this.length + \", asked index = \" + (newIndex) + \"). Corrupted zip ?\");\n }\n },\n /**\n * Change the index.\n * @param {number} newIndex The new index.\n * @throws {Error} if the new index is out of the data.\n */\n setIndex: function(newIndex) {\n this.checkIndex(newIndex);\n this.index = newIndex;\n },\n /**\n * Skip the next n bytes.\n * @param {number} n the number of bytes to skip.\n * @throws {Error} if the new index is out of the data.\n */\n skip: function(n) {\n this.setIndex(this.index + n);\n },\n /**\n * Get the byte at the specified index.\n * @param {number} i the index to use.\n * @return {number} a byte.\n */\n byteAt: function(i) {\n // see implementations\n },\n /**\n * Get the next number with a given byte size.\n * @param {number} size the number of bytes to read.\n * @return {number} the corresponding number.\n */\n readInt: function(size) {\n var result = 0,\n i;\n this.checkOffset(size);\n for (i = this.index + size - 1; i >= this.index; i--) {\n result = (result << 8) + this.byteAt(i);\n }\n this.index += size;\n return result;\n },\n /**\n * Get the next string with a given byte size.\n * @param {number} size the number of bytes to read.\n * @return {string} the corresponding string.\n */\n readString: function(size) {\n return utils.transformTo(\"string\", this.readData(size));\n },\n /**\n * Get raw data without conversion, bytes.\n * @param {number} size the number of bytes to read.\n * @return {Object} the raw data, implementation specific.\n */\n readData: function(size) {\n // see implementations\n },\n /**\n * Find the last occurrence of a zip signature (4 bytes).\n * @param {string} sig the signature to find.\n * @return {number} the index of the last occurrence, -1 if not found.\n */\n lastIndexOfSignature: function(sig) {\n // see implementations\n },\n /**\n * Get the next date.\n * @return {Date} the date.\n */\n readDate: function() {\n var dostime = this.readInt(4);\n return new Date(\n ((dostime >> 25) & 0x7f) + 1980, // year\n ((dostime >> 21) & 0x0f) - 1, // month\n (dostime >> 16) & 0x1f, // day\n (dostime >> 11) & 0x1f, // hour\n (dostime >> 5) & 0x3f, // minute\n (dostime & 0x1f) << 1); // second\n }\n};\nmodule.exports = DataReader;\n\n},{\"./utils\":21}],6:[function(_dereq_,module,exports){\n'use strict';\nexports.base64 = false;\nexports.binary = false;\nexports.dir = false;\nexports.createFolders = false;\nexports.date = null;\nexports.compression = null;\nexports.comment = null;\n\n},{}],7:[function(_dereq_,module,exports){\n'use strict';\nvar utils = _dereq_('./utils');\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.string2binary = function(str) {\n return utils.string2binary(str);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.string2Uint8Array = function(str) {\n return utils.transformTo(\"uint8array\", str);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.uint8Array2String = function(array) {\n return utils.transformTo(\"string\", array);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.string2Blob = function(str) {\n var buffer = utils.transformTo(\"arraybuffer\", str);\n return utils.arrayBuffer2Blob(buffer);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.arrayBuffer2Blob = function(buffer) {\n return utils.arrayBuffer2Blob(buffer);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.transformTo = function(outputType, input) {\n return utils.transformTo(outputType, input);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.getTypeOf = function(input) {\n return utils.getTypeOf(input);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.checkSupport = function(type) {\n return utils.checkSupport(type);\n};\n\n/**\n * @deprecated\n * This value will be removed in a future version without replacement.\n */\nexports.MAX_VALUE_16BITS = utils.MAX_VALUE_16BITS;\n\n/**\n * @deprecated\n * This value will be removed in a future version without replacement.\n */\nexports.MAX_VALUE_32BITS = utils.MAX_VALUE_32BITS;\n\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.pretty = function(str) {\n return utils.pretty(str);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.findCompression = function(compressionMethod) {\n return utils.findCompression(compressionMethod);\n};\n\n/**\n * @deprecated\n * This function will be removed in a future version without replacement.\n */\nexports.isRegExp = function (object) {\n return utils.isRegExp(object);\n};\n\n\n},{\"./utils\":21}],8:[function(_dereq_,module,exports){\n'use strict';\nvar USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');\n\nvar pako = _dereq_(\"pako\");\nexports.uncompressInputType = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\nexports.compressInputType = USE_TYPEDARRAY ? \"uint8array\" : \"array\";\n\nexports.magic = \"\\x08\\x00\";\nexports.compress = function(input) {\n return pako.deflateRaw(input);\n};\nexports.uncompress = function(input) {\n return pako.inflateRaw(input);\n};\n\n},{\"pako\":24}],9:[function(_dereq_,module,exports){\n'use strict';\n\nvar base64 = _dereq_('./base64');\n\n/**\nUsage:\n zip = new JSZip();\n zip.file(\"hello.txt\", \"Hello, World!\").file(\"tempfile\", \"nothing\");\n zip.folder(\"images\").file(\"smile.gif\", base64Data, {base64: true});\n zip.file(\"Xmas.txt\", \"Ho ho ho !\", {date : new Date(\"December 25, 2007 00:00:01\")});\n zip.remove(\"tempfile\");\n\n base64zip = zip.generate();\n\n**/\n\n/**\n * Representation a of zip file in js\n * @constructor\n * @param {String=|ArrayBuffer=|Uint8Array=} data the data to load, if any (optional).\n * @param {Object=} options the options for creating this objects (optional).\n */\nfunction JSZipSync(data, options) {\n // if this constructor is used without `new`, it adds `new` before itself:\n if(!(this instanceof JSZipSync)) return new JSZipSync(data, options);\n\n // object containing the files :\n // {\n // \"folder/\" : {...},\n // \"folder/data.txt\" : {...}\n // }\n this.files = {};\n\n this.comment = null;\n\n // Where we are in the hierarchy\n this.root = \"\";\n if (data) {\n this.load(data, options);\n }\n this.clone = function() {\n var newObj = new JSZipSync();\n for (var i in this) {\n if (typeof this[i] !== \"function\") {\n newObj[i] = this[i];\n }\n }\n return newObj;\n };\n}\nJSZipSync.prototype = _dereq_('./object');\nJSZipSync.prototype.load = _dereq_('./load');\nJSZipSync.support = _dereq_('./support');\nJSZipSync.defaults = _dereq_('./defaults');\n\n/**\n * @deprecated\n * This namespace will be removed in a future version without replacement.\n */\nJSZipSync.utils = _dereq_('./deprecatedPublicUtils');\n\nJSZipSync.base64 = {\n /**\n * @deprecated\n * This method will be removed in a future version without replacement.\n */\n encode : function(input) {\n return base64.encode(input);\n },\n /**\n * @deprecated\n * This method will be removed in a future version without replacement.\n */\n decode : function(input) {\n return base64.decode(input);\n }\n};\nJSZipSync.compressions = _dereq_('./compressions');\nmodule.exports = JSZipSync;\n\n},{\"./base64\":1,\"./compressions\":3,\"./defaults\":6,\"./deprecatedPublicUtils\":7,\"./load\":10,\"./object\":13,\"./support\":17}],10:[function(_dereq_,module,exports){\n'use strict';\nvar base64 = _dereq_('./base64');\nvar ZipEntries = _dereq_('./zipEntries');\nmodule.exports = function(data, options) {\n var files, zipEntries, i, input;\n options = options || {};\n if (options.base64) {\n data = base64.decode(data);\n }\n\n zipEntries = new ZipEntries(data, options);\n files = zipEntries.files;\n for (i = 0; i < files.length; i++) {\n input = files[i];\n this.file(input.fileName, input.decompressed, {\n binary: true,\n optimizedBinaryString: true,\n date: input.date,\n dir: input.dir,\n comment : input.fileComment.length ? input.fileComment : null,\n createFolders: options.createFolders\n });\n }\n if (zipEntries.zipComment.length) {\n this.comment = zipEntries.zipComment;\n }\n\n return this;\n};\n\n},{\"./base64\":1,\"./zipEntries\":22}],11:[function(_dereq_,module,exports){\n(function (Buffer){\n'use strict';\nvar Buffer_from = /*::(*/function(){}/*:: :any)*/;\nif(typeof Buffer !== 'undefined') {\n\tvar nbfs = !Buffer.from;\n\tif(!nbfs) try { Buffer.from(\"foo\", \"utf8\"); } catch(e) { nbfs = true; }\n\tBuffer_from = nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer);\n\t// $FlowIgnore\n\tif(!Buffer.alloc) Buffer.alloc = function(n) { return new Buffer(n); };\n}\nmodule.exports = function(data, encoding){\n return typeof data == 'number' ? Buffer.alloc(data) : Buffer_from(data, encoding);\n};\nmodule.exports.test = function(b){\n return Buffer.isBuffer(b);\n};\n}).call(this,(typeof Buffer !== \"undefined\" ? Buffer : undefined))\n},{}],12:[function(_dereq_,module,exports){\n'use strict';\nvar Uint8ArrayReader = _dereq_('./uint8ArrayReader');\n\nfunction NodeBufferReader(data) {\n this.data = data;\n this.length = this.data.length;\n this.index = 0;\n}\nNodeBufferReader.prototype = new Uint8ArrayReader();\n\n/**\n * @see DataReader.readData\n */\nNodeBufferReader.prototype.readData = function(size) {\n this.checkOffset(size);\n var result = this.data.slice(this.index, this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = NodeBufferReader;\n\n},{\"./uint8ArrayReader\":18}],13:[function(_dereq_,module,exports){\n'use strict';\nvar support = _dereq_('./support');\nvar utils = _dereq_('./utils');\nvar crc32 = _dereq_('./crc32');\nvar signature = _dereq_('./signature');\nvar defaults = _dereq_('./defaults');\nvar base64 = _dereq_('./base64');\nvar compressions = _dereq_('./compressions');\nvar CompressedObject = _dereq_('./compressedObject');\nvar nodeBuffer = _dereq_('./nodeBuffer');\nvar utf8 = _dereq_('./utf8');\nvar StringWriter = _dereq_('./stringWriter');\nvar Uint8ArrayWriter = _dereq_('./uint8ArrayWriter');\n\n/**\n * Returns the raw data of a ZipObject, decompress the content if necessary.\n * @param {ZipObject} file the file to use.\n * @return {String|ArrayBuffer|Uint8Array|Buffer} the data.\n */\nvar getRawData = function(file) {\n if (file._data instanceof CompressedObject) {\n file._data = file._data.getContent();\n file.options.binary = true;\n file.options.base64 = false;\n\n if (utils.getTypeOf(file._data) === \"uint8array\") {\n var copy = file._data;\n // when reading an arraybuffer, the CompressedObject mechanism will keep it and subarray() a Uint8Array.\n // if we request a file in the same format, we might get the same Uint8Array or its ArrayBuffer (the original zip file).\n file._data = new Uint8Array(copy.length);\n // with an empty Uint8Array, Opera fails with a \"Offset larger than array size\"\n if (copy.length !== 0) {\n file._data.set(copy, 0);\n }\n }\n }\n return file._data;\n};\n\n/**\n * Returns the data of a ZipObject in a binary form. If the content is an unicode string, encode it.\n * @param {ZipObject} file the file to use.\n * @return {String|ArrayBuffer|Uint8Array|Buffer} the data.\n */\nvar getBinaryData = function(file) {\n var result = getRawData(file),\n type = utils.getTypeOf(result);\n if (type === \"string\") {\n if (!file.options.binary) {\n // unicode text !\n // unicode string => binary string is a painful process, check if we can avoid it.\n if (support.nodebuffer) {\n return nodeBuffer(result, \"utf-8\");\n }\n }\n return file.asBinary();\n }\n return result;\n};\n\n/**\n * Transform this._data into a string.\n * @param {function} filter a function String -> String, applied if not null on the result.\n * @return {String} the string representing this._data.\n */\nvar dataToString = function(asUTF8) {\n var result = getRawData(this);\n if (result === null || typeof result === \"undefined\") {\n return \"\";\n }\n // if the data is a base64 string, we decode it before checking the encoding !\n if (this.options.base64) {\n result = base64.decode(result);\n }\n if (asUTF8 && this.options.binary) {\n // JSZip.prototype.utf8decode supports arrays as input\n // skip to array => string step, utf8decode will do it.\n result = out.utf8decode(result);\n }\n else {\n // no utf8 transformation, do the array => string step.\n result = utils.transformTo(\"string\", result);\n }\n\n if (!asUTF8 && !this.options.binary) {\n result = utils.transformTo(\"string\", out.utf8encode(result));\n }\n return result;\n};\n/**\n * A simple object representing a file in the zip file.\n * @constructor\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data\n * @param {Object} options the options of the file\n */\nvar ZipObject = function(name, data, options) {\n this.name = name;\n this.dir = options.dir;\n this.date = options.date;\n this.comment = options.comment;\n\n this._data = data;\n this.options = options;\n\n /*\n * This object contains initial values for dir and date.\n * With them, we can check if the user changed the deprecated metadata in\n * `ZipObject#options` or not.\n */\n this._initialMetadata = {\n dir : options.dir,\n date : options.date\n };\n};\n\nZipObject.prototype = {\n /**\n * Return the content as UTF8 string.\n * @return {string} the UTF8 string.\n */\n asText: function() {\n return dataToString.call(this, true);\n },\n /**\n * Returns the binary content.\n * @return {string} the content as binary.\n */\n asBinary: function() {\n return dataToString.call(this, false);\n },\n /**\n * Returns the content as a nodejs Buffer.\n * @return {Buffer} the content as a Buffer.\n */\n asNodeBuffer: function() {\n var result = getBinaryData(this);\n return utils.transformTo(\"nodebuffer\", result);\n },\n /**\n * Returns the content as an Uint8Array.\n * @return {Uint8Array} the content as an Uint8Array.\n */\n asUint8Array: function() {\n var result = getBinaryData(this);\n return utils.transformTo(\"uint8array\", result);\n },\n /**\n * Returns the content as an ArrayBuffer.\n * @return {ArrayBuffer} the content as an ArrayBufer.\n */\n asArrayBuffer: function() {\n return this.asUint8Array().buffer;\n }\n};\n\n/**\n * Transform an integer into a string in hexadecimal.\n * @private\n * @param {number} dec the number to convert.\n * @param {number} bytes the number of bytes to generate.\n * @returns {string} the result.\n */\nvar decToHex = function(dec, bytes) {\n var hex = \"\",\n i;\n for (i = 0; i < bytes; i++) {\n hex += String.fromCharCode(dec & 0xff);\n dec = dec >>> 8;\n }\n return hex;\n};\n\n/**\n * Merge the objects passed as parameters into a new one.\n * @private\n * @param {...Object} var_args All objects to merge.\n * @return {Object} a new object with the data of the others.\n */\nvar extend = function() {\n var result = {}, i, attr;\n for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers\n for (attr in arguments[i]) {\n if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === \"undefined\") {\n result[attr] = arguments[i][attr];\n }\n }\n }\n return result;\n};\n\n/**\n * Transforms the (incomplete) options from the user into the complete\n * set of options to create a file.\n * @private\n * @param {Object} o the options from the user.\n * @return {Object} the complete set of options.\n */\nvar prepareFileAttrs = function(o) {\n o = o || {};\n if (o.base64 === true && (o.binary === null || o.binary === undefined)) {\n o.binary = true;\n }\n o = extend(o, defaults);\n o.date = o.date || new Date();\n if (o.compression !== null) o.compression = o.compression.toUpperCase();\n\n return o;\n};\n\n/**\n * Add a file in the current folder.\n * @private\n * @param {string} name the name of the file\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file\n * @param {Object} o the options of the file\n * @return {Object} the new file.\n */\nvar fileAdd = function(name, data, o) {\n // be sure sub folders exist\n var dataType = utils.getTypeOf(data),\n parent;\n\n o = prepareFileAttrs(o);\n\n if (o.createFolders && (parent = parentFolder(name))) {\n folderAdd.call(this, parent, true);\n }\n\n if (o.dir || data === null || typeof data === \"undefined\") {\n o.base64 = false;\n o.binary = false;\n data = null;\n }\n else if (dataType === \"string\") {\n if (o.binary && !o.base64) {\n // optimizedBinaryString == true means that the file has already been filtered with a 0xFF mask\n if (o.optimizedBinaryString !== true) {\n // this is a string, not in a base64 format.\n // Be sure that this is a correct \"binary string\"\n data = utils.string2binary(data);\n }\n }\n }\n else { // arraybuffer, uint8array, ...\n o.base64 = false;\n o.binary = true;\n\n if (!dataType && !(data instanceof CompressedObject)) {\n throw new Error(\"The data of '\" + name + \"' is in an unsupported format !\");\n }\n\n // special case : it's way easier to work with Uint8Array than with ArrayBuffer\n if (dataType === \"arraybuffer\") {\n data = utils.transformTo(\"uint8array\", data);\n }\n }\n\n var object = new ZipObject(name, data, o);\n this.files[name] = object;\n return object;\n};\n\n/**\n * Find the parent folder of the path.\n * @private\n * @param {string} path the path to use\n * @return {string} the parent folder, or \"\"\n */\nvar parentFolder = function (path) {\n if (path.slice(-1) == '/') {\n path = path.substring(0, path.length - 1);\n }\n var lastSlash = path.lastIndexOf('/');\n return (lastSlash > 0) ? path.substring(0, lastSlash) : \"\";\n};\n\n/**\n * Add a (sub) folder in the current folder.\n * @private\n * @param {string} name the folder's name\n * @param {boolean=} [createFolders] If true, automatically create sub\n * folders. Defaults to false.\n * @return {Object} the new folder.\n */\nvar folderAdd = function(name, createFolders) {\n // Check the name ends with a /\n if (name.slice(-1) != \"/\") {\n name += \"/\"; // IE doesn't like substr(-1)\n }\n\n createFolders = (typeof createFolders !== 'undefined') ? createFolders : false;\n\n // Does this folder already exist?\n if (!this.files[name]) {\n fileAdd.call(this, name, null, {\n dir: true,\n createFolders: createFolders\n });\n }\n return this.files[name];\n};\n\n/**\n * Generate a JSZip.CompressedObject for a given zipOject.\n * @param {ZipObject} file the object to read.\n * @param {JSZip.compression} compression the compression to use.\n * @return {JSZip.CompressedObject} the compressed result.\n */\nvar generateCompressedObjectFrom = function(file, compression) {\n var result = new CompressedObject(),\n content;\n\n // the data has not been decompressed, we might reuse things !\n if (file._data instanceof CompressedObject) {\n result.uncompressedSize = file._data.uncompressedSize;\n result.crc32 = file._data.crc32;\n\n if (result.uncompressedSize === 0 || file.dir) {\n compression = compressions['STORE'];\n result.compressedContent = \"\";\n result.crc32 = 0;\n }\n else if (file._data.compressionMethod === compression.magic) {\n result.compressedContent = file._data.getCompressedContent();\n }\n else {\n content = file._data.getContent();\n // need to decompress / recompress\n result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content));\n }\n }\n else {\n // have uncompressed data\n content = getBinaryData(file);\n if (!content || content.length === 0 || file.dir) {\n compression = compressions['STORE'];\n content = \"\";\n }\n result.uncompressedSize = content.length;\n result.crc32 = crc32(content);\n result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content));\n }\n\n result.compressedSize = result.compressedContent.length;\n result.compressionMethod = compression.magic;\n\n return result;\n};\n\n/**\n * Generate the various parts used in the construction of the final zip file.\n * @param {string} name the file name.\n * @param {ZipObject} file the file content.\n * @param {JSZip.CompressedObject} compressedObject the compressed object.\n * @param {number} offset the current offset from the start of the zip file.\n * @return {object} the zip parts.\n */\nvar generateZipParts = function(name, file, compressedObject, offset) {\n var data = compressedObject.compressedContent,\n utfEncodedFileName = utils.transformTo(\"string\", utf8.utf8encode(file.name)),\n comment = file.comment || \"\",\n utfEncodedComment = utils.transformTo(\"string\", utf8.utf8encode(comment)),\n useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,\n useUTF8ForComment = utfEncodedComment.length !== comment.length,\n o = file.options,\n dosTime,\n dosDate,\n extraFields = \"\",\n unicodePathExtraField = \"\",\n unicodeCommentExtraField = \"\",\n dir, date;\n\n\n // handle the deprecated options.dir\n if (file._initialMetadata.dir !== file.dir) {\n dir = file.dir;\n } else {\n dir = o.dir;\n }\n\n // handle the deprecated options.date\n if(file._initialMetadata.date !== file.date) {\n date = file.date;\n } else {\n date = o.date;\n }\n\n\n dosTime = date.getHours();\n dosTime = dosTime << 6;\n dosTime = dosTime | date.getMinutes();\n dosTime = dosTime << 5;\n dosTime = dosTime | date.getSeconds() / 2;\n\n dosDate = date.getFullYear() - 1980;\n dosDate = dosDate << 4;\n dosDate = dosDate | (date.getMonth() + 1);\n dosDate = dosDate << 5;\n dosDate = dosDate | date.getDate();\n\n if (useUTF8ForFileName) {\n // set the unicode path extra field. unzip needs at least one extra\n // field to correctly handle unicode path, so using the path is as good\n // as any other information. This could improve the situation with\n // other archive managers too.\n // This field is usually used without the utf8 flag, with a non\n // unicode path in the header (winrar, winzip). This helps (a bit)\n // with the messy Windows' default compressed folders feature but\n // breaks on p7zip which doesn't seek the unicode path extra field.\n // So for now, UTF-8 everywhere !\n unicodePathExtraField =\n // Version\n decToHex(1, 1) +\n // NameCRC32\n decToHex(crc32(utfEncodedFileName), 4) +\n // UnicodeName\n utfEncodedFileName;\n\n extraFields +=\n // Info-ZIP Unicode Path Extra Field\n \"\\x75\\x70\" +\n // size\n decToHex(unicodePathExtraField.length, 2) +\n // content\n unicodePathExtraField;\n }\n\n if(useUTF8ForComment) {\n\n unicodeCommentExtraField =\n // Version\n decToHex(1, 1) +\n // CommentCRC32\n decToHex(this.crc32(utfEncodedComment), 4) +\n // UnicodeName\n utfEncodedComment;\n\n extraFields +=\n // Info-ZIP Unicode Path Extra Field\n \"\\x75\\x63\" +\n // size\n decToHex(unicodeCommentExtraField.length, 2) +\n // content\n unicodeCommentExtraField;\n }\n\n var header = \"\";\n\n // version needed to extract\n header += \"\\x0A\\x00\";\n // general purpose bit flag\n // set bit 11 if utf8\n header += (useUTF8ForFileName || useUTF8ForComment) ? \"\\x00\\x08\" : \"\\x00\\x00\";\n // compression method\n header += compressedObject.compressionMethod;\n // last mod file time\n header += decToHex(dosTime, 2);\n // last mod file date\n header += decToHex(dosDate, 2);\n // crc-32\n header += decToHex(compressedObject.crc32, 4);\n // compressed size\n header += decToHex(compressedObject.compressedSize, 4);\n // uncompressed size\n header += decToHex(compressedObject.uncompressedSize, 4);\n // file name length\n header += decToHex(utfEncodedFileName.length, 2);\n // extra field length\n header += decToHex(extraFields.length, 2);\n\n\n var fileRecord = signature.LOCAL_FILE_HEADER + header + utfEncodedFileName + extraFields;\n\n var dirRecord = signature.CENTRAL_FILE_HEADER +\n // version made by (00: DOS)\n \"\\x14\\x00\" +\n // file header (common to file and central directory)\n header +\n // file comment length\n decToHex(utfEncodedComment.length, 2) +\n // disk number start\n \"\\x00\\x00\" +\n // internal file attributes TODO\n \"\\x00\\x00\" +\n // external file attributes\n (dir === true ? \"\\x10\\x00\\x00\\x00\" : \"\\x00\\x00\\x00\\x00\") +\n // relative offset of local header\n decToHex(offset, 4) +\n // file name\n utfEncodedFileName +\n // extra field\n extraFields +\n // file comment\n utfEncodedComment;\n\n return {\n fileRecord: fileRecord,\n dirRecord: dirRecord,\n compressedObject: compressedObject\n };\n};\n\n\n// return the actual prototype of JSZip\nvar out = {\n /**\n * Read an existing zip and merge the data in the current JSZip object.\n * The implementation is in jszip-load.js, don't forget to include it.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} stream The stream to load\n * @param {Object} options Options for loading the stream.\n * options.base64 : is the stream in base64 ? default : false\n * @return {JSZip} the current JSZip object\n */\n load: function(stream, options) {\n throw new Error(\"Load method is not defined. Is the file jszip-load.js included ?\");\n },\n\n /**\n * Filter nested files/folders with the specified function.\n * @param {Function} search the predicate to use :\n * function (relativePath, file) {...}\n * It takes 2 arguments : the relative path and the file.\n * @return {Array} An array of matching elements.\n */\n filter: function(search) {\n var result = [],\n filename, relativePath, file, fileClone;\n for (filename in this.files) {\n if (!this.files.hasOwnProperty(filename)) {\n continue;\n }\n file = this.files[filename];\n // return a new object, don't let the user mess with our internal objects :)\n fileClone = new ZipObject(file.name, file._data, extend(file.options));\n relativePath = filename.slice(this.root.length, filename.length);\n if (filename.slice(0, this.root.length) === this.root && // the file is in the current root\n search(relativePath, fileClone)) { // and the file matches the function\n result.push(fileClone);\n }\n }\n return result;\n },\n\n /**\n * Add a file to the zip file, or search a file.\n * @param {string|RegExp} name The name of the file to add (if data is defined),\n * the name of the file to find (if no data) or a regex to match files.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded\n * @param {Object} o File options\n * @return {JSZip|Object|Array} this JSZip object (when adding a file),\n * a file (when searching by string) or an array of files (when searching by regex).\n */\n file: function(name, data, o) {\n if (arguments.length === 1) {\n if (utils.isRegExp(name)) {\n var regexp = name;\n return this.filter(function(relativePath, file) {\n return !file.dir && regexp.test(relativePath);\n });\n }\n else { // text\n return this.filter(function(relativePath, file) {\n return !file.dir && relativePath === name;\n })[0] || null;\n }\n }\n else { // more than one argument : we have data !\n name = this.root + name;\n fileAdd.call(this, name, data, o);\n }\n return this;\n },\n\n /**\n * Add a directory to the zip file, or search.\n * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders.\n * @return {JSZip} an object with the new directory as the root, or an array containing matching folders.\n */\n folder: function(arg) {\n if (!arg) {\n return this;\n }\n\n if (utils.isRegExp(arg)) {\n return this.filter(function(relativePath, file) {\n return file.dir && arg.test(relativePath);\n });\n }\n\n // else, name is a new folder\n var name = this.root + arg;\n var newFolder = folderAdd.call(this, name);\n\n // Allow chaining by returning a new object with this folder as the root\n var ret = this.clone();\n ret.root = newFolder.name;\n return ret;\n },\n\n /**\n * Delete a file, or a directory and all sub-files, from the zip\n * @param {string} name the name of the file to delete\n * @return {JSZip} this JSZip object\n */\n remove: function(name) {\n name = this.root + name;\n var file = this.files[name];\n if (!file) {\n // Look for any folders\n if (name.slice(-1) != \"/\") {\n name += \"/\";\n }\n file = this.files[name];\n }\n\n if (file && !file.dir) {\n // file\n delete this.files[name];\n } else {\n // maybe a folder, delete recursively\n var kids = this.filter(function(relativePath, file) {\n return file.name.slice(0, name.length) === name;\n });\n for (var i = 0; i < kids.length; i++) {\n delete this.files[kids[i].name];\n }\n }\n\n return this;\n },\n\n /**\n * Generate the complete zip file\n * @param {Object} options the options to generate the zip file :\n * - base64, (deprecated, use type instead) true to generate base64.\n * - compression, \"STORE\" by default.\n * - type, \"base64\" by default. Values are : string, base64, uint8array, arraybuffer, blob.\n * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file\n */\n generate: function(options) {\n options = extend(options || {}, {\n base64: true,\n compression: \"STORE\",\n type: \"base64\",\n comment: null\n });\n\n utils.checkSupport(options.type);\n\n var zipData = [],\n localDirLength = 0,\n centralDirLength = 0,\n writer, i,\n utfEncodedComment = utils.transformTo(\"string\", this.utf8encode(options.comment || this.comment || \"\"));\n\n // first, generate all the zip parts.\n for (var name in this.files) {\n if (!this.files.hasOwnProperty(name)) {\n continue;\n }\n var file = this.files[name];\n\n var compressionName = file.options.compression || options.compression.toUpperCase();\n var compression = compressions[compressionName];\n if (!compression) {\n throw new Error(compressionName + \" is not a valid compression method !\");\n }\n\n var compressedObject = generateCompressedObjectFrom.call(this, file, compression);\n\n var zipPart = generateZipParts.call(this, name, file, compressedObject, localDirLength);\n localDirLength += zipPart.fileRecord.length + compressedObject.compressedSize;\n centralDirLength += zipPart.dirRecord.length;\n zipData.push(zipPart);\n }\n\n var dirEnd = \"\";\n\n // end of central dir signature\n dirEnd = signature.CENTRAL_DIRECTORY_END +\n // number of this disk\n \"\\x00\\x00\" +\n // number of the disk with the start of the central directory\n \"\\x00\\x00\" +\n // total number of entries in the central directory on this disk\n decToHex(zipData.length, 2) +\n // total number of entries in the central directory\n decToHex(zipData.length, 2) +\n // size of the central directory 4 bytes\n decToHex(centralDirLength, 4) +\n // offset of start of central directory with respect to the starting disk number\n decToHex(localDirLength, 4) +\n // .ZIP file comment length\n decToHex(utfEncodedComment.length, 2) +\n // .ZIP file comment\n utfEncodedComment;\n\n\n // we have all the parts (and the total length)\n // time to create a writer !\n var typeName = options.type.toLowerCase();\n if(typeName===\"uint8array\"||typeName===\"arraybuffer\"||typeName===\"blob\"||typeName===\"nodebuffer\") {\n writer = new Uint8ArrayWriter(localDirLength + centralDirLength + dirEnd.length);\n }else{\n writer = new StringWriter(localDirLength + centralDirLength + dirEnd.length);\n }\n\n for (i = 0; i < zipData.length; i++) {\n writer.append(zipData[i].fileRecord);\n writer.append(zipData[i].compressedObject.compressedContent);\n }\n for (i = 0; i < zipData.length; i++) {\n writer.append(zipData[i].dirRecord);\n }\n\n writer.append(dirEnd);\n\n var zip = writer.finalize();\n\n\n\n switch(options.type.toLowerCase()) {\n // case \"zip is an Uint8Array\"\n case \"uint8array\" :\n case \"arraybuffer\" :\n case \"nodebuffer\" :\n return utils.transformTo(options.type.toLowerCase(), zip);\n case \"blob\" :\n return utils.arrayBuffer2Blob(utils.transformTo(\"arraybuffer\", zip));\n // case \"zip is a string\"\n case \"base64\" :\n return (options.base64) ? base64.encode(zip) : zip;\n default : // case \"string\" :\n return zip;\n }\n\n },\n\n /**\n * @deprecated\n * This method will be removed in a future version without replacement.\n */\n crc32: function (input, crc) {\n return crc32(input, crc);\n },\n\n /**\n * @deprecated\n * This method will be removed in a future version without replacement.\n */\n utf8encode: function (string) {\n return utils.transformTo(\"string\", utf8.utf8encode(string));\n },\n\n /**\n * @deprecated\n * This method will be removed in a future version without replacement.\n */\n utf8decode: function (input) {\n return utf8.utf8decode(input);\n }\n};\nmodule.exports = out;\n\n},{\"./base64\":1,\"./compressedObject\":2,\"./compressions\":3,\"./crc32\":4,\"./defaults\":6,\"./nodeBuffer\":11,\"./signature\":14,\"./stringWriter\":16,\"./support\":17,\"./uint8ArrayWriter\":19,\"./utf8\":20,\"./utils\":21}],14:[function(_dereq_,module,exports){\n'use strict';\nexports.LOCAL_FILE_HEADER = \"PK\\x03\\x04\";\nexports.CENTRAL_FILE_HEADER = \"PK\\x01\\x02\";\nexports.CENTRAL_DIRECTORY_END = \"PK\\x05\\x06\";\nexports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = \"PK\\x06\\x07\";\nexports.ZIP64_CENTRAL_DIRECTORY_END = \"PK\\x06\\x06\";\nexports.DATA_DESCRIPTOR = \"PK\\x07\\x08\";\n\n},{}],15:[function(_dereq_,module,exports){\n'use strict';\nvar DataReader = _dereq_('./dataReader');\nvar utils = _dereq_('./utils');\n\nfunction StringReader(data, optimizedBinaryString) {\n this.data = data;\n if (!optimizedBinaryString) {\n this.data = utils.string2binary(this.data);\n }\n this.length = this.data.length;\n this.index = 0;\n}\nStringReader.prototype = new DataReader();\n/**\n * @see DataReader.byteAt\n */\nStringReader.prototype.byteAt = function(i) {\n return this.data.charCodeAt(i);\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nStringReader.prototype.lastIndexOfSignature = function(sig) {\n return this.data.lastIndexOf(sig);\n};\n/**\n * @see DataReader.readData\n */\nStringReader.prototype.readData = function(size) {\n this.checkOffset(size);\n // this will work because the constructor applied the \"& 0xff\" mask.\n var result = this.data.slice(this.index, this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = StringReader;\n\n},{\"./dataReader\":5,\"./utils\":21}],16:[function(_dereq_,module,exports){\n'use strict';\n\nvar utils = _dereq_('./utils');\n\n/**\n * An object to write any content to a string.\n * @constructor\n */\nvar StringWriter = function() {\n this.data = [];\n};\nStringWriter.prototype = {\n /**\n * Append any content to the current string.\n * @param {Object} input the content to add.\n */\n append: function(input) {\n input = utils.transformTo(\"string\", input);\n this.data.push(input);\n },\n /**\n * Finalize the construction an return the result.\n * @return {string} the generated string.\n */\n finalize: function() {\n return this.data.join(\"\");\n }\n};\n\nmodule.exports = StringWriter;\n\n},{\"./utils\":21}],17:[function(_dereq_,module,exports){\n(function (Buffer){\n'use strict';\nexports.base64 = true;\nexports.array = true;\nexports.string = true;\nexports.arraybuffer = typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\";\n// contains true if JSZip can read/generate nodejs Buffer, false otherwise.\n// Browserify will provide a Buffer implementation for browsers, which is\n// an augmented Uint8Array (i.e., can be used as either Buffer or U8).\nexports.nodebuffer = typeof Buffer !== \"undefined\";\n// contains true if JSZip can read/generate Uint8Array, false otherwise.\nexports.uint8array = typeof Uint8Array !== \"undefined\";\n\nif (typeof ArrayBuffer === \"undefined\") {\n exports.blob = false;\n}\nelse {\n var buffer = new ArrayBuffer(0);\n try {\n exports.blob = new Blob([buffer], {\n type: \"application/zip\"\n }).size === 0;\n }\n catch (e) {\n try {\n var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n var builder = new Builder();\n builder.append(buffer);\n exports.blob = builder.getBlob('application/zip').size === 0;\n }\n catch (e) {\n exports.blob = false;\n }\n }\n}\n\n}).call(this,(typeof Buffer !== \"undefined\" ? Buffer : undefined))\n},{}],18:[function(_dereq_,module,exports){\n'use strict';\nvar DataReader = _dereq_('./dataReader');\n\nfunction Uint8ArrayReader(data) {\n if (data) {\n this.data = data;\n this.length = this.data.length;\n this.index = 0;\n }\n}\nUint8ArrayReader.prototype = new DataReader();\n/**\n * @see DataReader.byteAt\n */\nUint8ArrayReader.prototype.byteAt = function(i) {\n return this.data[i];\n};\n/**\n * @see DataReader.lastIndexOfSignature\n */\nUint8ArrayReader.prototype.lastIndexOfSignature = function(sig) {\n var sig0 = sig.charCodeAt(0),\n sig1 = sig.charCodeAt(1),\n sig2 = sig.charCodeAt(2),\n sig3 = sig.charCodeAt(3);\n for (var i = this.length - 4; i >= 0; --i) {\n if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {\n return i;\n }\n }\n\n return -1;\n};\n/**\n * @see DataReader.readData\n */\nUint8ArrayReader.prototype.readData = function(size) {\n this.checkOffset(size);\n if(size === 0) {\n // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].\n return new Uint8Array(0);\n }\n var result = this.data.subarray(this.index, this.index + size);\n this.index += size;\n return result;\n};\nmodule.exports = Uint8ArrayReader;\n\n},{\"./dataReader\":5}],19:[function(_dereq_,module,exports){\n'use strict';\n\nvar utils = _dereq_('./utils');\n\n/**\n * An object to write any content to an Uint8Array.\n * @constructor\n * @param {number} length The length of the array.\n */\nvar Uint8ArrayWriter = function(length) {\n this.data = new Uint8Array(length);\n this.index = 0;\n};\nUint8ArrayWriter.prototype = {\n /**\n * Append any content to the current array.\n * @param {Object} input the content to add.\n */\n append: function(input) {\n if (input.length !== 0) {\n // with an empty Uint8Array, Opera fails with a \"Offset larger than array size\"\n input = utils.transformTo(\"uint8array\", input);\n this.data.set(input, this.index);\n this.index += input.length;\n }\n },\n /**\n * Finalize the construction an return the result.\n * @return {Uint8Array} the generated array.\n */\n finalize: function() {\n return this.data;\n }\n};\n\nmodule.exports = Uint8ArrayWriter;\n\n},{\"./utils\":21}],20:[function(_dereq_,module,exports){\n'use strict';\n\nvar utils = _dereq_('./utils');\nvar support = _dereq_('./support');\nvar nodeBuffer = _dereq_('./nodeBuffer');\n\n/**\n * The following functions come from pako, from pako/lib/utils/strings\n * released under the MIT license, see pako https://github.com/nodeca/pako/\n */\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new Array(256);\nfor (var i=0; i<256; i++) {\n _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n// convert string to array (typed, when possible)\nvar string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if (((c & 0xfc00) === 0xd800) && (m_pos+1 < str_len)) {\n c2 = str.charCodeAt(m_pos+1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += (c < 0x80) ? 1 : ((c < 0x800) ? 2 : ((c < 0x10000) ? 3 : 4));\n }\n\n // allocate buffer\n if (support.uint8array) {\n buf = new Uint8Array(buf_len);\n } else {\n buf = new Array(buf_len);\n }\n\n // convert\n for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n c2 = str.charCodeAt(m_pos+1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | ((c >>> 6) & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | ((c >>> 12) & 0x3f);\n buf[i++] = 0x80 | ((c >>> 6) & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = function(buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max-1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Fuckup - very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means vuffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n// convert array to string\nvar buf2string = function (buf) {\n var str, i, out, c, c_len;\n var len = buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len*2);\n\n for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n // shrinkBuf(utf16buf, out)\n if (utf16buf.length !== out) {\n if(utf16buf.subarray) {\n utf16buf = utf16buf.subarray(0, out);\n } else {\n utf16buf.length = out;\n }\n }\n\n // return String.fromCharCode.apply(null, utf16buf);\n return utils.applyFromCharCode(utf16buf);\n};\n\n\n// That's all for the pako functions.\n\n\n/**\n * Transform a javascript string into an array (typed if possible) of bytes,\n * UTF-8 encoded.\n * @param {String} str the string to encode\n * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.\n */\nexports.utf8encode = function utf8encode(str) {\n if (support.nodebuffer) {\n return nodeBuffer(str, \"utf-8\");\n }\n\n return string2buf(str);\n};\n\n\n/**\n * Transform a bytes array (or a representation) representing an UTF-8 encoded\n * string into a javascript string.\n * @param {Array|Uint8Array|Buffer} buf the data de decode\n * @return {String} the decoded string.\n */\nexports.utf8decode = function utf8decode(buf) {\n if (support.nodebuffer) {\n return utils.transformTo(\"nodebuffer\", buf).toString(\"utf-8\");\n }\n\n buf = utils.transformTo(support.uint8array ? \"uint8array\" : \"array\", buf);\n\n // return buf2string(buf);\n // Chrome prefers to work with \"small\" chunks of data\n // for the method buf2string.\n // Firefox and Chrome has their own shortcut, IE doesn't seem to really care.\n var result = [], k = 0, len = buf.length, chunk = 65536;\n while (k < len) {\n var nextBoundary = utf8border(buf, Math.min(k + chunk, len));\n if (support.uint8array) {\n result.push(buf2string(buf.subarray(k, nextBoundary)));\n } else {\n result.push(buf2string(buf.slice(k, nextBoundary)));\n }\n k = nextBoundary;\n }\n return result.join(\"\");\n\n};\n// vim: set shiftwidth=4 softtabstop=4:\n\n},{\"./nodeBuffer\":11,\"./support\":17,\"./utils\":21}],21:[function(_dereq_,module,exports){\n'use strict';\nvar support = _dereq_('./support');\nvar compressions = _dereq_('./compressions');\nvar nodeBuffer = _dereq_('./nodeBuffer');\n/**\n * Convert a string to a \"binary string\" : a string containing only char codes between 0 and 255.\n * @param {string} str the string to transform.\n * @return {String} the binary string.\n */\nexports.string2binary = function(str) {\n var result = \"\";\n for (var i = 0; i < str.length; i++) {\n result += String.fromCharCode(str.charCodeAt(i) & 0xff);\n }\n return result;\n};\nexports.arrayBuffer2Blob = function(buffer) {\n exports.checkSupport(\"blob\");\n\n try {\n // Blob constructor\n return new Blob([buffer], {\n type: \"application/zip\"\n });\n }\n catch (e) {\n\n try {\n // deprecated, browser only, old way\n var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n var builder = new Builder();\n builder.append(buffer);\n return builder.getBlob('application/zip');\n }\n catch (e) {\n\n // well, fuck ?!\n throw new Error(\"Bug : can't construct the Blob.\");\n }\n }\n\n\n};\n/**\n * The identity function.\n * @param {Object} input the input.\n * @return {Object} the same input.\n */\nfunction identity(input) {\n return input;\n}\n\n/**\n * Fill in an array with a string.\n * @param {String} str the string to use.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.\n */\nfunction stringToArrayLike(str, array) {\n for (var i = 0; i < str.length; ++i) {\n array[i] = str.charCodeAt(i) & 0xFF;\n }\n return array;\n}\n\n/**\n * Transform an array-like object to a string.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.\n * @return {String} the result.\n */\nfunction arrayLikeToString(array) {\n // Performances notes :\n // --------------------\n // String.fromCharCode.apply(null, array) is the fastest, see\n // see http://jsperf.com/converting-a-uint8array-to-a-string/2\n // but the stack is limited (and we can get huge arrays !).\n //\n // result += String.fromCharCode(array[i]); generate too many strings !\n //\n // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2\n var chunk = 65536;\n var result = [],\n len = array.length,\n type = exports.getTypeOf(array),\n k = 0,\n canUseApply = true;\n try {\n switch(type) {\n case \"uint8array\":\n String.fromCharCode.apply(null, new Uint8Array(0));\n break;\n case \"nodebuffer\":\n String.fromCharCode.apply(null, nodeBuffer(0));\n break;\n }\n } catch(e) {\n canUseApply = false;\n }\n\n // no apply : slow and painful algorithm\n // default browser on android 4.*\n if (!canUseApply) {\n var resultStr = \"\";\n for(var i = 0; i < array.length;i++) {\n resultStr += String.fromCharCode(array[i]);\n }\n return resultStr;\n }\n while (k < len && chunk > 1) {\n try {\n if (type === \"array\" || type === \"nodebuffer\") {\n result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));\n }\n else {\n result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));\n }\n k += chunk;\n }\n catch (e) {\n chunk = Math.floor(chunk / 2);\n }\n }\n return result.join(\"\");\n}\n\nexports.applyFromCharCode = arrayLikeToString;\n\n\n/**\n * Copy the data from an array-like to an other array-like.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.\n * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.\n * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.\n */\nfunction arrayLikeToArrayLike(arrayFrom, arrayTo) {\n for (var i = 0; i < arrayFrom.length; i++) {\n arrayTo[i] = arrayFrom[i];\n }\n return arrayTo;\n}\n\n// a matrix containing functions to transform everything into everything.\nvar transform = {};\n\n// string to ?\ntransform[\"string\"] = {\n \"string\": identity,\n \"array\": function(input) {\n return stringToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return transform[\"string\"][\"uint8array\"](input).buffer;\n },\n \"uint8array\": function(input) {\n return stringToArrayLike(input, new Uint8Array(input.length));\n },\n \"nodebuffer\": function(input) {\n return stringToArrayLike(input, nodeBuffer(input.length));\n }\n};\n\n// array to ?\ntransform[\"array\"] = {\n \"string\": arrayLikeToString,\n \"array\": identity,\n \"arraybuffer\": function(input) {\n return (new Uint8Array(input)).buffer;\n },\n \"uint8array\": function(input) {\n return new Uint8Array(input);\n },\n \"nodebuffer\": function(input) {\n return nodeBuffer(input);\n }\n};\n\n// arraybuffer to ?\ntransform[\"arraybuffer\"] = {\n \"string\": function(input) {\n return arrayLikeToString(new Uint8Array(input));\n },\n \"array\": function(input) {\n return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));\n },\n \"arraybuffer\": identity,\n \"uint8array\": function(input) {\n return new Uint8Array(input);\n },\n \"nodebuffer\": function(input) {\n return nodeBuffer(new Uint8Array(input));\n }\n};\n\n// uint8array to ?\ntransform[\"uint8array\"] = {\n \"string\": arrayLikeToString,\n \"array\": function(input) {\n return arrayLikeToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return input.buffer;\n },\n \"uint8array\": identity,\n \"nodebuffer\": function(input) {\n return nodeBuffer(input);\n }\n};\n\n// nodebuffer to ?\ntransform[\"nodebuffer\"] = {\n \"string\": arrayLikeToString,\n \"array\": function(input) {\n return arrayLikeToArrayLike(input, new Array(input.length));\n },\n \"arraybuffer\": function(input) {\n return transform[\"nodebuffer\"][\"uint8array\"](input).buffer;\n },\n \"uint8array\": function(input) {\n return arrayLikeToArrayLike(input, new Uint8Array(input.length));\n },\n \"nodebuffer\": identity\n};\n\n/**\n * Transform an input into any type.\n * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.\n * If no output type is specified, the unmodified input will be returned.\n * @param {String} outputType the output type.\n * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.\n * @throws {Error} an Error if the browser doesn't support the requested output type.\n */\nexports.transformTo = function(outputType, input) {\n if (!input) {\n // undefined, null, etc\n // an empty string won't harm.\n input = \"\";\n }\n if (!outputType) {\n return input;\n }\n exports.checkSupport(outputType);\n var inputType = exports.getTypeOf(input);\n var result = transform[inputType][outputType](input);\n return result;\n};\n\n/**\n * Return the type of the input.\n * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.\n * @param {Object} input the input to identify.\n * @return {String} the (lowercase) type of the input.\n */\nexports.getTypeOf = function(input) {\n if (typeof input === \"string\") {\n return \"string\";\n }\n if (Object.prototype.toString.call(input) === \"[object Array]\") {\n return \"array\";\n }\n if (support.nodebuffer && nodeBuffer.test(input)) {\n return \"nodebuffer\";\n }\n if (support.uint8array && input instanceof Uint8Array) {\n return \"uint8array\";\n }\n if (support.arraybuffer && input instanceof ArrayBuffer) {\n return \"arraybuffer\";\n }\n};\n\n/**\n * Throw an exception if the type is not supported.\n * @param {String} type the type to check.\n * @throws {Error} an Error if the browser doesn't support the requested type.\n */\nexports.checkSupport = function(type) {\n var supported = support[type.toLowerCase()];\n if (!supported) {\n throw new Error(type + \" is not supported by this browser\");\n }\n};\nexports.MAX_VALUE_16BITS = 65535;\nexports.MAX_VALUE_32BITS = -1; // well, \"\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\\xFF\" is parsed as -1\n\n/**\n * Prettify a string read as binary.\n * @param {string} str the string to prettify.\n * @return {string} a pretty string.\n */\nexports.pretty = function(str) {\n var res = '',\n code, i;\n for (i = 0; i < (str || \"\").length; i++) {\n code = str.charCodeAt(i);\n res += '\\\\x' + (code < 16 ? \"0\" : \"\") + code.toString(16).toUpperCase();\n }\n return res;\n};\n\n/**\n * Find a compression registered in JSZip.\n * @param {string} compressionMethod the method magic to find.\n * @return {Object|null} the JSZip compression object, null if none found.\n */\nexports.findCompression = function(compressionMethod) {\n for (var method in compressions) {\n if (!compressions.hasOwnProperty(method)) {\n continue;\n }\n if (compressions[method].magic === compressionMethod) {\n return compressions[method];\n }\n }\n return null;\n};\n/**\n* Cross-window, cross-Node-context regular expression detection\n* @param {Object} object Anything\n* @return {Boolean} true if the object is a regular expression,\n* false otherwise\n*/\nexports.isRegExp = function (object) {\n return Object.prototype.toString.call(object) === \"[object RegExp]\";\n};\n\n\n},{\"./compressions\":3,\"./nodeBuffer\":11,\"./support\":17}],22:[function(_dereq_,module,exports){\n'use strict';\nvar StringReader = _dereq_('./stringReader');\nvar NodeBufferReader = _dereq_('./nodeBufferReader');\nvar Uint8ArrayReader = _dereq_('./uint8ArrayReader');\nvar utils = _dereq_('./utils');\nvar sig = _dereq_('./signature');\nvar ZipEntry = _dereq_('./zipEntry');\nvar support = _dereq_('./support');\nvar jszipProto = _dereq_('./object');\n// class ZipEntries {{{\n/**\n * All the entries in the zip file.\n * @constructor\n * @param {String|ArrayBuffer|Uint8Array} data the binary stream to load.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntries(data, loadOptions) {\n this.files = [];\n this.loadOptions = loadOptions;\n if (data) {\n this.load(data);\n }\n}\nZipEntries.prototype = {\n /**\n * Check that the reader is on the speficied signature.\n * @param {string} expectedSignature the expected signature.\n * @throws {Error} if it is an other signature.\n */\n checkSignature: function(expectedSignature) {\n var signature = this.reader.readString(4);\n if (signature !== expectedSignature) {\n throw new Error(\"Corrupted zip or bug : unexpected signature \" + \"(\" + utils.pretty(signature) + \", expected \" + utils.pretty(expectedSignature) + \")\");\n }\n },\n /**\n * Read the end of the central directory.\n */\n readBlockEndOfCentral: function() {\n this.diskNumber = this.reader.readInt(2);\n this.diskWithCentralDirStart = this.reader.readInt(2);\n this.centralDirRecordsOnThisDisk = this.reader.readInt(2);\n this.centralDirRecords = this.reader.readInt(2);\n this.centralDirSize = this.reader.readInt(4);\n this.centralDirOffset = this.reader.readInt(4);\n\n this.zipCommentLength = this.reader.readInt(2);\n // warning : the encoding depends of the system locale\n // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.\n // On a windows machine, this field is encoded with the localized windows code page.\n this.zipComment = this.reader.readString(this.zipCommentLength);\n // To get consistent behavior with the generation part, we will assume that\n // this is utf8 encoded.\n this.zipComment = jszipProto.utf8decode(this.zipComment);\n },\n /**\n * Read the end of the Zip 64 central directory.\n * Not merged with the method readEndOfCentral :\n * The end of central can coexist with its Zip64 brother,\n * I don't want to read the wrong number of bytes !\n */\n readBlockZip64EndOfCentral: function() {\n this.zip64EndOfCentralSize = this.reader.readInt(8);\n this.versionMadeBy = this.reader.readString(2);\n this.versionNeeded = this.reader.readInt(2);\n this.diskNumber = this.reader.readInt(4);\n this.diskWithCentralDirStart = this.reader.readInt(4);\n this.centralDirRecordsOnThisDisk = this.reader.readInt(8);\n this.centralDirRecords = this.reader.readInt(8);\n this.centralDirSize = this.reader.readInt(8);\n this.centralDirOffset = this.reader.readInt(8);\n\n this.zip64ExtensibleData = {};\n var extraDataSize = this.zip64EndOfCentralSize - 44,\n index = 0,\n extraFieldId,\n extraFieldLength,\n extraFieldValue;\n while (index < extraDataSize) {\n extraFieldId = this.reader.readInt(2);\n extraFieldLength = this.reader.readInt(4);\n extraFieldValue = this.reader.readString(extraFieldLength);\n this.zip64ExtensibleData[extraFieldId] = {\n id: extraFieldId,\n length: extraFieldLength,\n value: extraFieldValue\n };\n }\n },\n /**\n * Read the end of the Zip 64 central directory locator.\n */\n readBlockZip64EndOfCentralLocator: function() {\n this.diskWithZip64CentralDirStart = this.reader.readInt(4);\n this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);\n this.disksCount = this.reader.readInt(4);\n if (this.disksCount > 1) {\n throw new Error(\"Multi-volumes zip are not supported\");\n }\n },\n /**\n * Read the local files, based on the offset read in the central part.\n */\n readLocalFiles: function() {\n var i, file;\n for (i = 0; i < this.files.length; i++) {\n file = this.files[i];\n this.reader.setIndex(file.localHeaderOffset);\n this.checkSignature(sig.LOCAL_FILE_HEADER);\n file.readLocalPart(this.reader);\n file.handleUTF8();\n }\n },\n /**\n * Read the central directory.\n */\n readCentralDir: function() {\n var file;\n\n this.reader.setIndex(this.centralDirOffset);\n while (this.reader.readString(4) === sig.CENTRAL_FILE_HEADER) {\n file = new ZipEntry({\n zip64: this.zip64\n }, this.loadOptions);\n file.readCentralPart(this.reader);\n this.files.push(file);\n }\n },\n /**\n * Read the end of central directory.\n */\n readEndOfCentral: function() {\n var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);\n if (offset === -1) {\n throw new Error(\"Corrupted zip : can't find end of central directory\");\n }\n this.reader.setIndex(offset);\n this.checkSignature(sig.CENTRAL_DIRECTORY_END);\n this.readBlockEndOfCentral();\n\n\n /* extract from the zip spec :\n 4) If one of the fields in the end of central directory\n record is too small to hold required data, the field\n should be set to -1 (0xFFFF or 0xFFFFFFFF) and the\n ZIP64 format record should be created.\n 5) The end of central directory record and the\n Zip64 end of central directory locator record must\n reside on the same disk when splitting or spanning\n an archive.\n */\n if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {\n this.zip64 = true;\n\n /*\n Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from\n the zip file can fit into a 32bits integer. This cannot be solved : Javascript represents\n all numbers as 64-bit double precision IEEE 754 floating point numbers.\n So, we have 53bits for integers and bitwise operations treat everything as 32bits.\n see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators\n and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5\n */\n\n // should look for a zip64 EOCD locator\n offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n if (offset === -1) {\n throw new Error(\"Corrupted zip : can't find the ZIP64 end of central directory locator\");\n }\n this.reader.setIndex(offset);\n this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);\n this.readBlockZip64EndOfCentralLocator();\n\n // now the zip64 EOCD record\n this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);\n this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);\n this.readBlockZip64EndOfCentral();\n }\n },\n prepareReader: function(data) {\n var type = utils.getTypeOf(data);\n if (type === \"string\" && !support.uint8array) {\n this.reader = new StringReader(data, this.loadOptions.optimizedBinaryString);\n }\n else if (type === \"nodebuffer\") {\n this.reader = new NodeBufferReader(data);\n }\n else {\n this.reader = new Uint8ArrayReader(utils.transformTo(\"uint8array\", data));\n }\n },\n /**\n * Read a zip file and create ZipEntries.\n * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.\n */\n load: function(data) {\n this.prepareReader(data);\n this.readEndOfCentral();\n this.readCentralDir();\n this.readLocalFiles();\n }\n};\n// }}} end of ZipEntries\nmodule.exports = ZipEntries;\n\n},{\"./nodeBufferReader\":12,\"./object\":13,\"./signature\":14,\"./stringReader\":15,\"./support\":17,\"./uint8ArrayReader\":18,\"./utils\":21,\"./zipEntry\":23}],23:[function(_dereq_,module,exports){\n'use strict';\nvar StringReader = _dereq_('./stringReader');\nvar utils = _dereq_('./utils');\nvar CompressedObject = _dereq_('./compressedObject');\nvar jszipProto = _dereq_('./object');\n// class ZipEntry {{{\n/**\n * An entry in the zip file.\n * @constructor\n * @param {Object} options Options of the current file.\n * @param {Object} loadOptions Options for loading the stream.\n */\nfunction ZipEntry(options, loadOptions) {\n this.options = options;\n this.loadOptions = loadOptions;\n}\nZipEntry.prototype = {\n /**\n * say if the file is encrypted.\n * @return {boolean} true if the file is encrypted, false otherwise.\n */\n isEncrypted: function() {\n // bit 1 is set\n return (this.bitFlag & 0x0001) === 0x0001;\n },\n /**\n * say if the file has utf-8 filename/comment.\n * @return {boolean} true if the filename/comment is in utf-8, false otherwise.\n */\n useUTF8: function() {\n // bit 11 is set\n return (this.bitFlag & 0x0800) === 0x0800;\n },\n /**\n * Prepare the function used to generate the compressed content from this ZipFile.\n * @param {DataReader} reader the reader to use.\n * @param {number} from the offset from where we should read the data.\n * @param {number} length the length of the data to read.\n * @return {Function} the callback to get the compressed content (the type depends of the DataReader class).\n */\n prepareCompressedContent: function(reader, from, length) {\n return function() {\n var previousIndex = reader.index;\n reader.setIndex(from);\n var compressedFileData = reader.readData(length);\n reader.setIndex(previousIndex);\n\n return compressedFileData;\n };\n },\n /**\n * Prepare the function used to generate the uncompressed content from this ZipFile.\n * @param {DataReader} reader the reader to use.\n * @param {number} from the offset from where we should read the data.\n * @param {number} length the length of the data to read.\n * @param {JSZip.compression} compression the compression used on this file.\n * @param {number} uncompressedSize the uncompressed size to expect.\n * @return {Function} the callback to get the uncompressed content (the type depends of the DataReader class).\n */\n prepareContent: function(reader, from, length, compression, uncompressedSize) {\n return function() {\n\n var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent());\n var uncompressedFileData = compression.uncompress(compressedFileData);\n\n if (uncompressedFileData.length !== uncompressedSize) {\n throw new Error(\"Bug : uncompressed data size mismatch\");\n }\n\n return uncompressedFileData;\n };\n },\n /**\n * Read the local part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readLocalPart: function(reader) {\n var compression, localExtraFieldsLength;\n\n // we already know everything from the central dir !\n // If the central dir data are false, we are doomed.\n // On the bright side, the local part is scary : zip64, data descriptors, both, etc.\n // The less data we get here, the more reliable this should be.\n // Let's skip the whole header and dash to the data !\n reader.skip(22);\n // in some zip created on windows, the filename stored in the central dir contains \\ instead of /.\n // Strangely, the filename here is OK.\n // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes\n // or APPNOTE#4.4.17.1, \"All slashes MUST be forward slashes '/'\") but there are a lot of bad zip generators...\n // Search \"unzip mismatching \"local\" filename continuing with \"central\" filename version\" on\n // the internet.\n //\n // I think I see the logic here : the central directory is used to display\n // content and the local directory is used to extract the files. Mixing / and \\\n // may be used to display \\ to windows users and use / when extracting the files.\n // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394\n this.fileNameLength = reader.readInt(2);\n localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir\n this.fileName = reader.readString(this.fileNameLength);\n reader.skip(localExtraFieldsLength);\n\n if (this.compressedSize == -1 || this.uncompressedSize == -1) {\n throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \" + \"(compressedSize == -1 || uncompressedSize == -1)\");\n }\n\n compression = utils.findCompression(this.compressionMethod);\n if (compression === null) { // no compression found\n throw new Error(\"Corrupted zip : compression \" + utils.pretty(this.compressionMethod) + \" unknown (inner file : \" + this.fileName + \")\");\n }\n this.decompressed = new CompressedObject();\n this.decompressed.compressedSize = this.compressedSize;\n this.decompressed.uncompressedSize = this.uncompressedSize;\n this.decompressed.crc32 = this.crc32;\n this.decompressed.compressionMethod = this.compressionMethod;\n this.decompressed.getCompressedContent = this.prepareCompressedContent(reader, reader.index, this.compressedSize, compression);\n this.decompressed.getContent = this.prepareContent(reader, reader.index, this.compressedSize, compression, this.uncompressedSize);\n\n // we need to compute the crc32...\n if (this.loadOptions.checkCRC32) {\n this.decompressed = utils.transformTo(\"string\", this.decompressed.getContent());\n if (jszipProto.crc32(this.decompressed) !== this.crc32) {\n throw new Error(\"Corrupted zip : CRC32 mismatch\");\n }\n }\n },\n\n /**\n * Read the central part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readCentralPart: function(reader) {\n this.versionMadeBy = reader.readString(2);\n this.versionNeeded = reader.readInt(2);\n this.bitFlag = reader.readInt(2);\n this.compressionMethod = reader.readString(2);\n this.date = reader.readDate();\n this.crc32 = reader.readInt(4);\n this.compressedSize = reader.readInt(4);\n this.uncompressedSize = reader.readInt(4);\n this.fileNameLength = reader.readInt(2);\n this.extraFieldsLength = reader.readInt(2);\n this.fileCommentLength = reader.readInt(2);\n this.diskNumberStart = reader.readInt(2);\n this.internalFileAttributes = reader.readInt(2);\n this.externalFileAttributes = reader.readInt(4);\n this.localHeaderOffset = reader.readInt(4);\n\n if (this.isEncrypted()) {\n throw new Error(\"Encrypted zip are not supported\");\n }\n\n this.fileName = reader.readString(this.fileNameLength);\n this.readExtraFields(reader);\n this.parseZIP64ExtraField(reader);\n this.fileComment = reader.readString(this.fileCommentLength);\n\n // warning, this is true only for zip with madeBy == DOS (plateform dependent feature)\n this.dir = this.externalFileAttributes & 0x00000010 ? true : false;\n },\n /**\n * Parse the ZIP64 extra field and merge the info in the current ZipEntry.\n * @param {DataReader} reader the reader to use.\n */\n parseZIP64ExtraField: function(reader) {\n\n if (!this.extraFields[0x0001]) {\n return;\n }\n\n // should be something, preparing the extra reader\n var extraReader = new StringReader(this.extraFields[0x0001].value);\n\n // I really hope that these 64bits integer can fit in 32 bits integer, because js\n // won't let us have more.\n if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {\n this.uncompressedSize = extraReader.readInt(8);\n }\n if (this.compressedSize === utils.MAX_VALUE_32BITS) {\n this.compressedSize = extraReader.readInt(8);\n }\n if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {\n this.localHeaderOffset = extraReader.readInt(8);\n }\n if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {\n this.diskNumberStart = extraReader.readInt(4);\n }\n },\n /**\n * Read the central part of a zip file and add the info in this object.\n * @param {DataReader} reader the reader to use.\n */\n readExtraFields: function(reader) {\n var start = reader.index,\n extraFieldId,\n extraFieldLength,\n extraFieldValue;\n\n this.extraFields = this.extraFields || {};\n\n while (reader.index < start + this.extraFieldsLength) {\n extraFieldId = reader.readInt(2);\n extraFieldLength = reader.readInt(2);\n extraFieldValue = reader.readString(extraFieldLength);\n\n this.extraFields[extraFieldId] = {\n id: extraFieldId,\n length: extraFieldLength,\n value: extraFieldValue\n };\n }\n },\n /**\n * Apply an UTF8 transformation if needed.\n */\n handleUTF8: function() {\n if (this.useUTF8()) {\n this.fileName = jszipProto.utf8decode(this.fileName);\n this.fileComment = jszipProto.utf8decode(this.fileComment);\n } else {\n var upath = this.findExtraFieldUnicodePath();\n if (upath !== null) {\n this.fileName = upath;\n }\n var ucomment = this.findExtraFieldUnicodeComment();\n if (ucomment !== null) {\n this.fileComment = ucomment;\n }\n }\n },\n\n /**\n * Find the unicode path declared in the extra field, if any.\n * @return {String} the unicode path, null otherwise.\n */\n findExtraFieldUnicodePath: function() {\n var upathField = this.extraFields[0x7075];\n if (upathField) {\n var extraReader = new StringReader(upathField.value);\n\n // wrong version\n if (extraReader.readInt(1) !== 1) {\n return null;\n }\n\n // the crc of the filename changed, this field is out of date.\n if (jszipProto.crc32(this.fileName) !== extraReader.readInt(4)) {\n return null;\n }\n\n return jszipProto.utf8decode(extraReader.readString(upathField.length - 5));\n }\n return null;\n },\n\n /**\n * Find the unicode comment declared in the extra field, if any.\n * @return {String} the unicode comment, null otherwise.\n */\n findExtraFieldUnicodeComment: function() {\n var ucommentField = this.extraFields[0x6375];\n if (ucommentField) {\n var extraReader = new StringReader(ucommentField.value);\n\n // wrong version\n if (extraReader.readInt(1) !== 1) {\n return null;\n }\n\n // the crc of the comment changed, this field is out of date.\n if (jszipProto.crc32(this.fileComment) !== extraReader.readInt(4)) {\n return null;\n }\n\n return jszipProto.utf8decode(extraReader.readString(ucommentField.length - 5));\n }\n return null;\n }\n};\nmodule.exports = ZipEntry;\n\n},{\"./compressedObject\":2,\"./object\":13,\"./stringReader\":15,\"./utils\":21}],24:[function(_dereq_,module,exports){\n// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = _dereq_('./lib/utils/common').assign;\n\nvar deflate = _dereq_('./lib/deflate');\nvar inflate = _dereq_('./lib/inflate');\nvar constants = _dereq_('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n},{\"./lib/deflate\":25,\"./lib/inflate\":26,\"./lib/utils/common\":27,\"./lib/zlib/constants\":30}],25:[function(_dereq_,module,exports){\n'use strict';\n\n\nvar zlib_deflate = _dereq_('./zlib/deflate.js');\nvar utils = _dereq_('./utils/common');\nvar strings = _dereq_('./utils/strings');\nvar msg = _dereq_('./zlib/messages');\nvar zstream = _dereq_('./zlib/zstream');\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overriden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nvar Deflate = function(options) {\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n};\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|String): input data. Strings will be converted to\n * utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That flush internal pending buffers and call\n * [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function(data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && _mode === Z_FINISH)) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): ouput data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function(chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that input stream complete\n * or error happenned. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function(status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate alrorythm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n},{\"./utils/common\":27,\"./utils/strings\":28,\"./zlib/deflate.js\":32,\"./zlib/messages\":37,\"./zlib/zstream\":39}],26:[function(_dereq_,module,exports){\n'use strict';\n\n\nvar zlib_inflate = _dereq_('./zlib/inflate.js');\nvar utils = _dereq_('./utils/common');\nvar strings = _dereq_('./utils/strings');\nvar c = _dereq_('./zlib/constants');\nvar msg = _dereq_('./zlib/messages');\nvar zstream = _dereq_('./zlib/zstream');\nvar gzheader = _dereq_('./zlib/gzheader');\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overriden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nvar Inflate = function(options) {\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new gzheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n};\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That flush internal pending buffers and call\n * [[Inflate#onEnd]].\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function(data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && _mode === c.Z_FINISH)) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n } while ((strm.avail_in > 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): ouput data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function(chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell inflate that input stream complete\n * or error happenned. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function(status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 alligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n\n},{\"./utils/common\":27,\"./utils/strings\":28,\"./zlib/constants\":30,\"./zlib/gzheader\":33,\"./zlib/inflate.js\":35,\"./zlib/messages\":37,\"./zlib/zstream\":39}],27:[function(_dereq_,module,exports){\n'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof(source) !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (source.hasOwnProperty(p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs+len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for(var i=0; i= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);\n}\n_utf8len[254]=_utf8len[254]=1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n c2 = str.charCodeAt(m_pos+1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i=0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {\n c2 = str.charCodeAt(m_pos+1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // use fallback for big arrays to avoid stack overflow\n if (len < 65537) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for(var i=0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function(buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function(str) {\n var buf = new utils.Buf8(str.length);\n for(var i=0, len=buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len*2);\n\n for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function(buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max-1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Fuckup - very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means vuffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n},{\"./common\":27}],29:[function(_dereq_,module,exports){\n'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It doesn't worth to make additional optimizationa as in original.\n// Small size is preferable.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0\n , s2 = ((adler >>> 16) & 0xffff) |0\n , n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n},{}],30:[function(_dereq_,module,exports){\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n},{}],31:[function(_dereq_,module,exports){\n'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for(var n =0; n < 256; n++){\n c = n;\n for(var k =0; k < 8; k++){\n c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable\n , end = pos + len;\n\n crc = crc ^ (-1);\n\n for (var i = pos; i < end; i++ ) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n},{}],32:[function(_dereq_,module,exports){\n'use strict';\n\nvar utils = _dereq_('../utils/common');\nvar trees = _dereq_('./trees');\nvar adler32 = _dereq_('./adler32');\nvar crc32 = _dereq_('./crc32');\nvar msg = _dereq_('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2*L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only (s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH-1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH-1)) ? s.strstart : MIN_MATCH-1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH-1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size-MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH-1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length-1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH-1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH-1 ? s.strstart : MIN_MATCH-1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nvar Config = function (good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n};\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2*D_CODES+1) * 2);\n this.bl_tree = new utils.Buf16((2*BL_CODES+1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS+1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2*L_CODES+1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2*L_CODES+1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n s.d_buf = s.lit_bufsize >> 1;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg){\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n/* =========================================================================\n * Copy the source state to the destination state\n */\n//function deflateCopy(dest, source) {\n//\n//}\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n},{\"../utils/common\":27,\"./adler32\":29,\"./crc32\":31,\"./messages\":37,\"./trees\":38}],33:[function(_dereq_,module,exports){\n'use strict';\n\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n},{}],34:[function(_dereq_,module,exports){\n'use strict';\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n var window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n},{}],35:[function(_dereq_,module,exports){\n'use strict';\n\n\nvar utils = _dereq_('../utils/common');\nvar adler32 = _dereq_('./adler32');\nvar crc32 = _dereq_('./crc32');\nvar inflate_fast = _dereq_('./inffast');\nvar inflate_table = _dereq_('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction ZSWAP32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {bits: 9});\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {bits: 5});\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window,src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window,src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more conveniend processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = ZSWAP32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = {bits: state.lenbits};\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = {bits: state.lenbits};\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = {bits: state.distbits};\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) -1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' insdead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too\n if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n},{\"../utils/common\":27,\"./adler32\":29,\"./crc32\":31,\"./inffast\":34,\"./inftrees\":36}],36:[function(_dereq_,module,exports){\n'use strict';\n\n\nvar utils = _dereq_('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS+1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n var i=0;\n /* process all codes and make table entries */\n for (;;) {\n i++;\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n},{\"../utils/common\":27}],37:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = {\n '2': 'need dictionary', /* Z_NEED_DICT 2 */\n '1': 'stream end', /* Z_STREAM_END 1 */\n '0': '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n},{}],38:[function(_dereq_,module,exports){\n'use strict';\n\n\nvar utils = _dereq_('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2*L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES+2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH-MIN_MATCH+1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nvar StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n};\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nvar TreeDesc = function(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n};\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short (s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c*2]/*.Code*/, tree[c*2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max]*2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max+1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n*2 +1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n*2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n-base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n*2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length-1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits+1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m*2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m*2 + 1]/*.Len*/)*tree[m*2]/*.Freq*/;\n tree[m*2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS+1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits-1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES-1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1< dist code (0..29) */\n dist = 0;\n for (code = 0 ; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */\n for ( ; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n*2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n*2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n*2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n*2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES+1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n*2 + 1]/*.Len*/ = 5;\n static_dtree[n*2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc =new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK*2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n*2;\n var _m2 = m*2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j+1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx*2] << 8) | (s.pending_buf[s.d_buf + lx*2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code+LITERALS+1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n*2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node*2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code+1)*2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n+1)*2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6*2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10*2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138*2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n+1)*2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count-3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count-3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count-11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex]*2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3*(max_blindex+1) + 5+5+4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes-1, 5);\n send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n*2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES<<1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len+3+7) >>> 3;\n static_lenb = (s.static_len+3+7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len+4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES<<1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES<<1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code+1, s.d_desc.max_code+1, max_blindex+1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n},{\"../utils/common\":27}],39:[function(_dereq_,module,exports){\n'use strict';\n\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n},{}]},{},[9])\n(9)\n}));\n","/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported XLSX */\n/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */\nvar XLSX = {};\nfunction make_xlsx_lib(XLSX){\nXLSX.version = '0.17.5';\nvar current_codepage = 1200, current_ansi = 1252;\n/*global cptable:true, window */\nif(typeof module !== \"undefined\" && typeof require !== 'undefined') {\n\tif(typeof cptable === 'undefined') {\n\t\tif(typeof global !== 'undefined') global.cptable = require('./dist/cpexcel.js');\n\t\telse if(typeof window !== 'undefined') window.cptable = require('./dist/cpexcel.js');\n\t}\n}\n\nvar VALID_ANSI = [ 874, 932, 936, 949, 950 ];\nfor(var i = 0; i <= 8; ++i) VALID_ANSI.push(1250 + i);\n/* ECMA-376 Part I 18.4.1 charset to codepage mapping */\nvar CS2CP = ({\n0: 1252, /* ANSI */\n1: 65001, /* DEFAULT */\n2: 65001, /* SYMBOL */\n77: 10000, /* MAC */\n128: 932, /* SHIFTJIS */\n129: 949, /* HANGUL */\n130: 1361, /* JOHAB */\n134: 936, /* GB2312 */\n136: 950, /* CHINESEBIG5 */\n161: 1253, /* GREEK */\n162: 1254, /* TURKISH */\n163: 1258, /* VIETNAMESE */\n177: 1255, /* HEBREW */\n178: 1256, /* ARABIC */\n186: 1257, /* BALTIC */\n204: 1251, /* RUSSIAN */\n222: 874, /* THAI */\n238: 1250, /* EASTEUROPE */\n255: 1252, /* OEM */\n69: 6969 /* MISC */\n});\n\nvar set_ansi = function(cp) { if(VALID_ANSI.indexOf(cp) == -1) return; current_ansi = CS2CP[0] = cp; };\nfunction reset_ansi() { set_ansi(1252); }\n\nvar set_cp = function(cp) { current_codepage = cp; set_ansi(cp); };\nfunction reset_cp() { set_cp(1200); reset_ansi(); }\n\nfunction char_codes(data) { var o = []; for(var i = 0, len = data.length; i < len; ++i) o[i] = data.charCodeAt(i); return o; }\n\nfunction utf16leread(data) {\n\tvar o = [];\n\tfor(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i) + (data.charCodeAt(2*i+1)<<8));\n\treturn o.join(\"\");\n}\nfunction utf16beread(data) {\n\tvar o = [];\n\tfor(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i+1) + (data.charCodeAt(2*i)<<8));\n\treturn o.join(\"\");\n}\n\nvar debom = function(data) {\n\tvar c1 = data.charCodeAt(0), c2 = data.charCodeAt(1);\n\tif(c1 == 0xFF && c2 == 0xFE) return utf16leread(data.slice(2));\n\tif(c1 == 0xFE && c2 == 0xFF) return utf16beread(data.slice(2));\n\tif(c1 == 0xFEFF) return data.slice(1);\n\treturn data;\n};\n\nvar _getchar = function _gc1(x) { return String.fromCharCode(x); };\nvar _getansi = function _ga1(x) { return String.fromCharCode(x); };\nif(typeof cptable !== 'undefined') {\n\tset_cp = function(cp) { current_codepage = cp; set_ansi(cp); };\n\tdebom = function(data) {\n\t\tif(data.charCodeAt(0) === 0xFF && data.charCodeAt(1) === 0xFE) { return cptable.utils.decode(1200, char_codes(data.slice(2))); }\n\t\treturn data;\n\t};\n\t_getchar = function _gc2(x) {\n\t\tif(current_codepage === 1200) return String.fromCharCode(x);\n\t\treturn cptable.utils.decode(current_codepage, [x&255,x>>8])[0];\n\t};\n\t_getansi = function _ga2(x) {\n\t\treturn cptable.utils.decode(current_ansi, [x])[0];\n\t};\n}\nvar DENSE = null;\nvar DIF_XL = true;\nvar Base64 = (function make_b64(){\n\tvar map = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\treturn {\n\t\tencode: function(input) {\n\t\t\tvar o = \"\";\n\t\t\tvar c1=0, c2=0, c3=0, e1=0, e2=0, e3=0, e4=0;\n\t\t\tfor(var i = 0; i < input.length; ) {\n\t\t\t\tc1 = input.charCodeAt(i++);\n\t\t\t\te1 = (c1 >> 2);\n\n\t\t\t\tc2 = input.charCodeAt(i++);\n\t\t\t\te2 = ((c1 & 3) << 4) | (c2 >> 4);\n\n\t\t\t\tc3 = input.charCodeAt(i++);\n\t\t\t\te3 = ((c2 & 15) << 2) | (c3 >> 6);\n\t\t\t\te4 = (c3 & 63);\n\t\t\t\tif (isNaN(c2)) { e3 = e4 = 64; }\n\t\t\t\telse if (isNaN(c3)) { e4 = 64; }\n\t\t\t\to += map.charAt(e1) + map.charAt(e2) + map.charAt(e3) + map.charAt(e4);\n\t\t\t}\n\t\t\treturn o;\n\t\t},\n\t\tdecode: function b64_decode(input) {\n\t\t\tvar o = \"\";\n\t\t\tvar c1=0, c2=0, c3=0, e1=0, e2=0, e3=0, e4=0;\n\t\t\tinput = input.replace(/[^\\w\\+\\/\\=]/g, \"\");\n\t\t\tfor(var i = 0; i < input.length;) {\n\t\t\t\te1 = map.indexOf(input.charAt(i++));\n\t\t\t\te2 = map.indexOf(input.charAt(i++));\n\t\t\t\tc1 = (e1 << 2) | (e2 >> 4);\n\t\t\t\to += String.fromCharCode(c1);\n\n\t\t\t\te3 = map.indexOf(input.charAt(i++));\n\t\t\t\tc2 = ((e2 & 15) << 4) | (e3 >> 2);\n\t\t\t\tif (e3 !== 64) { o += String.fromCharCode(c2); }\n\n\t\t\t\te4 = map.indexOf(input.charAt(i++));\n\t\t\t\tc3 = ((e3 & 3) << 6) | e4;\n\t\t\t\tif (e4 !== 64) { o += String.fromCharCode(c3); }\n\t\t\t}\n\t\t\treturn o;\n\t\t}\n\t};\n})();\nvar has_buf = (typeof Buffer !== 'undefined' && typeof process !== 'undefined' && typeof process.versions !== 'undefined' && !!process.versions.node);\n\nvar Buffer_from = function(){};\n\nif(typeof Buffer !== 'undefined') {\n\tvar nbfs = !Buffer.from;\n\tif(!nbfs) try { Buffer.from(\"foo\", \"utf8\"); } catch(e) { nbfs = true; }\n\tBuffer_from = nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer);\n\t// $FlowIgnore\n\tif(!Buffer.alloc) Buffer.alloc = function(n) { return new Buffer(n); };\n\t// $FlowIgnore\n\tif(!Buffer.allocUnsafe) Buffer.allocUnsafe = function(n) { return new Buffer(n); };\n}\n\nfunction new_raw_buf(len) {\n\t/* jshint -W056 */\n\treturn has_buf ? Buffer.alloc(len) : new Array(len);\n\t/* jshint +W056 */\n}\n\nfunction new_unsafe_buf(len) {\n\t/* jshint -W056 */\n\treturn has_buf ? Buffer.allocUnsafe(len) : new Array(len);\n\t/* jshint +W056 */\n}\n\nvar s2a = function s2a(s) {\n\tif(has_buf) return Buffer_from(s, \"binary\");\n\treturn s.split(\"\").map(function(x){ return x.charCodeAt(0) & 0xff; });\n};\n\nfunction s2ab(s) {\n\tif(typeof ArrayBuffer === 'undefined') return s2a(s);\n\tvar buf = new ArrayBuffer(s.length), view = new Uint8Array(buf);\n\tfor (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\n\treturn buf;\n}\n\nfunction a2s(data) {\n\tif(Array.isArray(data)) return data.map(function(c) { return String.fromCharCode(c); }).join(\"\");\n\tvar o = []; for(var i = 0; i < data.length; ++i) o[i] = String.fromCharCode(data[i]); return o.join(\"\");\n}\n\nfunction a2u(data) {\n\tif(typeof Uint8Array === 'undefined') throw new Error(\"Unsupported\");\n\treturn new Uint8Array(data);\n}\n\nfunction ab2a(data) {\n\tif(typeof ArrayBuffer == 'undefined') throw new Error(\"Unsupported\");\n\tif(data instanceof ArrayBuffer) return ab2a(new Uint8Array(data));\nvar o = new Array(data.length);\n\tfor(var i = 0; i < data.length; ++i) o[i] = data[i];\n\treturn o;\n}\n\nvar bconcat = function(bufs) { return [].concat.apply([], bufs); };\n\nvar chr0 = /\\u0000/g, chr1 = /[\\u0001-\\u0006]/g;\n/* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/*jshint -W041 */\nvar SSF = ({});\nvar make_ssf = function make_ssf(SSF){\nSSF.version = '0.11.2';\nfunction _strrev(x) { var o = \"\", i = x.length-1; while(i>=0) o += x.charAt(i--); return o; }\nfunction fill(c,l) { var o = \"\"; while(o.length < l) o+=c; return o; }\nfunction pad0(v,d){var t=\"\"+v; return t.length>=d?t:fill('0',d-t.length)+t;}\nfunction pad_(v,d){var t=\"\"+v;return t.length>=d?t:fill(' ',d-t.length)+t;}\nfunction rpad_(v,d){var t=\"\"+v; return t.length>=d?t:t+fill(' ',d-t.length);}\nfunction pad0r1(v,d){var t=\"\"+Math.round(v); return t.length>=d?t:fill('0',d-t.length)+t;}\nfunction pad0r2(v,d){var t=\"\"+v; return t.length>=d?t:fill('0',d-t.length)+t;}\nvar p2_32 = Math.pow(2,32);\nfunction pad0r(v,d){if(v>p2_32||v<-p2_32) return pad0r1(v,d); var i = Math.round(v); return pad0r2(i,d); }\nfunction isgeneral(s, i) { i = i || 0; return s.length >= 7 + i && (s.charCodeAt(i)|32) === 103 && (s.charCodeAt(i+1)|32) === 101 && (s.charCodeAt(i+2)|32) === 110 && (s.charCodeAt(i+3)|32) === 101 && (s.charCodeAt(i+4)|32) === 114 && (s.charCodeAt(i+5)|32) === 97 && (s.charCodeAt(i+6)|32) === 108; }\nvar days = [\n\t['Sun', 'Sunday'],\n\t['Mon', 'Monday'],\n\t['Tue', 'Tuesday'],\n\t['Wed', 'Wednesday'],\n\t['Thu', 'Thursday'],\n\t['Fri', 'Friday'],\n\t['Sat', 'Saturday']\n];\nvar months = [\n\t['J', 'Jan', 'January'],\n\t['F', 'Feb', 'February'],\n\t['M', 'Mar', 'March'],\n\t['A', 'Apr', 'April'],\n\t['M', 'May', 'May'],\n\t['J', 'Jun', 'June'],\n\t['J', 'Jul', 'July'],\n\t['A', 'Aug', 'August'],\n\t['S', 'Sep', 'September'],\n\t['O', 'Oct', 'October'],\n\t['N', 'Nov', 'November'],\n\t['D', 'Dec', 'December']\n];\nfunction init_table(t) {\n\tt[0]= 'General';\n\tt[1]= '0';\n\tt[2]= '0.00';\n\tt[3]= '#,##0';\n\tt[4]= '#,##0.00';\n\tt[9]= '0%';\n\tt[10]= '0.00%';\n\tt[11]= '0.00E+00';\n\tt[12]= '# ?/?';\n\tt[13]= '# ??/??';\n\tt[14]= 'm/d/yy';\n\tt[15]= 'd-mmm-yy';\n\tt[16]= 'd-mmm';\n\tt[17]= 'mmm-yy';\n\tt[18]= 'h:mm AM/PM';\n\tt[19]= 'h:mm:ss AM/PM';\n\tt[20]= 'h:mm';\n\tt[21]= 'h:mm:ss';\n\tt[22]= 'm/d/yy h:mm';\n\tt[37]= '#,##0 ;(#,##0)';\n\tt[38]= '#,##0 ;[Red](#,##0)';\n\tt[39]= '#,##0.00;(#,##0.00)';\n\tt[40]= '#,##0.00;[Red](#,##0.00)';\n\tt[45]= 'mm:ss';\n\tt[46]= '[h]:mm:ss';\n\tt[47]= 'mmss.0';\n\tt[48]= '##0.0E+0';\n\tt[49]= '@';\n\tt[56]= '\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \"';\n}\n\nvar table_fmt = {};\ninit_table(table_fmt);\n/* Defaults determined by systematically testing in Excel 2019 */\n\n/* These formats appear to default to other formats in the table */\nvar default_map = [];\nvar defi = 0;\n\n// 5 -> 37 ... 8 -> 40\nfor(defi = 5; defi <= 8; ++defi) default_map[defi] = 32 + defi;\n\n// 23 -> 0 ... 26 -> 0\nfor(defi = 23; defi <= 26; ++defi) default_map[defi] = 0;\n\n// 27 -> 14 ... 31 -> 14\nfor(defi = 27; defi <= 31; ++defi) default_map[defi] = 14;\n// 50 -> 14 ... 58 -> 14\nfor(defi = 50; defi <= 58; ++defi) default_map[defi] = 14;\n\n// 59 -> 1 ... 62 -> 4\nfor(defi = 59; defi <= 62; ++defi) default_map[defi] = defi - 58;\n// 67 -> 9 ... 68 -> 10\nfor(defi = 67; defi <= 68; ++defi) default_map[defi] = defi - 58;\n// 72 -> 14 ... 75 -> 17\nfor(defi = 72; defi <= 75; ++defi) default_map[defi] = defi - 58;\n\n// 69 -> 12 ... 71 -> 14\nfor(defi = 67; defi <= 68; ++defi) default_map[defi] = defi - 57;\n\n// 76 -> 20 ... 78 -> 22\nfor(defi = 76; defi <= 78; ++defi) default_map[defi] = defi - 56;\n\n// 79 -> 45 ... 81 -> 47\nfor(defi = 79; defi <= 81; ++defi) default_map[defi] = defi - 34;\n\n// 82 -> 0 ... 65536 -> 0 (omitted)\n\n/* These formats technically refer to Accounting formats with no equivalent */\nvar default_str = [];\n\n// 5 -- Currency, 0 decimal, black negative\ndefault_str[5] = default_str[63] = '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)';\n// 6 -- Currency, 0 decimal, red negative\ndefault_str[6] = default_str[64] = '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)';\n// 7 -- Currency, 2 decimal, black negative\ndefault_str[7] = default_str[65] = '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)';\n// 8 -- Currency, 2 decimal, red negative\ndefault_str[8] = default_str[66] = '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)';\n\n// 41 -- Accounting, 0 decimal, No Symbol\ndefault_str[41] = '_(* #,##0_);_(* \\\\(#,##0\\\\);_(* \"-\"_);_(@_)';\n// 42 -- Accounting, 0 decimal, $ Symbol\ndefault_str[42] = '_(\"$\"* #,##0_);_(\"$\"* \\\\(#,##0\\\\);_(\"$\"* \"-\"_);_(@_)';\n// 43 -- Accounting, 2 decimal, No Symbol\ndefault_str[43] = '_(* #,##0.00_);_(* \\\\(#,##0.00\\\\);_(* \"-\"??_);_(@_)';\n// 44 -- Accounting, 2 decimal, $ Symbol\ndefault_str[44] = '_(\"$\"* #,##0.00_);_(\"$\"* \\\\(#,##0.00\\\\);_(\"$\"* \"-\"??_);_(@_)';\nfunction frac(x, D, mixed) {\n\tvar sgn = x < 0 ? -1 : 1;\n\tvar B = x * sgn;\n\tvar P_2 = 0, P_1 = 1, P = 0;\n\tvar Q_2 = 1, Q_1 = 0, Q = 0;\n\tvar A = Math.floor(B);\n\twhile(Q_1 < D) {\n\t\tA = Math.floor(B);\n\t\tP = A * P_1 + P_2;\n\t\tQ = A * Q_1 + Q_2;\n\t\tif((B - A) < 0.00000005) break;\n\t\tB = 1 / (B - A);\n\t\tP_2 = P_1; P_1 = P;\n\t\tQ_2 = Q_1; Q_1 = Q;\n\t}\n\tif(Q > D) { if(Q_1 > D) { Q = Q_2; P = P_2; } else { Q = Q_1; P = P_1; } }\n\tif(!mixed) return [0, sgn * P, Q];\n\tvar q = Math.floor(sgn * P/Q);\n\treturn [q, sgn*P - q*Q, Q];\n}\nfunction parse_date_code(v,opts,b2) {\n\tif(v > 2958465 || v < 0) return null;\n\tvar date = (v|0), time = Math.floor(86400 * (v - date)), dow=0;\n\tvar dout=[];\n\tvar out={D:date, T:time, u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};\n\tif(Math.abs(out.u) < 1e-6) out.u = 0;\n\tif(opts && opts.date1904) date += 1462;\n\tif(out.u > 0.9999) {\n\t\tout.u = 0;\n\t\tif(++time == 86400) { out.T = time = 0; ++date; ++out.D; }\n\t}\n\tif(date === 60) {dout = b2 ? [1317,10,29] : [1900,2,29]; dow=3;}\n\telse if(date === 0) {dout = b2 ? [1317,8,29] : [1900,1,0]; dow=6;}\n\telse {\n\t\tif(date > 60) --date;\n\t\t/* 1 = Jan 1 1900 in Gregorian */\n\t\tvar d = new Date(1900, 0, 1);\n\t\td.setDate(d.getDate() + date - 1);\n\t\tdout = [d.getFullYear(), d.getMonth()+1,d.getDate()];\n\t\tdow = d.getDay();\n\t\tif(date < 60) dow = (dow + 6) % 7;\n\t\tif(b2) dow = fix_hijri(d, dout);\n\t}\n\tout.y = dout[0]; out.m = dout[1]; out.d = dout[2];\n\tout.S = time % 60; time = Math.floor(time / 60);\n\tout.M = time % 60; time = Math.floor(time / 60);\n\tout.H = time;\n\tout.q = dow;\n\treturn out;\n}\nSSF.parse_date_code = parse_date_code;\nvar basedate = new Date(1899, 11, 31, 0, 0, 0);\nvar dnthresh = basedate.getTime();\nvar base1904 = new Date(1900, 2, 1, 0, 0, 0);\nfunction datenum_local(v, date1904) {\n\tvar epoch = v.getTime();\n\tif(date1904) epoch -= 1461*24*60*60*1000;\n\telse if(v >= base1904) epoch += 24*60*60*1000;\n\treturn (epoch - (dnthresh + (v.getTimezoneOffset() - basedate.getTimezoneOffset()) * 60000)) / (24 * 60 * 60 * 1000);\n}\n/* The longest 32-bit integer text is \"-4294967296\", exactly 11 chars */\nfunction general_fmt_int(v) { return v.toString(10); }\nSSF._general_int = general_fmt_int;\n\n/* ECMA-376 18.8.30 numFmt*/\n/* Note: `toPrecision` uses standard form when prec > E and E >= -6 */\nvar general_fmt_num = (function make_general_fmt_num() {\n\tvar trailing_zeroes_and_decimal = /(?:\\.0*|(\\.\\d*[1-9])0+)$/;\n\tfunction strip_decimal(o) {\n\t\treturn (o.indexOf(\".\") == -1) ? o : o.replace(trailing_zeroes_and_decimal, \"$1\");\n\t}\n\n\t/* General Exponential always shows 2 digits exp and trims the mantissa */\n\tvar mantissa_zeroes_and_decimal = /(?:\\.0*|(\\.\\d*[1-9])0+)[Ee]/;\n\tvar exp_with_single_digit = /(E[+-])(\\d)$/;\n\tfunction normalize_exp(o) {\n\t\tif(o.indexOf(\"E\") == -1) return o;\n\t\treturn o.replace(mantissa_zeroes_and_decimal,\"$1E\").replace(exp_with_single_digit,\"$10$2\");\n\t}\n\n\t/* exponent >= -9 and <= 9 */\n\tfunction small_exp(v) {\n\t\tvar w = (v<0?12:11);\n\t\tvar o = strip_decimal(v.toFixed(12)); if(o.length <= w) return o;\n\t\to = v.toPrecision(10); if(o.length <= w) return o;\n\t\treturn v.toExponential(5);\n\t}\n\n\t/* exponent >= 11 or <= -10 likely exponential */\n\tfunction large_exp(v) {\n\t\tvar o = strip_decimal(v.toFixed(11));\n\t\treturn (o.length > (v<0?12:11) || o === \"0\" || o === \"-0\") ? v.toPrecision(6) : o;\n\t}\n\n\tfunction general_fmt_num_base(v) {\n\t\tvar V = Math.floor(Math.log(Math.abs(v))*Math.LOG10E), o;\n\n\t\tif(V >= -4 && V <= -1) o = v.toPrecision(10+V);\n\t\telse if(Math.abs(V) <= 9) o = small_exp(v);\n\t\telse if(V === 10) o = v.toFixed(10).substr(0,12);\n\t\telse o = large_exp(v);\n\n\t\treturn strip_decimal(normalize_exp(o.toUpperCase()));\n\t}\n\n\treturn general_fmt_num_base;\n})();\nSSF._general_num = general_fmt_num;\n\n/*\n\t\"General\" rules:\n\t- text is passed through (\"@\")\n\t- booleans are rendered as TRUE/FALSE\n\t- \"up to 11 characters\" displayed for numbers\n\t- Default date format (code 14) used for Dates\n\n\tTODO: technically the display depends on the width of the cell\n*/\nfunction general_fmt(v, opts) {\n\tswitch(typeof v) {\n\t\tcase 'string': return v;\n\t\tcase 'boolean': return v ? \"TRUE\" : \"FALSE\";\n\t\tcase 'number': return (v|0) === v ? v.toString(10) : general_fmt_num(v);\n\t\tcase 'undefined': return \"\";\n\t\tcase 'object':\n\t\t\tif(v == null) return \"\";\n\t\t\tif(v instanceof Date) return format(14, datenum_local(v, opts && opts.date1904), opts);\n\t}\n\tthrow new Error(\"unsupported value in General format: \" + v);\n}\nSSF._general = general_fmt;\nfunction fix_hijri(date, o) {\n /* TODO: properly adjust y/m/d and */\n o[0] -= 581;\n var dow = date.getDay();\n if(date < 60) dow = (dow + 6) % 7;\n return dow;\n}\n//var THAI_DIGITS = \"\\u0E50\\u0E51\\u0E52\\u0E53\\u0E54\\u0E55\\u0E56\\u0E57\\u0E58\\u0E59\".split(\"\");\n/*jshint -W086 */\nfunction write_date(type, fmt, val, ss0) {\n\tvar o=\"\", ss=0, tt=0, y = val.y, out, outl = 0;\n\tswitch(type) {\n\t\tcase 98: /* 'b' buddhist year */\n\t\t\ty = val.y + 543;\n\t\t\t/* falls through */\n\t\tcase 121: /* 'y' year */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = y % 100; outl = 2; break;\n\t\t\tdefault: out = y % 10000; outl = 4; break;\n\t\t} break;\n\t\tcase 109: /* 'm' month */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.m; outl = fmt.length; break;\n\t\t\tcase 3: return months[val.m-1][1];\n\t\t\tcase 5: return months[val.m-1][0];\n\t\t\tdefault: return months[val.m-1][2];\n\t\t} break;\n\t\tcase 100: /* 'd' day */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.d; outl = fmt.length; break;\n\t\t\tcase 3: return days[val.q][0];\n\t\t\tdefault: return days[val.q][1];\n\t\t} break;\n\t\tcase 104: /* 'h' 12-hour */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = 1+(val.H+11)%12; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad hour format: ' + fmt;\n\t\t} break;\n\t\tcase 72: /* 'H' 24-hour */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.H; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad hour format: ' + fmt;\n\t\t} break;\n\t\tcase 77: /* 'M' minutes */\n\t\tswitch(fmt.length) {\n\t\t\tcase 1: case 2: out = val.M; outl = fmt.length; break;\n\t\t\tdefault: throw 'bad minute format: ' + fmt;\n\t\t} break;\n\t\tcase 115: /* 's' seconds */\n\t\t\tif(fmt != 's' && fmt != 'ss' && fmt != '.0' && fmt != '.00' && fmt != '.000') throw 'bad second format: ' + fmt;\n\t\t\tif(val.u === 0 && (fmt == \"s\" || fmt == \"ss\")) return pad0(val.S, fmt.length);\nif(ss0 >= 2) tt = ss0 === 3 ? 1000 : 100;\n\t\t\telse tt = ss0 === 1 ? 10 : 1;\n\t\t\tss = Math.round((tt)*(val.S + val.u));\n\t\t\tif(ss >= 60*tt) ss = 0;\n\t\t\tif(fmt === 's') return ss === 0 ? \"0\" : \"\"+ss/tt;\n\t\t\to = pad0(ss,2 + ss0);\n\t\t\tif(fmt === 'ss') return o.substr(0,2);\n\t\t\treturn \".\" + o.substr(2,fmt.length-1);\n\t\tcase 90: /* 'Z' absolute time */\n\t\tswitch(fmt) {\n\t\t\tcase '[h]': case '[hh]': out = val.D*24+val.H; break;\n\t\t\tcase '[m]': case '[mm]': out = (val.D*24+val.H)*60+val.M; break;\n\t\t\tcase '[s]': case '[ss]': out = ((val.D*24+val.H)*60+val.M)*60+Math.round(val.S+val.u); break;\n\t\t\tdefault: throw 'bad abstime format: ' + fmt;\n\t\t} outl = fmt.length === 3 ? 1 : 2; break;\n\t\tcase 101: /* 'e' era */\n\t\t\tout = y; outl = 1; break;\n\t}\n\tvar outstr = outl > 0 ? pad0(out, outl) : \"\";\n\treturn outstr;\n}\n/*jshint +W086 */\nfunction commaify(s) {\n\tvar w = 3;\n\tif(s.length <= w) return s;\n\tvar j = (s.length % w), o = s.substr(0,j);\n\tfor(; j!=s.length; j+=w) o+=(o.length > 0 ? \",\" : \"\") + s.substr(j,w);\n\treturn o;\n}\nvar write_num = (function make_write_num(){\nvar pct1 = /%/g;\nfunction write_num_pct(type, fmt, val){\n\tvar sfmt = fmt.replace(pct1,\"\"), mul = fmt.length - sfmt.length;\n\treturn write_num(type, sfmt, val * Math.pow(10,2*mul)) + fill(\"%\",mul);\n}\nfunction write_num_cm(type, fmt, val){\n\tvar idx = fmt.length - 1;\n\twhile(fmt.charCodeAt(idx-1) === 44) --idx;\n\treturn write_num(type, fmt.substr(0,idx), val / Math.pow(10,3*(fmt.length-idx)));\n}\nfunction write_num_exp(fmt, val){\n\tvar o;\n\tvar idx = fmt.indexOf(\"E\") - fmt.indexOf(\".\") - 1;\n\tif(fmt.match(/^#+0.0E\\+0$/)) {\n\t\tif(val == 0) return \"0.0E+0\";\n\t\telse if(val < 0) return \"-\" + write_num_exp(fmt, -val);\n\t\tvar period = fmt.indexOf(\".\"); if(period === -1) period=fmt.indexOf('E');\n\t\tvar ee = Math.floor(Math.log(val)*Math.LOG10E)%period;\n\t\tif(ee < 0) ee += period;\n\t\to = (val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);\n\t\tif(o.indexOf(\"e\") === -1) {\n\t\t\tvar fakee = Math.floor(Math.log(val)*Math.LOG10E);\n\t\t\tif(o.indexOf(\".\") === -1) o = o.charAt(0) + \".\" + o.substr(1) + \"E+\" + (fakee - o.length+ee);\n\t\t\telse o += \"E+\" + (fakee - ee);\n\t\t\twhile(o.substr(0,2) === \"0.\") {\n\t\t\t\to = o.charAt(0) + o.substr(2,period) + \".\" + o.substr(2+period);\n\t\t\t\to = o.replace(/^0+([1-9])/,\"$1\").replace(/^0+\\./,\"0.\");\n\t\t\t}\n\t\t\to = o.replace(/\\+-/,\"-\");\n\t\t}\n\t\to = o.replace(/^([+-]?)(\\d*)\\.(\\d*)[Ee]/,function($$,$1,$2,$3) { return $1 + $2 + $3.substr(0,(period+ee)%period) + \".\" + $3.substr(ee) + \"E\"; });\n\t} else o = val.toExponential(idx);\n\tif(fmt.match(/E\\+00$/) && o.match(/e[+-]\\d$/)) o = o.substr(0,o.length-1) + \"0\" + o.charAt(o.length-1);\n\tif(fmt.match(/E\\-/) && o.match(/e\\+/)) o = o.replace(/e\\+/,\"e\");\n\treturn o.replace(\"e\",\"E\");\n}\nvar frac1 = /# (\\?+)( ?)\\/( ?)(\\d+)/;\nfunction write_num_f1(r, aval, sign) {\n\tvar den = parseInt(r[4],10), rr = Math.round(aval * den), base = Math.floor(rr/den);\n\tvar myn = (rr - base*den), myd = den;\n\treturn sign + (base === 0 ? \"\" : \"\"+base) + \" \" + (myn === 0 ? fill(\" \", r[1].length + 1 + r[4].length) : pad_(myn,r[1].length) + r[2] + \"/\" + r[3] + pad0(myd,r[4].length));\n}\nfunction write_num_f2(r, aval, sign) {\n\treturn sign + (aval === 0 ? \"\" : \"\"+aval) + fill(\" \", r[1].length + 2 + r[4].length);\n}\nvar dec1 = /^#*0*\\.([0#]+)/;\nvar closeparen = /\\).*[0#]/;\nvar phone = /\\(###\\) ###\\\\?-####/;\nfunction hashq(str) {\n\tvar o = \"\", cc;\n\tfor(var i = 0; i != str.length; ++i) switch((cc=str.charCodeAt(i))) {\n\t\tcase 35: break;\n\t\tcase 63: o+= \" \"; break;\n\t\tcase 48: o+= \"0\"; break;\n\t\tdefault: o+= String.fromCharCode(cc);\n\t}\n\treturn o;\n}\nfunction rnd(val, d) { var dd = Math.pow(10,d); return \"\"+(Math.round(val * dd)/dd); }\nfunction dec(val, d) {\n\tvar _frac = val - Math.floor(val), dd = Math.pow(10,d);\n\tif (d < ('' + Math.round(_frac * dd)).length) return 0;\n\treturn Math.round(_frac * dd);\n}\nfunction carry(val, d) {\n\tif (d < ('' + Math.round((val-Math.floor(val))*Math.pow(10,d))).length) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}\nfunction flr(val) {\n\tif(val < 2147483647 && val > -2147483648) return \"\"+(val >= 0 ? (val|0) : (val-1|0));\n\treturn \"\"+Math.floor(val);\n}\nfunction write_num_flt(type, fmt, val) {\n\tif(type.charCodeAt(0) === 40 && !fmt.match(closeparen)) {\n\t\tvar ffmt = fmt.replace(/\\( */,\"\").replace(/ \\)/,\"\").replace(/\\)/,\"\");\n\t\tif(val >= 0) return write_num_flt('n', ffmt, val);\n\t\treturn '(' + write_num_flt('n', ffmt, -val) + ')';\n\t}\n\tif(fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm(type, fmt, val);\n\tif(fmt.indexOf('%') !== -1) return write_num_pct(type, fmt, val);\n\tif(fmt.indexOf('E') !== -1) return write_num_exp(fmt, val);\n\tif(fmt.charCodeAt(0) === 36) return \"$\"+write_num_flt(type,fmt.substr(fmt.charAt(1)==' '?2:1),val);\n\tvar o;\n\tvar r, ri, ff, aval = Math.abs(val), sign = val < 0 ? \"-\" : \"\";\n\tif(fmt.match(/^00+$/)) return sign + pad0r(aval,fmt.length);\n\tif(fmt.match(/^[#?]+$/)) {\n\t\to = pad0r(val,0); if(o === \"0\") o = \"\";\n\t\treturn o.length > fmt.length ? o : hashq(fmt.substr(0,fmt.length-o.length)) + o;\n\t}\n\tif((r = fmt.match(frac1))) return write_num_f1(r, aval, sign);\n\tif(fmt.match(/^#+0+$/)) return sign + pad0r(aval,fmt.length - fmt.indexOf(\"0\"));\n\tif((r = fmt.match(dec1))) {\n\t\to = rnd(val, r[1].length).replace(/^([^\\.]+)$/,\"$1.\"+hashq(r[1])).replace(/\\.$/,\".\"+hashq(r[1])).replace(/\\.(\\d*)$/,function($$, $1) { return \".\" + $1 + fill(\"0\", hashq(r[1]).length-$1.length); });\n\t\treturn fmt.indexOf(\"0.\") !== -1 ? o : o.replace(/^0\\./,\".\");\n\t}\n\tfmt = fmt.replace(/^#+([0.])/, \"$1\");\n\tif((r = fmt.match(/^(0*)\\.(#*)$/))) {\n\t\treturn sign + rnd(aval, r[2].length).replace(/\\.(\\d*[1-9])0*$/,\".$1\").replace(/^(-?\\d*)$/,\"$1.\").replace(/^0\\./,r[1].length?\"0.\":\".\");\n\t}\n\tif((r = fmt.match(/^#{1,3},##0(\\.?)$/))) return sign + commaify(pad0r(aval,0));\n\tif((r = fmt.match(/^#,##0\\.([#0]*0)$/))) {\n\t\treturn val < 0 ? \"-\" + write_num_flt(type, fmt, -val) : commaify(\"\"+(Math.floor(val) + carry(val, r[1].length))) + \".\" + pad0(dec(val, r[1].length),r[1].length);\n\t}\n\tif((r = fmt.match(/^#,#*,#0/))) return write_num_flt(type,fmt.replace(/^#,#*,/,\"\"),val);\n\tif((r = fmt.match(/^([0#]+)(\\\\?-([0#]+))+$/))) {\n\t\to = _strrev(write_num_flt(type, fmt.replace(/[\\\\-]/g,\"\"), val));\n\t\tri = 0;\n\t\treturn _strrev(_strrev(fmt.replace(/\\\\/g,\"\")).replace(/[0#]/g,function(x){return ri= 0) return write_num_int('n', ffmt, val);\n\t\treturn '(' + write_num_int('n', ffmt, -val) + ')';\n\t}\n\tif(fmt.charCodeAt(fmt.length - 1) === 44) return write_num_cm2(type, fmt, val);\n\tif(fmt.indexOf('%') !== -1) return write_num_pct2(type, fmt, val);\n\tif(fmt.indexOf('E') !== -1) return write_num_exp2(fmt, val);\n\tif(fmt.charCodeAt(0) === 36) return \"$\"+write_num_int(type,fmt.substr(fmt.charAt(1)==' '?2:1),val);\n\tvar o;\n\tvar r, ri, ff, aval = Math.abs(val), sign = val < 0 ? \"-\" : \"\";\n\tif(fmt.match(/^00+$/)) return sign + pad0(aval,fmt.length);\n\tif(fmt.match(/^[#?]+$/)) {\n\t\to = (\"\"+val); if(val === 0) o = \"\";\n\t\treturn o.length > fmt.length ? o : hashq(fmt.substr(0,fmt.length-o.length)) + o;\n\t}\n\tif((r = fmt.match(frac1))) return write_num_f2(r, aval, sign);\n\tif(fmt.match(/^#+0+$/)) return sign + pad0(aval,fmt.length - fmt.indexOf(\"0\"));\n\tif((r = fmt.match(dec1))) {\no = (\"\"+val).replace(/^([^\\.]+)$/,\"$1.\"+hashq(r[1])).replace(/\\.$/,\".\"+hashq(r[1]));\n\t\to = o.replace(/\\.(\\d*)$/,function($$, $1) {\nreturn \".\" + $1 + fill(\"0\", hashq(r[1]).length-$1.length); });\n\t\treturn fmt.indexOf(\"0.\") !== -1 ? o : o.replace(/^0\\./,\".\");\n\t}\n\tfmt = fmt.replace(/^#+([0.])/, \"$1\");\n\tif((r = fmt.match(/^(0*)\\.(#*)$/))) {\n\t\treturn sign + (\"\"+aval).replace(/\\.(\\d*[1-9])0*$/,\".$1\").replace(/^(-?\\d*)$/,\"$1.\").replace(/^0\\./,r[1].length?\"0.\":\".\");\n\t}\n\tif((r = fmt.match(/^#{1,3},##0(\\.?)$/))) return sign + commaify((\"\"+aval));\n\tif((r = fmt.match(/^#,##0\\.([#0]*0)$/))) {\n\t\treturn val < 0 ? \"-\" + write_num_int(type, fmt, -val) : commaify((\"\"+val)) + \".\" + fill('0',r[1].length);\n\t}\n\tif((r = fmt.match(/^#,#*,#0/))) return write_num_int(type,fmt.replace(/^#,#*,/,\"\"),val);\n\tif((r = fmt.match(/^([0#]+)(\\\\?-([0#]+))+$/))) {\n\t\to = _strrev(write_num_int(type, fmt.replace(/[\\\\-]/g,\"\"), val));\n\t\tri = 0;\n\t\treturn _strrev(_strrev(fmt.replace(/\\\\/g,\"\")).replace(/[0#]/g,function(x){return ri -1 || (c=='\\\\' && fmt.charAt(i+1) == \"-\" && \"0#\".indexOf(fmt.charAt(i+2))>-1))){/* empty */}\n\t\t\t\tbreak;\n\t\t\tcase '?': while(fmt.charAt(++i) === c){/* empty */} break;\n\t\t\tcase '*': ++i; if(fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; break;\n\t\t\tcase '(': case ')': ++i; break;\n\t\t\tcase '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':\n\t\t\t\twhile(i < fmt.length && \"0123456789\".indexOf(fmt.charAt(++i)) > -1){/* empty */} break;\n\t\t\tcase ' ': ++i; break;\n\t\t\tdefault: ++i; break;\n\t\t}\n\t}\n\treturn false;\n}\nSSF.is_date = fmt_is_date;\nfunction eval_fmt(fmt, v, opts, flen) {\n\tvar out = [], o = \"\", i = 0, c = \"\", lst='t', dt, j, cc;\n\tvar hr='H';\n\t/* Tokenize */\n\twhile(i < fmt.length) {\n\t\tswitch((c = fmt.charAt(i))) {\n\t\t\tcase 'G': /* General */\n\t\t\t\tif(!isgeneral(fmt, i)) throw new Error('unrecognized character ' + c + ' in ' +fmt);\n\t\t\t\tout[out.length] = {t:'G', v:'General'}; i+=7; break;\n\t\t\tcase '\"': /* Literal text */\n\t\t\t\tfor(o=\"\";(cc=fmt.charCodeAt(++i)) !== 34 && i < fmt.length;) o += String.fromCharCode(cc);\n\t\t\t\tout[out.length] = {t:'t', v:o}; ++i; break;\n\t\t\tcase '\\\\': var w = fmt.charAt(++i), t = (w === \"(\" || w === \")\") ? w : 't';\n\t\t\t\tout[out.length] = {t:t, v:w}; ++i; break;\n\t\t\tcase '_': out[out.length] = {t:'t', v:\" \"}; i+=2; break;\n\t\t\tcase '@': /* Text Placeholder */\n\t\t\t\tout[out.length] = {t:'T', v:v}; ++i; break;\n\t\t\tcase 'B': case 'b':\n\t\t\t\tif(fmt.charAt(i+1) === \"1\" || fmt.charAt(i+1) === \"2\") {\n\t\t\t\t\tif(dt==null) { dt=parse_date_code(v, opts, fmt.charAt(i+1) === \"2\"); if(dt==null) return \"\"; }\n\t\t\t\t\tout[out.length] = {t:'X', v:fmt.substr(i,2)}; lst = c; i+=2; break;\n\t\t\t\t}\n\t\t\t\t/* falls through */\n\t\t\tcase 'M': case 'D': case 'Y': case 'H': case 'S': case 'E':\n\t\t\t\tc = c.toLowerCase();\n\t\t\t\t/* falls through */\n\t\t\tcase 'm': case 'd': case 'y': case 'h': case 's': case 'e': case 'g':\n\t\t\t\tif(v < 0) return \"\";\n\t\t\t\tif(dt==null) { dt=parse_date_code(v, opts); if(dt==null) return \"\"; }\n\t\t\t\to = c; while(++i < fmt.length && fmt.charAt(i).toLowerCase() === c) o+=c;\n\t\t\t\tif(c === 'm' && lst.toLowerCase() === 'h') c = 'M';\n\t\t\t\tif(c === 'h') c = hr;\n\t\t\t\tout[out.length] = {t:c, v:o}; lst = c; break;\n\t\t\tcase 'A': case 'a': case '上':\n\t\t\t\tvar q={t:c, v:c};\n\t\t\t\tif(dt==null) dt=parse_date_code(v, opts);\n\t\t\t\tif(fmt.substr(i, 3).toUpperCase() === \"A/P\") { if(dt!=null) q.v = dt.H >= 12 ? \"P\" : \"A\"; q.t = 'T'; hr='h';i+=3;}\n\t\t\t\telse if(fmt.substr(i,5).toUpperCase() === \"AM/PM\") { if(dt!=null) q.v = dt.H >= 12 ? \"PM\" : \"AM\"; q.t = 'T'; i+=5; hr='h'; }\n\t\t\t\telse if(fmt.substr(i,5).toUpperCase() === \"上午/下午\") { if(dt!=null) q.v = dt.H >= 12 ? \"下午\" : \"上午\"; q.t = 'T'; i+=5; hr='h'; }\n\t\t\t\telse { q.t = \"t\"; ++i; }\n\t\t\t\tif(dt==null && q.t === 'T') return \"\";\n\t\t\t\tout[out.length] = q; lst = c; break;\n\t\t\tcase '[':\n\t\t\t\to = c;\n\t\t\t\twhile(fmt.charAt(i++) !== ']' && i < fmt.length) o += fmt.charAt(i);\n\t\t\t\tif(o.slice(-1) !== ']') throw 'unterminated \"[\" block: |' + o + '|';\n\t\t\t\tif(o.match(abstime)) {\n\t\t\t\t\tif(dt==null) { dt=parse_date_code(v, opts); if(dt==null) return \"\"; }\n\t\t\t\t\tout[out.length] = {t:'Z', v:o.toLowerCase()};\n\t\t\t\t\tlst = o.charAt(1);\n\t\t\t\t} else if(o.indexOf(\"$\") > -1) {\n\t\t\t\t\to = (o.match(/\\$([^-\\[\\]]*)/)||[])[1]||\"$\";\n\t\t\t\t\tif(!fmt_is_date(fmt)) out[out.length] = {t:'t',v:o};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t/* Numbers */\n\t\t\tcase '.':\n\t\t\t\tif(dt != null) {\n\t\t\t\t\to = c; while(++i < fmt.length && (c=fmt.charAt(i)) === \"0\") o += c;\n\t\t\t\t\tout[out.length] = {t:'s', v:o}; break;\n\t\t\t\t}\n\t\t\t\t/* falls through */\n\t\t\tcase '0': case '#':\n\t\t\t\to = c; while(++i < fmt.length && \"0#?.,E+-%\".indexOf(c=fmt.charAt(i)) > -1) o += c;\n\t\t\t\tout[out.length] = {t:'n', v:o}; break;\n\t\t\tcase '?':\n\t\t\t\to = c; while(fmt.charAt(++i) === c) o+=c;\n\t\t\t\tout[out.length] = {t:c, v:o}; lst = c; break;\n\t\t\tcase '*': ++i; if(fmt.charAt(i) == ' ' || fmt.charAt(i) == '*') ++i; break; // **\n\t\t\tcase '(': case ')': out[out.length] = {t:(flen===1?'t':c), v:c}; ++i; break;\n\t\t\tcase '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':\n\t\t\t\to = c; while(i < fmt.length && \"0123456789\".indexOf(fmt.charAt(++i)) > -1) o+=fmt.charAt(i);\n\t\t\t\tout[out.length] = {t:'D', v:o}; break;\n\t\t\tcase ' ': out[out.length] = {t:c, v:c}; ++i; break;\n\t\t\tcase '$': out[out.length] = {t:'t', v:'$'}; ++i; break;\n\t\t\tdefault:\n\t\t\t\tif(\",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP\".indexOf(c) === -1) throw new Error('unrecognized character ' + c + ' in ' + fmt);\n\t\t\t\tout[out.length] = {t:'t', v:c}; ++i; break;\n\t\t}\n\t}\n\n\t/* Scan for date/time parts */\n\tvar bt = 0, ss0 = 0, ssm;\n\tfor(i=out.length-1, lst='t'; i >= 0; --i) {\n\t\tswitch(out[i].t) {\n\t\t\tcase 'h': case 'H': out[i].t = hr; lst='h'; if(bt < 1) bt = 1; break;\n\t\t\tcase 's':\n\t\t\t\tif((ssm=out[i].v.match(/\\.0+$/))) ss0=Math.max(ss0,ssm[0].length-1);\n\t\t\t\tif(bt < 3) bt = 3;\n\t\t\t/* falls through */\n\t\t\tcase 'd': case 'y': case 'M': case 'e': lst=out[i].t; break;\n\t\t\tcase 'm': if(lst === 's') { out[i].t = 'M'; if(bt < 2) bt = 2; } break;\n\t\t\tcase 'X': /*if(out[i].v === \"B2\");*/\n\t\t\t\tbreak;\n\t\t\tcase 'Z':\n\t\t\t\tif(bt < 1 && out[i].v.match(/[Hh]/)) bt = 1;\n\t\t\t\tif(bt < 2 && out[i].v.match(/[Mm]/)) bt = 2;\n\t\t\t\tif(bt < 3 && out[i].v.match(/[Ss]/)) bt = 3;\n\t\t}\n\t}\n\t/* time rounding depends on presence of minute / second / usec fields */\n\tswitch(bt) {\n\t\tcase 0: break;\n\t\tcase 1:\nif(dt.u >= 0.5) { dt.u = 0; ++dt.S; }\n\t\t\tif(dt.S >= 60) { dt.S = 0; ++dt.M; }\n\t\t\tif(dt.M >= 60) { dt.M = 0; ++dt.H; }\n\t\t\tbreak;\n\t\tcase 2:\nif(dt.u >= 0.5) { dt.u = 0; ++dt.S; }\n\t\t\tif(dt.S >= 60) { dt.S = 0; ++dt.M; }\n\t\t\tbreak;\n\t}\n\n\t/* replace fields */\n\tvar nstr = \"\", jj;\n\tfor(i=0; i < out.length; ++i) {\n\t\tswitch(out[i].t) {\n\t\t\tcase 't': case 'T': case ' ': case 'D': break;\n\t\t\tcase 'X': out[i].v = \"\"; out[i].t = \";\"; break;\n\t\t\tcase 'd': case 'm': case 'y': case 'h': case 'H': case 'M': case 's': case 'e': case 'b': case 'Z':\nout[i].v = write_date(out[i].t.charCodeAt(0), out[i].v, dt, ss0);\n\t\t\t\tout[i].t = 't'; break;\n\t\t\tcase 'n': case '?':\n\t\t\t\tjj = i+1;\n\t\t\t\twhile(out[jj] != null && (\n\t\t\t\t\t(c=out[jj].t) === \"?\" || c === \"D\" ||\n\t\t\t\t\t((c === \" \" || c === \"t\") && out[jj+1] != null && (out[jj+1].t === '?' || out[jj+1].t === \"t\" && out[jj+1].v === '/')) ||\n\t\t\t\t\t(out[i].t === '(' && (c === ' ' || c === 'n' || c === ')')) ||\n\t\t\t\t\t(c === 't' && (out[jj].v === '/' || out[jj].v === ' ' && out[jj+1] != null && out[jj+1].t == '?'))\n\t\t\t\t)) {\n\t\t\t\t\tout[i].v += out[jj].v;\n\t\t\t\t\tout[jj] = {v:\"\", t:\";\"}; ++jj;\n\t\t\t\t}\n\t\t\t\tnstr += out[i].v;\n\t\t\t\ti = jj-1; break;\n\t\t\tcase 'G': out[i].t = 't'; out[i].v = general_fmt(v,opts); break;\n\t\t}\n\t}\n\tvar vv = \"\", myv, ostr;\n\tif(nstr.length > 0) {\n\t\tif(nstr.charCodeAt(0) == 40) /* '(' */ {\n\t\t\tmyv = (v<0&&nstr.charCodeAt(0) === 45 ? -v : v);\n\t\t\tostr = write_num('n', nstr, myv);\n\t\t} else {\n\t\t\tmyv = (v<0 && flen > 1 ? -v : v);\n\t\t\tostr = write_num('n', nstr, myv);\n\t\t\tif(myv < 0 && out[0] && out[0].t == 't') {\n\t\t\t\tostr = ostr.substr(1);\n\t\t\t\tout[0].v = \"-\" + out[0].v;\n\t\t\t}\n\t\t}\n\t\tjj=ostr.length-1;\n\t\tvar decpt = out.length;\n\t\tfor(i=0; i < out.length; ++i) if(out[i] != null && out[i].t != 't' && out[i].v.indexOf(\".\") > -1) { decpt = i; break; }\n\t\tvar lasti=out.length;\n\t\tif(decpt === out.length && ostr.indexOf(\"E\") === -1) {\n\t\t\tfor(i=out.length-1; i>= 0;--i) {\n\t\t\t\tif(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue;\n\t\t\t\tif(jj>=out[i].v.length-1) { jj -= out[i].v.length; out[i].v = ostr.substr(jj+1, out[i].v.length); }\n\t\t\t\telse if(jj < 0) out[i].v = \"\";\n\t\t\t\telse { out[i].v = ostr.substr(0, jj+1); jj = -1; }\n\t\t\t\tout[i].t = 't';\n\t\t\t\tlasti = i;\n\t\t\t}\n\t\t\tif(jj>=0 && lasti= 0; --i) {\n\t\t\t\tif(out[i] == null || 'n?'.indexOf(out[i].t) === -1) continue;\n\t\t\t\tj=out[i].v.indexOf(\".\")>-1&&i===decpt?out[i].v.indexOf(\".\")-1:out[i].v.length-1;\n\t\t\t\tvv = out[i].v.substr(j+1);\n\t\t\t\tfor(; j>=0; --j) {\n\t\t\t\t\tif(jj>=0 && (out[i].v.charAt(j) === \"0\" || out[i].v.charAt(j) === \"#\")) vv = ostr.charAt(jj--) + vv;\n\t\t\t\t}\n\t\t\t\tout[i].v = vv;\n\t\t\t\tout[i].t = 't';\n\t\t\t\tlasti = i;\n\t\t\t}\n\t\t\tif(jj>=0 && lasti-1&&i===decpt?out[i].v.indexOf(\".\")+1:0;\n\t\t\t\tvv = out[i].v.substr(0,j);\n\t\t\t\tfor(; j-1) {\n\t\tmyv = (flen >1 && v < 0 && i>0 && out[i-1].v === \"-\" ? -v:v);\n\t\tout[i].v = write_num(out[i].t, out[i].v, myv);\n\t\tout[i].t = 't';\n\t}\n\tvar retval = \"\";\n\tfor(i=0; i !== out.length; ++i) if(out[i] != null) retval += out[i].v;\n\treturn retval;\n}\nSSF._eval = eval_fmt;\nvar cfregex = /\\[[=<>]/;\nvar cfregex2 = /\\[(=|>[=]?|<[>=]?)(-?\\d+(?:\\.\\d*)?)\\]/;\nfunction chkcond(v, rr) {\n\tif(rr == null) return false;\n\tvar thresh = parseFloat(rr[2]);\n\tswitch(rr[1]) {\n\t\tcase \"=\": if(v == thresh) return true; break;\n\t\tcase \">\": if(v > thresh) return true; break;\n\t\tcase \"<\": if(v < thresh) return true; break;\n\t\tcase \"<>\": if(v != thresh) return true; break;\n\t\tcase \">=\": if(v >= thresh) return true; break;\n\t\tcase \"<=\": if(v <= thresh) return true; break;\n\t}\n\treturn false;\n}\nfunction choose_fmt(f, v) {\n\tvar fmt = split_fmt(f);\n\tvar l = fmt.length, lat = fmt[l-1].indexOf(\"@\");\n\tif(l<4 && lat>-1) --l;\n\tif(fmt.length > 4) throw new Error(\"cannot find right format for |\" + fmt.join(\"|\") + \"|\");\n\tif(typeof v !== \"number\") return [4, fmt.length === 4 || lat>-1?fmt[fmt.length-1]:\"@\"];\n\tswitch(fmt.length) {\n\t\tcase 1: fmt = lat>-1 ? [\"General\", \"General\", \"General\", fmt[0]] : [fmt[0], fmt[0], fmt[0], \"@\"]; break;\n\t\tcase 2: fmt = lat>-1 ? [fmt[0], fmt[0], fmt[0], fmt[1]] : [fmt[0], fmt[1], fmt[0], \"@\"]; break;\n\t\tcase 3: fmt = lat>-1 ? [fmt[0], fmt[1], fmt[0], fmt[2]] : [fmt[0], fmt[1], fmt[2], \"@\"]; break;\n\t\tcase 4: break;\n\t}\n\tvar ff = v > 0 ? fmt[0] : v < 0 ? fmt[1] : fmt[2];\n\tif(fmt[0].indexOf(\"[\") === -1 && fmt[1].indexOf(\"[\") === -1) return [l, ff];\n\tif(fmt[0].match(cfregex) != null || fmt[1].match(cfregex) != null) {\n\t\tvar m1 = fmt[0].match(cfregex2);\n\t\tvar m2 = fmt[1].match(cfregex2);\n\t\treturn chkcond(v, m1) ? [l, fmt[0]] : chkcond(v, m2) ? [l, fmt[1]] : [l, fmt[m1 != null && m2 != null ? 2 : 1]];\n\t}\n\treturn [l, ff];\n}\nfunction format(fmt,v,o) {\n\tif(o == null) o = {};\n\tvar sfmt = \"\";\n\tswitch(typeof fmt) {\n\t\tcase \"string\":\n\t\t\tif(fmt == \"m/d/yy\" && o.dateNF) sfmt = o.dateNF;\n\t\t\telse sfmt = fmt;\n\t\t\tbreak;\n\t\tcase \"number\":\n\t\t\tif(fmt == 14 && o.dateNF) sfmt = o.dateNF;\n\t\t\telse sfmt = (o.table != null ? (o.table) : table_fmt)[fmt];\n\t\t\tif(sfmt == null) sfmt = (o.table && o.table[default_map[fmt]]) || table_fmt[default_map[fmt]];\n\t\t\tif(sfmt == null) sfmt = default_str[fmt] || \"General\";\n\t\t\tbreak;\n\t}\n\tif(isgeneral(sfmt,0)) return general_fmt(v, o);\n\tif(v instanceof Date) v = datenum_local(v, o.date1904);\n\tvar f = choose_fmt(sfmt, v);\n\tif(isgeneral(f[1])) return general_fmt(v, o);\n\tif(v === true) v = \"TRUE\"; else if(v === false) v = \"FALSE\";\n\telse if(v === \"\" || v == null) return \"\";\n\treturn eval_fmt(f[1], v, o, f[0]);\n}\nfunction load_entry(fmt, idx) {\n\tif(typeof idx != 'number') {\n\t\tidx = +idx || -1;\nfor(var i = 0; i < 0x0188; ++i) {\nif(table_fmt[i] == undefined) { if(idx < 0) idx = i; continue; }\n\t\t\tif(table_fmt[i] == fmt) { idx = i; break; }\n\t\t}\nif(idx < 0) idx = 0x187;\n\t}\ntable_fmt[idx] = fmt;\n\treturn idx;\n}\nSSF.load = load_entry;\nSSF._table = table_fmt;\nSSF.get_table = function get_table() { return table_fmt; };\nSSF.load_table = function load_table(tbl) {\n\tfor(var i=0; i!=0x0188; ++i)\n\t\tif(tbl[i] !== undefined) load_entry(tbl[i], i);\n};\nSSF.init_table = init_table;\nSSF.format = format;\n};\nmake_ssf(SSF);\n/* map from xlml named formats to SSF TODO: localize */\nvar XLMLFormatMap/*{[string]:string}*/ = ({\n\t\"General Number\": \"General\",\n\t\"General Date\": SSF._table[22],\n\t\"Long Date\": \"dddd, mmmm dd, yyyy\",\n\t\"Medium Date\": SSF._table[15],\n\t\"Short Date\": SSF._table[14],\n\t\"Long Time\": SSF._table[19],\n\t\"Medium Time\": SSF._table[18],\n\t\"Short Time\": SSF._table[20],\n\t\"Currency\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\"Fixed\": SSF._table[2],\n\t\"Standard\": SSF._table[4],\n\t\"Percent\": SSF._table[10],\n\t\"Scientific\": SSF._table[11],\n\t\"Yes/No\": '\"Yes\";\"Yes\";\"No\";@',\n\t\"True/False\": '\"True\";\"True\";\"False\";@',\n\t\"On/Off\": '\"Yes\";\"Yes\";\"No\";@'\n});\n\nvar SSFImplicit/*{[number]:string}*/ = ({\n\t\"5\": '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\t\"6\": '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\t\"7\": '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\t\"8\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\"23\": 'General', \"24\": 'General', \"25\": 'General', \"26\": 'General',\n\t\"27\": 'm/d/yy', \"28\": 'm/d/yy', \"29\": 'm/d/yy', \"30\": 'm/d/yy', \"31\": 'm/d/yy',\n\t\"32\": 'h:mm:ss', \"33\": 'h:mm:ss', \"34\": 'h:mm:ss', \"35\": 'h:mm:ss',\n\t\"36\": 'm/d/yy',\n\t\"41\": '_(* #,##0_);_(* \\(#,##0\\);_(* \"-\"_);_(@_)',\n\t\"42\": '_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"_);_(@_)',\n\t\"43\": '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* \"-\"??_);_(@_)',\n\t\"44\": '_(\"$\"* #,##0.00_);_(\"$\"* \\(#,##0.00\\);_(\"$\"* \"-\"??_);_(@_)',\n\t\"50\": 'm/d/yy', \"51\": 'm/d/yy', \"52\": 'm/d/yy', \"53\": 'm/d/yy', \"54\": 'm/d/yy',\n\t\"55\": 'm/d/yy', \"56\": 'm/d/yy', \"57\": 'm/d/yy', \"58\": 'm/d/yy',\n\t\"59\": '0',\n\t\"60\": '0.00',\n\t\"61\": '#,##0',\n\t\"62\": '#,##0.00',\n\t\"63\": '\"$\"#,##0_);\\\\(\"$\"#,##0\\\\)',\n\t\"64\": '\"$\"#,##0_);[Red]\\\\(\"$\"#,##0\\\\)',\n\t\"65\": '\"$\"#,##0.00_);\\\\(\"$\"#,##0.00\\\\)',\n\t\"66\": '\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',\n\t\"67\": '0%',\n\t\"68\": '0.00%',\n\t\"69\": '# ?/?',\n\t\"70\": '# ??/??',\n\t\"71\": 'm/d/yy',\n\t\"72\": 'm/d/yy',\n\t\"73\": 'd-mmm-yy',\n\t\"74\": 'd-mmm',\n\t\"75\": 'mmm-yy',\n\t\"76\": 'h:mm',\n\t\"77\": 'h:mm:ss',\n\t\"78\": 'm/d/yy h:mm',\n\t\"79\": 'mm:ss',\n\t\"80\": '[h]:mm:ss',\n\t\"81\": 'mmss.0'\n});\n\n/* dateNF parse TODO: move to SSF */\nvar dateNFregex = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;\nfunction dateNF_regex(dateNF) {\n\tvar fmt = typeof dateNF == \"number\" ? SSF._table[dateNF] : dateNF;\n\tfmt = fmt.replace(dateNFregex, \"(\\\\d+)\");\n\treturn new RegExp(\"^\" + fmt + \"$\");\n}\nfunction dateNF_fix(str, dateNF, match) {\n\tvar Y = -1, m = -1, d = -1, H = -1, M = -1, S = -1;\n\t(dateNF.match(dateNFregex)||[]).forEach(function(n, i) {\n\t\tvar v = parseInt(match[i+1], 10);\n\t\tswitch(n.toLowerCase().charAt(0)) {\n\t\t\tcase 'y': Y = v; break; case 'd': d = v; break;\n\t\t\tcase 'h': H = v; break; case 's': S = v; break;\n\t\t\tcase 'm': if(H >= 0) M = v; else m = v; break;\n\t\t}\n\t});\n\tif(S >= 0 && M == -1 && m >= 0) { M = m; m = -1; }\n\tvar datestr = ((\"\" + (Y>=0?Y: new Date().getFullYear())).slice(-4) + \"-\" + (\"00\" + (m>=1?m:1)).slice(-2) + \"-\" + (\"00\" + (d>=1?d:1)).slice(-2));\n\tif(datestr.length == 7) datestr = \"0\" + datestr;\n\tif(datestr.length == 8) datestr = \"20\" + datestr;\n\tvar timestr = ((\"00\" + (H>=0?H:0)).slice(-2) + \":\" + (\"00\" + (M>=0?M:0)).slice(-2) + \":\" + (\"00\" + (S>=0?S:0)).slice(-2));\n\tif(H == -1 && M == -1 && S == -1) return datestr;\n\tif(Y == -1 && m == -1 && d == -1) return timestr;\n\treturn datestr + \"T\" + timestr;\n}\n\nvar DO_NOT_EXPORT_CFB = true;\n/* cfb.js (C) 2013-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*jshint eqnull:true */\n/*exported CFB */\n/*global Uint8Array:false, Uint16Array:false */\n\n/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */\n/* vim: set ts=2: */\n/*exported CRC32 */\nvar CRC32;\n(function (factory) {\n\t/*jshint ignore:start */\n\t/*eslint-disable */\n\tfactory(CRC32 = {});\n\t/*eslint-enable */\n\t/*jshint ignore:end */\n}(function(CRC32) {\nCRC32.version = '1.2.0';\n/* see perf/crc32table.js */\n/*global Int32Array */\nfunction signed_crc_table() {\n\tvar c = 0, table = new Array(256);\n\n\tfor(var n =0; n != 256; ++n){\n\t\tc = n;\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\tc = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));\n\t\ttable[n] = c;\n\t}\n\n\treturn typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;\n}\n\nvar T = signed_crc_table();\nfunction crc32_bstr(bstr, seed) {\n\tvar C = seed ^ -1, L = bstr.length - 1;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF];\n\t\tC = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF];\n\t}\n\tif(i === L) C = (C>>>8) ^ T[(C ^ bstr.charCodeAt(i))&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_buf(buf, seed) {\n\tif(buf.length > 10000) return crc32_buf_8(buf, seed);\n\tvar C = seed ^ -1, L = buf.length - 3;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t}\n\twhile(i < L+3) C = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_buf_8(buf, seed) {\n\tvar C = seed ^ -1, L = buf.length - 7;\n\tfor(var i = 0; i < L;) {\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t\tC = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\t}\n\twhile(i < L+7) C = (C>>>8) ^ T[(C^buf[i++])&0xFF];\n\treturn C ^ -1;\n}\n\nfunction crc32_str(str, seed) {\n\tvar C = seed ^ -1;\n\tfor(var i = 0, L=str.length, c, d; i < L;) {\n\t\tc = str.charCodeAt(i++);\n\t\tif(c < 0x80) {\n\t\t\tC = (C>>>8) ^ T[(C ^ c)&0xFF];\n\t\t} else if(c < 0x800) {\n\t\t\tC = (C>>>8) ^ T[(C ^ (192|((c>>6)&31)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];\n\t\t} else if(c >= 0xD800 && c < 0xE000) {\n\t\t\tc = (c&1023)+64; d = str.charCodeAt(i++)&1023;\n\t\t\tC = (C>>>8) ^ T[(C ^ (240|((c>>8)&7)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((c>>2)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(d&63)))&0xFF];\n\t\t} else {\n\t\t\tC = (C>>>8) ^ T[(C ^ (224|((c>>12)&15)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|((c>>6)&63)))&0xFF];\n\t\t\tC = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];\n\t\t}\n\t}\n\treturn C ^ -1;\n}\nCRC32.table = T;\nCRC32.bstr = crc32_bstr;\nCRC32.buf = crc32_buf;\nCRC32.str = crc32_str;\n}));\n/* [MS-CFB] v20171201 */\nvar CFB = (function _CFB(){\nvar exports = {};\nexports.version = '1.1.4';\n/* [MS-CFB] 2.6.4 */\nfunction namecmp(l, r) {\n\tvar L = l.split(\"/\"), R = r.split(\"/\");\n\tfor(var i = 0, c = 0, Z = Math.min(L.length, R.length); i < Z; ++i) {\n\t\tif((c = L[i].length - R[i].length)) return c;\n\t\tif(L[i] != R[i]) return L[i] < R[i] ? -1 : 1;\n\t}\n\treturn L.length - R.length;\n}\nfunction dirname(p) {\n\tif(p.charAt(p.length - 1) == \"/\") return (p.slice(0,-1).indexOf(\"/\") === -1) ? p : dirname(p.slice(0, -1));\n\tvar c = p.lastIndexOf(\"/\");\n\treturn (c === -1) ? p : p.slice(0, c+1);\n}\n\nfunction filename(p) {\n\tif(p.charAt(p.length - 1) == \"/\") return filename(p.slice(0, -1));\n\tvar c = p.lastIndexOf(\"/\");\n\treturn (c === -1) ? p : p.slice(c+1);\n}\n/* -------------------------------------------------------------------------- */\n/* DOS Date format:\n high|YYYYYYYm.mmmddddd.HHHHHMMM.MMMSSSSS|low\n add 1980 to stored year\n stored second should be doubled\n*/\n\n/* write JS date to buf as a DOS date */\nfunction write_dos_date(buf, date) {\n\tif(typeof date === \"string\") date = new Date(date);\n\tvar hms = date.getHours();\n\thms = hms << 6 | date.getMinutes();\n\thms = hms << 5 | (date.getSeconds()>>>1);\n\tbuf.write_shift(2, hms);\n\tvar ymd = (date.getFullYear() - 1980);\n\tymd = ymd << 4 | (date.getMonth()+1);\n\tymd = ymd << 5 | date.getDate();\n\tbuf.write_shift(2, ymd);\n}\n\n/* read four bytes from buf and interpret as a DOS date */\nfunction parse_dos_date(buf) {\n\tvar hms = buf.read_shift(2) & 0xFFFF;\n\tvar ymd = buf.read_shift(2) & 0xFFFF;\n\tvar val = new Date();\n\tvar d = ymd & 0x1F; ymd >>>= 5;\n\tvar m = ymd & 0x0F; ymd >>>= 4;\n\tval.setMilliseconds(0);\n\tval.setFullYear(ymd + 1980);\n\tval.setMonth(m-1);\n\tval.setDate(d);\n\tvar S = hms & 0x1F; hms >>>= 5;\n\tvar M = hms & 0x3F; hms >>>= 6;\n\tval.setHours(hms);\n\tval.setMinutes(M);\n\tval.setSeconds(S<<1);\n\treturn val;\n}\nfunction parse_extra_field(blob) {\n\tprep_blob(blob, 0);\n\tvar o = {};\n\tvar flags = 0;\n\twhile(blob.l <= blob.length - 4) {\n\t\tvar type = blob.read_shift(2);\n\t\tvar sz = blob.read_shift(2), tgt = blob.l + sz;\n\t\tvar p = {};\n\t\tswitch(type) {\n\t\t\t/* UNIX-style Timestamps */\n\t\t\tcase 0x5455: {\n\t\t\t\tflags = blob.read_shift(1);\n\t\t\t\tif(flags & 1) p.mtime = blob.read_shift(4);\n\t\t\t\t/* for some reason, CD flag corresponds to LFH */\n\t\t\t\tif(sz > 5) {\n\t\t\t\t\tif(flags & 2) p.atime = blob.read_shift(4);\n\t\t\t\t\tif(flags & 4) p.ctime = blob.read_shift(4);\n\t\t\t\t}\n\t\t\t\tif(p.mtime) p.mt = new Date(p.mtime*1000);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tblob.l = tgt;\n\t\to[type] = p;\n\t}\n\treturn o;\n}\nvar fs;\nfunction get_fs() { return fs || (fs = require('fs')); }\nfunction parse(file, options) {\nif(file[0] == 0x50 && file[1] == 0x4b) return parse_zip(file, options);\nif(file.length < 512) throw new Error(\"CFB file size \" + file.length + \" < 512\");\nvar mver = 3;\nvar ssz = 512;\nvar nmfs = 0; // number of mini FAT sectors\nvar difat_sec_cnt = 0;\nvar dir_start = 0;\nvar minifat_start = 0;\nvar difat_start = 0;\n\nvar fat_addrs = []; // locations of FAT sectors\n\n/* [MS-CFB] 2.2 Compound File Header */\nvar blob = file.slice(0,512);\nprep_blob(blob, 0);\n\n/* major version */\nvar mv = check_get_mver(blob);\nmver = mv[0];\nswitch(mver) {\n\tcase 3: ssz = 512; break; case 4: ssz = 4096; break;\n\tcase 0: if(mv[1] == 0) return parse_zip(file, options);\n\t/* falls through */\n\tdefault: throw new Error(\"Major Version: Expected 3 or 4 saw \" + mver);\n}\n\n/* reprocess header */\nif(ssz !== 512) { blob = file.slice(0,ssz); prep_blob(blob, 28 /* blob.l */); }\n/* Save header for final object */\nvar header = file.slice(0,ssz);\n\ncheck_shifts(blob, mver);\n\n// Number of Directory Sectors\nvar dir_cnt = blob.read_shift(4, 'i');\nif(mver === 3 && dir_cnt !== 0) throw new Error('# Directory Sectors: Expected 0 saw ' + dir_cnt);\n\n// Number of FAT Sectors\nblob.l += 4;\n\n// First Directory Sector Location\ndir_start = blob.read_shift(4, 'i');\n\n// Transaction Signature\nblob.l += 4;\n\n// Mini Stream Cutoff Size\nblob.chk('00100000', 'Mini Stream Cutoff Size: ');\n\n// First Mini FAT Sector Location\nminifat_start = blob.read_shift(4, 'i');\n\n// Number of Mini FAT Sectors\nnmfs = blob.read_shift(4, 'i');\n\n// First DIFAT sector location\ndifat_start = blob.read_shift(4, 'i');\n\n// Number of DIFAT Sectors\ndifat_sec_cnt = blob.read_shift(4, 'i');\n\n// Grab FAT Sector Locations\nfor(var q = -1, j = 0; j < 109; ++j) { /* 109 = (512 - blob.l)>>>2; */\n\tq = blob.read_shift(4, 'i');\n\tif(q<0) break;\n\tfat_addrs[j] = q;\n}\n\n/** Break the file up into sectors */\nvar sectors = sectorify(file, ssz);\n\nsleuth_fat(difat_start, difat_sec_cnt, sectors, ssz, fat_addrs);\n\n/** Chains */\nvar sector_list = make_sector_list(sectors, dir_start, fat_addrs, ssz);\n\nsector_list[dir_start].name = \"!Directory\";\nif(nmfs > 0 && minifat_start !== ENDOFCHAIN) sector_list[minifat_start].name = \"!MiniFAT\";\nsector_list[fat_addrs[0]].name = \"!FAT\";\nsector_list.fat_addrs = fat_addrs;\nsector_list.ssz = ssz;\n\n/* [MS-CFB] 2.6.1 Compound File Directory Entry */\nvar files = {}, Paths = [], FileIndex = [], FullPaths = [];\nread_directory(dir_start, sector_list, sectors, Paths, nmfs, files, FileIndex, minifat_start);\n\nbuild_full_paths(FileIndex, FullPaths, Paths);\nPaths.shift();\n\nvar o = {\n\tFileIndex: FileIndex,\n\tFullPaths: FullPaths\n};\n\n// $FlowIgnore\nif(options && options.raw) o.raw = {header: header, sectors: sectors};\nreturn o;\n} // parse\n\n/* [MS-CFB] 2.2 Compound File Header -- read up to major version */\nfunction check_get_mver(blob) {\n\tif(blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0];\n\t// header signature 8\n\tblob.chk(HEADER_SIGNATURE, 'Header Signature: ');\n\n\t// clsid 16\n\t//blob.chk(HEADER_CLSID, 'CLSID: ');\n\tblob.l += 16;\n\n\t// minor version 2\n\tvar mver = blob.read_shift(2, 'u');\n\n\treturn [blob.read_shift(2,'u'), mver];\n}\nfunction check_shifts(blob, mver) {\n\tvar shift = 0x09;\n\n\t// Byte Order\n\t//blob.chk('feff', 'Byte Order: '); // note: some writers put 0xffff\n\tblob.l += 2;\n\n\t// Sector Shift\n\tswitch((shift = blob.read_shift(2))) {\n\t\tcase 0x09: if(mver != 3) throw new Error('Sector Shift: Expected 9 saw ' + shift); break;\n\t\tcase 0x0c: if(mver != 4) throw new Error('Sector Shift: Expected 12 saw ' + shift); break;\n\t\tdefault: throw new Error('Sector Shift: Expected 9 or 12 saw ' + shift);\n\t}\n\n\t// Mini Sector Shift\n\tblob.chk('0600', 'Mini Sector Shift: ');\n\n\t// Reserved\n\tblob.chk('000000000000', 'Reserved: ');\n}\n\n/** Break the file up into sectors */\nfunction sectorify(file, ssz) {\n\tvar nsectors = Math.ceil(file.length/ssz)-1;\n\tvar sectors = [];\n\tfor(var i=1; i < nsectors; ++i) sectors[i-1] = file.slice(i*ssz,(i+1)*ssz);\n\tsectors[nsectors-1] = file.slice(nsectors*ssz);\n\treturn sectors;\n}\n\n/* [MS-CFB] 2.6.4 Red-Black Tree */\nfunction build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}\n\nfunction get_mfat_entry(entry, payload, mini) {\n\tvar start = entry.start, size = entry.size;\n\t//return (payload.slice(start*MSSZ, start*MSSZ + size));\n\tvar o = [];\n\tvar idx = start;\n\twhile(mini && size > 0 && idx >= 0) {\n\t\to.push(payload.slice(idx * MSSZ, idx * MSSZ + MSSZ));\n\t\tsize -= MSSZ;\n\t\tidx = __readInt32LE(mini, idx * 4);\n\t}\n\tif(o.length === 0) return (new_buf(0));\n\treturn (bconcat(o).slice(0, entry.size));\n}\n\n/** Chase down the rest of the DIFAT chain to build a comprehensive list\n DIFAT chains by storing the next sector number as the last 32 bits */\nfunction sleuth_fat(idx, cnt, sectors, ssz, fat_addrs) {\n\tvar q = ENDOFCHAIN;\n\tif(idx === ENDOFCHAIN) {\n\t\tif(cnt !== 0) throw new Error(\"DIFAT chain shorter than expected\");\n\t} else if(idx !== -1 /*FREESECT*/) {\n\t\tvar sector = sectors[idx], m = (ssz>>>2)-1;\n\t\tif(!sector) return;\n\t\tfor(var i = 0; i < m; ++i) {\n\t\t\tif((q = __readInt32LE(sector,i*4)) === ENDOFCHAIN) break;\n\t\t\tfat_addrs.push(q);\n\t\t}\n\t\tif(cnt >= 1) sleuth_fat(__readInt32LE(sector,ssz-4),cnt - 1, sectors, ssz, fat_addrs);\n\t}\n}\n\n/** Follow the linked list of sectors for a given starting point */\nfunction get_sector_list(sectors, start, fat_addrs, ssz, chkd) {\n\tvar buf = [], buf_chain = [];\n\tif(!chkd) chkd = [];\n\tvar modulus = ssz - 1, j = 0, jj = 0;\n\tfor(j=start; j>=0;) {\n\t\tchkd[j] = true;\n\t\tbuf[buf.length] = j;\n\t\tbuf_chain.push(sectors[j]);\n\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\tjj = ((j*4) & modulus);\n\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\tif(!sectors[addr]) break;\n\t\tj = __readInt32LE(sectors[addr], jj);\n\t}\n\treturn {nodes: buf, data:__toBuffer([buf_chain])};\n}\n\n/** Chase down the sector linked lists */\nfunction make_sector_list(sectors, dir_start, fat_addrs, ssz) {\n\tvar sl = sectors.length, sector_list = ([]);\n\tvar chkd = [], buf = [], buf_chain = [];\n\tvar modulus = ssz - 1, i=0, j=0, k=0, jj=0;\n\tfor(i=0; i < sl; ++i) {\n\t\tbuf = ([]);\n\t\tk = (i + dir_start); if(k >= sl) k-=sl;\n\t\tif(chkd[k]) continue;\n\t\tbuf_chain = [];\n\t\tvar seen = [];\n\t\tfor(j=k; j>=0;) {\n\t\t\tseen[j] = true;\n\t\t\tchkd[j] = true;\n\t\t\tbuf[buf.length] = j;\n\t\t\tbuf_chain.push(sectors[j]);\n\t\t\tvar addr = fat_addrs[Math.floor(j*4/ssz)];\n\t\t\tjj = ((j*4) & modulus);\n\t\t\tif(ssz < 4 + jj) throw new Error(\"FAT boundary crossed: \" + j + \" 4 \"+ssz);\n\t\t\tif(!sectors[addr]) break;\n\t\t\tj = __readInt32LE(sectors[addr], jj);\n\t\t\tif(seen[j]) break;\n\t\t}\n\t\tsector_list[k] = ({nodes: buf, data:__toBuffer([buf_chain])});\n\t}\n\treturn sector_list;\n}\n\n/* [MS-CFB] 2.6.1 Compound File Directory Entry */\nfunction read_directory(dir_start, sector_list, sectors, Paths, nmfs, files, FileIndex, mini) {\n\tvar minifat_store = 0, pl = (Paths.length?2:0);\n\tvar sector = sector_list[dir_start].data;\n\tvar i = 0, namelen = 0, name;\n\tfor(; i < sector.length; i+= 128) {\n\t\tvar blob = sector.slice(i, i+128);\n\t\tprep_blob(blob, 64);\n\t\tnamelen = blob.read_shift(2);\n\t\tname = __utf16le(blob,0,namelen-pl);\n\t\tPaths.push(name);\n\t\tvar o = ({\n\t\t\tname: name,\n\t\t\ttype: blob.read_shift(1),\n\t\t\tcolor: blob.read_shift(1),\n\t\t\tL: blob.read_shift(4, 'i'),\n\t\t\tR: blob.read_shift(4, 'i'),\n\t\t\tC: blob.read_shift(4, 'i'),\n\t\t\tclsid: blob.read_shift(16),\n\t\t\tstate: blob.read_shift(4, 'i'),\n\t\t\tstart: 0,\n\t\t\tsize: 0\n\t\t});\n\t\tvar ctime = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2);\n\t\tif(ctime !== 0) o.ct = read_date(blob, blob.l-8);\n\t\tvar mtime = blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2) + blob.read_shift(2);\n\t\tif(mtime !== 0) o.mt = read_date(blob, blob.l-8);\n\t\to.start = blob.read_shift(4, 'i');\n\t\to.size = blob.read_shift(4, 'i');\n\t\tif(o.size < 0 && o.start < 0) { o.size = o.type = 0; o.start = ENDOFCHAIN; o.name = \"\"; }\n\t\tif(o.type === 5) { /* root */\n\t\t\tminifat_store = o.start;\n\t\t\tif(nmfs > 0 && minifat_store !== ENDOFCHAIN) sector_list[minifat_store].name = \"!StreamData\";\n\t\t\t/*minifat_size = o.size;*/\n\t\t} else if(o.size >= 4096 /* MSCSZ */) {\n\t\t\to.storage = 'fat';\n\t\t\tif(sector_list[o.start] === undefined) sector_list[o.start] = get_sector_list(sectors, o.start, sector_list.fat_addrs, sector_list.ssz);\n\t\t\tsector_list[o.start].name = o.name;\n\t\t\to.content = (sector_list[o.start].data.slice(0,o.size));\n\t\t} else {\n\t\t\to.storage = 'minifat';\n\t\t\tif(o.size < 0) o.size = 0;\n\t\t\telse if(minifat_store !== ENDOFCHAIN && o.start !== ENDOFCHAIN && sector_list[minifat_store]) {\n\t\t\t\to.content = get_mfat_entry(o, sector_list[minifat_store].data, (sector_list[mini]||{}).data);\n\t\t\t}\n\t\t}\n\t\tif(o.content) prep_blob(o.content, 0);\n\t\tfiles[name] = o;\n\t\tFileIndex.push(o);\n\t}\n}\n\nfunction read_date(blob, offset) {\n\treturn new Date(( ( (__readUInt32LE(blob,offset+4)/1e7)*Math.pow(2,32)+__readUInt32LE(blob,offset)/1e7 ) - 11644473600)*1000);\n}\n\nfunction read_file(filename, options) {\n\tget_fs();\n\treturn parse(fs.readFileSync(filename), options);\n}\n\nfunction read(blob, options) {\n\tswitch(options && options.type || \"base64\") {\n\t\tcase \"file\": return read_file(blob, options);\n\t\tcase \"base64\": return parse(s2a(Base64.decode(blob)), options);\n\t\tcase \"binary\": return parse(s2a(blob), options);\n\t}\n\treturn parse(blob, options);\n}\n\nfunction init_cfb(cfb, opts) {\n\tvar o = opts || {}, root = o.root || \"Root Entry\";\n\tif(!cfb.FullPaths) cfb.FullPaths = [];\n\tif(!cfb.FileIndex) cfb.FileIndex = [];\n\tif(cfb.FullPaths.length !== cfb.FileIndex.length) throw new Error(\"inconsistent CFB structure\");\n\tif(cfb.FullPaths.length === 0) {\n\t\tcfb.FullPaths[0] = root + \"/\";\n\t\tcfb.FileIndex[0] = ({ name: root, type: 5 });\n\t}\n\tif(o.CLSID) cfb.FileIndex[0].clsid = o.CLSID;\n\tseed_cfb(cfb);\n}\nfunction seed_cfb(cfb) {\n\tvar nm = \"\\u0001Sh33tJ5\";\n\tif(CFB.find(cfb, \"/\" + nm)) return;\n\tvar p = new_buf(4); p[0] = 55; p[1] = p[3] = 50; p[2] = 54;\n\tcfb.FileIndex.push(({ name: nm, type: 2, content:p, size:4, L:69, R:69, C:69 }));\n\tcfb.FullPaths.push(cfb.FullPaths[0] + nm);\n\trebuild_cfb(cfb);\n}\nfunction rebuild_cfb(cfb, f) {\n\tinit_cfb(cfb);\n\tvar gc = false, s = false;\n\tfor(var i = cfb.FullPaths.length - 1; i >= 0; --i) {\n\t\tvar _file = cfb.FileIndex[i];\n\t\tswitch(_file.type) {\n\t\t\tcase 0:\n\t\t\t\tif(s) gc = true;\n\t\t\t\telse { cfb.FileIndex.pop(); cfb.FullPaths.pop(); }\n\t\t\t\tbreak;\n\t\t\tcase 1: case 2: case 5:\n\t\t\t\ts = true;\n\t\t\t\tif(isNaN(_file.R * _file.L * _file.C)) gc = true;\n\t\t\t\tif(_file.R > -1 && _file.L > -1 && _file.R == _file.L) gc = true;\n\t\t\t\tbreak;\n\t\t\tdefault: gc = true; break;\n\t\t}\n\t}\n\tif(!gc && !f) return;\n\n\tvar now = new Date(1987, 1, 19), j = 0;\n\tvar data = [];\n\tfor(i = 0; i < cfb.FullPaths.length; ++i) {\n\t\tif(cfb.FileIndex[i].type === 0) continue;\n\t\tdata.push([cfb.FullPaths[i], cfb.FileIndex[i]]);\n\t}\n\tfor(i = 0; i < data.length; ++i) {\n\t\tvar dad = dirname(data[i][0]);\n\t\ts = false;\n\t\tfor(j = 0; j < data.length; ++j) if(data[j][0] === dad) s = true;\n\t\tif(!s) data.push([dad, ({\n\t\t\tname: filename(dad).replace(\"/\",\"\"),\n\t\t\ttype: 1,\n\t\t\tclsid: HEADER_CLSID,\n\t\t\tct: now, mt: now,\n\t\t\tcontent: null\n\t\t})]);\n\t}\n\n\tdata.sort(function(x,y) { return namecmp(x[0], y[0]); });\n\tcfb.FullPaths = []; cfb.FileIndex = [];\n\tfor(i = 0; i < data.length; ++i) { cfb.FullPaths[i] = data[i][0]; cfb.FileIndex[i] = data[i][1]; }\n\tfor(i = 0; i < data.length; ++i) {\n\t\tvar elt = cfb.FileIndex[i];\n\t\tvar nm = cfb.FullPaths[i];\n\n\t\telt.name = filename(nm).replace(\"/\",\"\");\n\t\telt.L = elt.R = elt.C = -(elt.color = 1);\n\t\telt.size = elt.content ? elt.content.length : 0;\n\t\telt.start = 0;\n\t\telt.clsid = (elt.clsid || HEADER_CLSID);\n\t\tif(i === 0) {\n\t\t\telt.C = data.length > 1 ? 1 : -1;\n\t\t\telt.size = 0;\n\t\t\telt.type = 5;\n\t\t} else if(nm.slice(-1) == \"/\") {\n\t\t\tfor(j=i+1;j < data.length; ++j) if(dirname(cfb.FullPaths[j])==nm) break;\n\t\t\telt.C = j >= data.length ? -1 : j;\n\t\t\tfor(j=i+1;j < data.length; ++j) if(dirname(cfb.FullPaths[j])==dirname(nm)) break;\n\t\t\telt.R = j >= data.length ? -1 : j;\n\t\t\telt.type = 1;\n\t\t} else {\n\t\t\tif(dirname(cfb.FullPaths[i+1]||\"\") == dirname(nm)) elt.R = i + 1;\n\t\t\telt.type = 2;\n\t\t}\n\t}\n\n}\n\nfunction _write(cfb, options) {\n\tvar _opts = options || {};\n\trebuild_cfb(cfb);\n\tif(_opts.fileType == 'zip') return write_zip(cfb, _opts);\n\tvar L = (function(cfb){\n\t\tvar mini_size = 0, fat_size = 0;\n\t\tfor(var i = 0; i < cfb.FileIndex.length; ++i) {\n\t\t\tvar file = cfb.FileIndex[i];\n\t\t\tif(!file.content) continue;\nvar flen = file.content.length;\n\t\t\tif(flen > 0){\n\t\t\t\tif(flen < 0x1000) mini_size += (flen + 0x3F) >> 6;\n\t\t\t\telse fat_size += (flen + 0x01FF) >> 9;\n\t\t\t}\n\t\t}\n\t\tvar dir_cnt = (cfb.FullPaths.length +3) >> 2;\n\t\tvar mini_cnt = (mini_size + 7) >> 3;\n\t\tvar mfat_cnt = (mini_size + 0x7F) >> 7;\n\t\tvar fat_base = mini_cnt + fat_size + dir_cnt + mfat_cnt;\n\t\tvar fat_cnt = (fat_base + 0x7F) >> 7;\n\t\tvar difat_cnt = fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt-109)/0x7F);\n\t\twhile(((fat_base + fat_cnt + difat_cnt + 0x7F) >> 7) > fat_cnt) difat_cnt = ++fat_cnt <= 109 ? 0 : Math.ceil((fat_cnt-109)/0x7F);\n\t\tvar L = [1, difat_cnt, fat_cnt, mfat_cnt, dir_cnt, fat_size, mini_size, 0];\n\t\tcfb.FileIndex[0].size = mini_size << 6;\n\t\tL[7] = (cfb.FileIndex[0].start=L[0]+L[1]+L[2]+L[3]+L[4]+L[5])+((L[6]+7) >> 3);\n\t\treturn L;\n\t})(cfb);\n\tvar o = new_buf(L[7] << 9);\n\tvar i = 0, T = 0;\n\t{\n\t\tfor(i = 0; i < 8; ++i) o.write_shift(1, HEADER_SIG[i]);\n\t\tfor(i = 0; i < 8; ++i) o.write_shift(2, 0);\n\t\to.write_shift(2, 0x003E);\n\t\to.write_shift(2, 0x0003);\n\t\to.write_shift(2, 0xFFFE);\n\t\to.write_shift(2, 0x0009);\n\t\to.write_shift(2, 0x0006);\n\t\tfor(i = 0; i < 3; ++i) o.write_shift(2, 0);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, L[2]);\n\t\to.write_shift(4, L[0] + L[1] + L[2] + L[3] - 1);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, 1<<12);\n\t\to.write_shift(4, L[3] ? L[0] + L[1] + L[2] - 1: ENDOFCHAIN);\n\t\to.write_shift(4, L[3]);\n\t\to.write_shift(-4, L[1] ? L[0] - 1: ENDOFCHAIN);\n\t\to.write_shift(4, L[1]);\n\t\tfor(i = 0; i < 109; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);\n\t}\n\tif(L[1]) {\n\t\tfor(T = 0; T < L[1]; ++T) {\n\t\t\tfor(; i < 236 + T * 127; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);\n\t\t\to.write_shift(-4, T === L[1] - 1 ? ENDOFCHAIN : T + 1);\n\t\t}\n\t}\n\tvar chainit = function(w) {\n\t\tfor(T += w; i> 9);\n\t}\n\tchainit((L[6] + 7) >> 3);\n\twhile(o.l & 0x1FF) o.write_shift(-4, consts.ENDOFCHAIN);\n\tT = i = 0;\n\tfor(j = 0; j < cfb.FileIndex.length; ++j) {\n\t\tfile = cfb.FileIndex[j];\n\t\tif(!file.content) continue;\nflen = file.content.length;\n\t\tif(!flen || flen >= 0x1000) continue;\n\t\tfile.start = T;\n\t\tchainit((flen + 0x3F) >> 6);\n\t}\n\twhile(o.l & 0x1FF) o.write_shift(-4, consts.ENDOFCHAIN);\n\tfor(i = 0; i < L[4]<<2; ++i) {\n\t\tvar nm = cfb.FullPaths[i];\n\t\tif(!nm || nm.length === 0) {\n\t\t\tfor(j = 0; j < 17; ++j) o.write_shift(4, 0);\n\t\t\tfor(j = 0; j < 3; ++j) o.write_shift(4, -1);\n\t\t\tfor(j = 0; j < 12; ++j) o.write_shift(4, 0);\n\t\t\tcontinue;\n\t\t}\n\t\tfile = cfb.FileIndex[i];\n\t\tif(i === 0) file.start = file.size ? file.start - 1 : ENDOFCHAIN;\n\t\tvar _nm = (i === 0 && _opts.root) || file.name;\n\t\tflen = 2*(_nm.length+1);\n\t\to.write_shift(64, _nm, \"utf16le\");\n\t\to.write_shift(2, flen);\n\t\to.write_shift(1, file.type);\n\t\to.write_shift(1, file.color);\n\t\to.write_shift(-4, file.L);\n\t\to.write_shift(-4, file.R);\n\t\to.write_shift(-4, file.C);\n\t\tif(!file.clsid) for(j = 0; j < 4; ++j) o.write_shift(4, 0);\n\t\telse o.write_shift(16, file.clsid, \"hex\");\n\t\to.write_shift(4, file.state || 0);\n\t\to.write_shift(4, 0); o.write_shift(4, 0);\n\t\to.write_shift(4, 0); o.write_shift(4, 0);\n\t\to.write_shift(4, file.start);\n\t\to.write_shift(4, file.size); o.write_shift(4, 0);\n\t}\n\tfor(i = 1; i < cfb.FileIndex.length; ++i) {\n\t\tfile = cfb.FileIndex[i];\nif(file.size >= 0x1000) {\n\t\t\to.l = (file.start+1) << 9;\n\t\t\tfor(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);\n\t\t\tfor(; j & 0x1FF; ++j) o.write_shift(1, 0);\n\t\t}\n\t}\n\tfor(i = 1; i < cfb.FileIndex.length; ++i) {\n\t\tfile = cfb.FileIndex[i];\nif(file.size > 0 && file.size < 0x1000) {\n\t\t\tfor(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);\n\t\t\tfor(; j & 0x3F; ++j) o.write_shift(1, 0);\n\t\t}\n\t}\n\twhile(o.l < o.length) o.write_shift(1, 0);\n\treturn o;\n}\n/* [MS-CFB] 2.6.4 (Unicode 3.0.1 case conversion) */\nfunction find(cfb, path) {\n\tvar UCFullPaths = cfb.FullPaths.map(function(x) { return x.toUpperCase(); });\n\tvar UCPaths = UCFullPaths.map(function(x) { var y = x.split(\"/\"); return y[y.length - (x.slice(-1) == \"/\" ? 2 : 1)]; });\n\tvar k = false;\n\tif(path.charCodeAt(0) === 47 /* \"/\" */) { k = true; path = UCFullPaths[0].slice(0, -1) + path; }\n\telse k = path.indexOf(\"/\") !== -1;\n\tvar UCPath = path.toUpperCase();\n\tvar w = k === true ? UCFullPaths.indexOf(UCPath) : UCPaths.indexOf(UCPath);\n\tif(w !== -1) return cfb.FileIndex[w];\n\n\tvar m = !UCPath.match(chr1);\n\tUCPath = UCPath.replace(chr0,'');\n\tif(m) UCPath = UCPath.replace(chr1,'!');\n\tfor(w = 0; w < UCFullPaths.length; ++w) {\n\t\tif((m ? UCFullPaths[w].replace(chr1,'!') : UCFullPaths[w]).replace(chr0,'') == UCPath) return cfb.FileIndex[w];\n\t\tif((m ? UCPaths[w].replace(chr1,'!') : UCPaths[w]).replace(chr0,'') == UCPath) return cfb.FileIndex[w];\n\t}\n\treturn null;\n}\n/** CFB Constants */\nvar MSSZ = 64; /* Mini Sector Size = 1<<6 */\n//var MSCSZ = 4096; /* Mini Stream Cutoff Size */\n/* 2.1 Compound File Sector Numbers and Types */\nvar ENDOFCHAIN = -2;\n/* 2.2 Compound File Header */\nvar HEADER_SIGNATURE = 'd0cf11e0a1b11ae1';\nvar HEADER_SIG = [0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1];\nvar HEADER_CLSID = '00000000000000000000000000000000';\nvar consts = {\n\t/* 2.1 Compund File Sector Numbers and Types */\n\tMAXREGSECT: -6,\n\tDIFSECT: -4,\n\tFATSECT: -3,\n\tENDOFCHAIN: ENDOFCHAIN,\n\tFREESECT: -1,\n\t/* 2.2 Compound File Header */\n\tHEADER_SIGNATURE: HEADER_SIGNATURE,\n\tHEADER_MINOR_VERSION: '3e00',\n\tMAXREGSID: -6,\n\tNOSTREAM: -1,\n\tHEADER_CLSID: HEADER_CLSID,\n\t/* 2.6.1 Compound File Directory Entry */\n\tEntryTypes: ['unknown','storage','stream','lockbytes','property','root']\n};\n\nfunction write_file(cfb, filename, options) {\n\tget_fs();\n\tvar o = _write(cfb, options);\nfs.writeFileSync(filename, o);\n}\n\nfunction a2s(o) {\n\tvar out = new Array(o.length);\n\tfor(var i = 0; i < o.length; ++i) out[i] = String.fromCharCode(o[i]);\n\treturn out.join(\"\");\n}\n\nfunction write(cfb, options) {\n\tvar o = _write(cfb, options);\n\tswitch(options && options.type) {\n\t\tcase \"file\": get_fs(); fs.writeFileSync(options.filename, (o)); return o;\n\t\tcase \"binary\": return a2s(o);\n\t\tcase \"base64\": return Base64.encode(a2s(o));\n\t}\n\treturn o;\n}\n/* node < 8.1 zlib does not expose bytesRead, so default to pure JS */\nvar _zlib;\nfunction use_zlib(zlib) { try {\n\tvar InflateRaw = zlib.InflateRaw;\n\tvar InflRaw = new InflateRaw();\n\tInflRaw._processChunk(new Uint8Array([3, 0]), InflRaw._finishFlushFlag);\n\tif(InflRaw.bytesRead) _zlib = zlib;\n\telse throw new Error(\"zlib does not expose bytesRead\");\n} catch(e) {console.error(\"cannot use native zlib: \" + (e.message || e)); } }\n\nfunction _inflateRawSync(payload, usz) {\n\tif(!_zlib) return _inflate(payload, usz);\n\tvar InflateRaw = _zlib.InflateRaw;\n\tvar InflRaw = new InflateRaw();\n\tvar out = InflRaw._processChunk(payload.slice(payload.l), InflRaw._finishFlushFlag);\n\tpayload.l += InflRaw.bytesRead;\n\treturn out;\n}\n\nfunction _deflateRawSync(payload) {\n\treturn _zlib ? _zlib.deflateRawSync(payload) : _deflate(payload);\n}\nvar CLEN_ORDER = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n/* LEN_ID = [ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285 ]; */\nvar LEN_LN = [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13 , 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 ];\n\n/* DST_ID = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 ]; */\nvar DST_LN = [ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 ];\n\nfunction bit_swap_8(n) { var t = (((((n<<1)|(n<<11)) & 0x22110) | (((n<<5)|(n<<15)) & 0x88440))); return ((t>>16) | (t>>8) |t)&0xFF; }\n\nvar use_typed_arrays = typeof Uint8Array !== 'undefined';\n\nvar bitswap8 = use_typed_arrays ? new Uint8Array(1<<8) : [];\nfor(var q = 0; q < (1<<8); ++q) bitswap8[q] = bit_swap_8(q);\n\nfunction bit_swap_n(n, b) {\n\tvar rev = bitswap8[n & 0xFF];\n\tif(b <= 8) return rev >>> (8-b);\n\trev = (rev << 8) | bitswap8[(n>>8)&0xFF];\n\tif(b <= 16) return rev >>> (16-b);\n\trev = (rev << 8) | bitswap8[(n>>16)&0xFF];\n\treturn rev >>> (24-b);\n}\n\n/* helpers for unaligned bit reads */\nfunction read_bits_2(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 6 ? 0 : buf[h+1]<<8))>>>w)& 0x03; }\nfunction read_bits_3(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 5 ? 0 : buf[h+1]<<8))>>>w)& 0x07; }\nfunction read_bits_4(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 4 ? 0 : buf[h+1]<<8))>>>w)& 0x0F; }\nfunction read_bits_5(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 3 ? 0 : buf[h+1]<<8))>>>w)& 0x1F; }\nfunction read_bits_7(buf, bl) { var w = (bl&7), h = (bl>>>3); return ((buf[h]|(w <= 1 ? 0 : buf[h+1]<<8))>>>w)& 0x7F; }\n\n/* works up to n = 3 * 8 + 1 = 25 */\nfunction read_bits_n(buf, bl, n) {\n\tvar w = (bl&7), h = (bl>>>3), f = ((1<>> w;\n\tif(n < 8 - w) return v & f;\n\tv |= buf[h+1]<<(8-w);\n\tif(n < 16 - w) return v & f;\n\tv |= buf[h+2]<<(16-w);\n\tif(n < 24 - w) return v & f;\n\tv |= buf[h+3]<<(24-w);\n\treturn v & f;\n}\n\n/* until ArrayBuffer#realloc is a thing, fake a realloc */\nfunction realloc(b, sz) {\n\tvar L = b.length, M = 2*L > sz ? 2*L : sz + 5, i = 0;\n\tif(L >= sz) return b;\n\tif(has_buf) {\n\t\tvar o = new_unsafe_buf(M);\n\t\t// $FlowIgnore\n\t\tif(b.copy) b.copy(o);\n\t\telse for(; i < b.length; ++i) o[i] = b[i];\n\t\treturn o;\n\t} else if(use_typed_arrays) {\n\t\tvar a = new Uint8Array(M);\n\t\tif(a.set) a.set(b);\n\t\telse for(; i < b.length; ++i) a[i] = b[i];\n\t\treturn a;\n\t}\n\tb.length = M;\n\treturn b;\n}\n\n/* zero-filled arrays for older browsers */\nfunction zero_fill_array(n) {\n\tvar o = new Array(n);\n\tfor(var i = 0; i < n; ++i) o[i] = 0;\n\treturn o;\n}var _deflate = (function() {\nvar _deflateRaw = (function() {\n\treturn function deflateRaw(data, out) {\n\t\tvar boff = 0;\n\t\twhile(boff < data.length) {\n\t\t\tvar L = Math.min(0xFFFF, data.length - boff);\n\t\t\tvar h = boff + L == data.length;\n\t\t\t/* TODO: this is only type 0 stored */\n\t\t\tout.write_shift(1, +h);\n\t\t\tout.write_shift(2, L);\n\t\t\tout.write_shift(2, (~L) & 0xFFFF);\n\t\t\twhile(L-- > 0) out[out.l++] = data[boff++];\n\t\t}\n\t\treturn out.l;\n\t};\n})();\n\nreturn function(data) {\n\tvar buf = new_buf(50+Math.floor(data.length*1.1));\n\tvar off = _deflateRaw(data, buf);\n\treturn buf.slice(0, off);\n};\n})();\n/* modified inflate function also moves original read head */\n\n/* build tree (used for literals and lengths) */\nfunction build_tree(clens, cmap, MAX) {\n\tvar maxlen = 1, w = 0, i = 0, j = 0, ccode = 0, L = clens.length;\n\n\tvar bl_count = use_typed_arrays ? new Uint16Array(32) : zero_fill_array(32);\n\tfor(i = 0; i < 32; ++i) bl_count[i] = 0;\n\n\tfor(i = L; i < MAX; ++i) clens[i] = 0;\n\tL = clens.length;\n\n\tvar ctree = use_typed_arrays ? new Uint16Array(L) : zero_fill_array(L); // []\n\n\t/* build code tree */\n\tfor(i = 0; i < L; ++i) {\n\t\tbl_count[(w = clens[i])]++;\n\t\tif(maxlen < w) maxlen = w;\n\t\tctree[i] = 0;\n\t}\n\tbl_count[0] = 0;\n\tfor(i = 1; i <= maxlen; ++i) bl_count[i+16] = (ccode = (ccode + bl_count[i-1])<<1);\n\tfor(i = 0; i < L; ++i) {\n\t\tccode = clens[i];\n\t\tif(ccode != 0) ctree[i] = bl_count[ccode+16]++;\n\t}\n\n\t/* cmap[maxlen + 4 bits] = (off&15) + (lit<<4) reverse mapping */\n\tvar cleni = 0;\n\tfor(i = 0; i < L; ++i) {\n\t\tcleni = clens[i];\n\t\tif(cleni != 0) {\n\t\t\tccode = bit_swap_n(ctree[i], maxlen)>>(maxlen-cleni);\n\t\t\tfor(j = (1<<(maxlen + 4 - cleni)) - 1; j>=0; --j)\n\t\t\t\tcmap[ccode|(j<>(8-cleni);\n\t\t\tfor(var j = (1<<(7-cleni))-1; j>=0; --j) dyn_cmap[ccode|(j<>>= 3)) {\n\t\t\tcase 16:\n\t\t\t\tw = 3 + read_bits_2(data, boff); boff += 2;\n\t\t\t\tccode = hcodes[hcodes.length - 1];\n\t\t\t\twhile(w-- > 0) hcodes.push(ccode);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\tw = 3 + read_bits_3(data, boff); boff += 3;\n\t\t\t\twhile(w-- > 0) hcodes.push(0);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\tw = 11 + read_bits_7(data, boff); boff += 7;\n\t\t\t\twhile(w -- > 0) hcodes.push(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\thcodes.push(ccode);\n\t\t\t\tif(maxlen < ccode) maxlen = ccode;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/* build literal / length trees */\n\tvar h1 = hcodes.slice(0, _HLIT), h2 = hcodes.slice(_HLIT);\n\tfor(i = _HLIT; i < 286; ++i) h1[i] = 0;\n\tfor(i = _HDIST; i < 30; ++i) h2[i] = 0;\n\tdyn_len_1 = build_tree(h1, dyn_lmap, 286);\n\tdyn_len_2 = build_tree(h2, dyn_dmap, 30);\n\treturn boff;\n}\n\n/* return [ data, bytesRead ] */\nfunction inflate(data, usz) {\n\t/* shortcircuit for empty buffer [0x03, 0x00] */\n\tif(data[0] == 3 && !(data[1] & 0x3)) { return [new_raw_buf(usz), 2]; }\n\n\t/* bit offset */\n\tvar boff = 0;\n\n\t/* header includes final bit and type bits */\n\tvar header = 0;\n\n\tvar outbuf = new_unsafe_buf(usz ? usz : (1<<18));\n\tvar woff = 0;\n\tvar OL = outbuf.length>>>0;\n\tvar max_len_1 = 0, max_len_2 = 0;\n\n\twhile((header&1) == 0) {\n\t\theader = read_bits_3(data, boff); boff += 3;\n\t\tif((header >>> 1) == 0) {\n\t\t\t/* Stored block */\n\t\t\tif(boff & 7) boff += 8 - (boff&7);\n\t\t\t/* 2 bytes sz, 2 bytes bit inverse */\n\t\t\tvar sz = data[boff>>>3] | data[(boff>>>3)+1]<<8;\n\t\t\tboff += 32;\n\t\t\t/* push sz bytes */\n\t\t\tif(!usz && OL < woff + sz) { outbuf = realloc(outbuf, woff + sz); OL = outbuf.length; }\n\t\t\tif(typeof data.copy === 'function') {\n\t\t\t\t// $FlowIgnore\n\t\t\t\tdata.copy(outbuf, woff, boff>>>3, (boff>>>3)+sz);\n\t\t\t\twoff += sz; boff += 8*sz;\n\t\t\t} else while(sz-- > 0) { outbuf[woff++] = data[boff>>>3]; boff += 8; }\n\t\t\tcontinue;\n\t\t} else if((header >>> 1) == 1) {\n\t\t\t/* Fixed Huffman */\n\t\t\tmax_len_1 = 9; max_len_2 = 5;\n\t\t} else {\n\t\t\t/* Dynamic Huffman */\n\t\t\tboff = dyn(data, boff);\n\t\t\tmax_len_1 = dyn_len_1; max_len_2 = dyn_len_2;\n\t\t}\n\t\tif(!usz && (OL < woff + 32767)) { outbuf = realloc(outbuf, woff + 32767); OL = outbuf.length; }\n\t\tfor(;;) { // while(true) is apparently out of vogue in modern JS circles\n\t\t\t/* ingest code and move read head */\n\t\t\tvar bits = read_bits_n(data, boff, max_len_1);\n\t\t\tvar code = (header>>>1) == 1 ? fix_lmap[bits] : dyn_lmap[bits];\n\t\t\tboff += code & 15; code >>>= 4;\n\t\t\t/* 0-255 are literals, 256 is end of block token, 257+ are copy tokens */\n\t\t\tif(((code>>>8)&0xFF) === 0) outbuf[woff++] = code;\n\t\t\telse if(code == 256) break;\n\t\t\telse {\n\t\t\t\tcode -= 257;\n\t\t\t\tvar len_eb = (code < 8) ? 0 : ((code-4)>>2); if(len_eb > 5) len_eb = 0;\n\t\t\t\tvar tgt = woff + LEN_LN[code];\n\t\t\t\t/* length extra bits */\n\t\t\t\tif(len_eb > 0) {\n\t\t\t\t\ttgt += read_bits_n(data, boff, len_eb);\n\t\t\t\t\tboff += len_eb;\n\t\t\t\t}\n\n\t\t\t\t/* dist code */\n\t\t\t\tbits = read_bits_n(data, boff, max_len_2);\n\t\t\t\tcode = (header>>>1) == 1 ? fix_dmap[bits] : dyn_dmap[bits];\n\t\t\t\tboff += code & 15; code >>>= 4;\n\t\t\t\tvar dst_eb = (code < 4 ? 0 : (code-2)>>1);\n\t\t\t\tvar dst = DST_LN[code];\n\t\t\t\t/* dist extra bits */\n\t\t\t\tif(dst_eb > 0) {\n\t\t\t\t\tdst += read_bits_n(data, boff, dst_eb);\n\t\t\t\t\tboff += dst_eb;\n\t\t\t\t}\n\n\t\t\t\t/* in the common case, manual byte copy is faster than TA set / Buffer copy */\n\t\t\t\tif(!usz && OL < tgt) { outbuf = realloc(outbuf, tgt); OL = outbuf.length; }\n\t\t\t\twhile(woff < tgt) { outbuf[woff] = outbuf[woff - dst]; ++woff; }\n\t\t\t}\n\t\t}\n\t}\n\treturn [usz ? outbuf : outbuf.slice(0, woff), (boff+7)>>>3];\n}\n\nfunction _inflate(payload, usz) {\n\tvar data = payload.slice(payload.l||0);\n\tvar out = inflate(data, usz);\n\tpayload.l += out[1];\n\treturn out[0];\n}\n\nfunction warn_or_throw(wrn, msg) {\n\tif(wrn) { if(typeof console !== 'undefined') console.error(msg); }\n\telse throw new Error(msg);\n}\n\nfunction parse_zip(file, options) {\n\tvar blob = file;\n\tprep_blob(blob, 0);\n\n\tvar FileIndex = [], FullPaths = [];\n\tvar o = {\n\t\tFileIndex: FileIndex,\n\t\tFullPaths: FullPaths\n\t};\n\tinit_cfb(o, { root: options.root });\n\n\t/* find end of central directory, start just after signature */\n\tvar i = blob.length - 4;\n\twhile((blob[i] != 0x50 || blob[i+1] != 0x4b || blob[i+2] != 0x05 || blob[i+3] != 0x06) && i >= 0) --i;\n\tblob.l = i + 4;\n\n\t/* parse end of central directory */\n\tblob.l += 4;\n\tvar fcnt = blob.read_shift(2);\n\tblob.l += 6;\n\tvar start_cd = blob.read_shift(4);\n\n\t/* parse central directory */\n\tblob.l = start_cd;\n\n\tfor(i = 0; i < fcnt; ++i) {\n\t\t/* trust local file header instead of CD entry */\n\t\tblob.l += 20;\n\t\tvar csz = blob.read_shift(4);\n\t\tvar usz = blob.read_shift(4);\n\t\tvar namelen = blob.read_shift(2);\n\t\tvar efsz = blob.read_shift(2);\n\t\tvar fcsz = blob.read_shift(2);\n\t\tblob.l += 8;\n\t\tvar offset = blob.read_shift(4);\n\t\tvar EF = parse_extra_field(blob.slice(blob.l+namelen, blob.l+namelen+efsz));\n\t\tblob.l += namelen + efsz + fcsz;\n\n\t\tvar L = blob.l;\n\t\tblob.l = offset + 4;\n\t\tparse_local_file(blob, csz, usz, o, EF);\n\t\tblob.l = L;\n\t}\n\n\treturn o;\n}\n\n\n/* head starts just after local file header signature */\nfunction parse_local_file(blob, csz, usz, o, EF) {\n\t/* [local file header] */\n\tblob.l += 2;\n\tvar flags = blob.read_shift(2);\n\tvar meth = blob.read_shift(2);\n\tvar date = parse_dos_date(blob);\n\n\tif(flags & 0x2041) throw new Error(\"Unsupported ZIP encryption\");\n\tvar crc32 = blob.read_shift(4);\n\tvar _csz = blob.read_shift(4);\n\tvar _usz = blob.read_shift(4);\n\n\tvar namelen = blob.read_shift(2);\n\tvar efsz = blob.read_shift(2);\n\n\t// TODO: flags & (1<<11) // UTF8\n\tvar name = \"\"; for(var i = 0; i < namelen; ++i) name += String.fromCharCode(blob[blob.l++]);\n\tif(efsz) {\n\t\tvar ef = parse_extra_field(blob.slice(blob.l, blob.l + efsz));\n\t\tif((ef[0x5455]||{}).mt) date = ef[0x5455].mt;\n\t\tif(((EF||{})[0x5455]||{}).mt) date = EF[0x5455].mt;\n\t}\n\tblob.l += efsz;\n\n\t/* [encryption header] */\n\n\t/* [file data] */\n\tvar data = blob.slice(blob.l, blob.l + _csz);\n\tswitch(meth) {\n\t\tcase 8: data = _inflateRawSync(blob, _usz); break;\n\t\tcase 0: break;\n\t\tdefault: throw new Error(\"Unsupported ZIP Compression method \" + meth);\n\t}\n\n\t/* [data descriptor] */\n\tvar wrn = false;\n\tif(flags & 8) {\n\t\tcrc32 = blob.read_shift(4);\n\t\tif(crc32 == 0x08074b50) { crc32 = blob.read_shift(4); wrn = true; }\n\t\t_csz = blob.read_shift(4);\n\t\t_usz = blob.read_shift(4);\n\t}\n\n\tif(_csz != csz) warn_or_throw(wrn, \"Bad compressed size: \" + csz + \" != \" + _csz);\n\tif(_usz != usz) warn_or_throw(wrn, \"Bad uncompressed size: \" + usz + \" != \" + _usz);\n\tvar _crc32 = CRC32.buf(data, 0);\n\tif((crc32>>0) != (_crc32>>0)) warn_or_throw(wrn, \"Bad CRC32 checksum: \" + crc32 + \" != \" + _crc32);\n\tcfb_add(o, name, data, {unsafe: true, mt: date});\n}\nfunction write_zip(cfb, options) {\n\tvar _opts = options || {};\n\tvar out = [], cdirs = [];\n\tvar o = new_buf(1);\n\tvar method = (_opts.compression ? 8 : 0), flags = 0;\n\tvar desc = false;\n\tif(desc) flags |= 8;\n\tvar i = 0, j = 0;\n\n\tvar start_cd = 0, fcnt = 0;\n\tvar root = cfb.FullPaths[0], fp = root, fi = cfb.FileIndex[0];\n\tvar crcs = [];\n\tvar sz_cd = 0;\n\n\tfor(i = 1; i < cfb.FullPaths.length; ++i) {\n\t\tfp = cfb.FullPaths[i].slice(root.length); fi = cfb.FileIndex[i];\n\t\tif(!fi.size || !fi.content || fp == \"\\u0001Sh33tJ5\") continue;\n\t\tvar start = start_cd;\n\n\t\t/* TODO: CP437 filename */\n\t\tvar namebuf = new_buf(fp.length);\n\t\tfor(j = 0; j < fp.length; ++j) namebuf.write_shift(1, fp.charCodeAt(j) & 0x7F);\n\t\tnamebuf = namebuf.slice(0, namebuf.l);\n\t\tcrcs[fcnt] = CRC32.buf(fi.content, 0);\n\n\t\tvar outbuf = fi.content;\n\t\tif(method == 8) outbuf = _deflateRawSync(outbuf);\n\n\t\t/* local file header */\n\t\to = new_buf(30);\n\t\to.write_shift(4, 0x04034b50);\n\t\to.write_shift(2, 20);\n\t\to.write_shift(2, flags);\n\t\to.write_shift(2, method);\n\t\t/* TODO: last mod file time/date */\n\t\tif(fi.mt) write_dos_date(o, fi.mt);\n\t\telse o.write_shift(4, 0);\n\t\to.write_shift(-4, (flags & 8) ? 0 : crcs[fcnt]);\n\t\to.write_shift(4, (flags & 8) ? 0 : outbuf.length);\n\t\to.write_shift(4, (flags & 8) ? 0 : fi.content.length);\n\t\to.write_shift(2, namebuf.length);\n\t\to.write_shift(2, 0);\n\n\t\tstart_cd += o.length;\n\t\tout.push(o);\n\t\tstart_cd += namebuf.length;\n\t\tout.push(namebuf);\n\n\t\t/* TODO: encryption header ? */\n\t\tstart_cd += outbuf.length;\n\t\tout.push(outbuf);\n\n\t\t/* data descriptor */\n\t\tif(flags & 8) {\n\t\t\to = new_buf(12);\n\t\t\to.write_shift(-4, crcs[fcnt]);\n\t\t\to.write_shift(4, outbuf.length);\n\t\t\to.write_shift(4, fi.content.length);\n\t\t\tstart_cd += o.l;\n\t\t\tout.push(o);\n\t\t}\n\n\t\t/* central directory */\n\t\to = new_buf(46);\n\t\to.write_shift(4, 0x02014b50);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 20);\n\t\to.write_shift(2, flags);\n\t\to.write_shift(2, method);\n\t\to.write_shift(4, 0); /* TODO: last mod file time/date */\n\t\to.write_shift(-4, crcs[fcnt]);\n\n\t\to.write_shift(4, outbuf.length);\n\t\to.write_shift(4, fi.content.length);\n\t\to.write_shift(2, namebuf.length);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(4, 0);\n\t\to.write_shift(4, start);\n\n\t\tsz_cd += o.l;\n\t\tcdirs.push(o);\n\t\tsz_cd += namebuf.length;\n\t\tcdirs.push(namebuf);\n\t\t++fcnt;\n\t}\n\n\t/* end of central directory */\n\to = new_buf(22);\n\to.write_shift(4, 0x06054b50);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, fcnt);\n\to.write_shift(2, fcnt);\n\to.write_shift(4, sz_cd);\n\to.write_shift(4, start_cd);\n\to.write_shift(2, 0);\n\n\treturn bconcat(([bconcat((out)), bconcat(cdirs), o]));\n}\nfunction cfb_new(opts) {\n\tvar o = ({});\n\tinit_cfb(o, opts);\n\treturn o;\n}\n\nfunction cfb_add(cfb, name, content, opts) {\n\tvar unsafe = opts && opts.unsafe;\n\tif(!unsafe) init_cfb(cfb);\n\tvar file = !unsafe && CFB.find(cfb, name);\n\tif(!file) {\n\t\tvar fpath = cfb.FullPaths[0];\n\t\tif(name.slice(0, fpath.length) == fpath) fpath = name;\n\t\telse {\n\t\t\tif(fpath.slice(-1) != \"/\") fpath += \"/\";\n\t\t\tfpath = (fpath + name).replace(\"//\",\"/\");\n\t\t}\n\t\tfile = ({name: filename(name), type: 2});\n\t\tcfb.FileIndex.push(file);\n\t\tcfb.FullPaths.push(fpath);\n\t\tif(!unsafe) CFB.utils.cfb_gc(cfb);\n\t}\nfile.content = (content);\n\tfile.size = content ? content.length : 0;\n\tif(opts) {\n\t\tif(opts.CLSID) file.clsid = opts.CLSID;\n\t\tif(opts.mt) file.mt = opts.mt;\n\t\tif(opts.ct) file.ct = opts.ct;\n\t}\n\treturn file;\n}\n\nfunction cfb_del(cfb, name) {\n\tinit_cfb(cfb);\n\tvar file = CFB.find(cfb, name);\n\tif(file) for(var j = 0; j < cfb.FileIndex.length; ++j) if(cfb.FileIndex[j] == file) {\n\t\tcfb.FileIndex.splice(j, 1);\n\t\tcfb.FullPaths.splice(j, 1);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nfunction cfb_mov(cfb, old_name, new_name) {\n\tinit_cfb(cfb);\n\tvar file = CFB.find(cfb, old_name);\n\tif(file) for(var j = 0; j < cfb.FileIndex.length; ++j) if(cfb.FileIndex[j] == file) {\n\t\tcfb.FileIndex[j].name = filename(new_name);\n\t\tcfb.FullPaths[j] = new_name;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nfunction cfb_gc(cfb) { rebuild_cfb(cfb, true); }\n\nexports.find = find;\nexports.read = read;\nexports.parse = parse;\nexports.write = write;\nexports.writeFile = write_file;\nexports.utils = {\n\tcfb_new: cfb_new,\n\tcfb_add: cfb_add,\n\tcfb_del: cfb_del,\n\tcfb_mov: cfb_mov,\n\tcfb_gc: cfb_gc,\n\tReadShift: ReadShift,\n\tCheckField: CheckField,\n\tprep_blob: prep_blob,\n\tbconcat: bconcat,\n\tuse_zlib: use_zlib,\n\t_deflateRaw: _deflate,\n\t_inflateRaw: _inflate,\n\tconsts: consts\n};\n\nreturn exports;\n})();\n\nif(typeof require !== 'undefined' && typeof module !== 'undefined' && typeof DO_NOT_EXPORT_CFB === 'undefined') { module.exports = CFB; }\nvar _fs;\nif(typeof require !== 'undefined') try { _fs = require('fs'); } catch(e) {}\n\n/* normalize data for blob ctor */\nfunction blobify(data) {\n\tif(typeof data === \"string\") return s2ab(data);\n\tif(Array.isArray(data)) return a2u(data);\n\treturn data;\n}\n/* write or download file */\nfunction write_dl(fname, payload, enc) {\n\t/*global IE_SaveFile, Blob, navigator, saveAs, document, File, chrome */\n\tif(typeof _fs !== 'undefined' && _fs.writeFileSync) return enc ? _fs.writeFileSync(fname, payload, enc) : _fs.writeFileSync(fname, payload);\n\tvar data = (enc == \"utf8\") ? utf8write(payload) : payload;\nif(typeof IE_SaveFile !== 'undefined') return IE_SaveFile(data, fname);\n\tif(typeof Blob !== 'undefined') {\n\t\tvar blob = new Blob([blobify(data)], {type:\"application/octet-stream\"});\nif(typeof navigator !== 'undefined' && navigator.msSaveBlob) return navigator.msSaveBlob(blob, fname);\nif(typeof saveAs !== 'undefined') return saveAs(blob, fname);\n\t\tif(typeof URL !== 'undefined' && typeof document !== 'undefined' && document.createElement && URL.createObjectURL) {\n\t\t\tvar url = URL.createObjectURL(blob);\nif(typeof chrome === 'object' && typeof (chrome.downloads||{}).download == \"function\") {\n\t\t\t\tif(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);\n\t\t\t\treturn chrome.downloads.download({ url: url, filename: fname, saveAs: true});\n\t\t\t}\n\t\t\tvar a = document.createElement(\"a\");\n\t\t\tif(a.download != null) {\na.download = fname; a.href = url; document.body.appendChild(a); a.click();\ndocument.body.removeChild(a);\n\t\t\t\tif(URL.revokeObjectURL && typeof setTimeout !== 'undefined') setTimeout(function() { URL.revokeObjectURL(url); }, 60000);\n\t\t\t\treturn url;\n\t\t\t}\n\t\t}\n\t}\n\t// $FlowIgnore\n\tif(typeof $ !== 'undefined' && typeof File !== 'undefined' && typeof Folder !== 'undefined') try { // extendscript\n\t\t// $FlowIgnore\n\t\tvar out = File(fname); out.open(\"w\"); out.encoding = \"binary\";\n\t\tif(Array.isArray(payload)) payload = a2s(payload);\n\t\tout.write(payload); out.close(); return payload;\n\t} catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; }\n\tthrow new Error(\"cannot save file \" + fname);\n}\n\n/* read binary data from file */\nfunction read_binary(path) {\n\tif(typeof _fs !== 'undefined') return _fs.readFileSync(path);\n\t// $FlowIgnore\n\tif(typeof $ !== 'undefined' && typeof File !== 'undefined' && typeof Folder !== 'undefined') try { // extendscript\n\t\t// $FlowIgnore\n\t\tvar infile = File(path); infile.open(\"r\"); infile.encoding = \"binary\";\n\t\tvar data = infile.read(); infile.close();\n\t\treturn data;\n\t} catch(e) { if(!e.message || !e.message.match(/onstruct/)) throw e; }\n\tthrow new Error(\"Cannot access file \" + path);\n}\nfunction keys(o) {\n\tvar ks = Object.keys(o), o2 = [];\n\tfor(var i = 0; i < ks.length; ++i) if(Object.prototype.hasOwnProperty.call(o, ks[i])) o2.push(ks[i]);\n\treturn o2;\n}\n\nfunction evert_key(obj, key) {\n\tvar o = ([]), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) if(o[obj[K[i]][key]] == null) o[obj[K[i]][key]] = K[i];\n\treturn o;\n}\n\nfunction evert(obj) {\n\tvar o = ([]), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) o[obj[K[i]]] = K[i];\n\treturn o;\n}\n\nfunction evert_num(obj) {\n\tvar o = ([]), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) o[obj[K[i]]] = parseInt(K[i],10);\n\treturn o;\n}\n\nfunction evert_arr(obj) {\n\tvar o = ([]), K = keys(obj);\n\tfor(var i = 0; i !== K.length; ++i) {\n\t\tif(o[obj[K[i]]] == null) o[obj[K[i]]] = [];\n\t\to[obj[K[i]]].push(K[i]);\n\t}\n\treturn o;\n}\n\nvar basedate = new Date(1899, 11, 30, 0, 0, 0); // 2209161600000\nfunction datenum(v, date1904) {\n\tvar epoch = v.getTime();\n\tif(date1904) epoch -= 1462*24*60*60*1000;\n\tvar dnthresh = basedate.getTime() + (v.getTimezoneOffset() - basedate.getTimezoneOffset()) * 60000;\n\treturn (epoch - dnthresh) / (24 * 60 * 60 * 1000);\n}\nvar refdate = new Date();\nvar dnthresh = basedate.getTime() + (refdate.getTimezoneOffset() - basedate.getTimezoneOffset()) * 60000;\nvar refoffset = refdate.getTimezoneOffset();\nfunction numdate(v) {\n\tvar out = new Date();\n\tout.setTime(v * 24 * 60 * 60 * 1000 + dnthresh);\n\tif (out.getTimezoneOffset() !== refoffset) {\n\t\tout.setTime(out.getTime() + (out.getTimezoneOffset() - refoffset) * 60000);\n\t}\n\treturn out;\n}\n\n/* ISO 8601 Duration */\nfunction parse_isodur(s) {\n\tvar sec = 0, mt = 0, time = false;\n\tvar m = s.match(/P([0-9\\.]+Y)?([0-9\\.]+M)?([0-9\\.]+D)?T([0-9\\.]+H)?([0-9\\.]+M)?([0-9\\.]+S)?/);\n\tif(!m) throw new Error(\"|\" + s + \"| is not an ISO8601 Duration\");\n\tfor(var i = 1; i != m.length; ++i) {\n\t\tif(!m[i]) continue;\n\t\tmt = 1;\n\t\tif(i > 3) time = true;\n\t\tswitch(m[i].slice(m[i].length-1)) {\n\t\t\tcase 'Y':\n\t\t\t\tthrow new Error(\"Unsupported ISO Duration Field: \" + m[i].slice(m[i].length-1));\n\t\t\tcase 'D': mt *= 24;\n\t\t\t\t/* falls through */\n\t\t\tcase 'H': mt *= 60;\n\t\t\t\t/* falls through */\n\t\t\tcase 'M':\n\t\t\t\tif(!time) throw new Error(\"Unsupported ISO Duration Field: M\");\n\t\t\t\telse mt *= 60;\n\t\t\t\t/* falls through */\n\t\t\tcase 'S': break;\n\t\t}\n\t\tsec += mt * parseInt(m[i], 10);\n\t}\n\treturn sec;\n}\n\nvar good_pd_date = new Date('2017-02-19T19:06:09.000Z');\nif(isNaN(good_pd_date.getFullYear())) good_pd_date = new Date('2/19/17');\nvar good_pd = good_pd_date.getFullYear() == 2017;\n/* parses a date as a local date */\nfunction parseDate(str, fixdate) {\n\tvar d = new Date(str);\n\tif(good_pd) {\nif(fixdate > 0) d.setTime(d.getTime() + d.getTimezoneOffset() * 60 * 1000);\n\t\telse if(fixdate < 0) d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000);\n\t\treturn d;\n\t}\n\tif(str instanceof Date) return str;\n\tif(good_pd_date.getFullYear() == 1917 && !isNaN(d.getFullYear())) {\n\t\tvar s = d.getFullYear();\n\t\tif(str.indexOf(\"\" + s) > -1) return d;\n\t\td.setFullYear(d.getFullYear() + 100); return d;\n\t}\n\tvar n = str.match(/\\d+/g)||[\"2017\",\"2\",\"19\",\"0\",\"0\",\"0\"];\n\tvar out = new Date(+n[0], +n[1] - 1, +n[2], (+n[3]||0), (+n[4]||0), (+n[5]||0));\n\tif(str.indexOf(\"Z\") > -1) out = new Date(out.getTime() - out.getTimezoneOffset() * 60 * 1000);\n\treturn out;\n}\n\nfunction cc2str(arr) {\n\tvar o = \"\";\n\tfor(var i = 0; i != arr.length; ++i) o += String.fromCharCode(arr[i]);\n\treturn o;\n}\n\nfunction dup(o) {\n\tif(typeof JSON != 'undefined' && !Array.isArray(o)) return JSON.parse(JSON.stringify(o));\n\tif(typeof o != 'object' || o == null) return o;\n\tif(o instanceof Date) return new Date(o.getTime());\n\tvar out = {};\n\tfor(var k in o) if(Object.prototype.hasOwnProperty.call(o, k)) out[k] = dup(o[k]);\n\treturn out;\n}\n\nfunction fill(c,l) { var o = \"\"; while(o.length < l) o+=c; return o; }\n\n/* TODO: stress test */\nfunction fuzzynum(s) {\n\tvar v = Number(s);\n\tif(isFinite(v)) return v;\n\tif(!isNaN(v)) return NaN;\n\tif(!/\\d/.test(s)) return v;\n\tvar wt = 1;\n\tvar ss = s.replace(/([\\d]),([\\d])/g,\"$1$2\").replace(/[$]/g,\"\").replace(/[%]/g, function() { wt *= 100; return \"\";});\n\tif(!isNaN(v = Number(ss))) return v / wt;\n\tss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;});\n\tif(!isNaN(v = Number(ss))) return v / wt;\n\treturn v;\n}\nfunction fuzzydate(s) {\n\tvar o = new Date(s), n = new Date(NaN);\n\tvar y = o.getYear(), m = o.getMonth(), d = o.getDate();\n\tif(isNaN(d)) return n;\n\tif(y < 0 || y > 8099) return n;\n\tif((m > 0 || d > 1) && y != 101) return o;\n\tif(s.toLowerCase().match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) return o;\n\tif(s.match(/[^-0-9:,\\/\\\\]/)) return n;\n\treturn o;\n}\n\nvar safe_split_regex = \"abacaba\".split(/(:?b)/i).length == 5;\nfunction split_regex(str, re, def) {\n\tif(safe_split_regex || typeof re == \"string\") return str.split(re);\n\tvar p = str.split(re), o = [p[0]];\n\tfor(var i = 1; i < p.length; ++i) { o.push(def); o.push(p[i]); }\n\treturn o;\n}\nfunction getdatastr(data) {\n\tif(!data) return null;\n\tif(data.data) return debom(data.data);\n\tif(data.asNodeBuffer && has_buf) return debom(data.asNodeBuffer().toString('binary'));\n\tif(data.asBinary) return debom(data.asBinary());\n\tif(data._data && data._data.getContent) return debom(cc2str(Array.prototype.slice.call(data._data.getContent(),0)));\n\tif(data.content && data.type) return debom(cc2str(data.content));\n\treturn null;\n}\n\nfunction getdatabin(data) {\n\tif(!data) return null;\n\tif(data.data) return char_codes(data.data);\n\tif(data.asNodeBuffer && has_buf) return data.asNodeBuffer();\n\tif(data._data && data._data.getContent) {\n\t\tvar o = data._data.getContent();\n\t\tif(typeof o == \"string\") return char_codes(o);\n\t\treturn Array.prototype.slice.call(o);\n\t}\n\tif(data.content && data.type) return data.content;\n\treturn null;\n}\n\nfunction getdata(data) { return (data && data.name.slice(-4) === \".bin\") ? getdatabin(data) : getdatastr(data); }\n\n/* Part 2 Section 10.1.2 \"Mapping Content Types\" Names are case-insensitive */\n/* OASIS does not comment on filename case sensitivity */\nfunction safegetzipfile(zip, file) {\n\tvar k = zip.FullPaths || keys(zip.files);\n\tvar f = file.toLowerCase().replace(/[\\/]/g, '\\\\'), g = f.replace(/\\\\/g,'\\/');\n\tfor(var i=0; i\\/]+)\\s*=\\s*((?:\")([^\"]*)(?:\")|(?:')([^']*)(?:')|([^'\">\\s]+))/g;\nvar tagregex=/<[\\/\\?]?[a-zA-Z0-9:_-]+(?:\\s+[^\"\\s?>\\/]+\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^'\">\\s=]+))*\\s*[\\/\\?]?>/mg;\n\nif(!(XML_HEADER.match(tagregex))) tagregex = /<[^>]*>/g;\nvar nsregex=/<\\w*:/, nsregex2 = /<(\\/?)\\w+:/;\nfunction parsexmltag(tag, skip_root, skip_LC) {\n\tvar z = ({});\n\tvar eq = 0, c = 0;\n\tfor(; eq !== tag.length; ++eq) if((c = tag.charCodeAt(eq)) === 32 || c === 10 || c === 13) break;\n\tif(!skip_root) z[0] = tag.slice(0, eq);\n\tif(eq === tag.length) return z;\n\tvar m = tag.match(attregexg), j=0, v=\"\", i=0, q=\"\", cc=\"\", quot = 1;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\tcc = m[i];\n\t\tfor(c=0; c != cc.length; ++c) if(cc.charCodeAt(c) === 61) break;\n\t\tq = cc.slice(0,c).trim();\n\t\twhile(cc.charCodeAt(c+1) == 32) ++c;\n\t\tquot = ((eq=cc.charCodeAt(c+1)) == 34 || eq == 39) ? 1 : 0;\n\t\tv = cc.slice(c+1+quot, cc.length-quot);\n\t\tfor(j=0;j!=q.length;++j) if(q.charCodeAt(j) === 58) break;\n\t\tif(j===q.length) {\n\t\t\tif(q.indexOf(\"_\") > 0) q = q.slice(0, q.indexOf(\"_\")); // from ods\n\t\t\tz[q] = v;\n\t\t\tif(!skip_LC) z[q.toLowerCase()] = v;\n\t\t}\n\t\telse {\n\t\t\tvar k = (j===5 && q.slice(0,5)===\"xmlns\"?\"xmlns\":\"\")+q.slice(j+1);\n\t\t\tif(z[k] && q.slice(j-3,j) == \"ext\") continue; // from ods\n\t\t\tz[k] = v;\n\t\t\tif(!skip_LC) z[k.toLowerCase()] = v;\n\t\t}\n\t}\n\treturn z;\n}\nfunction strip_ns(x) { return x.replace(nsregex2, \"<$1\"); }\n\nvar encodings = {\n\t'"': '\"',\n\t''': \"'\",\n\t'>': '>',\n\t'<': '<',\n\t'&': '&'\n};\nvar rencoding = evert(encodings);\n//var rencstr = \"&<>'\\\"\".split(\"\");\n\n// TODO: CP remap (need to read file version to determine OS)\nvar unescapexml = (function() {\n\t/* 22.4.2.4 bstr (Basic String) */\n\tvar encregex = /&(?:quot|apos|gt|lt|amp|#x?([\\da-fA-F]+));/ig, coderegex = /_x([\\da-fA-F]{4})_/ig;\n\treturn function unescapexml(text) {\n\t\tvar s = text + '', i = s.indexOf(\"-1?16:10))||$$; }).replace(coderegex,function(m,c) {return String.fromCharCode(parseInt(c,16));});\n\t\tvar j = s.indexOf(\"]]>\");\n\t\treturn unescapexml(s.slice(0, i)) + s.slice(i+9,j) + unescapexml(s.slice(j+3));\n\t};\n})();\n\nvar decregex=/[&<>'\"]/g, charegex = /[\\u0000-\\u0008\\u000b-\\u001f]/g;\nfunction escapexml(text){\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(charegex,function(s) { return \"_x\" + (\"000\"+s.charCodeAt(0).toString(16)).slice(-4) + \"_\";});\n}\nfunction escapexmltag(text){ return escapexml(text).replace(/ /g,\"_x0020_\"); }\n\nvar htmlcharegex = /[\\u0000-\\u001f]/g;\nfunction escapehtml(text){\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(/\\n/g, \"
\").replace(htmlcharegex,function(s) { return \"\" + (\"000\"+s.charCodeAt(0).toString(16)).slice(-4) + \";\"; });\n}\n\nfunction escapexlml(text){\n\tvar s = text + '';\n\treturn s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) { return \"\" + (s.charCodeAt(0).toString(16)).toUpperCase() + \";\"; });\n}\n\n/* TODO: handle codepages */\nvar xlml_fixstr = (function() {\n\tvar entregex = /(\\d+);/g;\n\tfunction entrepl($$,$1) { return String.fromCharCode(parseInt($1,10)); }\n\treturn function xlml_fixstr(str) { return str.replace(entregex,entrepl); };\n})();\nvar xlml_unfixstr = (function() {\n\treturn function xlml_unfixstr(str) { return str.replace(/(\\r\\n|[\\r\\n])/g,\"\\
\"); };\n})();\n\nfunction parsexmlbool(value) {\n\tswitch(value) {\n\t\tcase 1: case true: case '1': case 'true': case 'TRUE': return true;\n\t\t/* case '0': case 'false': case 'FALSE':*/\n\t\tdefault: return false;\n\t}\n}\n\nvar utf8read = function utf8reada(orig) {\n\tvar out = \"\", i = 0, c = 0, d = 0, e = 0, f = 0, w = 0;\n\twhile (i < orig.length) {\n\t\tc = orig.charCodeAt(i++);\n\t\tif (c < 128) { out += String.fromCharCode(c); continue; }\n\t\td = orig.charCodeAt(i++);\n\t\tif (c>191 && c<224) { f = ((c & 31) << 6); f |= (d & 63); out += String.fromCharCode(f); continue; }\n\t\te = orig.charCodeAt(i++);\n\t\tif (c < 240) { out += String.fromCharCode(((c & 15) << 12) | ((d & 63) << 6) | (e & 63)); continue; }\n\t\tf = orig.charCodeAt(i++);\n\t\tw = (((c & 7) << 18) | ((d & 63) << 12) | ((e & 63) << 6) | (f & 63))-65536;\n\t\tout += String.fromCharCode(0xD800 + ((w>>>10)&1023));\n\t\tout += String.fromCharCode(0xDC00 + (w&1023));\n\t}\n\treturn out;\n};\n\nvar utf8write = function(orig) {\n\tvar out = [], i = 0, c = 0, d = 0;\n\twhile(i < orig.length) {\n\t\tc = orig.charCodeAt(i++);\n\t\tswitch(true) {\n\t\t\tcase c < 128: out.push(String.fromCharCode(c)); break;\n\t\t\tcase c < 2048:\n\t\t\t\tout.push(String.fromCharCode(192 + (c >> 6)));\n\t\t\t\tout.push(String.fromCharCode(128 + (c & 63)));\n\t\t\t\tbreak;\n\t\t\tcase c >= 55296 && c < 57344:\n\t\t\t\tc -= 55296; d = orig.charCodeAt(i++) - 56320 + (c<<10);\n\t\t\t\tout.push(String.fromCharCode(240 + ((d >>18) & 7)));\n\t\t\t\tout.push(String.fromCharCode(144 + ((d >>12) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + ((d >> 6) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + (d & 63)));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tout.push(String.fromCharCode(224 + (c >> 12)));\n\t\t\t\tout.push(String.fromCharCode(128 + ((c >> 6) & 63)));\n\t\t\t\tout.push(String.fromCharCode(128 + (c & 63)));\n\t\t}\n\t}\n\treturn out.join(\"\");\n};\n\nif(has_buf) {\n\tvar utf8readb = function utf8readb(data) {\n\t\tvar out = Buffer.alloc(2*data.length), w, i, j = 1, k = 0, ww=0, c;\n\t\tfor(i = 0; i < data.length; i+=j) {\n\t\t\tj = 1;\n\t\t\tif((c=data.charCodeAt(i)) < 128) w = c;\n\t\t\telse if(c < 224) { w = (c&31)*64+(data.charCodeAt(i+1)&63); j=2; }\n\t\t\telse if(c < 240) { w=(c&15)*4096+(data.charCodeAt(i+1)&63)*64+(data.charCodeAt(i+2)&63); j=3; }\n\t\t\telse { j = 4;\n\t\t\t\tw = (c & 7)*262144+(data.charCodeAt(i+1)&63)*4096+(data.charCodeAt(i+2)&63)*64+(data.charCodeAt(i+3)&63);\n\t\t\t\tw -= 65536; ww = 0xD800 + ((w>>>10)&1023); w = 0xDC00 + (w&1023);\n\t\t\t}\n\t\t\tif(ww !== 0) { out[k++] = ww&255; out[k++] = ww>>>8; ww = 0; }\n\t\t\tout[k++] = w%256; out[k++] = w>>>8;\n\t\t}\n\t\treturn out.slice(0,k).toString('ucs2');\n\t};\n\tvar corpus = \"foo bar baz\\u00e2\\u0098\\u0083\\u00f0\\u009f\\u008d\\u00a3\";\n\tif(utf8read(corpus) == utf8readb(corpus)) utf8read = utf8readb;\n\tvar utf8readc = function utf8readc(data) { return Buffer_from(data, 'binary').toString('utf8'); };\n\tif(utf8read(corpus) == utf8readc(corpus)) utf8read = utf8readc;\n\n\tutf8write = function(data) { return Buffer_from(data, 'utf8').toString(\"binary\"); };\n}\n\n// matches ... extracts content\nvar matchtag = (function() {\n\tvar mtcache = ({});\n\treturn function matchtag(f,g) {\n\t\tvar t = f+\"|\"+(g||\"\");\n\t\tif(mtcache[t]) return mtcache[t];\n\t\treturn (mtcache[t] = new RegExp('<(?:\\\\w+:)?'+f+'(?: xml:space=\"preserve\")?(?:[^>]*)>([\\\\s\\\\S]*?)(?:\\\\w+:)?'+f+'>',((g||\"\"))));\n\t};\n})();\n\nvar htmldecode = (function() {\n\tvar entities = [\n\t\t['nbsp', ' '], ['middot', '·'],\n\t\t['quot', '\"'], ['apos', \"'\"], ['gt', '>'], ['lt', '<'], ['amp', '&']\n\t].map(function(x) { return [new RegExp('&' + x[0] + ';', \"ig\"), x[1]]; });\n\treturn function htmldecode(str) {\n\t\tvar o = str\n\t\t\t\t// Remove new lines and spaces from start of content\n\t\t\t\t.replace(/^[\\t\\n\\r ]+/, \"\")\n\t\t\t\t// Remove new lines and spaces from end of content\n\t\t\t\t.replace(/[\\t\\n\\r ]+$/,\"\")\n\t\t\t\t// Added line which removes any white space characters after and before html tags\n\t\t\t\t.replace(/>\\s+/g,\">\").replace(/\\s+ tags with new lines\n\t\t\t\t.replace(/<\\s*[bB][rR]\\s*\\/?>/g,\"\\n\")\n\t\t\t\t// Strip HTML elements\n\t\t\t\t.replace(/<[^>]*>/g,\"\");\n\t\tfor(var i = 0; i < entities.length; ++i) o = o.replace(entities[i][0], entities[i][1]);\n\t\treturn o;\n\t};\n})();\n\nvar vtregex = (function(){ var vt_cache = {};\n\treturn function vt_regex(bt) {\n\t\tif(vt_cache[bt] !== undefined) return vt_cache[bt];\n\t\treturn (vt_cache[bt] = new RegExp(\"<(?:vt:)?\" + bt + \">([\\\\s\\\\S]*?)(?:vt:)?\" + bt + \">\", 'g') );\n};})();\nvar vtvregex = /<\\/?(?:vt:)?variant>/g, vtmregex = /<(?:vt:)([^>]*)>([\\s\\S]*);\nfunction parseVector(data, opts) {\n\tvar h = parsexmltag(data);\n\n\tvar matches = data.match(vtregex(h.baseType))||[];\n\tvar res = [];\n\tif(matches.length != h.size) {\n\t\tif(opts.WTF) throw new Error(\"unexpected vector length \" + matches.length + \" != \" + h.size);\n\t\treturn res;\n\t}\n\tmatches.forEach(function(x) {\n\t\tvar v = x.replace(vtvregex,\"\").match(vtmregex);\n\t\tif(v) res.push({v:utf8read(v[2]), t:v[1]});\n\t});\n\treturn res;\n}\n\nvar wtregex = /(^\\s|\\s$|\\n)/;\nfunction writetag(f,g) { return '<' + f + (g.match(wtregex)?' xml:space=\"preserve\"' : \"\") + '>' + g + '' + f + '>'; }\n\nfunction wxt_helper(h) { return keys(h).map(function(k) { return \" \" + k + '=\"' + h[k] + '\"';}).join(\"\"); }\nfunction writextag(f,g,h) { return '<' + f + ((h != null) ? wxt_helper(h) : \"\") + ((g != null) ? (g.match(wtregex)?' xml:space=\"preserve\"' : \"\") + '>' + g + '' + f : \"/\") + '>';}\n\nfunction write_w3cdtf(d, t) { try { return d.toISOString().replace(/\\.\\d*/,\"\"); } catch(e) { if(t) throw e; } return \"\"; }\n\nfunction write_vt(s, xlsx) {\n\tswitch(typeof s) {\n\t\tcase 'string':\n\t\t\tvar o = writextag('vt:lpwstr', escapexml(s));\n\t\t\tif(xlsx) o = o.replace(/"/g, \"_x0022_\");\n\t\t\treturn o;\n\t\tcase 'number': return writextag((s|0)==s?'vt:i4':'vt:r8', escapexml(String(s)));\n\t\tcase 'boolean': return writextag('vt:bool',s?'true':'false');\n\t}\n\tif(s instanceof Date) return writextag('vt:filetime', write_w3cdtf(s));\n\tthrow new Error(\"Unable to serialize \" + s);\n}\n\nvar XMLNS = ({\n\t'dc': 'http://purl.org/dc/elements/1.1/',\n\t'dcterms': 'http://purl.org/dc/terms/',\n\t'dcmitype': 'http://purl.org/dc/dcmitype/',\n\t'mx': 'http://schemas.microsoft.com/office/mac/excel/2008/main',\n\t'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',\n\t'sjs': 'http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties',\n\t'vt': 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes',\n\t'xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n\t'xsd': 'http://www.w3.org/2001/XMLSchema'\n});\n\nXMLNS.main = [\n\t'http://schemas.openxmlformats.org/spreadsheetml/2006/main',\n\t'http://purl.oclc.org/ooxml/spreadsheetml/main',\n\t'http://schemas.microsoft.com/office/excel/2006/main',\n\t'http://schemas.microsoft.com/office/excel/2006/2'\n];\n\nvar XLMLNS = ({\n\t'o': 'urn:schemas-microsoft-com:office:office',\n\t'x': 'urn:schemas-microsoft-com:office:excel',\n\t'ss': 'urn:schemas-microsoft-com:office:spreadsheet',\n\t'dt': 'uuid:C2F41010-65B3-11d1-A29F-00AA00C14882',\n\t'mv': 'http://macVmlSchemaUri',\n\t'v': 'urn:schemas-microsoft-com:vml',\n\t'html': 'http://www.w3.org/TR/REC-html40'\n});\nfunction read_double_le(b, idx) {\n\tvar s = 1 - 2 * (b[idx + 7] >>> 7);\n\tvar e = ((b[idx + 7] & 0x7f) << 4) + ((b[idx + 6] >>> 4) & 0x0f);\n\tvar m = (b[idx+6]&0x0f);\n\tfor(var i = 5; i >= 0; --i) m = m * 256 + b[idx + i];\n\tif(e == 0x7ff) return m == 0 ? (s * Infinity) : NaN;\n\tif(e == 0) e = -1022;\n\telse { e -= 1023; m += Math.pow(2,52); }\n\treturn s * Math.pow(2, e - 52) * m;\n}\n\nfunction write_double_le(b, v, idx) {\n\tvar bs = ((((v < 0) || (1/v == -Infinity)) ? 1 : 0) << 7), e = 0, m = 0;\n\tvar av = bs ? (-v) : v;\n\tif(!isFinite(av)) { e = 0x7ff; m = isNaN(v) ? 0x6969 : 0; }\n\telse if(av == 0) e = m = 0;\n\telse {\n\t\te = Math.floor(Math.log(av) / Math.LN2);\n\t\tm = av * Math.pow(2, 52 - e);\n\t\tif((e <= -1023) && (!isFinite(m) || (m < Math.pow(2,52)))) { e = -1022; }\n\t\telse { m -= Math.pow(2,52); e+=1023; }\n\t}\n\tfor(var i = 0; i <= 5; ++i, m/=256) b[idx + i] = m & 0xff;\n\tb[idx + 6] = ((e & 0x0f) << 4) | (m & 0xf);\n\tb[idx + 7] = (e >> 4) | bs;\n}\n\nvar __toBuffer = function(bufs) { var x=[],w=10240; for(var i=0;i 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar ___lpstr = __lpstr;\nvar __cpstr = function(b,i) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar ___cpstr = __cpstr;\nvar __lpwstr = function(b,i) { var len = 2*__readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len-1) : \"\";};\nvar ___lpwstr = __lpwstr;\nvar __lpp4, ___lpp4;\n__lpp4 = ___lpp4 = function lpp4_(b,i) { var len = __readUInt32LE(b,i); return len > 0 ? __utf16le(b, i+4,i+4+len) : \"\";};\nvar __8lpp4 = function(b,i) { var len = __readUInt32LE(b,i); return len > 0 ? __utf8(b, i+4,i+4+len) : \"\";};\nvar ___8lpp4 = __8lpp4;\nvar __double, ___double;\n__double = ___double = function(b, idx) { return read_double_le(b, idx);};\nvar is_buf = function is_buf_a(a) { return Array.isArray(a); };\n\nif(has_buf) {\n\t__utf16le = function(b,s,e) { if(!Buffer.isBuffer(b)) return ___utf16le(b,s,e); return b.toString('utf16le',s,e).replace(chr0,'')/*.replace(chr1,'!')*/; };\n\t__hexlify = function(b,s,l) { return Buffer.isBuffer(b) ? b.toString('hex',s,s+l) : ___hexlify(b,s,l); };\n\t__lpstr = function lpstr_b(b, i) { if(!Buffer.isBuffer(b)) return ___lpstr(b, i); var len = b.readUInt32LE(i); return len > 0 ? b.toString('utf8',i+4,i+4+len-1) : \"\";};\n\t__cpstr = function cpstr_b(b, i) { if(!Buffer.isBuffer(b)) return ___cpstr(b, i); var len = b.readUInt32LE(i); return len > 0 ? b.toString('utf8',i+4,i+4+len-1) : \"\";};\n\t__lpwstr = function lpwstr_b(b, i) { if(!Buffer.isBuffer(b)) return ___lpwstr(b, i); var len = 2*b.readUInt32LE(i); return b.toString('utf16le',i+4,i+4+len-1);};\n\t__lpp4 = function lpp4_b(b, i) { if(!Buffer.isBuffer(b)) return ___lpp4(b, i); var len = b.readUInt32LE(i); return b.toString('utf16le',i+4,i+4+len);};\n\t__8lpp4 = function lpp4_8b(b, i) { if(!Buffer.isBuffer(b)) return ___8lpp4(b, i); var len = b.readUInt32LE(i); return b.toString('utf8',i+4,i+4+len);};\n\t__utf8 = function utf8_b(b, s, e) { return (Buffer.isBuffer(b)) ? b.toString('utf8',s,e) : ___utf8(b,s,e); };\n\t__toBuffer = function(bufs) { return (bufs[0].length > 0 && Buffer.isBuffer(bufs[0][0])) ? Buffer.concat(bufs[0]) : ___toBuffer(bufs);};\n\tbconcat = function(bufs) { return Buffer.isBuffer(bufs[0]) ? Buffer.concat(bufs) : [].concat.apply([], bufs); };\n\t__double = function double_(b, i) { if(Buffer.isBuffer(b)) return b.readDoubleLE(i); return ___double(b,i); };\n\tis_buf = function is_buf_b(a) { return Buffer.isBuffer(a) || Array.isArray(a); };\n}\n\n/* from js-xls */\nif(typeof cptable !== 'undefined') {\n\t__utf16le = function(b,s,e) { return cptable.utils.decode(1200, b.slice(s,e)).replace(chr0, ''); };\n\t__utf8 = function(b,s,e) { return cptable.utils.decode(65001, b.slice(s,e)); };\n\t__lpstr = function(b,i) { var len = __readUInt32LE(b,i); return len > 0 ? cptable.utils.decode(current_ansi, b.slice(i+4, i+4+len-1)) : \"\";};\n\t__cpstr = function(b,i) { var len = __readUInt32LE(b,i); return len > 0 ? cptable.utils.decode(current_codepage, b.slice(i+4, i+4+len-1)) : \"\";};\n\t__lpwstr = function(b,i) { var len = 2*__readUInt32LE(b,i); return len > 0 ? cptable.utils.decode(1200, b.slice(i+4,i+4+len-1)) : \"\";};\n\t__lpp4 = function(b,i) { var len = __readUInt32LE(b,i); return len > 0 ? cptable.utils.decode(1200, b.slice(i+4,i+4+len)) : \"\";};\n\t__8lpp4 = function(b,i) { var len = __readUInt32LE(b,i); return len > 0 ? cptable.utils.decode(65001, b.slice(i+4,i+4+len)) : \"\";};\n}\n\nvar __readUInt8 = function(b, idx) { return b[idx]; };\nvar __readUInt16LE = function(b, idx) { return (b[idx+1]*(1<<8))+b[idx]; };\nvar __readInt16LE = function(b, idx) { var u = (b[idx+1]*(1<<8))+b[idx]; return (u < 0x8000) ? u : ((0xffff - u + 1) * -1); };\nvar __readUInt32LE = function(b, idx) { return b[idx+3]*(1<<24)+(b[idx+2]<<16)+(b[idx+1]<<8)+b[idx]; };\nvar __readInt32LE = function(b, idx) { return (b[idx+3]<<24)|(b[idx+2]<<16)|(b[idx+1]<<8)|b[idx]; };\nvar __readInt32BE = function(b, idx) { return (b[idx]<<24)|(b[idx+1]<<16)|(b[idx+2]<<8)|b[idx+3]; };\n\nfunction ReadShift(size, t) {\n\tvar o=\"\", oI, oR, oo=[], w, vv, i, loc;\n\tswitch(t) {\n\t\tcase 'dbcs':\n\t\t\tloc = this.l;\n\t\t\tif(has_buf && Buffer.isBuffer(this)) o = this.slice(this.l, this.l+2*size).toString(\"utf16le\");\n\t\t\telse for(i = 0; i < size; ++i) { o+=String.fromCharCode(__readUInt16LE(this, loc)); loc+=2; }\n\t\t\tsize *= 2;\n\t\t\tbreak;\n\n\t\tcase 'utf8': o = __utf8(this, this.l, this.l + size); break;\n\t\tcase 'utf16le': size *= 2; o = __utf16le(this, this.l, this.l + size); break;\n\n\t\tcase 'wstr':\n\t\t\tif(typeof cptable !== 'undefined') o = cptable.utils.decode(current_codepage, this.slice(this.l, this.l+2*size));\n\t\t\telse return ReadShift.call(this, size, 'dbcs');\n\t\t\tsize = 2 * size; break;\n\n\t\t/* [MS-OLEDS] 2.1.4 LengthPrefixedAnsiString */\n\t\tcase 'lpstr-ansi': o = __lpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break;\n\t\tcase 'lpstr-cp': o = __cpstr(this, this.l); size = 4 + __readUInt32LE(this, this.l); break;\n\t\t/* [MS-OLEDS] 2.1.5 LengthPrefixedUnicodeString */\n\t\tcase 'lpwstr': o = __lpwstr(this, this.l); size = 4 + 2 * __readUInt32LE(this, this.l); break;\n\t\t/* [MS-OFFCRYPTO] 2.1.2 Length-Prefixed Padded Unicode String (UNICODE-LP-P4) */\n\t\tcase 'lpp4': size = 4 + __readUInt32LE(this, this.l); o = __lpp4(this, this.l); if(size & 0x02) size += 2; break;\n\t\t/* [MS-OFFCRYPTO] 2.1.3 Length-Prefixed UTF-8 String (UTF-8-LP-P4) */\n\t\tcase '8lpp4': size = 4 + __readUInt32LE(this, this.l); o = __8lpp4(this, this.l); if(size & 0x03) size += 4 - (size & 0x03); break;\n\n\t\tcase 'cstr': size = 0; o = \"\";\n\t\t\twhile((w=__readUInt8(this, this.l + size++))!==0) oo.push(_getchar(w));\n\t\t\to = oo.join(\"\"); break;\n\t\tcase '_wstr': size = 0; o = \"\";\n\t\t\twhile((w=__readUInt16LE(this,this.l +size))!==0){oo.push(_getchar(w));size+=2;}\n\t\t\tsize+=2; o = oo.join(\"\"); break;\n\n\t\t/* sbcs and dbcs support continue records in the SST way TODO codepages */\n\t\tcase 'dbcs-cont': o = \"\"; loc = this.l;\n\t\t\tfor(i = 0; i < size; ++i) {\n\t\t\t\tif(this.lens && this.lens.indexOf(loc) !== -1) {\n\t\t\t\t\tw = __readUInt8(this, loc);\n\t\t\t\t\tthis.l = loc + 1;\n\t\t\t\t\tvv = ReadShift.call(this, size-i, w ? 'dbcs-cont' : 'sbcs-cont');\n\t\t\t\t\treturn oo.join(\"\") + vv;\n\t\t\t\t}\n\t\t\t\too.push(_getchar(__readUInt16LE(this, loc)));\n\t\t\t\tloc+=2;\n\t\t\t} o = oo.join(\"\"); size *= 2; break;\n\n\t\tcase 'cpstr':\n\t\t\tif(typeof cptable !== 'undefined') {\n\t\t\t\to = cptable.utils.decode(current_codepage, this.slice(this.l, this.l + size));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t/* falls through */\n\t\tcase 'sbcs-cont': o = \"\"; loc = this.l;\n\t\t\tfor(i = 0; i != size; ++i) {\n\t\t\t\tif(this.lens && this.lens.indexOf(loc) !== -1) {\n\t\t\t\t\tw = __readUInt8(this, loc);\n\t\t\t\t\tthis.l = loc + 1;\n\t\t\t\t\tvv = ReadShift.call(this, size-i, w ? 'dbcs-cont' : 'sbcs-cont');\n\t\t\t\t\treturn oo.join(\"\") + vv;\n\t\t\t\t}\n\t\t\t\too.push(_getchar(__readUInt8(this, loc)));\n\t\t\t\tloc+=1;\n\t\t\t} o = oo.join(\"\"); break;\n\n\t\tdefault:\n\tswitch(size) {\n\t\tcase 1: oI = __readUInt8(this, this.l); this.l++; return oI;\n\t\tcase 2: oI = (t === 'i' ? __readInt16LE : __readUInt16LE)(this, this.l); this.l += 2; return oI;\n\t\tcase 4: case -4:\n\t\t\tif(t === 'i' || ((this[this.l+3] & 0x80)===0)) { oI = ((size > 0) ? __readInt32LE : __readInt32BE)(this, this.l); this.l += 4; return oI; }\n\t\t\telse { oR = __readUInt32LE(this, this.l); this.l += 4; } return oR;\n\t\tcase 8: case -8:\n\t\t\tif(t === 'f') {\n\t\t\t\tif(size == 8) oR = __double(this, this.l);\n\t\t\t\telse oR = __double([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]], 0);\n\t\t\t\tthis.l += 8; return oR;\n\t\t\t} else size = 8;\n\t\t/* falls through */\n\t\tcase 16: o = __hexlify(this, this.l, size); break;\n\t}}\n\tthis.l+=size; return o;\n}\n\nvar __writeUInt32LE = function(b, val, idx) { b[idx] = (val & 0xFF); b[idx+1] = ((val >>> 8) & 0xFF); b[idx+2] = ((val >>> 16) & 0xFF); b[idx+3] = ((val >>> 24) & 0xFF); };\nvar __writeInt32LE = function(b, val, idx) { b[idx] = (val & 0xFF); b[idx+1] = ((val >> 8) & 0xFF); b[idx+2] = ((val >> 16) & 0xFF); b[idx+3] = ((val >> 24) & 0xFF); };\nvar __writeUInt16LE = function(b, val, idx) { b[idx] = (val & 0xFF); b[idx+1] = ((val >>> 8) & 0xFF); };\n\nfunction WriteShift(t, val, f) {\n\tvar size = 0, i = 0;\n\tif(f === 'dbcs') {\nfor(i = 0; i != val.length; ++i) __writeUInt16LE(this, val.charCodeAt(i), this.l + 2 * i);\n\t\tsize = 2 * val.length;\n\t} else if(f === 'sbcs') {\n\t\tif(typeof cptable !== 'undefined' && current_ansi == 874) {\n\t\t\t/* TODO: use tables directly, don't encode */\nfor(i = 0; i != val.length; ++i) {\n\t\t\t\tvar cppayload = cptable.utils.encode(current_ansi, val.charAt(i));\n\t\t\t\tthis[this.l + i] = cppayload[0];\n\t\t\t}\n\t\t} else {\nval = val.replace(/[^\\x00-\\x7F]/g, \"_\");\nfor(i = 0; i != val.length; ++i) this[this.l + i] = (val.charCodeAt(i) & 0xFF);\n\t\t}\n\t\tsize = val.length;\n\t} else if(f === 'hex') {\n\t\tfor(; i < t; ++i) {\nthis[this.l++] = (parseInt(val.slice(2*i, 2*i+2), 16)||0);\n\t\t} return this;\n\t} else if(f === 'utf16le') {\nvar end = Math.min(this.l + t, this.length);\n\t\t\tfor(i = 0; i < Math.min(val.length, t); ++i) {\n\t\t\t\tvar cc = val.charCodeAt(i);\n\t\t\t\tthis[this.l++] = (cc & 0xff);\n\t\t\t\tthis[this.l++] = (cc >> 8);\n\t\t\t}\n\t\t\twhile(this.l < end) this[this.l++] = 0;\n\t\t\treturn this;\n\t} else switch(t) {\n\t\tcase 1: size = 1; this[this.l] = val&0xFF; break;\n\t\tcase 2: size = 2; this[this.l] = val&0xFF; val >>>= 8; this[this.l+1] = val&0xFF; break;\n\t\tcase 3: size = 3; this[this.l] = val&0xFF; val >>>= 8; this[this.l+1] = val&0xFF; val >>>= 8; this[this.l+2] = val&0xFF; break;\n\t\tcase 4: size = 4; __writeUInt32LE(this, val, this.l); break;\n\t\tcase 8: size = 8; if(f === 'f') { write_double_le(this, val, this.l); break; }\n\t\t/* falls through */\n\t\tcase 16: break;\n\t\tcase -4: size = 4; __writeInt32LE(this, val, this.l); break;\n\t}\n\tthis.l += size; return this;\n}\n\nfunction CheckField(hexstr, fld) {\n\tvar m = __hexlify(this,this.l,hexstr.length>>1);\n\tif(m !== hexstr) throw new Error(fld + 'Expected ' + hexstr + ' saw ' + m);\n\tthis.l += hexstr.length>>1;\n}\n\nfunction prep_blob(blob, pos) {\n\tblob.l = pos;\n\tblob.read_shift = ReadShift;\n\tblob.chk = CheckField;\n\tblob.write_shift = WriteShift;\n}\n\nfunction parsenoop(blob, length) { blob.l += length; }\n\nfunction new_buf(sz) {\n\tvar o = new_raw_buf(sz);\n\tprep_blob(o, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.1.4 Record */\nfunction recordhopper(data, cb, opts) {\n\tif(!data) return;\n\tvar tmpbyte, cntbyte, length;\n\tprep_blob(data, data.l || 0);\n\tvar L = data.length, RT = 0, tgt = 0;\n\twhile(data.l < L) {\n\t\tRT = data.read_shift(1);\n\t\tif(RT & 0x80) RT = (RT & 0x7F) + ((data.read_shift(1) & 0x7F)<<7);\n\t\tvar R = XLSBRecordEnum[RT] || XLSBRecordEnum[0xFFFF];\n\t\ttmpbyte = data.read_shift(1);\n\t\tlength = tmpbyte & 0x7F;\n\t\tfor(cntbyte = 1; cntbyte <4 && (tmpbyte & 0x80); ++cntbyte) length += ((tmpbyte = data.read_shift(1)) & 0x7F)<<(7*cntbyte);\n\t\ttgt = data.l + length;\n\t\tvar d = R.f && R.f(data, length, opts);\n\t\tdata.l = tgt;\n\t\tif(cb(d, R.n, RT)) return;\n\t}\n}\n\n/* control buffer usage for fixed-length buffers */\nfunction buf_array() {\n\tvar bufs = [], blksz = has_buf ? 256 : 2048;\n\tvar newblk = function ba_newblk(sz) {\n\t\tvar o = (new_buf(sz));\n\t\tprep_blob(o, 0);\n\t\treturn o;\n\t};\n\n\tvar curbuf = newblk(blksz);\n\n\tvar endbuf = function ba_endbuf() {\n\t\tif(!curbuf) return;\n\t\tif(curbuf.length > curbuf.l) { curbuf = curbuf.slice(0, curbuf.l); curbuf.l = curbuf.length; }\n\t\tif(curbuf.length > 0) bufs.push(curbuf);\n\t\tcurbuf = null;\n\t};\n\n\tvar next = function ba_next(sz) {\n\t\tif(curbuf && (sz < (curbuf.length - curbuf.l))) return curbuf;\n\t\tendbuf();\n\t\treturn (curbuf = newblk(Math.max(sz+1, blksz)));\n\t};\n\n\tvar end = function ba_end() {\n\t\tendbuf();\n\t\treturn __toBuffer([bufs]);\n\t};\n\n\tvar push = function ba_push(buf) { endbuf(); curbuf = buf; if(curbuf.l == null) curbuf.l = curbuf.length; next(blksz); };\n\n\treturn ({ next:next, push:push, end:end, _bufs:bufs });\n}\n\nfunction write_record(ba, type, payload, length) {\n\tvar t = +XLSBRE[type], l;\n\tif(isNaN(t)) return; // TODO: throw something here?\n\tif(!length) length = XLSBRecordEnum[t].p || (payload||[]).length || 0;\n\tl = 1 + (t >= 0x80 ? 1 : 0) + 1/* + length*/;\n\tif(length >= 0x80) ++l; if(length >= 0x4000) ++l; if(length >= 0x200000) ++l;\n\tvar o = ba.next(l);\n\tif(t <= 0x7F) o.write_shift(1, t);\n\telse {\n\t\to.write_shift(1, (t & 0x7F) + 0x80);\n\t\to.write_shift(1, (t >> 7));\n\t}\n\tfor(var i = 0; i != 4; ++i) {\n\t\tif(length >= 0x80) { o.write_shift(1, (length & 0x7F)+0x80); length >>= 7; }\n\t\telse { o.write_shift(1, length); break; }\n\t}\n\tif(length > 0 && is_buf(payload)) ba.push(payload);\n}\n/* XLS ranges enforced */\nfunction shift_cell_xls(cell, tgt, opts) {\n\tvar out = dup(cell);\n\tif(tgt.s) {\n\t\tif(out.cRel) out.c += tgt.s.c;\n\t\tif(out.rRel) out.r += tgt.s.r;\n\t} else {\n\t\tif(out.cRel) out.c += tgt.c;\n\t\tif(out.rRel) out.r += tgt.r;\n\t}\n\tif(!opts || opts.biff < 12) {\n\t\twhile(out.c >= 0x100) out.c -= 0x100;\n\t\twhile(out.r >= 0x10000) out.r -= 0x10000;\n\t}\n\treturn out;\n}\n\nfunction shift_range_xls(cell, range, opts) {\n\tvar out = dup(cell);\n\tout.s = shift_cell_xls(out.s, range.s, opts);\n\tout.e = shift_cell_xls(out.e, range.s, opts);\n\treturn out;\n}\n\nfunction encode_cell_xls(c, biff) {\n\tif(c.cRel && c.c < 0) { c = dup(c); while(c.c < 0) c.c += (biff > 8) ? 0x4000 : 0x100; }\n\tif(c.rRel && c.r < 0) { c = dup(c); while(c.r < 0) c.r += (biff > 8) ? 0x100000 : ((biff > 5) ? 0x10000 : 0x4000); }\n\tvar s = encode_cell(c);\n\tif(!c.cRel && c.cRel != null) s = fix_col(s);\n\tif(!c.rRel && c.rRel != null) s = fix_row(s);\n\treturn s;\n}\n\nfunction encode_range_xls(r, opts) {\n\tif(r.s.r == 0 && !r.s.rRel) {\n\t\tif(r.e.r == (opts.biff >= 12 ? 0xFFFFF : (opts.biff >= 8 ? 0x10000 : 0x4000)) && !r.e.rRel) {\n\t\t\treturn (r.s.cRel ? \"\" : \"$\") + encode_col(r.s.c) + \":\" + (r.e.cRel ? \"\" : \"$\") + encode_col(r.e.c);\n\t\t}\n\t}\n\tif(r.s.c == 0 && !r.s.cRel) {\n\t\tif(r.e.c == (opts.biff >= 12 ? 0x3FFF : 0xFF) && !r.e.cRel) {\n\t\t\treturn (r.s.rRel ? \"\" : \"$\") + encode_row(r.s.r) + \":\" + (r.e.rRel ? \"\" : \"$\") + encode_row(r.e.r);\n\t\t}\n\t}\n\treturn encode_cell_xls(r.s, opts.biff) + \":\" + encode_cell_xls(r.e, opts.biff);\n}\nvar OFFCRYPTO = {};\n\nvar make_offcrypto = function(O, _crypto) {\n\tvar crypto;\n\tif(typeof _crypto !== 'undefined') crypto = _crypto;\n\telse if(typeof require !== 'undefined') {\n\t\ttry { crypto = require('crypto'); }\n\t\tcatch(e) { crypto = null; }\n\t}\n\n\tO.rc4 = function(key, data) {\n\t\tvar S = new Array(256);\n\t\tvar c = 0, i = 0, j = 0, t = 0;\n\t\tfor(i = 0; i != 256; ++i) S[i] = i;\n\t\tfor(i = 0; i != 256; ++i) {\n\t\t\tj = (j + S[i] + (key[i%key.length]).charCodeAt(0))&255;\n\t\t\tt = S[i]; S[i] = S[j]; S[j] = t;\n\t\t}\n\t\t// $FlowIgnore\n\t\ti = j = 0; var out = new_raw_buf(data.length);\n\t\tfor(c = 0; c != data.length; ++c) {\n\t\t\ti = (i + 1)&255;\n\t\t\tj = (j + S[i])%256;\n\t\t\tt = S[i]; S[i] = S[j]; S[j] = t;\n\t\t\tout[c] = (data[c] ^ S[(S[i]+S[j])&255]);\n\t\t}\n\t\treturn out;\n\t};\n\n\tO.md5 = function(hex) {\n\t\tif(!crypto) throw new Error(\"Unsupported crypto\");\n\t\treturn crypto.createHash('md5').update(hex).digest('hex');\n\t};\n};\n/*global crypto:true */\nmake_offcrypto(OFFCRYPTO, typeof crypto !== \"undefined\" ? crypto : undefined);\n\nfunction decode_row(rowstr) { return parseInt(unfix_row(rowstr),10) - 1; }\nfunction encode_row(row) { return \"\" + (row + 1); }\nfunction fix_row(cstr) { return cstr.replace(/([A-Z]|^)(\\d+)$/,\"$1$$$2\"); }\nfunction unfix_row(cstr) { return cstr.replace(/\\$(\\d+)$/,\"$1\"); }\n\nfunction decode_col(colstr) { var c = unfix_col(colstr), d = 0, i = 0; for(; i !== c.length; ++i) d = 26*d + c.charCodeAt(i) - 64; return d - 1; }\nfunction encode_col(col) { if(col < 0) throw new Error(\"invalid column \" + col); var s=\"\"; for(++col; col; col=Math.floor((col-1)/26)) s = String.fromCharCode(((col-1)%26) + 65) + s; return s; }\nfunction fix_col(cstr) { return cstr.replace(/^([A-Z])/,\"$$$1\"); }\nfunction unfix_col(cstr) { return cstr.replace(/^\\$([A-Z])/,\"$1\"); }\n\nfunction split_cell(cstr) { return cstr.replace(/(\\$?[A-Z]*)(\\$?\\d*)/,\"$1,$2\").split(\",\"); }\n//function decode_cell(cstr) { var splt = split_cell(cstr); return { c:decode_col(splt[0]), r:decode_row(splt[1]) }; }\nfunction decode_cell(cstr) {\n\tvar R = 0, C = 0;\n\tfor(var i = 0; i < cstr.length; ++i) {\n\t\tvar cc = cstr.charCodeAt(i);\n\t\tif(cc >= 48 && cc <= 57) R = 10 * R + (cc - 48);\n\t\telse if(cc >= 65 && cc <= 90) C = 26 * C + (cc - 64);\n\t}\n\treturn { c: C - 1, r:R - 1 };\n}\n//function encode_cell(cell) { return encode_col(cell.c) + encode_row(cell.r); }\nfunction encode_cell(cell) {\n\tvar col = cell.c + 1;\n\tvar s=\"\";\n\tfor(; col; col=((col-1)/26)|0) s = String.fromCharCode(((col-1)%26) + 65) + s;\n\treturn s + (cell.r + 1);\n}\nfunction decode_range(range) {\n\tvar idx = range.indexOf(\":\");\n\tif(idx == -1) return { s: decode_cell(range), e: decode_cell(range) };\n\treturn { s: decode_cell(range.slice(0, idx)), e: decode_cell(range.slice(idx + 1)) };\n}\nfunction encode_range(cs,ce) {\n\tif(typeof ce === 'undefined' || typeof ce === 'number') {\nreturn encode_range(cs.s, cs.e);\n\t}\nif(typeof cs !== 'string') cs = encode_cell((cs));\n\tif(typeof ce !== 'string') ce = encode_cell((ce));\nreturn cs == ce ? cs : cs + \":\" + ce;\n}\n\nfunction safe_decode_range(range) {\n\tvar o = {s:{c:0,r:0},e:{c:0,r:0}};\n\tvar idx = 0, i = 0, cc = 0;\n\tvar len = range.length;\n\tfor(idx = 0; i < len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\tidx = 26*idx + cc;\n\t}\n\to.s.c = --idx;\n\n\tfor(idx = 0; i < len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-48) < 0 || cc > 9) break;\n\t\tidx = 10*idx + cc;\n\t}\n\to.s.r = --idx;\n\n\tif(i === len || cc != 10) { o.e.c=o.s.c; o.e.r=o.s.r; return o; }\n\t++i;\n\n\tfor(idx = 0; i != len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\tidx = 26*idx + cc;\n\t}\n\to.e.c = --idx;\n\n\tfor(idx = 0; i != len; ++i) {\n\t\tif((cc=range.charCodeAt(i)-48) < 0 || cc > 9) break;\n\t\tidx = 10*idx + cc;\n\t}\n\to.e.r = --idx;\n\treturn o;\n}\n\nfunction safe_format_cell(cell, v) {\n\tvar q = (cell.t == 'd' && v instanceof Date);\n\tif(cell.z != null) try { return (cell.w = SSF.format(cell.z, q ? datenum(v) : v)); } catch(e) { }\n\ttry { return (cell.w = SSF.format((cell.XF||{}).numFmtId||(q ? 14 : 0), q ? datenum(v) : v)); } catch(e) { return ''+v; }\n}\n\nfunction format_cell(cell, v, o) {\n\tif(cell == null || cell.t == null || cell.t == 'z') return \"\";\n\tif(cell.w !== undefined) return cell.w;\n\tif(cell.t == 'd' && !cell.z && o && o.dateNF) cell.z = o.dateNF;\n\tif(cell.t == \"e\") return BErr[cell.v] || cell.v;\n\tif(v == undefined) return safe_format_cell(cell, cell.v);\n\treturn safe_format_cell(cell, v);\n}\n\nfunction sheet_to_workbook(sheet, opts) {\n\tvar n = opts && opts.sheet ? opts.sheet : \"Sheet1\";\n\tvar sheets = {}; sheets[n] = sheet;\n\treturn { SheetNames: [n], Sheets: sheets };\n}\n\nfunction sheet_add_aoa(_ws, data, opts) {\n\tvar o = opts || {};\n\tvar dense = _ws ? Array.isArray(_ws) : o.dense;\n\tif(DENSE != null && dense == null) dense = DENSE;\n\tvar ws = _ws || (dense ? ([]) : ({}));\n\tvar _R = 0, _C = 0;\n\tif(ws && o.origin != null) {\n\t\tif(typeof o.origin == 'number') _R = o.origin;\n\t\telse {\n\t\t\tvar _origin = typeof o.origin == \"string\" ? decode_cell(o.origin) : o.origin;\n\t\t\t_R = _origin.r; _C = _origin.c;\n\t\t}\n\t\tif(!ws[\"!ref\"]) ws[\"!ref\"] = \"A1:A1\";\n\t}\n\tvar range = ({s: {c:10000000, r:10000000}, e: {c:0, r:0}});\n\tif(ws['!ref']) {\n\t\tvar _range = safe_decode_range(ws['!ref']);\n\t\trange.s.c = _range.s.c;\n\t\trange.s.r = _range.s.r;\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\tif(_R == -1) range.e.r = _R = _range.e.r + 1;\n\t}\n\tfor(var R = 0; R != data.length; ++R) {\n\t\tif(!data[R]) continue;\n\t\tif(!Array.isArray(data[R])) throw new Error(\"aoa_to_sheet expects an array of arrays\");\n\t\tfor(var C = 0; C != data[R].length; ++C) {\n\t\t\tif(typeof data[R][C] === 'undefined') continue;\n\t\t\tvar cell = ({v: data[R][C] });\n\t\t\tvar __R = _R + R, __C = _C + C;\n\t\t\tif(range.s.r > __R) range.s.r = __R;\n\t\t\tif(range.s.c > __C) range.s.c = __C;\n\t\t\tif(range.e.r < __R) range.e.r = __R;\n\t\t\tif(range.e.c < __C) range.e.c = __C;\n\t\t\tif(data[R][C] && typeof data[R][C] === 'object' && !Array.isArray(data[R][C]) && !(data[R][C] instanceof Date)) cell = data[R][C];\n\t\t\telse {\n\t\t\t\tif(Array.isArray(cell.v)) { cell.f = data[R][C][1]; cell.v = cell.v[0]; }\n\t\t\t\tif(cell.v === null) {\n\t\t\t\t\tif(cell.f) cell.t = 'n';\n\t\t\t\t\telse if(o.nullError) { cell.t = 'e'; cell.v = 0; }\n\t\t\t\t\telse if(!o.sheetStubs) continue;\n\t\t\t\t\telse cell.t = 'z';\n\t\t\t\t}\n\t\t\t\telse if(typeof cell.v === 'number') cell.t = 'n';\n\t\t\t\telse if(typeof cell.v === 'boolean') cell.t = 'b';\n\t\t\t\telse if(cell.v instanceof Date) {\n\t\t\t\t\tcell.z = o.dateNF || SSF._table[14];\n\t\t\t\t\tif(o.cellDates) { cell.t = 'd'; cell.w = SSF.format(cell.z, datenum(cell.v)); }\n\t\t\t\t\telse { cell.t = 'n'; cell.v = datenum(cell.v); cell.w = SSF.format(cell.z, cell.v); }\n\t\t\t\t}\n\t\t\t\telse cell.t = 's';\n\t\t\t}\n\t\t\tif(dense) {\n\t\t\t\tif(!ws[__R]) ws[__R] = [];\n\t\t\t\tif(ws[__R][__C] && ws[__R][__C].z) cell.z = ws[__R][__C].z;\n\t\t\t\tws[__R][__C] = cell;\n\t\t\t} else {\n\t\t\t\tvar cell_ref = encode_cell(({c:__C,r:__R}));\n\t\t\t\tif(ws[cell_ref] && ws[cell_ref].z) cell.z = ws[cell_ref].z;\n\t\t\t\tws[cell_ref] = cell;\n\t\t\t}\n\t\t}\n\t}\n\tif(range.s.c < 10000000) ws['!ref'] = encode_range(range);\n\treturn ws;\n}\nfunction aoa_to_sheet(data, opts) { return sheet_add_aoa(null, data, opts); }\n\nfunction write_UInt32LE(x, o) {\n\tif (!o) o = new_buf(4);\n\to.write_shift(4, x);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.168 */\nfunction parse_XLWideString(data) {\n\tvar cchCharacters = data.read_shift(4);\n\treturn cchCharacters === 0 ? \"\" : data.read_shift(cchCharacters, 'dbcs');\n}\nfunction write_XLWideString(data, o) {\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(4 + 2 * data.length); }\n\to.write_shift(4, data.length);\n\tif (data.length > 0) o.write_shift(0, data, 'dbcs');\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.91 */\n//function parse_LPWideString(data) {\n//\tvar cchCharacters = data.read_shift(2);\n//\treturn cchCharacters === 0 ? \"\" : data.read_shift(cchCharacters, \"utf16le\");\n//}\n\n/* [MS-XLSB] 2.5.143 */\nfunction parse_StrRun(data) {\n\treturn { ich: data.read_shift(2), ifnt: data.read_shift(2) };\n}\nfunction write_StrRun(run, o) {\n\tif (!o) o = new_buf(4);\n\to.write_shift(2, run.ich || 0);\n\to.write_shift(2, run.ifnt || 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.121 */\nfunction parse_RichStr(data, length) {\n\tvar start = data.l;\n\tvar flags = data.read_shift(1);\n\tvar str = parse_XLWideString(data);\n\tvar rgsStrRun = [];\n\tvar z = ({ t: str, h: str });\n\tif ((flags & 1) !== 0) { /* fRichStr */\n\t\t/* TODO: formatted string */\n\t\tvar dwSizeStrRun = data.read_shift(4);\n\t\tfor (var i = 0; i != dwSizeStrRun; ++i) rgsStrRun.push(parse_StrRun(data));\n\t\tz.r = rgsStrRun;\n\t}\n\telse z.r = [{ ich: 0, ifnt: 0 }];\n\t//if((flags & 2) !== 0) { /* fExtStr */\n\t//\t/* TODO: phonetic string */\n\t//}\n\tdata.l = start + length;\n\treturn z;\n}\nfunction write_RichStr(str, o) {\n\t/* TODO: formatted string */\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(15 + 4 * str.t.length); }\n\to.write_shift(1, 0);\n\twrite_XLWideString(str.t, o);\n\treturn _null ? o.slice(0, o.l) : o;\n}\n/* [MS-XLSB] 2.4.328 BrtCommentText (RichStr w/1 run) */\nvar parse_BrtCommentText = parse_RichStr;\nfunction write_BrtCommentText(str, o) {\n\t/* TODO: formatted string */\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(23 + 4 * str.t.length); }\n\to.write_shift(1, 1);\n\twrite_XLWideString(str.t, o);\n\to.write_shift(4, 1);\n\twrite_StrRun({ ich: 0, ifnt: 0 }, o);\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.9 */\nfunction parse_XLSBCell(data) {\n\tvar col = data.read_shift(4);\n\tvar iStyleRef = data.read_shift(2);\n\tiStyleRef += data.read_shift(1) << 16;\n\tdata.l++; //var fPhShow = data.read_shift(1);\n\treturn { c: col, iStyleRef: iStyleRef };\n}\nfunction write_XLSBCell(cell, o) {\n\tif (o == null) o = new_buf(8);\n\to.write_shift(-4, cell.c);\n\to.write_shift(3, cell.iStyleRef || cell.s);\n\to.write_shift(1, 0); /* fPhShow */\n\treturn o;\n}\n\n/* Short XLSB Cell does not include column */\nfunction parse_XLSBShortCell(data) {\n\tvar iStyleRef = data.read_shift(2);\n\tiStyleRef += data.read_shift(1) <<16;\n\tdata.l++; //var fPhShow = data.read_shift(1);\n\treturn { c:-1, iStyleRef: iStyleRef };\n}\nfunction write_XLSBShortCell(cell, o) {\n\tif(o == null) o = new_buf(4);\n\to.write_shift(3, cell.iStyleRef || cell.s);\n\to.write_shift(1, 0); /* fPhShow */\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.21 */\nvar parse_XLSBCodeName = parse_XLWideString;\nvar write_XLSBCodeName = write_XLWideString;\n\n/* [MS-XLSB] 2.5.166 */\nfunction parse_XLNullableWideString(data) {\n\tvar cchCharacters = data.read_shift(4);\n\treturn cchCharacters === 0 || cchCharacters === 0xFFFFFFFF ? \"\" : data.read_shift(cchCharacters, 'dbcs');\n}\nfunction write_XLNullableWideString(data, o) {\n\tvar _null = false; if (o == null) { _null = true; o = new_buf(127); }\n\to.write_shift(4, data.length > 0 ? data.length : 0xFFFFFFFF);\n\tif (data.length > 0) o.write_shift(0, data, 'dbcs');\n\treturn _null ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.5.165 */\nvar parse_XLNameWideString = parse_XLWideString;\n//var write_XLNameWideString = write_XLWideString;\n\n/* [MS-XLSB] 2.5.114 */\nvar parse_RelID = parse_XLNullableWideString;\nvar write_RelID = write_XLNullableWideString;\n\n\n/* [MS-XLS] 2.5.217 ; [MS-XLSB] 2.5.122 */\nfunction parse_RkNumber(data) {\n\tvar b = data.slice(data.l, data.l + 4);\n\tvar fX100 = (b[0] & 1), fInt = (b[0] & 2);\n\tdata.l += 4;\n\tb[0] &= 0xFC; // b[0] &= ~3;\n\tvar RK = fInt === 0 ? __double([0, 0, 0, 0, b[0], b[1], b[2], b[3]], 0) : __readInt32LE(b, 0) >> 2;\n\treturn fX100 ? (RK / 100) : RK;\n}\nfunction write_RkNumber(data, o) {\n\tif (o == null) o = new_buf(4);\n\tvar fX100 = 0, fInt = 0, d100 = data * 100;\n\tif ((data == (data | 0)) && (data >= -(1 << 29)) && (data < (1 << 29))) { fInt = 1; }\n\telse if ((d100 == (d100 | 0)) && (d100 >= -(1 << 29)) && (d100 < (1 << 29))) { fInt = 1; fX100 = 1; }\n\tif (fInt) o.write_shift(-4, ((fX100 ? d100 : data) << 2) + (fX100 + 2));\n\telse throw new Error(\"unsupported RkNumber \" + data); // TODO\n}\n\n\n/* [MS-XLSB] 2.5.117 RfX */\nfunction parse_RfX(data ) {\n\tvar cell = ({ s: {}, e: {} });\n\tcell.s.r = data.read_shift(4);\n\tcell.e.r = data.read_shift(4);\n\tcell.s.c = data.read_shift(4);\n\tcell.e.c = data.read_shift(4);\n\treturn cell;\n}\nfunction write_RfX(r, o) {\n\tif (!o) o = new_buf(16);\n\to.write_shift(4, r.s.r);\n\to.write_shift(4, r.e.r);\n\to.write_shift(4, r.s.c);\n\to.write_shift(4, r.e.c);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.153 UncheckedRfX */\nvar parse_UncheckedRfX = parse_RfX;\nvar write_UncheckedRfX = write_RfX;\n\n/* [MS-XLSB] 2.5.155 UncheckedSqRfX */\n//function parse_UncheckedSqRfX(data) {\n//\tvar cnt = data.read_shift(4);\n//\tvar out = [];\n//\tfor(var i = 0; i < cnt; ++i) {\n//\t\tvar rng = parse_UncheckedRfX(data);\n//\t\tout.push(encode_range(rng));\n//\t}\n//\treturn out.join(\",\");\n//}\n//function write_UncheckedSqRfX(sqrfx) {\n//\tvar parts = sqrfx.split(/\\s*,\\s*/);\n//\tvar o = new_buf(4); o.write_shift(4, parts.length);\n//\tvar out = [o];\n//\tparts.forEach(function(rng) {\n//\t\tout.push(write_UncheckedRfX(safe_decode_range(rng)));\n//\t});\n//\treturn bconcat(out);\n//}\n\n/* [MS-XLS] 2.5.342 ; [MS-XLSB] 2.5.171 */\n/* TODO: error checking, NaN and Infinity values are not valid Xnum */\nfunction parse_Xnum(data) {\n\tif(data.length - data.l < 8) throw \"XLS Xnum Buffer underflow\";\n\treturn data.read_shift(8, 'f');\n}\nfunction write_Xnum(data, o) { return (o || new_buf(8)).write_shift(8, data, 'f'); }\n\n/* [MS-XLSB] 2.4.324 BrtColor */\nfunction parse_BrtColor(data) {\n\tvar out = {};\n\tvar d = data.read_shift(1);\n\n\t//var fValidRGB = d & 1;\n\tvar xColorType = d >>> 1;\n\n\tvar index = data.read_shift(1);\n\tvar nTS = data.read_shift(2, 'i');\n\tvar bR = data.read_shift(1);\n\tvar bG = data.read_shift(1);\n\tvar bB = data.read_shift(1);\n\tdata.l++; //var bAlpha = data.read_shift(1);\n\n\tswitch (xColorType) {\n\t\tcase 0: out.auto = 1; break;\n\t\tcase 1:\n\t\t\tout.index = index;\n\t\t\tvar icv = XLSIcv[index];\n\t\t\t/* automatic pseudo index 81 */\n\t\t\tif (icv) out.rgb = rgb2Hex(icv);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t/* if(!fValidRGB) throw new Error(\"invalid\"); */\n\t\t\tout.rgb = rgb2Hex([bR, bG, bB]);\n\t\t\tbreak;\n\t\tcase 3: out.theme = index; break;\n\t}\n\tif (nTS != 0) out.tint = nTS > 0 ? nTS / 32767 : nTS / 32768;\n\n\treturn out;\n}\nfunction write_BrtColor(color, o) {\n\tif (!o) o = new_buf(8);\n\tif (!color || color.auto) { o.write_shift(4, 0); o.write_shift(4, 0); return o; }\n\tif (color.index != null) {\n\t\to.write_shift(1, 0x02);\n\t\to.write_shift(1, color.index);\n\t} else if (color.theme != null) {\n\t\to.write_shift(1, 0x06);\n\t\to.write_shift(1, color.theme);\n\t} else {\n\t\to.write_shift(1, 0x05);\n\t\to.write_shift(1, 0);\n\t}\n\tvar nTS = color.tint || 0;\n\tif (nTS > 0) nTS *= 32767;\n\telse if (nTS < 0) nTS *= 32768;\n\to.write_shift(2, nTS);\n\tif (!color.rgb || color.theme != null) {\n\t\to.write_shift(2, 0);\n\t\to.write_shift(1, 0);\n\t\to.write_shift(1, 0);\n\t} else {\n\t\tvar rgb = (color.rgb || 'FFFFFF');\n\t\tif (typeof rgb == 'number') rgb = (\"000000\" + rgb.toString(16)).slice(-6);\n\t\to.write_shift(1, parseInt(rgb.slice(0, 2), 16));\n\t\to.write_shift(1, parseInt(rgb.slice(2, 4), 16));\n\t\to.write_shift(1, parseInt(rgb.slice(4, 6), 16));\n\t\to.write_shift(1, 0xFF);\n\t}\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.52 */\nfunction parse_FontFlags(data) {\n\tvar d = data.read_shift(1);\n\tdata.l++;\n\tvar out = {\n\t\tfBold: d & 0x01,\n\t\tfItalic: d & 0x02,\n\t\tfUnderline: d & 0x04,\n\t\tfStrikeout: d & 0x08,\n\t\tfOutline: d & 0x10,\n\t\tfShadow: d & 0x20,\n\t\tfCondense: d & 0x40,\n\t\tfExtend: d & 0x80\n\t};\n\treturn out;\n}\nfunction write_FontFlags(font, o) {\n\tif (!o) o = new_buf(2);\n\tvar grbit =\n\t\t(font.italic ? 0x02 : 0) |\n\t\t(font.strike ? 0x08 : 0) |\n\t\t(font.outline ? 0x10 : 0) |\n\t\t(font.shadow ? 0x20 : 0) |\n\t\t(font.condense ? 0x40 : 0) |\n\t\t(font.extend ? 0x80 : 0);\n\to.write_shift(1, grbit);\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n/* [MS-OLEDS] 2.3.1 and 2.3.2 */\nfunction parse_ClipboardFormatOrString(o, w) {\n\t// $FlowIgnore\n\tvar ClipFmt = { 2: \"BITMAP\", 3: \"METAFILEPICT\", 8: \"DIB\", 14: \"ENHMETAFILE\" };\n\tvar m = o.read_shift(4);\n\tswitch (m) {\n\t\tcase 0x00000000: return \"\";\n\t\tcase 0xffffffff: case 0xfffffffe: return ClipFmt[o.read_shift(4)] || \"\";\n\t}\n\tif (m > 0x190) throw new Error(\"Unsupported Clipboard: \" + m.toString(16));\n\to.l -= 4;\n\treturn o.read_shift(0, w == 1 ? \"lpstr\" : \"lpwstr\");\n}\nfunction parse_ClipboardFormatOrAnsiString(o) { return parse_ClipboardFormatOrString(o, 1); }\nfunction parse_ClipboardFormatOrUnicodeString(o) { return parse_ClipboardFormatOrString(o, 2); }\n\n/* [MS-OLEPS] 2.2 PropertyType */\n//var VT_EMPTY = 0x0000;\n//var VT_NULL = 0x0001;\nvar VT_I2 = 0x0002;\nvar VT_I4 = 0x0003;\n//var VT_R4 = 0x0004;\n//var VT_R8 = 0x0005;\n//var VT_CY = 0x0006;\n//var VT_DATE = 0x0007;\n//var VT_BSTR = 0x0008;\n//var VT_ERROR = 0x000A;\nvar VT_BOOL = 0x000B;\nvar VT_VARIANT = 0x000C;\n//var VT_DECIMAL = 0x000E;\n//var VT_I1 = 0x0010;\n//var VT_UI1 = 0x0011;\n//var VT_UI2 = 0x0012;\nvar VT_UI4 = 0x0013;\n//var VT_I8 = 0x0014;\n//var VT_UI8 = 0x0015;\n//var VT_INT = 0x0016;\n//var VT_UINT = 0x0017;\nvar VT_LPSTR = 0x001E;\n//var VT_LPWSTR = 0x001F;\nvar VT_FILETIME = 0x0040;\nvar VT_BLOB = 0x0041;\n//var VT_STREAM = 0x0042;\n//var VT_STORAGE = 0x0043;\n//var VT_STREAMED_Object = 0x0044;\n//var VT_STORED_Object = 0x0045;\n//var VT_BLOB_Object = 0x0046;\nvar VT_CF = 0x0047;\n//var VT_CLSID = 0x0048;\n//var VT_VERSIONED_STREAM = 0x0049;\nvar VT_VECTOR = 0x1000;\n//var VT_ARRAY = 0x2000;\n\nvar VT_STRING = 0x0050; // 2.3.3.1.11 VtString\nvar VT_USTR = 0x0051; // 2.3.3.1.12 VtUnalignedString\nvar VT_CUSTOM = [VT_STRING, VT_USTR];\n\n/* [MS-OSHARED] 2.3.3.2.2.1 Document Summary Information PIDDSI */\nvar DocSummaryPIDDSI = {\n0x01: { n: 'CodePage', t: VT_I2 },\n0x02: { n: 'Category', t: VT_STRING },\n0x03: { n: 'PresentationFormat', t: VT_STRING },\n0x04: { n: 'ByteCount', t: VT_I4 },\n0x05: { n: 'LineCount', t: VT_I4 },\n0x06: { n: 'ParagraphCount', t: VT_I4 },\n0x07: { n: 'SlideCount', t: VT_I4 },\n0x08: { n: 'NoteCount', t: VT_I4 },\n0x09: { n: 'HiddenCount', t: VT_I4 },\n0x0a: { n: 'MultimediaClipCount', t: VT_I4 },\n0x0b: { n: 'ScaleCrop', t: VT_BOOL },\n0x0c: { n: 'HeadingPairs', t: VT_VECTOR | VT_VARIANT },\n0x0d: { n: 'TitlesOfParts', t: VT_VECTOR | VT_LPSTR },\n0x0e: { n: 'Manager', t: VT_STRING },\n0x0f: { n: 'Company', t: VT_STRING },\n0x10: { n: 'LinksUpToDate', t: VT_BOOL },\n0x11: { n: 'CharacterCount', t: VT_I4 },\n0x13: { n: 'SharedDoc', t: VT_BOOL },\n0x16: { n: 'HyperlinksChanged', t: VT_BOOL },\n0x17: { n: 'AppVersion', t: VT_I4, p: 'version' },\n0x18: { n: 'DigSig', t: VT_BLOB },\n0x1A: { n: 'ContentType', t: VT_STRING },\n0x1B: { n: 'ContentStatus', t: VT_STRING },\n0x1C: { n: 'Language', t: VT_STRING },\n0x1D: { n: 'Version', t: VT_STRING },\n0xFF: {},\n\t/* [MS-OLEPS] 2.18 */\n0x80000000: { n: 'Locale', t: VT_UI4 },\n0x80000003: { n: 'Behavior', t: VT_UI4 },\n0x72627262: {}\n};\n\n/* [MS-OSHARED] 2.3.3.2.1.1 Summary Information Property Set PIDSI */\nvar SummaryPIDSI = {\n0x01: { n: 'CodePage', t: VT_I2 },\n0x02: { n: 'Title', t: VT_STRING },\n0x03: { n: 'Subject', t: VT_STRING },\n0x04: { n: 'Author', t: VT_STRING },\n0x05: { n: 'Keywords', t: VT_STRING },\n0x06: { n: 'Comments', t: VT_STRING },\n0x07: { n: 'Template', t: VT_STRING },\n0x08: { n: 'LastAuthor', t: VT_STRING },\n0x09: { n: 'RevNumber', t: VT_STRING },\n0x0A: { n: 'EditTime', t: VT_FILETIME },\n0x0B: { n: 'LastPrinted', t: VT_FILETIME },\n0x0C: { n: 'CreatedDate', t: VT_FILETIME },\n0x0D: { n: 'ModifiedDate', t: VT_FILETIME },\n0x0E: { n: 'PageCount', t: VT_I4 },\n0x0F: { n: 'WordCount', t: VT_I4 },\n0x10: { n: 'CharCount', t: VT_I4 },\n0x11: { n: 'Thumbnail', t: VT_CF },\n0x12: { n: 'Application', t: VT_STRING },\n0x13: { n: 'DocSecurity', t: VT_I4 },\n0xFF: {},\n\t/* [MS-OLEPS] 2.18 */\n0x80000000: { n: 'Locale', t: VT_UI4 },\n0x80000003: { n: 'Behavior', t: VT_UI4 },\n0x72627262: {}\n};\n\nvar DocSummaryRE = evert_key(DocSummaryPIDDSI, \"n\");\nvar SummaryRE = evert_key(SummaryPIDSI, \"n\");\n\n/* [MS-XLS] 2.4.63 Country/Region codes */\nvar CountryEnum = {\n0x0001: \"US\", // United States\n0x0002: \"CA\", // Canada\n0x0003: \"\", // Latin America (except Brazil)\n0x0007: \"RU\", // Russia\n0x0014: \"EG\", // Egypt\n0x001E: \"GR\", // Greece\n0x001F: \"NL\", // Netherlands\n0x0020: \"BE\", // Belgium\n0x0021: \"FR\", // France\n0x0022: \"ES\", // Spain\n0x0024: \"HU\", // Hungary\n0x0027: \"IT\", // Italy\n0x0029: \"CH\", // Switzerland\n0x002B: \"AT\", // Austria\n0x002C: \"GB\", // United Kingdom\n0x002D: \"DK\", // Denmark\n0x002E: \"SE\", // Sweden\n0x002F: \"NO\", // Norway\n0x0030: \"PL\", // Poland\n0x0031: \"DE\", // Germany\n0x0034: \"MX\", // Mexico\n0x0037: \"BR\", // Brazil\n0x003d: \"AU\", // Australia\n0x0040: \"NZ\", // New Zealand\n0x0042: \"TH\", // Thailand\n0x0051: \"JP\", // Japan\n0x0052: \"KR\", // Korea\n0x0054: \"VN\", // Viet Nam\n0x0056: \"CN\", // China\n0x005A: \"TR\", // Turkey\n0x0069: \"JS\", // Ramastan\n0x00D5: \"DZ\", // Algeria\n0x00D8: \"MA\", // Morocco\n0x00DA: \"LY\", // Libya\n0x015F: \"PT\", // Portugal\n0x0162: \"IS\", // Iceland\n0x0166: \"FI\", // Finland\n0x01A4: \"CZ\", // Czech Republic\n0x0376: \"TW\", // Taiwan\n0x03C1: \"LB\", // Lebanon\n0x03C2: \"JO\", // Jordan\n0x03C3: \"SY\", // Syria\n0x03C4: \"IQ\", // Iraq\n0x03C5: \"KW\", // Kuwait\n0x03C6: \"SA\", // Saudi Arabia\n0x03CB: \"AE\", // United Arab Emirates\n0x03CC: \"IL\", // Israel\n0x03CE: \"QA\", // Qatar\n0x03D5: \"IR\", // Iran\n0xFFFF: \"US\" // United States\n};\n\n/* [MS-XLS] 2.5.127 */\nvar XLSFillPattern = [\n\tnull,\n\t'solid',\n\t'mediumGray',\n\t'darkGray',\n\t'lightGray',\n\t'darkHorizontal',\n\t'darkVertical',\n\t'darkDown',\n\t'darkUp',\n\t'darkGrid',\n\t'darkTrellis',\n\t'lightHorizontal',\n\t'lightVertical',\n\t'lightDown',\n\t'lightUp',\n\t'lightGrid',\n\t'lightTrellis',\n\t'gray125',\n\t'gray0625'\n];\n\nfunction rgbify(arr) { return arr.map(function(x) { return [(x>>16)&255,(x>>8)&255,x&255]; }); }\n\n/* [MS-XLS] 2.5.161 */\n/* [MS-XLSB] 2.5.75 Icv */\nvar _XLSIcv = rgbify([\n\t/* Color Constants */\n\t0x000000,\n\t0xFFFFFF,\n\t0xFF0000,\n\t0x00FF00,\n\t0x0000FF,\n\t0xFFFF00,\n\t0xFF00FF,\n\t0x00FFFF,\n\n\t/* Overridable Defaults */\n\t0x000000,\n\t0xFFFFFF,\n\t0xFF0000,\n\t0x00FF00,\n\t0x0000FF,\n\t0xFFFF00,\n\t0xFF00FF,\n\t0x00FFFF,\n\n\t0x800000,\n\t0x008000,\n\t0x000080,\n\t0x808000,\n\t0x800080,\n\t0x008080,\n\t0xC0C0C0,\n\t0x808080,\n\t0x9999FF,\n\t0x993366,\n\t0xFFFFCC,\n\t0xCCFFFF,\n\t0x660066,\n\t0xFF8080,\n\t0x0066CC,\n\t0xCCCCFF,\n\n\t0x000080,\n\t0xFF00FF,\n\t0xFFFF00,\n\t0x00FFFF,\n\t0x800080,\n\t0x800000,\n\t0x008080,\n\t0x0000FF,\n\t0x00CCFF,\n\t0xCCFFFF,\n\t0xCCFFCC,\n\t0xFFFF99,\n\t0x99CCFF,\n\t0xFF99CC,\n\t0xCC99FF,\n\t0xFFCC99,\n\n\t0x3366FF,\n\t0x33CCCC,\n\t0x99CC00,\n\t0xFFCC00,\n\t0xFF9900,\n\t0xFF6600,\n\t0x666699,\n\t0x969696,\n\t0x003366,\n\t0x339966,\n\t0x003300,\n\t0x333300,\n\t0x993300,\n\t0x993366,\n\t0x333399,\n\t0x333333,\n\n\t/* Other entries to appease BIFF8/12 */\n\t0xFFFFFF, /* 0x40 icvForeground ?? */\n\t0x000000, /* 0x41 icvBackground ?? */\n\t0x000000, /* 0x42 icvFrame ?? */\n\t0x000000, /* 0x43 icv3D ?? */\n\t0x000000, /* 0x44 icv3DText ?? */\n\t0x000000, /* 0x45 icv3DHilite ?? */\n\t0x000000, /* 0x46 icv3DShadow ?? */\n\t0x000000, /* 0x47 icvHilite ?? */\n\t0x000000, /* 0x48 icvCtlText ?? */\n\t0x000000, /* 0x49 icvCtlScrl ?? */\n\t0x000000, /* 0x4A icvCtlInv ?? */\n\t0x000000, /* 0x4B icvCtlBody ?? */\n\t0x000000, /* 0x4C icvCtlFrame ?? */\n\t0x000000, /* 0x4D icvCtlFore ?? */\n\t0x000000, /* 0x4E icvCtlBack ?? */\n\t0x000000, /* 0x4F icvCtlNeutral */\n\t0x000000, /* 0x50 icvInfoBk ?? */\n\t0x000000 /* 0x51 icvInfoText ?? */\n]);\nvar XLSIcv = dup(_XLSIcv);\n\n/* [MS-XLSB] 2.5.97.2 */\nvar BErr = {\n0x00: \"#NULL!\",\n0x07: \"#DIV/0!\",\n0x0F: \"#VALUE!\",\n0x17: \"#REF!\",\n0x1D: \"#NAME?\",\n0x24: \"#NUM!\",\n0x2A: \"#N/A\",\n0x2B: \"#GETTING_DATA\",\n0xFF: \"#WTF?\"\n};\nvar RBErr = evert_num(BErr);\n/* Parts enumerated in OPC spec, MS-XLSB and MS-XLSX */\n/* 12.3 Part Summary */\n/* 14.2 Part Summary */\n/* [MS-XLSX] 2.1 Part Enumerations ; [MS-XLSB] 2.1.7 Part Enumeration */\nvar ct2type/*{[string]:string}*/ = ({\n\t/* Workbook */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\": \"workbooks\",\n\n\t/* Worksheet */\n\t\"application/vnd.ms-excel.binIndexWs\": \"TODO\", /* Binary Index */\n\n\t/* Macrosheet */\n\t\"application/vnd.ms-excel.intlmacrosheet\": \"TODO\",\n\t\"application/vnd.ms-excel.binIndexMs\": \"TODO\", /* Binary Index */\n\n\t/* File Properties */\n\t\"application/vnd.openxmlformats-package.core-properties+xml\": \"coreprops\",\n\t\"application/vnd.openxmlformats-officedocument.custom-properties+xml\": \"custprops\",\n\t\"application/vnd.openxmlformats-officedocument.extended-properties+xml\": \"extprops\",\n\n\t/* Custom Data Properties */\n\t\"application/vnd.openxmlformats-officedocument.customXmlProperties+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty\": \"TODO\",\n\n\t/* PivotTable */\n\t\"application/vnd.ms-excel.pivotTable\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml\": \"TODO\",\n\n\t/* Chart Objects */\n\t\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\": \"TODO\",\n\n\t/* Chart Colors */\n\t\"application/vnd.ms-office.chartcolorstyle+xml\": \"TODO\",\n\n\t/* Chart Style */\n\t\"application/vnd.ms-office.chartstyle+xml\": \"TODO\",\n\n\t/* Chart Advanced */\n\t\"application/vnd.ms-office.chartex+xml\": \"TODO\",\n\n\t/* Calculation Chain */\n\t\"application/vnd.ms-excel.calcChain\": \"calcchains\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml\": \"calcchains\",\n\n\t/* Printer Settings */\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings\": \"TODO\",\n\n\t/* ActiveX */\n\t\"application/vnd.ms-office.activeX\": \"TODO\",\n\t\"application/vnd.ms-office.activeX+xml\": \"TODO\",\n\n\t/* Custom Toolbars */\n\t\"application/vnd.ms-excel.attachedToolbars\": \"TODO\",\n\n\t/* External Data Connections */\n\t\"application/vnd.ms-excel.connections\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\": \"TODO\",\n\n\t/* External Links */\n\t\"application/vnd.ms-excel.externalLink\": \"links\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml\": \"links\",\n\n\t/* Metadata */\n\t\"application/vnd.ms-excel.sheetMetadata\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml\": \"TODO\",\n\n\t/* PivotCache */\n\t\"application/vnd.ms-excel.pivotCacheDefinition\": \"TODO\",\n\t\"application/vnd.ms-excel.pivotCacheRecords\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml\": \"TODO\",\n\n\t/* Query Table */\n\t\"application/vnd.ms-excel.queryTable\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml\": \"TODO\",\n\n\t/* Shared Workbook */\n\t\"application/vnd.ms-excel.userNames\": \"TODO\",\n\t\"application/vnd.ms-excel.revisionHeaders\": \"TODO\",\n\t\"application/vnd.ms-excel.revisionLog\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml\": \"TODO\",\n\n\t/* Single Cell Table */\n\t\"application/vnd.ms-excel.tableSingleCells\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml\": \"TODO\",\n\n\t/* Slicer */\n\t\"application/vnd.ms-excel.slicer\": \"TODO\",\n\t\"application/vnd.ms-excel.slicerCache\": \"TODO\",\n\t\"application/vnd.ms-excel.slicer+xml\": \"TODO\",\n\t\"application/vnd.ms-excel.slicerCache+xml\": \"TODO\",\n\n\t/* Sort Map */\n\t\"application/vnd.ms-excel.wsSortMap\": \"TODO\",\n\n\t/* Table */\n\t\"application/vnd.ms-excel.table\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\": \"TODO\",\n\n\t/* Themes */\n\t\"application/vnd.openxmlformats-officedocument.theme+xml\": \"themes\",\n\n\t/* Theme Override */\n\t\"application/vnd.openxmlformats-officedocument.themeOverride+xml\": \"TODO\",\n\n\t/* Timeline */\n\t\"application/vnd.ms-excel.Timeline+xml\": \"TODO\", /* verify */\n\t\"application/vnd.ms-excel.TimelineCache+xml\": \"TODO\", /* verify */\n\n\t/* VBA */\n\t\"application/vnd.ms-office.vbaProject\": \"vba\",\n\t\"application/vnd.ms-office.vbaProjectSignature\": \"vba\",\n\n\t/* Volatile Dependencies */\n\t\"application/vnd.ms-office.volatileDependencies\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml\": \"TODO\",\n\n\t/* Control Properties */\n\t\"application/vnd.ms-excel.controlproperties+xml\": \"TODO\",\n\n\t/* Data Model */\n\t\"application/vnd.openxmlformats-officedocument.model+data\": \"TODO\",\n\n\t/* Survey */\n\t\"application/vnd.ms-excel.Survey+xml\": \"TODO\",\n\n\t/* Drawing */\n\t\"application/vnd.openxmlformats-officedocument.drawing+xml\": \"drawings\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml\": \"TODO\",\n\t\"application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml\": \"TODO\",\n\n\t/* VML */\n\t\"application/vnd.openxmlformats-officedocument.vmlDrawing\": \"TODO\",\n\n\t\"application/vnd.openxmlformats-package.relationships+xml\": \"rels\",\n\t\"application/vnd.openxmlformats-officedocument.oleObject\": \"TODO\",\n\n\t/* Image */\n\t\"image/png\": \"TODO\",\n\n\t\"sheet\": \"js\"\n});\n\nvar CT_LIST = (function(){\n\tvar o = {\n\t\tworkbooks: {\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\",\n\t\t\txlsm: \"application/vnd.ms-excel.sheet.macroEnabled.main+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.sheet.binary.macroEnabled.main\",\n\t\t\txlam: \"application/vnd.ms-excel.addin.macroEnabled.main+xml\",\n\t\t\txltx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\"\n\t\t},\n\t\tstrs: { /* Shared Strings */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.sharedStrings\"\n\t\t},\n\t\tcomments: { /* Comments */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.comments\"\n\t\t},\n\t\tsheets: { /* Worksheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.worksheet\"\n\t\t},\n\t\tcharts: { /* Chartsheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.chartsheet\"\n\t\t},\n\t\tdialogs: { /* Dialogsheet */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.dialogsheet\"\n\t\t},\n\t\tmacros: { /* Macrosheet (Excel 4.0 Macros) */\n\t\t\txlsx: \"application/vnd.ms-excel.macrosheet+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.macrosheet\"\n\t\t},\n\t\tstyles: { /* Styles */\n\t\t\txlsx: \"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\",\n\t\t\txlsb: \"application/vnd.ms-excel.styles\"\n\t\t}\n\t};\n\tkeys(o).forEach(function(k) { [\"xlsm\", \"xlam\"].forEach(function(v) { if(!o[k][v]) o[k][v] = o[k].xlsx; }); });\n\tkeys(o).forEach(function(k){ keys(o[k]).forEach(function(v) { ct2type[o[k][v]] = k; }); });\n\treturn o;\n})();\n\nvar type2ct/*{[string]:Array}*/ = evert_arr(ct2type);\n\nXMLNS.CT = 'http://schemas.openxmlformats.org/package/2006/content-types';\n\nfunction new_ct() {\n\treturn ({\n\t\tworkbooks:[], sheets:[], charts:[], dialogs:[], macros:[],\n\t\trels:[], strs:[], comments:[], links:[],\n\t\tcoreprops:[], extprops:[], custprops:[], themes:[], styles:[],\n\t\tcalcchains:[], vba: [], drawings: [],\n\t\tTODO:[], xmlns: \"\" });\n}\n\nfunction parse_ct(data) {\n\tvar ct = new_ct();\n\tif(!data || !data.match) return ct;\n\tvar ctext = {};\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0].replace(nsregex,\"<\")) {\n\t\t\tcase ' 0 ? ct.calcchains[0] : \"\";\n\tct.sst = ct.strs.length > 0 ? ct.strs[0] : \"\";\n\tct.style = ct.styles.length > 0 ? ct.styles[0] : \"\";\n\tct.defaults = ctext;\n\tdelete ct.calcchains;\n\treturn ct;\n}\n\nvar CTYPE_XML_ROOT = writextag('Types', null, {\n\t'xmlns': XMLNS.CT,\n\t'xmlns:xsd': XMLNS.xsd,\n\t'xmlns:xsi': XMLNS.xsi\n});\n\nvar CTYPE_DEFAULTS = [\n\t['xml', 'application/xml'],\n\t['bin', 'application/vnd.ms-excel.sheet.binary.macroEnabled.main'],\n\t['vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing'],\n\t['data', 'application/vnd.openxmlformats-officedocument.model+data'],\n\t/* from test files */\n\t['bmp', 'image/bmp'],\n\t['png', 'image/png'],\n\t['gif', 'image/gif'],\n\t['emf', 'image/x-emf'],\n\t['wmf', 'image/x-wmf'],\n\t['jpg', 'image/jpeg'], ['jpeg', 'image/jpeg'],\n\t['tif', 'image/tiff'], ['tiff', 'image/tiff'],\n\t['pdf', 'application/pdf'],\n\t['rels', type2ct.rels[0]]\n].map(function(x) {\n\treturn writextag('Default', null, {'Extension':x[0], 'ContentType': x[1]});\n});\n\nfunction write_ct(ct, opts) {\n\tvar o = [], v;\n\to[o.length] = (XML_HEADER);\n\to[o.length] = (CTYPE_XML_ROOT);\n\to = o.concat(CTYPE_DEFAULTS);\n\n\t/* only write first instance */\n\tvar f1 = function(w) {\n\t\tif(ct[w] && ct[w].length > 0) {\n\t\t\tv = ct[w][0];\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': CT_LIST[w][opts.bookType || 'xlsx']\n\t\t\t}));\n\t\t}\n\t};\n\n\t/* book type-specific */\n\tvar f2 = function(w) {\n\t\t(ct[w]||[]).forEach(function(v) {\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': CT_LIST[w][opts.bookType || 'xlsx']\n\t\t\t}));\n\t\t});\n\t};\n\n\t/* standard type */\n\tvar f3 = function(t) {\n\t\t(ct[t]||[]).forEach(function(v) {\n\t\t\to[o.length] = (writextag('Override', null, {\n\t\t\t\t'PartName': (v[0] == '/' ? \"\":\"/\") + v,\n\t\t\t\t'ContentType': type2ct[t][0]\n\t\t\t}));\n\t\t});\n\t};\n\n\tf1('workbooks');\n\tf2('sheets');\n\tf2('charts');\n\tf3('themes');\n\t['strs', 'styles'].forEach(f1);\n\t['coreprops', 'extprops', 'custprops'].forEach(f3);\n\tf3('vba');\n\tf3('comments');\n\tf3('drawings');\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 9.3 Relationships */\nvar RELS = ({\n\tWB: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n\tSHEET: \"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n\tHLINK: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\",\n\tVML: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing\",\n\tXPATH: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath\",\n\tXMISS: \"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing\",\n\tXLINK: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink\",\n\tCXML: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml\",\n\tCXMLP: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps\",\n\tVBA: \"http://schemas.microsoft.com/office/2006/relationships/vbaProject\"\n});\n\n/* 9.3.3 Representing Relationships */\nfunction get_rels_path(file) {\n\tvar n = file.lastIndexOf(\"/\");\n\treturn file.slice(0,n+1) + '_rels/' + file.slice(n+1) + \".rels\";\n}\n\nfunction parse_rels(data, currentFilePath) {\n\tvar rels = {\"!id\":{}};\n\tif (!data) return rels;\n\tif (currentFilePath.charAt(0) !== '/') {\n\t\tcurrentFilePath = '/'+currentFilePath;\n\t}\n\tvar hash = {};\n\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\t/* 9.3.2.2 OPC_Relationships */\n\t\tif (y[0] === '2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\nvar RELS_EXTERN = [RELS.HLINK, RELS.XPATH, RELS.XMISS];\nfunction add_rels(rels, rId, f, type, relobj, targetmode) {\n\tif(!relobj) relobj = {};\n\tif(!rels['!id']) rels['!id'] = {};\n\tif(rId < 0) for(rId = 1; rels['!id']['rId' + rId]; ++rId){/* empty */}\n\trelobj.Id = 'rId' + rId;\n\trelobj.Type = type;\n\trelobj.Target = f;\n\tif(targetmode) relobj.TargetMode = targetmode;\n\telse if(RELS_EXTERN.indexOf(relobj.Type) > -1) relobj.TargetMode = \"External\";\n\tif(rels['!id'][relobj.Id]) throw new Error(\"Cannot rewrite rId \" + rId);\n\trels['!id'][relobj.Id] = relobj;\n\trels[('/' + relobj.Target).replace(\"//\",\"/\")] = relobj;\n\treturn rId;\n}\n/* Open Document Format for Office Applications (OpenDocument) Version 1.2 */\n/* Part 3 Section 4 Manifest File */\nvar CT_ODS = \"application/vnd.oasis.opendocument.spreadsheet\";\nfunction parse_manifest(d, opts) {\n\tvar str = xlml_normalize(d);\n\tvar Rn;\n\tvar FEtag;\n\twhile((Rn = xlmlregex.exec(str))) switch(Rn[3]) {\n\t\tcase 'manifest': break; // 4.2 \n\t\tcase 'file-entry': // 4.3 \n\t\t\tFEtag = parsexmltag(Rn[0], false);\n\t\t\tif(FEtag.path == '/' && FEtag.type !== CT_ODS) throw new Error(\"This OpenDocument is not a spreadsheet\");\n\t\t\tbreak;\n\t\tcase 'encryption-data': // 4.4 \n\t\tcase 'algorithm': // 4.5 \n\t\tcase 'start-key-generation': // 4.6 \n\t\tcase 'key-derivation': // 4.7 \n\t\t\tthrow new Error(\"Unsupported ODS Encryption\");\n\t\tdefault: if(opts && opts.WTF) throw Rn;\n\t}\n}\n\nfunction write_manifest(manifest) {\n\tvar o = [XML_HEADER];\n\to.push('\\n');\n\to.push(' \\n');\n\tfor(var i = 0; i < manifest.length; ++i) o.push(' \\n');\n\to.push('');\n\treturn o.join(\"\");\n}\n\n/* Part 3 Section 6 Metadata Manifest File */\nfunction write_rdf_type(file, res, tag) {\n\treturn [\n\t\t' \\n',\n\t\t' \\n',\n\t\t' \\n'\n\t].join(\"\");\n}\nfunction write_rdf_has(base, file) {\n\treturn [\n\t\t' \\n',\n\t\t' \\n',\n\t\t' \\n'\n\t].join(\"\");\n}\nfunction write_rdf(rdf) {\n\tvar o = [XML_HEADER];\n\to.push('\\n');\n\tfor(var i = 0; i != rdf.length; ++i) {\n\t\to.push(write_rdf_type(rdf[i][0], rdf[i][1]));\n\t\to.push(write_rdf_has(\"\",rdf[i][0]));\n\t}\n\to.push(write_rdf_type(\"\",\"Document\", \"pkg\"));\n\to.push('');\n\treturn o.join(\"\");\n}\n/* TODO: pull properties */\nvar write_meta_ods = (function() {\n\tvar payload = 'Sheet' + 'JS ' + XLSX.version + '';\n\treturn function wmo() {\n\t\treturn payload;\n\t};\n})();\n\n/* ECMA-376 Part II 11.1 Core Properties Part */\n/* [MS-OSHARED] 2.3.3.2.[1-2].1 (PIDSI/PIDDSI) */\nvar CORE_PROPS = [\n\t[\"cp:category\", \"Category\"],\n\t[\"cp:contentStatus\", \"ContentStatus\"],\n\t[\"cp:keywords\", \"Keywords\"],\n\t[\"cp:lastModifiedBy\", \"LastAuthor\"],\n\t[\"cp:lastPrinted\", \"LastPrinted\"],\n\t[\"cp:revision\", \"RevNumber\"],\n\t[\"cp:version\", \"Version\"],\n\t[\"dc:creator\", \"Author\"],\n\t[\"dc:description\", \"Comments\"],\n\t[\"dc:identifier\", \"Identifier\"],\n\t[\"dc:language\", \"Language\"],\n\t[\"dc:subject\", \"Subject\"],\n\t[\"dc:title\", \"Title\"],\n\t[\"dcterms:created\", \"CreatedDate\", 'date'],\n\t[\"dcterms:modified\", \"ModifiedDate\", 'date']\n];\n\nXMLNS.CORE_PROPS = \"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\";\nRELS.CORE_PROPS = 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties';\n\nvar CORE_PROPS_REGEX = (function() {\n\tvar r = new Array(CORE_PROPS.length);\n\tfor(var i = 0; i < CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i];\n\t\tvar g = \"(?:\"+ f[0].slice(0,f[0].indexOf(\":\")) +\":)\"+ f[0].slice(f[0].indexOf(\":\")+1);\n\t\tr[i] = new RegExp(\"<\" + g + \"[^>]*>([\\\\s\\\\S]*?)<\\/\" + g + \">\");\n\t}\n\treturn r;\n})();\n\nfunction parse_core_props(data) {\n\tvar p = {};\n\tdata = utf8read(data);\n\n\tfor(var i = 0; i < CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i], cur = data.match(CORE_PROPS_REGEX[i]);\n\t\tif(cur != null && cur.length > 0) p[f[1]] = unescapexml(cur[1]);\n\t\tif(f[2] === 'date' && p[f[1]]) p[f[1]] = parseDate(p[f[1]]);\n\t}\n\n\treturn p;\n}\n\nvar CORE_PROPS_XML_ROOT = writextag('cp:coreProperties', null, {\n\t//'xmlns': XMLNS.CORE_PROPS,\n\t'xmlns:cp': XMLNS.CORE_PROPS,\n\t'xmlns:dc': XMLNS.dc,\n\t'xmlns:dcterms': XMLNS.dcterms,\n\t'xmlns:dcmitype': XMLNS.dcmitype,\n\t'xmlns:xsi': XMLNS.xsi\n});\n\nfunction cp_doit(f, g, h, o, p) {\n\tif(p[f] != null || g == null || g === \"\") return;\n\tp[f] = g;\n\tg = escapexml(g);\n\to[o.length] = (h ? writextag(f,g,h) : writetag(f,g));\n}\n\nfunction write_core_props(cp, _opts) {\n\tvar opts = _opts || {};\n\tvar o = [XML_HEADER, CORE_PROPS_XML_ROOT], p = {};\n\tif(!cp && !opts.Props) return o.join(\"\");\n\n\tif(cp) {\n\t\tif(cp.CreatedDate != null) cp_doit(\"dcterms:created\", typeof cp.CreatedDate === \"string\" ? cp.CreatedDate : write_w3cdtf(cp.CreatedDate, opts.WTF), {\"xsi:type\":\"dcterms:W3CDTF\"}, o, p);\n\t\tif(cp.ModifiedDate != null) cp_doit(\"dcterms:modified\", typeof cp.ModifiedDate === \"string\" ? cp.ModifiedDate : write_w3cdtf(cp.ModifiedDate, opts.WTF), {\"xsi:type\":\"dcterms:W3CDTF\"}, o, p);\n\t}\n\n\tfor(var i = 0; i != CORE_PROPS.length; ++i) {\n\t\tvar f = CORE_PROPS[i];\n\t\tvar v = opts.Props && opts.Props[f[1]] != null ? opts.Props[f[1]] : cp ? cp[f[1]] : null;\n\t\tif(v === true) v = \"1\";\n\t\telse if(v === false) v = \"0\";\n\t\telse if(typeof v == \"number\") v = String(v);\n\t\tif(v != null) cp_doit(f[0], v, null, o, p);\n\t}\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 15.2.12.3 Extended File Properties Part */\n/* [MS-OSHARED] 2.3.3.2.[1-2].1 (PIDSI/PIDDSI) */\nvar EXT_PROPS = [\n\t[\"Application\", \"Application\", \"string\"],\n\t[\"AppVersion\", \"AppVersion\", \"string\"],\n\t[\"Company\", \"Company\", \"string\"],\n\t[\"DocSecurity\", \"DocSecurity\", \"string\"],\n\t[\"Manager\", \"Manager\", \"string\"],\n\t[\"HyperlinksChanged\", \"HyperlinksChanged\", \"bool\"],\n\t[\"SharedDoc\", \"SharedDoc\", \"bool\"],\n\t[\"LinksUpToDate\", \"LinksUpToDate\", \"bool\"],\n\t[\"ScaleCrop\", \"ScaleCrop\", \"bool\"],\n\t[\"HeadingPairs\", \"HeadingPairs\", \"raw\"],\n\t[\"TitlesOfParts\", \"TitlesOfParts\", \"raw\"]\n];\n\nXMLNS.EXT_PROPS = \"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\";\nRELS.EXT_PROPS = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties';\n\nvar PseudoPropsPairs = [\n\t\"Worksheets\", \"SheetNames\",\n\t\"NamedRanges\", \"DefinedNames\",\n\t\"Chartsheets\", \"ChartNames\"\n];\nfunction load_props_pairs(HP, TOP, props, opts) {\n\tvar v = [];\n\tif(typeof HP == \"string\") v = parseVector(HP, opts);\n\telse for(var j = 0; j < HP.length; ++j) v = v.concat(HP[j].map(function(hp) { return {v:hp}; }));\n\tvar parts = (typeof TOP == \"string\") ? parseVector(TOP, opts).map(function (x) { return x.v; }) : TOP;\n\tvar idx = 0, len = 0;\n\tif(parts.length > 0) for(var i = 0; i !== v.length; i += 2) {\n\t\tlen = +(v[i+1].v);\n\t\tswitch(v[i].v) {\n\t\t\tcase \"Worksheets\":\n\t\t\tcase \"工作表\":\n\t\t\tcase \"Листы\":\n\t\t\tcase \"أوراق العمل\":\n\t\t\tcase \"ワークシート\":\n\t\t\tcase \"גליונות עבודה\":\n\t\t\tcase \"Arbeitsblätter\":\n\t\t\tcase \"Çalışma Sayfaları\":\n\t\t\tcase \"Feuilles de calcul\":\n\t\t\tcase \"Fogli di lavoro\":\n\t\t\tcase \"Folhas de cálculo\":\n\t\t\tcase \"Planilhas\":\n\t\t\tcase \"Regneark\":\n\t\t\tcase \"Hojas de cálculo\":\n\t\t\tcase \"Werkbladen\":\n\t\t\t\tprops.Worksheets = len;\n\t\t\t\tprops.SheetNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\n\t\t\tcase \"Named Ranges\":\n\t\t\tcase \"Rangos con nombre\":\n\t\t\tcase \"名前付き一覧\":\n\t\t\tcase \"Benannte Bereiche\":\n\t\t\tcase \"Navngivne områder\":\n\t\t\t\tprops.NamedRanges = len;\n\t\t\t\tprops.DefinedNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\n\t\t\tcase \"Charts\":\n\t\t\tcase \"Diagramme\":\n\t\t\t\tprops.Chartsheets = len;\n\t\t\t\tprops.ChartNames = parts.slice(idx, idx + len);\n\t\t\t\tbreak;\n\t\t}\n\t\tidx += len;\n\t}\n}\n\nfunction parse_ext_props(data, p, opts) {\n\tvar q = {}; if(!p) p = {};\n\tdata = utf8read(data);\n\n\tEXT_PROPS.forEach(function(f) {\n\t\tvar xml = (data.match(matchtag(f[0]))||[])[1];\n\t\tswitch(f[2]) {\n\t\t\tcase \"string\": if(xml) p[f[1]] = unescapexml(xml); break;\n\t\t\tcase \"bool\": p[f[1]] = xml === \"true\"; break;\n\t\t\tcase \"raw\":\n\t\t\t\tvar cur = data.match(new RegExp(\"<\" + f[0] + \"[^>]*>([\\\\s\\\\S]*?)<\\/\" + f[0] + \">\"));\n\t\t\t\tif(cur && cur.length > 0) q[f[1]] = cur[1];\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\tif(q.HeadingPairs && q.TitlesOfParts) load_props_pairs(q.HeadingPairs, q.TitlesOfParts, p, opts);\n\n\treturn p;\n}\n\nvar EXT_PROPS_XML_ROOT = writextag('Properties', null, {\n\t'xmlns': XMLNS.EXT_PROPS,\n\t'xmlns:vt': XMLNS.vt\n});\n\nfunction write_ext_props(cp) {\n\tvar o = [], W = writextag;\n\tif(!cp) cp = {};\n\tcp.Application = \"SheetJS\";\n\to[o.length] = (XML_HEADER);\n\to[o.length] = (EXT_PROPS_XML_ROOT);\n\n\tEXT_PROPS.forEach(function(f) {\n\t\tif(cp[f[1]] === undefined) return;\n\t\tvar v;\n\t\tswitch(f[2]) {\n\t\t\tcase 'string': v = escapexml(String(cp[f[1]])); break;\n\t\t\tcase 'bool': v = cp[f[1]] ? 'true' : 'false'; break;\n\t\t}\n\t\tif(v !== undefined) o[o.length] = (W(f[0], v));\n\t});\n\n\t/* TODO: HeadingPairs, TitlesOfParts */\n\to[o.length] = (W('HeadingPairs', W('vt:vector', W('vt:variant', 'Worksheets')+W('vt:variant', W('vt:i4', String(cp.Worksheets))), {size:2, baseType:\"variant\"})));\n\to[o.length] = (W('TitlesOfParts', W('vt:vector', cp.SheetNames.map(function(s) { return \"\" + escapexml(s) + \"\"; }).join(\"\"), {size: cp.Worksheets, baseType:\"lpstr\"})));\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* 15.2.12.2 Custom File Properties Part */\nXMLNS.CUST_PROPS = \"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\";\nRELS.CUST_PROPS = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties';\n\nvar custregex = /<[^>]+>[^<]*/g;\nfunction parse_cust_props(data, opts) {\n\tvar p = {}, name = \"\";\n\tvar m = data.match(custregex);\n\tif(m) for(var i = 0; i != m.length; ++i) {\n\t\tvar x = m[i], y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\tcase '': name = null; break;\n\t\t\tdefault: if (x.indexOf('');\n\t\t\t\tvar type = toks[0].slice(4), text = toks[1];\n\t\t\t\t/* 22.4.2.32 (CT_Variant). Omit the binary types from 22.4 (Variant Types) */\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase 'lpstr': case 'bstr': case 'lpwstr':\n\t\t\t\t\t\tp[name] = unescapexml(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bool':\n\t\t\t\t\t\tp[name] = parsexmlbool(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'i1': case 'i2': case 'i4': case 'i8': case 'int': case 'uint':\n\t\t\t\t\t\tp[name] = parseInt(text, 10);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'r4': case 'r8': case 'decimal':\n\t\t\t\t\t\tp[name] = parseFloat(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'filetime': case 'date':\n\t\t\t\t\t\tp[name] = parseDate(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'cy': case 'error':\n\t\t\t\t\t\tp[name] = unescapexml(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif(type.slice(-1) == '/') break;\n\t\t\t\t\t\tif(opts.WTF && typeof console !== 'undefined') console.warn('Unexpected', x, type, toks);\n\t\t\t\t}\n\t\t\t} else if(x.slice(0,2) === \"\") {/* empty */\n\t\t\t} else if(opts.WTF) throw new Error(x);\n\t\t}\n\t}\n\treturn p;\n}\n\nvar CUST_PROPS_XML_ROOT = writextag('Properties', null, {\n\t'xmlns': XMLNS.CUST_PROPS,\n\t'xmlns:vt': XMLNS.vt\n});\n\nfunction write_cust_props(cp) {\n\tvar o = [XML_HEADER, CUST_PROPS_XML_ROOT];\n\tif(!cp) return o.join(\"\");\n\tvar pid = 1;\n\tkeys(cp).forEach(function custprop(k) { ++pid;\n\t\to[o.length] = (writextag('property', write_vt(cp[k], true), {\n\t\t\t'fmtid': '{D5CDD505-2E9C-101B-9397-08002B2CF9AE}',\n\t\t\t'pid': pid,\n\t\t\t'name': escapexml(k)\n\t\t}));\n\t});\n\tif(o.length>2){ o[o.length] = ''; o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* Common Name -> XLML Name */\nvar XLMLDocPropsMap = {\n\tTitle: 'Title',\n\tSubject: 'Subject',\n\tAuthor: 'Author',\n\tKeywords: 'Keywords',\n\tComments: 'Description',\n\tLastAuthor: 'LastAuthor',\n\tRevNumber: 'Revision',\n\tApplication: 'AppName',\n\t/* TotalTime: 'TotalTime', */\n\tLastPrinted: 'LastPrinted',\n\tCreatedDate: 'Created',\n\tModifiedDate: 'LastSaved',\n\t/* Pages */\n\t/* Words */\n\t/* Characters */\n\tCategory: 'Category',\n\t/* PresentationFormat */\n\tManager: 'Manager',\n\tCompany: 'Company',\n\t/* Guid */\n\t/* HyperlinkBase */\n\t/* Bytes */\n\t/* Lines */\n\t/* Paragraphs */\n\t/* CharactersWithSpaces */\n\tAppVersion: 'Version',\n\n\tContentStatus: 'ContentStatus', /* NOTE: missing from schema */\n\tIdentifier: 'Identifier', /* NOTE: missing from schema */\n\tLanguage: 'Language' /* NOTE: missing from schema */\n};\nvar evert_XLMLDPM = evert(XLMLDocPropsMap);\n\nfunction xlml_set_prop(Props, tag, val) {\n\ttag = evert_XLMLDPM[tag] || tag;\n\tProps[tag] = val;\n}\n\nfunction xlml_write_docprops(Props, opts) {\n\tvar o = [];\n\tkeys(XLMLDocPropsMap).map(function(m) {\n\t\tfor(var i = 0; i < CORE_PROPS.length; ++i) if(CORE_PROPS[i][1] == m) return CORE_PROPS[i];\n\t\tfor(i = 0; i < EXT_PROPS.length; ++i) if(EXT_PROPS[i][1] == m) return EXT_PROPS[i];\n\t\tthrow m;\n\t}).forEach(function(p) {\n\t\tif(Props[p[1]] == null) return;\n\t\tvar m = opts && opts.Props && opts.Props[p[1]] != null ? opts.Props[p[1]] : Props[p[1]];\n\t\tswitch(p[2]) {\n\t\t\tcase 'date': m = new Date(m).toISOString().replace(/\\.\\d*Z/,\"Z\"); break;\n\t\t}\n\t\tif(typeof m == 'number') m = String(m);\n\t\telse if(m === true || m === false) { m = m ? \"1\" : \"0\"; }\n\t\telse if(m instanceof Date) m = new Date(m).toISOString().replace(/\\.\\d*Z/,\"\");\n\t\to.push(writetag(XLMLDocPropsMap[p[1]] || p[1], m));\n\t});\n\treturn writextag('DocumentProperties', o.join(\"\"), {xmlns:XLMLNS.o });\n}\nfunction xlml_write_custprops(Props, Custprops) {\n\tvar BLACKLIST = [\"Worksheets\",\"SheetNames\"];\n\tvar T = 'CustomDocumentProperties';\n\tvar o = [];\n\tif(Props) keys(Props).forEach(function(k) {\nif(!Object.prototype.hasOwnProperty.call(Props, k)) return;\n\t\tfor(var i = 0; i < CORE_PROPS.length; ++i) if(k == CORE_PROPS[i][1]) return;\n\t\tfor(i = 0; i < EXT_PROPS.length; ++i) if(k == EXT_PROPS[i][1]) return;\n\t\tfor(i = 0; i < BLACKLIST.length; ++i) if(k == BLACKLIST[i]) return;\n\n\t\tvar m = Props[k];\n\t\tvar t = \"string\";\n\t\tif(typeof m == 'number') { t = \"float\"; m = String(m); }\n\t\telse if(m === true || m === false) { t = \"boolean\"; m = m ? \"1\" : \"0\"; }\n\t\telse m = String(m);\n\t\to.push(writextag(escapexmltag(k), m, {\"dt:dt\":t}));\n\t});\n\tif(Custprops) keys(Custprops).forEach(function(k) {\nif(!Object.prototype.hasOwnProperty.call(Custprops, k)) return;\n\t\tif(Props && Object.prototype.hasOwnProperty.call(Props, k)) return;\n\t\tvar m = Custprops[k];\n\t\tvar t = \"string\";\n\t\tif(typeof m == 'number') { t = \"float\"; m = String(m); }\n\t\telse if(m === true || m === false) { t = \"boolean\"; m = m ? \"1\" : \"0\"; }\n\t\telse if(m instanceof Date) { t = \"dateTime.tz\"; m = m.toISOString(); }\n\t\telse m = String(m);\n\t\to.push(writextag(escapexmltag(k), m, {\"dt:dt\":t}));\n\t});\n\treturn '<' + T + ' xmlns=\"' + XLMLNS.o + '\">' + o.join(\"\") + '' + T + '>';\n}\n/* [MS-DTYP] 2.3.3 FILETIME */\n/* [MS-OLEDS] 2.1.3 FILETIME (Packet Version) */\n/* [MS-OLEPS] 2.8 FILETIME (Packet Version) */\nfunction parse_FILETIME(blob) {\n\tvar dwLowDateTime = blob.read_shift(4), dwHighDateTime = blob.read_shift(4);\n\treturn new Date(((dwHighDateTime/1e7*Math.pow(2,32) + dwLowDateTime/1e7) - 11644473600)*1000).toISOString().replace(/\\.000/,\"\");\n}\nfunction write_FILETIME(time) {\n\tvar date = (typeof time == \"string\") ? new Date(Date.parse(time)) : time;\n\tvar t = date.getTime() / 1000 + 11644473600;\n\tvar l = t % Math.pow(2,32), h = (t - l) / Math.pow(2,32);\n\tl *= 1e7; h *= 1e7;\n\tvar w = (l / Math.pow(2,32)) | 0;\n\tif(w > 0) { l = l % Math.pow(2,32); h += w; }\n\tvar o = new_buf(8); o.write_shift(4, l); o.write_shift(4, h); return o;\n}\n\n/* [MS-OSHARED] 2.3.3.1.4 Lpstr */\nfunction parse_lpstr(blob, type, pad) {\n\tvar start = blob.l;\n\tvar str = blob.read_shift(0, 'lpstr-cp');\n\tif(pad) while((blob.l - start) & 3) ++blob.l;\n\treturn str;\n}\n\n/* [MS-OSHARED] 2.3.3.1.6 Lpwstr */\nfunction parse_lpwstr(blob, type, pad) {\n\tvar str = blob.read_shift(0, 'lpwstr');\n\tif(pad) blob.l += (4 - ((str.length+1) & 3)) & 3;\n\treturn str;\n}\n\n\n/* [MS-OSHARED] 2.3.3.1.11 VtString */\n/* [MS-OSHARED] 2.3.3.1.12 VtUnalignedString */\nfunction parse_VtStringBase(blob, stringType, pad) {\n\tif(stringType === 0x1F /*VT_LPWSTR*/) return parse_lpwstr(blob);\n\treturn parse_lpstr(blob, stringType, pad);\n}\n\nfunction parse_VtString(blob, t, pad) { return parse_VtStringBase(blob, t, pad === false ? 0: 4); }\nfunction parse_VtUnalignedString(blob, t) { if(!t) throw new Error(\"VtUnalignedString must have positive length\"); return parse_VtStringBase(blob, t, 0); }\n\n/* [MS-OSHARED] 2.3.3.1.7 VtVecLpwstrValue */\nfunction parse_VtVecLpwstrValue(blob) {\n\tvar length = blob.read_shift(4);\n\tvar ret = [];\n\tfor(var i = 0; i != length; ++i) {\n\t\tvar start = blob.l;\n\t\tret[i] = blob.read_shift(0, 'lpwstr').replace(chr0,'');\n\t\tif((blob.l - start) & 0x02) blob.l += 2;\n\t}\n\treturn ret;\n}\n\n/* [MS-OSHARED] 2.3.3.1.9 VtVecUnalignedLpstrValue */\nfunction parse_VtVecUnalignedLpstrValue(blob) {\n\tvar length = blob.read_shift(4);\n\tvar ret = [];\n\tfor(var i = 0; i != length; ++i) ret[i] = blob.read_shift(0, 'lpstr-cp').replace(chr0,'');\n\treturn ret;\n}\n\n\n/* [MS-OSHARED] 2.3.3.1.13 VtHeadingPair */\nfunction parse_VtHeadingPair(blob) {\n\tvar start = blob.l;\n\tvar headingString = parse_TypedPropertyValue(blob, VT_USTR);\n\tif(blob[blob.l] == 0x00 && blob[blob.l+1] == 0x00 && ((blob.l - start) & 0x02)) blob.l += 2;\n\tvar headerParts = parse_TypedPropertyValue(blob, VT_I4);\n\treturn [headingString, headerParts];\n}\n\n/* [MS-OSHARED] 2.3.3.1.14 VtVecHeadingPairValue */\nfunction parse_VtVecHeadingPairValue(blob) {\n\tvar cElements = blob.read_shift(4);\n\tvar out = [];\n\tfor(var i = 0; i < cElements / 2; ++i) out.push(parse_VtHeadingPair(blob));\n\treturn out;\n}\n\n/* [MS-OLEPS] 2.18.1 Dictionary (uses 2.17, 2.16) */\nfunction parse_dictionary(blob,CodePage) {\n\tvar cnt = blob.read_shift(4);\n\tvar dict = ({});\n\tfor(var j = 0; j != cnt; ++j) {\n\t\tvar pid = blob.read_shift(4);\n\t\tvar len = blob.read_shift(4);\n\t\tdict[pid] = blob.read_shift(len, (CodePage === 0x4B0 ?'utf16le':'utf8')).replace(chr0,'').replace(chr1,'!');\n\t\tif(CodePage === 0x4B0 && (len % 2)) blob.l += 2;\n\t}\n\tif(blob.l & 3) blob.l = (blob.l>>2+1)<<2;\n\treturn dict;\n}\n\n/* [MS-OLEPS] 2.9 BLOB */\nfunction parse_BLOB(blob) {\n\tvar size = blob.read_shift(4);\n\tvar bytes = blob.slice(blob.l,blob.l+size);\n\tblob.l += size;\n\tif((size & 3) > 0) blob.l += (4 - (size & 3)) & 3;\n\treturn bytes;\n}\n\n/* [MS-OLEPS] 2.11 ClipboardData */\nfunction parse_ClipboardData(blob) {\n\t// TODO\n\tvar o = {};\n\to.Size = blob.read_shift(4);\n\t//o.Format = blob.read_shift(4);\n\tblob.l += o.Size + 3 - (o.Size - 1) % 4;\n\treturn o;\n}\n\n/* [MS-OLEPS] 2.15 TypedPropertyValue */\nfunction parse_TypedPropertyValue(blob, type, _opts) {\n\tvar t = blob.read_shift(2), ret, opts = _opts||{};\n\tblob.l += 2;\n\tif(type !== VT_VARIANT)\n\tif(t !== type && VT_CUSTOM.indexOf(type)===-1 && !((type & 0xFFFE) == 0x101E && (t & 0xFFFE) == 0x101E)) throw new Error('Expected type ' + type + ' saw ' + t);\n\tswitch(type === VT_VARIANT ? t : type) {\n\t\tcase 0x02 /*VT_I2*/: ret = blob.read_shift(2, 'i'); if(!opts.raw) blob.l += 2; return ret;\n\t\tcase 0x03 /*VT_I4*/: ret = blob.read_shift(4, 'i'); return ret;\n\t\tcase 0x0B /*VT_BOOL*/: return blob.read_shift(4) !== 0x0;\n\t\tcase 0x13 /*VT_UI4*/: ret = blob.read_shift(4); return ret;\n\t\tcase 0x1E /*VT_LPSTR*/: return parse_lpstr(blob, t, 4).replace(chr0,'');\n\t\tcase 0x1F /*VT_LPWSTR*/: return parse_lpwstr(blob);\n\t\tcase 0x40 /*VT_FILETIME*/: return parse_FILETIME(blob);\n\t\tcase 0x41 /*VT_BLOB*/: return parse_BLOB(blob);\n\t\tcase 0x47 /*VT_CF*/: return parse_ClipboardData(blob);\n\t\tcase 0x50 /*VT_STRING*/: return parse_VtString(blob, t, !opts.raw).replace(chr0,'');\n\t\tcase 0x51 /*VT_USTR*/: return parse_VtUnalignedString(blob, t/*, 4*/).replace(chr0,'');\n\t\tcase 0x100C /*VT_VECTOR|VT_VARIANT*/: return parse_VtVecHeadingPairValue(blob);\n\t\tcase 0x101E /*VT_VECTOR|VT_LPSTR*/:\n\t\tcase 0x101F /*VT_VECTOR|VT_LPWSTR*/:\n\t\t\treturn t == 0x101F ? parse_VtVecLpwstrValue(blob) : parse_VtVecUnalignedLpstrValue(blob);\n\t\tdefault: throw new Error(\"TypedPropertyValue unrecognized type \" + type + \" \" + t);\n\t}\n}\nfunction write_TypedPropertyValue(type, value) {\n\tvar o = new_buf(4), p = new_buf(4);\n\to.write_shift(4, type == 0x50 ? 0x1F : type);\n\tswitch(type) {\n\t\tcase 0x03 /*VT_I4*/: p.write_shift(-4, value); break;\n\t\tcase 0x05 /*VT_I4*/: p = new_buf(8); p.write_shift(8, value, 'f'); break;\n\t\tcase 0x0B /*VT_BOOL*/: p.write_shift(4, value ? 0x01 : 0x00); break;\n\t\tcase 0x40 /*VT_FILETIME*/: p = write_FILETIME(value); break;\n\t\tcase 0x1F /*VT_LPWSTR*/:\n\t\tcase 0x50 /*VT_STRING*/:\np = new_buf(4 + 2 * (value.length + 1) + (value.length % 2 ? 0 : 2));\n\t\t\tp.write_shift(4, value.length + 1);\n\t\t\tp.write_shift(0, value, \"dbcs\");\n\t\t\twhile(p.l != p.length) p.write_shift(1, 0);\n\t\t\tbreak;\n\t\tdefault: throw new Error(\"TypedPropertyValue unrecognized type \" + type + \" \" + value);\n\t}\n\treturn bconcat([o, p]);\n}\n\n/* [MS-OLEPS] 2.20 PropertySet */\nfunction parse_PropertySet(blob, PIDSI) {\n\tvar start_addr = blob.l;\n\tvar size = blob.read_shift(4);\n\tvar NumProps = blob.read_shift(4);\n\tvar Props = [], i = 0;\n\tvar CodePage = 0;\n\tvar Dictionary = -1, DictObj = ({});\n\tfor(i = 0; i != NumProps; ++i) {\n\t\tvar PropID = blob.read_shift(4);\n\t\tvar Offset = blob.read_shift(4);\n\t\tProps[i] = [PropID, Offset + start_addr];\n\t}\n\tProps.sort(function(x,y) { return x[1] - y[1]; });\n\tvar PropH = {};\n\tfor(i = 0; i != NumProps; ++i) {\n\t\tif(blob.l !== Props[i][1]) {\n\t\t\tvar fail = true;\n\t\t\tif(i>0 && PIDSI) switch(PIDSI[Props[i-1][0]].t) {\n\t\t\t\tcase 0x02 /*VT_I2*/: if(blob.l+2 === Props[i][1]) { blob.l+=2; fail = false; } break;\n\t\t\t\tcase 0x50 /*VT_STRING*/: if(blob.l <= Props[i][1]) { blob.l=Props[i][1]; fail = false; } break;\n\t\t\t\tcase 0x100C /*VT_VECTOR|VT_VARIANT*/: if(blob.l <= Props[i][1]) { blob.l=Props[i][1]; fail = false; } break;\n\t\t\t}\n\t\t\tif((!PIDSI||i==0) && blob.l <= Props[i][1]) { fail=false; blob.l = Props[i][1]; }\n\t\t\tif(fail) throw new Error(\"Read Error: Expected address \" + Props[i][1] + ' at ' + blob.l + ' :' + i);\n\t\t}\n\t\tif(PIDSI) {\n\t\t\tvar piddsi = PIDSI[Props[i][0]];\n\t\t\tPropH[piddsi.n] = parse_TypedPropertyValue(blob, piddsi.t, {raw:true});\n\t\t\tif(piddsi.p === 'version') PropH[piddsi.n] = String(PropH[piddsi.n] >> 16) + \".\" + (\"0000\" + String(PropH[piddsi.n] & 0xFFFF)).slice(-4);\n\t\t\tif(piddsi.n == \"CodePage\") switch(PropH[piddsi.n]) {\n\t\t\t\tcase 0: PropH[piddsi.n] = 1252;\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 874:\n\t\t\t\tcase 932:\n\t\t\t\tcase 936:\n\t\t\t\tcase 949:\n\t\t\t\tcase 950:\n\t\t\t\tcase 1250:\n\t\t\t\tcase 1251:\n\t\t\t\tcase 1253:\n\t\t\t\tcase 1254:\n\t\t\t\tcase 1255:\n\t\t\t\tcase 1256:\n\t\t\t\tcase 1257:\n\t\t\t\tcase 1258:\n\t\t\t\tcase 10000:\n\t\t\t\tcase 1200:\n\t\t\t\tcase 1201:\n\t\t\t\tcase 1252:\n\t\t\t\tcase 65000: case -536:\n\t\t\t\tcase 65001: case -535:\n\t\t\t\t\tset_cp(CodePage = (PropH[piddsi.n]>>>0) & 0xFFFF); break;\n\t\t\t\tdefault: throw new Error(\"Unsupported CodePage: \" + PropH[piddsi.n]);\n\t\t\t}\n\t\t} else {\n\t\t\tif(Props[i][0] === 0x1) {\n\t\t\t\tCodePage = PropH.CodePage = (parse_TypedPropertyValue(blob, VT_I2));\n\t\t\t\tset_cp(CodePage);\n\t\t\t\tif(Dictionary !== -1) {\n\t\t\t\t\tvar oldpos = blob.l;\n\t\t\t\t\tblob.l = Props[Dictionary][1];\n\t\t\t\t\tDictObj = parse_dictionary(blob,CodePage);\n\t\t\t\t\tblob.l = oldpos;\n\t\t\t\t}\n\t\t\t} else if(Props[i][0] === 0) {\n\t\t\t\tif(CodePage === 0) { Dictionary = i; blob.l = Props[i+1][1]; continue; }\n\t\t\t\tDictObj = parse_dictionary(blob,CodePage);\n\t\t\t} else {\n\t\t\t\tvar name = DictObj[Props[i][0]];\n\t\t\t\tvar val;\n\t\t\t\t/* [MS-OSHARED] 2.3.3.2.3.1.2 + PROPVARIANT */\n\t\t\t\tswitch(blob[blob.l]) {\n\t\t\t\t\tcase 0x41 /*VT_BLOB*/: blob.l += 4; val = parse_BLOB(blob); break;\n\t\t\t\t\tcase 0x1E /*VT_LPSTR*/: blob.l += 4; val = parse_VtString(blob, blob[blob.l-4]).replace(/\\u0000+$/,\"\"); break;\n\t\t\t\t\tcase 0x1F /*VT_LPWSTR*/: blob.l += 4; val = parse_VtString(blob, blob[blob.l-4]).replace(/\\u0000+$/,\"\"); break;\n\t\t\t\t\tcase 0x03 /*VT_I4*/: blob.l += 4; val = blob.read_shift(4, 'i'); break;\n\t\t\t\t\tcase 0x13 /*VT_UI4*/: blob.l += 4; val = blob.read_shift(4); break;\n\t\t\t\t\tcase 0x05 /*VT_R8*/: blob.l += 4; val = blob.read_shift(8, 'f'); break;\n\t\t\t\t\tcase 0x0B /*VT_BOOL*/: blob.l += 4; val = parsebool(blob, 4); break;\n\t\t\t\t\tcase 0x40 /*VT_FILETIME*/: blob.l += 4; val = parseDate(parse_FILETIME(blob)); break;\n\t\t\t\t\tdefault: throw new Error(\"unparsed value: \" + blob[blob.l]);\n\t\t\t\t}\n\t\t\t\tPropH[name] = val;\n\t\t\t}\n\t\t}\n\t}\n\tblob.l = start_addr + size; /* step ahead to skip padding */\n\treturn PropH;\n}\nvar XLSPSSkip = [ \"CodePage\", \"Thumbnail\", \"_PID_LINKBASE\", \"_PID_HLINKS\", \"SystemIdentifier\", \"FMTID\" ].concat(PseudoPropsPairs);\nfunction guess_property_type(val) {\n\tswitch(typeof val) {\n\t\tcase \"boolean\": return 0x0B;\n\t\tcase \"number\": return ((val|0)==val) ? 0x03 : 0x05;\n\t\tcase \"string\": return 0x1F;\n\t\tcase \"object\": if(val instanceof Date) return 0x40; break;\n\t}\n\treturn -1;\n}\nfunction write_PropertySet(entries, RE, PIDSI) {\n\tvar hdr = new_buf(8), piao = [], prop = [];\n\tvar sz = 8, i = 0;\n\n\tvar pr = new_buf(8), pio = new_buf(8);\n\tpr.write_shift(4, 0x0002);\n\tpr.write_shift(4, 0x04B0);\n\tpio.write_shift(4, 0x0001);\n\tprop.push(pr); piao.push(pio);\n\tsz += 8 + pr.length;\n\n\tif(!RE) {\n\t\tpio = new_buf(8);\n\t\tpio.write_shift(4, 0);\n\t\tpiao.unshift(pio);\n\n\t\tvar bufs = [new_buf(4)];\n\t\tbufs[0].write_shift(4, entries.length);\n\t\tfor(i = 0; i < entries.length; ++i) {\n\t\t\tvar value = entries[i][0];\n\t\t\tpr = new_buf(4 + 4 + 2 * (value.length + 1) + (value.length % 2 ? 0 : 2));\n\t\t\tpr.write_shift(4, i+2);\n\t\t\tpr.write_shift(4, value.length + 1);\n\t\t\tpr.write_shift(0, value, \"dbcs\");\n\t\t\twhile(pr.l != pr.length) pr.write_shift(1, 0);\n\t\t\tbufs.push(pr);\n\t\t}\n\t\tpr = bconcat(bufs);\n\t\tprop.unshift(pr);\n\t\tsz += 8 + pr.length;\n\t}\n\n\tfor(i = 0; i < entries.length; ++i) {\n\t\tif(RE && !RE[entries[i][0]]) continue;\n\t\tif(XLSPSSkip.indexOf(entries[i][0]) > -1) continue;\n\t\tif(entries[i][1] == null) continue;\n\n\t\tvar val = entries[i][1], idx = 0;\n\t\tif(RE) {\n\t\t\tidx = +RE[entries[i][0]];\n\t\t\tvar pinfo = (PIDSI)[idx];\n\t\t\tif(pinfo.p == \"version\" && typeof val == \"string\") {\nvar arr = val.split(\".\");\n\t\t\t\tval = ((+arr[0])<<16) + ((+arr[1])||0);\n\t\t\t}\n\t\t\tpr = write_TypedPropertyValue(pinfo.t, val);\n\t\t} else {\n\t\t\tvar T = guess_property_type(val);\n\t\t\tif(T == -1) { T = 0x1F; val = String(val); }\n\t\t\tpr = write_TypedPropertyValue(T, val);\n\t\t}\n\t\tprop.push(pr);\n\n\t\tpio = new_buf(8);\n\t\tpio.write_shift(4, !RE ? 2+i : idx);\n\t\tpiao.push(pio);\n\n\t\tsz += 8 + pr.length;\n\t}\n\n\tvar w = 8 * (prop.length + 1);\n\tfor(i = 0; i < prop.length; ++i) { piao[i].write_shift(4, w); w += prop[i].length; }\n\thdr.write_shift(4, sz);\n\thdr.write_shift(4, prop.length);\n\treturn bconcat([hdr].concat(piao).concat(prop));\n}\n\n/* [MS-OLEPS] 2.21 PropertySetStream */\nfunction parse_PropertySetStream(file, PIDSI, clsid) {\n\tvar blob = file.content;\n\tif(!blob) return ({});\n\tprep_blob(blob, 0);\n\n\tvar NumSets, FMTID0, FMTID1, Offset0, Offset1 = 0;\n\tblob.chk('feff', 'Byte Order: ');\n\n\t/*var vers = */blob.read_shift(2); // TODO: check version\n\tvar SystemIdentifier = blob.read_shift(4);\n\tvar CLSID = blob.read_shift(16);\n\tif(CLSID !== CFB.utils.consts.HEADER_CLSID && CLSID !== clsid) throw new Error(\"Bad PropertySet CLSID \" + CLSID);\n\tNumSets = blob.read_shift(4);\n\tif(NumSets !== 1 && NumSets !== 2) throw new Error(\"Unrecognized #Sets: \" + NumSets);\n\tFMTID0 = blob.read_shift(16); Offset0 = blob.read_shift(4);\n\n\tif(NumSets === 1 && Offset0 !== blob.l) throw new Error(\"Length mismatch: \" + Offset0 + \" !== \" + blob.l);\n\telse if(NumSets === 2) { FMTID1 = blob.read_shift(16); Offset1 = blob.read_shift(4); }\n\tvar PSet0 = parse_PropertySet(blob, PIDSI);\n\n\tvar rval = ({ SystemIdentifier: SystemIdentifier });\n\tfor(var y in PSet0) rval[y] = PSet0[y];\n\t//rval.blob = blob;\n\trval.FMTID = FMTID0;\n\t//rval.PSet0 = PSet0;\n\tif(NumSets === 1) return rval;\n\tif(Offset1 - blob.l == 2) blob.l += 2;\n\tif(blob.l !== Offset1) throw new Error(\"Length mismatch 2: \" + blob.l + \" !== \" + Offset1);\n\tvar PSet1;\n\ttry { PSet1 = parse_PropertySet(blob, null); } catch(e) {/* empty */}\n\tfor(y in PSet1) rval[y] = PSet1[y];\n\trval.FMTID = [FMTID0, FMTID1]; // TODO: verify FMTID0/1\n\treturn rval;\n}\nfunction write_PropertySetStream(entries, clsid, RE, PIDSI, entries2, clsid2) {\n\tvar hdr = new_buf(entries2 ? 68 : 48);\n\tvar bufs = [hdr];\n\thdr.write_shift(2, 0xFFFE);\n\thdr.write_shift(2, 0x0000); /* TODO: type 1 props */\n\thdr.write_shift(4, 0x32363237);\n\thdr.write_shift(16, CFB.utils.consts.HEADER_CLSID, \"hex\");\n\thdr.write_shift(4, (entries2 ? 2 : 1));\n\thdr.write_shift(16, clsid, \"hex\");\n\thdr.write_shift(4, (entries2 ? 68 : 48));\n\tvar ps0 = write_PropertySet(entries, RE, PIDSI);\n\tbufs.push(ps0);\n\n\tif(entries2) {\n\t\tvar ps1 = write_PropertySet(entries2, null, null);\n\t\thdr.write_shift(16, clsid2, \"hex\");\n\t\thdr.write_shift(4, 68 + ps0.length);\n\t\tbufs.push(ps1);\n\t}\n\treturn bconcat(bufs);\n}\n\nfunction parsenoop2(blob, length) { blob.read_shift(length); return null; }\nfunction writezeroes(n, o) { if(!o) o=new_buf(n); for(var j=0; j= 12 ? 2 : 1);\n\tvar encoding = 'sbcs-cont';\n\tvar cp = current_codepage;\n\tif(opts && opts.biff >= 8) current_codepage = 1200;\n\tif(!opts || opts.biff == 8 ) {\n\t\tvar fHighByte = blob.read_shift(1);\n\t\tif(fHighByte) { encoding = 'dbcs-cont'; }\n\t} else if(opts.biff == 12) {\n\t\tencoding = 'wstr';\n\t}\n\tif(opts.biff >= 2 && opts.biff <= 5) encoding = 'cpstr';\n\tvar o = cch ? blob.read_shift(cch, encoding) : \"\";\n\tcurrent_codepage = cp;\n\treturn o;\n}\n\n/* 2.5.293 XLUnicodeRichExtendedString */\nfunction parse_XLUnicodeRichExtendedString(blob) {\n\tvar cp = current_codepage;\n\tcurrent_codepage = 1200;\n\tvar cch = blob.read_shift(2), flags = blob.read_shift(1);\n\tvar /*fHighByte = flags & 0x1,*/ fExtSt = flags & 0x4, fRichSt = flags & 0x8;\n\tvar width = 1 + (flags & 0x1); // 0x0 -> utf8, 0x1 -> dbcs\n\tvar cRun = 0, cbExtRst;\n\tvar z = {};\n\tif(fRichSt) cRun = blob.read_shift(2);\n\tif(fExtSt) cbExtRst = blob.read_shift(4);\n\tvar encoding = width == 2 ? 'dbcs-cont' : 'sbcs-cont';\n\tvar msg = cch === 0 ? \"\" : blob.read_shift(cch, encoding);\n\tif(fRichSt) blob.l += 4 * cRun; //TODO: parse this\n\tif(fExtSt) blob.l += cbExtRst; //TODO: parse this\n\tz.t = msg;\n\tif(!fRichSt) { z.raw = \"\" + z.t + \"\"; z.r = z.t; }\n\tcurrent_codepage = cp;\n\treturn z;\n}\nfunction write_XLUnicodeRichExtendedString(xlstr) {\n\tvar str = (xlstr.t||\"\"), nfmts = 1;\n\n\tvar hdr = new_buf(3 + (nfmts > 1 ? 2 : 0));\n\thdr.write_shift(2, str.length);\n\thdr.write_shift(1, (nfmts > 1 ? 0x08 : 0x00) | 0x01);\n\tif(nfmts > 1) hdr.write_shift(2, nfmts);\n\n\tvar otext = new_buf(2 * str.length);\n\totext.write_shift(2 * str.length, str, 'utf16le');\n\n\tvar out = [hdr, otext];\n\n\treturn bconcat(out);\n}\n\n/* 2.5.296 XLUnicodeStringNoCch */\nfunction parse_XLUnicodeStringNoCch(blob, cch, opts) {\n\tvar retval;\n\tif(opts) {\n\t\tif(opts.biff >= 2 && opts.biff <= 5) return blob.read_shift(cch, 'cpstr');\n\t\tif(opts.biff >= 12) return blob.read_shift(cch, 'dbcs-cont');\n\t}\n\tvar fHighByte = blob.read_shift(1);\n\tif(fHighByte===0) { retval = blob.read_shift(cch, 'sbcs-cont'); }\n\telse { retval = blob.read_shift(cch, 'dbcs-cont'); }\n\treturn retval;\n}\n\n/* 2.5.294 XLUnicodeString */\nfunction parse_XLUnicodeString(blob, length, opts) {\n\tvar cch = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn parse_XLUnicodeStringNoCch(blob, cch, opts);\n}\n/* BIFF5 override */\nfunction parse_XLUnicodeString2(blob, length, opts) {\n\tif(opts.biff > 5) return parse_XLUnicodeString(blob, length, opts);\n\tvar cch = blob.read_shift(1);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn blob.read_shift(cch, (opts.biff <= 4 || !blob.lens ) ? 'cpstr' : 'sbcs-cont');\n}\n/* TODO: BIFF5 and lower, codepage awareness */\nfunction write_XLUnicodeString(str, opts, o) {\n\tif(!o) o = new_buf(3 + 2 * str.length);\n\to.write_shift(2, str.length);\n\to.write_shift(1, 1);\n\to.write_shift(31, str, 'utf16le');\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.61 ControlInfo */\nfunction parse_ControlInfo(blob) {\n\tvar flags = blob.read_shift(1);\n\tblob.l++;\n\tvar accel = blob.read_shift(2);\n\tblob.l += 2;\n\treturn [flags, accel];\n}\n\n/* [MS-OSHARED] 2.3.7.6 URLMoniker TODO: flags */\nfunction parse_URLMoniker(blob) {\n\tvar len = blob.read_shift(4), start = blob.l;\n\tvar extra = false;\n\tif(len > 24) {\n\t\t/* look ahead */\n\t\tblob.l += len - 24;\n\t\tif(blob.read_shift(16) === \"795881f43b1d7f48af2c825dc4852763\") extra = true;\n\t\tblob.l = start;\n\t}\n\tvar url = blob.read_shift((extra?len-24:len)>>1, 'utf16le').replace(chr0,\"\");\n\tif(extra) blob.l += 24;\n\treturn url;\n}\n\n/* [MS-OSHARED] 2.3.7.8 FileMoniker TODO: all fields */\nfunction parse_FileMoniker(blob) {\n\tvar cAnti = blob.read_shift(2);\n\tvar preamble = \"\"; while(cAnti-- > 0) preamble += \"../\";\n\tvar ansiPath = blob.read_shift(0, 'lpstr-ansi');\n\tblob.l += 2; //var endServer = blob.read_shift(2);\n\tif(blob.read_shift(2) != 0xDEAD) throw new Error(\"Bad FileMoniker\");\n\tvar sz = blob.read_shift(4);\n\tif(sz === 0) return preamble + ansiPath.replace(/\\\\/g,\"/\");\n\tvar bytes = blob.read_shift(4);\n\tif(blob.read_shift(2) != 3) throw new Error(\"Bad FileMoniker\");\n\tvar unicodePath = blob.read_shift(bytes>>1, 'utf16le').replace(chr0,\"\");\n\treturn preamble + unicodePath;\n}\n\n/* [MS-OSHARED] 2.3.7.2 HyperlinkMoniker TODO: all the monikers */\nfunction parse_HyperlinkMoniker(blob, length) {\n\tvar clsid = blob.read_shift(16); length -= 16;\n\tswitch(clsid) {\n\t\tcase \"e0c9ea79f9bace118c8200aa004ba90b\": return parse_URLMoniker(blob, length);\n\t\tcase \"0303000000000000c000000000000046\": return parse_FileMoniker(blob, length);\n\t\tdefault: throw new Error(\"Unsupported Moniker \" + clsid);\n\t}\n}\n\n/* [MS-OSHARED] 2.3.7.9 HyperlinkString */\nfunction parse_HyperlinkString(blob) {\n\tvar len = blob.read_shift(4);\n\tvar o = len > 0 ? blob.read_shift(len, 'utf16le').replace(chr0, \"\") : \"\";\n\treturn o;\n}\nfunction write_HyperlinkString(str, o) {\n\tif(!o) o = new_buf(6 + str.length * 2);\n\to.write_shift(4, 1 + str.length);\n\tfor(var i = 0; i < str.length; ++i) o.write_shift(2, str.charCodeAt(i));\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-OSHARED] 2.3.7.1 Hyperlink Object */\nfunction parse_Hyperlink(blob, length) {\n\tvar end = blob.l + length;\n\tvar sVer = blob.read_shift(4);\n\tif(sVer !== 2) throw new Error(\"Unrecognized streamVersion: \" + sVer);\n\tvar flags = blob.read_shift(2);\n\tblob.l += 2;\n\tvar displayName, targetFrameName, moniker, oleMoniker, Loc=\"\", guid, fileTime;\n\tif(flags & 0x0010) displayName = parse_HyperlinkString(blob, end - blob.l);\n\tif(flags & 0x0080) targetFrameName = parse_HyperlinkString(blob, end - blob.l);\n\tif((flags & 0x0101) === 0x0101) moniker = parse_HyperlinkString(blob, end - blob.l);\n\tif((flags & 0x0101) === 0x0001) oleMoniker = parse_HyperlinkMoniker(blob, end - blob.l);\n\tif(flags & 0x0008) Loc = parse_HyperlinkString(blob, end - blob.l);\n\tif(flags & 0x0020) guid = blob.read_shift(16);\n\tif(flags & 0x0040) fileTime = parse_FILETIME(blob/*, 8*/);\n\tblob.l = end;\n\tvar target = targetFrameName||moniker||oleMoniker||\"\";\n\tif(target && Loc) target+=\"#\"+Loc;\n\tif(!target) target = \"#\" + Loc;\n\tif((flags & 0x0002) && target.charAt(0) == \"/\" && target.charAt(1) != \"/\") target = \"file://\" + target;\n\tvar out = ({Target:target});\n\tif(guid) out.guid = guid;\n\tif(fileTime) out.time = fileTime;\n\tif(displayName) out.Tooltip = displayName;\n\treturn out;\n}\nfunction write_Hyperlink(hl) {\n\tvar out = new_buf(512), i = 0;\n\tvar Target = hl.Target;\n\tif(Target.slice(0,7) == \"file://\") Target = Target.slice(7);\n\tvar hashidx = Target.indexOf(\"#\");\n\tvar F = hashidx > -1 ? 0x1f : 0x17;\n\tswitch(Target.charAt(0)) { case \"#\": F=0x1c; break; case \".\": F&=~2; break; }\n\tout.write_shift(4,2); out.write_shift(4, F);\n\tvar data = [8,6815827,6619237,4849780,83]; for(i = 0; i < data.length; ++i) out.write_shift(4, data[i]);\n\tif(F == 0x1C) {\n\t\tTarget = Target.slice(1);\n\t\twrite_HyperlinkString(Target, out);\n\t} else if(F & 0x02) {\n\t\tdata = \"e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b\".split(\" \");\n\t\tfor(i = 0; i < data.length; ++i) out.write_shift(1, parseInt(data[i], 16));\n\t\tvar Pretarget = hashidx > -1 ? Target.slice(0, hashidx) : Target;\n\t\tout.write_shift(4, 2*(Pretarget.length + 1));\n\t\tfor(i = 0; i < Pretarget.length; ++i) out.write_shift(2, Pretarget.charCodeAt(i));\n\t\tout.write_shift(2, 0);\n\t\tif(F & 0x08) write_HyperlinkString(hashidx > -1 ? Target.slice(hashidx+1): \"\", out);\n\t} else {\n\t\tdata = \"03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46\".split(\" \");\n\t\tfor(i = 0; i < data.length; ++i) out.write_shift(1, parseInt(data[i], 16));\n\t\tvar P = 0;\n\t\twhile(Target.slice(P*3,P*3+3)==\"../\"||Target.slice(P*3,P*3+3)==\"..\\\\\") ++P;\n\t\tout.write_shift(2, P);\n\t\tout.write_shift(4, Target.length - 3 * P + 1);\n\t\tfor(i = 0; i < Target.length - 3 * P; ++i) out.write_shift(1, Target.charCodeAt(i + 3 * P) & 0xFF);\n\t\tout.write_shift(1, 0);\n\t\tout.write_shift(2, 0xFFFF);\n\t\tout.write_shift(2, 0xDEAD);\n\t\tfor(i = 0; i < 6; ++i) out.write_shift(4, 0);\n\t}\n\treturn out.slice(0, out.l);\n}\n\n/* 2.5.178 LongRGBA */\nfunction parse_LongRGBA(blob) { var r = blob.read_shift(1), g = blob.read_shift(1), b = blob.read_shift(1), a = blob.read_shift(1); return [r,g,b,a]; }\n\n/* 2.5.177 LongRGB */\nfunction parse_LongRGB(blob, length) { var x = parse_LongRGBA(blob, length); x[3] = 0; return x; }\n\n\n/* [MS-XLS] 2.5.19 */\nfunction parse_XLSCell(blob) {\n\tvar rw = blob.read_shift(2); // 0-indexed\n\tvar col = blob.read_shift(2);\n\tvar ixfe = blob.read_shift(2);\n\treturn ({r:rw, c:col, ixfe:ixfe});\n}\nfunction write_XLSCell(R, C, ixfe, o) {\n\tif(!o) o = new_buf(6);\n\to.write_shift(2, R);\n\to.write_shift(2, C);\n\to.write_shift(2, ixfe||0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.134 */\nfunction parse_frtHeader(blob) {\n\tvar rt = blob.read_shift(2);\n\tvar flags = blob.read_shift(2); // TODO: parse these flags\n\tblob.l += 8;\n\treturn {type: rt, flags: flags};\n}\n\n\n\nfunction parse_OptXLUnicodeString(blob, length, opts) { return length === 0 ? \"\" : parse_XLUnicodeString2(blob, length, opts); }\n\n/* [MS-XLS] 2.5.344 */\nfunction parse_XTI(blob, length, opts) {\n\tvar w = opts.biff > 8 ? 4 : 2;\n\tvar iSupBook = blob.read_shift(w), itabFirst = blob.read_shift(w,'i'), itabLast = blob.read_shift(w,'i');\n\treturn [iSupBook, itabFirst, itabLast];\n}\n\n/* [MS-XLS] 2.5.218 */\nfunction parse_RkRec(blob) {\n\tvar ixfe = blob.read_shift(2);\n\tvar RK = parse_RkNumber(blob);\n\treturn [ixfe, RK];\n}\n\n/* [MS-XLS] 2.5.1 */\nfunction parse_AddinUdf(blob, length, opts) {\n\tblob.l += 4; length -= 4;\n\tvar l = blob.l + length;\n\tvar udfName = parse_ShortXLUnicodeString(blob, length, opts);\n\tvar cb = blob.read_shift(2);\n\tl -= blob.l;\n\tif(cb !== l) throw new Error(\"Malformed AddinUdf: padding = \" + l + \" != \" + cb);\n\tblob.l += cb;\n\treturn udfName;\n}\n\n/* [MS-XLS] 2.5.209 TODO: Check sizes */\nfunction parse_Ref8U(blob) {\n\tvar rwFirst = blob.read_shift(2);\n\tvar rwLast = blob.read_shift(2);\n\tvar colFirst = blob.read_shift(2);\n\tvar colLast = blob.read_shift(2);\n\treturn {s:{c:colFirst, r:rwFirst}, e:{c:colLast,r:rwLast}};\n}\nfunction write_Ref8U(r, o) {\n\tif(!o) o = new_buf(8);\n\to.write_shift(2, r.s.r);\n\to.write_shift(2, r.e.r);\n\to.write_shift(2, r.s.c);\n\to.write_shift(2, r.e.c);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.211 */\nfunction parse_RefU(blob) {\n\tvar rwFirst = blob.read_shift(2);\n\tvar rwLast = blob.read_shift(2);\n\tvar colFirst = blob.read_shift(1);\n\tvar colLast = blob.read_shift(1);\n\treturn {s:{c:colFirst, r:rwFirst}, e:{c:colLast,r:rwLast}};\n}\n\n/* [MS-XLS] 2.5.207 */\nvar parse_Ref = parse_RefU;\n\n/* [MS-XLS] 2.5.143 */\nfunction parse_FtCmo(blob) {\n\tblob.l += 4;\n\tvar ot = blob.read_shift(2);\n\tvar id = blob.read_shift(2);\n\tvar flags = blob.read_shift(2);\n\tblob.l+=12;\n\treturn [id, ot, flags];\n}\n\n/* [MS-XLS] 2.5.149 */\nfunction parse_FtNts(blob) {\n\tvar out = {};\n\tblob.l += 4;\n\tblob.l += 16; // GUID TODO\n\tout.fSharedNote = blob.read_shift(2);\n\tblob.l += 4;\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.142 */\nfunction parse_FtCf(blob) {\n\tvar out = {};\n\tblob.l += 4;\n\tblob.cf = blob.read_shift(2);\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.140 - 2.5.154 and friends */\nfunction parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); }\nvar FtTab = {\n0x00: parse_FtSkip, /* FtEnd */\n0x04: parse_FtSkip, /* FtMacro */\n0x05: parse_FtSkip, /* FtButton */\n0x06: parse_FtSkip, /* FtGmo */\n0x07: parse_FtCf, /* FtCf */\n0x08: parse_FtSkip, /* FtPioGrbit */\n0x09: parse_FtSkip, /* FtPictFmla */\n0x0A: parse_FtSkip, /* FtCbls */\n0x0B: parse_FtSkip, /* FtRbo */\n0x0C: parse_FtSkip, /* FtSbs */\n0x0D: parse_FtNts, /* FtNts */\n0x0E: parse_FtSkip, /* FtSbsFmla */\n0x0F: parse_FtSkip, /* FtGboData */\n0x10: parse_FtSkip, /* FtEdoData */\n0x11: parse_FtSkip, /* FtRboData */\n0x12: parse_FtSkip, /* FtCblsData */\n0x13: parse_FtSkip, /* FtLbsData */\n0x14: parse_FtSkip, /* FtCblsFmla */\n0x15: parse_FtCmo\n};\nfunction parse_FtArray(blob, length) {\n\tvar tgt = blob.l + length;\n\tvar fts = [];\n\twhile(blob.l < tgt) {\n\t\tvar ft = blob.read_shift(2);\n\t\tblob.l-=2;\n\t\ttry {\n\t\t\tfts.push(FtTab[ft](blob, tgt - blob.l));\n\t\t} catch(e) { blob.l = tgt; return fts; }\n\t}\n\tif(blob.l != tgt) blob.l = tgt; //throw new Error(\"bad Object Ft-sequence\");\n\treturn fts;\n}\n\n/* --- 2.4 Records --- */\n\n/* [MS-XLS] 2.4.21 */\nfunction parse_BOF(blob, length) {\n\tvar o = {BIFFVer:0, dt:0};\n\to.BIFFVer = blob.read_shift(2); length -= 2;\n\tif(length >= 2) { o.dt = blob.read_shift(2); blob.l -= 2; }\n\tswitch(o.BIFFVer) {\n\t\tcase 0x0600: /* BIFF8 */\n\t\tcase 0x0500: /* BIFF5 */\n\t\tcase 0x0400: /* BIFF4 */\n\t\tcase 0x0300: /* BIFF3 */\n\t\tcase 0x0200: /* BIFF2 */\n\t\tcase 0x0002: case 0x0007: /* BIFF2 */\n\t\t\tbreak;\n\t\tdefault: if(length > 6) throw new Error(\"Unexpected BIFF Ver \" + o.BIFFVer);\n\t}\n\n\tblob.read_shift(length);\n\treturn o;\n}\nfunction write_BOF(wb, t, o) {\n\tvar h = 0x0600, w = 16;\n\tswitch(o.bookType) {\n\t\tcase 'biff8': break;\n\t\tcase 'biff5': h = 0x0500; w = 8; break;\n\t\tcase 'biff4': h = 0x0004; w = 6; break;\n\t\tcase 'biff3': h = 0x0003; w = 6; break;\n\t\tcase 'biff2': h = 0x0002; w = 4; break;\n\t\tcase 'xla': break;\n\t\tdefault: throw new Error(\"unsupported BIFF version\");\n\t}\n\tvar out = new_buf(w);\n\tout.write_shift(2, h);\n\tout.write_shift(2, t);\n\tif(w > 4) out.write_shift(2, 0x7262);\n\tif(w > 6) out.write_shift(2, 0x07CD);\n\tif(w > 8) {\n\t\tout.write_shift(2, 0xC009);\n\t\tout.write_shift(2, 0x0001);\n\t\tout.write_shift(2, 0x0706);\n\t\tout.write_shift(2, 0x0000);\n\t}\n\treturn out;\n}\n\n\n/* [MS-XLS] 2.4.146 */\nfunction parse_InterfaceHdr(blob, length) {\n\tif(length === 0) return 0x04b0;\n\tif((blob.read_shift(2))!==0x04b0){/* empty */}\n\treturn 0x04b0;\n}\n\n\n/* [MS-XLS] 2.4.349 */\nfunction parse_WriteAccess(blob, length, opts) {\n\tif(opts.enc) { blob.l += length; return \"\"; }\n\tvar l = blob.l;\n\t// TODO: make sure XLUnicodeString doesnt overrun\n\tvar UserName = parse_XLUnicodeString2(blob, 0, opts);\n\tblob.read_shift(length + l - blob.l);\n\treturn UserName;\n}\nfunction write_WriteAccess(s, opts) {\n\tvar b8 = !opts || opts.biff == 8;\n\tvar o = new_buf(b8 ? 112 : 54);\n\to.write_shift(opts.biff == 8 ? 2 : 1, 7);\n\tif(b8) o.write_shift(1, 0);\n\to.write_shift(4, 0x33336853);\n\to.write_shift(4, (0x00534A74 | (b8 ? 0 : 0x20000000)));\n\twhile(o.l < o.length) o.write_shift(1, (b8 ? 0 : 32));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.351 */\nfunction parse_WsBool(blob, length, opts) {\n\tvar flags = opts && opts.biff == 8 || length == 2 ? blob.read_shift(2) : (blob.l += length, 0);\n\treturn { fDialog: flags & 0x10, fBelow: flags & 0x40, fRight: flags & 0x80 };\n}\n\n/* [MS-XLS] 2.4.28 */\nfunction parse_BoundSheet8(blob, length, opts) {\n\tvar pos = blob.read_shift(4);\n\tvar hidden = blob.read_shift(1) & 0x03;\n\tvar dt = blob.read_shift(1);\n\tswitch(dt) {\n\t\tcase 0: dt = 'Worksheet'; break;\n\t\tcase 1: dt = 'Macrosheet'; break;\n\t\tcase 2: dt = 'Chartsheet'; break;\n\t\tcase 6: dt = 'VBAModule'; break;\n\t}\n\tvar name = parse_ShortXLUnicodeString(blob, 0, opts);\n\tif(name.length === 0) name = \"Sheet1\";\n\treturn { pos:pos, hs:hidden, dt:dt, name:name };\n}\nfunction write_BoundSheet8(data, opts) {\n\tvar w = (!opts || opts.biff >= 8 ? 2 : 1);\n\tvar o = new_buf(8 + w * data.name.length);\n\to.write_shift(4, data.pos);\n\to.write_shift(1, data.hs || 0);\n\to.write_shift(1, data.dt);\n\to.write_shift(1, data.name.length);\n\tif(opts.biff >= 8) o.write_shift(1, 1);\n\to.write_shift(w * data.name.length, data.name, opts.biff < 8 ? 'sbcs' : 'utf16le');\n\tvar out = o.slice(0, o.l);\n\tout.l = o.l; return out;\n}\n\n/* [MS-XLS] 2.4.265 TODO */\nfunction parse_SST(blob, length) {\n\tvar end = blob.l + length;\n\tvar cnt = blob.read_shift(4);\n\tvar ucnt = blob.read_shift(4);\n\tvar strs = ([]);\n\tfor(var i = 0; i != ucnt && blob.l < end; ++i) {\n\t\tstrs.push(parse_XLUnicodeRichExtendedString(blob));\n\t}\n\tstrs.Count = cnt; strs.Unique = ucnt;\n\treturn strs;\n}\nfunction write_SST(sst, opts) {\n\tvar header = new_buf(8);\n\theader.write_shift(4, sst.Count);\n\theader.write_shift(4, sst.Unique);\n\tvar strs = [];\n\tfor(var j = 0; j < sst.length; ++j) strs[j] = write_XLUnicodeRichExtendedString(sst[j], opts);\n\tvar o = bconcat([header].concat(strs));\no.parts = [header.length].concat(strs.map(function(str) { return str.length; }));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.107 */\nfunction parse_ExtSST(blob, length) {\n\tvar extsst = {};\n\textsst.dsst = blob.read_shift(2);\n\tblob.l += length-2;\n\treturn extsst;\n}\n\n\n/* [MS-XLS] 2.4.221 TODO: check BIFF2-4 */\nfunction parse_Row(blob) {\n\tvar z = ({});\n\tz.r = blob.read_shift(2);\n\tz.c = blob.read_shift(2);\n\tz.cnt = blob.read_shift(2) - z.c;\n\tvar miyRw = blob.read_shift(2);\n\tblob.l += 4; // reserved(2), unused(2)\n\tvar flags = blob.read_shift(1); // various flags\n\tblob.l += 3; // reserved(8), ixfe(12), flags(4)\n\tif(flags & 0x07) z.level = flags & 0x07;\n\t// collapsed: flags & 0x10\n\tif(flags & 0x20) z.hidden = true;\n\tif(flags & 0x40) z.hpt = miyRw / 20;\n\treturn z;\n}\n\n\n/* [MS-XLS] 2.4.125 */\nfunction parse_ForceFullCalculation(blob) {\n\tvar header = parse_frtHeader(blob);\n\tif(header.type != 0x08A3) throw new Error(\"Invalid Future Record \" + header.type);\n\tvar fullcalc = blob.read_shift(4);\n\treturn fullcalc !== 0x0;\n}\n\n\n\n\n\n/* [MS-XLS] 2.4.215 rt */\nfunction parse_RecalcId(blob) {\n\tblob.read_shift(2);\n\treturn blob.read_shift(4);\n}\n\n/* [MS-XLS] 2.4.87 */\nfunction parse_DefaultRowHeight(blob, length, opts) {\n\tvar f = 0;\n\tif(!(opts && opts.biff == 2)) {\n\t\tf = blob.read_shift(2);\n\t}\n\tvar miyRw = blob.read_shift(2);\n\tif((opts && opts.biff == 2)) {\n\t\tf = 1 - (miyRw >> 15); miyRw &= 0x7fff;\n\t}\n\tvar fl = {Unsynced:f&1,DyZero:(f&2)>>1,ExAsc:(f&4)>>2,ExDsc:(f&8)>>3};\n\treturn [fl, miyRw];\n}\n\n/* [MS-XLS] 2.4.345 TODO */\nfunction parse_Window1(blob) {\n\tvar xWn = blob.read_shift(2), yWn = blob.read_shift(2), dxWn = blob.read_shift(2), dyWn = blob.read_shift(2);\n\tvar flags = blob.read_shift(2), iTabCur = blob.read_shift(2), iTabFirst = blob.read_shift(2);\n\tvar ctabSel = blob.read_shift(2), wTabRatio = blob.read_shift(2);\n\treturn { Pos: [xWn, yWn], Dim: [dxWn, dyWn], Flags: flags, CurTab: iTabCur,\n\t\tFirstTab: iTabFirst, Selected: ctabSel, TabRatio: wTabRatio };\n}\nfunction write_Window1() {\n\tvar o = new_buf(18);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0x7260);\n\to.write_shift(2, 0x44c0);\n\to.write_shift(2, 0x38);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 1);\n\to.write_shift(2, 0x01f4);\n\treturn o;\n}\n/* [MS-XLS] 2.4.346 TODO */\nfunction parse_Window2(blob, length, opts) {\n\tif(opts && opts.biff >= 2 && opts.biff < 5) return {};\n\tvar f = blob.read_shift(2);\n\treturn { RTL: f & 0x40 };\n}\nfunction write_Window2(view) {\n\tvar o = new_buf(18), f = 0x6b6;\n\tif(view && view.RTL) f |= 0x40;\n\to.write_shift(2, f);\n\to.write_shift(4, 0);\n\to.write_shift(4, 64);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.189 TODO */\nfunction parse_Pane(/*blob, length, opts*/) {\n}\n\n/* [MS-XLS] 2.4.122 TODO */\nfunction parse_Font(blob, length, opts) {\n\tvar o = {\n\t\tdyHeight: blob.read_shift(2),\n\t\tfl: blob.read_shift(2)\n\t};\n\tswitch((opts && opts.biff) || 8) {\n\t\tcase 2: break;\n\t\tcase 3: case 4: blob.l += 2; break;\n\t\tdefault: blob.l += 10; break;\n\t}\n\to.name = parse_ShortXLUnicodeString(blob, 0, opts);\n\treturn o;\n}\nfunction write_Font(data, opts) {\n\tvar name = data.name || \"Arial\";\n\tvar b5 = (opts && (opts.biff == 5)), w = (b5 ? (15 + name.length) : (16 + 2 * name.length));\n\tvar o = new_buf(w);\n\to.write_shift(2, (data.sz || 12) * 20);\n\to.write_shift(4, 0);\n\to.write_shift(2, 400);\n\to.write_shift(4, 0);\n\to.write_shift(2, 0);\n\to.write_shift(1, name.length);\n\tif(!b5) o.write_shift(1, 1);\n\to.write_shift((b5 ? 1 : 2) * name.length, name, (b5 ? \"sbcs\" : \"utf16le\"));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.149 */\nfunction parse_LabelSst(blob) {\n\tvar cell = parse_XLSCell(blob);\n\tcell.isst = blob.read_shift(4);\n\treturn cell;\n}\nfunction write_LabelSst(R, C, v, os ) {\n\tvar o = new_buf(10);\n\twrite_XLSCell(R, C, os, o);\n\to.write_shift(4, v);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.148 */\nfunction parse_Label(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 2) opts.biff = 5;\n\tvar target = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2) blob.l++;\n\tvar str = parse_XLUnicodeString(blob, target - blob.l, opts);\n\tcell.val = str;\n\treturn cell;\n}\nfunction write_Label(R, C, v, os, opts) {\n\tvar b8 = !opts || opts.biff == 8;\n\tvar o = new_buf(6 + 2 + (+b8) + (1 + b8) * v.length);\n\twrite_XLSCell(R, C, os, o);\n\to.write_shift(2, v.length);\n\tif(b8) o.write_shift(1, 1);\n\to.write_shift((1 + b8) * v.length, v, b8 ? 'utf16le' : 'sbcs');\n\treturn o;\n}\n\n\n/* [MS-XLS] 2.4.126 Number Formats */\nfunction parse_Format(blob, length, opts) {\n\tvar numFmtId = blob.read_shift(2);\n\tvar fmtstr = parse_XLUnicodeString2(blob, 0, opts);\n\treturn [numFmtId, fmtstr];\n}\nfunction write_Format(i, f, opts, o) {\n\tvar b5 = (opts && (opts.biff == 5));\n\tif(!o) o = new_buf(b5 ? (3 + f.length) : (5 + 2 * f.length));\n\to.write_shift(2, i);\n\to.write_shift((b5 ? 1 : 2), f.length);\n\tif(!b5) o.write_shift(1, 1);\n\to.write_shift((b5 ? 1 : 2) * f.length, f, (b5 ? 'sbcs' : 'utf16le'));\n\tvar out = (o.length > o.l) ? o.slice(0, o.l) : o;\n\tif(out.l == null) out.l = out.length;\n\treturn out;\n}\nvar parse_BIFF2Format = parse_XLUnicodeString2;\n\n/* [MS-XLS] 2.4.90 */\nfunction parse_Dimensions(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar w = opts.biff == 8 || !opts.biff ? 4 : 2;\n\tvar r = blob.read_shift(w), R = blob.read_shift(w);\n\tvar c = blob.read_shift(2), C = blob.read_shift(2);\n\tblob.l = end;\n\treturn {s: {r:r, c:c}, e: {r:R, c:C}};\n}\nfunction write_Dimensions(range, opts) {\n\tvar w = opts.biff == 8 || !opts.biff ? 4 : 2;\n\tvar o = new_buf(2*w + 6);\n\to.write_shift(w, range.s.r);\n\to.write_shift(w, range.e.r + 1);\n\to.write_shift(2, range.s.c);\n\to.write_shift(2, range.e.c + 1);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.220 */\nfunction parse_RK(blob) {\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar rkrec = parse_RkRec(blob);\n\treturn {r:rw, c:col, ixfe:rkrec[0], rknum:rkrec[1]};\n}\n\n/* [MS-XLS] 2.4.175 */\nfunction parse_MulRk(blob, length) {\n\tvar target = blob.l + length - 2;\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar rkrecs = [];\n\twhile(blob.l < target) rkrecs.push(parse_RkRec(blob));\n\tif(blob.l !== target) throw new Error(\"MulRK read error\");\n\tvar lastcol = blob.read_shift(2);\n\tif(rkrecs.length != lastcol - col + 1) throw new Error(\"MulRK length mismatch\");\n\treturn {r:rw, c:col, C:lastcol, rkrec:rkrecs};\n}\n/* [MS-XLS] 2.4.174 */\nfunction parse_MulBlank(blob, length) {\n\tvar target = blob.l + length - 2;\n\tvar rw = blob.read_shift(2), col = blob.read_shift(2);\n\tvar ixfes = [];\n\twhile(blob.l < target) ixfes.push(blob.read_shift(2));\n\tif(blob.l !== target) throw new Error(\"MulBlank read error\");\n\tvar lastcol = blob.read_shift(2);\n\tif(ixfes.length != lastcol - col + 1) throw new Error(\"MulBlank length mismatch\");\n\treturn {r:rw, c:col, C:lastcol, ixfe:ixfes};\n}\n\n/* [MS-XLS] 2.5.20 2.5.249 TODO: interpret values here */\nfunction parse_CellStyleXF(blob, length, style, opts) {\n\tvar o = {};\n\tvar a = blob.read_shift(4), b = blob.read_shift(4);\n\tvar c = blob.read_shift(4), d = blob.read_shift(2);\n\to.patternType = XLSFillPattern[c >> 26];\n\n\tif(!opts.cellStyles) return o;\n\to.alc = a & 0x07;\n\to.fWrap = (a >> 3) & 0x01;\n\to.alcV = (a >> 4) & 0x07;\n\to.fJustLast = (a >> 7) & 0x01;\n\to.trot = (a >> 8) & 0xFF;\n\to.cIndent = (a >> 16) & 0x0F;\n\to.fShrinkToFit = (a >> 20) & 0x01;\n\to.iReadOrder = (a >> 22) & 0x02;\n\to.fAtrNum = (a >> 26) & 0x01;\n\to.fAtrFnt = (a >> 27) & 0x01;\n\to.fAtrAlc = (a >> 28) & 0x01;\n\to.fAtrBdr = (a >> 29) & 0x01;\n\to.fAtrPat = (a >> 30) & 0x01;\n\to.fAtrProt = (a >> 31) & 0x01;\n\n\to.dgLeft = b & 0x0F;\n\to.dgRight = (b >> 4) & 0x0F;\n\to.dgTop = (b >> 8) & 0x0F;\n\to.dgBottom = (b >> 12) & 0x0F;\n\to.icvLeft = (b >> 16) & 0x7F;\n\to.icvRight = (b >> 23) & 0x7F;\n\to.grbitDiag = (b >> 30) & 0x03;\n\n\to.icvTop = c & 0x7F;\n\to.icvBottom = (c >> 7) & 0x7F;\n\to.icvDiag = (c >> 14) & 0x7F;\n\to.dgDiag = (c >> 21) & 0x0F;\n\n\to.icvFore = d & 0x7F;\n\to.icvBack = (d >> 7) & 0x7F;\n\to.fsxButton = (d >> 14) & 0x01;\n\treturn o;\n}\n//function parse_CellXF(blob, length, opts) {return parse_CellStyleXF(blob,length,0, opts);}\n//function parse_StyleXF(blob, length, opts) {return parse_CellStyleXF(blob,length,1, opts);}\n\n/* [MS-XLS] 2.4.353 TODO: actually do this right */\nfunction parse_XF(blob, length, opts) {\n\tvar o = {};\n\to.ifnt = blob.read_shift(2); o.numFmtId = blob.read_shift(2); o.flags = blob.read_shift(2);\n\to.fStyle = (o.flags >> 2) & 0x01;\n\tlength -= 6;\n\to.data = parse_CellStyleXF(blob, length, o.fStyle, opts);\n\treturn o;\n}\nfunction write_XF(data, ixfeP, opts, o) {\n\tvar b5 = (opts && (opts.biff == 5));\n\tif(!o) o = new_buf(b5 ? 16 : 20);\n\to.write_shift(2, 0);\n\tif(data.style) {\n\t\to.write_shift(2, (data.numFmtId||0));\n\t\to.write_shift(2, 0xFFF4);\n\t} else {\n\t\to.write_shift(2, (data.numFmtId||0));\n\t\to.write_shift(2, (ixfeP<<4));\n\t}\n\tvar f = 0;\n\tif(data.numFmtId > 0 && b5) f |= 0x0400;\n\to.write_shift(4, f);\n\to.write_shift(4, 0);\n\tif(!b5) o.write_shift(4, 0);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.134 */\nfunction parse_Guts(blob) {\n\tblob.l += 4;\n\tvar out = [blob.read_shift(2), blob.read_shift(2)];\n\tif(out[0] !== 0) out[0]--;\n\tif(out[1] !== 0) out[1]--;\n\tif(out[0] > 7 || out[1] > 7) throw new Error(\"Bad Gutters: \" + out.join(\"|\"));\n\treturn out;\n}\nfunction write_Guts(guts) {\n\tvar o = new_buf(8);\n\to.write_shift(4, 0);\n\to.write_shift(2, guts[0] ? guts[0] + 1 : 0);\n\to.write_shift(2, guts[1] ? guts[1] + 1 : 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.24 */\nfunction parse_BoolErr(blob, length, opts) {\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2 || length == 9) ++blob.l;\n\tvar val = parse_Bes(blob, 2);\n\tcell.val = val;\n\tcell.t = (val === true || val === false) ? 'b' : 'e';\n\treturn cell;\n}\nfunction write_BoolErr(R, C, v, os, opts, t) {\n\tvar o = new_buf(8);\n\twrite_XLSCell(R, C, os, o);\n\twrite_Bes(v, t, o);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.180 Number */\nfunction parse_Number(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 2) opts.biff = 5;\n\tvar cell = parse_XLSCell(blob, 6);\n\tvar xnum = parse_Xnum(blob, 8);\n\tcell.val = xnum;\n\treturn cell;\n}\nfunction write_Number(R, C, v, os) {\n\tvar o = new_buf(14);\n\twrite_XLSCell(R, C, os, o);\n\twrite_Xnum(v, o);\n\treturn o;\n}\n\nvar parse_XLHeaderFooter = parse_OptXLUnicodeString; // TODO: parse 2.4.136\n\n/* [MS-XLS] 2.4.271 */\nfunction parse_SupBook(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar ctab = blob.read_shift(2);\n\tvar cch = blob.read_shift(2);\n\topts.sbcch = cch;\n\tif(cch == 0x0401 || cch == 0x3A01) return [cch, ctab];\n\tif(cch < 0x01 || cch >0xff) throw new Error(\"Unexpected SupBook type: \"+cch);\n\tvar virtPath = parse_XLUnicodeStringNoCch(blob, cch);\n\t/* TODO: 2.5.277 Virtual Path */\n\tvar rgst = [];\n\twhile(end > blob.l) rgst.push(parse_XLUnicodeString(blob));\n\treturn [cch, ctab, virtPath, rgst];\n}\n\n/* [MS-XLS] 2.4.105 TODO */\nfunction parse_ExternName(blob, length, opts) {\n\tvar flags = blob.read_shift(2);\n\tvar body;\n\tvar o = ({\n\t\tfBuiltIn: flags & 0x01,\n\t\tfWantAdvise: (flags >>> 1) & 0x01,\n\t\tfWantPict: (flags >>> 2) & 0x01,\n\t\tfOle: (flags >>> 3) & 0x01,\n\t\tfOleLink: (flags >>> 4) & 0x01,\n\t\tcf: (flags >>> 5) & 0x3FF,\n\t\tfIcon: flags >>> 15 & 0x01\n\t});\n\tif(opts.sbcch === 0x3A01) body = parse_AddinUdf(blob, length-2, opts);\n\t//else throw new Error(\"unsupported SupBook cch: \" + opts.sbcch);\n\to.body = body || blob.read_shift(length-2);\n\tif(typeof body === \"string\") o.Name = body;\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.150 TODO */\nvar XLSLblBuiltIn = [\n\t\"_xlnm.Consolidate_Area\",\n\t\"_xlnm.Auto_Open\",\n\t\"_xlnm.Auto_Close\",\n\t\"_xlnm.Extract\",\n\t\"_xlnm.Database\",\n\t\"_xlnm.Criteria\",\n\t\"_xlnm.Print_Area\",\n\t\"_xlnm.Print_Titles\",\n\t\"_xlnm.Recorder\",\n\t\"_xlnm.Data_Form\",\n\t\"_xlnm.Auto_Activate\",\n\t\"_xlnm.Auto_Deactivate\",\n\t\"_xlnm.Sheet_Title\",\n\t\"_xlnm._FilterDatabase\"\n];\nfunction parse_Lbl(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar flags = blob.read_shift(2);\n\tvar chKey = blob.read_shift(1);\n\tvar cch = blob.read_shift(1);\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tvar itab = 0;\n\tif(!opts || opts.biff >= 5) {\n\t\tif(opts.biff != 5) blob.l += 2;\n\t\titab = blob.read_shift(2);\n\t\tif(opts.biff == 5) blob.l += 2;\n\t\tblob.l += 4;\n\t}\n\tvar name = parse_XLUnicodeStringNoCch(blob, cch, opts);\n\tif(flags & 0x20) name = XLSLblBuiltIn[name.charCodeAt(0)];\n\tvar npflen = target - blob.l; if(opts && opts.biff == 2) --npflen;\n\t/*jshint -W018 */\n\tvar rgce = (target == blob.l || cce === 0 || !(npflen > 0)) ? [] : parse_NameParsedFormula(blob, npflen, opts, cce);\n\t/*jshint +W018 */\n\treturn {\n\t\tchKey: chKey,\n\t\tName: name,\n\t\titab: itab,\n\t\trgce: rgce\n\t};\n}\n\n/* [MS-XLS] 2.4.106 TODO: verify filename encoding */\nfunction parse_ExternSheet(blob, length, opts) {\n\tif(opts.biff < 8) return parse_BIFF5ExternSheet(blob, length, opts);\n\tvar o = [], target = blob.l + length, len = blob.read_shift(opts.biff > 8 ? 4 : 2);\n\twhile(len-- !== 0) o.push(parse_XTI(blob, opts.biff > 8 ? 12 : 6, opts));\n\t\t// [iSupBook, itabFirst, itabLast];\n\tif(blob.l != target) throw new Error(\"Bad ExternSheet: \" + blob.l + \" != \" + target);\n\treturn o;\n}\nfunction parse_BIFF5ExternSheet(blob, length, opts) {\n\tif(blob[blob.l + 1] == 0x03) blob[blob.l]++;\n\tvar o = parse_ShortXLUnicodeString(blob, length, opts);\n\treturn o.charCodeAt(0) == 0x03 ? o.slice(1) : o;\n}\n\n/* [MS-XLS] 2.4.176 TODO: check older biff */\nfunction parse_NameCmt(blob, length, opts) {\n\tif(opts.biff < 8) { blob.l += length; return; }\n\tvar cchName = blob.read_shift(2);\n\tvar cchComment = blob.read_shift(2);\n\tvar name = parse_XLUnicodeStringNoCch(blob, cchName, opts);\n\tvar comment = parse_XLUnicodeStringNoCch(blob, cchComment, opts);\n\treturn [name, comment];\n}\n\n/* [MS-XLS] 2.4.260 */\nfunction parse_ShrFmla(blob, length, opts) {\n\tvar ref = parse_RefU(blob, 6);\n\tblob.l++;\n\tvar cUse = blob.read_shift(1);\n\tlength -= 8;\n\treturn [parse_SharedParsedFormula(blob, length, opts), cUse, ref];\n}\n\n/* [MS-XLS] 2.4.4 TODO */\nfunction parse_Array(blob, length, opts) {\n\tvar ref = parse_Ref(blob, 6);\n\t/* TODO: fAlwaysCalc */\n\tswitch(opts.biff) {\n\t\tcase 2: blob.l ++; length -= 7; break;\n\t\tcase 3: case 4: blob.l += 2; length -= 8; break;\n\t\tdefault: blob.l += 6; length -= 12;\n\t}\n\treturn [ref, parse_ArrayParsedFormula(blob, length, opts, ref)];\n}\n\n/* [MS-XLS] 2.4.173 */\nfunction parse_MTRSettings(blob) {\n\tvar fMTREnabled = blob.read_shift(4) !== 0x00;\n\tvar fUserSetThreadCount = blob.read_shift(4) !== 0x00;\n\tvar cUserThreadCount = blob.read_shift(4);\n\treturn [fMTREnabled, fUserSetThreadCount, cUserThreadCount];\n}\n\n/* [MS-XLS] 2.5.186 TODO: BIFF5 */\nfunction parse_NoteSh(blob, length, opts) {\n\tif(opts.biff < 8) return;\n\tvar row = blob.read_shift(2), col = blob.read_shift(2);\n\tvar flags = blob.read_shift(2), idObj = blob.read_shift(2);\n\tvar stAuthor = parse_XLUnicodeString2(blob, 0, opts);\n\tif(opts.biff < 8) blob.read_shift(1);\n\treturn [{r:row,c:col}, stAuthor, idObj, flags];\n}\n\n/* [MS-XLS] 2.4.179 */\nfunction parse_Note(blob, length, opts) {\n\t/* TODO: Support revisions */\n\treturn parse_NoteSh(blob, length, opts);\n}\n\n/* [MS-XLS] 2.4.168 */\nfunction parse_MergeCells(blob, length) {\n\tvar merges = [];\n\tvar cmcs = blob.read_shift(2);\n\twhile (cmcs--) merges.push(parse_Ref8U(blob,length));\n\treturn merges;\n}\nfunction write_MergeCells(merges) {\n\tvar o = new_buf(2 + merges.length * 8);\n\to.write_shift(2, merges.length);\n\tfor(var i = 0; i < merges.length; ++i) write_Ref8U(merges[i], o);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.181 TODO: parse all the things! */\nfunction parse_Obj(blob, length, opts) {\n\tif(opts && opts.biff < 8) return parse_BIFF5Obj(blob, length, opts);\n\tvar cmo = parse_FtCmo(blob, 22); // id, ot, flags\n\tvar fts = parse_FtArray(blob, length-22, cmo[1]);\n\treturn { cmo: cmo, ft:fts };\n}\n/* from older spec */\nvar parse_BIFF5OT = [];\nparse_BIFF5OT[0x08] = function(blob, length) {\n\tvar tgt = blob.l + length;\n\tblob.l += 10; // todo\n\tvar cf = blob.read_shift(2);\n\tblob.l += 4;\n\tblob.l += 2; //var cbPictFmla = blob.read_shift(2);\n\tblob.l += 2;\n\tblob.l += 2; //var grbit = blob.read_shift(2);\n\tblob.l += 4;\n\tvar cchName = blob.read_shift(1);\n\tblob.l += cchName; // TODO: stName\n\tblob.l = tgt; // TODO: fmla\n\treturn { fmt:cf };\n};\n\nfunction parse_BIFF5Obj(blob, length, opts) {\n\tblob.l += 4; //var cnt = blob.read_shift(4);\n\tvar ot = blob.read_shift(2);\n\tvar id = blob.read_shift(2);\n\tvar grbit = blob.read_shift(2);\n\tblob.l += 2; //var colL = blob.read_shift(2);\n\tblob.l += 2; //var dxL = blob.read_shift(2);\n\tblob.l += 2; //var rwT = blob.read_shift(2);\n\tblob.l += 2; //var dyT = blob.read_shift(2);\n\tblob.l += 2; //var colR = blob.read_shift(2);\n\tblob.l += 2; //var dxR = blob.read_shift(2);\n\tblob.l += 2; //var rwB = blob.read_shift(2);\n\tblob.l += 2; //var dyB = blob.read_shift(2);\n\tblob.l += 2; //var cbMacro = blob.read_shift(2);\n\tblob.l += 6;\n\tlength -= 36;\n\tvar fts = [];\n\tfts.push((parse_BIFF5OT[ot]||parsenoop)(blob, length, opts));\n\treturn { cmo: [id, ot, grbit], ft:fts };\n}\n\n/* [MS-XLS] 2.4.329 TODO: parse properly */\nfunction parse_TxO(blob, length, opts) {\n\tvar s = blob.l;\n\tvar texts = \"\";\ntry {\n\tblob.l += 4;\n\tvar ot = (opts.lastobj||{cmo:[0,0]}).cmo[1];\n\tvar controlInfo; // eslint-disable-line no-unused-vars\n\tif([0,5,7,11,12,14].indexOf(ot) == -1) blob.l += 6;\n\telse controlInfo = parse_ControlInfo(blob, 6, opts);\n\tvar cchText = blob.read_shift(2);\n\t/*var cbRuns = */blob.read_shift(2);\n\t/*var ifntEmpty = */parseuint16(blob, 2);\n\tvar len = blob.read_shift(2);\n\tblob.l += len;\n\t//var fmla = parse_ObjFmla(blob, s + length - blob.l);\n\n\tfor(var i = 1; i < blob.lens.length-1; ++i) {\n\t\tif(blob.l-s != blob.lens[i]) throw new Error(\"TxO: bad continue record\");\n\t\tvar hdr = blob[blob.l];\n\t\tvar t = parse_XLUnicodeStringNoCch(blob, blob.lens[i+1]-blob.lens[i]-1);\n\t\ttexts += t;\n\t\tif(texts.length >= (hdr ? cchText : 2*cchText)) break;\n\t}\n\tif(texts.length !== cchText && texts.length !== cchText*2) {\n\t\tthrow new Error(\"cchText: \" + cchText + \" != \" + texts.length);\n\t}\n\n\tblob.l = s + length;\n\t/* [MS-XLS] 2.5.272 TxORuns */\n//\tvar rgTxoRuns = [];\n//\tfor(var j = 0; j != cbRuns/8-1; ++j) blob.l += 8;\n//\tvar cchText2 = blob.read_shift(2);\n//\tif(cchText2 !== cchText) throw new Error(\"TxOLastRun mismatch: \" + cchText2 + \" \" + cchText);\n//\tblob.l += 6;\n//\tif(s + length != blob.l) throw new Error(\"TxO \" + (s + length) + \", at \" + blob.l);\n\treturn { t: texts };\n} catch(e) { blob.l = s + length; return { t: texts }; }\n}\n\n/* [MS-XLS] 2.4.140 */\nfunction parse_HLink(blob, length) {\n\tvar ref = parse_Ref8U(blob, 8);\n\tblob.l += 16; /* CLSID */\n\tvar hlink = parse_Hyperlink(blob, length-24);\n\treturn [ref, hlink];\n}\nfunction write_HLink(hl) {\n\tvar O = new_buf(24);\n\tvar ref = decode_cell(hl[0]);\n\tO.write_shift(2, ref.r); O.write_shift(2, ref.r);\n\tO.write_shift(2, ref.c); O.write_shift(2, ref.c);\n\tvar clsid = \"d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b\".split(\" \");\n\tfor(var i = 0; i < 16; ++i) O.write_shift(1, parseInt(clsid[i], 16));\n\treturn bconcat([O, write_Hyperlink(hl[1])]);\n}\n\n\n/* [MS-XLS] 2.4.141 */\nfunction parse_HLinkTooltip(blob, length) {\n\tblob.read_shift(2);\n\tvar ref = parse_Ref8U(blob, 8);\n\tvar wzTooltip = blob.read_shift((length-10)/2, 'dbcs-cont');\n\twzTooltip = wzTooltip.replace(chr0,\"\");\n\treturn [ref, wzTooltip];\n}\nfunction write_HLinkTooltip(hl) {\n\tvar TT = hl[1].Tooltip;\n\tvar O = new_buf(10 + 2 * (TT.length + 1));\n\tO.write_shift(2, 0x0800);\n\tvar ref = decode_cell(hl[0]);\n\tO.write_shift(2, ref.r); O.write_shift(2, ref.r);\n\tO.write_shift(2, ref.c); O.write_shift(2, ref.c);\n\tfor(var i = 0; i < TT.length; ++i) O.write_shift(2, TT.charCodeAt(i));\n\tO.write_shift(2, 0);\n\treturn O;\n}\n\n/* [MS-XLS] 2.4.63 */\nfunction parse_Country(blob) {\n\tvar o = [0,0], d;\n\td = blob.read_shift(2); o[0] = CountryEnum[d] || d;\n\td = blob.read_shift(2); o[1] = CountryEnum[d] || d;\n\treturn o;\n}\nfunction write_Country(o) {\n\tif(!o) o = new_buf(4);\n\to.write_shift(2, 0x01);\n\to.write_shift(2, 0x01);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.50 ClrtClient */\nfunction parse_ClrtClient(blob) {\n\tvar ccv = blob.read_shift(2);\n\tvar o = [];\n\twhile(ccv-->0) o.push(parse_LongRGB(blob, 8));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.188 */\nfunction parse_Palette(blob) {\n\tvar ccv = blob.read_shift(2);\n\tvar o = [];\n\twhile(ccv-->0) o.push(parse_LongRGB(blob, 8));\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.354 */\nfunction parse_XFCRC(blob) {\n\tblob.l += 2;\n\tvar o = {cxfs:0, crc:0};\n\to.cxfs = blob.read_shift(2);\n\to.crc = blob.read_shift(4);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.53 TODO: parse flags */\n/* [MS-XLSB] 2.4.323 TODO: parse flags */\nfunction parse_ColInfo(blob, length, opts) {\n\tif(!opts.cellStyles) return parsenoop(blob, length);\n\tvar w = opts && opts.biff >= 12 ? 4 : 2;\n\tvar colFirst = blob.read_shift(w);\n\tvar colLast = blob.read_shift(w);\n\tvar coldx = blob.read_shift(w);\n\tvar ixfe = blob.read_shift(w);\n\tvar flags = blob.read_shift(2);\n\tif(w == 2) blob.l += 2;\n\tvar o = ({s:colFirst, e:colLast, w:coldx, ixfe:ixfe, flags:flags});\n\tif(opts.biff >= 5 || !opts.biff) o.level = (flags >> 8) & 0x7;\n\treturn o;\n}\nfunction write_ColInfo(col, idx) {\n\tvar o = new_buf(12);\n\to.write_shift(2, idx);\n\to.write_shift(2, idx);\n\to.write_shift(2, col.width * 256);\n\to.write_shift(2, 0);\n\tvar f = 0;\n\tif(col.hidden) f |= 1;\n\to.write_shift(1, f);\n\tf = col.level || 0;\n\to.write_shift(1, f);\n\to.write_shift(2, 0);\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.257 */\nfunction parse_Setup(blob, length) {\n\tvar o = {};\n\tif(length < 32) return o;\n\tblob.l += 16;\n\to.header = parse_Xnum(blob, 8);\n\to.footer = parse_Xnum(blob, 8);\n\tblob.l += 2;\n\treturn o;\n}\n\n/* [MS-XLS] 2.4.261 */\nfunction parse_ShtProps(blob, length, opts) {\n\tvar def = {area:false};\n\tif(opts.biff != 5) { blob.l += length; return def; }\n\tvar d = blob.read_shift(1); blob.l += 3;\n\tif((d & 0x10)) def.area = true;\n\treturn def;\n}\n\n/* [MS-XLS] 2.4.241 */\nfunction write_RRTabId(n) {\n\tvar out = new_buf(2 * n);\n\tfor(var i = 0; i < n; ++i) out.write_shift(2, i+1);\n\treturn out;\n}\n\nvar parse_Blank = parse_XLSCell; /* [MS-XLS] 2.4.20 Just the cell */\nvar parse_Scl = parseuint16a; /* [MS-XLS] 2.4.247 num, den */\nvar parse_String = parse_XLUnicodeString; /* [MS-XLS] 2.4.268 */\n\n/* --- Specific to versions before BIFF8 --- */\nfunction parse_ImData(blob) {\n\tvar cf = blob.read_shift(2);\n\tvar env = blob.read_shift(2);\n\tvar lcb = blob.read_shift(4);\n\tvar o = {fmt:cf, env:env, len:lcb, data:blob.slice(blob.l,blob.l+lcb)};\n\tblob.l += lcb;\n\treturn o;\n}\n\n/* BIFF2_??? where ??? is the name from [XLS] */\nfunction parse_BIFF2STR(blob, length, opts) {\n\tif(opts.biffguess && opts.biff == 5) opts.biff = 2;\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar str = parse_XLUnicodeString2(blob, length-7, opts);\n\tcell.t = 'str';\n\tcell.val = str;\n\treturn cell;\n}\n\nfunction parse_BIFF2NUM(blob) {\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar num = parse_Xnum(blob, 8);\n\tcell.t = 'n';\n\tcell.val = num;\n\treturn cell;\n}\nfunction write_BIFF2NUM(r, c, val) {\n\tvar out = new_buf(15);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(8, val, 'f');\n\treturn out;\n}\n\nfunction parse_BIFF2INT(blob) {\n\tvar cell = parse_XLSCell(blob, 6);\n\t++blob.l;\n\tvar num = blob.read_shift(2);\n\tcell.t = 'n';\n\tcell.val = num;\n\treturn cell;\n}\nfunction write_BIFF2INT(r, c, val) {\n\tvar out = new_buf(9);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(2, val);\n\treturn out;\n}\n\nfunction parse_BIFF2STRING(blob) {\n\tvar cch = blob.read_shift(1);\n\tif(cch === 0) { blob.l++; return \"\"; }\n\treturn blob.read_shift(cch, 'sbcs-cont');\n}\n\n/* TODO: convert to BIFF8 font struct */\nfunction parse_BIFF2FONTXTRA(blob, length) {\n\tblob.l += 6; // unknown\n\tblob.l += 2; // font weight \"bls\"\n\tblob.l += 1; // charset\n\tblob.l += 3; // unknown\n\tblob.l += 1; // font family\n\tblob.l += length - 13;\n}\n\n/* TODO: parse rich text runs */\nfunction parse_RString(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tvar cch = blob.read_shift(2);\n\tvar str = parse_XLUnicodeStringNoCch(blob, cch, opts);\n\tblob.l = end;\n\tcell.t = 'str';\n\tcell.val = str;\n\treturn cell;\n}\n/* from js-harb (C) 2014-present SheetJS */\nvar DBF = (function() {\nvar dbf_codepage_map = {\n\t/* Code Pages Supported by Visual FoxPro */\n0x01: 437, 0x02: 850,\n0x03: 1252, 0x04: 10000,\n0x64: 852, 0x65: 866,\n0x66: 865, 0x67: 861,\n0x68: 895, 0x69: 620,\n0x6A: 737, 0x6B: 857,\n0x78: 950, 0x79: 949,\n0x7A: 936, 0x7B: 932,\n0x7C: 874, 0x7D: 1255,\n0x7E: 1256, 0x96: 10007,\n0x97: 10029, 0x98: 10006,\n0xC8: 1250, 0xC9: 1251,\n0xCA: 1254, 0xCB: 1253,\n\n\t/* shapefile DBF extension */\n0x00: 20127, 0x08: 865,\n0x09: 437, 0x0A: 850,\n0x0B: 437, 0x0D: 437,\n0x0E: 850, 0x0F: 437,\n0x10: 850, 0x11: 437,\n0x12: 850, 0x13: 932,\n0x14: 850, 0x15: 437,\n0x16: 850, 0x17: 865,\n0x18: 437, 0x19: 437,\n0x1A: 850, 0x1B: 437,\n0x1C: 863, 0x1D: 850,\n0x1F: 852, 0x22: 852,\n0x23: 852, 0x24: 860,\n0x25: 850, 0x26: 866,\n0x37: 850, 0x40: 852,\n0x4D: 936, 0x4E: 949,\n0x4F: 950, 0x50: 874,\n0x57: 1252, 0x58: 1252,\n0x59: 1252, 0x6C: 863,\n0x86: 737, 0x87: 852,\n0x88: 857, 0xCC: 1257,\n\n0xFF: 16969\n};\nvar dbf_reverse_map = evert({\n0x01: 437, 0x02: 850,\n0x03: 1252, 0x04: 10000,\n0x64: 852, 0x65: 866,\n0x66: 865, 0x67: 861,\n0x68: 895, 0x69: 620,\n0x6A: 737, 0x6B: 857,\n0x78: 950, 0x79: 949,\n0x7A: 936, 0x7B: 932,\n0x7C: 874, 0x7D: 1255,\n0x7E: 1256, 0x96: 10007,\n0x97: 10029, 0x98: 10006,\n0xC8: 1250, 0xC9: 1251,\n0xCA: 1254, 0xCB: 1253,\n0x00: 20127\n});\nvar DBF_SUPPORTED_VERSIONS = [0x02, 0x03, 0x30, 0x31, 0x83, 0x8B, 0x8C, 0xF5];\n/* TODO: find an actual specification */\nfunction dbf_to_aoa(buf, opts) {\n\tvar out = [];\n\tvar d = (new_raw_buf(1));\n\tswitch(opts.type) {\n\t\tcase 'base64': d = s2a(Base64.decode(buf)); break;\n\t\tcase 'binary': d = s2a(buf); break;\n\t\tcase 'buffer':\n\t\tcase 'array': d = buf; break;\n\t}\n\tprep_blob(d, 0);\n\n\t/* header */\n\tvar ft = d.read_shift(1);\n\tvar memo = !!(ft & 0x88);\n\tvar vfp = false, l7 = false;\n\tswitch(ft) {\n\t\tcase 0x02: break; // dBASE II\n\t\tcase 0x03: break; // dBASE III\n\t\tcase 0x30: vfp = true; memo = true; break; // VFP\n\t\tcase 0x31: vfp = true; memo = true; break; // VFP with autoincrement\n\t\t// 0x43 dBASE IV SQL table files\n\t\t// 0x63 dBASE IV SQL system files\n\t\tcase 0x83: break; // dBASE III with memo\n\t\tcase 0x8B: break; // dBASE IV with memo\n\t\tcase 0x8C: l7 = true; break; // dBASE Level 7 with memo\n\t\t// case 0xCB dBASE IV SQL table files with memo\n\t\tcase 0xF5: break; // FoxPro 2.x with memo\n\t\t// case 0xFB FoxBASE\n\t\tdefault: throw new Error(\"DBF Unsupported Version: \" + ft.toString(16));\n\t}\n\n\tvar nrow = 0, fpos = 0x0209;\n\tif(ft == 0x02) nrow = d.read_shift(2);\n\td.l += 3; // dBASE II stores DDMMYY date, others use YYMMDD\n\tif(ft != 0x02) nrow = d.read_shift(4);\n\tif(nrow > 1048576) nrow = 1e6;\n\n\tif(ft != 0x02) fpos = d.read_shift(2); // header length\n\tvar rlen = d.read_shift(2); // record length\n\n\tvar /*flags = 0,*/ current_cp = opts.codepage || 1252;\n\tif(ft != 0x02) { // 20 reserved bytes\n\t\td.l+=16;\n\t\t/*flags = */d.read_shift(1);\n\t\t//if(memo && ((flags & 0x02) === 0)) throw new Error(\"DBF Flags \" + flags.toString(16) + \" ft \" + ft.toString(16));\n\n\t\t/* codepage present in FoxPro and dBASE Level 7 */\n\t\tif(d[d.l] !== 0) current_cp = dbf_codepage_map[d[d.l]];\n\t\td.l+=1;\n\n\t\td.l+=2;\n\t}\n\tif(l7) d.l += 36; // Level 7: 32 byte \"Language driver name\", 4 byte reserved\n\nvar fields = [], field = ({});\n\tvar hend = Math.min(d.length, (ft == 0x02 ? 0x209 : (fpos - 10 - (vfp ? 264 : 0))));\n\tvar ww = l7 ? 32 : 11;\n\twhile(d.l < hend && d[d.l] != 0x0d) {\n\t\tfield = ({});\n\t\tfield.name = cptable.utils.decode(current_cp, d.slice(d.l, d.l+ww)).replace(/[\\u0000\\r\\n].*$/g,\"\");\n\t\td.l += ww;\n\t\tfield.type = String.fromCharCode(d.read_shift(1));\n\t\tif(ft != 0x02 && !l7) field.offset = d.read_shift(4);\n\t\tfield.len = d.read_shift(1);\n\t\tif(ft == 0x02) field.offset = d.read_shift(2);\n\t\tfield.dec = d.read_shift(1);\n\t\tif(field.name.length) fields.push(field);\n\t\tif(ft != 0x02) d.l += l7 ? 13 : 14;\n\t\tswitch(field.type) {\n\t\t\tcase 'B': // Double (VFP) / Binary (dBASE L7)\n\t\t\t\tif((!vfp || field.len != 8) && opts.WTF) console.log('Skipping ' + field.name + ':' + field.type);\n\t\t\t\tbreak;\n\t\t\tcase 'G': // General (FoxPro and dBASE L7)\n\t\t\tcase 'P': // Picture (FoxPro and dBASE L7)\n\t\t\t\tif(opts.WTF) console.log('Skipping ' + field.name + ':' + field.type);\n\t\t\t\tbreak;\n\t\t\tcase '+': // Autoincrement (dBASE L7 only)\n\t\t\tcase '0': // _NullFlags (VFP only)\n\t\t\tcase '@': // Timestamp (dBASE L7 only)\n\t\t\tcase 'C': // Character (dBASE II)\n\t\t\tcase 'D': // Date (dBASE III)\n\t\t\tcase 'F': // Float (dBASE IV)\n\t\t\tcase 'I': // Long (VFP and dBASE L7)\n\t\t\tcase 'L': // Logical (dBASE II)\n\t\t\tcase 'M': // Memo (dBASE III)\n\t\t\tcase 'N': // Number (dBASE II)\n\t\t\tcase 'O': // Double (dBASE L7 only)\n\t\t\tcase 'T': // Datetime (VFP only)\n\t\t\tcase 'Y': // Currency (VFP only)\n\t\t\t\tbreak;\n\t\t\tdefault: throw new Error('Unknown Field Type: ' + field.type);\n\t\t}\n\t}\n\n\tif(d[d.l] !== 0x0D) d.l = fpos-1;\n\tif(d.read_shift(1) !== 0x0D) throw new Error(\"DBF Terminator not found \" + d.l + \" \" + d[d.l]);\n\td.l = fpos;\n\n\t/* data */\n\tvar R = 0, C = 0;\n\tout[0] = [];\n\tfor(C = 0; C != fields.length; ++C) out[0][C] = fields[C].name;\n\twhile(nrow-- > 0) {\n\t\tif(d[d.l] === 0x2A) {\n\t\t\t// TODO: record marked as deleted -- create a hidden row?\n\t\t\td.l+=rlen;\n\t\t\tcontinue;\n\t\t}\n\t\t++d.l;\n\t\tout[++R] = []; C = 0;\n\t\tfor(C = 0; C != fields.length; ++C) {\n\t\t\tvar dd = d.slice(d.l, d.l+fields[C].len); d.l+=fields[C].len;\n\t\t\tprep_blob(dd, 0);\n\t\t\tvar s = cptable.utils.decode(current_cp, dd);\n\t\t\tswitch(fields[C].type) {\n\t\t\t\tcase 'C':\n\t\t\t\t\t// NOTE: it is conventional to write ' / / ' for empty dates\n\t\t\t\t\tif(s.trim().length) out[R][C] = s.replace(/\\s+$/,\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'D':\n\t\t\t\t\tif(s.length === 8) out[R][C] = new Date(+s.slice(0,4), +s.slice(4,6)-1, +s.slice(6,8));\n\t\t\t\t\telse out[R][C] = s;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'F': out[R][C] = parseFloat(s.trim()); break;\n\t\t\t\tcase '+': case 'I': out[R][C] = l7 ? dd.read_shift(-4, 'i') ^ 0x80000000 : dd.read_shift(4, 'i'); break;\n\t\t\t\tcase 'L': switch(s.trim().toUpperCase()) {\n\t\t\t\t\tcase 'Y': case 'T': out[R][C] = true; break;\n\t\t\t\t\tcase 'N': case 'F': out[R][C] = false; break;\n\t\t\t\t\tcase '': case '?': break;\n\t\t\t\t\tdefault: throw new Error(\"DBF Unrecognized L:|\" + s + \"|\");\n\t\t\t\t\t} break;\n\t\t\t\tcase 'M': /* TODO: handle memo files */\n\t\t\t\t\tif(!memo) throw new Error(\"DBF Unexpected MEMO for type \" + ft.toString(16));\n\t\t\t\t\tout[R][C] = \"##MEMO##\" + (l7 ? parseInt(s.trim(), 10): dd.read_shift(4));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'N':\n\t\t\t\t\ts = s.replace(/\\u0000/g,\"\").trim();\n\t\t\t\t\t// NOTE: dBASE II interprets \" . \" as 0\n\t\t\t\t\tif(s && s != \".\") out[R][C] = +s || 0; break;\n\t\t\t\tcase '@':\n\t\t\t\t\t// NOTE: dBASE specs appear to be incorrect\n\t\t\t\t\tout[R][C] = new Date(dd.read_shift(-8, 'f') - 0x388317533400);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'T': out[R][C] = new Date((dd.read_shift(4) - 0x253D8C) * 0x5265C00 + dd.read_shift(4)); break;\n\t\t\t\tcase 'Y': out[R][C] = dd.read_shift(4,'i')/1e4; break;\n\t\t\t\tcase 'O': out[R][C] = -dd.read_shift(-8, 'f'); break;\n\t\t\t\tcase 'B': if(vfp && fields[C].len == 8) { out[R][C] = dd.read_shift(8,'f'); break; }\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'G': case 'P': dd.l += fields[C].len; break;\n\t\t\t\tcase '0':\n\t\t\t\t\tif(fields[C].name === '_NullFlags') break;\n\t\t\t\t\t/* falls through */\n\t\t\t\tdefault: throw new Error(\"DBF Unsupported data type \" + fields[C].type);\n\t\t\t}\n\t\t}\n\t}\n\tif(ft != 0x02) if(d.l < d.length && d[d.l++] != 0x1A) throw new Error(\"DBF EOF Marker missing \" + (d.l-1) + \" of \" + d.length + \" \" + d[d.l-1].toString(16));\n\tif(opts && opts.sheetRows) out = out.slice(0, opts.sheetRows);\n\treturn out;\n}\n\nfunction dbf_to_sheet(buf, opts) {\n\tvar o = opts || {};\n\tif(!o.dateNF) o.dateNF = \"yyyymmdd\";\n\treturn aoa_to_sheet(dbf_to_aoa(buf, o), o);\n}\n\nfunction dbf_to_workbook(buf, opts) {\n\ttry { return sheet_to_workbook(dbf_to_sheet(buf, opts), opts); }\n\tcatch(e) { if(opts && opts.WTF) throw e; }\n\treturn ({SheetNames:[],Sheets:{}});\n}\n\nvar _RLEN = { 'B': 8, 'C': 250, 'L': 1, 'D': 8, '?': 0, '': 0 };\nfunction sheet_to_dbf(ws, opts) {\n\tvar o = opts || {};\n\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\tif(o.type == \"string\") throw new Error(\"Cannot write DBF to JS string\");\n\tvar ba = buf_array();\n\tvar aoa = sheet_to_json(ws, {header:1, raw:true, cellDates:true});\n\tvar headers = aoa[0], data = aoa.slice(1);\n\tvar i = 0, j = 0, hcnt = 0, rlen = 1;\n\tfor(i = 0; i < headers.length; ++i) {\n\t\tif(i == null) continue;\n\t\t++hcnt;\n\t\tif(typeof headers[i] === 'number') headers[i] = headers[i].toString(10);\n\t\tif(typeof headers[i] !== 'string') throw new Error(\"DBF Invalid column name \" + headers[i] + \" |\" + (typeof headers[i]) + \"|\");\n\t\tif(headers.indexOf(headers[i]) !== i) for(j=0; j<1024;++j)\n\t\t\tif(headers.indexOf(headers[i] + \"_\" + j) == -1) { headers[i] += \"_\" + j; break; }\n\t}\n\tvar range = safe_decode_range(ws['!ref']);\n\tvar coltypes = [];\n\tfor(i = 0; i <= range.e.c - range.s.c; ++i) {\n\t\tvar col = [];\n\t\tfor(j=0; j < data.length; ++j) {\n\t\t\tif(data[j][i] != null) col.push(data[j][i]);\n\t\t}\n\t\tif(col.length == 0 || headers[i] == null) { coltypes[i] = '?'; continue; }\n\t\tvar guess = '', _guess = '';\n\t\tfor(j = 0; j < col.length; ++j) {\n\t\t\tswitch(typeof col[j]) {\n\t\t\t\t/* TODO: check if L2 compat is desired */\n\t\t\t\tcase 'number': _guess = 'B'; break;\n\t\t\t\tcase 'string': _guess = 'C'; break;\n\t\t\t\tcase 'boolean': _guess = 'L'; break;\n\t\t\t\tcase 'object': _guess = col[j] instanceof Date ? 'D' : 'C'; break;\n\t\t\t\tdefault: _guess = 'C';\n\t\t\t}\n\t\t\tguess = guess && guess != _guess ? 'C' : _guess;\n\t\t\tif(guess == 'C') break;\n\t\t}\n\t\trlen += _RLEN[guess] || 0;\n\t\tcoltypes[i] = guess;\n\t}\n\n\tvar h = ba.next(32);\n\th.write_shift(4, 0x13021130);\n\th.write_shift(4, data.length);\n\th.write_shift(2, 296 + 32 * hcnt);\n\th.write_shift(2, rlen);\n\tfor(i=0; i < 4; ++i) h.write_shift(4, 0);\n\th.write_shift(4, 0x00000000 | ((+dbf_reverse_map[current_ansi] || 0x03)<<8));\n\n\tfor(i = 0, j = 0; i < headers.length; ++i) {\n\t\tif(headers[i] == null) continue;\n\t\tvar hf = ba.next(32);\n\t\tvar _f = (headers[i].slice(-10) + \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\").slice(0, 11);\n\t\thf.write_shift(1, _f, \"sbcs\");\n\t\thf.write_shift(1, coltypes[i] == '?' ? 'C' : coltypes[i], \"sbcs\");\n\t\thf.write_shift(4, j);\n\t\thf.write_shift(1, _RLEN[coltypes[i]] || 0);\n\t\thf.write_shift(1, 0);\n\t\thf.write_shift(1, 0x02);\n\t\thf.write_shift(4, 0);\n\t\thf.write_shift(1, 0);\n\t\thf.write_shift(4, 0);\n\t\thf.write_shift(4, 0);\n\t\tj += _RLEN[coltypes[i]] || 0;\n\t}\n\n\tvar hb = ba.next(264);\n\thb.write_shift(4, 0x0000000D);\n\tfor(i=0; i < 65;++i) hb.write_shift(4, 0x00000000);\n\tfor(i=0; i < data.length; ++i) {\n\t\tvar rout = ba.next(rlen);\n\t\trout.write_shift(1, 0);\n\t\tfor(j=0; j\":190, \"?\":191, \"{\":223\n\t});\n\tvar sylk_char_regex = new RegExp(\"\\u001BN(\" + keys(sylk_escapes).join(\"|\").replace(/\\|\\|\\|/, \"|\\\\||\").replace(/([?()+])/g,\"\\\\$1\") + \"|\\\\|)\", \"gm\");\n\tvar sylk_char_fn = function(_, $1){ var o = sylk_escapes[$1]; return typeof o == \"number\" ? _getansi(o) : o; };\n\tvar decode_sylk_char = function($$, $1, $2) { var newcc = (($1.charCodeAt(0) - 0x20)<<4) | ($2.charCodeAt(0) - 0x30); return newcc == 59 ? $$ : _getansi(newcc); };\n\tsylk_escapes[\"|\"] = 254;\n\t/* TODO: find an actual specification */\n\tfunction sylk_to_aoa(d, opts) {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return sylk_to_aoa_str(Base64.decode(d), opts);\n\t\t\tcase 'binary': return sylk_to_aoa_str(d, opts);\n\t\t\tcase 'buffer': return sylk_to_aoa_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array': return sylk_to_aoa_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\tfunction sylk_to_aoa_str(str, opts) {\n\t\tvar records = str.split(/[\\n\\r]+/), R = -1, C = -1, ri = 0, rj = 0, arr = [];\n\t\tvar formats = [];\n\t\tvar next_cell_format = null;\n\t\tvar sht = {}, rowinfo = [], colinfo = [], cw = [];\n\t\tvar Mval = 0, j;\n\t\tif(+opts.codepage >= 0) set_cp(+opts.codepage);\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tMval = 0;\n\t\t\tvar rstr=records[ri].trim().replace(/\\x1B([\\x20-\\x2F])([\\x30-\\x3F])/g, decode_sylk_char).replace(sylk_char_regex, sylk_char_fn);\n\t\t\tvar record=rstr.replace(/;;/g, \"\\u0000\").split(\";\").map(function(x) { return x.replace(/\\u0000/g, \";\"); });\n\t\t\tvar RT=record[0], val;\n\t\t\tif(rstr.length > 0) switch(RT) {\n\t\t\tcase 'ID': break; /* header */\n\t\t\tcase 'E': break; /* EOF */\n\t\t\tcase 'B': break; /* dimensions */\n\t\t\tcase 'O': break; /* options? */\n\t\t\tcase 'W': break; /* window? */\n\t\t\tcase 'P':\n\t\t\t\tif(record[1].charAt(0) == 'P')\n\t\t\t\t\tformats.push(rstr.slice(3).replace(/;;/g, \";\"));\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\tvar C_seen_K = false, C_seen_X = false, C_seen_S = false, C_seen_E = false, _R = -1, _C = -1;\n\t\t\tfor(rj=1; rj -1 && arr[_R][_C];\n\t\t\t\tif(!shrbase || !shrbase[1]) throw new Error(\"SYLK shared formula cannot find base\");\n\t\t\t\tarr[R][C][1] = shift_formula_str(shrbase[1], {r: R - _R, c: C - _C});\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'F':\n\t\t\tvar F_seen = 0;\n\t\t\tfor(rj=1; rj 0) { rowinfo[R].hpt = Mval; rowinfo[R].hpx = pt2px(Mval); }\n\t\t\t\t\telse if(Mval === 0) rowinfo[R].hidden = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: if(opts && opts.WTF) throw new Error(\"SYLK bad record \" + rstr);\n\t\t\t}\n\t\t\tif(F_seen < 1) next_cell_format = null; break;\n\t\t\tdefault: if(opts && opts.WTF) throw new Error(\"SYLK bad record \" + rstr);\n\t\t\t}\n\t\t}\n\t\tif(rowinfo.length > 0) sht['!rows'] = rowinfo;\n\t\tif(colinfo.length > 0) sht['!cols'] = colinfo;\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn [arr, sht];\n\t}\n\n\tfunction sylk_to_sheet(d, opts) {\n\t\tvar aoasht = sylk_to_aoa(d, opts);\n\t\tvar aoa = aoasht[0], ws = aoasht[1];\n\t\tvar o = aoa_to_sheet(aoa, opts);\n\t\tkeys(ws).forEach(function(k) { o[k] = ws[k]; });\n\t\treturn o;\n\t}\n\n\tfunction sylk_to_workbook(d, opts) { return sheet_to_workbook(sylk_to_sheet(d, opts), opts); }\n\n\tfunction write_ws_cell_sylk(cell, ws, R, C) {\n\t\tvar o = \"C;Y\" + (R+1) + \";X\" + (C+1) + \";K\";\n\t\tswitch(cell.t) {\n\t\t\tcase 'n':\n\t\t\t\to += (cell.v||0);\n\t\t\t\tif(cell.f && !cell.F) o += \";E\" + a1_to_rc(cell.f, {r:R, c:C}); break;\n\t\t\tcase 'b': o += cell.v ? \"TRUE\" : \"FALSE\"; break;\n\t\t\tcase 'e': o += cell.w || cell.v; break;\n\t\t\tcase 'd': o += '\"' + (cell.w || cell.v) + '\"'; break;\n\t\t\tcase 's': o += '\"' + cell.v.replace(/\"/g,\"\") + '\"'; break;\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction write_ws_cols_sylk(out, cols) {\n\t\tcols.forEach(function(col, i) {\n\t\t\tvar rec = \"F;W\" + (i+1) + \" \" + (i+1) + \" \";\n\t\t\tif(col.hidden) rec += \"0\";\n\t\t\telse {\n\t\t\t\tif(typeof col.width == 'number' && !col.wpx) col.wpx = width2px(col.width);\n\t\t\t\tif(typeof col.wpx == 'number' && !col.wch) col.wch = px2char(col.wpx);\n\t\t\t\tif(typeof col.wch == 'number') rec += Math.round(col.wch);\n\t\t\t}\n\t\t\tif(rec.charAt(rec.length - 1) != \" \") out.push(rec);\n\t\t});\n\t}\n\n\tfunction write_ws_rows_sylk(out, rows) {\n\t\trows.forEach(function(row, i) {\n\t\t\tvar rec = \"F;\";\n\t\t\tif(row.hidden) rec += \"M0;\";\n\t\t\telse if(row.hpt) rec += \"M\" + 20 * row.hpt + \";\";\n\t\t\telse if(row.hpx) rec += \"M\" + 20 * px2pt(row.hpx) + \";\";\n\t\t\tif(rec.length > 2) out.push(rec + \"R\" + (i+1));\n\t\t});\n\t}\n\n\tfunction sheet_to_sylk(ws, opts) {\n\t\tvar preamble = [\"ID;PWXL;N;E\"], o = [];\n\t\tvar r = safe_decode_range(ws['!ref']), cell;\n\t\tvar dense = Array.isArray(ws);\n\t\tvar RS = \"\\r\\n\";\n\n\t\tpreamble.push(\"P;PGeneral\");\n\t\tpreamble.push(\"F;P0;DG0G8;M255\");\n\t\tif(ws['!cols']) write_ws_cols_sylk(preamble, ws['!cols']);\n\t\tif(ws['!rows']) write_ws_rows_sylk(preamble, ws['!rows']);\n\n\t\tpreamble.push(\"B;Y\" + (r.e.r - r.s.r + 1) + \";X\" + (r.e.c - r.s.c + 1) + \";D\" + [r.s.c,r.s.r,r.e.c,r.e.r].join(\" \"));\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C]: ws[coord];\n\t\t\t\tif(!cell || (cell.v == null && (!cell.f || cell.F))) continue;\n\t\t\t\to.push(write_ws_cell_sylk(cell, ws, R, C, opts));\n\t\t\t}\n\t\t}\n\t\treturn preamble.join(RS) + RS + o.join(RS) + RS + \"E\" + RS;\n\t}\n\n\treturn {\n\t\tto_workbook: sylk_to_workbook,\n\t\tto_sheet: sylk_to_sheet,\n\t\tfrom_sheet: sheet_to_sylk\n\t};\n})();\n\nvar DIF = (function() {\n\tfunction dif_to_aoa(d, opts) {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return dif_to_aoa_str(Base64.decode(d), opts);\n\t\t\tcase 'binary': return dif_to_aoa_str(d, opts);\n\t\t\tcase 'buffer': return dif_to_aoa_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array': return dif_to_aoa_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\tfunction dif_to_aoa_str(str, opts) {\n\t\tvar records = str.split('\\n'), R = -1, C = -1, ri = 0, arr = [];\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tif (records[ri].trim() === 'BOT') { arr[++R] = []; C = 0; continue; }\n\t\t\tif (R < 0) continue;\n\t\t\tvar metadata = records[ri].trim().split(\",\");\n\t\t\tvar type = metadata[0], value = metadata[1];\n\t\t\t++ri;\n\t\t\tvar data = records[ri] || \"\";\n\t\t\twhile(((data.match(/[\"]/g)||[]).length & 1) && ri < records.length - 1) data += \"\\n\" + records[++ri];\n\t\t\tdata = data.trim();\n\t\t\tswitch (+type) {\n\t\t\t\tcase -1:\n\t\t\t\t\tif (data === 'BOT') { arr[++R] = []; C = 0; continue; }\n\t\t\t\t\telse if (data !== 'EOD') throw new Error(\"Unrecognized DIF special command \" + data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\tif(data === 'TRUE') arr[R][C] = true;\n\t\t\t\t\telse if(data === 'FALSE') arr[R][C] = false;\n\t\t\t\t\telse if(!isNaN(fuzzynum(value))) arr[R][C] = fuzzynum(value);\n\t\t\t\t\telse if(!isNaN(fuzzydate(value).getDate())) arr[R][C] = parseDate(value);\n\t\t\t\t\telse arr[R][C] = value;\n\t\t\t\t\t++C; break;\n\t\t\t\tcase 1:\n\t\t\t\t\tdata = data.slice(1,data.length-1);\n\t\t\t\t\tdata = data.replace(/\"\"/g, '\"');\n\t\t\t\t\tif(DIF_XL && data && data.match(/^=\".*\"$/)) data = data.slice(2, -1);\n\t\t\t\t\tarr[R][C++] = data !== '' ? data : null;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (data === 'EOD') break;\n\t\t}\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn arr;\n\t}\n\n\tfunction dif_to_sheet(str, opts) { return aoa_to_sheet(dif_to_aoa(str, opts), opts); }\n\tfunction dif_to_workbook(str, opts) { return sheet_to_workbook(dif_to_sheet(str, opts), opts); }\n\n\tvar sheet_to_dif = (function() {\n\t\tvar push_field = function pf(o, topic, v, n, s) {\n\t\t\to.push(topic);\n\t\t\to.push(v + \",\" + n);\n\t\t\to.push('\"' + s.replace(/\"/g,'\"\"') + '\"');\n\t\t};\n\t\tvar push_value = function po(o, type, v, s) {\n\t\t\to.push(type + \",\" + v);\n\t\t\to.push(type == 1 ? '\"' + s.replace(/\"/g,'\"\"') + '\"' : s);\n\t\t};\n\t\treturn function sheet_to_dif(ws) {\n\t\t\tvar o = [];\n\t\t\tvar r = safe_decode_range(ws['!ref']), cell;\n\t\t\tvar dense = Array.isArray(ws);\n\t\t\tpush_field(o, \"TABLE\", 0, 1, \"sheetjs\");\n\t\t\tpush_field(o, \"VECTORS\", 0, r.e.r - r.s.r + 1,\"\");\n\t\t\tpush_field(o, \"TUPLES\", 0, r.e.c - r.s.c + 1,\"\");\n\t\t\tpush_field(o, \"DATA\", 0, 0,\"\");\n\t\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\t\tpush_value(o, -1, 0, \"BOT\");\n\t\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\t\tif(!cell) { push_value(o, 1, 0, \"\"); continue;}\n\t\t\t\t\tswitch(cell.t) {\n\t\t\t\t\t\tcase 'n':\n\t\t\t\t\t\t\tvar val = DIF_XL ? cell.w : cell.v;\n\t\t\t\t\t\t\tif(!val && cell.v != null) val = cell.v;\n\t\t\t\t\t\t\tif(val == null) {\n\t\t\t\t\t\t\t\tif(DIF_XL && cell.f && !cell.F) push_value(o, 1, 0, \"=\" + cell.f);\n\t\t\t\t\t\t\t\telse push_value(o, 1, 0, \"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse push_value(o, 0, val, \"V\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t\tpush_value(o, 0, cell.v ? 1 : 0, cell.v ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 's':\n\t\t\t\t\t\t\tpush_value(o, 1, 0, (!DIF_XL || isNaN(cell.v)) ? cell.v : '=\"' + cell.v + '\"');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\tif(!cell.w) cell.w = SSF.format(cell.z || SSF._table[14], datenum(parseDate(cell.v)));\n\t\t\t\t\t\t\tif(DIF_XL) push_value(o, 0, cell.w, \"V\");\n\t\t\t\t\t\t\telse push_value(o, 1, 0, cell.w);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: push_value(o, 1, 0, \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpush_value(o, -1, 0, \"EOD\");\n\t\t\tvar RS = \"\\r\\n\";\n\t\t\tvar oo = o.join(RS);\n\t\t\t//while((oo.length & 0x7F) != 0) oo += \"\\0\";\n\t\t\treturn oo;\n\t\t};\n\t})();\n\treturn {\n\t\tto_workbook: dif_to_workbook,\n\t\tto_sheet: dif_to_sheet,\n\t\tfrom_sheet: sheet_to_dif\n\t};\n})();\n\nvar ETH = (function() {\n\tfunction decode(s) { return s.replace(/\\\\b/g,\"\\\\\").replace(/\\\\c/g,\":\").replace(/\\\\n/g,\"\\n\"); }\n\tfunction encode(s) { return s.replace(/\\\\/g, \"\\\\b\").replace(/:/g, \"\\\\c\").replace(/\\n/g,\"\\\\n\"); }\n\n\tfunction eth_to_aoa(str, opts) {\n\t\tvar records = str.split('\\n'), R = -1, C = -1, ri = 0, arr = [];\n\t\tfor (; ri !== records.length; ++ri) {\n\t\t\tvar record = records[ri].trim().split(\":\");\n\t\t\tif(record[0] !== 'cell') continue;\n\t\t\tvar addr = decode_cell(record[1]);\n\t\t\tif(arr.length <= addr.r) for(R = arr.length; R <= addr.r; ++R) if(!arr[R]) arr[R] = [];\n\t\t\tR = addr.r; C = addr.c;\n\t\t\tswitch(record[2]) {\n\t\t\t\tcase 't': arr[R][C] = decode(record[3]); break;\n\t\t\t\tcase 'v': arr[R][C] = +record[3]; break;\n\t\t\t\tcase 'vtf': var _f = record[record.length - 1];\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'vtc':\n\t\t\t\t\tswitch(record[3]) {\n\t\t\t\t\t\tcase 'nl': arr[R][C] = +record[4] ? true : false; break;\n\t\t\t\t\t\tdefault: arr[R][C] = +record[4]; break;\n\t\t\t\t\t}\n\t\t\t\t\tif(record[2] == 'vtf') arr[R][C] = [arr[R][C], _f];\n\t\t\t}\n\t\t}\n\t\tif(opts && opts.sheetRows) arr = arr.slice(0, opts.sheetRows);\n\t\treturn arr;\n\t}\n\n\tfunction eth_to_sheet(d, opts) { return aoa_to_sheet(eth_to_aoa(d, opts), opts); }\n\tfunction eth_to_workbook(d, opts) { return sheet_to_workbook(eth_to_sheet(d, opts), opts); }\n\n\tvar header = [\n\t\t\"socialcalc:version:1.5\",\n\t\t\"MIME-Version: 1.0\",\n\t\t\"Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave\"\n\t].join(\"\\n\");\n\n\tvar sep = [\n\t\t\"--SocialCalcSpreadsheetControlSave\",\n\t\t\"Content-type: text/plain; charset=UTF-8\"\n\t].join(\"\\n\") + \"\\n\";\n\n\t/* TODO: the other parts */\n\tvar meta = [\n\t\t\"# SocialCalc Spreadsheet Control Save\",\n\t\t\"part:sheet\"\n\t].join(\"\\n\");\n\n\tvar end = \"--SocialCalcSpreadsheetControlSave--\";\n\n\tfunction sheet_to_eth_data(ws) {\n\t\tif(!ws || !ws['!ref']) return \"\";\n\t\tvar o = [], oo = [], cell, coord = \"\";\n\t\tvar r = decode_range(ws['!ref']);\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tcoord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\tif(!cell || cell.v == null || cell.t === 'z') continue;\n\t\t\t\too = [\"cell\", coord, 't'];\n\t\t\t\tswitch(cell.t) {\n\t\t\t\t\tcase 's': case 'str': oo.push(encode(cell.v)); break;\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\tif(!cell.f) { oo[2]='v'; oo[3]=cell.v; }\n\t\t\t\t\t\telse { oo[2]='vtf'; oo[3]='n'; oo[4]=cell.v; oo[5]=encode(cell.f); }\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\too[2] = 'vt'+(cell.f?'f':'c'); oo[3]='nl'; oo[4]=cell.v?\"1\":\"0\";\n\t\t\t\t\t\too[5] = encode(cell.f||(cell.v?'TRUE':'FALSE'));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tvar t = datenum(parseDate(cell.v));\n\t\t\t\t\t\too[2] = 'vtc'; oo[3] = 'nd'; oo[4] = \"\"+t;\n\t\t\t\t\t\too[5] = cell.w || SSF.format(cell.z || SSF._table[14], t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'e': continue;\n\t\t\t\t}\n\t\t\t\to.push(oo.join(\":\"));\n\t\t\t}\n\t\t}\n\t\to.push(\"sheet:c:\" + (r.e.c-r.s.c+1) + \":r:\" + (r.e.r-r.s.r+1) + \":tvf:1\");\n\t\to.push(\"valueformat:1:text-wiki\");\n\t\t//o.push(\"copiedfrom:\" + ws['!ref']); // clipboard only\n\t\treturn o.join(\"\\n\");\n\t}\n\n\tfunction sheet_to_eth(ws) {\n\t\treturn [header, sep, meta, sep, sheet_to_eth_data(ws), end].join(\"\\n\");\n\t\t// return [\"version:1.5\", sheet_to_eth_data(ws)].join(\"\\n\"); // clipboard form\n\t}\n\n\treturn {\n\t\tto_workbook: eth_to_workbook,\n\t\tto_sheet: eth_to_sheet,\n\t\tfrom_sheet: sheet_to_eth\n\t};\n})();\n\nvar PRN = (function() {\n\tfunction set_text_arr(data, arr, R, C, o) {\n\t\tif(o.raw) arr[R][C] = data;\n\t\telse if(data === \"\"){/* empty */}\n\t\telse if(data === 'TRUE') arr[R][C] = true;\n\t\telse if(data === 'FALSE') arr[R][C] = false;\n\t\telse if(!isNaN(fuzzynum(data))) arr[R][C] = fuzzynum(data);\n\t\telse if(!isNaN(fuzzydate(data).getDate())) arr[R][C] = parseDate(data);\n\t\telse arr[R][C] = data;\n\t}\n\n\tfunction prn_to_aoa_str(f, opts) {\n\t\tvar o = opts || {};\n\t\tvar arr = ([]);\n\t\tif(!f || f.length === 0) return arr;\n\t\tvar lines = f.split(/[\\r\\n]/);\n\t\tvar L = lines.length - 1;\n\t\twhile(L >= 0 && lines[L].length === 0) --L;\n\t\tvar start = 10, idx = 0;\n\t\tvar R = 0;\n\t\tfor(; R <= L; ++R) {\n\t\t\tidx = lines[R].indexOf(\" \");\n\t\t\tif(idx == -1) idx = lines[R].length; else idx++;\n\t\t\tstart = Math.max(start, idx);\n\t\t}\n\t\tfor(R = 0; R <= L; ++R) {\n\t\t\tarr[R] = [];\n\t\t\t/* TODO: confirm that widths are always 10 */\n\t\t\tvar C = 0;\n\t\t\tset_text_arr(lines[R].slice(0, start).trim(), arr, R, C, o);\n\t\t\tfor(C = 1; C <= (lines[R].length - start)/10 + 1; ++C)\n\t\t\t\tset_text_arr(lines[R].slice(start+(C-1)*10,start+C*10).trim(),arr,R,C,o);\n\t\t}\n\t\tif(o.sheetRows) arr = arr.slice(0, o.sheetRows);\n\t\treturn arr;\n\t}\n\n\t// List of accepted CSV separators\n\tvar guess_seps = {\n0x2C: ',',\n0x09: \"\\t\",\n0x3B: ';',\n0x7C: '|'\n\t};\n\n\t// CSV separator weights to be used in case of equal numbers\n\tvar guess_sep_weights = {\n0x2C: 3,\n0x09: 2,\n0x3B: 1,\n0x7C: 0\n\t};\n\n\tfunction guess_sep(str) {\n\t\tvar cnt = {}, instr = false, end = 0, cc = 0;\n\t\tfor(;end < str.length;++end) {\n\t\t\tif((cc=str.charCodeAt(end)) == 0x22) instr = !instr;\n\t\t\telse if(!instr && cc in guess_seps) cnt[cc] = (cnt[cc]||0)+1;\n\t\t}\n\n\t\tcc = [];\n\t\tfor(end in cnt) if ( Object.prototype.hasOwnProperty.call(cnt, end) ) {\n\t\t\tcc.push([ cnt[end], end ]);\n\t\t}\n\n\t\tif ( !cc.length ) {\n\t\t\tcnt = guess_sep_weights;\n\t\t\tfor(end in cnt) if ( Object.prototype.hasOwnProperty.call(cnt, end) ) {\n\t\t\t\tcc.push([ cnt[end], end ]);\n\t\t\t}\n\t\t}\n\n\t\tcc.sort(function(a, b) { return a[0] - b[0] || guess_sep_weights[a[1]] - guess_sep_weights[b[1]]; });\n\n\t\treturn guess_seps[cc.pop()[1]] || 0x2C;\n\t}\n\n\tfunction dsv_to_sheet_str(str, opts) {\n\t\tvar o = opts || {};\n\t\tvar sep = \"\";\n\t\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\t\tvar ws = o.dense ? ([]) : ({});\n\t\tvar range = ({s: {c:0, r:0}, e: {c:0, r:0}});\n\n\t\tif(str.slice(0,4) == \"sep=\") {\n\t\t\t// If the line ends in \\r\\n\n\t\t\tif(str.charCodeAt(5) == 13 && str.charCodeAt(6) == 10 ) {\n\t\t\t\tsep = str.charAt(4); str = str.slice(7);\n\t\t\t}\n\t\t\t// If line ends in \\r OR \\n\n\t\t\telse if(str.charCodeAt(5) == 13 || str.charCodeAt(5) == 10 ) {\n\t\t\t\tsep = str.charAt(4); str = str.slice(6);\n\t\t\t}\n\t\t\telse sep = guess_sep(str.slice(0,1024));\n\t\t}\n\t\telse if(o && o.FS) sep = o.FS;\n\t\telse sep = guess_sep(str.slice(0,1024));\n\t\tvar R = 0, C = 0, v = 0;\n\t\tvar start = 0, end = 0, sepcc = sep.charCodeAt(0), instr = false, cc=0, startcc=str.charCodeAt(0);\n\t\tstr = str.replace(/\\r\\n/mg, \"\\n\");\n\t\tvar _re = o.dateNF != null ? dateNF_regex(o.dateNF) : null;\n\t\tfunction finish_cell() {\n\t\t\tvar s = str.slice(start, end);\n\t\t\tvar cell = ({});\n\t\t\tif(s.charAt(0) == '\"' && s.charAt(s.length - 1) == '\"') s = s.slice(1,-1).replace(/\"\"/g,'\"');\n\t\t\tif(s.length === 0) cell.t = 'z';\n\t\t\telse if(o.raw) { cell.t = 's'; cell.v = s; }\n\t\t\telse if(s.trim().length === 0) { cell.t = 's'; cell.v = s; }\n\t\t\telse if(s.charCodeAt(0) == 0x3D) {\n\t\t\t\tif(s.charCodeAt(1) == 0x22 && s.charCodeAt(s.length - 1) == 0x22) { cell.t = 's'; cell.v = s.slice(2,-1).replace(/\"\"/g,'\"'); }\n\t\t\t\telse if(fuzzyfmla(s)) { cell.t = 'n'; cell.f = s.slice(1); }\n\t\t\t\telse { cell.t = 's'; cell.v = s; } }\n\t\t\telse if(s == \"TRUE\") { cell.t = 'b'; cell.v = true; }\n\t\t\telse if(s == \"FALSE\") { cell.t = 'b'; cell.v = false; }\n\t\t\telse if(!isNaN(v = fuzzynum(s))) { cell.t = 'n'; if(o.cellText !== false) cell.w = s; cell.v = v; }\n\t\t\telse if(!isNaN(fuzzydate(s).getDate()) || _re && s.match(_re)) {\n\t\t\t\tcell.z = o.dateNF || SSF._table[14];\n\t\t\t\tvar k = 0;\n\t\t\t\tif(_re && s.match(_re)){ s=dateNF_fix(s, o.dateNF, (s.match(_re)||[])); k=1; }\n\t\t\t\tif(o.cellDates) { cell.t = 'd'; cell.v = parseDate(s, k); }\n\t\t\t\telse { cell.t = 'n'; cell.v = datenum(parseDate(s, k)); }\n\t\t\t\tif(o.cellText !== false) cell.w = SSF.format(cell.z, cell.v instanceof Date ? datenum(cell.v):cell.v);\n\t\t\t\tif(!o.cellNF) delete cell.z;\n\t\t\t} else {\n\t\t\t\tcell.t = 's';\n\t\t\t\tcell.v = s;\n\t\t\t}\n\t\t\tif(cell.t == 'z'){}\n\t\t\telse if(o.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = cell; }\n\t\t\telse ws[encode_cell({c:C,r:R})] = cell;\n\t\t\tstart = end+1; startcc = str.charCodeAt(start);\n\t\t\tif(range.e.c < C) range.e.c = C;\n\t\t\tif(range.e.r < R) range.e.r = R;\n\t\t\tif(cc == sepcc) ++C; else { C = 0; ++R; if(o.sheetRows && o.sheetRows <= R) return true; }\n\t\t}\n\t\touter: for(;end < str.length;++end) switch((cc=str.charCodeAt(end))) {\n\t\t\tcase 0x22: if(startcc === 0x22) instr = !instr; break;\n\t\t\tcase sepcc: case 0x0a: case 0x0d: if(!instr && finish_cell()) break outer; break;\n\t\t\tdefault: break;\n\t\t}\n\t\tif(end - start > 0) finish_cell();\n\n\t\tws['!ref'] = encode_range(range);\n\t\treturn ws;\n\t}\n\n\tfunction prn_to_sheet_str(str, opts) {\n\t\tif(!(opts && opts.PRN)) return dsv_to_sheet_str(str, opts);\n\t\tif(opts.FS) return dsv_to_sheet_str(str, opts);\n\t\tif(str.slice(0,4) == \"sep=\") return dsv_to_sheet_str(str, opts);\n\t\tif(str.indexOf(\"\\t\") >= 0 || str.indexOf(\",\") >= 0 || str.indexOf(\";\") >= 0) return dsv_to_sheet_str(str, opts);\n\t\treturn aoa_to_sheet(prn_to_aoa_str(str, opts), opts);\n\t}\n\n\tfunction prn_to_sheet(d, opts) {\n\t\tvar str = \"\", bytes = opts.type == 'string' ? [0,0,0,0] : firstbyte(d, opts);\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': str = Base64.decode(d); break;\n\t\t\tcase 'binary': str = d; break;\n\t\t\tcase 'buffer':\n\t\t\t\tif(opts.codepage == 65001) str = d.toString('utf8'); // TODO: test if buf\n\t\t\t\telse if(opts.codepage && typeof cptable !== 'undefined') str = cptable.utils.decode(opts.codepage, d);\n\t\t\t\telse str = has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d);\n\t\t\t\tbreak;\n\t\t\tcase 'array': str = cc2str(d); break;\n\t\t\tcase 'string': str = d; break;\n\t\t\tdefault: throw new Error(\"Unrecognized type \" + opts.type);\n\t\t}\n\t\tif(bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) str = utf8read(str.slice(3));\n\t\telse if(opts.type != 'string' && opts.codepage == 65001) str = utf8read(str);\n\t\telse if((opts.type == 'binary') && typeof cptable !== 'undefined' && opts.codepage) str = cptable.utils.decode(opts.codepage, cptable.utils.encode(28591,str));\n\t\tif(str.slice(0,19) == \"socialcalc:version:\") return ETH.to_sheet(opts.type == 'string' ? str : utf8read(str), opts);\n\t\treturn prn_to_sheet_str(str, opts);\n\t}\n\n\tfunction prn_to_workbook(d, opts) { return sheet_to_workbook(prn_to_sheet(d, opts), opts); }\n\n\tfunction sheet_to_prn(ws) {\n\t\tvar o = [];\n\t\tvar r = safe_decode_range(ws['!ref']), cell;\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\tvar oo = [];\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t\tif(!cell || cell.v == null) { oo.push(\" \"); continue; }\n\t\t\t\tvar w = (cell.w || (format_cell(cell), cell.w) || \"\").slice(0,10);\n\t\t\t\twhile(w.length < 10) w += \" \";\n\t\t\t\too.push(w + (C === 0 ? \" \" : \"\"));\n\t\t\t}\n\t\t\to.push(oo.join(\"\"));\n\t\t}\n\t\treturn o.join(\"\\n\");\n\t}\n\n\treturn {\n\t\tto_workbook: prn_to_workbook,\n\t\tto_sheet: prn_to_sheet,\n\t\tfrom_sheet: sheet_to_prn\n\t};\n})();\n\n/* Excel defaults to SYLK but warns if data is not valid */\nfunction read_wb_ID(d, opts) {\n\tvar o = opts || {}, OLD_WTF = !!o.WTF; o.WTF = true;\n\ttry {\n\t\tvar out = SYLK.to_workbook(d, o);\n\t\to.WTF = OLD_WTF;\n\t\treturn out;\n\t} catch(e) {\n\t\to.WTF = OLD_WTF;\n\t\tif(!e.message.match(/SYLK bad record ID/) && OLD_WTF) throw e;\n\t\treturn PRN.to_workbook(d, opts);\n\t}\n}\n\nvar WK_ = (function() {\n\tfunction lotushopper(data, cb, opts) {\n\t\tif(!data) return;\n\t\tprep_blob(data, data.l || 0);\n\t\tvar Enum = opts.Enum || WK1Enum;\n\t\twhile(data.l < data.length) {\n\t\t\tvar RT = data.read_shift(2);\n\t\t\tvar R = Enum[RT] || Enum[0xFFFF];\n\t\t\tvar length = data.read_shift(2);\n\t\t\tvar tgt = data.l + length;\n\t\t\tvar d = R.f && R.f(data, length, opts);\n\t\t\tdata.l = tgt;\n\t\t\tif(cb(d, R, RT)) return;\n\t\t}\n\t}\n\n\tfunction lotus_to_workbook(d, opts) {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return lotus_to_workbook_buf(s2a(Base64.decode(d)), opts);\n\t\t\tcase 'binary': return lotus_to_workbook_buf(s2a(d), opts);\n\t\t\tcase 'buffer':\n\t\t\tcase 'array': return lotus_to_workbook_buf(d, opts);\n\t\t}\n\t\tthrow \"Unsupported type \" + opts.type;\n\t}\n\n\tfunction lotus_to_workbook_buf(d, opts) {\n\t\tif(!d) return d;\n\t\tvar o = opts || {};\n\t\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\t\tvar s = ((o.dense ? [] : {})), n = \"Sheet1\", next_n = \"\", sidx = 0;\n\t\tvar sheets = {}, snames = [], realnames = [];\n\n\t\tvar refguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\tvar sheetRows = o.sheetRows || 0;\n\n\t\tif(d[2] == 0x00) {\n\t\t\tif(d[3] == 0x08 || d[3] == 0x09) {\n\t\t\t\tif(d.length >= 16 && d[14] == 0x05 && d[15] === 0x6c) throw new Error(\"Unsupported Works 3 for Mac file\");\n\t\t\t}\n\t\t}\n\n\t\tif(d[2] == 0x02) {\n\t\t\to.Enum = WK1Enum;\n\t\t\tlotushopper(d, function(val, R, RT) { switch(RT) {\n\t\t\t\tcase 0x00: /* BOF */\n\t\t\t\t\to.vers = val;\n\t\t\t\t\tif(val >= 0x1000) o.qpro = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x06: refguess = val; break; /* RANGE */\n\t\t\t\tcase 0xCC: if(val) next_n = val; break; /* SHEETNAMECS */\n\t\t\t\tcase 0xDE: next_n = val; break; /* SHEETNAMELP */\n\t\t\t\tcase 0x0F: /* LABEL */\n\t\t\t\tcase 0x33: /* STRING */\n\t\t\t\t\tif(!o.qpro) val[1].v = val[1].v.slice(1);\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 0x0D: /* INTEGER */\n\t\t\t\tcase 0x0E: /* NUMBER */\n\t\t\t\tcase 0x10: /* FORMULA */\n\t\t\t\t\t/* TODO: actual translation of the format code */\n\t\t\t\t\tif(RT == 0x0E && (val[2] & 0x70) == 0x70 && (val[2] & 0x0F) > 1 && (val[2] & 0x0F) < 15) {\n\t\t\t\t\t\tval[1].z = o.dateNF || SSF._table[14];\n\t\t\t\t\t\tif(o.cellDates) { val[1].t = 'd'; val[1].v = numdate(val[1].v); }\n\t\t\t\t\t}\n\n\t\t\t\t\tif(o.qpro) {\n\t\t\t\t\t\tif(val[3] > sidx) {\n\t\t\t\t\t\t\ts[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t\t\tsheets[n] = s;\n\t\t\t\t\t\t\tsnames.push(n);\n\t\t\t\t\t\t\ts = (o.dense ? [] : {});\n\t\t\t\t\t\t\trefguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\t\t\t\t\t\tsidx = val[3]; n = next_n || \"Sheet\" + (sidx + 1); next_n = \"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar tmpcell = o.dense ? (s[val[0].r]||[])[val[0].c] : s[encode_cell(val[0])];\n\t\t\t\t\tif(tmpcell) {\n\t\t\t\t\t\ttmpcell.t = val[1].t; tmpcell.v = val[1].v;\n\t\t\t\t\t\tif(val[1].z != null) tmpcell.z = val[1].z;\n\t\t\t\t\t\tif(val[1].f != null) tmpcell.f = val[1].f;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(o.dense) {\n\t\t\t\t\t\tif(!s[val[0].r]) s[val[0].r] = [];\n\t\t\t\t\t\ts[val[0].r][val[0].c] = val[1];\n\t\t\t\t\t} else s[encode_cell(val[0])] = val[1];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}}, o);\n\t\t} else if(d[2] == 0x1A || d[2] == 0x0E) {\n\t\t\to.Enum = WK3Enum;\n\t\t\tif(d[2] == 0x0E) { o.qpro = true; d.l = 0; }\n\t\t\tlotushopper(d, function(val, R, RT) { switch(RT) {\n\t\t\t\tcase 0xCC: n = val; break; /* SHEETNAMECS */\n\t\t\t\tcase 0x16: /* LABEL16 */\n\t\t\t\t\tval[1].v = val[1].v.slice(1);\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 0x17: /* NUMBER17 */\n\t\t\t\tcase 0x18: /* NUMBER18 */\n\t\t\t\tcase 0x19: /* FORMULA19 */\n\t\t\t\tcase 0x25: /* NUMBER25 */\n\t\t\t\tcase 0x27: /* NUMBER27 */\n\t\t\t\tcase 0x28: /* FORMULA28 */\n\t\t\t\t\tif(val[3] > sidx) {\n\t\t\t\t\t\ts[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t\tsheets[n] = s;\n\t\t\t\t\t\tsnames.push(n);\n\t\t\t\t\t\ts = (o.dense ? [] : {});\n\t\t\t\t\t\trefguess = {s: {r:0, c:0}, e: {r:0, c:0} };\n\t\t\t\t\t\tsidx = val[3]; n = \"Sheet\" + (sidx + 1);\n\t\t\t\t\t}\n\t\t\t\t\tif(sheetRows > 0 && val[0].r >= sheetRows) break;\n\t\t\t\t\tif(o.dense) {\n\t\t\t\t\t\tif(!s[val[0].r]) s[val[0].r] = [];\n\t\t\t\t\t\ts[val[0].r][val[0].c] = val[1];\n\t\t\t\t\t} else s[encode_cell(val[0])] = val[1];\n\t\t\t\t\tif(refguess.e.c < val[0].c) refguess.e.c = val[0].c;\n\t\t\t\t\tif(refguess.e.r < val[0].r) refguess.e.r = val[0].r;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x1B: /* XFORMAT */\n\t\t\t\t\tif(val[0x36b0]) realnames[val[0x36b0][0]] = val[0x36b0][1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0601: /* SHEETINFOQP */\n\t\t\t\t\trealnames[val[0]] = val[1]; if(val[0] == sidx) n = val[1]; break;\n\t\t\t\tdefault: break;\n\t\t\t}}, o);\n\t\t} else throw new Error(\"Unrecognized LOTUS BOF \" + d[2]);\n\t\ts[\"!ref\"] = encode_range(refguess);\n\t\tsheets[next_n || n] = s;\n\t\tsnames.push(next_n || n);\n\t\tif(!realnames.length) return { SheetNames: snames, Sheets: sheets };\n\t\tvar osheets = {}, rnames = [];\n\t\t/* TODO: verify no collisions */\n\t\tfor(var i = 0; i < realnames.length; ++i) if(sheets[snames[i]]) {\n\t\t\trnames.push(realnames[i] || snames[i]);\n\t\t\tosheets[realnames[i]] = sheets[realnames[i]] || sheets[snames[i]];\n\t\t} else {\n\t\t\trnames.push(realnames[i]);\n\t\t\tosheets[realnames[i]] = ({ \"!ref\": \"A1\" });\n\t\t}\n\t\treturn { SheetNames: rnames, Sheets: osheets };\n\t}\n\n\tfunction sheet_to_wk1(ws, opts) {\n\t\tvar o = opts || {};\n\t\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\t\tif(o.type == \"string\") throw new Error(\"Cannot write WK1 to JS string\");\n\t\tvar ba = buf_array();\n\t\tvar range = safe_decode_range(ws[\"!ref\"]);\n\t\tvar dense = Array.isArray(ws);\n\t\tvar cols = [];\n\n\t\twrite_biff_rec(ba, 0x00, write_BOF_WK1(0x0406));\n\t\twrite_biff_rec(ba, 0x06, write_RANGE(range));\n\t\tvar max_R = Math.min(range.e.r, 8191);\n\t\tfor(var R = range.s.r; R <= max_R; ++R) {\n\t\t\tvar rr = encode_row(R);\n\t\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\t\tvar ref = cols[C] + rr;\n\t\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\t\tif(!cell || cell.t == \"z\") continue;\n\t\t\t\t/* TODO: formula records */\n\t\t\t\tif(cell.t == \"n\") {\n\t\t\t\t\tif((cell.v|0)==cell.v && cell.v >= -32768 && cell.v <= 32767) write_biff_rec(ba, 0x0d, write_INTEGER(R, C, cell.v));\n\t\t\t\t\telse write_biff_rec(ba, 0x0e, write_NUMBER(R, C, cell.v));\n\t\t\t\t} else {\n\t\t\t\t\tvar str = format_cell(cell);\n\t\t\t\t\twrite_biff_rec(ba, 0x0F, write_LABEL(R, C, str.slice(0, 239)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twrite_biff_rec(ba, 0x01);\n\t\treturn ba.end();\n\t}\n\n\tfunction book_to_wk3(wb, opts) {\n\t\tvar o = opts || {};\n\t\tif(+o.codepage >= 0) set_cp(+o.codepage);\n\t\tif(o.type == \"string\") throw new Error(\"Cannot write WK3 to JS string\");\n\t\tvar ba = buf_array();\n\n\t\twrite_biff_rec(ba, 0x00, write_BOF_WK3(wb));\n\n\t\tfor(var i = 0, cnt = 0; i < wb.SheetNames.length; ++i) if((wb.Sheets[wb.SheetNames[i]] || {})[\"!ref\"]) write_biff_rec(ba, 0x1b, write_XFORMAT_SHEETNAME(wb.SheetNames[i], cnt++));\n\n\t\tvar wsidx = 0;\n\t\tfor(i = 0; i < wb.SheetNames.length; ++i) {\n\t\t\tvar ws = wb.Sheets[wb.SheetNames[i]];\n\t\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\t\tvar range = safe_decode_range(ws[\"!ref\"]);\n\t\t\tvar dense = Array.isArray(ws);\n\t\t\tvar cols = [];\n\t\t\tvar max_R = Math.min(range.e.r, 8191);\n\t\t\tfor(var R = range.s.r; R <= max_R; ++R) {\n\t\t\t\tvar rr = encode_row(R);\n\t\t\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\t\t\tvar ref = cols[C] + rr;\n\t\t\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\t\t\tif(!cell || cell.t == \"z\") continue;\n\t\t\t\t\t/* TODO: FORMULA19 NUMBER18 records */\n\t\t\t\t\tif(cell.t == \"n\") {\n\t\t\t\t\t\twrite_biff_rec(ba, 0x17, write_NUMBER_17(R, C, wsidx, cell.v));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar str = format_cell(cell);\n\t\t\t\t\t\t/* TODO: max len? */\n\t\t\t\t\t\twrite_biff_rec(ba, 0x16, write_LABEL_16(R, C, wsidx, str.slice(0, 239)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t++wsidx;\n\t\t}\n\n\t\twrite_biff_rec(ba, 0x01);\n\t\treturn ba.end();\n\t}\n\n\n\tfunction write_BOF_WK1(v) {\n\t\tvar out = new_buf(2);\n\t\tout.write_shift(2, v);\n\t\treturn out;\n\t}\n\n\tfunction write_BOF_WK3(wb) {\n\t\tvar out = new_buf(26);\n\t\tout.write_shift(2, 0x1000);\n\t\tout.write_shift(2, 0x0004);\n\t\tout.write_shift(4, 0x0000);\n\t\tvar rows = 0, cols = 0, wscnt = 0;\n\t\tfor(var i = 0; i < wb.SheetNames.length; ++i) {\n\t\t\tvar name = wb.SheetNames[i];\n\t\t\tvar ws = wb.Sheets[name];\n\t\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\t\t++wscnt;\n\t\t\tvar range = decode_range(ws[\"!ref\"]);\n\t\t\tif(rows < range.e.r) rows = range.e.r;\n\t\t\tif(cols < range.e.c) cols = range.e.c;\n\t\t}\n\t\tif(rows > 8191) rows = 8191;\n\t\tout.write_shift(2, rows);\n\t\tout.write_shift(1, wscnt);\n\t\tout.write_shift(1, cols);\n\t\tout.write_shift(2, 0x00);\n\t\tout.write_shift(2, 0x00);\n\t\tout.write_shift(1, 0x01);\n\t\tout.write_shift(1, 0x02);\n\t\tout.write_shift(4, 0);\n\t\tout.write_shift(4, 0);\n\t\treturn out;\n\t}\n\n\tfunction parse_RANGE(blob, length, opts) {\n\t\tvar o = {s:{c:0,r:0},e:{c:0,r:0}};\n\t\tif(length == 8 && opts.qpro) {\n\t\t\to.s.c = blob.read_shift(1);\n\t\t\tblob.l++;\n\t\t\to.s.r = blob.read_shift(2);\n\t\t\to.e.c = blob.read_shift(1);\n\t\t\tblob.l++;\n\t\t\to.e.r = blob.read_shift(2);\n\t\t\treturn o;\n\t\t}\n\t\to.s.c = blob.read_shift(2);\n\t\to.s.r = blob.read_shift(2);\n\t\tif(length == 12 && opts.qpro) blob.l += 2;\n\t\to.e.c = blob.read_shift(2);\n\t\to.e.r = blob.read_shift(2);\n\t\tif(length == 12 && opts.qpro) blob.l += 2;\n\t\tif(o.s.c == 0xFFFF) o.s.c = o.e.c = o.s.r = o.e.r = 0;\n\t\treturn o;\n\t}\n\tfunction write_RANGE(range) {\n\t\tvar out = new_buf(8);\n\t\tout.write_shift(2, range.s.c);\n\t\tout.write_shift(2, range.s.r);\n\t\tout.write_shift(2, range.e.c);\n\t\tout.write_shift(2, range.e.r);\n\t\treturn out;\n\t}\n\n\tfunction parse_cell(blob, length, opts) {\n\t\tvar o = [{c:0,r:0}, {t:'n',v:0}, 0, 0];\n\t\tif(opts.qpro && opts.vers != 0x5120) {\n\t\t\to[0].c = blob.read_shift(1);\n\t\t\to[3] = blob.read_shift(1);\n\t\t\to[0].r = blob.read_shift(2);\n\t\t\tblob.l+=2;\n\t\t} else {\n\t\t\to[2] = blob.read_shift(1);\n\t\t\to[0].c = blob.read_shift(2); o[0].r = blob.read_shift(2);\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction parse_LABEL(blob, length, opts) {\n\t\tvar tgt = blob.l + length;\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].t = 's';\n\t\tif(opts.vers == 0x5120) {\n\t\t\tblob.l++;\n\t\t\tvar len = blob.read_shift(1);\n\t\t\to[1].v = blob.read_shift(len, 'utf8');\n\t\t\treturn o;\n\t\t}\n\t\tif(opts.qpro) blob.l++;\n\t\to[1].v = blob.read_shift(tgt - blob.l, 'cstr');\n\t\treturn o;\n\t}\n\tfunction write_LABEL(R, C, s) {\n\t\t/* TODO: encoding */\n\t\tvar o = new_buf(7 + s.length);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, 0x27); // ??\n\t\tfor(var i = 0; i < o.length; ++i) {\n\t\t\tvar cc = s.charCodeAt(i);\n\t\t\to.write_shift(1, cc >= 0x80 ? 0x5F : cc);\n\t\t}\n\t\to.write_shift(1, 0);\n\t\treturn o;\n\t}\n\n\tfunction parse_INTEGER(blob, length, opts) {\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].v = blob.read_shift(2, 'i');\n\t\treturn o;\n\t}\n\tfunction write_INTEGER(R, C, v) {\n\t\tvar o = new_buf(7);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(2, v, 'i');\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER(blob, length, opts) {\n\t\tvar o = parse_cell(blob, length, opts);\n\t\to[1].v = blob.read_shift(8, 'f');\n\t\treturn o;\n\t}\n\tfunction write_NUMBER(R, C, v) {\n\t\tvar o = new_buf(13);\n\t\to.write_shift(1, 0xFF);\n\t\to.write_shift(2, C);\n\t\to.write_shift(2, R);\n\t\to.write_shift(8, v, 'f');\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA(blob, length, opts) {\n\t\tvar tgt = blob.l + length;\n\t\tvar o = parse_cell(blob, length, opts);\n\t\t/* TODO: formula */\n\t\to[1].v = blob.read_shift(8, 'f');\n\t\tif(opts.qpro) blob.l = tgt;\n\t\telse {\n\t\t\tvar flen = blob.read_shift(2);\n\t\t\twk1_fmla_to_csf(blob.slice(blob.l, blob.l + flen), o);\n\t\t\tblob.l += flen;\n\t\t}\n\t\treturn o;\n\t}\n\n\tfunction wk1_parse_rc(B, V, col) {\n\t\tvar rel = V & 0x8000;\n\t\tV &= ~0x8000;\n\t\tV = (rel ? B : 0) + ((V >= 0x2000) ? V - 0x4000 : V);\n\t\treturn (rel ? \"\" : \"$\") + (col ? encode_col(V) : encode_row(V));\n\t}\n\tvar oprec = [\n\t\t8, 8, 8, 8, 8, 8, 8, 8, 6, 4, 4, 5, 5, 7, 3, 3,\n\t\t3, 3, 3, 3, 1, 1, 2, 6, 8, 8, 8, 8, 8, 8, 8, 8\n\t];\n\t/* TODO: flesh out */\n\tvar FuncTab = {\n\t\t0x33: [\"FALSE\", 0],\n\t\t0x34: [\"TRUE\", 0],\n\t\t0x46: [\"LEN\", 1],\n\t\t0x50: [\"SUM\", 69],\n\t\t0x51: [\"AVERAGEA\", 69],\n\t\t0x52: [\"COUNTA\", 69],\n\t\t0x53: [\"MINA\", 69],\n\t\t0x54: [\"MAXA\", 69],\n\t\t0x6F: [\"T\", 1]\n\t};\n\tvar BinOpTab = [\n\t\t \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\",\n\t\t \"\", \"+\", \"-\", \"*\", \"/\", \"^\", \"=\", \"<>\",\n\t\t\"<=\", \">=\", \"<\", \">\", \"\", \"\", \"\", \"\",\n\t\t \"&\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"\n\t];\n\n\tfunction wk1_fmla_to_csf(blob, o) {\n\t\tprep_blob(blob, 0);\n\t\tvar out = [], argc = 0, R = \"\", C = \"\", argL = \"\", argR = \"\";\n\t\twhile(blob.l < blob.length) {\n\t\t\tvar cc = blob[blob.l++];\n\t\t\tswitch(cc) {\n\t\t\t\tcase 0x00: out.push(blob.read_shift(8, 'f')); break;\n\t\t\t\tcase 0x01: {\n\t\t\t\t\tC = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tR = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tout.push(C + R);\n\t\t\t\t} break;\n\t\t\t\tcase 0x02: {\n\t\t\t\t\tvar c = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tvar r = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tC = wk1_parse_rc(o[0].c, blob.read_shift(2), true);\n\t\t\t\t\tR = wk1_parse_rc(o[0].r, blob.read_shift(2), false);\n\t\t\t\t\tout.push(c + r + \":\" + C + R);\n\t\t\t\t} break;\n\t\t\t\tcase 0x03:\n\t\t\t\t\tif(blob.l < blob.length) { console.error(\"WK1 premature formula end\"); return; }\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x04: out.push(\"(\" + out.pop() + \")\"); break;\n\t\t\t\tcase 0x05: out.push(blob.read_shift(2)); break;\n\t\t\t\tcase 0x06: {\n\t\t\t\t\t/* TODO: text encoding */\n\t\t\t\t\tvar Z = \"\"; while((cc = blob[blob.l++])) Z += String.fromCharCode(cc);\n\t\t\t\t\tout.push('\"' + Z.replace(/\"/g, '\"\"') + '\"'); break;\n\t\t\t\t} break;\n\n\t\t\t\tcase 0x08: out.push(\"-\" + out.pop()); break;\n\t\t\t\tcase 0x17: out.push(\"+\" + out.pop()); break;\n\t\t\t\tcase 0x16: out.push(\"NOT(\" + out.pop() + \")\"); break;\n\n\t\t\t\tcase 0x14: case 0x15: {\n\t\t\t\t\targR = out.pop(); argL = out.pop();\n\t\t\t\t\tout.push([\"AND\", \"OR\"][cc - 0x14] + \"(\" + argL + \",\" + argR + \")\");\n\t\t\t\t} break;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif(cc < 0x20 && BinOpTab[cc]) {\n\t\t\t\t\t\targR = out.pop(); argL = out.pop();\n\t\t\t\t\t\tout.push(argL + BinOpTab[cc] + argR);\n\t\t\t\t\t} else if(FuncTab[cc]) {\n\t\t\t\t\t\targc = FuncTab[cc][1];\n\t\t\t\t\t\tif(argc == 69) argc = blob[blob.l++];\n\t\t\t\t\t\tif(argc > out.length) { console.error(\"WK1 bad formula parse 0x\" + cc.toString(16) + \":|\" + out.join(\"|\") + \"|\"); return; }\n\t\t\t\t\t\tvar args = out.slice(-argc);\n\t\t\t\t\t\tout.length -= argc;\n\t\t\t\t\t\tout.push(FuncTab[cc][0] + \"(\" + args.join(\",\") + \")\");\n\t\t\t\t\t}\n\t\t\t\t\telse if(cc <= 0x07) return console.error(\"WK1 invalid opcode \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x18) return console.error(\"WK1 unsupported op \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x1E) return console.error(\"WK1 invalid opcode \" + cc.toString(16));\n\t\t\t\t\telse if(cc <= 0x73) return console.error(\"WK1 unsupported function opcode \" + cc.toString(16));\n\t\t\t\t\t// possible future functions ??\n\t\t\t\t\telse return console.error(\"WK1 unrecognized opcode \" + cc.toString(16));\n\t\t\t}\n\t\t}\n\t\tif(out.length == 1) o[1].f = \"\" + out[0];\n\t\telse console.error(\"WK1 bad formula parse |\" + out.join(\"|\") + \"|\");\n\t}\n\n\n\tfunction parse_cell_3(blob) {\n\t\tvar o = [{c:0,r:0}, {t:'n',v:0}, 0];\n\t\to[0].r = blob.read_shift(2); o[3] = blob[blob.l++]; o[0].c = blob[blob.l++];\n\t\treturn o;\n\t}\n\n\tfunction parse_LABEL_16(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\to[1].t = 's';\n\t\to[1].v = blob.read_shift(length - 4, 'cstr');\n\t\treturn o;\n\t}\n\tfunction write_LABEL_16(R, C, wsidx, s) {\n\t\t/* TODO: encoding */\n\t\tvar o = new_buf(6 + s.length);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, wsidx);\n\t\to.write_shift(1, C);\n\t\to.write_shift(1, 0x27);\n\t\tfor(var i = 0; i < s.length; ++i) {\n\t\t\tvar cc = s.charCodeAt(i);\n\t\t\to.write_shift(1, cc >= 0x80 ? 0x5F : cc);\n\t\t}\n\t\to.write_shift(1, 0);\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_18(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\to[1].v = blob.read_shift(2);\n\t\tvar v = o[1].v >> 1;\n\t\tif(o[1].v & 0x1) {\n\t\t\tswitch(v & 0x07) {\n\t\t\t\tcase 0: v = (v >> 3) * 5000; break;\n\t\t\t\tcase 1: v = (v >> 3) * 500; break;\n\t\t\t\tcase 2: v = (v >> 3) / 20; break;\n\t\t\t\tcase 3: v = (v >> 3) / 200; break;\n\t\t\t\tcase 4: v = (v >> 3) / 2000; break;\n\t\t\t\tcase 5: v = (v >> 3) / 20000; break;\n\t\t\t\tcase 6: v = (v >> 3) / 16; break;\n\t\t\t\tcase 7: v = (v >> 3) / 64; break;\n\t\t\t}\n\t\t}\n\t\to[1].v = v;\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_17(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(4);\n\t\tvar v2 = blob.read_shift(4);\n\t\tvar e = blob.read_shift(2);\n\t\tif(e == 0xFFFF) {\n\t\t\tif(v1 === 0 && v2 === 0xC0000000) { o[1].t = \"e\"; o[1].v = 0x0F; } // ERR -> #VALUE!\n\t\t\telse if(v1 === 0 && v2 === 0xD0000000) { o[1].t = \"e\"; o[1].v = 0x2A; } // NA -> #N/A\n\t\t\telse o[1].v = 0;\n\t\t\treturn o;\n\t\t}\n\t\tvar s = e & 0x8000; e = (e&0x7FFF) - 16446;\n\t\to[1].v = (1 - s*2) * (v2 * Math.pow(2, e+32) + v1 * Math.pow(2, e));\n\t\treturn o;\n\t}\n\tfunction write_NUMBER_17(R, C, wsidx, v) {\n\t\tvar o = new_buf(14);\n\t\to.write_shift(2, R);\n\t\to.write_shift(1, wsidx);\n\t\to.write_shift(1, C);\n\t\tif(v == 0) {\n\t\t\to.write_shift(4, 0);\n\t\t\to.write_shift(4, 0);\n\t\t\to.write_shift(2, 0xFFFF);\n\t\t\treturn o;\n\t\t}\n\t\tvar s = 0, e = 0, v1 = 0, v2 = 0;\n\t\tif(v < 0) { s = 1; v = -v; }\n\t\te = Math.log2(v) | 0;\n\t\tv /= Math.pow(2, e-31);\n\t\tv2 = (v)>>>0;\n\t\tif((v2&0x80000000) == 0) { v/=2; ++e; v2 = v >>> 0; }\n\t\tv -= v2;\n\t\tv2 |= 0x80000000;\n\t\tv2 >>>= 0;\n\t\tv *= Math.pow(2, 32);\n\t\tv1 = v>>>0;\n\t\to.write_shift(4, v1);\n\t\to.write_shift(4, v2);\n\t\te += 0x3FFF + (s ? 0x8000 : 0);\n\t\to.write_shift(2, e);\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA_19(blob, length) {\n\t\tvar o = parse_NUMBER_17(blob, 14);\n\t\tblob.l += length - 14; /* TODO: WK3 formula */\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_25(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(4);\n\t\to[1].v = v1 >> 6;\n\t\treturn o;\n\t}\n\n\tfunction parse_NUMBER_27(blob, length) {\n\t\tvar o = parse_cell_3(blob, length);\n\t\tvar v1 = blob.read_shift(8,'f');\n\t\to[1].v = v1;\n\t\treturn o;\n\t}\n\n\tfunction parse_FORMULA_28(blob, length) {\n\t\tvar o = parse_NUMBER_27(blob, 14);\n\t\tblob.l += length - 10; /* TODO: formula */\n\t\treturn o;\n\t}\n\n\tfunction parse_SHEETNAMECS(blob, length) {\n\t\treturn blob[blob.l + length - 1] == 0 ? blob.read_shift(length, 'cstr') : \"\";\n\t}\n\n\tfunction parse_SHEETNAMELP(blob, length) {\n\t\tvar len = blob[blob.l++];\n\t\tif(len > length - 1) len = length - 1;\n\t\tvar o = \"\"; while(o.length < len) o += String.fromCharCode(blob[blob.l++]);\n\t\treturn o;\n\t}\n\n\tfunction parse_SHEETINFOQP(blob, length, opts) {\n\t\tif(!opts.qpro || length < 21) return;\n\t\tvar id = blob.read_shift(1);\n\t\tblob.l += 17;\n\t\tvar len = blob.read_shift(1);\n\t\tblob.l += 2;\n\t\tvar nm = blob.read_shift(length - 21, 'cstr');\n\t\treturn [id, nm];\n\t}\n\n\tfunction parse_XFORMAT(blob, length) {\n\t\tvar o = {}, tgt = blob.l + length;\n\t\twhile(blob.l < tgt) {\n\t\t\tvar dt = blob.read_shift(2);\n\t\t\tif(dt == 0x36b0) {\n\t\t\t\to[dt] = [0, \"\"];\n\t\t\t\to[dt][0] = blob.read_shift(2);\n\t\t\t\twhile(blob[blob.l]) { o[dt][1] += String.fromCharCode(blob[blob.l]); blob.l++; } blob.l++;\n\t\t\t}\n\t\t\t// TODO: 0x3a99 ??\n\t\t}\n\t\treturn o;\n\t}\n\tfunction write_XFORMAT_SHEETNAME(name, wsidx) {\n\t\tvar out = new_buf(5 + name.length);\n\t\tout.write_shift(2, 0x36b0);\n\t\tout.write_shift(2, wsidx);\n\t\tfor(var i = 0; i < name.length; ++i) {\n\t\t\tvar cc = name.charCodeAt(i);\n\t\t\tout[out.l++] = cc > 0x7F ? 0x5F : cc;\n\t\t}\n\t\tout[out.l++] = 0;\n\t\treturn out;\n\t}\n\n\tvar WK1Enum = {\n0x0000: { n:\"BOF\", f:parseuint16 },\n0x0001: { n:\"EOF\" },\n0x0002: { n:\"CALCMODE\" },\n0x0003: { n:\"CALCORDER\" },\n0x0004: { n:\"SPLIT\" },\n0x0005: { n:\"SYNC\" },\n0x0006: { n:\"RANGE\", f:parse_RANGE },\n0x0007: { n:\"WINDOW1\" },\n0x0008: { n:\"COLW1\" },\n0x0009: { n:\"WINTWO\" },\n0x000A: { n:\"COLW2\" },\n0x000B: { n:\"NAME\" },\n0x000C: { n:\"BLANK\" },\n0x000D: { n:\"INTEGER\", f:parse_INTEGER },\n0x000E: { n:\"NUMBER\", f:parse_NUMBER },\n0x000F: { n:\"LABEL\", f:parse_LABEL },\n0x0010: { n:\"FORMULA\", f:parse_FORMULA },\n0x0018: { n:\"TABLE\" },\n0x0019: { n:\"ORANGE\" },\n0x001A: { n:\"PRANGE\" },\n0x001B: { n:\"SRANGE\" },\n0x001C: { n:\"FRANGE\" },\n0x001D: { n:\"KRANGE1\" },\n0x0020: { n:\"HRANGE\" },\n0x0023: { n:\"KRANGE2\" },\n0x0024: { n:\"PROTEC\" },\n0x0025: { n:\"FOOTER\" },\n0x0026: { n:\"HEADER\" },\n0x0027: { n:\"SETUP\" },\n0x0028: { n:\"MARGINS\" },\n0x0029: { n:\"LABELFMT\" },\n0x002A: { n:\"TITLES\" },\n0x002B: { n:\"SHEETJS\" },\n0x002D: { n:\"GRAPH\" },\n0x002E: { n:\"NGRAPH\" },\n0x002F: { n:\"CALCCOUNT\" },\n0x0030: { n:\"UNFORMATTED\" },\n0x0031: { n:\"CURSORW12\" },\n0x0032: { n:\"WINDOW\" },\n0x0033: { n:\"STRING\", f:parse_LABEL },\n0x0037: { n:\"PASSWORD\" },\n0x0038: { n:\"LOCKED\" },\n0x003C: { n:\"QUERY\" },\n0x003D: { n:\"QUERYNAME\" },\n0x003E: { n:\"PRINT\" },\n0x003F: { n:\"PRINTNAME\" },\n0x0040: { n:\"GRAPH2\" },\n0x0041: { n:\"GRAPHNAME\" },\n0x0042: { n:\"ZOOM\" },\n0x0043: { n:\"SYMSPLIT\" },\n0x0044: { n:\"NSROWS\" },\n0x0045: { n:\"NSCOLS\" },\n0x0046: { n:\"RULER\" },\n0x0047: { n:\"NNAME\" },\n0x0048: { n:\"ACOMM\" },\n0x0049: { n:\"AMACRO\" },\n0x004A: { n:\"PARSE\" },\n0x0066: { n:\"PRANGES??\" },\n0x0067: { n:\"RRANGES??\" },\n0x0068: { n:\"FNAME??\" },\n0x0069: { n:\"MRANGES??\" },\n0x00CC: { n:\"SHEETNAMECS\", f:parse_SHEETNAMECS },\n0x00DE: { n:\"SHEETNAMELP\", f:parse_SHEETNAMELP },\n0xFFFF: { n:\"\" }\n\t};\n\n\tvar WK3Enum = {\n0x0000: { n:\"BOF\" },\n0x0001: { n:\"EOF\" },\n0x0002: { n:\"PASSWORD\" },\n0x0003: { n:\"CALCSET\" },\n0x0004: { n:\"WINDOWSET\" },\n0x0005: { n:\"SHEETCELLPTR\" },\n0x0006: { n:\"SHEETLAYOUT\" },\n0x0007: { n:\"COLUMNWIDTH\" },\n0x0008: { n:\"HIDDENCOLUMN\" },\n0x0009: { n:\"USERRANGE\" },\n0x000A: { n:\"SYSTEMRANGE\" },\n0x000B: { n:\"ZEROFORCE\" },\n0x000C: { n:\"SORTKEYDIR\" },\n0x000D: { n:\"FILESEAL\" },\n0x000E: { n:\"DATAFILLNUMS\" },\n0x000F: { n:\"PRINTMAIN\" },\n0x0010: { n:\"PRINTSTRING\" },\n0x0011: { n:\"GRAPHMAIN\" },\n0x0012: { n:\"GRAPHSTRING\" },\n0x0013: { n:\"??\" },\n0x0014: { n:\"ERRCELL\" },\n0x0015: { n:\"NACELL\" },\n0x0016: { n:\"LABEL16\", f:parse_LABEL_16},\n0x0017: { n:\"NUMBER17\", f:parse_NUMBER_17 },\n0x0018: { n:\"NUMBER18\", f:parse_NUMBER_18 },\n0x0019: { n:\"FORMULA19\", f:parse_FORMULA_19},\n0x001A: { n:\"FORMULA1A\" },\n0x001B: { n:\"XFORMAT\", f:parse_XFORMAT },\n0x001C: { n:\"DTLABELMISC\" },\n0x001D: { n:\"DTLABELCELL\" },\n0x001E: { n:\"GRAPHWINDOW\" },\n0x001F: { n:\"CPA\" },\n0x0020: { n:\"LPLAUTO\" },\n0x0021: { n:\"QUERY\" },\n0x0022: { n:\"HIDDENSHEET\" },\n0x0023: { n:\"??\" },\n0x0025: { n:\"NUMBER25\", f:parse_NUMBER_25 },\n0x0026: { n:\"??\" },\n0x0027: { n:\"NUMBER27\", f:parse_NUMBER_27 },\n0x0028: { n:\"FORMULA28\", f:parse_FORMULA_28 },\n0x008E: { n:\"??\" },\n0x0093: { n:\"??\" },\n0x0096: { n:\"??\" },\n0x0097: { n:\"??\" },\n0x0098: { n:\"??\" },\n0x0099: { n:\"??\" },\n0x009A: { n:\"??\" },\n0x009B: { n:\"??\" },\n0x009C: { n:\"??\" },\n0x00A3: { n:\"??\" },\n0x00AE: { n:\"??\" },\n0x00AF: { n:\"??\" },\n0x00B0: { n:\"??\" },\n0x00B1: { n:\"??\" },\n0x00B8: { n:\"??\" },\n0x00B9: { n:\"??\" },\n0x00BA: { n:\"??\" },\n0x00BB: { n:\"??\" },\n0x00BC: { n:\"??\" },\n0x00C3: { n:\"??\" },\n0x00C9: { n:\"??\" },\n0x00CC: { n:\"SHEETNAMECS\", f:parse_SHEETNAMECS },\n0x00CD: { n:\"??\" },\n0x00CE: { n:\"??\" },\n0x00CF: { n:\"??\" },\n0x00D0: { n:\"??\" },\n0x0100: { n:\"??\" },\n0x0103: { n:\"??\" },\n0x0104: { n:\"??\" },\n0x0105: { n:\"??\" },\n0x0106: { n:\"??\" },\n0x0107: { n:\"??\" },\n0x0109: { n:\"??\" },\n0x010A: { n:\"??\" },\n0x010B: { n:\"??\" },\n0x010C: { n:\"??\" },\n0x010E: { n:\"??\" },\n0x010F: { n:\"??\" },\n0x0180: { n:\"??\" },\n0x0185: { n:\"??\" },\n0x0186: { n:\"??\" },\n0x0189: { n:\"??\" },\n0x018C: { n:\"??\" },\n0x0200: { n:\"??\" },\n0x0202: { n:\"??\" },\n0x0201: { n:\"??\" },\n0x0204: { n:\"??\" },\n0x0205: { n:\"??\" },\n0x0280: { n:\"??\" },\n0x0281: { n:\"??\" },\n0x0282: { n:\"??\" },\n0x0283: { n:\"??\" },\n0x0284: { n:\"??\" },\n0x0285: { n:\"??\" },\n0x0286: { n:\"??\" },\n0x0287: { n:\"??\" },\n0x0288: { n:\"??\" },\n0x0292: { n:\"??\" },\n0x0293: { n:\"??\" },\n0x0294: { n:\"??\" },\n0x0295: { n:\"??\" },\n0x0296: { n:\"??\" },\n0x0299: { n:\"??\" },\n0x029A: { n:\"??\" },\n0x0300: { n:\"??\" },\n0x0304: { n:\"??\" },\n0x0601: { n:\"SHEETINFOQP\", f:parse_SHEETINFOQP },\n0x0640: { n:\"??\" },\n0x0642: { n:\"??\" },\n0x0701: { n:\"??\" },\n0x0702: { n:\"??\" },\n0x0703: { n:\"??\" },\n0x0704: { n:\"??\" },\n0x0780: { n:\"??\" },\n0x0800: { n:\"??\" },\n0x0801: { n:\"??\" },\n0x0804: { n:\"??\" },\n0x0A80: { n:\"??\" },\n0x2AF6: { n:\"??\" },\n0x3231: { n:\"??\" },\n0x6E49: { n:\"??\" },\n0x6F44: { n:\"??\" },\n0xFFFF: { n:\"\" }\n\t};\n\treturn {\n\t\tsheet_to_wk1: sheet_to_wk1,\n\t\tbook_to_wk3: book_to_wk3,\n\t\tto_workbook: lotus_to_workbook\n\t};\n})();\n/* 18.4.7 rPr CT_RPrElt */\nfunction parse_rpr(rpr) {\n\tvar font = {}, m = rpr.match(tagregex), i = 0;\n\tvar pass = false;\n\tif(m) for(;i!=m.length; ++i) {\n\t\tvar y = parsexmltag(m[i]);\n\t\tswitch(y[0].replace(/\\w*:/g,\"\")) {\n\t\t\t/* 18.8.12 condense CT_BooleanProperty */\n\t\t\t/* ** not required . */\n\t\t\tcase '':\n\t\t\tcase '': font.shadow = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.4.1 charset CT_IntProperty TODO */\n\t\t\tcase '':\n\t\t\tcase '': font.outline = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.4.5 rFont CT_FontName */\n\t\t\tcase '':\n\t\t\tcase '': font.strike = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.4.13 u CT_UnderlineProperty */\n\t\t\tcase '':\n\t\t\tcase '': font.u = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.2 b */\n\t\t\tcase '':\n\t\t\tcase '': font.b = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.26 i */\n\t\t\tcase '':\n\t\t\tcase '': font.i = 1; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.3.1.15 color CT_Color TODO: tint, theme, auto, indexed */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault:\n\t\t\t\tif(y[0].charCodeAt(1) !== 47 && !pass) throw new Error('Unrecognized rich format ' + y[0]);\n\t\t}\n\t}\n\treturn font;\n}\n\nvar parse_rs = (function() {\n\tvar tregex = matchtag(\"t\"), rpregex = matchtag(\"rPr\");\n\t/* 18.4.4 r CT_RElt */\n\tfunction parse_r(r) {\n\t\t/* 18.4.12 t ST_Xstring */\n\t\tvar t = r.match(tregex)/*, cp = 65001*/;\n\t\tif(!t) return {t:\"s\", v:\"\"};\n\n\t\tvar o = ({t:'s', v:unescapexml(t[1])});\n\t\tvar rpr = r.match(rpregex);\n\t\tif(rpr) o.s = parse_rpr(rpr[1]);\n\t\treturn o;\n\t}\n\tvar rregex = /<(?:\\w+:)?r>/g, rend = /<\\/(?:\\w+:)?r>/;\n\treturn function parse_rs(rs) {\n\t\treturn rs.replace(rregex,\"\").split(rend).map(parse_r).filter(function(r) { return r.v; });\n\t};\n})();\n\n\n/* Parse a list of tags */\nvar rs_to_html = (function parse_rs_factory() {\n\tvar nlregex = /(\\r\\n|\\n)/g;\n\tfunction parse_rpr2(font, intro, outro) {\n\t\tvar style = [];\n\n\t\tif(font.u) style.push(\"text-decoration: underline;\");\n\t\tif(font.uval) style.push(\"text-underline-style:\" + font.uval + \";\");\n\t\tif(font.sz) style.push(\"font-size:\" + font.sz + \"pt;\");\n\t\tif(font.outline) style.push(\"text-effect: outline;\");\n\t\tif(font.shadow) style.push(\"text-shadow: auto;\");\n\t\tintro.push('');\n\n\t\tif(font.b) { intro.push(\"\"); outro.push(\"\"); }\n\t\tif(font.i) { intro.push(\"\"); outro.push(\"\"); }\n\t\tif(font.strike) { intro.push(\"\"); outro.push(\"\"); }\n\n\t\tvar align = font.valign || \"\";\n\t\tif(align == \"superscript\" || align == \"super\") align = \"sup\";\n\t\telse if(align == \"subscript\") align = \"sub\";\n\t\tif(align != \"\") { intro.push(\"<\" + align + \">\"); outro.push(\"\" + align + \">\"); }\n\n\t\toutro.push(\"\");\n\t\treturn font;\n\t}\n\n\t/* 18.4.4 r CT_RElt */\n\tfunction r_to_html(r) {\n\t\tvar terms = [[],r.v,[]];\n\t\tif(!r.v) return \"\";\n\n\t\tif(r.s) parse_rpr2(r.s, terms[0], terms[2]);\n\n\t\treturn terms[0].join(\"\") + terms[1].replace(nlregex,'
') + terms[2].join(\"\");\n\t}\n\n\treturn function parse_rs(rs) {\n\t\treturn rs.map(r_to_html).join(\"\");\n\t};\n})();\n\n/* 18.4.8 si CT_Rst */\nvar sitregex = /<(?:\\w+:)?t[^>]*>([^<]*)<\\/(?:\\w+:)?t>/g, sirregex = /<(?:\\w+:)?r>/;\nvar sirphregex = /<(?:\\w+:)?rPh.*?>([\\s\\S]*?)<\\/(?:\\w+:)?rPh>/g;\nfunction parse_si(x, opts) {\n\tvar html = opts ? opts.cellHTML : true;\n\tvar z = {};\n\tif(!x) return { t: \"\" };\n\t//var y;\n\t/* 18.4.12 t ST_Xstring (Plaintext String) */\n\t// TODO: is whitespace actually valid here?\n\tif(x.match(/^\\s*<(?:\\w+:)?t[^>]*>/)) {\n\t\tz.t = unescapexml(utf8read(x.slice(x.indexOf(\">\")+1).split(/<\\/(?:\\w+:)?t>/)[0]||\"\"));\n\t\tz.r = utf8read(x);\n\t\tif(html) z.h = escapehtml(z.t);\n\t}\n\t/* 18.4.4 r CT_RElt (Rich Text Run) */\n\telse if((/*y = */x.match(sirregex))) {\n\t\tz.r = utf8read(x);\n\t\tz.t = unescapexml(utf8read((x.replace(sirphregex, '').match(sitregex)||[]).join(\"\").replace(tagregex,\"\")));\n\t\tif(html) z.h = rs_to_html(parse_rs(z.r));\n\t}\n\t/* 18.4.3 phoneticPr CT_PhoneticPr (TODO: needed for Asian support) */\n\t/* 18.4.6 rPh CT_PhoneticRun (TODO: needed for Asian support) */\n\treturn z;\n}\n\n/* 18.4 Shared String Table */\nvar sstr0 = /<(?:\\w+:)?sst([^>]*)>([\\s\\S]*)<\\/(?:\\w+:)?sst>/;\nvar sstr1 = /<(?:\\w+:)?(?:si|sstItem)>/g;\nvar sstr2 = /<\\/(?:\\w+:)?(?:si|sstItem)>/;\nfunction parse_sst_xml(data, opts) {\n\tvar s = ([]), ss = \"\";\n\tif(!data) return s;\n\t/* 18.4.9 sst CT_Sst */\n\tvar sst = data.match(sstr0);\n\tif(sst) {\n\t\tss = sst[2].replace(sstr1,\"\").split(sstr2);\n\t\tfor(var i = 0; i != ss.length; ++i) {\n\t\t\tvar o = parse_si(ss[i].trim(), opts);\n\t\t\tif(o != null) s[s.length] = o;\n\t\t}\n\t\tsst = parsexmltag(sst[1]); s.Count = sst.count; s.Unique = sst.uniqueCount;\n\t}\n\treturn s;\n}\n\nRELS.SST = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings\";\nvar straywsregex = /^\\s|\\s$|[\\t\\n\\r]/;\nfunction write_sst_xml(sst, opts) {\n\tif(!opts.bookSST) return \"\";\n\tvar o = [XML_HEADER];\n\to[o.length] = (writextag('sst', null, {\n\t\txmlns: XMLNS.main[0],\n\t\tcount: sst.Count,\n\t\tuniqueCount: sst.Unique\n\t}));\n\tfor(var i = 0; i != sst.length; ++i) { if(sst[i] == null) continue;\n\t\tvar s = sst[i];\n\t\tvar sitag = \"\";\n\t\tif(s.r) sitag += s.r;\n\t\telse {\n\t\t\tsitag += \"\" + escapexml(s.t) + \"\";\n\t\t}\n\t\tsitag += \"\";\n\t\to[o.length] = (sitag);\n\t}\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.221 BrtBeginSst */\nfunction parse_BrtBeginSst(data) {\n\treturn [data.read_shift(4), data.read_shift(4)];\n}\n\n/* [MS-XLSB] 2.1.7.45 Shared Strings */\nfunction parse_sst_bin(data, opts) {\n\tvar s = ([]);\n\tvar pass = false;\n\trecordhopper(data, function hopper_sst(val, R_n, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x009F: /* 'BrtBeginSst' */\n\t\t\t\ts.Count = val[0]; s.Unique = val[1]; break;\n\t\t\tcase 0x0013: /* 'BrtSSTItem' */\n\t\t\t\ts.push(val); break;\n\t\t\tcase 0x00A0: /* 'BrtEndSst' */\n\t\t\t\treturn true;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif(R_n.indexOf(\"Begin\") > 0){/* empty */}\n\t\t\t\telse if(R_n.indexOf(\"End\") > 0){/* empty */}\n\t\t\t\tif(!pass || opts.WTF) throw new Error(\"Unexpected record \" + RT + \" \" + R_n);\n\t\t}\n\t});\n\treturn s;\n}\n\nfunction write_BrtBeginSst(sst, o) {\n\tif(!o) o = new_buf(8);\n\to.write_shift(4, sst.Count);\n\to.write_shift(4, sst.Unique);\n\treturn o;\n}\n\nvar write_BrtSSTItem = write_RichStr;\n\nfunction write_sst_bin(sst) {\n\tvar ba = buf_array();\n\twrite_record(ba, \"BrtBeginSst\", write_BrtBeginSst(sst));\n\tfor(var i = 0; i < sst.length; ++i) write_record(ba, \"BrtSSTItem\", write_BrtSSTItem(sst[i]));\n\t/* FRTSST */\n\twrite_record(ba, \"BrtEndSst\");\n\treturn ba.end();\n}\nfunction _JS2ANSI(str) {\n\tif(typeof cptable !== 'undefined') return cptable.utils.encode(current_ansi, str);\n\tvar o = [], oo = str.split(\"\");\n\tfor(var i = 0; i < oo.length; ++i) o[i] = oo[i].charCodeAt(0);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.4 Version */\nfunction parse_CRYPTOVersion(blob, length) {\n\tvar o = {};\n\to.Major = blob.read_shift(2);\n\to.Minor = blob.read_shift(2);\nif(length >= 4) blob.l += length - 4;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.5 DataSpaceVersionInfo */\nfunction parse_DataSpaceVersionInfo(blob) {\n\tvar o = {};\n\to.id = blob.read_shift(0, 'lpp4');\n\to.R = parse_CRYPTOVersion(blob, 4);\n\to.U = parse_CRYPTOVersion(blob, 4);\n\to.W = parse_CRYPTOVersion(blob, 4);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.6.1 DataSpaceMapEntry Structure */\nfunction parse_DataSpaceMapEntry(blob) {\n\tvar len = blob.read_shift(4);\n\tvar end = blob.l + len - 4;\n\tvar o = {};\n\tvar cnt = blob.read_shift(4);\n\tvar comps = [];\n\t/* [MS-OFFCRYPTO] 2.1.6.2 DataSpaceReferenceComponent Structure */\n\twhile(cnt-- > 0) comps.push({ t: blob.read_shift(4), v: blob.read_shift(0, 'lpp4') });\n\to.name = blob.read_shift(0, 'lpp4');\n\to.comps = comps;\n\tif(blob.l != end) throw new Error(\"Bad DataSpaceMapEntry: \" + blob.l + \" != \" + end);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.6 DataSpaceMap */\nfunction parse_DataSpaceMap(blob) {\n\tvar o = [];\n\tblob.l += 4; // must be 0x8\n\tvar cnt = blob.read_shift(4);\n\twhile(cnt-- > 0) o.push(parse_DataSpaceMapEntry(blob));\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.7 DataSpaceDefinition */\nfunction parse_DataSpaceDefinition(blob) {\n\tvar o = [];\n\tblob.l += 4; // must be 0x8\n\tvar cnt = blob.read_shift(4);\n\twhile(cnt-- > 0) o.push(blob.read_shift(0, 'lpp4'));\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.1.8 DataSpaceDefinition */\nfunction parse_TransformInfoHeader(blob) {\n\tvar o = {};\n\t/*var len = */blob.read_shift(4);\n\tblob.l += 4; // must be 0x1\n\to.id = blob.read_shift(0, 'lpp4');\n\to.name = blob.read_shift(0, 'lpp4');\n\to.R = parse_CRYPTOVersion(blob, 4);\n\to.U = parse_CRYPTOVersion(blob, 4);\n\to.W = parse_CRYPTOVersion(blob, 4);\n\treturn o;\n}\n\nfunction parse_Primary(blob) {\n\t/* [MS-OFFCRYPTO] 2.2.6 IRMDSTransformInfo */\n\tvar hdr = parse_TransformInfoHeader(blob);\n\t/* [MS-OFFCRYPTO] 2.1.9 EncryptionTransformInfo */\n\thdr.ename = blob.read_shift(0, '8lpp4');\n\thdr.blksz = blob.read_shift(4);\n\thdr.cmode = blob.read_shift(4);\n\tif(blob.read_shift(4) != 0x04) throw new Error(\"Bad !Primary record\");\n\treturn hdr;\n}\n\n/* [MS-OFFCRYPTO] 2.3.2 Encryption Header */\nfunction parse_EncryptionHeader(blob, length) {\n\tvar tgt = blob.l + length;\n\tvar o = {};\n\to.Flags = (blob.read_shift(4) & 0x3F);\n\tblob.l += 4;\n\to.AlgID = blob.read_shift(4);\n\tvar valid = false;\n\tswitch(o.AlgID) {\n\t\tcase 0x660E: case 0x660F: case 0x6610: valid = (o.Flags == 0x24); break;\n\t\tcase 0x6801: valid = (o.Flags == 0x04); break;\n\t\tcase 0: valid = (o.Flags == 0x10 || o.Flags == 0x04 || o.Flags == 0x24); break;\n\t\tdefault: throw 'Unrecognized encryption algorithm: ' + o.AlgID;\n\t}\n\tif(!valid) throw new Error(\"Encryption Flags/AlgID mismatch\");\n\to.AlgIDHash = blob.read_shift(4);\n\to.KeySize = blob.read_shift(4);\n\to.ProviderType = blob.read_shift(4);\n\tblob.l += 8;\n\to.CSPName = blob.read_shift((tgt-blob.l)>>1, 'utf16le');\n\tblob.l = tgt;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.3 Encryption Verifier */\nfunction parse_EncryptionVerifier(blob, length) {\n\tvar o = {}, tgt = blob.l + length;\n\tblob.l += 4; // SaltSize must be 0x10\n\to.Salt = blob.slice(blob.l, blob.l+16); blob.l += 16;\n\to.Verifier = blob.slice(blob.l, blob.l+16); blob.l += 16;\n\t/*var sz = */blob.read_shift(4);\n\to.VerifierHash = blob.slice(blob.l, tgt); blob.l = tgt;\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.4.* EncryptionInfo Stream */\nfunction parse_EncryptionInfo(blob) {\n\tvar vers = parse_CRYPTOVersion(blob);\n\tswitch(vers.Minor) {\n\t\tcase 0x02: return [vers.Minor, parse_EncInfoStd(blob, vers)];\n\t\tcase 0x03: return [vers.Minor, parse_EncInfoExt(blob, vers)];\n\t\tcase 0x04: return [vers.Minor, parse_EncInfoAgl(blob, vers)];\n\t}\n\tthrow new Error(\"ECMA-376 Encrypted file unrecognized Version: \" + vers.Minor);\n}\n\n/* [MS-OFFCRYPTO] 2.3.4.5 EncryptionInfo Stream (Standard Encryption) */\nfunction parse_EncInfoStd(blob) {\n\tvar flags = blob.read_shift(4);\n\tif((flags & 0x3F) != 0x24) throw new Error(\"EncryptionInfo mismatch\");\n\tvar sz = blob.read_shift(4);\n\t//var tgt = blob.l + sz;\n\tvar hdr = parse_EncryptionHeader(blob, sz);\n\tvar verifier = parse_EncryptionVerifier(blob, blob.length - blob.l);\n\treturn { t:\"Std\", h:hdr, v:verifier };\n}\n/* [MS-OFFCRYPTO] 2.3.4.6 EncryptionInfo Stream (Extensible Encryption) */\nfunction parse_EncInfoExt() { throw new Error(\"File is password-protected: ECMA-376 Extensible\"); }\n/* [MS-OFFCRYPTO] 2.3.4.10 EncryptionInfo Stream (Agile Encryption) */\nfunction parse_EncInfoAgl(blob) {\n\tvar KeyData = [\"saltSize\",\"blockSize\",\"keyBits\",\"hashSize\",\"cipherAlgorithm\",\"cipherChaining\",\"hashAlgorithm\",\"saltValue\"];\n\tblob.l+=4;\n\tvar xml = blob.read_shift(blob.length - blob.l, 'utf8');\n\tvar o = {};\n\txml.replace(tagregex, function xml_agile(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': break;\n\t\t\tcase '': case '': break;\n\n\t\t\tcase '': break;\n\t\t\tcase ' 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}\n/* [MS-OFFCRYPTO] 2.3.6.1 RC4 Encryption Header */\nfunction parse_RC4Header(blob) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}\n\n/* [MS-OFFCRYPTO] 2.3.7.1 Binary Document Password Verifier Derivation */\nfunction crypto_CreatePasswordVerifier_Method1(Password) {\n\tvar Verifier = 0x0000, PasswordArray;\n\tvar PasswordDecoded = _JS2ANSI(Password);\n\tvar len = PasswordDecoded.length + 1, i, PasswordByte;\n\tvar Intermediate1, Intermediate2, Intermediate3;\n\tPasswordArray = new_raw_buf(len);\n\tPasswordArray[0] = PasswordDecoded.length;\n\tfor(i = 1; i != len; ++i) PasswordArray[i] = PasswordDecoded[i-1];\n\tfor(i = len-1; i >= 0; --i) {\n\t\tPasswordByte = PasswordArray[i];\n\t\tIntermediate1 = ((Verifier & 0x4000) === 0x0000) ? 0 : 1;\n\t\tIntermediate2 = (Verifier << 1) & 0x7FFF;\n\t\tIntermediate3 = Intermediate1 | Intermediate2;\n\t\tVerifier = Intermediate3 ^ PasswordByte;\n\t}\n\treturn Verifier ^ 0xCE4B;\n}\n\n/* [MS-OFFCRYPTO] 2.3.7.2 Binary Document XOR Array Initialization */\nvar crypto_CreateXorArray_Method1 = (function() {\n\tvar PadArray = [0xBB, 0xFF, 0xFF, 0xBA, 0xFF, 0xFF, 0xB9, 0x80, 0x00, 0xBE, 0x0F, 0x00, 0xBF, 0x0F, 0x00];\n\tvar InitialCode = [0xE1F0, 0x1D0F, 0xCC9C, 0x84C0, 0x110C, 0x0E10, 0xF1CE, 0x313E, 0x1872, 0xE139, 0xD40F, 0x84F9, 0x280C, 0xA96A, 0x4EC3];\n\tvar XorMatrix = [0xAEFC, 0x4DD9, 0x9BB2, 0x2745, 0x4E8A, 0x9D14, 0x2A09, 0x7B61, 0xF6C2, 0xFDA5, 0xEB6B, 0xC6F7, 0x9DCF, 0x2BBF, 0x4563, 0x8AC6, 0x05AD, 0x0B5A, 0x16B4, 0x2D68, 0x5AD0, 0x0375, 0x06EA, 0x0DD4, 0x1BA8, 0x3750, 0x6EA0, 0xDD40, 0xD849, 0xA0B3, 0x5147, 0xA28E, 0x553D, 0xAA7A, 0x44D5, 0x6F45, 0xDE8A, 0xAD35, 0x4A4B, 0x9496, 0x390D, 0x721A, 0xEB23, 0xC667, 0x9CEF, 0x29FF, 0x53FE, 0xA7FC, 0x5FD9, 0x47D3, 0x8FA6, 0x0F6D, 0x1EDA, 0x3DB4, 0x7B68, 0xF6D0, 0xB861, 0x60E3, 0xC1C6, 0x93AD, 0x377B, 0x6EF6, 0xDDEC, 0x45A0, 0x8B40, 0x06A1, 0x0D42, 0x1A84, 0x3508, 0x6A10, 0xAA51, 0x4483, 0x8906, 0x022D, 0x045A, 0x08B4, 0x1168, 0x76B4, 0xED68, 0xCAF1, 0x85C3, 0x1BA7, 0x374E, 0x6E9C, 0x3730, 0x6E60, 0xDCC0, 0xA9A1, 0x4363, 0x86C6, 0x1DAD, 0x3331, 0x6662, 0xCCC4, 0x89A9, 0x0373, 0x06E6, 0x0DCC, 0x1021, 0x2042, 0x4084, 0x8108, 0x1231, 0x2462, 0x48C4];\n\tvar Ror = function(Byte) { return ((Byte/2) | (Byte*128)) & 0xFF; };\n\tvar XorRor = function(byte1, byte2) { return Ror(byte1 ^ byte2); };\n\tvar CreateXorKey_Method1 = function(Password) {\n\t\tvar XorKey = InitialCode[Password.length - 1];\n\t\tvar CurrentElement = 0x68;\n\t\tfor(var i = Password.length-1; i >= 0; --i) {\n\t\t\tvar Char = Password[i];\n\t\t\tfor(var j = 0; j != 7; ++j) {\n\t\t\t\tif(Char & 0x40) XorKey ^= XorMatrix[CurrentElement];\n\t\t\t\tChar *= 2; --CurrentElement;\n\t\t\t}\n\t\t}\n\t\treturn XorKey;\n\t};\n\treturn function(password) {\n\t\tvar Password = _JS2ANSI(password);\n\t\tvar XorKey = CreateXorKey_Method1(Password);\n\t\tvar Index = Password.length;\n\t\tvar ObfuscationArray = new_raw_buf(16);\n\t\tfor(var i = 0; i != 16; ++i) ObfuscationArray[i] = 0x00;\n\t\tvar Temp, PasswordLastChar, PadIndex;\n\t\tif((Index & 1) === 1) {\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(PadArray[0], Temp);\n\t\t\t--Index;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tPasswordLastChar = Password[Password.length - 1];\n\t\t\tObfuscationArray[Index] = XorRor(PasswordLastChar, Temp);\n\t\t}\n\t\twhile(Index > 0) {\n\t\t\t--Index;\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t\t--Index;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t}\n\t\tIndex = 15;\n\t\tPadIndex = 15 - Password.length;\n\t\twhile(PadIndex > 0) {\n\t\t\tTemp = XorKey >> 8;\n\t\t\tObfuscationArray[Index] = XorRor(PadArray[PadIndex], Temp);\n\t\t\t--Index;\n\t\t\t--PadIndex;\n\t\t\tTemp = XorKey & 0xFF;\n\t\t\tObfuscationArray[Index] = XorRor(Password[Index], Temp);\n\t\t\t--Index;\n\t\t\t--PadIndex;\n\t\t}\n\t\treturn ObfuscationArray;\n\t};\n})();\n\n/* [MS-OFFCRYPTO] 2.3.7.3 Binary Document XOR Data Transformation Method 1 */\nvar crypto_DecryptData_Method1 = function(password, Data, XorArrayIndex, XorArray, O) {\n\t/* If XorArray is set, use it; if O is not set, make changes in-place */\n\tif(!O) O = Data;\n\tif(!XorArray) XorArray = crypto_CreateXorArray_Method1(password);\n\tvar Index, Value;\n\tfor(Index = 0; Index != Data.length; ++Index) {\n\t\tValue = Data[Index];\n\t\tValue ^= XorArray[XorArrayIndex];\n\t\tValue = ((Value>>5) | (Value<<3)) & 0xFF;\n\t\tO[Index] = Value;\n\t\t++XorArrayIndex;\n\t}\n\treturn [O, XorArrayIndex, XorArray];\n};\n\nvar crypto_MakeXorDecryptor = function(password) {\n\tvar XorArrayIndex = 0, XorArray = crypto_CreateXorArray_Method1(password);\n\treturn function(Data) {\n\t\tvar O = crypto_DecryptData_Method1(\"\", Data, XorArrayIndex, XorArray);\n\t\tXorArrayIndex = O[1];\n\t\treturn O[0];\n\t};\n};\n\n/* 2.5.343 */\nfunction parse_XORObfuscation(blob, length, opts, out) {\n\tvar o = ({ key: parseuint16(blob), verificationBytes: parseuint16(blob) });\n\tif(opts.password) o.verifier = crypto_CreatePasswordVerifier_Method1(opts.password);\n\tout.valid = o.verificationBytes === o.verifier;\n\tif(out.valid) out.insitu = crypto_MakeXorDecryptor(opts.password);\n\treturn o;\n}\n\n/* 2.4.117 */\nfunction parse_FilePassHeader(blob, length, oo) {\n\tvar o = oo || {}; o.Info = blob.read_shift(2); blob.l -= 2;\n\tif(o.Info === 1) o.Data = parse_RC4Header(blob, length);\n\telse o.Data = parse_RC4CryptoHeader(blob, length);\n\treturn o;\n}\nfunction parse_FilePass(blob, length, opts) {\n\tvar o = ({ Type: opts.biff >= 8 ? blob.read_shift(2) : 0 }); /* wEncryptionType */\n\tif(o.Type) parse_FilePassHeader(blob, length-2, o);\n\telse parse_XORObfuscation(blob, opts.biff >= 8 ? length : length - 2, opts, o);\n\treturn o;\n}\n\n\nvar RTF = (function() {\n\tfunction rtf_to_sheet(d, opts) {\n\t\tswitch(opts.type) {\n\t\t\tcase 'base64': return rtf_to_sheet_str(Base64.decode(d), opts);\n\t\t\tcase 'binary': return rtf_to_sheet_str(d, opts);\n\t\t\tcase 'buffer': return rtf_to_sheet_str(has_buf && Buffer.isBuffer(d) ? d.toString('binary') : a2s(d), opts);\n\t\t\tcase 'array': return rtf_to_sheet_str(cc2str(d), opts);\n\t\t}\n\t\tthrow new Error(\"Unrecognized type \" + opts.type);\n\t}\n\n\t/* TODO: this is a stub */\n\tfunction rtf_to_sheet_str(str, opts) {\n\t\tvar o = opts || {};\n\t\tvar ws = o.dense ? ([]) : ({});\n\n\t\tvar rows = str.match(/\\\\trowd.*?\\\\row\\b/g);\n\t\tif(!rows.length) throw new Error(\"RTF missing table\");\n\t\tvar range = ({s: {c:0, r:0}, e: {c:0, r:rows.length - 1}});\n\t\trows.forEach(function(rowtf, R) {\n\t\t\tif(Array.isArray(ws)) ws[R] = [];\n\t\t\tvar rtfre = /\\\\\\w+\\b/g;\n\t\t\tvar last_index = 0;\n\t\t\tvar res;\n\t\t\tvar C = -1;\n\t\t\twhile((res = rtfre.exec(rowtf))) {\n\t\t\t\tswitch(res[0]) {\n\t\t\t\t\tcase \"\\\\cell\":\n\t\t\t\t\t\tvar data = rowtf.slice(last_index, rtfre.lastIndex - res[0].length);\n\t\t\t\t\t\tif(data[0] == \" \") data = data.slice(1);\n\t\t\t\t\t\t++C;\n\t\t\t\t\t\tif(data.length) {\n\t\t\t\t\t\t\t// TODO: value parsing, including codepage adjustments\n\t\t\t\t\t\t\tvar cell = {v: data, t:\"s\"};\n\t\t\t\t\t\t\tif(Array.isArray(ws)) ws[R][C] = cell;\n\t\t\t\t\t\t\telse ws[encode_cell({r:R, c:C})] = cell;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlast_index = rtfre.lastIndex;\n\t\t\t}\n\t\t\tif(C > range.e.c) range.e.c = C;\n\t\t});\n\t\tws['!ref'] = encode_range(range);\n\t\treturn ws;\n\t}\n\n\tfunction rtf_to_workbook(d, opts) { return sheet_to_workbook(rtf_to_sheet(d, opts), opts); }\n\n\t/* TODO: this is a stub */\n\tfunction sheet_to_rtf(ws) {\n\t\tvar o = [\"{\\\\rtf1\\\\ansi\"];\n\t\tvar r = safe_decode_range(ws['!ref']), cell;\n\t\tvar dense = Array.isArray(ws);\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\t\to.push(\"\\\\trowd\\\\trautofit1\");\n\t\t\tfor(var C = r.s.c; C <= r.e.c; ++C) o.push(\"\\\\cellx\" + (C+1));\n\t\t\to.push(\"\\\\pard\\\\intbl\");\n\t\t\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\t\tcell = dense ? (ws[R]||[])[C]: ws[coord];\n\t\t\t\tif(!cell || cell.v == null && (!cell.f || cell.F)) continue;\n\t\t\t\to.push(\" \" + (cell.w || (format_cell(cell), cell.w)));\n\t\t\t\to.push(\"\\\\cell\");\n\t\t\t}\n\t\t\to.push(\"\\\\pard\\\\intbl\\\\row\");\n\t\t}\n\t\treturn o.join(\"\") + \"}\";\n\t}\n\n\treturn {\n\t\tto_workbook: rtf_to_workbook,\n\t\tto_sheet: rtf_to_sheet,\n\t\tfrom_sheet: sheet_to_rtf\n\t};\n})();\nfunction hex2RGB(h) {\n\tvar o = h.slice(h[0]===\"#\"?1:0).slice(0,6);\n\treturn [parseInt(o.slice(0,2),16),parseInt(o.slice(2,4),16),parseInt(o.slice(4,6),16)];\n}\nfunction rgb2Hex(rgb) {\n\tfor(var i=0,o=1; i!=3; ++i) o = o*256 + (rgb[i]>255?255:rgb[i]<0?0:rgb[i]);\n\treturn o.toString(16).toUpperCase().slice(1);\n}\n\nfunction rgb2HSL(rgb) {\n\tvar R = rgb[0]/255, G = rgb[1]/255, B=rgb[2]/255;\n\tvar M = Math.max(R, G, B), m = Math.min(R, G, B), C = M - m;\n\tif(C === 0) return [0, 0, R];\n\n\tvar H6 = 0, S = 0, L2 = (M + m);\n\tS = C / (L2 > 1 ? 2 - L2 : L2);\n\tswitch(M){\n\t\tcase R: H6 = ((G - B) / C + 6)%6; break;\n\t\tcase G: H6 = ((B - R) / C + 2); break;\n\t\tcase B: H6 = ((R - G) / C + 4); break;\n\t}\n\treturn [H6 / 6, S, L2 / 2];\n}\n\nfunction hsl2RGB(hsl){\n\tvar H = hsl[0], S = hsl[1], L = hsl[2];\n\tvar C = S * 2 * (L < 0.5 ? L : 1 - L), m = L - C/2;\n\tvar rgb = [m,m,m], h6 = 6*H;\n\n\tvar X;\n\tif(S !== 0) switch(h6|0) {\n\t\tcase 0: case 6: X = C * h6; rgb[0] += C; rgb[1] += X; break;\n\t\tcase 1: X = C * (2 - h6); rgb[0] += X; rgb[1] += C; break;\n\t\tcase 2: X = C * (h6 - 2); rgb[1] += C; rgb[2] += X; break;\n\t\tcase 3: X = C * (4 - h6); rgb[1] += X; rgb[2] += C; break;\n\t\tcase 4: X = C * (h6 - 4); rgb[2] += C; rgb[0] += X; break;\n\t\tcase 5: X = C * (6 - h6); rgb[2] += X; rgb[0] += C; break;\n\t}\n\tfor(var i = 0; i != 3; ++i) rgb[i] = Math.round(rgb[i]*255);\n\treturn rgb;\n}\n\n/* 18.8.3 bgColor tint algorithm */\nfunction rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}\n\n/* 18.3.1.13 width calculations */\n/* [MS-OI29500] 2.1.595 Column Width & Formatting */\nvar DEF_MDW = 6, MAX_MDW = 15, MIN_MDW = 1, MDW = DEF_MDW;\nfunction width2px(width) { return Math.floor(( width + (Math.round(128/MDW))/256 )* MDW ); }\nfunction px2char(px) { return (Math.floor((px - 5)/MDW * 100 + 0.5))/100; }\nfunction char2width(chr) { return (Math.round((chr * MDW + 5)/MDW*256))/256; }\n//function px2char_(px) { return (((px - 5)/MDW * 100 + 0.5))/100; }\n//function char2width_(chr) { return (((chr * MDW + 5)/MDW*256))/256; }\nfunction cycle_width(collw) { return char2width(px2char(width2px(collw))); }\n/* XLSX/XLSB/XLS specify width in units of MDW */\nfunction find_mdw_colw(collw) {\n\tvar delta = Math.abs(collw - cycle_width(collw)), _MDW = MDW;\n\tif(delta > 0.005) for(MDW=MIN_MDW; MDW 0.5) guess--;\n\t\tif(Math.abs(guess) < delta) { delta = Math.abs(guess); _MDW = MDW; }\n\t}\n\tMDW = _MDW;\n}*/\n\nfunction process_col(coll) {\n\tif(coll.width) {\n\t\tcoll.wpx = width2px(coll.width);\n\t\tcoll.wch = px2char(coll.wpx);\n\t\tcoll.MDW = MDW;\n\t} else if(coll.wpx) {\n\t\tcoll.wch = px2char(coll.wpx);\n\t\tcoll.width = char2width(coll.wch);\n\t\tcoll.MDW = MDW;\n\t} else if(typeof coll.wch == 'number') {\n\t\tcoll.width = char2width(coll.wch);\n\t\tcoll.wpx = width2px(coll.width);\n\t\tcoll.MDW = MDW;\n\t}\n\tif(coll.customWidth) delete coll.customWidth;\n}\n\nvar DEF_PPI = 96, PPI = DEF_PPI;\nfunction px2pt(px) { return px * 96 / PPI; }\nfunction pt2px(pt) { return pt * PPI / 96; }\n\n/* [MS-EXSPXML3] 2.4.54 ST_enmPattern */\nvar XLMLPatternTypeMap = {\n\t\"None\": \"none\",\n\t\"Solid\": \"solid\",\n\t\"Gray50\": \"mediumGray\",\n\t\"Gray75\": \"darkGray\",\n\t\"Gray25\": \"lightGray\",\n\t\"HorzStripe\": \"darkHorizontal\",\n\t\"VertStripe\": \"darkVertical\",\n\t\"ReverseDiagStripe\": \"darkDown\",\n\t\"DiagStripe\": \"darkUp\",\n\t\"DiagCross\": \"darkGrid\",\n\t\"ThickDiagCross\": \"darkTrellis\",\n\t\"ThinHorzStripe\": \"lightHorizontal\",\n\t\"ThinVertStripe\": \"lightVertical\",\n\t\"ThinReverseDiagStripe\": \"lightDown\",\n\t\"ThinHorzCross\": \"lightGrid\"\n};\n\n/* 18.8.5 borders CT_Borders */\nfunction parse_borders(t, styles, themes, opts) {\n\tstyles.Borders = [];\n\tvar border = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.4 border CT_Border */\n\t\t\tcase '': case '':\n\t\t\t\tborder = {};\n\t\t\t\tif(y.diagonalUp) border.diagonalUp = parsexmlbool(y.diagonalUp);\n\t\t\t\tif(y.diagonalDown) border.diagonalDown = parsexmlbool(y.diagonalDown);\n\t\t\t\tstyles.Borders.push(border);\n\t\t\t\tbreak;\n\t\t\tcase '': break;\n\n\t\t\t/* note: not in spec, appears to be CT_BorderPr */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* note: not in spec, appears to be CT_BorderPr */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.43 top CT_BorderPr */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.6 bottom CT_BorderPr */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.13 diagonal CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.25 horizontal CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.44 vertical CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.37 start CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.16 end CT_BorderPr */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.? color CT_Color */\n\t\t\tcase '':\n\t\t\t\tbreak;\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in borders');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.21 fills CT_Fills */\nfunction parse_fills(t, styles, themes, opts) {\n\tstyles.Fills = [];\n\tvar fill = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.20 fill CT_Fill */\n\t\t\tcase '': case '':\n\t\t\t\tfill = {}; styles.Fills.push(fill); break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.24 gradientFill CT_GradientFill */\n\t\t\tcase '': break;\n\t\t\tcase '': styles.Fills.push(fill); fill = {}; break;\n\n\t\t\t/* 18.8.32 patternFill CT_PatternFill */\n\t\t\tcase '':\n\t\t\t\tif(y.patternType) fill.patternType = y.patternType;\n\t\t\t\tbreak;\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.3 bgColor CT_Color */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.19 fgColor CT_Color */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.38 stop CT_GradientStop */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.? color CT_Color */\n\t\t\tcase '': break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in fills');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.23 fonts CT_Fonts */\nfunction parse_fonts(t, styles, themes, opts) {\n\tstyles.Fonts = [];\n\tvar font = {};\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.22 font CT_Font */\n\t\t\tcase '': break;\n\t\t\tcase '': case '':\n\t\t\t\tstyles.Fonts.push(font);\n\t\t\t\tfont = {};\n\t\t\t\tbreak;\n\n\t\t\t/* 18.8.29 name CT_FontName */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.2 b CT_BooleanProperty */\n\t\t\tcase '': font.bold = 1; break;\n\n\t\t\t/* 18.8.26 i CT_BooleanProperty */\n\t\t\tcase '': font.italic = 1; break;\n\n\t\t\t/* 18.4.13 u CT_UnderlineProperty */\n\t\t\tcase '': font.underline = 1; break;\n\n\t\t\t/* 18.4.10 strike CT_BooleanProperty */\n\t\t\tcase '': font.strike = 1; break;\n\n\t\t\t/* 18.4.2 outline CT_BooleanProperty */\n\t\t\tcase '': font.outline = 1; break;\n\n\t\t\t/* 18.8.36 shadow CT_BooleanProperty */\n\t\t\tcase '': font.shadow = 1; break;\n\n\t\t\t/* 18.8.12 condense CT_BooleanProperty */\n\t\t\tcase '': font.condense = 1; break;\n\n\t\t\t/* 18.8.17 extend CT_BooleanProperty */\n\t\t\tcase '': font.extend = 1; break;\n\n\t\t\t/* 18.4.11 sz CT_FontSize */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.4.14 vertAlign CT_VerticalAlignFontProperty */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.18 family CT_FontFamily */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.8.35 scheme CT_FontScheme */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.4.1 charset CT_IntProperty */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* note: sometimes mc:AlternateContent appears bare */\n\t\t\tcase '': pass = false; break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in fonts');\n\t\t\t}\n\t\t}\n\t});\n}\n\n/* 18.8.31 numFmts CT_NumFmts */\nfunction parse_numFmts(t, styles, opts) {\n\tstyles.NumberFmt = [];\n\tvar k/*Array*/ = (keys(SSF._table));\n\tfor(var i=0; i < k.length; ++i) styles.NumberFmt[k[i]] = SSF._table[k[i]];\n\tvar m = t[0].match(tagregex);\n\tif(!m) return;\n\tfor(i=0; i < m.length; ++i) {\n\t\tvar y = parsexmltag(m[i]);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': case '': break;\n\t\t\tcase '0) {\n\t\t\t\t\tif(j > 0x188) {\n\t\t\t\t\t\tfor(j = 0x188; j > 0x3c; --j) if(styles.NumberFmt[j] == null) break;\n\t\t\t\t\t\tstyles.NumberFmt[j] = f;\n\t\t\t\t\t}\n\t\t\t\t\tSSF.load(f,j);\n\t\t\t\t}\n\t\t\t} break;\n\t\t\tcase '': break;\n\t\t\tdefault: if(opts.WTF) throw new Error('unrecognized ' + y[0] + ' in numFmts');\n\t\t}\n\t}\n}\n\nfunction write_numFmts(NF) {\n\tvar o = [\"\"];\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\n\t\tfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) o[o.length] = (writextag('numFmt',null,{numFmtId:i,formatCode:escapexml(NF[i])}));\n\t});\n\tif(o.length === 1) return \"\";\n\to[o.length] = (\"\");\n\to[0] = writextag('numFmts', null, { count:o.length-2 }).replace(\"/>\", \">\");\n\treturn o.join(\"\");\n}\n\n/* 18.8.10 cellXfs CT_CellXfs */\nvar cellXF_uint = [ \"numFmtId\", \"fillId\", \"fontId\", \"borderId\", \"xfId\" ];\nvar cellXF_bool = [ \"applyAlignment\", \"applyBorder\", \"applyFill\", \"applyFont\", \"applyNumberFormat\", \"applyProtection\", \"pivotButton\", \"quotePrefix\" ];\nfunction parse_cellXfs(t, styles, opts) {\n\tstyles.CellXf = [];\n\tvar xf;\n\tvar pass = false;\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x), i = 0;\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.8.45 xf CT_Xf */\n\t\t\tcase '':\n\t\t\t\txf = y;\n\t\t\t\tdelete xf[0];\n\t\t\t\tfor(i = 0; i < cellXF_uint.length; ++i) if(xf[cellXF_uint[i]])\n\t\t\t\t\txf[cellXF_uint[i]] = parseInt(xf[cellXF_uint[i]], 10);\n\t\t\t\tfor(i = 0; i < cellXF_bool.length; ++i) if(xf[cellXF_bool[i]])\n\t\t\t\t\txf[cellXF_bool[i]] = parsexmlbool(xf[cellXF_bool[i]]);\n\t\t\t\tif(styles.NumberFmt && xf.numFmtId > 0x188) {\n\t\t\t\t\tfor(i = 0x188; i > 0x3c; --i) if(styles.NumberFmt[xf.numFmtId] == styles.NumberFmt[i]) { xf.numFmtId = i; break; }\n\t\t\t\t}\n\t\t\t\tstyles.CellXf.push(xf); break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.1 alignment CT_CellAlignment */\n\t\t\tcase '':\n\t\t\t\tvar alignment = {};\n\t\t\t\tif(y.vertical) alignment.vertical = y.vertical;\n\t\t\t\tif(y.horizontal) alignment.horizontal = y.horizontal;\n\t\t\t\tif(y.textRotation != null) alignment.textRotation = y.textRotation;\n\t\t\t\tif(y.indent) alignment.indent = y.indent;\n\t\t\t\tif(y.wrapText) alignment.wrapText = parsexmlbool(y.wrapText);\n\t\t\t\txf.alignment = alignment;\n\t\t\t\tbreak;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.8.33 protection CT_CellProtection */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* note: sometimes mc:AlternateContent appears bare */\n\t\t\tcase '': pass = false; break;\n\n\t\t\t/* 18.2.10 extLst CT_ExtensionList ? */\n\t\t\tcase '': case '': break;\n\t\t\tcase '': pass = false; break;\n\t\t\tdefault: if(opts && opts.WTF) {\n\t\t\t\tif(!pass) throw new Error('unrecognized ' + y[0] + ' in cellXfs');\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction write_cellXfs(cellXfs) {\n\tvar o = [];\n\to[o.length] = (writextag('cellXfs',null));\n\tcellXfs.forEach(function(c) {\n\t\to[o.length] = (writextag('xf', null, c));\n\t});\n\to[o.length] = (\"\");\n\tif(o.length === 2) return \"\";\n\to[0] = writextag('cellXfs',null, {count:o.length-2}).replace(\"/>\",\">\");\n\treturn o.join(\"\");\n}\n\n/* 18.8 Styles CT_Stylesheet*/\nvar parse_sty_xml= (function make_pstyx() {\nvar numFmtRegex = /<(?:\\w+:)?numFmts([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?numFmts>/;\nvar cellXfRegex = /<(?:\\w+:)?cellXfs([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?cellXfs>/;\nvar fillsRegex = /<(?:\\w+:)?fills([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?fills>/;\nvar fontsRegex = /<(?:\\w+:)?fonts([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?fonts>/;\nvar bordersRegex = /<(?:\\w+:)?borders([^>]*)>[\\S\\s]*?<\\/(?:\\w+:)?borders>/;\n\nreturn function parse_sty_xml(data, themes, opts) {\n\tvar styles = {};\n\tif(!data) return styles;\n\tdata = data.replace(//mg,\"\").replace(//gm,\"\");\n\t/* 18.8.39 styleSheet CT_Stylesheet */\n\tvar t;\n\n\t/* 18.8.31 numFmts CT_NumFmts ? */\n\tif((t=data.match(numFmtRegex))) parse_numFmts(t, styles, opts);\n\n\t/* 18.8.23 fonts CT_Fonts ? */\n\tif((t=data.match(fontsRegex))) parse_fonts(t, styles, themes, opts);\n\n\t/* 18.8.21 fills CT_Fills ? */\n\tif((t=data.match(fillsRegex))) parse_fills(t, styles, themes, opts);\n\n\t/* 18.8.5 borders CT_Borders ? */\n\tif((t=data.match(bordersRegex))) parse_borders(t, styles, themes, opts);\n\n\t/* 18.8.9 cellStyleXfs CT_CellStyleXfs ? */\n\t/* 18.8.8 cellStyles CT_CellStyles ? */\n\n\t/* 18.8.10 cellXfs CT_CellXfs ? */\n\tif((t=data.match(cellXfRegex))) parse_cellXfs(t, styles, opts);\n\n\t/* 18.8.15 dxfs CT_Dxfs ? */\n\t/* 18.8.42 tableStyles CT_TableStyles ? */\n\t/* 18.8.11 colors CT_Colors ? */\n\t/* 18.2.10 extLst CT_ExtensionList ? */\n\n\treturn styles;\n};\n})();\n\nvar STYLES_XML_ROOT = writextag('styleSheet', null, {\n\t'xmlns': XMLNS.main[0],\n\t'xmlns:vt': XMLNS.vt\n});\n\nRELS.STY = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\";\n\nfunction write_sty_xml(wb, opts) {\n\tvar o = [XML_HEADER, STYLES_XML_ROOT], w;\n\tif(wb.SSF && (w = write_numFmts(wb.SSF)) != null) o[o.length] = w;\n\to[o.length] = ('');\n\to[o.length] = ('');\n\to[o.length] = ('');\n\to[o.length] = ('');\n\tif((w = write_cellXfs(opts.cellXfs))) o[o.length] = (w);\n\to[o.length] = ('');\n\to[o.length] = ('');\n\to[o.length] = ('');\n\n\tif(o.length>2){ o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.657 BrtFmt */\nfunction parse_BrtFmt(data, length) {\n\tvar numFmtId = data.read_shift(2);\n\tvar stFmtCode = parse_XLWideString(data,length-2);\n\treturn [numFmtId, stFmtCode];\n}\nfunction write_BrtFmt(i, f, o) {\n\tif(!o) o = new_buf(6 + 4 * f.length);\n\to.write_shift(2, i);\n\twrite_XLWideString(f, o);\n\tvar out = (o.length > o.l) ? o.slice(0, o.l) : o;\n\tif(o.l == null) o.l = o.length;\n\treturn out;\n}\n\n/* [MS-XLSB] 2.4.659 BrtFont TODO */\nfunction parse_BrtFont(data, length, opts) {\n\tvar out = ({});\n\n\tout.sz = data.read_shift(2) / 20;\n\n\tvar grbit = parse_FontFlags(data, 2, opts);\n\tif(grbit.fItalic) out.italic = 1;\n\tif(grbit.fCondense) out.condense = 1;\n\tif(grbit.fExtend) out.extend = 1;\n\tif(grbit.fShadow) out.shadow = 1;\n\tif(grbit.fOutline) out.outline = 1;\n\tif(grbit.fStrikeout) out.strike = 1;\n\n\tvar bls = data.read_shift(2);\n\tif(bls === 0x02BC) out.bold = 1;\n\n\tswitch(data.read_shift(2)) {\n\t\t/* case 0: out.vertAlign = \"baseline\"; break; */\n\t\tcase 1: out.vertAlign = \"superscript\"; break;\n\t\tcase 2: out.vertAlign = \"subscript\"; break;\n\t}\n\n\tvar underline = data.read_shift(1);\n\tif(underline != 0) out.underline = underline;\n\n\tvar family = data.read_shift(1);\n\tif(family > 0) out.family = family;\n\n\tvar bCharSet = data.read_shift(1);\n\tif(bCharSet > 0) out.charset = bCharSet;\n\n\tdata.l++;\n\tout.color = parse_BrtColor(data, 8);\n\n\tswitch(data.read_shift(1)) {\n\t\t/* case 0: out.scheme = \"none\": break; */\n\t\tcase 1: out.scheme = \"major\"; break;\n\t\tcase 2: out.scheme = \"minor\"; break;\n\t}\n\n\tout.name = parse_XLWideString(data, length - 21);\n\n\treturn out;\n}\nfunction write_BrtFont(font, o) {\n\tif(!o) o = new_buf(25+4*32);\n\to.write_shift(2, font.sz * 20);\n\twrite_FontFlags(font, o);\n\to.write_shift(2, font.bold ? 0x02BC : 0x0190);\n\tvar sss = 0;\n\tif(font.vertAlign == \"superscript\") sss = 1;\n\telse if(font.vertAlign == \"subscript\") sss = 2;\n\to.write_shift(2, sss);\n\to.write_shift(1, font.underline || 0);\n\to.write_shift(1, font.family || 0);\n\to.write_shift(1, font.charset || 0);\n\to.write_shift(1, 0);\n\twrite_BrtColor(font.color, o);\n\tvar scheme = 0;\n\tif(font.scheme == \"major\") scheme = 1;\n\tif(font.scheme == \"minor\") scheme = 2;\n\to.write_shift(1, scheme);\n\twrite_XLWideString(font.name, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.650 BrtFill */\nvar XLSBFillPTNames = [\n\t\"none\",\n\t\"solid\",\n\t\"mediumGray\",\n\t\"darkGray\",\n\t\"lightGray\",\n\t\"darkHorizontal\",\n\t\"darkVertical\",\n\t\"darkDown\",\n\t\"darkUp\",\n\t\"darkGrid\",\n\t\"darkTrellis\",\n\t\"lightHorizontal\",\n\t\"lightVertical\",\n\t\"lightDown\",\n\t\"lightUp\",\n\t\"lightGrid\",\n\t\"lightTrellis\",\n\t\"gray125\",\n\t\"gray0625\"\n];\nvar rev_XLSBFillPTNames = (evert(XLSBFillPTNames));\n/* TODO: gradient fill representation */\nvar parse_BrtFill = parsenoop;\nfunction write_BrtFill(fill, o) {\n\tif(!o) o = new_buf(4*3 + 8*7 + 16*1);\n\tvar fls = rev_XLSBFillPTNames[fill.patternType];\n\tif(fls == null) fls = 0x28;\n\to.write_shift(4, fls);\n\tvar j = 0;\n\tif(fls != 0x28) {\n\t\t/* TODO: custom FG Color */\n\t\twrite_BrtColor({auto:1}, o);\n\t\t/* TODO: custom BG Color */\n\t\twrite_BrtColor({auto:1}, o);\n\n\t\tfor(; j < 12; ++j) o.write_shift(4, 0);\n\t} else {\n\t\tfor(; j < 4; ++j) o.write_shift(4, 0);\n\n\t\tfor(; j < 12; ++j) o.write_shift(4, 0); /* TODO */\n\t\t/* iGradientType */\n\t\t/* xnumDegree */\n\t\t/* xnumFillToLeft */\n\t\t/* xnumFillToRight */\n\t\t/* xnumFillToTop */\n\t\t/* xnumFillToBottom */\n\t\t/* cNumStop */\n\t\t/* xfillGradientStop */\n\t}\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.824 BrtXF */\nfunction parse_BrtXF(data, length) {\n\tvar tgt = data.l + length;\n\tvar ixfeParent = data.read_shift(2);\n\tvar ifmt = data.read_shift(2);\n\tdata.l = tgt;\n\treturn {ixfe:ixfeParent, numFmtId:ifmt };\n}\nfunction write_BrtXF(data, ixfeP, o) {\n\tif(!o) o = new_buf(16);\n\to.write_shift(2, ixfeP||0);\n\to.write_shift(2, data.numFmtId||0);\n\to.write_shift(2, 0); /* iFont */\n\to.write_shift(2, 0); /* iFill */\n\to.write_shift(2, 0); /* ixBorder */\n\to.write_shift(1, 0); /* trot */\n\to.write_shift(1, 0); /* indent */\n\tvar flow = 0;\n\to.write_shift(1, flow); /* flags */\n\to.write_shift(1, 0); /* flags */\n\to.write_shift(1, 0); /* xfGrbitAtr */\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.5.4 Blxf TODO */\nfunction write_Blxf(data, o) {\n\tif(!o) o = new_buf(10);\n\to.write_shift(1, 0); /* dg */\n\to.write_shift(1, 0);\n\to.write_shift(4, 0); /* color */\n\to.write_shift(4, 0); /* color */\n\treturn o;\n}\n/* [MS-XLSB] 2.4.302 BrtBorder TODO */\nvar parse_BrtBorder = parsenoop;\nfunction write_BrtBorder(border, o) {\n\tif(!o) o = new_buf(51);\n\to.write_shift(1, 0); /* diagonal */\n\twrite_Blxf(null, o); /* top */\n\twrite_Blxf(null, o); /* bottom */\n\twrite_Blxf(null, o); /* left */\n\twrite_Blxf(null, o); /* right */\n\twrite_Blxf(null, o); /* diag */\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.763 BrtStyle TODO */\nfunction write_BrtStyle(style, o) {\n\tif(!o) o = new_buf(12+4*10);\n\to.write_shift(4, style.xfId);\n\to.write_shift(2, 1);\n\to.write_shift(1, +style.builtinId);\n\to.write_shift(1, 0); /* iLevel */\n\twrite_XLNullableWideString(style.name || \"\", o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.272 BrtBeginTableStyles */\nfunction write_BrtBeginTableStyles(cnt, defTableStyle, defPivotStyle) {\n\tvar o = new_buf(4+256*2*4);\n\to.write_shift(4, cnt);\n\twrite_XLNullableWideString(defTableStyle, o);\n\twrite_XLNullableWideString(defPivotStyle, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.1.7.50 Styles */\nfunction parse_sty_bin(data, themes, opts) {\n\tvar styles = {};\n\tstyles.NumberFmt = ([]);\n\tfor(var y in SSF._table) styles.NumberFmt[y] = SSF._table[y];\n\n\tstyles.CellXf = [];\n\tstyles.Fonts = [];\n\tvar state = [];\n\tvar pass = false;\n\trecordhopper(data, function hopper_sty(val, R_n, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x002C: /* 'BrtFmt' */\n\t\t\t\tstyles.NumberFmt[val[0]] = val[1]; SSF.load(val[1], val[0]);\n\t\t\t\tbreak;\n\t\t\tcase 0x002B: /* 'BrtFont' */\n\t\t\t\tstyles.Fonts.push(val);\n\t\t\t\tif(val.color.theme != null && themes && themes.themeElements && themes.themeElements.clrScheme) {\n\t\t\t\t\tval.color.rgb = rgb_tint(themes.themeElements.clrScheme[val.color.theme].rgb, val.color.tint || 0);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 0x0401: /* 'BrtKnownFonts' */ break;\n\t\t\tcase 0x002D: /* 'BrtFill' */\n\t\t\t\tbreak;\n\t\t\tcase 0x002E: /* 'BrtBorder' */\n\t\t\t\tbreak;\n\t\t\tcase 0x002F: /* 'BrtXF' */\n\t\t\t\tif(state[state.length - 1] == \"BrtBeginCellXFs\") {\n\t\t\t\t\tstyles.CellXf.push(val);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 0x0030: /* 'BrtStyle' */\n\t\t\tcase 0x01FB: /* 'BrtDXF' */\n\t\t\tcase 0x023C: /* 'BrtMRUColor' */\n\t\t\tcase 0x01DB: /* 'BrtIndexedColor': */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0493: /* 'BrtDXF14' */\n\t\t\tcase 0x0836: /* 'BrtDXF15' */\n\t\t\tcase 0x046A: /* 'BrtSlicerStyleElement' */\n\t\t\tcase 0x0200: /* 'BrtTableStyleElement' */\n\t\t\tcase 0x082F: /* 'BrtTimelineStyleElement' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(R_n); pass = true; break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif((R_n||\"\").indexOf(\"Begin\") > 0) state.push(R_n);\n\t\t\t\telse if((R_n||\"\").indexOf(\"End\") > 0) state.pop();\n\t\t\t\telse if(!pass || (opts.WTF && state[state.length-1] != \"BrtACBegin\")) throw new Error(\"Unexpected record \" + RT + \" \" + R_n);\n\t\t}\n\t});\n\treturn styles;\n}\n\nfunction write_FMTS_bin(ba, NF) {\n\tif(!NF) return;\n\tvar cnt = 0;\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\nfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) ++cnt;\n\t});\n\n\tif(cnt == 0) return;\n\twrite_record(ba, \"BrtBeginFmts\", write_UInt32LE(cnt));\n\t[[5,8],[23,26],[41,44],[/*63*/50,/*66],[164,*/392]].forEach(function(r) {\nfor(var i = r[0]; i <= r[1]; ++i) if(NF[i] != null) write_record(ba, \"BrtFmt\", write_BrtFmt(i, NF[i]));\n\t});\n\twrite_record(ba, \"BrtEndFmts\");\n}\n\nfunction write_FONTS_bin(ba) {\n\tvar cnt = 1;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, \"BrtBeginFonts\", write_UInt32LE(cnt));\n\twrite_record(ba, \"BrtFont\", write_BrtFont({\n\t\tsz:12,\n\t\tcolor: {theme:1},\n\t\tname: \"Calibri\",\n\t\tfamily: 2,\n\t\tscheme: \"minor\"\n\t}));\n\t/* 1*65491BrtFont [ACFONTS] */\n\twrite_record(ba, \"BrtEndFonts\");\n}\n\nfunction write_FILLS_bin(ba) {\n\tvar cnt = 2;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, \"BrtBeginFills\", write_UInt32LE(cnt));\n\twrite_record(ba, \"BrtFill\", write_BrtFill({patternType:\"none\"}));\n\twrite_record(ba, \"BrtFill\", write_BrtFill({patternType:\"gray125\"}));\n\t/* 1*65431BrtFill */\n\twrite_record(ba, \"BrtEndFills\");\n}\n\nfunction write_BORDERS_bin(ba) {\n\tvar cnt = 1;\n\n\tif(cnt == 0) return;\n\twrite_record(ba, \"BrtBeginBorders\", write_UInt32LE(cnt));\n\twrite_record(ba, \"BrtBorder\", write_BrtBorder({}));\n\t/* 1*65430BrtBorder */\n\twrite_record(ba, \"BrtEndBorders\");\n}\n\nfunction write_CELLSTYLEXFS_bin(ba) {\n\tvar cnt = 1;\n\twrite_record(ba, \"BrtBeginCellStyleXFs\", write_UInt32LE(cnt));\n\twrite_record(ba, \"BrtXF\", write_BrtXF({\n\t\tnumFmtId: 0,\n\t\tfontId: 0,\n\t\tfillId: 0,\n\t\tborderId: 0\n\t}, 0xFFFF));\n\t/* 1*65430(BrtXF *FRT) */\n\twrite_record(ba, \"BrtEndCellStyleXFs\");\n}\n\nfunction write_CELLXFS_bin(ba, data) {\n\twrite_record(ba, \"BrtBeginCellXFs\", write_UInt32LE(data.length));\n\tdata.forEach(function(c) { write_record(ba, \"BrtXF\", write_BrtXF(c,0)); });\n\t/* 1*65430(BrtXF *FRT) */\n\twrite_record(ba, \"BrtEndCellXFs\");\n}\n\nfunction write_STYLES_bin(ba) {\n\tvar cnt = 1;\n\n\twrite_record(ba, \"BrtBeginStyles\", write_UInt32LE(cnt));\n\twrite_record(ba, \"BrtStyle\", write_BrtStyle({\n\t\txfId:0,\n\t\tbuiltinId:0,\n\t\tname:\"Normal\"\n\t}));\n\t/* 1*65430(BrtStyle *FRT) */\n\twrite_record(ba, \"BrtEndStyles\");\n}\n\nfunction write_DXFS_bin(ba) {\n\tvar cnt = 0;\n\n\twrite_record(ba, \"BrtBeginDXFs\", write_UInt32LE(cnt));\n\t/* *2147483647(BrtDXF *FRT) */\n\twrite_record(ba, \"BrtEndDXFs\");\n}\n\nfunction write_TABLESTYLES_bin(ba) {\n\tvar cnt = 0;\n\n\twrite_record(ba, \"BrtBeginTableStyles\", write_BrtBeginTableStyles(cnt, \"TableStyleMedium9\", \"PivotStyleMedium4\"));\n\t/* *TABLESTYLE */\n\twrite_record(ba, \"BrtEndTableStyles\");\n}\n\nfunction write_COLORPALETTE_bin() {\n\treturn;\n\t/* BrtBeginColorPalette [INDEXEDCOLORS] [MRUCOLORS] BrtEndColorPalette */\n}\n\n/* [MS-XLSB] 2.1.7.50 Styles */\nfunction write_sty_bin(wb, opts) {\n\tvar ba = buf_array();\n\twrite_record(ba, \"BrtBeginStyleSheet\");\n\twrite_FMTS_bin(ba, wb.SSF);\n\twrite_FONTS_bin(ba, wb);\n\twrite_FILLS_bin(ba, wb);\n\twrite_BORDERS_bin(ba, wb);\n\twrite_CELLSTYLEXFS_bin(ba, wb);\n\twrite_CELLXFS_bin(ba, opts.cellXfs);\n\twrite_STYLES_bin(ba, wb);\n\twrite_DXFS_bin(ba, wb);\n\twrite_TABLESTYLES_bin(ba, wb);\n\twrite_COLORPALETTE_bin(ba, wb);\n\t/* FRTSTYLESHEET*/\n\twrite_record(ba, \"BrtEndStyleSheet\");\n\treturn ba.end();\n}\nRELS.THEME = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\";\n\n/* Even though theme layout is dk1 lt1 dk2 lt2, true order is lt1 dk1 lt2 dk2 */\nvar XLSXThemeClrScheme = [\n\t'', '', '', '',\n\t'', '', '',\n\t'', '', '',\n\t'', ''\n];\n/* 20.1.6.2 clrScheme CT_ColorScheme */\nfunction parse_clrScheme(t, themes, opts) {\n\tthemes.themeElements.clrScheme = [];\n\tvar color = {};\n\t(t[0].match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\t/* 20.1.6.2 clrScheme (Color Scheme) CT_ColorScheme */\n\t\t\tcase '': break;\n\n\t\t\t/* 20.1.2.3.32 srgbClr CT_SRgbColor */\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\tcase '': case '':\n\t\t\t\tif (y[0].charAt(1) === '/') {\n\t\t\t\t\tthemes.themeElements.clrScheme[XLSXThemeClrScheme.indexOf(y[0])] = color;\n\t\t\t\t\tcolor = {};\n\t\t\t\t} else {\n\t\t\t\t\tcolor.name = y[0].slice(3, y[0].length - 1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault: if(opts && opts.WTF) throw new Error('Unrecognized ' + y[0] + ' in clrScheme');\n\t\t}\n\t});\n}\n\n/* 20.1.4.1.18 fontScheme CT_FontScheme */\nfunction parse_fontScheme() { }\n\n/* 20.1.4.1.15 fmtScheme CT_StyleMatrix */\nfunction parse_fmtScheme() { }\n\nvar clrsregex = /]*)>[\\s\\S]*<\\/a:clrScheme>/;\nvar fntsregex = /]*)>[\\s\\S]*<\\/a:fontScheme>/;\nvar fmtsregex = /]*)>[\\s\\S]*<\\/a:fmtScheme>/;\n\n/* 20.1.6.10 themeElements CT_BaseStyles */\nfunction parse_themeElements(data, themes, opts) {\n\tthemes.themeElements = {};\n\n\tvar t;\n\n\t[\n\t\t/* clrScheme CT_ColorScheme */\n\t\t['clrScheme', clrsregex, parse_clrScheme],\n\t\t/* fontScheme CT_FontScheme */\n\t\t['fontScheme', fntsregex, parse_fontScheme],\n\t\t/* fmtScheme CT_StyleMatrix */\n\t\t['fmtScheme', fmtsregex, parse_fmtScheme]\n\t].forEach(function(m) {\n\t\tif(!(t=data.match(m[1]))) throw new Error(m[0] + ' not found in themeElements');\n\t\tm[2](t, themes, opts);\n\t});\n}\n\nvar themeltregex = /]*)>[\\s\\S]*<\\/a:themeElements>/;\n\n/* 14.2.7 Theme Part */\nfunction parse_theme_xml(data, opts) {\n\t/* 20.1.6.9 theme CT_OfficeStyleSheet */\n\tif(!data || data.length === 0) return parse_theme_xml(write_theme());\n\n\tvar t;\n\tvar themes = {};\n\n\t/* themeElements CT_BaseStyles */\n\tif(!(t=data.match(themeltregex))) throw new Error('themeElements not found in theme');\n\tparse_themeElements(t[0], themes, opts);\n\tthemes.raw = data;\n\treturn themes;\n}\n\nfunction write_theme(Themes, opts) {\n\tif(opts && opts.themeXLSX) return opts.themeXLSX;\n\tif(Themes && typeof Themes.raw == \"string\") return Themes.raw;\n\tvar o = [XML_HEADER];\n\to[o.length] = '';\n\to[o.length] = '';\n\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\to[o.length] = '';\n\treturn o.join(\"\");\n}\n/* [MS-XLS] 2.4.326 TODO: payload is a zip file */\nfunction parse_Theme(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar dwThemeVersion = blob.read_shift(4);\n\tif(dwThemeVersion === 124226) return;\n\tif(!opts.cellStyles) { blob.l = end; return; }\n\tvar data = blob.slice(blob.l);\n\tblob.l = end;\n\tvar zip; try { zip = zip_read(data, {type: \"array\"}); } catch(e) { return; }\n\tvar themeXML = getzipstr(zip, \"theme/theme/theme1.xml\", true);\n\tif(!themeXML) return;\n\treturn parse_theme_xml(themeXML, opts);\n}\n\n/* 2.5.49 */\nfunction parse_ColorTheme(blob) { return blob.read_shift(4); }\n\n/* 2.5.155 */\nfunction parse_FullColorExt(blob) {\n\tvar o = {};\n\to.xclrType = blob.read_shift(2);\n\to.nTintShade = blob.read_shift(2);\n\tswitch(o.xclrType) {\n\t\tcase 0: blob.l += 4; break;\n\t\tcase 1: o.xclrValue = parse_IcvXF(blob, 4); break;\n\t\tcase 2: o.xclrValue = parse_LongRGBA(blob, 4); break;\n\t\tcase 3: o.xclrValue = parse_ColorTheme(blob, 4); break;\n\t\tcase 4: blob.l += 4; break;\n\t}\n\tblob.l += 8;\n\treturn o;\n}\n\n/* 2.5.164 TODO: read 7 bits*/\nfunction parse_IcvXF(blob, length) {\n\treturn parsenoop(blob, length);\n}\n\n/* 2.5.280 */\nfunction parse_XFExtGradient(blob, length) {\n\treturn parsenoop(blob, length);\n}\n\n/* [MS-XLS] 2.5.108 */\nfunction parse_ExtProp(blob) {\n\tvar extType = blob.read_shift(2);\n\tvar cb = blob.read_shift(2) - 4;\n\tvar o = [extType];\n\tswitch(extType) {\n\t\tcase 0x04: case 0x05: case 0x07: case 0x08:\n\t\tcase 0x09: case 0x0A: case 0x0B: case 0x0D:\n\t\t\to[1] = parse_FullColorExt(blob, cb); break;\n\t\tcase 0x06: o[1] = parse_XFExtGradient(blob, cb); break;\n\t\tcase 0x0E: case 0x0F: o[1] = blob.read_shift(cb === 1 ? 1 : 2); break;\n\t\tdefault: throw new Error(\"Unrecognized ExtProp type: \" + extType + \" \" + cb);\n\t}\n\treturn o;\n}\n\n/* 2.4.355 */\nfunction parse_XFExt(blob, length) {\n\tvar end = blob.l + length;\n\tblob.l += 2;\n\tvar ixfe = blob.read_shift(2);\n\tblob.l += 2;\n\tvar cexts = blob.read_shift(2);\n\tvar ext = [];\n\twhile(cexts-- > 0) ext.push(parse_ExtProp(blob, end-blob.l));\n\treturn {ixfe:ixfe, ext:ext};\n}\n\n/* xf is an XF, see parse_XFExt for xfext */\nfunction update_xfext(xf, xfext) {\n\txfext.forEach(function(xfe) {\n\t\tswitch(xfe[0]) { /* 2.5.108 extPropData */\n\t\t\tcase 0x04: break; /* foreground color */\n\t\t\tcase 0x05: break; /* background color */\n\t\t\tcase 0x06: break; /* gradient fill */\n\t\t\tcase 0x07: break; /* top cell border color */\n\t\t\tcase 0x08: break; /* bottom cell border color */\n\t\t\tcase 0x09: break; /* left cell border color */\n\t\t\tcase 0x0a: break; /* right cell border color */\n\t\t\tcase 0x0b: break; /* diagonal cell border color */\n\t\t\tcase 0x0d: /* text color */\n\t\t\t\tbreak;\n\t\t\tcase 0x0e: break; /* font scheme */\n\t\t\tcase 0x0f: break; /* indentation level */\n\t\t}\n\t});\n}\n\n/* 18.6 Calculation Chain */\nfunction parse_cc_xml(data) {\n\tvar d = [];\n\tif(!data) return d;\n\tvar i = 1;\n\t(data.match(tagregex)||[]).forEach(function(x) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(y[0]) {\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.6.1 c CT_CalcCell 1 */\n\t\t\tcase ' 0){/* empty */}\n\t\t\t\telse if((R_n||\"\").indexOf(\"End\") > 0){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record \" + RT + \" \" + R_n);\n\t\t}\n\t});\n\treturn out;\n}\n\n//function write_cc_bin(data, opts) { }\n/* 18.14 Supplementary Workbook Data */\nfunction parse_xlink_xml() {\n\t//var opts = _opts || {};\n\t//if(opts.WTF) throw \"XLSX External Link\";\n}\n\n/* [MS-XLSB] 2.1.7.25 External Link */\nfunction parse_xlink_bin(data, rel, name, _opts) {\n\tif(!data) return data;\n\tvar opts = _opts || {};\n\n\tvar pass = false, end = false;\n\n\trecordhopper(data, function xlink_parse(val, R_n, RT) {\n\t\tif(end) return;\n\t\tswitch(RT) {\n\t\t\tcase 0x0167: /* 'BrtSupTabs' */\n\t\t\tcase 0x016B: /* 'BrtExternTableStart' */\n\t\t\tcase 0x016C: /* 'BrtExternTableEnd' */\n\t\t\tcase 0x016E: /* 'BrtExternRowHdr' */\n\t\t\tcase 0x016F: /* 'BrtExternCellBlank' */\n\t\t\tcase 0x0170: /* 'BrtExternCellReal' */\n\t\t\tcase 0x0171: /* 'BrtExternCellBool' */\n\t\t\tcase 0x0172: /* 'BrtExternCellError' */\n\t\t\tcase 0x0173: /* 'BrtExternCellString' */\n\t\t\tcase 0x01D8: /* 'BrtExternValueMeta' */\n\t\t\tcase 0x0241: /* 'BrtSupNameStart' */\n\t\t\tcase 0x0242: /* 'BrtSupNameValueStart' */\n\t\t\tcase 0x0243: /* 'BrtSupNameValueEnd' */\n\t\t\tcase 0x0244: /* 'BrtSupNameNum' */\n\t\t\tcase 0x0245: /* 'BrtSupNameErr' */\n\t\t\tcase 0x0246: /* 'BrtSupNameSt' */\n\t\t\tcase 0x0247: /* 'BrtSupNameNil' */\n\t\t\tcase 0x0248: /* 'BrtSupNameBool' */\n\t\t\tcase 0x0249: /* 'BrtSupNameFmla' */\n\t\t\tcase 0x024A: /* 'BrtSupNameBits' */\n\t\t\tcase 0x024B: /* 'BrtSupNameEnd' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif((R_n||\"\").indexOf(\"Begin\") > 0){/* empty */}\n\t\t\t\telse if((R_n||\"\").indexOf(\"End\") > 0){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record \" + RT.toString(16) + \" \" + R_n);\n\t\t}\n\t}, opts);\n}\n/* 20.5 DrawingML - SpreadsheetML Drawing */\nRELS.IMG = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\";\nRELS.DRAW = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing\";\n\n/* 20.5.2.35 wsDr CT_Drawing */\nfunction parse_drawing(data, rels) {\n\tif(!data) return \"??\";\n\t/*\n\t Chartsheet Drawing:\n\t - 20.5.2.35 wsDr CT_Drawing\n\t - 20.5.2.1 absoluteAnchor CT_AbsoluteAnchor\n\t - 20.5.2.16 graphicFrame CT_GraphicalObjectFrame\n\t - 20.1.2.2.16 graphic CT_GraphicalObject\n\t - 20.1.2.2.17 graphicData CT_GraphicalObjectData\n - chart reference\n\t the actual type is based on the URI of the graphicData\n\t\tTODO: handle embedded charts and other types of graphics\n\t*/\n\tvar id = (data.match(/]*r:id=\"([^\"]*)\"/)||[\"\",\"\"])[1];\n\n\treturn rels['!id'][id].Target;\n}\n\n/* L.5.5.2 SpreadsheetML Comments + VML Schema */\nvar _shapeid = 1024;\nfunction write_comments_vml(rId, comments) {\n\tvar csize = [21600, 21600];\n\t/* L.5.2.1.2 Path Attribute */\n\tvar bbox = [\"m0,0l0\",csize[1],csize[0],csize[1],csize[0],\"0xe\"].join(\",\");\n\tvar o = [\n\t\twritextag(\"xml\", null, { 'xmlns:v': XLMLNS.v, 'xmlns:o': XLMLNS.o, 'xmlns:x': XLMLNS.x, 'xmlns:mv': XLMLNS.mv }).replace(/\\/>/,\">\"),\n\t\twritextag(\"o:shapelayout\", writextag(\"o:idmap\", null, {'v:ext':\"edit\", 'data':rId}), {'v:ext':\"edit\"}),\n\t\twritextag(\"v:shapetype\", [\n\t\t\twritextag(\"v:stroke\", null, {joinstyle:\"miter\"}),\n\t\t\twritextag(\"v:path\", null, {gradientshapeok:\"t\", 'o:connecttype':\"rect\"})\n\t\t].join(\"\"), {id:\"_x0000_t202\", 'o:spt':202, coordsize:csize.join(\",\"),path:bbox})\n\t];\n\twhile(_shapeid < rId * 1000) _shapeid += 1000;\n\n\tcomments.forEach(function(x) {\n\tvar c = decode_cell(x[0]);\n\tvar fillopts = {'color2':\"#BEFF82\", 'type':\"gradient\"};\n\tif(fillopts.type == \"gradient\") fillopts.angle = \"-180\";\n\tvar fillparm = fillopts.type == \"gradient\" ? writextag(\"o:fill\", null, {type:\"gradientUnscaled\", 'v:ext':\"view\"}) : null;\n\tvar fillxml = writextag('v:fill', fillparm, fillopts);\n\n\tvar shadata = ({on:\"t\", 'obscured':\"t\"});\n\t++_shapeid;\n\n\to = o.concat([\n\t'',\n\t\tfillxml,\n\t\twritextag(\"v:shadow\", null, shadata),\n\t\twritextag(\"v:path\", null, {'o:connecttype':\"none\"}),\n\t\t'',\n\t\t'',\n\t\t\t'',\n\t\t\t'',\n\t\t\t/* Part 4 19.4.2.3 Anchor (Anchor) */\n\t\t\twritetag('x:Anchor', [c.c+1, 0, c.r+1, 0, c.c+3, 20, c.r+5, 20].join(\",\")),\n\t\t\twritetag('x:AutoFill', \"False\"),\n\t\t\twritetag('x:Row', String(c.r)),\n\t\t\twritetag('x:Column', String(c.c)),\n\t\t\tx[1].hidden ? '' : '',\n\t\t'',\n\t''\n\t]); });\n\to.push('');\n\treturn o.join(\"\");\n}\nRELS.CMNT = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments\";\n\nfunction sheet_insert_comments(sheet, comments) {\n\tvar dense = Array.isArray(sheet);\n\tvar cell;\n\tcomments.forEach(function(comment) {\n\t\tvar r = decode_cell(comment.ref);\n\t\tif(dense) {\n\t\t\tif(!sheet[r.r]) sheet[r.r] = [];\n\t\t\tcell = sheet[r.r][r.c];\n\t\t} else cell = sheet[comment.ref];\n\t\tif (!cell) {\n\t\t\tcell = ({t:\"z\"});\n\t\t\tif(dense) sheet[r.r][r.c] = cell;\n\t\t\telse sheet[comment.ref] = cell;\n\t\t\tvar range = safe_decode_range(sheet[\"!ref\"]||\"BDWGO1000001:A1\");\n\t\t\tif(range.s.r > r.r) range.s.r = r.r;\n\t\t\tif(range.e.r < r.r) range.e.r = r.r;\n\t\t\tif(range.s.c > r.c) range.s.c = r.c;\n\t\t\tif(range.e.c < r.c) range.e.c = r.c;\n\t\t\tvar encoded = encode_range(range);\n\t\t\tif (encoded !== sheet[\"!ref\"]) sheet[\"!ref\"] = encoded;\n\t\t}\n\n\t\tif (!cell.c) cell.c = [];\n\t\tvar o = ({a: comment.author, t: comment.t, r: comment.r});\n\t\tif(comment.h) o.h = comment.h;\n\t\tcell.c.push(o);\n\t});\n}\n\n/* 18.7 Comments */\nfunction parse_comments_xml(data, opts) {\n\t/* 18.7.6 CT_Comments */\n\tif(data.match(/<(?:\\w+:)?comments *\\/>/)) return [];\n\tvar authors = [];\n\tvar commentList = [];\n\tvar authtag = data.match(/<(?:\\w+:)?authors>([\\s\\S]*)<\\/(?:\\w+:)?authors>/);\n\tif(authtag && authtag[1]) authtag[1].split(/<\\/\\w*:?author>/).forEach(function(x) {\n\t\tif(x === \"\" || x.trim() === \"\") return;\n\t\tvar a = x.match(/<(?:\\w+:)?author[^>]*>(.*)/);\n\t\tif(a) authors.push(a[1]);\n\t});\n\tvar cmnttag = data.match(/<(?:\\w+:)?commentList>([\\s\\S]*)<\\/(?:\\w+:)?commentList>/);\n\tif(cmnttag && cmnttag[1]) cmnttag[1].split(/<\\/\\w*:?comment>/).forEach(function(x) {\n\t\tif(x === \"\" || x.trim() === \"\") return;\n\t\tvar cm = x.match(/<(?:\\w+:)?comment[^>]*>/);\n\t\tif(!cm) return;\n\t\tvar y = parsexmltag(cm[0]);\n\t\tvar comment = ({ author: y.authorId && authors[y.authorId] || \"sheetjsghost\", ref: y.ref, guid: y.guid });\n\t\tvar cell = decode_cell(y.ref);\n\t\tif(opts.sheetRows && opts.sheetRows <= cell.r) return;\n\t\tvar textMatch = x.match(/<(?:\\w+:)?text>([\\s\\S]*)<\\/(?:\\w+:)?text>/);\n\t\tvar rt = !!textMatch && !!textMatch[1] && parse_si(textMatch[1]) || {r:\"\",t:\"\",h:\"\"};\n\t\tcomment.r = rt.r;\n\t\tif(rt.r == \"\") rt.t = rt.h = \"\";\n\t\tcomment.t = (rt.t||\"\").replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\");\n\t\tif(opts.cellHTML) comment.h = rt.h;\n\t\tcommentList.push(comment);\n\t});\n\treturn commentList;\n}\n\nvar CMNT_XML_ROOT = writextag('comments', null, { 'xmlns': XMLNS.main[0] });\nfunction write_comments_xml(data) {\n\tvar o = [XML_HEADER, CMNT_XML_ROOT];\n\n\tvar iauthor = [];\n\to.push(\"\");\n\tdata.forEach(function(x) { x[1].forEach(function(w) { var a = escapexml(w.a);\n\t\tif(iauthor.indexOf(a) > -1) return;\n\t\tiauthor.push(a);\n\t\to.push(\"\" + a + \"\");\n\t}); });\n\to.push(\"\");\n\to.push(\"\");\n\tdata.forEach(function(d) {\n\t\td[1].forEach(function(c) {\n\t\t\t/* 18.7.3 CT_Comment */\n\t\t\to.push('');\n\t\t\to.push(writetag(\"t\", c.t == null ? \"\" : escapexml(c.t)));\n\t\t\to.push('');\n\t\t});\n\t});\n\to.push(\"\");\n\tif(o.length>2) { o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.28 BrtBeginComment */\nfunction parse_BrtBeginComment(data) {\n\tvar out = {};\n\tout.iauthor = data.read_shift(4);\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tout.rfx = rfx.s;\n\tout.ref = encode_cell(rfx.s);\n\tdata.l += 16; /*var guid = parse_GUID(data); */\n\treturn out;\n}\nfunction write_BrtBeginComment(data, o) {\n\tif(o == null) o = new_buf(36);\n\to.write_shift(4, data[1].iauthor);\n\twrite_UncheckedRfX((data[0]), o);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\to.write_shift(4, 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.327 BrtCommentAuthor */\nvar parse_BrtCommentAuthor = parse_XLWideString;\nfunction write_BrtCommentAuthor(data) { return write_XLWideString(data.slice(0, 54)); }\n\n/* [MS-XLSB] 2.1.7.8 Comments */\nfunction parse_comments_bin(data, opts) {\n\tvar out = [];\n\tvar authors = [];\n\tvar c = {};\n\tvar pass = false;\n\trecordhopper(data, function hopper_cmnt(val, R_n, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x0278: /* 'BrtCommentAuthor' */\n\t\t\t\tauthors.push(val); break;\n\t\t\tcase 0x027B: /* 'BrtBeginComment' */\n\t\t\t\tc = val; break;\n\t\t\tcase 0x027D: /* 'BrtCommentText' */\n\t\t\t\tc.t = val.t; c.h = val.h; c.r = val.r; break;\n\t\t\tcase 0x027C: /* 'BrtEndComment' */\n\t\t\t\tc.author = authors[c.iauthor];\n\t\t\t\tdelete (c).iauthor;\n\t\t\t\tif(opts.sheetRows && c.rfx && opts.sheetRows <= c.rfx.r) break;\n\t\t\t\tif(!c.t) c.t = \"\";\n\t\t\t\tdelete c.rfx; out.push(c); break;\n\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */ break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */ break;\n\n\n\t\t\tdefault:\n\t\t\t\tif((R_n||\"\").indexOf(\"Begin\") > 0){/* empty */}\n\t\t\t\telse if((R_n||\"\").indexOf(\"End\") > 0){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record \" + RT + \" \" + R_n);\n\t\t}\n\t});\n\treturn out;\n}\n\nfunction write_comments_bin(data) {\n\tvar ba = buf_array();\n\tvar iauthor = [];\n\twrite_record(ba, \"BrtBeginComments\");\n\n\twrite_record(ba, \"BrtBeginCommentAuthors\");\n\tdata.forEach(function(comment) {\n\t\tcomment[1].forEach(function(c) {\n\t\t\tif(iauthor.indexOf(c.a) > -1) return;\n\t\t\tiauthor.push(c.a.slice(0,54));\n\t\t\twrite_record(ba, \"BrtCommentAuthor\", write_BrtCommentAuthor(c.a));\n\t\t});\n\t});\n\twrite_record(ba, \"BrtEndCommentAuthors\");\n\n\twrite_record(ba, \"BrtBeginCommentList\");\n\tdata.forEach(function(comment) {\n\t\tcomment[1].forEach(function(c) {\n\t\t\tc.iauthor = iauthor.indexOf(c.a);\n\t\t\tvar range = {s:decode_cell(comment[0]),e:decode_cell(comment[0])};\n\t\t\twrite_record(ba, \"BrtBeginComment\", write_BrtBeginComment([range, c]));\n\t\t\tif(c.t && c.t.length > 0) write_record(ba, \"BrtCommentText\", write_BrtCommentText(c));\n\t\t\twrite_record(ba, \"BrtEndComment\");\n\t\t\tdelete c.iauthor;\n\t\t});\n\t});\n\twrite_record(ba, \"BrtEndCommentList\");\n\n\twrite_record(ba, \"BrtEndComments\");\n\treturn ba.end();\n}\nvar CT_VBA = \"application/vnd.ms-office.vbaProject\";\nfunction make_vba_xls(cfb) {\n\tvar newcfb = CFB.utils.cfb_new({root:\"R\"});\n\tcfb.FullPaths.forEach(function(p, i) {\n\t\tif(p.slice(-1) === \"/\" || !p.match(/_VBA_PROJECT_CUR/)) return;\n\t\tvar newpath = p.replace(/^[^\\/]*/,\"R\").replace(/\\/_VBA_PROJECT_CUR\\u0000*/, \"\");\n\t\tCFB.utils.cfb_add(newcfb, newpath, cfb.FileIndex[i].content);\n\t});\n\treturn CFB.write(newcfb);\n}\n\nfunction fill_vba_xls(cfb, vba) {\n\tvba.FullPaths.forEach(function(p, i) {\n\t\tif(i == 0) return;\n\t\tvar newpath = p.replace(/[^\\/]*[\\/]/, \"/_VBA_PROJECT_CUR/\");\n\t\tif(newpath.slice(-1) !== \"/\") CFB.utils.cfb_add(cfb, newpath, vba.FileIndex[i].content);\n\t});\n}\n\nvar VBAFMTS = [ \"xlsb\", \"xlsm\", \"xlam\", \"biff8\", \"xla\" ];\n\nRELS.DS = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet\";\nRELS.MS = \"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet\";\n\n/* macro and dialog sheet stubs */\nfunction parse_ds_bin() { return {'!type':'dialog'}; }\nfunction parse_ds_xml() { return {'!type':'dialog'}; }\nfunction parse_ms_bin() { return {'!type':'macro'}; }\nfunction parse_ms_xml() { return {'!type':'macro'}; }\n/* TODO: it will be useful to parse the function str */\nvar rc_to_a1 = (function(){\n\tvar rcregex = /(^|[^A-Za-z_])R(\\[?-?\\d+\\]|[1-9]\\d*|)C(\\[?-?\\d+\\]|[1-9]\\d*|)(?![A-Za-z0-9_])/g;\n\tvar rcbase = ({r:0,c:0});\n\tfunction rcfunc($$,$1,$2,$3) {\n\t\tvar cRel = false, rRel = false;\n\n\t\tif($2.length == 0) rRel = true;\n\t\telse if($2.charAt(0) == \"[\") { rRel = true; $2 = $2.slice(1, -1); }\n\n\t\tif($3.length == 0) cRel = true;\n\t\telse if($3.charAt(0) == \"[\") { cRel = true; $3 = $3.slice(1, -1); }\n\n\t\tvar R = $2.length>0?parseInt($2,10)|0:0, C = $3.length>0?parseInt($3,10)|0:0;\n\n\t\tif(cRel) C += rcbase.c; else --C;\n\t\tif(rRel) R += rcbase.r; else --R;\n\t\treturn $1 + (cRel ? \"\" : \"$\") + encode_col(C) + (rRel ? \"\" : \"$\") + encode_row(R);\n\t}\n\treturn function rc_to_a1(fstr, base) {\n\t\trcbase = base;\n\t\treturn fstr.replace(rcregex, rcfunc);\n\t};\n})();\n\nvar crefregex = /(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\\d{4}|104[0-7]\\d{3}|1048[0-4]\\d{2}|10485[0-6]\\d|104857[0-6]|[1-9]\\d{0,5})(?![_.\\(A-Za-z0-9])/g;\nvar a1_to_rc =(function(){\n\treturn function a1_to_rc(fstr, base) {\n\t\treturn fstr.replace(crefregex, function($0, $1, $2, $3, $4, $5) {\n\t\t\tvar c = decode_col($3) - ($2 ? 0 : base.c);\n\t\t\tvar r = decode_row($5) - ($4 ? 0 : base.r);\n\t\t\tvar R = (r == 0 ? \"\" : !$4 ? \"[\" + r + \"]\" : (r+1));\n\t\t\tvar C = (c == 0 ? \"\" : !$2 ? \"[\" + c + \"]\" : (c+1));\n\t\t\treturn $1 + \"R\" + R + \"C\" + C;\n\t\t});\n\t};\n})();\n\n/* no defined name can collide with a valid cell address A1:XFD1048576 ... except LOG10! */\nfunction shift_formula_str(f, delta) {\n\treturn f.replace(crefregex, function($0, $1, $2, $3, $4, $5) {\n\t\treturn $1+($2==\"$\" ? $2+$3 : encode_col(decode_col($3)+delta.c))+($4==\"$\" ? $4+$5 : encode_row(decode_row($5) + delta.r));\n\t});\n}\n\nfunction shift_formula_xlsx(f, range, cell) {\n\tvar r = decode_range(range), s = r.s, c = decode_cell(cell);\n\tvar delta = {r:c.r - s.r, c:c.c - s.c};\n\treturn shift_formula_str(f, delta);\n}\n\n/* TODO: parse formula */\nfunction fuzzyfmla(f) {\n\tif(f.length == 1) return false;\n\treturn true;\n}\n\nfunction _xlfn(f) {\n\treturn f.replace(/_xlfn\\./g,\"\");\n}\nfunction parseread1(blob) { blob.l+=1; return; }\n\n/* [MS-XLS] 2.5.51 */\nfunction parse_ColRelU(blob, length) {\n\tvar c = blob.read_shift(length == 1 ? 1 : 2);\n\treturn [c & 0x3FFF, (c >> 14) & 1, (c >> 15) & 1];\n}\n\n/* [MS-XLS] 2.5.198.105 ; [MS-XLSB] 2.5.97.89 */\nfunction parse_RgceArea(blob, length, opts) {\n\tvar w = 2;\n\tif(opts) {\n\t\tif(opts.biff >= 2 && opts.biff <= 5) return parse_RgceArea_BIFF2(blob, length, opts);\n\t\telse if(opts.biff == 12) w = 4;\n\t}\n\tvar r=blob.read_shift(w), R=blob.read_shift(w);\n\tvar c=parse_ColRelU(blob, 2);\n\tvar C=parse_ColRelU(blob, 2);\n\treturn { s:{r:r, c:c[0], cRel:c[1], rRel:c[2]}, e:{r:R, c:C[0], cRel:C[1], rRel:C[2]} };\n}\n/* BIFF 2-5 encodes flags in the row field */\nfunction parse_RgceArea_BIFF2(blob) {\n\tvar r=parse_ColRelU(blob, 2), R=parse_ColRelU(blob, 2);\n\tvar c=blob.read_shift(1);\n\tvar C=blob.read_shift(1);\n\treturn { s:{r:r[0], c:c, cRel:r[1], rRel:r[2]}, e:{r:R[0], c:C, cRel:R[1], rRel:R[2]} };\n}\n\n/* [MS-XLS] 2.5.198.105 ; [MS-XLSB] 2.5.97.90 */\nfunction parse_RgceAreaRel(blob, length, opts) {\n\tif(opts.biff < 8) return parse_RgceArea_BIFF2(blob, length, opts);\n\tvar r=blob.read_shift(opts.biff == 12 ? 4 : 2), R=blob.read_shift(opts.biff == 12 ? 4 : 2);\n\tvar c=parse_ColRelU(blob, 2);\n\tvar C=parse_ColRelU(blob, 2);\n\treturn { s:{r:r, c:c[0], cRel:c[1], rRel:c[2]}, e:{r:R, c:C[0], cRel:C[1], rRel:C[2]} };\n}\n\n/* [MS-XLS] 2.5.198.109 ; [MS-XLSB] 2.5.97.91 */\nfunction parse_RgceLoc(blob, length, opts) {\n\tif(opts && opts.biff >= 2 && opts.biff <= 5) return parse_RgceLoc_BIFF2(blob, length, opts);\n\tvar r = blob.read_shift(opts && opts.biff == 12 ? 4 : 2);\n\tvar c = parse_ColRelU(blob, 2);\n\treturn {r:r, c:c[0], cRel:c[1], rRel:c[2]};\n}\nfunction parse_RgceLoc_BIFF2(blob) {\n\tvar r = parse_ColRelU(blob, 2);\n\tvar c = blob.read_shift(1);\n\treturn {r:r[0], c:c, cRel:r[1], rRel:r[2]};\n}\n\n/* [MS-XLS] 2.5.198.107, 2.5.47 */\nfunction parse_RgceElfLoc(blob) {\n\tvar r = blob.read_shift(2);\n\tvar c = blob.read_shift(2);\n\treturn {r:r, c:c & 0xFF, fQuoted:!!(c & 0x4000), cRel:c>>15, rRel:c>>15 };\n}\n\n/* [MS-XLS] 2.5.198.111 ; [MS-XLSB] 2.5.97.92 TODO */\nfunction parse_RgceLocRel(blob, length, opts) {\n\tvar biff = opts && opts.biff ? opts.biff : 8;\n\tif(biff >= 2 && biff <= 5) return parse_RgceLocRel_BIFF2(blob, length, opts);\n\tvar r = blob.read_shift(biff >= 12 ? 4 : 2);\n\tvar cl = blob.read_shift(2);\n\tvar cRel = (cl & 0x4000) >> 14, rRel = (cl & 0x8000) >> 15;\n\tcl &= 0x3FFF;\n\tif(rRel == 1) while(r > 0x7FFFF) r -= 0x100000;\n\tif(cRel == 1) while(cl > 0x1FFF) cl = cl - 0x4000;\n\treturn {r:r,c:cl,cRel:cRel,rRel:rRel};\n}\nfunction parse_RgceLocRel_BIFF2(blob) {\n\tvar rl = blob.read_shift(2);\n\tvar c = blob.read_shift(1);\n\tvar rRel = (rl & 0x8000) >> 15, cRel = (rl & 0x4000) >> 14;\n\trl &= 0x3FFF;\n\tif(rRel == 1 && rl >= 0x2000) rl = rl - 0x4000;\n\tif(cRel == 1 && c >= 0x80) c = c - 0x100;\n\treturn {r:rl,c:c,cRel:cRel,rRel:rRel};\n}\n\n/* [MS-XLS] 2.5.198.27 ; [MS-XLSB] 2.5.97.18 */\nfunction parse_PtgArea(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar area = parse_RgceArea(blob, opts.biff >= 2 && opts.biff <= 5 ? 6 : 8, opts);\n\treturn [type, area];\n}\n\n/* [MS-XLS] 2.5.198.28 ; [MS-XLSB] 2.5.97.19 */\nfunction parse_PtgArea3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2, 'i');\n\tvar w = 8;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: blob.l += 12; w = 6; break;\n\t\tcase 12: w = 12; break;\n\t}\n\tvar area = parse_RgceArea(blob, w, opts);\n\treturn [type, ixti, area];\n}\n\n/* [MS-XLS] 2.5.198.29 ; [MS-XLSB] 2.5.97.20 */\nfunction parse_PtgAreaErr(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tblob.l += opts && (opts.biff > 8) ? 12 : (opts.biff < 8 ? 6 : 8);\n\treturn [type];\n}\n/* [MS-XLS] 2.5.198.30 ; [MS-XLSB] 2.5.97.21 */\nfunction parse_PtgAreaErr3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2);\n\tvar w = 8;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: blob.l += 12; w = 6; break;\n\t\tcase 12: w = 12; break;\n\t}\n\tblob.l += w;\n\treturn [type, ixti];\n}\n\n/* [MS-XLS] 2.5.198.31 ; [MS-XLSB] 2.5.97.22 */\nfunction parse_PtgAreaN(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar area = parse_RgceAreaRel(blob, length - 1, opts);\n\treturn [type, area];\n}\n\n/* [MS-XLS] 2.5.198.32 ; [MS-XLSB] 2.5.97.23 */\nfunction parse_PtgArray(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tblob.l += opts.biff == 2 ? 6 : opts.biff == 12 ? 14 : 7;\n\treturn [type];\n}\n\n/* [MS-XLS] 2.5.198.33 ; [MS-XLSB] 2.5.97.24 */\nfunction parse_PtgAttrBaxcel(blob) {\n\tvar bitSemi = blob[blob.l+1] & 0x01; /* 1 = volatile */\n\tvar bitBaxcel = 1;\n\tblob.l += 4;\n\treturn [bitSemi, bitBaxcel];\n}\n\n/* [MS-XLS] 2.5.198.34 ; [MS-XLSB] 2.5.97.25 */\nfunction parse_PtgAttrChoose(blob, length, opts) {\n\tblob.l +=2;\n\tvar offset = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\tvar o = [];\n\t/* offset is 1 less than the number of elements */\n\tfor(var i = 0; i <= offset; ++i) o.push(blob.read_shift(opts && opts.biff == 2 ? 1 : 2));\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.35 ; [MS-XLSB] 2.5.97.26 */\nfunction parse_PtgAttrGoto(blob, length, opts) {\n\tvar bitGoto = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitGoto, blob.read_shift(opts && opts.biff == 2 ? 1 : 2)];\n}\n\n/* [MS-XLS] 2.5.198.36 ; [MS-XLSB] 2.5.97.27 */\nfunction parse_PtgAttrIf(blob, length, opts) {\n\tvar bitIf = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitIf, blob.read_shift(opts && opts.biff == 2 ? 1 : 2)];\n}\n\n/* [MS-XLSB] 2.5.97.28 */\nfunction parse_PtgAttrIfError(blob) {\n\tvar bitIf = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += 2;\n\treturn [bitIf, blob.read_shift(2)];\n}\n\n/* [MS-XLS] 2.5.198.37 ; [MS-XLSB] 2.5.97.29 */\nfunction parse_PtgAttrSemi(blob, length, opts) {\n\tvar bitSemi = (blob[blob.l+1] & 0xFF) ? 1 : 0;\n\tblob.l += opts && opts.biff == 2 ? 3 : 4;\n\treturn [bitSemi];\n}\n\n/* [MS-XLS] 2.5.198.40 ; [MS-XLSB] 2.5.97.32 */\nfunction parse_PtgAttrSpaceType(blob) {\n\tvar type = blob.read_shift(1), cch = blob.read_shift(1);\n\treturn [type, cch];\n}\n\n/* [MS-XLS] 2.5.198.38 ; [MS-XLSB] 2.5.97.30 */\nfunction parse_PtgAttrSpace(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}\n\n/* [MS-XLS] 2.5.198.39 ; [MS-XLSB] 2.5.97.31 */\nfunction parse_PtgAttrSpaceSemi(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}\n\n/* [MS-XLS] 2.5.198.84 ; [MS-XLSB] 2.5.97.68 TODO */\nfunction parse_PtgRef(blob, length, opts) {\n\t//var ptg = blob[blob.l] & 0x1F;\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar loc = parse_RgceLoc(blob, 0, opts);\n\treturn [type, loc];\n}\n\n/* [MS-XLS] 2.5.198.88 ; [MS-XLSB] 2.5.97.72 TODO */\nfunction parse_PtgRefN(blob, length, opts) {\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar loc = parse_RgceLocRel(blob, 0, opts);\n\treturn [type, loc];\n}\n\n/* [MS-XLS] 2.5.198.85 ; [MS-XLSB] 2.5.97.69 TODO */\nfunction parse_PtgRef3d(blob, length, opts) {\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar ixti = blob.read_shift(2); // XtiIndex\n\tif(opts && opts.biff == 5) blob.l += 12;\n\tvar loc = parse_RgceLoc(blob, 0, opts); // TODO: or RgceLocRel\n\treturn [type, ixti, loc];\n}\n\n\n/* [MS-XLS] 2.5.198.62 ; [MS-XLSB] 2.5.97.45 TODO */\nfunction parse_PtgFunc(blob, length, opts) {\n\t//var ptg = blob[blob.l] & 0x1F;\n\tvar type = (blob[blob.l] & 0x60)>>5;\n\tblob.l += 1;\n\tvar iftab = blob.read_shift(opts && opts.biff <= 3 ? 1 : 2);\n\treturn [FtabArgc[iftab], Ftab[iftab], type];\n}\n/* [MS-XLS] 2.5.198.63 ; [MS-XLSB] 2.5.97.46 TODO */\nfunction parse_PtgFuncVar(blob, length, opts) {\n\tvar type = blob[blob.l++];\n\tvar cparams = blob.read_shift(1), tab = opts && opts.biff <= 3 ? [(type == 0x58 ? -1 : 0), blob.read_shift(1)]: parsetab(blob);\n\treturn [cparams, (tab[0] === 0 ? Ftab : Cetab)[tab[1]]];\n}\n\nfunction parsetab(blob) {\n\treturn [blob[blob.l+1]>>7, blob.read_shift(2) & 0x7FFF];\n}\n\n/* [MS-XLS] 2.5.198.41 ; [MS-XLSB] 2.5.97.33 */\nfunction parse_PtgAttrSum(blob, length, opts) {\n\tblob.l += opts && opts.biff == 2 ? 3 : 4; return;\n}\n\n/* [MS-XLS] 2.5.198.58 ; [MS-XLSB] 2.5.97.40 */\nfunction parse_PtgExp(blob, length, opts) {\n\tblob.l++;\n\tif(opts && opts.biff == 12) return [blob.read_shift(4, 'i'), 0];\n\tvar row = blob.read_shift(2);\n\tvar col = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [row, col];\n}\n\n/* [MS-XLS] 2.5.198.57 ; [MS-XLSB] 2.5.97.39 */\nfunction parse_PtgErr(blob) { blob.l++; return BErr[blob.read_shift(1)]; }\n\n/* [MS-XLS] 2.5.198.66 ; [MS-XLSB] 2.5.97.49 */\nfunction parse_PtgInt(blob) { blob.l++; return blob.read_shift(2); }\n\n/* [MS-XLS] 2.5.198.42 ; [MS-XLSB] 2.5.97.34 */\nfunction parse_PtgBool(blob) { blob.l++; return blob.read_shift(1)!==0;}\n\n/* [MS-XLS] 2.5.198.79 ; [MS-XLSB] 2.5.97.63 */\nfunction parse_PtgNum(blob) { blob.l++; return parse_Xnum(blob, 8); }\n\n/* [MS-XLS] 2.5.198.89 ; [MS-XLSB] 2.5.97.74 */\nfunction parse_PtgStr(blob, length, opts) { blob.l++; return parse_ShortXLUnicodeString(blob, length-1, opts); }\n\n/* [MS-XLS] 2.5.192.112 + 2.5.192.11{3,4,5,6,7} */\n/* [MS-XLSB] 2.5.97.93 + 2.5.97.9{4,5,6,7} */\nfunction parse_SerAr(blob, biff) {\n\tvar val = [blob.read_shift(1)];\n\tif(biff == 12) switch(val[0]) {\n\t\tcase 0x02: val[0] = 0x04; break; /* SerBool */\n\t\tcase 0x04: val[0] = 0x10; break; /* SerErr */\n\t\tcase 0x00: val[0] = 0x01; break; /* SerNum */\n\t\tcase 0x01: val[0] = 0x02; break; /* SerStr */\n\t}\n\tswitch(val[0]) {\n\t\tcase 0x04: /* SerBool -- boolean */\n\t\t\tval[1] = parsebool(blob, 1) ? 'TRUE' : 'FALSE';\n\t\t\tif(biff != 12) blob.l += 7; break;\n\t\tcase 0x25: /* appears to be an alias */\n\t\tcase 0x10: /* SerErr -- error */\n\t\t\tval[1] = BErr[blob[blob.l]];\n\t\t\tblob.l += ((biff == 12) ? 4 : 8); break;\n\t\tcase 0x00: /* SerNil -- honestly, I'm not sure how to reproduce this */\n\t\t\tblob.l += 8; break;\n\t\tcase 0x01: /* SerNum -- Xnum */\n\t\t\tval[1] = parse_Xnum(blob, 8); break;\n\t\tcase 0x02: /* SerStr -- XLUnicodeString (<256 chars) */\n\t\t\tval[1] = parse_XLUnicodeString2(blob, 0, {biff:biff > 0 && biff < 8 ? 2 : biff}); break;\n\t\tdefault: throw new Error(\"Bad SerAr: \" + val[0]); /* Unreachable */\n\t}\n\treturn val;\n}\n\n/* [MS-XLS] 2.5.198.61 ; [MS-XLSB] 2.5.97.44 */\nfunction parse_PtgExtraMem(blob, cce, opts) {\n\tvar count = blob.read_shift((opts.biff == 12) ? 4 : 2);\n\tvar out = [];\n\tfor(var i = 0; i != count; ++i) out.push(((opts.biff == 12) ? parse_UncheckedRfX : parse_Ref8U)(blob, 8));\n\treturn out;\n}\n\n/* [MS-XLS] 2.5.198.59 ; [MS-XLSB] 2.5.97.41 */\nfunction parse_PtgExtraArray(blob, length, opts) {\n\tvar rows = 0, cols = 0;\n\tif(opts.biff == 12) {\n\t\trows = blob.read_shift(4); // DRw\n\t\tcols = blob.read_shift(4); // DCol\n\t} else {\n\t\tcols = 1 + blob.read_shift(1); //DColByteU\n\t\trows = 1 + blob.read_shift(2); //DRw\n\t}\n\tif(opts.biff >= 2 && opts.biff < 8) { --rows; if(--cols == 0) cols = 0x100; }\n\t// $FlowIgnore\n\tfor(var i = 0, o = []; i != rows && (o[i] = []); ++i)\n\t\tfor(var j = 0; j != cols; ++j) o[i][j] = parse_SerAr(blob, opts.biff);\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.76 ; [MS-XLSB] 2.5.97.60 */\nfunction parse_PtgName(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar w = (!opts || (opts.biff >= 8)) ? 4 : 2;\n\tvar nameindex = blob.read_shift(w);\n\tswitch(opts.biff) {\n\t\tcase 2: blob.l += 5; break;\n\t\tcase 3: case 4: blob.l += 8; break;\n\t\tcase 5: blob.l += 12; break;\n\t}\n\treturn [type, 0, nameindex];\n}\n\n/* [MS-XLS] 2.5.198.77 ; [MS-XLSB] 2.5.97.61 */\nfunction parse_PtgNameX(blob, length, opts) {\n\tif(opts.biff == 5) return parse_PtgNameX_BIFF5(blob, length, opts);\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar ixti = blob.read_shift(2); // XtiIndex\n\tvar nameindex = blob.read_shift(4);\n\treturn [type, ixti, nameindex];\n}\nfunction parse_PtgNameX_BIFF5(blob) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar ixti = blob.read_shift(2, 'i'); // XtiIndex\n\tblob.l += 8;\n\tvar nameindex = blob.read_shift(2);\n\tblob.l += 12;\n\treturn [type, ixti, nameindex];\n}\n\n/* [MS-XLS] 2.5.198.70 ; [MS-XLSB] 2.5.97.54 */\nfunction parse_PtgMemArea(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tblob.l += (opts && opts.biff == 2 ? 3 : 4);\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [type, cce];\n}\n\n/* [MS-XLS] 2.5.198.72 ; [MS-XLSB] 2.5.97.56 */\nfunction parse_PtgMemFunc(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(opts && opts.biff == 2 ? 1 : 2);\n\treturn [type, cce];\n}\n\n\n/* [MS-XLS] 2.5.198.86 ; [MS-XLSB] 2.5.97.69 */\nfunction parse_PtgRefErr(blob, length, opts) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tblob.l += 4;\n\tif(opts.biff < 8) blob.l--;\n\tif(opts.biff == 12) blob.l += 2;\n\treturn [type];\n}\n\n/* [MS-XLS] 2.5.198.87 ; [MS-XLSB] 2.5.97.71 */\nfunction parse_PtgRefErr3d(blob, length, opts) {\n\tvar type = (blob[blob.l++] & 0x60) >> 5;\n\tvar ixti = blob.read_shift(2);\n\tvar w = 4;\n\tif(opts) switch(opts.biff) {\n\t\tcase 5: w = 15; break;\n\t\tcase 12: w = 6; break;\n\t}\n\tblob.l += w;\n\treturn [type, ixti];\n}\n\n/* [MS-XLS] 2.5.198.71 ; [MS-XLSB] 2.5.97.55 */\nvar parse_PtgMemErr = parsenoop;\n/* [MS-XLS] 2.5.198.73 ; [MS-XLSB] 2.5.97.57 */\nvar parse_PtgMemNoMem = parsenoop;\n/* [MS-XLS] 2.5.198.92 */\nvar parse_PtgTbl = parsenoop;\n\nfunction parse_PtgElfLoc(blob, length, opts) {\n\tblob.l += 2;\n\treturn [parse_RgceElfLoc(blob, 4, opts)];\n}\nfunction parse_PtgElfNoop(blob) {\n\tblob.l += 6;\n\treturn [];\n}\n/* [MS-XLS] 2.5.198.46 */\nvar parse_PtgElfCol = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.47 */\nvar parse_PtgElfColS = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.48 */\nvar parse_PtgElfColSV = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.49 */\nvar parse_PtgElfColV = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.50 */\nfunction parse_PtgElfLel(blob) {\n\tblob.l += 2;\n\treturn [parseuint16(blob), blob.read_shift(2) & 0x01];\n}\n/* [MS-XLS] 2.5.198.51 */\nvar parse_PtgElfRadical = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.52 */\nvar parse_PtgElfRadicalLel = parse_PtgElfLel;\n/* [MS-XLS] 2.5.198.53 */\nvar parse_PtgElfRadicalS = parse_PtgElfNoop;\n/* [MS-XLS] 2.5.198.54 */\nvar parse_PtgElfRw = parse_PtgElfLoc;\n/* [MS-XLS] 2.5.198.55 */\nvar parse_PtgElfRwV = parse_PtgElfLoc;\n\n/* [MS-XLSB] 2.5.97.52 TODO */\nvar PtgListRT = [\n\t\"Data\",\n\t\"All\",\n\t\"Headers\",\n\t\"??\",\n\t\"?Data2\",\n\t\"??\",\n\t\"?DataHeaders\",\n\t\"??\",\n\t\"Totals\",\n\t\"??\",\n\t\"??\",\n\t\"??\",\n\t\"?DataTotals\",\n\t\"??\",\n\t\"??\",\n\t\"??\",\n\t\"?Current\"\n];\nfunction parse_PtgList(blob) {\n\tblob.l += 2;\n\tvar ixti = blob.read_shift(2);\n\tvar flags = blob.read_shift(2);\n\tvar idx = blob.read_shift(4);\n\tvar c = blob.read_shift(2);\n\tvar C = blob.read_shift(2);\n\tvar rt = PtgListRT[(flags >> 2) & 0x1F];\n\treturn {ixti: ixti, coltype:(flags&0x3), rt:rt, idx:idx, c:c, C:C};\n}\n/* [MS-XLS] 2.5.198.91 ; [MS-XLSB] 2.5.97.76 */\nfunction parse_PtgSxName(blob) {\n\tblob.l += 2;\n\treturn [blob.read_shift(4)];\n}\n\n/* [XLS] old spec */\nfunction parse_PtgSheet(blob, length, opts) {\n\tblob.l += 5;\n\tblob.l += 2;\n\tblob.l += (opts.biff == 2 ? 1 : 4);\n\treturn [\"PTGSHEET\"];\n}\nfunction parse_PtgEndSheet(blob, length, opts) {\n\tblob.l += (opts.biff == 2 ? 4 : 5);\n\treturn [\"PTGENDSHEET\"];\n}\nfunction parse_PtgMemAreaN(blob) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(2);\n\treturn [type, cce];\n}\nfunction parse_PtgMemNoMemN(blob) {\n\tvar type = (blob.read_shift(1) >>> 5) & 0x03;\n\tvar cce = blob.read_shift(2);\n\treturn [type, cce];\n}\nfunction parse_PtgAttrNoop(blob) {\n\tblob.l += 4;\n\treturn [0, 0];\n}\n\n/* [MS-XLS] 2.5.198.25 ; [MS-XLSB] 2.5.97.16 */\nvar PtgTypes = {\n0x01: { n:'PtgExp', f:parse_PtgExp },\n0x02: { n:'PtgTbl', f:parse_PtgTbl },\n0x03: { n:'PtgAdd', f:parseread1 },\n0x04: { n:'PtgSub', f:parseread1 },\n0x05: { n:'PtgMul', f:parseread1 },\n0x06: { n:'PtgDiv', f:parseread1 },\n0x07: { n:'PtgPower', f:parseread1 },\n0x08: { n:'PtgConcat', f:parseread1 },\n0x09: { n:'PtgLt', f:parseread1 },\n0x0A: { n:'PtgLe', f:parseread1 },\n0x0B: { n:'PtgEq', f:parseread1 },\n0x0C: { n:'PtgGe', f:parseread1 },\n0x0D: { n:'PtgGt', f:parseread1 },\n0x0E: { n:'PtgNe', f:parseread1 },\n0x0F: { n:'PtgIsect', f:parseread1 },\n0x10: { n:'PtgUnion', f:parseread1 },\n0x11: { n:'PtgRange', f:parseread1 },\n0x12: { n:'PtgUplus', f:parseread1 },\n0x13: { n:'PtgUminus', f:parseread1 },\n0x14: { n:'PtgPercent', f:parseread1 },\n0x15: { n:'PtgParen', f:parseread1 },\n0x16: { n:'PtgMissArg', f:parseread1 },\n0x17: { n:'PtgStr', f:parse_PtgStr },\n0x1A: { n:'PtgSheet', f:parse_PtgSheet },\n0x1B: { n:'PtgEndSheet', f:parse_PtgEndSheet },\n0x1C: { n:'PtgErr', f:parse_PtgErr },\n0x1D: { n:'PtgBool', f:parse_PtgBool },\n0x1E: { n:'PtgInt', f:parse_PtgInt },\n0x1F: { n:'PtgNum', f:parse_PtgNum },\n0x20: { n:'PtgArray', f:parse_PtgArray },\n0x21: { n:'PtgFunc', f:parse_PtgFunc },\n0x22: { n:'PtgFuncVar', f:parse_PtgFuncVar },\n0x23: { n:'PtgName', f:parse_PtgName },\n0x24: { n:'PtgRef', f:parse_PtgRef },\n0x25: { n:'PtgArea', f:parse_PtgArea },\n0x26: { n:'PtgMemArea', f:parse_PtgMemArea },\n0x27: { n:'PtgMemErr', f:parse_PtgMemErr },\n0x28: { n:'PtgMemNoMem', f:parse_PtgMemNoMem },\n0x29: { n:'PtgMemFunc', f:parse_PtgMemFunc },\n0x2A: { n:'PtgRefErr', f:parse_PtgRefErr },\n0x2B: { n:'PtgAreaErr', f:parse_PtgAreaErr },\n0x2C: { n:'PtgRefN', f:parse_PtgRefN },\n0x2D: { n:'PtgAreaN', f:parse_PtgAreaN },\n0x2E: { n:'PtgMemAreaN', f:parse_PtgMemAreaN },\n0x2F: { n:'PtgMemNoMemN', f:parse_PtgMemNoMemN },\n0x39: { n:'PtgNameX', f:parse_PtgNameX },\n0x3A: { n:'PtgRef3d', f:parse_PtgRef3d },\n0x3B: { n:'PtgArea3d', f:parse_PtgArea3d },\n0x3C: { n:'PtgRefErr3d', f:parse_PtgRefErr3d },\n0x3D: { n:'PtgAreaErr3d', f:parse_PtgAreaErr3d },\n0xFF: {}\n};\n/* These are duplicated in the PtgTypes table */\nvar PtgDupes = {\n0x40: 0x20, 0x60: 0x20,\n0x41: 0x21, 0x61: 0x21,\n0x42: 0x22, 0x62: 0x22,\n0x43: 0x23, 0x63: 0x23,\n0x44: 0x24, 0x64: 0x24,\n0x45: 0x25, 0x65: 0x25,\n0x46: 0x26, 0x66: 0x26,\n0x47: 0x27, 0x67: 0x27,\n0x48: 0x28, 0x68: 0x28,\n0x49: 0x29, 0x69: 0x29,\n0x4A: 0x2A, 0x6A: 0x2A,\n0x4B: 0x2B, 0x6B: 0x2B,\n0x4C: 0x2C, 0x6C: 0x2C,\n0x4D: 0x2D, 0x6D: 0x2D,\n0x4E: 0x2E, 0x6E: 0x2E,\n0x4F: 0x2F, 0x6F: 0x2F,\n0x58: 0x22, 0x78: 0x22,\n0x59: 0x39, 0x79: 0x39,\n0x5A: 0x3A, 0x7A: 0x3A,\n0x5B: 0x3B, 0x7B: 0x3B,\n0x5C: 0x3C, 0x7C: 0x3C,\n0x5D: 0x3D, 0x7D: 0x3D\n};\n(function(){for(var y in PtgDupes) PtgTypes[y] = PtgTypes[PtgDupes[y]];})();\n\nvar Ptg18 = {\n0x01: { n:'PtgElfLel', f:parse_PtgElfLel },\n0x02: { n:'PtgElfRw', f:parse_PtgElfRw },\n0x03: { n:'PtgElfCol', f:parse_PtgElfCol },\n0x06: { n:'PtgElfRwV', f:parse_PtgElfRwV },\n0x07: { n:'PtgElfColV', f:parse_PtgElfColV },\n0x0A: { n:'PtgElfRadical', f:parse_PtgElfRadical },\n0x0B: { n:'PtgElfRadicalS', f:parse_PtgElfRadicalS },\n0x0D: { n:'PtgElfColS', f:parse_PtgElfColS },\n0x0F: { n:'PtgElfColSV', f:parse_PtgElfColSV },\n0x10: { n:'PtgElfRadicalLel', f:parse_PtgElfRadicalLel },\n0x19: { n:'PtgList', f:parse_PtgList },\n0x1D: { n:'PtgSxName', f:parse_PtgSxName },\n0xFF: {}\n};\nvar Ptg19 = {\n0x00: { n:'PtgAttrNoop', f:parse_PtgAttrNoop },\n0x01: { n:'PtgAttrSemi', f:parse_PtgAttrSemi },\n0x02: { n:'PtgAttrIf', f:parse_PtgAttrIf },\n0x04: { n:'PtgAttrChoose', f:parse_PtgAttrChoose },\n0x08: { n:'PtgAttrGoto', f:parse_PtgAttrGoto },\n0x10: { n:'PtgAttrSum', f:parse_PtgAttrSum },\n0x20: { n:'PtgAttrBaxcel', f:parse_PtgAttrBaxcel },\n0x40: { n:'PtgAttrSpace', f:parse_PtgAttrSpace },\n0x41: { n:'PtgAttrSpaceSemi', f:parse_PtgAttrSpaceSemi },\n0x80: { n:'PtgAttrIfError', f:parse_PtgAttrIfError },\n0xFF: {}\n};\nPtg19[0x21] = Ptg19[0x20];\n\n/* [MS-XLS] 2.5.198.103 ; [MS-XLSB] 2.5.97.87 */\nfunction parse_RgbExtra(blob, length, rgce, opts) {\n\tif(opts.biff < 8) return parsenoop(blob, length);\n\tvar target = blob.l + length;\n\tvar o = [];\n\tfor(var i = 0; i !== rgce.length; ++i) {\n\t\tswitch(rgce[i][0]) {\n\t\t\tcase 'PtgArray': /* PtgArray -> PtgExtraArray */\n\t\t\t\trgce[i][1] = parse_PtgExtraArray(blob, 0, opts);\n\t\t\t\to.push(rgce[i][1]);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgMemArea': /* PtgMemArea -> PtgExtraMem */\n\t\t\t\trgce[i][2] = parse_PtgExtraMem(blob, rgce[i][1], opts);\n\t\t\t\to.push(rgce[i][2]);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgExp': /* PtgExp -> PtgExtraCol */\n\t\t\t\tif(opts && opts.biff == 12) {\n\t\t\t\t\trgce[i][1][1] = blob.read_shift(4);\n\t\t\t\t\to.push(rgce[i][1]);\n\t\t\t\t} break;\n\t\t\tcase 'PtgList': /* TODO: PtgList -> PtgExtraList */\n\t\t\tcase 'PtgElfRadicalS': /* TODO: PtgElfRadicalS -> PtgExtraElf */\n\t\t\tcase 'PtgElfColS': /* TODO: PtgElfColS -> PtgExtraElf */\n\t\t\tcase 'PtgElfColSV': /* TODO: PtgElfColSV -> PtgExtraElf */\n\t\t\t\tthrow \"Unsupported \" + rgce[i][0];\n\t\t\tdefault: break;\n\t\t}\n\t}\n\tlength = target - blob.l;\n\t/* note: this is technically an error but Excel disregards */\n\t//if(target !== blob.l && blob.l !== target - length) throw new Error(target + \" != \" + blob.l);\n\tif(length !== 0) o.push(parsenoop(blob, length));\n\treturn o;\n}\n\n/* [MS-XLS] 2.5.198.104 ; [MS-XLSB] 2.5.97.88 */\nfunction parse_Rgce(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar R, id, ptgs = [];\n\twhile(target != blob.l) {\n\t\tlength = target - blob.l;\n\t\tid = blob[blob.l];\n\t\tR = PtgTypes[id];\n\t\tif(id === 0x18 || id === 0x19) R = (id === 0x18 ? Ptg18 : Ptg19)[blob[blob.l + 1]];\n\t\tif(!R || !R.f) { /*ptgs.push*/(parsenoop(blob, length)); }\n\t\telse { ptgs.push([R.n, R.f(blob, length, opts)]); }\n\t}\n\treturn ptgs;\n}\n\nfunction stringify_array(f) {\n\tvar o = [];\n\tfor(var i = 0; i < f.length; ++i) {\n\t\tvar x = f[i], r = [];\n\t\tfor(var j = 0; j < x.length; ++j) {\n\t\t\tvar y = x[j];\n\t\t\tif(y) switch(y[0]) {\n\t\t\t\t// TODO: handle embedded quotes\n\t\t\t\tcase 0x02:\nr.push('\"' + y[1].replace(/\"/g,'\"\"') + '\"'); break;\n\t\t\t\tdefault: r.push(y[1]);\n\t\t\t} else r.push(\"\");\n\t\t}\n\t\to.push(r.join(\",\"));\n\t}\n\treturn o.join(\";\");\n}\n\n/* [MS-XLS] 2.2.2 ; [MS-XLSB] 2.2.2 TODO */\nvar PtgBinOp = {\n\tPtgAdd: \"+\",\n\tPtgConcat: \"&\",\n\tPtgDiv: \"/\",\n\tPtgEq: \"=\",\n\tPtgGe: \">=\",\n\tPtgGt: \">\",\n\tPtgLe: \"<=\",\n\tPtgLt: \"<\",\n\tPtgMul: \"*\",\n\tPtgNe: \"<>\",\n\tPtgPower: \"^\",\n\tPtgSub: \"-\"\n};\n\n// List of invalid characters needs to be tested further\nvar quoteCharacters = new RegExp(/[^\\w\\u4E00-\\u9FFF\\u3040-\\u30FF]/);\nfunction formula_quote_sheet_name(sname, opts) {\n\tif(!sname && !(opts && opts.biff <= 5 && opts.biff >= 2)) throw new Error(\"empty sheet name\");\n\tif (quoteCharacters.test(sname)) return \"'\" + sname + \"'\";\n\treturn sname;\n}\nfunction get_ixti_raw(supbooks, ixti, opts) {\n\tif(!supbooks) return \"SH33TJSERR0\";\n\tif(opts.biff > 8 && (!supbooks.XTI || !supbooks.XTI[ixti])) return supbooks.SheetNames[ixti];\n\tif(!supbooks.XTI) return \"SH33TJSERR6\";\n\tvar XTI = supbooks.XTI[ixti];\n\tif(opts.biff < 8) {\n\t\tif(ixti > 10000) ixti-= 65536;\n\t\tif(ixti < 0) ixti = -ixti;\n\t\treturn ixti == 0 ? \"\" : supbooks.XTI[ixti - 1];\n\t}\n\tif(!XTI) return \"SH33TJSERR1\";\n\tvar o = \"\";\n\tif(opts.biff > 8) switch(supbooks[XTI[0]][0]) {\n\t\tcase 0x0165: /* 'BrtSupSelf' */\n\t\t\to = XTI[1] == -1 ? \"#REF\" : supbooks.SheetNames[XTI[1]];\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks.SheetNames[XTI[2]];\n\t\tcase 0x0166: /* 'BrtSupSame' */\n\t\t\tif(opts.SID != null) return supbooks.SheetNames[opts.SID];\n\t\t\treturn \"SH33TJSSAME\" + supbooks[XTI[0]][0];\n\t\tcase 0x0163: /* 'BrtSupBookSrc' */\n\t\t\t/* falls through */\n\t\tdefault: return \"SH33TJSSRC\" + supbooks[XTI[0]][0];\n\t}\n\tswitch(supbooks[XTI[0]][0][0]) {\n\t\tcase 0x0401:\n\t\t\to = XTI[1] == -1 ? \"#REF\" : (supbooks.SheetNames[XTI[1]] || \"SH33TJSERR3\");\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks.SheetNames[XTI[2]];\n\t\tcase 0x3A01: return supbooks[XTI[0]].slice(1).map(function(name) { return name.Name; }).join(\";;\"); //return \"SH33TJSERR8\";\n\t\tdefault:\n\t\t\tif(!supbooks[XTI[0]][0][3]) return \"SH33TJSERR2\";\n\t\t\to = XTI[1] == -1 ? \"#REF\" : (supbooks[XTI[0]][0][3][XTI[1]] || \"SH33TJSERR4\");\n\t\t\treturn XTI[1] == XTI[2] ? o : o + \":\" + supbooks[XTI[0]][0][3][XTI[2]];\n\t}\n}\nfunction get_ixti(supbooks, ixti, opts) {\n\tvar ixtiraw = get_ixti_raw(supbooks, ixti, opts);\n\treturn ixtiraw == \"#REF\" ? ixtiraw : formula_quote_sheet_name(ixtiraw, opts);\n}\nfunction stringify_formula(formula/*Array*/, range, cell, supbooks, opts) {\n\tvar biff = (opts && opts.biff) || 8;\n\tvar _range = /*range != null ? range :*/ {s:{c:0, r:0},e:{c:0, r:0}};\n\tvar stack = [], e1, e2, c, ixti=0, nameidx=0, r, sname=\"\";\n\tif(!formula[0] || !formula[0][0]) return \"\";\n\tvar last_sp = -1, sp = \"\";\n\tfor(var ff = 0, fflen = formula[0].length; ff < fflen; ++ff) {\n\t\tvar f = formula[0][ff];\n\t\tswitch(f[0]) {\n\t\t\tcase 'PtgUminus': /* [MS-XLS] 2.5.198.93 */\n\t\t\t\tstack.push(\"-\" + stack.pop()); break;\n\t\t\tcase 'PtgUplus': /* [MS-XLS] 2.5.198.95 */\n\t\t\t\tstack.push(\"+\" + stack.pop()); break;\n\t\t\tcase 'PtgPercent': /* [MS-XLS] 2.5.198.81 */\n\t\t\t\tstack.push(stack.pop() + \"%\"); break;\n\n\t\t\tcase 'PtgAdd': /* [MS-XLS] 2.5.198.26 */\n\t\t\tcase 'PtgConcat': /* [MS-XLS] 2.5.198.43 */\n\t\t\tcase 'PtgDiv': /* [MS-XLS] 2.5.198.45 */\n\t\t\tcase 'PtgEq': /* [MS-XLS] 2.5.198.56 */\n\t\t\tcase 'PtgGe': /* [MS-XLS] 2.5.198.64 */\n\t\t\tcase 'PtgGt': /* [MS-XLS] 2.5.198.65 */\n\t\t\tcase 'PtgLe': /* [MS-XLS] 2.5.198.68 */\n\t\t\tcase 'PtgLt': /* [MS-XLS] 2.5.198.69 */\n\t\t\tcase 'PtgMul': /* [MS-XLS] 2.5.198.75 */\n\t\t\tcase 'PtgNe': /* [MS-XLS] 2.5.198.78 */\n\t\t\tcase 'PtgPower': /* [MS-XLS] 2.5.198.82 */\n\t\t\tcase 'PtgSub': /* [MS-XLS] 2.5.198.90 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tif(last_sp >= 0) {\n\t\t\t\t\tswitch(formula[0][last_sp][1][0]) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tsp = fill(\" \", formula[0][last_sp][1][1]); break;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tsp = fill(\"\\r\", formula[0][last_sp][1][1]); break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tsp = \"\";\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + formula[0][last_sp][1][0]);\n\t\t\t\t\t}\n\t\t\t\t\te2 = e2 + sp;\n\t\t\t\t\tlast_sp = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(e2+PtgBinOp[f[0]]+e1);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgIsect': /* [MS-XLS] 2.5.198.67 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\" \"+e1);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgUnion': /* [MS-XLS] 2.5.198.94 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\",\"+e1);\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRange': /* [MS-XLS] 2.5.198.83 */\n\t\t\t\te1 = stack.pop(); e2 = stack.pop();\n\t\t\t\tstack.push(e2+\":\"+e1);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrChoose': /* [MS-XLS] 2.5.198.34 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrGoto': /* [MS-XLS] 2.5.198.35 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrIf': /* [MS-XLS] 2.5.198.36 */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrIfError': /* [MS-XLSB] 2.5.97.28 */\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'PtgRef': /* [MS-XLS] 2.5.198.84 */\nc = shift_cell_xls((f[1][1]), _range, opts);\n\t\t\t\tstack.push(encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRefN': /* [MS-XLS] 2.5.198.88 */\nc = cell ? shift_cell_xls((f[1][1]), cell, opts) : (f[1][1]);\n\t\t\t\tstack.push(encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgRef3d': /* [MS-XLS] 2.5.198.85 */\nixti = f[1][1]; c = shift_cell_xls((f[1][2]), _range, opts);\n\t\t\t\tsname = get_ixti(supbooks, ixti, opts);\n\t\t\t\tvar w = sname; /* IE9 fails on defined names */ // eslint-disable-line no-unused-vars\n\t\t\t\tstack.push(sname + \"!\" + encode_cell_xls(c, biff));\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgFunc': /* [MS-XLS] 2.5.198.62 */\n\t\t\tcase 'PtgFuncVar': /* [MS-XLS] 2.5.198.63 */\n\t\t\t\t/* f[1] = [argc, func, type] */\n\t\t\t\tvar argc = (f[1][0]), func = (f[1][1]);\n\t\t\t\tif(!argc) argc = 0;\n\t\t\t\targc &= 0x7F;\n\t\t\t\tvar args = argc == 0 ? [] : stack.slice(-argc);\n\t\t\t\tstack.length -= argc;\n\t\t\t\tif(func === 'User') func = args.shift();\n\t\t\t\tstack.push(func + \"(\" + args.join(\",\") + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgBool': /* [MS-XLS] 2.5.198.42 */\n\t\t\t\tstack.push(f[1] ? \"TRUE\" : \"FALSE\"); break;\n\t\t\tcase 'PtgInt': /* [MS-XLS] 2.5.198.66 */\n\t\t\t\tstack.push(f[1]); break;\n\t\t\tcase 'PtgNum': /* [MS-XLS] 2.5.198.79 TODO: precision? */\n\t\t\t\tstack.push(String(f[1])); break;\n\t\t\tcase 'PtgStr': /* [MS-XLS] 2.5.198.89 */\n\t\t\t\t// $FlowIgnore\n\t\t\t\tstack.push('\"' + f[1].replace(/\"/g, '\"\"') + '\"'); break;\n\t\t\tcase 'PtgErr': /* [MS-XLS] 2.5.198.57 */\n\t\t\t\tstack.push(f[1]); break;\n\t\t\tcase 'PtgAreaN': /* [MS-XLS] 2.5.198.31 TODO */\nr = shift_range_xls(f[1][1], cell ? {s:cell} : _range, opts);\n\t\t\t\tstack.push(encode_range_xls((r), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgArea': /* [MS-XLS] 2.5.198.27 TODO: fixed points */\nr = shift_range_xls(f[1][1], _range, opts);\n\t\t\t\tstack.push(encode_range_xls((r), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgArea3d': /* [MS-XLS] 2.5.198.28 TODO */\nixti = f[1][1]; r = f[1][2];\n\t\t\t\tsname = get_ixti(supbooks, ixti, opts);\n\t\t\t\tstack.push(sname + \"!\" + encode_range_xls((r), opts));\n\t\t\t\tbreak;\n\t\t\tcase 'PtgAttrSum': /* [MS-XLS] 2.5.198.41 */\n\t\t\t\tstack.push(\"SUM(\" + stack.pop() + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrBaxcel': /* [MS-XLS] 2.5.198.33 */\n\t\t\tcase 'PtgAttrSemi': /* [MS-XLS] 2.5.198.37 */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgName': /* [MS-XLS] 2.5.198.76 ; [MS-XLSB] 2.5.97.60 TODO: revisions */\n\t\t\t\t/* f[1] = type, 0, nameindex */\n\t\t\t\tnameidx = (f[1][2]);\n\t\t\t\tvar lbl = (supbooks.names||[])[nameidx-1] || (supbooks[0]||[])[nameidx];\n\t\t\t\tvar name = lbl ? lbl.Name : \"SH33TJSNAME\" + String(nameidx);\n\t\t\t\tif(name in XLSXFutureFunctions) name = XLSXFutureFunctions[name];\n\t\t\t\tstack.push(name);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgNameX': /* [MS-XLS] 2.5.198.77 ; [MS-XLSB] 2.5.97.61 TODO: revisions */\n\t\t\t\t/* f[1] = type, ixti, nameindex */\n\t\t\t\tvar bookidx = (f[1][1]); nameidx = (f[1][2]); var externbook;\n\t\t\t\t/* TODO: Properly handle missing values -- this should be using get_ixti_raw primarily */\n\t\t\t\tif(opts.biff <= 5) {\n\t\t\t\t\tif(bookidx < 0) bookidx = -bookidx;\n\t\t\t\t\tif(supbooks[bookidx]) externbook = supbooks[bookidx][nameidx];\n\t\t\t\t} else {\n\t\t\t\t\tvar o = \"\";\n\t\t\t\t\tif(((supbooks[bookidx]||[])[0]||[])[0] == 0x3A01){/* empty */}\n\t\t\t\t\telse if(((supbooks[bookidx]||[])[0]||[])[0] == 0x0401){\n\t\t\t\t\t\tif(supbooks[bookidx][nameidx] && supbooks[bookidx][nameidx].itab > 0) {\n\t\t\t\t\t\t\to = supbooks.SheetNames[supbooks[bookidx][nameidx].itab-1] + \"!\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse o = supbooks.SheetNames[nameidx-1]+ \"!\";\n\t\t\t\t\tif(supbooks[bookidx] && supbooks[bookidx][nameidx]) o += supbooks[bookidx][nameidx].Name;\n\t\t\t\t\telse if(supbooks[0] && supbooks[0][nameidx]) o += supbooks[0][nameidx].Name;\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar ixtidata = (get_ixti_raw(supbooks, bookidx, opts)||\"\").split(\";;\");\n\t\t\t\t\t\tif(ixtidata[nameidx - 1]) o = ixtidata[nameidx - 1]; // TODO: confirm this is correct\n\t\t\t\t\t\telse o += \"SH33TJSERRX\";\n\t\t\t\t\t}\n\t\t\t\t\tstack.push(o);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(!externbook) externbook = {Name: \"SH33TJSERRY\"};\n\t\t\t\tstack.push(externbook.Name);\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgParen': /* [MS-XLS] 2.5.198.80 */\n\t\t\t\tvar lp = '(', rp = ')';\n\t\t\t\tif(last_sp >= 0) {\n\t\t\t\t\tsp = \"\";\n\t\t\t\t\tswitch(formula[0][last_sp][1][0]) {\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 2: lp = fill(\" \", formula[0][last_sp][1][1]) + lp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 3: lp = fill(\"\\r\", formula[0][last_sp][1][1]) + lp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 4: rp = fill(\" \", formula[0][last_sp][1][1]) + rp; break;\n\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\tcase 5: rp = fill(\"\\r\", formula[0][last_sp][1][1]) + rp; break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + formula[0][last_sp][1][0]);\n\t\t\t\t\t}\n\t\t\t\t\tlast_sp = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(lp + stack.pop() + rp); break;\n\n\t\t\tcase 'PtgRefErr': /* [MS-XLS] 2.5.198.86 */\n\t\t\t\tstack.push('#REF!'); break;\n\n\t\t\tcase 'PtgRefErr3d': /* [MS-XLS] 2.5.198.87 */\n\t\t\t\tstack.push('#REF!'); break;\n\n\t\t\tcase 'PtgExp': /* [MS-XLS] 2.5.198.58 TODO */\n\t\t\t\tc = {c:(f[1][1]),r:(f[1][0])};\n\t\t\t\tvar q = ({c: cell.c, r:cell.r});\n\t\t\t\tif(supbooks.sharedf[encode_cell(c)]) {\n\t\t\t\t\tvar parsedf = (supbooks.sharedf[encode_cell(c)]);\n\t\t\t\t\tstack.push(stringify_formula(parsedf, _range, q, supbooks, opts));\n\t\t\t\t} else {\n\t\t\t\t\tvar fnd = false;\n\t\t\t\t\tfor(e1=0;e1!=supbooks.arrayf.length; ++e1) {\n\t\t\t\t\t\t/* TODO: should be something like range_has */\n\t\t\t\t\t\te2 = supbooks.arrayf[e1];\n\t\t\t\t\t\tif(c.c < e2[0].s.c || c.c > e2[0].e.c) continue;\n\t\t\t\t\t\tif(c.r < e2[0].s.r || c.r > e2[0].e.r) continue;\n\t\t\t\t\t\tstack.push(stringify_formula(e2[1], _range, q, supbooks, opts));\n\t\t\t\t\t\tfnd = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(!fnd) stack.push(f[1]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgArray': /* [MS-XLS] 2.5.198.32 TODO */\n\t\t\t\tstack.push(\"{\" + stringify_array(f[1]) + \"}\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemArea': /* [MS-XLS] 2.5.198.70 TODO: confirm this is a non-display */\n\t\t\t\t//stack.push(\"(\" + f[2].map(encode_range).join(\",\") + \")\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAttrSpace': /* [MS-XLS] 2.5.198.38 */\n\t\t\tcase 'PtgAttrSpaceSemi': /* [MS-XLS] 2.5.198.39 */\n\t\t\t\tlast_sp = ff;\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgTbl': /* [MS-XLS] 2.5.198.92 TODO */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemErr': /* [MS-XLS] 2.5.198.71 */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMissArg': /* [MS-XLS] 2.5.198.74 */\n\t\t\t\tstack.push(\"\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgAreaErr': /* [MS-XLS] 2.5.198.29 */\n\t\t\t\tstack.push(\"#REF!\"); break;\n\n\t\t\tcase 'PtgAreaErr3d': /* [MS-XLS] 2.5.198.30 */\n\t\t\t\tstack.push(\"#REF!\"); break;\n\n\t\t\tcase 'PtgList': /* [MS-XLSB] 2.5.97.52 */\n\t\t\t\t// $FlowIgnore\n\t\t\t\tstack.push(\"Table\" + f[1].idx + \"[#\" + f[1].rt + \"]\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemAreaN':\n\t\t\tcase 'PtgMemNoMemN':\n\t\t\tcase 'PtgAttrNoop':\n\t\t\tcase 'PtgSheet':\n\t\t\tcase 'PtgEndSheet':\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgMemFunc': /* [MS-XLS] 2.5.198.72 TODO */\n\t\t\t\tbreak;\n\t\t\tcase 'PtgMemNoMem': /* [MS-XLS] 2.5.198.73 TODO */\n\t\t\t\tbreak;\n\n\t\t\tcase 'PtgElfCol': /* [MS-XLS] 2.5.198.46 */\n\t\t\tcase 'PtgElfColS': /* [MS-XLS] 2.5.198.47 */\n\t\t\tcase 'PtgElfColSV': /* [MS-XLS] 2.5.198.48 */\n\t\t\tcase 'PtgElfColV': /* [MS-XLS] 2.5.198.49 */\n\t\t\tcase 'PtgElfLel': /* [MS-XLS] 2.5.198.50 */\n\t\t\tcase 'PtgElfRadical': /* [MS-XLS] 2.5.198.51 */\n\t\t\tcase 'PtgElfRadicalLel': /* [MS-XLS] 2.5.198.52 */\n\t\t\tcase 'PtgElfRadicalS': /* [MS-XLS] 2.5.198.53 */\n\t\t\tcase 'PtgElfRw': /* [MS-XLS] 2.5.198.54 */\n\t\t\tcase 'PtgElfRwV': /* [MS-XLS] 2.5.198.55 */\n\t\t\t\tthrow new Error(\"Unsupported ELFs\");\n\n\t\t\tcase 'PtgSxName': /* [MS-XLS] 2.5.198.91 TODO -- find a test case */\n\t\t\t\tthrow new Error('Unrecognized Formula Token: ' + String(f));\n\t\t\tdefault: throw new Error('Unrecognized Formula Token: ' + String(f));\n\t\t}\n\t\tvar PtgNonDisp = ['PtgAttrSpace', 'PtgAttrSpaceSemi', 'PtgAttrGoto'];\n\t\tif(opts.biff != 3) if(last_sp >= 0 && PtgNonDisp.indexOf(formula[0][ff][0]) == -1) {\n\t\t\tf = formula[0][last_sp];\n\t\t\tvar _left = true;\n\t\t\tswitch(f[1][0]) {\n\t\t\t\t/* note: some bad XLSB files omit the PtgParen */\n\t\t\t\tcase 4: _left = false;\n\t\t\t\t/* falls through */\n\t\t\t\tcase 0:\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tsp = fill(\" \", f[1][1]); break;\n\t\t\t\tcase 5: _left = false;\n\t\t\t\t/* falls through */\n\t\t\t\tcase 1:\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tsp = fill(\"\\r\", f[1][1]); break;\n\t\t\t\tdefault:\n\t\t\t\t\tsp = \"\";\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tif(opts.WTF) throw new Error(\"Unexpected PtgAttrSpaceType \" + f[1][0]);\n\t\t\t}\n\t\t\tstack.push((_left ? sp : \"\") + stack.pop() + (_left ? \"\" : sp));\n\t\t\tlast_sp = -1;\n\t\t}\n\t}\n\tif(stack.length > 1 && opts.WTF) throw new Error(\"bad formula stack\");\n\treturn stack[0];\n}\n\n/* [MS-XLS] 2.5.198.1 TODO */\nfunction parse_ArrayParsedFormula(blob, length, opts) {\n\tvar target = blob.l + length, len = opts.biff == 2 ? 1 : 2;\n\tvar rgcb, cce = blob.read_shift(len); // length of rgce\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(length !== cce + len) rgcb = parse_RgbExtra(blob, length - cce - len, rgce, opts);\n\tblob.l = target;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.3 TODO */\nfunction parse_XLSCellParsedFormula(blob, length, opts) {\n\tvar target = blob.l + length, len = opts.biff == 2 ? 1 : 2;\n\tvar rgcb, cce = blob.read_shift(len); // length of rgce\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(length !== cce + len) rgcb = parse_RgbExtra(blob, length - cce - len, rgce, opts);\n\tblob.l = target;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.21 */\nfunction parse_NameParsedFormula(blob, length, opts, cce) {\n\tvar target = blob.l + length;\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tvar rgcb;\n\tif(target !== blob.l) rgcb = parse_RgbExtra(blob, target - blob.l, rgce, opts);\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.198.118 TODO */\nfunction parse_SharedParsedFormula(blob, length, opts) {\n\tvar target = blob.l + length;\n\tvar rgcb, cce = blob.read_shift(2); // length of rgce\n\tvar rgce = parse_Rgce(blob, cce, opts);\n\tif(cce == 0xFFFF) return [[],parsenoop(blob, length-2)];\n\tif(length !== cce + 2) rgcb = parse_RgbExtra(blob, target - cce - 2, rgce, opts);\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLS] 2.5.133 TODO: how to emit empty strings? */\nfunction parse_FormulaValue(blob) {\n\tvar b;\n\tif(__readUInt16LE(blob,blob.l + 6) !== 0xFFFF) return [parse_Xnum(blob),'n'];\n\tswitch(blob[blob.l]) {\n\t\tcase 0x00: blob.l += 8; return [\"String\", 's'];\n\t\tcase 0x01: b = blob[blob.l+2] === 0x1; blob.l += 8; return [b,'b'];\n\t\tcase 0x02: b = blob[blob.l+2]; blob.l += 8; return [b,'e'];\n\t\tcase 0x03: blob.l += 8; return [\"\",'s'];\n\t}\n\treturn [];\n}\nfunction write_FormulaValue(value) {\n\tif(value == null) {\n\t\t// Blank String Value\n\t\tvar o = new_buf(8);\n\t\to.write_shift(1, 0x03);\n\t\to.write_shift(1, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0);\n\t\to.write_shift(2, 0xFFFF);\n\t\treturn o;\n\t} else if(typeof value == \"number\") return write_Xnum(value);\n\treturn write_Xnum(0);\n}\n\n/* [MS-XLS] 2.4.127 TODO */\nfunction parse_Formula(blob, length, opts) {\n\tvar end = blob.l + length;\n\tvar cell = parse_XLSCell(blob, 6);\n\tif(opts.biff == 2) ++blob.l;\n\tvar val = parse_FormulaValue(blob,8);\n\tvar flags = blob.read_shift(1);\n\tif(opts.biff != 2) {\n\t\tblob.read_shift(1);\n\t\tif(opts.biff >= 5) {\n\t\t\t/*var chn = */blob.read_shift(4);\n\t\t}\n\t}\n\tvar cbf = parse_XLSCellParsedFormula(blob, end - blob.l, opts);\n\treturn {cell:cell, val:val[0], formula:cbf, shared: (flags >> 3) & 1, tt:val[1]};\n}\nfunction write_Formula(cell, R, C, opts, os) {\n\t// Cell\n\tvar o1 = write_XLSCell(R, C, os);\n\n\t// FormulaValue\n\tvar o2 = write_FormulaValue(cell.v);\n\n\t// flags + cache\n\tvar o3 = new_buf(6);\n\tvar flags = 0x01 | 0x20;\n\to3.write_shift(2, flags);\n\to3.write_shift(4, 0);\n\n\t// CellParsedFormula\n\tvar bf = new_buf(cell.bf.length);\n\tfor(var i = 0; i < cell.bf.length; ++i) bf[i] = cell.bf[i];\n\n\tvar out = bconcat([o1, o2, o3, bf]);\n\treturn out;\n}\n\n\n/* XLSB Parsed Formula records have the same shape */\nfunction parse_XLSBParsedFormula(data, length, opts) {\n\tvar cce = data.read_shift(4);\n\tvar rgce = parse_Rgce(data, cce, opts);\n\tvar cb = data.read_shift(4);\n\tvar rgcb = cb > 0 ? parse_RgbExtra(data, cb, rgce, opts) : null;\n\treturn [rgce, rgcb];\n}\n\n/* [MS-XLSB] 2.5.97.1 ArrayParsedFormula */\nvar parse_XLSBArrayParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.4 CellParsedFormula */\nvar parse_XLSBCellParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.8 DVParsedFormula */\n//var parse_XLSBDVParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.9 FRTParsedFormula */\n//var parse_XLSBFRTParsedFormula = parse_XLSBParsedFormula2;\n/* [MS-XLSB] 2.5.97.12 NameParsedFormula */\nvar parse_XLSBNameParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLSB] 2.5.97.98 SharedParsedFormula */\nvar parse_XLSBSharedParsedFormula = parse_XLSBParsedFormula;\n/* [MS-XLS] 2.5.198.4 */\nvar Cetab = {\n0x0000: 'BEEP',\n0x0001: 'OPEN',\n0x0002: 'OPEN.LINKS',\n0x0003: 'CLOSE.ALL',\n0x0004: 'SAVE',\n0x0005: 'SAVE.AS',\n0x0006: 'FILE.DELETE',\n0x0007: 'PAGE.SETUP',\n0x0008: 'PRINT',\n0x0009: 'PRINTER.SETUP',\n0x000A: 'QUIT',\n0x000B: 'NEW.WINDOW',\n0x000C: 'ARRANGE.ALL',\n0x000D: 'WINDOW.SIZE',\n0x000E: 'WINDOW.MOVE',\n0x000F: 'FULL',\n0x0010: 'CLOSE',\n0x0011: 'RUN',\n0x0016: 'SET.PRINT.AREA',\n0x0017: 'SET.PRINT.TITLES',\n0x0018: 'SET.PAGE.BREAK',\n0x0019: 'REMOVE.PAGE.BREAK',\n0x001A: 'FONT',\n0x001B: 'DISPLAY',\n0x001C: 'PROTECT.DOCUMENT',\n0x001D: 'PRECISION',\n0x001E: 'A1.R1C1',\n0x001F: 'CALCULATE.NOW',\n0x0020: 'CALCULATION',\n0x0022: 'DATA.FIND',\n0x0023: 'EXTRACT',\n0x0024: 'DATA.DELETE',\n0x0025: 'SET.DATABASE',\n0x0026: 'SET.CRITERIA',\n0x0027: 'SORT',\n0x0028: 'DATA.SERIES',\n0x0029: 'TABLE',\n0x002A: 'FORMAT.NUMBER',\n0x002B: 'ALIGNMENT',\n0x002C: 'STYLE',\n0x002D: 'BORDER',\n0x002E: 'CELL.PROTECTION',\n0x002F: 'COLUMN.WIDTH',\n0x0030: 'UNDO',\n0x0031: 'CUT',\n0x0032: 'COPY',\n0x0033: 'PASTE',\n0x0034: 'CLEAR',\n0x0035: 'PASTE.SPECIAL',\n0x0036: 'EDIT.DELETE',\n0x0037: 'INSERT',\n0x0038: 'FILL.RIGHT',\n0x0039: 'FILL.DOWN',\n0x003D: 'DEFINE.NAME',\n0x003E: 'CREATE.NAMES',\n0x003F: 'FORMULA.GOTO',\n0x0040: 'FORMULA.FIND',\n0x0041: 'SELECT.LAST.CELL',\n0x0042: 'SHOW.ACTIVE.CELL',\n0x0043: 'GALLERY.AREA',\n0x0044: 'GALLERY.BAR',\n0x0045: 'GALLERY.COLUMN',\n0x0046: 'GALLERY.LINE',\n0x0047: 'GALLERY.PIE',\n0x0048: 'GALLERY.SCATTER',\n0x0049: 'COMBINATION',\n0x004A: 'PREFERRED',\n0x004B: 'ADD.OVERLAY',\n0x004C: 'GRIDLINES',\n0x004D: 'SET.PREFERRED',\n0x004E: 'AXES',\n0x004F: 'LEGEND',\n0x0050: 'ATTACH.TEXT',\n0x0051: 'ADD.ARROW',\n0x0052: 'SELECT.CHART',\n0x0053: 'SELECT.PLOT.AREA',\n0x0054: 'PATTERNS',\n0x0055: 'MAIN.CHART',\n0x0056: 'OVERLAY',\n0x0057: 'SCALE',\n0x0058: 'FORMAT.LEGEND',\n0x0059: 'FORMAT.TEXT',\n0x005A: 'EDIT.REPEAT',\n0x005B: 'PARSE',\n0x005C: 'JUSTIFY',\n0x005D: 'HIDE',\n0x005E: 'UNHIDE',\n0x005F: 'WORKSPACE',\n0x0060: 'FORMULA',\n0x0061: 'FORMULA.FILL',\n0x0062: 'FORMULA.ARRAY',\n0x0063: 'DATA.FIND.NEXT',\n0x0064: 'DATA.FIND.PREV',\n0x0065: 'FORMULA.FIND.NEXT',\n0x0066: 'FORMULA.FIND.PREV',\n0x0067: 'ACTIVATE',\n0x0068: 'ACTIVATE.NEXT',\n0x0069: 'ACTIVATE.PREV',\n0x006A: 'UNLOCKED.NEXT',\n0x006B: 'UNLOCKED.PREV',\n0x006C: 'COPY.PICTURE',\n0x006D: 'SELECT',\n0x006E: 'DELETE.NAME',\n0x006F: 'DELETE.FORMAT',\n0x0070: 'VLINE',\n0x0071: 'HLINE',\n0x0072: 'VPAGE',\n0x0073: 'HPAGE',\n0x0074: 'VSCROLL',\n0x0075: 'HSCROLL',\n0x0076: 'ALERT',\n0x0077: 'NEW',\n0x0078: 'CANCEL.COPY',\n0x0079: 'SHOW.CLIPBOARD',\n0x007A: 'MESSAGE',\n0x007C: 'PASTE.LINK',\n0x007D: 'APP.ACTIVATE',\n0x007E: 'DELETE.ARROW',\n0x007F: 'ROW.HEIGHT',\n0x0080: 'FORMAT.MOVE',\n0x0081: 'FORMAT.SIZE',\n0x0082: 'FORMULA.REPLACE',\n0x0083: 'SEND.KEYS',\n0x0084: 'SELECT.SPECIAL',\n0x0085: 'APPLY.NAMES',\n0x0086: 'REPLACE.FONT',\n0x0087: 'FREEZE.PANES',\n0x0088: 'SHOW.INFO',\n0x0089: 'SPLIT',\n0x008A: 'ON.WINDOW',\n0x008B: 'ON.DATA',\n0x008C: 'DISABLE.INPUT',\n0x008E: 'OUTLINE',\n0x008F: 'LIST.NAMES',\n0x0090: 'FILE.CLOSE',\n0x0091: 'SAVE.WORKBOOK',\n0x0092: 'DATA.FORM',\n0x0093: 'COPY.CHART',\n0x0094: 'ON.TIME',\n0x0095: 'WAIT',\n0x0096: 'FORMAT.FONT',\n0x0097: 'FILL.UP',\n0x0098: 'FILL.LEFT',\n0x0099: 'DELETE.OVERLAY',\n0x009B: 'SHORT.MENUS',\n0x009F: 'SET.UPDATE.STATUS',\n0x00A1: 'COLOR.PALETTE',\n0x00A2: 'DELETE.STYLE',\n0x00A3: 'WINDOW.RESTORE',\n0x00A4: 'WINDOW.MAXIMIZE',\n0x00A6: 'CHANGE.LINK',\n0x00A7: 'CALCULATE.DOCUMENT',\n0x00A8: 'ON.KEY',\n0x00A9: 'APP.RESTORE',\n0x00AA: 'APP.MOVE',\n0x00AB: 'APP.SIZE',\n0x00AC: 'APP.MINIMIZE',\n0x00AD: 'APP.MAXIMIZE',\n0x00AE: 'BRING.TO.FRONT',\n0x00AF: 'SEND.TO.BACK',\n0x00B9: 'MAIN.CHART.TYPE',\n0x00BA: 'OVERLAY.CHART.TYPE',\n0x00BB: 'SELECT.END',\n0x00BC: 'OPEN.MAIL',\n0x00BD: 'SEND.MAIL',\n0x00BE: 'STANDARD.FONT',\n0x00BF: 'CONSOLIDATE',\n0x00C0: 'SORT.SPECIAL',\n0x00C1: 'GALLERY.3D.AREA',\n0x00C2: 'GALLERY.3D.COLUMN',\n0x00C3: 'GALLERY.3D.LINE',\n0x00C4: 'GALLERY.3D.PIE',\n0x00C5: 'VIEW.3D',\n0x00C6: 'GOAL.SEEK',\n0x00C7: 'WORKGROUP',\n0x00C8: 'FILL.GROUP',\n0x00C9: 'UPDATE.LINK',\n0x00CA: 'PROMOTE',\n0x00CB: 'DEMOTE',\n0x00CC: 'SHOW.DETAIL',\n0x00CE: 'UNGROUP',\n0x00CF: 'OBJECT.PROPERTIES',\n0x00D0: 'SAVE.NEW.OBJECT',\n0x00D1: 'SHARE',\n0x00D2: 'SHARE.NAME',\n0x00D3: 'DUPLICATE',\n0x00D4: 'APPLY.STYLE',\n0x00D5: 'ASSIGN.TO.OBJECT',\n0x00D6: 'OBJECT.PROTECTION',\n0x00D7: 'HIDE.OBJECT',\n0x00D8: 'SET.EXTRACT',\n0x00D9: 'CREATE.PUBLISHER',\n0x00DA: 'SUBSCRIBE.TO',\n0x00DB: 'ATTRIBUTES',\n0x00DC: 'SHOW.TOOLBAR',\n0x00DE: 'PRINT.PREVIEW',\n0x00DF: 'EDIT.COLOR',\n0x00E0: 'SHOW.LEVELS',\n0x00E1: 'FORMAT.MAIN',\n0x00E2: 'FORMAT.OVERLAY',\n0x00E3: 'ON.RECALC',\n0x00E4: 'EDIT.SERIES',\n0x00E5: 'DEFINE.STYLE',\n0x00F0: 'LINE.PRINT',\n0x00F3: 'ENTER.DATA',\n0x00F9: 'GALLERY.RADAR',\n0x00FA: 'MERGE.STYLES',\n0x00FB: 'EDITION.OPTIONS',\n0x00FC: 'PASTE.PICTURE',\n0x00FD: 'PASTE.PICTURE.LINK',\n0x00FE: 'SPELLING',\n0x0100: 'ZOOM',\n0x0103: 'INSERT.OBJECT',\n0x0104: 'WINDOW.MINIMIZE',\n0x0109: 'SOUND.NOTE',\n0x010A: 'SOUND.PLAY',\n0x010B: 'FORMAT.SHAPE',\n0x010C: 'EXTEND.POLYGON',\n0x010D: 'FORMAT.AUTO',\n0x0110: 'GALLERY.3D.BAR',\n0x0111: 'GALLERY.3D.SURFACE',\n0x0112: 'FILL.AUTO',\n0x0114: 'CUSTOMIZE.TOOLBAR',\n0x0115: 'ADD.TOOL',\n0x0116: 'EDIT.OBJECT',\n0x0117: 'ON.DOUBLECLICK',\n0x0118: 'ON.ENTRY',\n0x0119: 'WORKBOOK.ADD',\n0x011A: 'WORKBOOK.MOVE',\n0x011B: 'WORKBOOK.COPY',\n0x011C: 'WORKBOOK.OPTIONS',\n0x011D: 'SAVE.WORKSPACE',\n0x0120: 'CHART.WIZARD',\n0x0121: 'DELETE.TOOL',\n0x0122: 'MOVE.TOOL',\n0x0123: 'WORKBOOK.SELECT',\n0x0124: 'WORKBOOK.ACTIVATE',\n0x0125: 'ASSIGN.TO.TOOL',\n0x0127: 'COPY.TOOL',\n0x0128: 'RESET.TOOL',\n0x0129: 'CONSTRAIN.NUMERIC',\n0x012A: 'PASTE.TOOL',\n0x012E: 'WORKBOOK.NEW',\n0x0131: 'SCENARIO.CELLS',\n0x0132: 'SCENARIO.DELETE',\n0x0133: 'SCENARIO.ADD',\n0x0134: 'SCENARIO.EDIT',\n0x0135: 'SCENARIO.SHOW',\n0x0136: 'SCENARIO.SHOW.NEXT',\n0x0137: 'SCENARIO.SUMMARY',\n0x0138: 'PIVOT.TABLE.WIZARD',\n0x0139: 'PIVOT.FIELD.PROPERTIES',\n0x013A: 'PIVOT.FIELD',\n0x013B: 'PIVOT.ITEM',\n0x013C: 'PIVOT.ADD.FIELDS',\n0x013E: 'OPTIONS.CALCULATION',\n0x013F: 'OPTIONS.EDIT',\n0x0140: 'OPTIONS.VIEW',\n0x0141: 'ADDIN.MANAGER',\n0x0142: 'MENU.EDITOR',\n0x0143: 'ATTACH.TOOLBARS',\n0x0144: 'VBAActivate',\n0x0145: 'OPTIONS.CHART',\n0x0148: 'VBA.INSERT.FILE',\n0x014A: 'VBA.PROCEDURE.DEFINITION',\n0x0150: 'ROUTING.SLIP',\n0x0152: 'ROUTE.DOCUMENT',\n0x0153: 'MAIL.LOGON',\n0x0156: 'INSERT.PICTURE',\n0x0157: 'EDIT.TOOL',\n0x0158: 'GALLERY.DOUGHNUT',\n0x015E: 'CHART.TREND',\n0x0160: 'PIVOT.ITEM.PROPERTIES',\n0x0162: 'WORKBOOK.INSERT',\n0x0163: 'OPTIONS.TRANSITION',\n0x0164: 'OPTIONS.GENERAL',\n0x0172: 'FILTER.ADVANCED',\n0x0175: 'MAIL.ADD.MAILER',\n0x0176: 'MAIL.DELETE.MAILER',\n0x0177: 'MAIL.REPLY',\n0x0178: 'MAIL.REPLY.ALL',\n0x0179: 'MAIL.FORWARD',\n0x017A: 'MAIL.NEXT.LETTER',\n0x017B: 'DATA.LABEL',\n0x017C: 'INSERT.TITLE',\n0x017D: 'FONT.PROPERTIES',\n0x017E: 'MACRO.OPTIONS',\n0x017F: 'WORKBOOK.HIDE',\n0x0180: 'WORKBOOK.UNHIDE',\n0x0181: 'WORKBOOK.DELETE',\n0x0182: 'WORKBOOK.NAME',\n0x0184: 'GALLERY.CUSTOM',\n0x0186: 'ADD.CHART.AUTOFORMAT',\n0x0187: 'DELETE.CHART.AUTOFORMAT',\n0x0188: 'CHART.ADD.DATA',\n0x0189: 'AUTO.OUTLINE',\n0x018A: 'TAB.ORDER',\n0x018B: 'SHOW.DIALOG',\n0x018C: 'SELECT.ALL',\n0x018D: 'UNGROUP.SHEETS',\n0x018E: 'SUBTOTAL.CREATE',\n0x018F: 'SUBTOTAL.REMOVE',\n0x0190: 'RENAME.OBJECT',\n0x019C: 'WORKBOOK.SCROLL',\n0x019D: 'WORKBOOK.NEXT',\n0x019E: 'WORKBOOK.PREV',\n0x019F: 'WORKBOOK.TAB.SPLIT',\n0x01A0: 'FULL.SCREEN',\n0x01A1: 'WORKBOOK.PROTECT',\n0x01A4: 'SCROLLBAR.PROPERTIES',\n0x01A5: 'PIVOT.SHOW.PAGES',\n0x01A6: 'TEXT.TO.COLUMNS',\n0x01A7: 'FORMAT.CHARTTYPE',\n0x01A8: 'LINK.FORMAT',\n0x01A9: 'TRACER.DISPLAY',\n0x01AE: 'TRACER.NAVIGATE',\n0x01AF: 'TRACER.CLEAR',\n0x01B0: 'TRACER.ERROR',\n0x01B1: 'PIVOT.FIELD.GROUP',\n0x01B2: 'PIVOT.FIELD.UNGROUP',\n0x01B3: 'CHECKBOX.PROPERTIES',\n0x01B4: 'LABEL.PROPERTIES',\n0x01B5: 'LISTBOX.PROPERTIES',\n0x01B6: 'EDITBOX.PROPERTIES',\n0x01B7: 'PIVOT.REFRESH',\n0x01B8: 'LINK.COMBO',\n0x01B9: 'OPEN.TEXT',\n0x01BA: 'HIDE.DIALOG',\n0x01BB: 'SET.DIALOG.FOCUS',\n0x01BC: 'ENABLE.OBJECT',\n0x01BD: 'PUSHBUTTON.PROPERTIES',\n0x01BE: 'SET.DIALOG.DEFAULT',\n0x01BF: 'FILTER',\n0x01C0: 'FILTER.SHOW.ALL',\n0x01C1: 'CLEAR.OUTLINE',\n0x01C2: 'FUNCTION.WIZARD',\n0x01C3: 'ADD.LIST.ITEM',\n0x01C4: 'SET.LIST.ITEM',\n0x01C5: 'REMOVE.LIST.ITEM',\n0x01C6: 'SELECT.LIST.ITEM',\n0x01C7: 'SET.CONTROL.VALUE',\n0x01C8: 'SAVE.COPY.AS',\n0x01CA: 'OPTIONS.LISTS.ADD',\n0x01CB: 'OPTIONS.LISTS.DELETE',\n0x01CC: 'SERIES.AXES',\n0x01CD: 'SERIES.X',\n0x01CE: 'SERIES.Y',\n0x01CF: 'ERRORBAR.X',\n0x01D0: 'ERRORBAR.Y',\n0x01D1: 'FORMAT.CHART',\n0x01D2: 'SERIES.ORDER',\n0x01D3: 'MAIL.LOGOFF',\n0x01D4: 'CLEAR.ROUTING.SLIP',\n0x01D5: 'APP.ACTIVATE.MICROSOFT',\n0x01D6: 'MAIL.EDIT.MAILER',\n0x01D7: 'ON.SHEET',\n0x01D8: 'STANDARD.WIDTH',\n0x01D9: 'SCENARIO.MERGE',\n0x01DA: 'SUMMARY.INFO',\n0x01DB: 'FIND.FILE',\n0x01DC: 'ACTIVE.CELL.FONT',\n0x01DD: 'ENABLE.TIPWIZARD',\n0x01DE: 'VBA.MAKE.ADDIN',\n0x01E0: 'INSERTDATATABLE',\n0x01E1: 'WORKGROUP.OPTIONS',\n0x01E2: 'MAIL.SEND.MAILER',\n0x01E5: 'AUTOCORRECT',\n0x01E9: 'POST.DOCUMENT',\n0x01EB: 'PICKLIST',\n0x01ED: 'VIEW.SHOW',\n0x01EE: 'VIEW.DEFINE',\n0x01EF: 'VIEW.DELETE',\n0x01FD: 'SHEET.BACKGROUND',\n0x01FE: 'INSERT.MAP.OBJECT',\n0x01FF: 'OPTIONS.MENONO',\n0x0205: 'MSOCHECKS',\n0x0206: 'NORMAL',\n0x0207: 'LAYOUT',\n0x0208: 'RM.PRINT.AREA',\n0x0209: 'CLEAR.PRINT.AREA',\n0x020A: 'ADD.PRINT.AREA',\n0x020B: 'MOVE.BRK',\n0x0221: 'HIDECURR.NOTE',\n0x0222: 'HIDEALL.NOTES',\n0x0223: 'DELETE.NOTE',\n0x0224: 'TRAVERSE.NOTES',\n0x0225: 'ACTIVATE.NOTES',\n0x026C: 'PROTECT.REVISIONS',\n0x026D: 'UNPROTECT.REVISIONS',\n0x0287: 'OPTIONS.ME',\n0x028D: 'WEB.PUBLISH',\n0x029B: 'NEWWEBQUERY',\n0x02A1: 'PIVOT.TABLE.CHART',\n0x02F1: 'OPTIONS.SAVE',\n0x02F3: 'OPTIONS.SPELL',\n0x0328: 'HIDEALL.INKANNOTS'\n};\n\n/* [MS-XLS] 2.5.198.17 */\n/* [MS-XLSB] 2.5.97.10 */\nvar Ftab = {\n0x0000: 'COUNT',\n0x0001: 'IF',\n0x0002: 'ISNA',\n0x0003: 'ISERROR',\n0x0004: 'SUM',\n0x0005: 'AVERAGE',\n0x0006: 'MIN',\n0x0007: 'MAX',\n0x0008: 'ROW',\n0x0009: 'COLUMN',\n0x000A: 'NA',\n0x000B: 'NPV',\n0x000C: 'STDEV',\n0x000D: 'DOLLAR',\n0x000E: 'FIXED',\n0x000F: 'SIN',\n0x0010: 'COS',\n0x0011: 'TAN',\n0x0012: 'ATAN',\n0x0013: 'PI',\n0x0014: 'SQRT',\n0x0015: 'EXP',\n0x0016: 'LN',\n0x0017: 'LOG10',\n0x0018: 'ABS',\n0x0019: 'INT',\n0x001A: 'SIGN',\n0x001B: 'ROUND',\n0x001C: 'LOOKUP',\n0x001D: 'INDEX',\n0x001E: 'REPT',\n0x001F: 'MID',\n0x0020: 'LEN',\n0x0021: 'VALUE',\n0x0022: 'TRUE',\n0x0023: 'FALSE',\n0x0024: 'AND',\n0x0025: 'OR',\n0x0026: 'NOT',\n0x0027: 'MOD',\n0x0028: 'DCOUNT',\n0x0029: 'DSUM',\n0x002A: 'DAVERAGE',\n0x002B: 'DMIN',\n0x002C: 'DMAX',\n0x002D: 'DSTDEV',\n0x002E: 'VAR',\n0x002F: 'DVAR',\n0x0030: 'TEXT',\n0x0031: 'LINEST',\n0x0032: 'TREND',\n0x0033: 'LOGEST',\n0x0034: 'GROWTH',\n0x0035: 'GOTO',\n0x0036: 'HALT',\n0x0037: 'RETURN',\n0x0038: 'PV',\n0x0039: 'FV',\n0x003A: 'NPER',\n0x003B: 'PMT',\n0x003C: 'RATE',\n0x003D: 'MIRR',\n0x003E: 'IRR',\n0x003F: 'RAND',\n0x0040: 'MATCH',\n0x0041: 'DATE',\n0x0042: 'TIME',\n0x0043: 'DAY',\n0x0044: 'MONTH',\n0x0045: 'YEAR',\n0x0046: 'WEEKDAY',\n0x0047: 'HOUR',\n0x0048: 'MINUTE',\n0x0049: 'SECOND',\n0x004A: 'NOW',\n0x004B: 'AREAS',\n0x004C: 'ROWS',\n0x004D: 'COLUMNS',\n0x004E: 'OFFSET',\n0x004F: 'ABSREF',\n0x0050: 'RELREF',\n0x0051: 'ARGUMENT',\n0x0052: 'SEARCH',\n0x0053: 'TRANSPOSE',\n0x0054: 'ERROR',\n0x0055: 'STEP',\n0x0056: 'TYPE',\n0x0057: 'ECHO',\n0x0058: 'SET.NAME',\n0x0059: 'CALLER',\n0x005A: 'DEREF',\n0x005B: 'WINDOWS',\n0x005C: 'SERIES',\n0x005D: 'DOCUMENTS',\n0x005E: 'ACTIVE.CELL',\n0x005F: 'SELECTION',\n0x0060: 'RESULT',\n0x0061: 'ATAN2',\n0x0062: 'ASIN',\n0x0063: 'ACOS',\n0x0064: 'CHOOSE',\n0x0065: 'HLOOKUP',\n0x0066: 'VLOOKUP',\n0x0067: 'LINKS',\n0x0068: 'INPUT',\n0x0069: 'ISREF',\n0x006A: 'GET.FORMULA',\n0x006B: 'GET.NAME',\n0x006C: 'SET.VALUE',\n0x006D: 'LOG',\n0x006E: 'EXEC',\n0x006F: 'CHAR',\n0x0070: 'LOWER',\n0x0071: 'UPPER',\n0x0072: 'PROPER',\n0x0073: 'LEFT',\n0x0074: 'RIGHT',\n0x0075: 'EXACT',\n0x0076: 'TRIM',\n0x0077: 'REPLACE',\n0x0078: 'SUBSTITUTE',\n0x0079: 'CODE',\n0x007A: 'NAMES',\n0x007B: 'DIRECTORY',\n0x007C: 'FIND',\n0x007D: 'CELL',\n0x007E: 'ISERR',\n0x007F: 'ISTEXT',\n0x0080: 'ISNUMBER',\n0x0081: 'ISBLANK',\n0x0082: 'T',\n0x0083: 'N',\n0x0084: 'FOPEN',\n0x0085: 'FCLOSE',\n0x0086: 'FSIZE',\n0x0087: 'FREADLN',\n0x0088: 'FREAD',\n0x0089: 'FWRITELN',\n0x008A: 'FWRITE',\n0x008B: 'FPOS',\n0x008C: 'DATEVALUE',\n0x008D: 'TIMEVALUE',\n0x008E: 'SLN',\n0x008F: 'SYD',\n0x0090: 'DDB',\n0x0091: 'GET.DEF',\n0x0092: 'REFTEXT',\n0x0093: 'TEXTREF',\n0x0094: 'INDIRECT',\n0x0095: 'REGISTER',\n0x0096: 'CALL',\n0x0097: 'ADD.BAR',\n0x0098: 'ADD.MENU',\n0x0099: 'ADD.COMMAND',\n0x009A: 'ENABLE.COMMAND',\n0x009B: 'CHECK.COMMAND',\n0x009C: 'RENAME.COMMAND',\n0x009D: 'SHOW.BAR',\n0x009E: 'DELETE.MENU',\n0x009F: 'DELETE.COMMAND',\n0x00A0: 'GET.CHART.ITEM',\n0x00A1: 'DIALOG.BOX',\n0x00A2: 'CLEAN',\n0x00A3: 'MDETERM',\n0x00A4: 'MINVERSE',\n0x00A5: 'MMULT',\n0x00A6: 'FILES',\n0x00A7: 'IPMT',\n0x00A8: 'PPMT',\n0x00A9: 'COUNTA',\n0x00AA: 'CANCEL.KEY',\n0x00AB: 'FOR',\n0x00AC: 'WHILE',\n0x00AD: 'BREAK',\n0x00AE: 'NEXT',\n0x00AF: 'INITIATE',\n0x00B0: 'REQUEST',\n0x00B1: 'POKE',\n0x00B2: 'EXECUTE',\n0x00B3: 'TERMINATE',\n0x00B4: 'RESTART',\n0x00B5: 'HELP',\n0x00B6: 'GET.BAR',\n0x00B7: 'PRODUCT',\n0x00B8: 'FACT',\n0x00B9: 'GET.CELL',\n0x00BA: 'GET.WORKSPACE',\n0x00BB: 'GET.WINDOW',\n0x00BC: 'GET.DOCUMENT',\n0x00BD: 'DPRODUCT',\n0x00BE: 'ISNONTEXT',\n0x00BF: 'GET.NOTE',\n0x00C0: 'NOTE',\n0x00C1: 'STDEVP',\n0x00C2: 'VARP',\n0x00C3: 'DSTDEVP',\n0x00C4: 'DVARP',\n0x00C5: 'TRUNC',\n0x00C6: 'ISLOGICAL',\n0x00C7: 'DCOUNTA',\n0x00C8: 'DELETE.BAR',\n0x00C9: 'UNREGISTER',\n0x00CC: 'USDOLLAR',\n0x00CD: 'FINDB',\n0x00CE: 'SEARCHB',\n0x00CF: 'REPLACEB',\n0x00D0: 'LEFTB',\n0x00D1: 'RIGHTB',\n0x00D2: 'MIDB',\n0x00D3: 'LENB',\n0x00D4: 'ROUNDUP',\n0x00D5: 'ROUNDDOWN',\n0x00D6: 'ASC',\n0x00D7: 'DBCS',\n0x00D8: 'RANK',\n0x00DB: 'ADDRESS',\n0x00DC: 'DAYS360',\n0x00DD: 'TODAY',\n0x00DE: 'VDB',\n0x00DF: 'ELSE',\n0x00E0: 'ELSE.IF',\n0x00E1: 'END.IF',\n0x00E2: 'FOR.CELL',\n0x00E3: 'MEDIAN',\n0x00E4: 'SUMPRODUCT',\n0x00E5: 'SINH',\n0x00E6: 'COSH',\n0x00E7: 'TANH',\n0x00E8: 'ASINH',\n0x00E9: 'ACOSH',\n0x00EA: 'ATANH',\n0x00EB: 'DGET',\n0x00EC: 'CREATE.OBJECT',\n0x00ED: 'VOLATILE',\n0x00EE: 'LAST.ERROR',\n0x00EF: 'CUSTOM.UNDO',\n0x00F0: 'CUSTOM.REPEAT',\n0x00F1: 'FORMULA.CONVERT',\n0x00F2: 'GET.LINK.INFO',\n0x00F3: 'TEXT.BOX',\n0x00F4: 'INFO',\n0x00F5: 'GROUP',\n0x00F6: 'GET.OBJECT',\n0x00F7: 'DB',\n0x00F8: 'PAUSE',\n0x00FB: 'RESUME',\n0x00FC: 'FREQUENCY',\n0x00FD: 'ADD.TOOLBAR',\n0x00FE: 'DELETE.TOOLBAR',\n0x00FF: 'User',\n0x0100: 'RESET.TOOLBAR',\n0x0101: 'EVALUATE',\n0x0102: 'GET.TOOLBAR',\n0x0103: 'GET.TOOL',\n0x0104: 'SPELLING.CHECK',\n0x0105: 'ERROR.TYPE',\n0x0106: 'APP.TITLE',\n0x0107: 'WINDOW.TITLE',\n0x0108: 'SAVE.TOOLBAR',\n0x0109: 'ENABLE.TOOL',\n0x010A: 'PRESS.TOOL',\n0x010B: 'REGISTER.ID',\n0x010C: 'GET.WORKBOOK',\n0x010D: 'AVEDEV',\n0x010E: 'BETADIST',\n0x010F: 'GAMMALN',\n0x0110: 'BETAINV',\n0x0111: 'BINOMDIST',\n0x0112: 'CHIDIST',\n0x0113: 'CHIINV',\n0x0114: 'COMBIN',\n0x0115: 'CONFIDENCE',\n0x0116: 'CRITBINOM',\n0x0117: 'EVEN',\n0x0118: 'EXPONDIST',\n0x0119: 'FDIST',\n0x011A: 'FINV',\n0x011B: 'FISHER',\n0x011C: 'FISHERINV',\n0x011D: 'FLOOR',\n0x011E: 'GAMMADIST',\n0x011F: 'GAMMAINV',\n0x0120: 'CEILING',\n0x0121: 'HYPGEOMDIST',\n0x0122: 'LOGNORMDIST',\n0x0123: 'LOGINV',\n0x0124: 'NEGBINOMDIST',\n0x0125: 'NORMDIST',\n0x0126: 'NORMSDIST',\n0x0127: 'NORMINV',\n0x0128: 'NORMSINV',\n0x0129: 'STANDARDIZE',\n0x012A: 'ODD',\n0x012B: 'PERMUT',\n0x012C: 'POISSON',\n0x012D: 'TDIST',\n0x012E: 'WEIBULL',\n0x012F: 'SUMXMY2',\n0x0130: 'SUMX2MY2',\n0x0131: 'SUMX2PY2',\n0x0132: 'CHITEST',\n0x0133: 'CORREL',\n0x0134: 'COVAR',\n0x0135: 'FORECAST',\n0x0136: 'FTEST',\n0x0137: 'INTERCEPT',\n0x0138: 'PEARSON',\n0x0139: 'RSQ',\n0x013A: 'STEYX',\n0x013B: 'SLOPE',\n0x013C: 'TTEST',\n0x013D: 'PROB',\n0x013E: 'DEVSQ',\n0x013F: 'GEOMEAN',\n0x0140: 'HARMEAN',\n0x0141: 'SUMSQ',\n0x0142: 'KURT',\n0x0143: 'SKEW',\n0x0144: 'ZTEST',\n0x0145: 'LARGE',\n0x0146: 'SMALL',\n0x0147: 'QUARTILE',\n0x0148: 'PERCENTILE',\n0x0149: 'PERCENTRANK',\n0x014A: 'MODE',\n0x014B: 'TRIMMEAN',\n0x014C: 'TINV',\n0x014E: 'MOVIE.COMMAND',\n0x014F: 'GET.MOVIE',\n0x0150: 'CONCATENATE',\n0x0151: 'POWER',\n0x0152: 'PIVOT.ADD.DATA',\n0x0153: 'GET.PIVOT.TABLE',\n0x0154: 'GET.PIVOT.FIELD',\n0x0155: 'GET.PIVOT.ITEM',\n0x0156: 'RADIANS',\n0x0157: 'DEGREES',\n0x0158: 'SUBTOTAL',\n0x0159: 'SUMIF',\n0x015A: 'COUNTIF',\n0x015B: 'COUNTBLANK',\n0x015C: 'SCENARIO.GET',\n0x015D: 'OPTIONS.LISTS.GET',\n0x015E: 'ISPMT',\n0x015F: 'DATEDIF',\n0x0160: 'DATESTRING',\n0x0161: 'NUMBERSTRING',\n0x0162: 'ROMAN',\n0x0163: 'OPEN.DIALOG',\n0x0164: 'SAVE.DIALOG',\n0x0165: 'VIEW.GET',\n0x0166: 'GETPIVOTDATA',\n0x0167: 'HYPERLINK',\n0x0168: 'PHONETIC',\n0x0169: 'AVERAGEA',\n0x016A: 'MAXA',\n0x016B: 'MINA',\n0x016C: 'STDEVPA',\n0x016D: 'VARPA',\n0x016E: 'STDEVA',\n0x016F: 'VARA',\n0x0170: 'BAHTTEXT',\n0x0171: 'THAIDAYOFWEEK',\n0x0172: 'THAIDIGIT',\n0x0173: 'THAIMONTHOFYEAR',\n0x0174: 'THAINUMSOUND',\n0x0175: 'THAINUMSTRING',\n0x0176: 'THAISTRINGLENGTH',\n0x0177: 'ISTHAIDIGIT',\n0x0178: 'ROUNDBAHTDOWN',\n0x0179: 'ROUNDBAHTUP',\n0x017A: 'THAIYEAR',\n0x017B: 'RTD',\n\n0x017C: 'CUBEVALUE',\n0x017D: 'CUBEMEMBER',\n0x017E: 'CUBEMEMBERPROPERTY',\n0x017F: 'CUBERANKEDMEMBER',\n0x0180: 'HEX2BIN',\n0x0181: 'HEX2DEC',\n0x0182: 'HEX2OCT',\n0x0183: 'DEC2BIN',\n0x0184: 'DEC2HEX',\n0x0185: 'DEC2OCT',\n0x0186: 'OCT2BIN',\n0x0187: 'OCT2HEX',\n0x0188: 'OCT2DEC',\n0x0189: 'BIN2DEC',\n0x018A: 'BIN2OCT',\n0x018B: 'BIN2HEX',\n0x018C: 'IMSUB',\n0x018D: 'IMDIV',\n0x018E: 'IMPOWER',\n0x018F: 'IMABS',\n0x0190: 'IMSQRT',\n0x0191: 'IMLN',\n0x0192: 'IMLOG2',\n0x0193: 'IMLOG10',\n0x0194: 'IMSIN',\n0x0195: 'IMCOS',\n0x0196: 'IMEXP',\n0x0197: 'IMARGUMENT',\n0x0198: 'IMCONJUGATE',\n0x0199: 'IMAGINARY',\n0x019A: 'IMREAL',\n0x019B: 'COMPLEX',\n0x019C: 'IMSUM',\n0x019D: 'IMPRODUCT',\n0x019E: 'SERIESSUM',\n0x019F: 'FACTDOUBLE',\n0x01A0: 'SQRTPI',\n0x01A1: 'QUOTIENT',\n0x01A2: 'DELTA',\n0x01A3: 'GESTEP',\n0x01A4: 'ISEVEN',\n0x01A5: 'ISODD',\n0x01A6: 'MROUND',\n0x01A7: 'ERF',\n0x01A8: 'ERFC',\n0x01A9: 'BESSELJ',\n0x01AA: 'BESSELK',\n0x01AB: 'BESSELY',\n0x01AC: 'BESSELI',\n0x01AD: 'XIRR',\n0x01AE: 'XNPV',\n0x01AF: 'PRICEMAT',\n0x01B0: 'YIELDMAT',\n0x01B1: 'INTRATE',\n0x01B2: 'RECEIVED',\n0x01B3: 'DISC',\n0x01B4: 'PRICEDISC',\n0x01B5: 'YIELDDISC',\n0x01B6: 'TBILLEQ',\n0x01B7: 'TBILLPRICE',\n0x01B8: 'TBILLYIELD',\n0x01B9: 'PRICE',\n0x01BA: 'YIELD',\n0x01BB: 'DOLLARDE',\n0x01BC: 'DOLLARFR',\n0x01BD: 'NOMINAL',\n0x01BE: 'EFFECT',\n0x01BF: 'CUMPRINC',\n0x01C0: 'CUMIPMT',\n0x01C1: 'EDATE',\n0x01C2: 'EOMONTH',\n0x01C3: 'YEARFRAC',\n0x01C4: 'COUPDAYBS',\n0x01C5: 'COUPDAYS',\n0x01C6: 'COUPDAYSNC',\n0x01C7: 'COUPNCD',\n0x01C8: 'COUPNUM',\n0x01C9: 'COUPPCD',\n0x01CA: 'DURATION',\n0x01CB: 'MDURATION',\n0x01CC: 'ODDLPRICE',\n0x01CD: 'ODDLYIELD',\n0x01CE: 'ODDFPRICE',\n0x01CF: 'ODDFYIELD',\n0x01D0: 'RANDBETWEEN',\n0x01D1: 'WEEKNUM',\n0x01D2: 'AMORDEGRC',\n0x01D3: 'AMORLINC',\n0x01D4: 'CONVERT',\n0x02D4: 'SHEETJS',\n0x01D5: 'ACCRINT',\n0x01D6: 'ACCRINTM',\n0x01D7: 'WORKDAY',\n0x01D8: 'NETWORKDAYS',\n0x01D9: 'GCD',\n0x01DA: 'MULTINOMIAL',\n0x01DB: 'LCM',\n0x01DC: 'FVSCHEDULE',\n0x01DD: 'CUBEKPIMEMBER',\n0x01DE: 'CUBESET',\n0x01DF: 'CUBESETCOUNT',\n0x01E0: 'IFERROR',\n0x01E1: 'COUNTIFS',\n0x01E2: 'SUMIFS',\n0x01E3: 'AVERAGEIF',\n0x01E4: 'AVERAGEIFS'\n};\nvar FtabArgc = {\n0x0002: 1, /* ISNA */\n0x0003: 1, /* ISERROR */\n0x000A: 0, /* NA */\n0x000F: 1, /* SIN */\n0x0010: 1, /* COS */\n0x0011: 1, /* TAN */\n0x0012: 1, /* ATAN */\n0x0013: 0, /* PI */\n0x0014: 1, /* SQRT */\n0x0015: 1, /* EXP */\n0x0016: 1, /* LN */\n0x0017: 1, /* LOG10 */\n0x0018: 1, /* ABS */\n0x0019: 1, /* INT */\n0x001A: 1, /* SIGN */\n0x001B: 2, /* ROUND */\n0x001E: 2, /* REPT */\n0x001F: 3, /* MID */\n0x0020: 1, /* LEN */\n0x0021: 1, /* VALUE */\n0x0022: 0, /* TRUE */\n0x0023: 0, /* FALSE */\n0x0026: 1, /* NOT */\n0x0027: 2, /* MOD */\n0x0028: 3, /* DCOUNT */\n0x0029: 3, /* DSUM */\n0x002A: 3, /* DAVERAGE */\n0x002B: 3, /* DMIN */\n0x002C: 3, /* DMAX */\n0x002D: 3, /* DSTDEV */\n0x002F: 3, /* DVAR */\n0x0030: 2, /* TEXT */\n0x0035: 1, /* GOTO */\n0x003D: 3, /* MIRR */\n0x003F: 0, /* RAND */\n0x0041: 3, /* DATE */\n0x0042: 3, /* TIME */\n0x0043: 1, /* DAY */\n0x0044: 1, /* MONTH */\n0x0045: 1, /* YEAR */\n0x0046: 1, /* WEEKDAY */\n0x0047: 1, /* HOUR */\n0x0048: 1, /* MINUTE */\n0x0049: 1, /* SECOND */\n0x004A: 0, /* NOW */\n0x004B: 1, /* AREAS */\n0x004C: 1, /* ROWS */\n0x004D: 1, /* COLUMNS */\n0x004F: 2, /* ABSREF */\n0x0050: 2, /* RELREF */\n0x0053: 1, /* TRANSPOSE */\n0x0055: 0, /* STEP */\n0x0056: 1, /* TYPE */\n0x0059: 0, /* CALLER */\n0x005A: 1, /* DEREF */\n0x005E: 0, /* ACTIVE.CELL */\n0x005F: 0, /* SELECTION */\n0x0061: 2, /* ATAN2 */\n0x0062: 1, /* ASIN */\n0x0063: 1, /* ACOS */\n0x0065: 3, /* HLOOKUP */\n0x0066: 3, /* VLOOKUP */\n0x0069: 1, /* ISREF */\n0x006A: 1, /* GET.FORMULA */\n0x006C: 2, /* SET.VALUE */\n0x006F: 1, /* CHAR */\n0x0070: 1, /* LOWER */\n0x0071: 1, /* UPPER */\n0x0072: 1, /* PROPER */\n0x0075: 2, /* EXACT */\n0x0076: 1, /* TRIM */\n0x0077: 4, /* REPLACE */\n0x0079: 1, /* CODE */\n0x007E: 1, /* ISERR */\n0x007F: 1, /* ISTEXT */\n0x0080: 1, /* ISNUMBER */\n0x0081: 1, /* ISBLANK */\n0x0082: 1, /* T */\n0x0083: 1, /* N */\n0x0085: 1, /* FCLOSE */\n0x0086: 1, /* FSIZE */\n0x0087: 1, /* FREADLN */\n0x0088: 2, /* FREAD */\n0x0089: 2, /* FWRITELN */\n0x008A: 2, /* FWRITE */\n0x008C: 1, /* DATEVALUE */\n0x008D: 1, /* TIMEVALUE */\n0x008E: 3, /* SLN */\n0x008F: 4, /* SYD */\n0x0090: 4, /* DDB */\n0x00A1: 1, /* DIALOG.BOX */\n0x00A2: 1, /* CLEAN */\n0x00A3: 1, /* MDETERM */\n0x00A4: 1, /* MINVERSE */\n0x00A5: 2, /* MMULT */\n0x00AC: 1, /* WHILE */\n0x00AF: 2, /* INITIATE */\n0x00B0: 2, /* REQUEST */\n0x00B1: 3, /* POKE */\n0x00B2: 2, /* EXECUTE */\n0x00B3: 1, /* TERMINATE */\n0x00B8: 1, /* FACT */\n0x00BA: 1, /* GET.WORKSPACE */\n0x00BD: 3, /* DPRODUCT */\n0x00BE: 1, /* ISNONTEXT */\n0x00C3: 3, /* DSTDEVP */\n0x00C4: 3, /* DVARP */\n0x00C5: 1, /* TRUNC */\n0x00C6: 1, /* ISLOGICAL */\n0x00C7: 3, /* DCOUNTA */\n0x00C9: 1, /* UNREGISTER */\n0x00CF: 4, /* REPLACEB */\n0x00D2: 3, /* MIDB */\n0x00D3: 1, /* LENB */\n0x00D4: 2, /* ROUNDUP */\n0x00D5: 2, /* ROUNDDOWN */\n0x00D6: 1, /* ASC */\n0x00D7: 1, /* DBCS */\n0x00E1: 0, /* END.IF */\n0x00E5: 1, /* SINH */\n0x00E6: 1, /* COSH */\n0x00E7: 1, /* TANH */\n0x00E8: 1, /* ASINH */\n0x00E9: 1, /* ACOSH */\n0x00EA: 1, /* ATANH */\n0x00EB: 3, /* DGET */\n0x00F4: 1, /* INFO */\n0x00F7: 4, /* DB */\n0x00FC: 2, /* FREQUENCY */\n0x0101: 1, /* EVALUATE */\n0x0105: 1, /* ERROR.TYPE */\n0x010F: 1, /* GAMMALN */\n0x0111: 4, /* BINOMDIST */\n0x0112: 2, /* CHIDIST */\n0x0113: 2, /* CHIINV */\n0x0114: 2, /* COMBIN */\n0x0115: 3, /* CONFIDENCE */\n0x0116: 3, /* CRITBINOM */\n0x0117: 1, /* EVEN */\n0x0118: 3, /* EXPONDIST */\n0x0119: 3, /* FDIST */\n0x011A: 3, /* FINV */\n0x011B: 1, /* FISHER */\n0x011C: 1, /* FISHERINV */\n0x011D: 2, /* FLOOR */\n0x011E: 4, /* GAMMADIST */\n0x011F: 3, /* GAMMAINV */\n0x0120: 2, /* CEILING */\n0x0121: 4, /* HYPGEOMDIST */\n0x0122: 3, /* LOGNORMDIST */\n0x0123: 3, /* LOGINV */\n0x0124: 3, /* NEGBINOMDIST */\n0x0125: 4, /* NORMDIST */\n0x0126: 1, /* NORMSDIST */\n0x0127: 3, /* NORMINV */\n0x0128: 1, /* NORMSINV */\n0x0129: 3, /* STANDARDIZE */\n0x012A: 1, /* ODD */\n0x012B: 2, /* PERMUT */\n0x012C: 3, /* POISSON */\n0x012D: 3, /* TDIST */\n0x012E: 4, /* WEIBULL */\n0x012F: 2, /* SUMXMY2 */\n0x0130: 2, /* SUMX2MY2 */\n0x0131: 2, /* SUMX2PY2 */\n0x0132: 2, /* CHITEST */\n0x0133: 2, /* CORREL */\n0x0134: 2, /* COVAR */\n0x0135: 3, /* FORECAST */\n0x0136: 2, /* FTEST */\n0x0137: 2, /* INTERCEPT */\n0x0138: 2, /* PEARSON */\n0x0139: 2, /* RSQ */\n0x013A: 2, /* STEYX */\n0x013B: 2, /* SLOPE */\n0x013C: 4, /* TTEST */\n0x0145: 2, /* LARGE */\n0x0146: 2, /* SMALL */\n0x0147: 2, /* QUARTILE */\n0x0148: 2, /* PERCENTILE */\n0x014B: 2, /* TRIMMEAN */\n0x014C: 2, /* TINV */\n0x0151: 2, /* POWER */\n0x0156: 1, /* RADIANS */\n0x0157: 1, /* DEGREES */\n0x015A: 2, /* COUNTIF */\n0x015B: 1, /* COUNTBLANK */\n0x015E: 4, /* ISPMT */\n0x015F: 3, /* DATEDIF */\n0x0160: 1, /* DATESTRING */\n0x0161: 2, /* NUMBERSTRING */\n0x0168: 1, /* PHONETIC */\n0x0170: 1, /* BAHTTEXT */\n0x0171: 1, /* THAIDAYOFWEEK */\n0x0172: 1, /* THAIDIGIT */\n0x0173: 1, /* THAIMONTHOFYEAR */\n0x0174: 1, /* THAINUMSOUND */\n0x0175: 1, /* THAINUMSTRING */\n0x0176: 1, /* THAISTRINGLENGTH */\n0x0177: 1, /* ISTHAIDIGIT */\n0x0178: 1, /* ROUNDBAHTDOWN */\n0x0179: 1, /* ROUNDBAHTUP */\n0x017A: 1, /* THAIYEAR */\n0x017E: 3, /* CUBEMEMBERPROPERTY */\n0x0181: 1, /* HEX2DEC */\n0x0188: 1, /* OCT2DEC */\n0x0189: 1, /* BIN2DEC */\n0x018C: 2, /* IMSUB */\n0x018D: 2, /* IMDIV */\n0x018E: 2, /* IMPOWER */\n0x018F: 1, /* IMABS */\n0x0190: 1, /* IMSQRT */\n0x0191: 1, /* IMLN */\n0x0192: 1, /* IMLOG2 */\n0x0193: 1, /* IMLOG10 */\n0x0194: 1, /* IMSIN */\n0x0195: 1, /* IMCOS */\n0x0196: 1, /* IMEXP */\n0x0197: 1, /* IMARGUMENT */\n0x0198: 1, /* IMCONJUGATE */\n0x0199: 1, /* IMAGINARY */\n0x019A: 1, /* IMREAL */\n0x019E: 4, /* SERIESSUM */\n0x019F: 1, /* FACTDOUBLE */\n0x01A0: 1, /* SQRTPI */\n0x01A1: 2, /* QUOTIENT */\n0x01A4: 1, /* ISEVEN */\n0x01A5: 1, /* ISODD */\n0x01A6: 2, /* MROUND */\n0x01A8: 1, /* ERFC */\n0x01A9: 2, /* BESSELJ */\n0x01AA: 2, /* BESSELK */\n0x01AB: 2, /* BESSELY */\n0x01AC: 2, /* BESSELI */\n0x01AE: 3, /* XNPV */\n0x01B6: 3, /* TBILLEQ */\n0x01B7: 3, /* TBILLPRICE */\n0x01B8: 3, /* TBILLYIELD */\n0x01BB: 2, /* DOLLARDE */\n0x01BC: 2, /* DOLLARFR */\n0x01BD: 2, /* NOMINAL */\n0x01BE: 2, /* EFFECT */\n0x01BF: 6, /* CUMPRINC */\n0x01C0: 6, /* CUMIPMT */\n0x01C1: 2, /* EDATE */\n0x01C2: 2, /* EOMONTH */\n0x01D0: 2, /* RANDBETWEEN */\n0x01D4: 3, /* CONVERT */\n0x01DC: 2, /* FVSCHEDULE */\n0x01DF: 1, /* CUBESETCOUNT */\n0x01E0: 2, /* IFERROR */\n0xFFFF: 0\n};\n/* [MS-XLSX] 2.2.3 Functions */\n/* [MS-XLSB] 2.5.97.10 Ftab */\nvar XLSXFutureFunctions = {\n\t\"_xlfn.ACOT\": \"ACOT\",\n\t\"_xlfn.ACOTH\": \"ACOTH\",\n\t\"_xlfn.AGGREGATE\": \"AGGREGATE\",\n\t\"_xlfn.ARABIC\": \"ARABIC\",\n\t\"_xlfn.AVERAGEIF\": \"AVERAGEIF\",\n\t\"_xlfn.AVERAGEIFS\": \"AVERAGEIFS\",\n\t\"_xlfn.BASE\": \"BASE\",\n\t\"_xlfn.BETA.DIST\": \"BETA.DIST\",\n\t\"_xlfn.BETA.INV\": \"BETA.INV\",\n\t\"_xlfn.BINOM.DIST\": \"BINOM.DIST\",\n\t\"_xlfn.BINOM.DIST.RANGE\": \"BINOM.DIST.RANGE\",\n\t\"_xlfn.BINOM.INV\": \"BINOM.INV\",\n\t\"_xlfn.BITAND\": \"BITAND\",\n\t\"_xlfn.BITLSHIFT\": \"BITLSHIFT\",\n\t\"_xlfn.BITOR\": \"BITOR\",\n\t\"_xlfn.BITRSHIFT\": \"BITRSHIFT\",\n\t\"_xlfn.BITXOR\": \"BITXOR\",\n\t\"_xlfn.CEILING.MATH\": \"CEILING.MATH\",\n\t\"_xlfn.CEILING.PRECISE\": \"CEILING.PRECISE\",\n\t\"_xlfn.CHISQ.DIST\": \"CHISQ.DIST\",\n\t\"_xlfn.CHISQ.DIST.RT\": \"CHISQ.DIST.RT\",\n\t\"_xlfn.CHISQ.INV\": \"CHISQ.INV\",\n\t\"_xlfn.CHISQ.INV.RT\": \"CHISQ.INV.RT\",\n\t\"_xlfn.CHISQ.TEST\": \"CHISQ.TEST\",\n\t\"_xlfn.COMBINA\": \"COMBINA\",\n\t\"_xlfn.CONCAT\": \"CONCAT\",\n\t\"_xlfn.CONFIDENCE.NORM\": \"CONFIDENCE.NORM\",\n\t\"_xlfn.CONFIDENCE.T\": \"CONFIDENCE.T\",\n\t\"_xlfn.COT\": \"COT\",\n\t\"_xlfn.COTH\": \"COTH\",\n\t\"_xlfn.COUNTIFS\": \"COUNTIFS\",\n\t\"_xlfn.COVARIANCE.P\": \"COVARIANCE.P\",\n\t\"_xlfn.COVARIANCE.S\": \"COVARIANCE.S\",\n\t\"_xlfn.CSC\": \"CSC\",\n\t\"_xlfn.CSCH\": \"CSCH\",\n\t\"_xlfn.DAYS\": \"DAYS\",\n\t\"_xlfn.DECIMAL\": \"DECIMAL\",\n\t\"_xlfn.ECMA.CEILING\": \"ECMA.CEILING\",\n\t\"_xlfn.ERF.PRECISE\": \"ERF.PRECISE\",\n\t\"_xlfn.ERFC.PRECISE\": \"ERFC.PRECISE\",\n\t\"_xlfn.EXPON.DIST\": \"EXPON.DIST\",\n\t\"_xlfn.F.DIST\": \"F.DIST\",\n\t\"_xlfn.F.DIST.RT\": \"F.DIST.RT\",\n\t\"_xlfn.F.INV\": \"F.INV\",\n\t\"_xlfn.F.INV.RT\": \"F.INV.RT\",\n\t\"_xlfn.F.TEST\": \"F.TEST\",\n\t\"_xlfn.FILTERXML\": \"FILTERXML\",\n\t\"_xlfn.FLOOR.MATH\": \"FLOOR.MATH\",\n\t\"_xlfn.FLOOR.PRECISE\": \"FLOOR.PRECISE\",\n\t\"_xlfn.FORECAST.ETS\": \"FORECAST.ETS\",\n\t\"_xlfn.FORECAST.ETS.CONFINT\": \"FORECAST.ETS.CONFINT\",\n\t\"_xlfn.FORECAST.ETS.SEASONALITY\": \"FORECAST.ETS.SEASONALITY\",\n\t\"_xlfn.FORECAST.ETS.STAT\": \"FORECAST.ETS.STAT\",\n\t\"_xlfn.FORECAST.LINEAR\": \"FORECAST.LINEAR\",\n\t\"_xlfn.FORMULATEXT\": \"FORMULATEXT\",\n\t\"_xlfn.GAMMA\": \"GAMMA\",\n\t\"_xlfn.GAMMA.DIST\": \"GAMMA.DIST\",\n\t\"_xlfn.GAMMA.INV\": \"GAMMA.INV\",\n\t\"_xlfn.GAMMALN.PRECISE\": \"GAMMALN.PRECISE\",\n\t\"_xlfn.GAUSS\": \"GAUSS\",\n\t\"_xlfn.HYPGEOM.DIST\": \"HYPGEOM.DIST\",\n\t\"_xlfn.IFERROR\": \"IFERROR\",\n\t\"_xlfn.IFNA\": \"IFNA\",\n\t\"_xlfn.IFS\": \"IFS\",\n\t\"_xlfn.IMCOSH\": \"IMCOSH\",\n\t\"_xlfn.IMCOT\": \"IMCOT\",\n\t\"_xlfn.IMCSC\": \"IMCSC\",\n\t\"_xlfn.IMCSCH\": \"IMCSCH\",\n\t\"_xlfn.IMSEC\": \"IMSEC\",\n\t\"_xlfn.IMSECH\": \"IMSECH\",\n\t\"_xlfn.IMSINH\": \"IMSINH\",\n\t\"_xlfn.IMTAN\": \"IMTAN\",\n\t\"_xlfn.ISFORMULA\": \"ISFORMULA\",\n\t\"_xlfn.ISO.CEILING\": \"ISO.CEILING\",\n\t\"_xlfn.ISOWEEKNUM\": \"ISOWEEKNUM\",\n\t\"_xlfn.LOGNORM.DIST\": \"LOGNORM.DIST\",\n\t\"_xlfn.LOGNORM.INV\": \"LOGNORM.INV\",\n\t\"_xlfn.MAXIFS\": \"MAXIFS\",\n\t\"_xlfn.MINIFS\": \"MINIFS\",\n\t\"_xlfn.MODE.MULT\": \"MODE.MULT\",\n\t\"_xlfn.MODE.SNGL\": \"MODE.SNGL\",\n\t\"_xlfn.MUNIT\": \"MUNIT\",\n\t\"_xlfn.NEGBINOM.DIST\": \"NEGBINOM.DIST\",\n\t\"_xlfn.NETWORKDAYS.INTL\": \"NETWORKDAYS.INTL\",\n\t\"_xlfn.NIGBINOM\": \"NIGBINOM\",\n\t\"_xlfn.NORM.DIST\": \"NORM.DIST\",\n\t\"_xlfn.NORM.INV\": \"NORM.INV\",\n\t\"_xlfn.NORM.S.DIST\": \"NORM.S.DIST\",\n\t\"_xlfn.NORM.S.INV\": \"NORM.S.INV\",\n\t\"_xlfn.NUMBERVALUE\": \"NUMBERVALUE\",\n\t\"_xlfn.PDURATION\": \"PDURATION\",\n\t\"_xlfn.PERCENTILE.EXC\": \"PERCENTILE.EXC\",\n\t\"_xlfn.PERCENTILE.INC\": \"PERCENTILE.INC\",\n\t\"_xlfn.PERCENTRANK.EXC\": \"PERCENTRANK.EXC\",\n\t\"_xlfn.PERCENTRANK.INC\": \"PERCENTRANK.INC\",\n\t\"_xlfn.PERMUTATIONA\": \"PERMUTATIONA\",\n\t\"_xlfn.PHI\": \"PHI\",\n\t\"_xlfn.POISSON.DIST\": \"POISSON.DIST\",\n\t\"_xlfn.QUARTILE.EXC\": \"QUARTILE.EXC\",\n\t\"_xlfn.QUARTILE.INC\": \"QUARTILE.INC\",\n\t\"_xlfn.QUERYSTRING\": \"QUERYSTRING\",\n\t\"_xlfn.RANK.AVG\": \"RANK.AVG\",\n\t\"_xlfn.RANK.EQ\": \"RANK.EQ\",\n\t\"_xlfn.RRI\": \"RRI\",\n\t\"_xlfn.SEC\": \"SEC\",\n\t\"_xlfn.SECH\": \"SECH\",\n\t\"_xlfn.SHEET\": \"SHEET\",\n\t\"_xlfn.SHEETS\": \"SHEETS\",\n\t\"_xlfn.SKEW.P\": \"SKEW.P\",\n\t\"_xlfn.STDEV.P\": \"STDEV.P\",\n\t\"_xlfn.STDEV.S\": \"STDEV.S\",\n\t\"_xlfn.SUMIFS\": \"SUMIFS\",\n\t\"_xlfn.SWITCH\": \"SWITCH\",\n\t\"_xlfn.T.DIST\": \"T.DIST\",\n\t\"_xlfn.T.DIST.2T\": \"T.DIST.2T\",\n\t\"_xlfn.T.DIST.RT\": \"T.DIST.RT\",\n\t\"_xlfn.T.INV\": \"T.INV\",\n\t\"_xlfn.T.INV.2T\": \"T.INV.2T\",\n\t\"_xlfn.T.TEST\": \"T.TEST\",\n\t\"_xlfn.TEXTJOIN\": \"TEXTJOIN\",\n\t\"_xlfn.UNICHAR\": \"UNICHAR\",\n\t\"_xlfn.UNICODE\": \"UNICODE\",\n\t\"_xlfn.VAR.P\": \"VAR.P\",\n\t\"_xlfn.VAR.S\": \"VAR.S\",\n\t\"_xlfn.WEBSERVICE\": \"WEBSERVICE\",\n\t\"_xlfn.WEIBULL.DIST\": \"WEIBULL.DIST\",\n\t\"_xlfn.WORKDAY.INTL\": \"WORKDAY.INTL\",\n\t\"_xlfn.XOR\": \"XOR\",\n\t\"_xlfn.Z.TEST\": \"Z.TEST\"\n};\n\n/* Part 3 TODO: actually parse formulae */\nfunction ods_to_csf_formula(f) {\n\tif(f.slice(0,3) == \"of:\") f = f.slice(3);\n\t/* 5.2 Basic Expressions */\n\tif(f.charCodeAt(0) == 61) {\n\t\tf = f.slice(1);\n\t\tif(f.charCodeAt(0) == 61) f = f.slice(1);\n\t}\n\tf = f.replace(/COM\\.MICROSOFT\\./g, \"\");\n\t/* Part 3 Section 5.8 References */\n\tf = f.replace(/\\[((?:\\.[A-Z]+[0-9]+)(?::\\.[A-Z]+[0-9]+)?)\\]/g, function($$, $1) { return $1.replace(/\\./g,\"\"); });\n\t/* TODO: something other than this */\n\tf = f.replace(/\\[.(#[A-Z]*[?!])\\]/g, \"$1\");\n\treturn f.replace(/[;~]/g,\",\").replace(/\\|/g,\";\");\n}\n\nfunction csf_to_ods_formula(f) {\n\tvar o = \"of:=\" + f.replace(crefregex, \"$1[.$2$3$4$5]\").replace(/\\]:\\[/g,\":\");\n\t/* TODO: something other than this */\n\treturn o.replace(/;/g, \"|\").replace(/,/g,\";\");\n}\n\nfunction ods_to_csf_3D(r) {\n\tvar a = r.split(\":\");\n\tvar s = a[0].split(\".\")[0];\n\treturn [s, a[0].split(\".\")[1] + (a.length > 1 ? (\":\" + (a[1].split(\".\")[1] || a[1].split(\".\")[0])) : \"\")];\n}\n\nfunction csf_to_ods_3D(r) {\n\treturn r.replace(/\\./,\"!\");\n}\n\nvar strs = {}; // shared strings\nvar _ssfopts = {}; // spreadsheet formatting options\n\nRELS.WS = [\n\t\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\",\n\t\"http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet\"\n];\n\n/*global Map */\nvar browser_has_Map = typeof Map !== 'undefined';\n\nfunction get_sst_id(sst, str, rev) {\n\tvar i = 0, len = sst.length;\n\tif(rev) {\n\t\tif(browser_has_Map ? rev.has(str) : Object.prototype.hasOwnProperty.call(rev, str)) {\n\t\t\tvar revarr = browser_has_Map ? rev.get(str) : rev[str];\n\t\t\tfor(; i < revarr.length; ++i) {\n\t\t\t\tif(sst[revarr[i]].t === str) { sst.Count ++; return revarr[i]; }\n\t\t\t}\n\t\t}\n\t} else for(; i < len; ++i) {\n\t\tif(sst[i].t === str) { sst.Count ++; return i; }\n\t}\n\tsst[len] = ({t:str}); sst.Count ++; sst.Unique ++;\n\tif(rev) {\n\t\tif(browser_has_Map) {\n\t\t\tif(!rev.has(str)) rev.set(str, []);\n\t\t\trev.get(str).push(len);\n\t\t} else {\n\t\t\tif(!Object.prototype.hasOwnProperty.call(rev, str)) rev[str] = [];\n\t\t\trev[str].push(len);\n\t\t}\n\t}\n\treturn len;\n}\n\nfunction col_obj_w(C, col) {\n\tvar p = ({min:C+1,max:C+1});\n\t/* wch (chars), wpx (pixels) */\n\tvar wch = -1;\n\tif(col.MDW) MDW = col.MDW;\n\tif(col.width != null) p.customWidth = 1;\n\telse if(col.wpx != null) wch = px2char(col.wpx);\n\telse if(col.wch != null) wch = col.wch;\n\tif(wch > -1) { p.width = char2width(wch); p.customWidth = 1; }\n\telse if(col.width != null) p.width = col.width;\n\tif(col.hidden) p.hidden = true;\n\tif(col.level != null) { p.outlineLevel = p.level = col.level; }\n\treturn p;\n}\n\nfunction default_margins(margins, mode) {\n\tif(!margins) return;\n\tvar defs = [0.7, 0.7, 0.75, 0.75, 0.3, 0.3];\n\tif(mode == 'xlml') defs = [1, 1, 1, 1, 0.5, 0.5];\n\tif(margins.left == null) margins.left = defs[0];\n\tif(margins.right == null) margins.right = defs[1];\n\tif(margins.top == null) margins.top = defs[2];\n\tif(margins.bottom == null) margins.bottom = defs[3];\n\tif(margins.header == null) margins.header = defs[4];\n\tif(margins.footer == null) margins.footer = defs[5];\n}\n\nfunction get_cell_style(styles, cell, opts) {\n\tvar z = opts.revssf[cell.z != null ? cell.z : \"General\"];\n\tvar i = 0x3c, len = styles.length;\n\tif(z == null && opts.ssf) {\n\t\tfor(; i < 0x188; ++i) if(opts.ssf[i] == null) {\n\t\t\tSSF.load(cell.z, i);\n\t\t\t// $FlowIgnore\n\t\t\topts.ssf[i] = cell.z;\n\t\t\topts.revssf[cell.z] = z = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tfor(i = 0; i != len; ++i) if(styles[i].numFmtId === z) return i;\n\tstyles[len] = {\n\t\tnumFmtId:z,\n\t\tfontId:0,\n\t\tfillId:0,\n\t\tborderId:0,\n\t\txfId:0,\n\t\tapplyNumberFormat:1\n\t};\n\treturn len;\n}\n\nfunction safe_format(p, fmtid, fillid, opts, themes, styles) {\n\ttry {\n\t\tif(opts.cellNF) p.z = SSF._table[fmtid];\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(p.t === 'z' && !opts.cellStyles) return;\n\tif(p.t === 'd' && typeof p.v === 'string') p.v = parseDate(p.v);\n\tif((!opts || opts.cellText !== false) && p.t !== 'z') try {\n\t\tif(SSF._table[fmtid] == null) SSF.load(SSFImplicit[fmtid] || \"General\", fmtid);\n\t\tif(p.t === 'e') p.w = p.w || BErr[p.v];\n\t\telse if(fmtid === 0) {\n\t\t\tif(p.t === 'n') {\n\t\t\t\tif((p.v|0) === p.v) p.w = SSF._general_int(p.v);\n\t\t\t\telse p.w = SSF._general_num(p.v);\n\t\t\t}\n\t\t\telse if(p.t === 'd') {\n\t\t\t\tvar dd = datenum(p.v);\n\t\t\t\tif((dd|0) === dd) p.w = SSF._general_int(dd);\n\t\t\t\telse p.w = SSF._general_num(dd);\n\t\t\t}\n\t\t\telse if(p.v === undefined) return \"\";\n\t\t\telse p.w = SSF._general(p.v,_ssfopts);\n\t\t}\n\t\telse if(p.t === 'd') p.w = SSF.format(fmtid,datenum(p.v),_ssfopts);\n\t\telse p.w = SSF.format(fmtid,p.v,_ssfopts);\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(!opts.cellStyles) return;\n\tif(fillid != null) try {\n\t\tp.s = styles.Fills[fillid];\n\t\tif (p.s.fgColor && p.s.fgColor.theme && !p.s.fgColor.rgb) {\n\t\t\tp.s.fgColor.rgb = rgb_tint(themes.themeElements.clrScheme[p.s.fgColor.theme].rgb, p.s.fgColor.tint || 0);\n\t\t\tif(opts.WTF) p.s.fgColor.raw_rgb = themes.themeElements.clrScheme[p.s.fgColor.theme].rgb;\n\t\t}\n\t\tif (p.s.bgColor && p.s.bgColor.theme) {\n\t\t\tp.s.bgColor.rgb = rgb_tint(themes.themeElements.clrScheme[p.s.bgColor.theme].rgb, p.s.bgColor.tint || 0);\n\t\t\tif(opts.WTF) p.s.bgColor.raw_rgb = themes.themeElements.clrScheme[p.s.bgColor.theme].rgb;\n\t\t}\n\t} catch(e) { if(opts.WTF && styles.Fills) throw e; }\n}\n\nfunction check_ws(ws, sname, i) {\n\tif(ws && ws['!ref']) {\n\t\tvar range = safe_decode_range(ws['!ref']);\n\t\tif(range.e.c < range.s.c || range.e.r < range.s.r) throw new Error(\"Bad range (\" + i + \"): \" + ws['!ref']);\n\t}\n}\nfunction parse_ws_xml_dim(ws, s) {\n\tvar d = safe_decode_range(s);\n\tif(d.s.r<=d.e.r && d.s.c<=d.e.c && d.s.r>=0 && d.s.c>=0) ws[\"!ref\"] = encode_range(d);\n}\nvar mergecregex = /<(?:\\w:)?mergeCell ref=\"[A-Z0-9:]+\"\\s*[\\/]?>/g;\nvar sheetdataregex = /<(?:\\w+:)?sheetData[^>]*>([\\s\\S]*)<\\/(?:\\w+:)?sheetData>/;\nvar hlinkregex = /<(?:\\w:)?hyperlink [^>]*>/mg;\nvar dimregex = /\"(\\w*:\\w*)\"/;\nvar colregex = /<(?:\\w:)?col\\b[^>]*[\\/]?>/g;\nvar afregex = /<(?:\\w:)?autoFilter[^>]*([\\/]|>([\\s\\S]*)<\\/(?:\\w:)?autoFilter)>/g;\nvar marginregex= /<(?:\\w:)?pageMargins[^>]*\\/>/g;\nvar sheetprregex = /<(?:\\w:)?sheetPr\\b(?:[^>a-z][^>]*)?\\/>/;\nvar sheetprregex2= /<(?:\\w:)?sheetPr[^>]*(?:[\\/]|>([\\s\\S]*)<\\/(?:\\w:)?sheetPr)>/;\nvar svsregex = /<(?:\\w:)?sheetViews[^>]*(?:[\\/]|>([\\s\\S]*)<\\/(?:\\w:)?sheetViews)>/;\n\n/* 18.3 Worksheets */\nfunction parse_ws_xml(data, opts, idx, rels, wb, themes, styles) {\n\tif(!data) return data;\n\tif(!rels) rels = {'!id':{}};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\n\t/* 18.3.1.99 worksheet CT_Worksheet */\n\tvar s = opts.dense ? ([]) : ({});\n\tvar refguess = ({s: {r:2000000, c:2000000}, e: {r:0, c:0} });\n\n\tvar data1 = \"\", data2 = \"\";\n\tvar mtch = data.match(sheetdataregex);\n\tif(mtch) {\n\t\tdata1 = data.slice(0, mtch.index);\n\t\tdata2 = data.slice(mtch.index + mtch[0].length);\n\t} else data1 = data2 = data;\n\n\t/* 18.3.1.82 sheetPr CT_SheetPr */\n\tvar sheetPr = data1.match(sheetprregex);\n\tif(sheetPr) parse_ws_xml_sheetpr(sheetPr[0], s, wb, idx);\n\telse if((sheetPr = data1.match(sheetprregex2))) parse_ws_xml_sheetpr2(sheetPr[0], sheetPr[1]||\"\", s, wb, idx, styles, themes);\n\n\t/* 18.3.1.35 dimension CT_SheetDimension */\n\tvar ridx = (data1.match(/<(?:\\w*:)?dimension/)||{index:-1}).index;\n\tif(ridx > 0) {\n\t\tvar ref = data1.slice(ridx,ridx+50).match(dimregex);\n\t\tif(ref) parse_ws_xml_dim(s, ref[1]);\n\t}\n\n\t/* 18.3.1.88 sheetViews CT_SheetViews */\n\tvar svs = data1.match(svsregex);\n\tif(svs && svs[1]) parse_ws_xml_sheetviews(svs[1], wb);\n\n\t/* 18.3.1.17 cols CT_Cols */\n\tvar columns = [];\n\tif(opts.cellStyles) {\n\t\t/* 18.3.1.13 col CT_Col */\n\t\tvar cols = data1.match(colregex);\n\t\tif(cols) parse_ws_xml_cols(columns, cols);\n\t}\n\n\t/* 18.3.1.80 sheetData CT_SheetData ? */\n\tif(mtch) parse_ws_xml_data(mtch[1], s, opts, refguess, themes, styles);\n\n\t/* 18.3.1.2 autoFilter CT_AutoFilter */\n\tvar afilter = data2.match(afregex);\n\tif(afilter) s['!autofilter'] = parse_ws_xml_autofilter(afilter[0]);\n\n\t/* 18.3.1.55 mergeCells CT_MergeCells */\n\tvar merges = [];\n\tvar _merge = data2.match(mergecregex);\n\tif(_merge) for(ridx = 0; ridx != _merge.length; ++ridx)\n\t\tmerges[ridx] = safe_decode_range(_merge[ridx].slice(_merge[ridx].indexOf(\"\\\"\")+1));\n\n\t/* 18.3.1.48 hyperlinks CT_Hyperlinks */\n\tvar hlink = data2.match(hlinkregex);\n\tif(hlink) parse_ws_xml_hlinks(s, hlink, rels);\n\n\t/* 18.3.1.62 pageMargins CT_PageMargins */\n\tvar margins = data2.match(marginregex);\n\tif(margins) s['!margins'] = parse_ws_xml_margins(parsexmltag(margins[0]));\n\n\tif(!s[\"!ref\"] && refguess.e.c >= refguess.s.c && refguess.e.r >= refguess.s.r) s[\"!ref\"] = encode_range(refguess);\n\tif(opts.sheetRows > 0 && s[\"!ref\"]) {\n\t\tvar tmpref = safe_decode_range(s[\"!ref\"]);\n\t\tif(opts.sheetRows <= +tmpref.e.r) {\n\t\t\ttmpref.e.r = opts.sheetRows - 1;\n\t\t\tif(tmpref.e.r > refguess.e.r) tmpref.e.r = refguess.e.r;\n\t\t\tif(tmpref.e.r < tmpref.s.r) tmpref.s.r = tmpref.e.r;\n\t\t\tif(tmpref.e.c > refguess.e.c) tmpref.e.c = refguess.e.c;\n\t\t\tif(tmpref.e.c < tmpref.s.c) tmpref.s.c = tmpref.e.c;\n\t\t\ts[\"!fullref\"] = s[\"!ref\"];\n\t\t\ts[\"!ref\"] = encode_range(tmpref);\n\t\t}\n\t}\n\tif(columns.length > 0) s[\"!cols\"] = columns;\n\tif(merges.length > 0) s[\"!merges\"] = merges;\n\treturn s;\n}\n\nfunction write_ws_xml_merges(merges) {\n\tif(merges.length === 0) return \"\";\n\tvar o = '';\n\tfor(var i = 0; i != merges.length; ++i) o += '';\n\treturn o + '';\n}\n\n/* 18.3.1.82-3 sheetPr CT_ChartsheetPr / CT_SheetPr */\nfunction parse_ws_xml_sheetpr(sheetPr, s, wb, idx) {\n\tvar data = parsexmltag(sheetPr);\n\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\tif(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));\n}\nfunction parse_ws_xml_sheetpr2(sheetPr, body, s, wb, idx, styles, themes) {\n\tparse_ws_xml_sheetpr(sheetPr.slice(0, sheetPr.indexOf(\">\")), s, wb, idx);\n}\nfunction write_ws_xml_sheetpr(ws, wb, idx, opts, o) {\n\tvar needed = false;\n\tvar props = {}, payload = null;\n\tif(opts.bookType !== 'xlsx' && wb.vbaraw) {\n\t\tvar cname = wb.SheetNames[idx];\n\t\ttry { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}\n\t\tneeded = true;\n\t\tprops.codeName = utf8write(escapexml(cname));\n\t}\n\n\tif(ws && ws[\"!outline\"]) {\n\t\tvar outlineprops = {summaryBelow:1, summaryRight:1};\n\t\tif(ws[\"!outline\"].above) outlineprops.summaryBelow = 0;\n\t\tif(ws[\"!outline\"].left) outlineprops.summaryRight = 0;\n\t\tpayload = (payload||\"\") + writextag('outlinePr', null, outlineprops);\n\t}\n\n\tif(!needed && !payload) return;\n\to[o.length] = (writextag('sheetPr', payload, props));\n}\n\n/* 18.3.1.85 sheetProtection CT_SheetProtection */\nvar sheetprot_deffalse = [\"objects\", \"scenarios\", \"selectLockedCells\", \"selectUnlockedCells\"];\nvar sheetprot_deftrue = [\n\t\"formatColumns\", \"formatRows\", \"formatCells\",\n\t\"insertColumns\", \"insertRows\", \"insertHyperlinks\",\n\t\"deleteColumns\", \"deleteRows\",\n\t\"sort\", \"autoFilter\", \"pivotTables\"\n];\nfunction write_ws_xml_protection(sp) {\n\t// algorithmName, hashValue, saltValue, spinCount\n\tvar o = ({sheet:1});\n\tsheetprot_deffalse.forEach(function(n) { if(sp[n] != null && sp[n]) o[n] = \"1\"; });\n\tsheetprot_deftrue.forEach(function(n) { if(sp[n] != null && !sp[n]) o[n] = \"0\"; });\n\t/* TODO: algorithm */\n\tif(sp.password) o.password = crypto_CreatePasswordVerifier_Method1(sp.password).toString(16).toUpperCase();\n\treturn writextag('sheetProtection', null, o);\n}\n\nfunction parse_ws_xml_hlinks(s, data, rels) {\n\tvar dense = Array.isArray(s);\n\tfor(var i = 0; i != data.length; ++i) {\n\t\tvar val = parsexmltag(utf8read(data[i]), true);\n\t\tif(!val.ref) return;\n\t\tvar rel = ((rels || {})['!id']||[])[val.id];\n\t\tif(rel) {\n\t\t\tval.Target = rel.Target;\n\t\t\tif(val.location) val.Target += \"#\"+unescapexml(val.location);\n\t\t} else {\n\t\t\tval.Target = \"#\" + unescapexml(val.location);\n\t\t\trel = {Target: val.Target, TargetMode: 'Internal'};\n\t\t}\n\t\tval.Rel = rel;\n\t\tif(val.tooltip) { val.Tooltip = val.tooltip; delete val.tooltip; }\n\t\tvar rng = safe_decode_range(val.ref);\n\t\tfor(var R=rng.s.r;R<=rng.e.r;++R) for(var C=rng.s.c;C<=rng.e.c;++C) {\n\t\t\tvar addr = encode_cell({c:C,r:R});\n\t\t\tif(dense) {\n\t\t\t\tif(!s[R]) s[R] = [];\n\t\t\t\tif(!s[R][C]) s[R][C] = {t:\"z\",v:undefined};\n\t\t\t\ts[R][C].l = val;\n\t\t\t} else {\n\t\t\t\tif(!s[addr]) s[addr] = {t:\"z\",v:undefined};\n\t\t\t\ts[addr].l = val;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction parse_ws_xml_margins(margin) {\n\tvar o = {};\n\t[\"left\", \"right\", \"top\", \"bottom\", \"header\", \"footer\"].forEach(function(k) {\n\t\tif(margin[k]) o[k] = parseFloat(margin[k]);\n\t});\n\treturn o;\n}\nfunction write_ws_xml_margins(margin) {\n\tdefault_margins(margin);\n\treturn writextag('pageMargins', null, margin);\n}\n\nfunction parse_ws_xml_cols(columns, cols) {\n\tvar seencol = false;\n\tfor(var coli = 0; coli != cols.length; ++coli) {\n\t\tvar coll = parsexmltag(cols[coli], true);\n\t\tif(coll.hidden) coll.hidden = parsexmlbool(coll.hidden);\n\t\tvar colm=parseInt(coll.min, 10)-1, colM=parseInt(coll.max,10)-1;\n\t\tif(coll.outlineLevel) coll.level = (+coll.outlineLevel || 0);\n\t\tdelete coll.min; delete coll.max; coll.width = +coll.width;\n\t\tif(!seencol && coll.width) { seencol = true; find_mdw_colw(coll.width); }\n\t\tprocess_col(coll);\n\t\twhile(colm <= colM) columns[colm++] = dup(coll);\n\t}\n}\nfunction write_ws_xml_cols(ws, cols) {\n\tvar o = [\"\"], col;\n\tfor(var i = 0; i != cols.length; ++i) {\n\t\tif(!(col = cols[i])) continue;\n\t\to[o.length] = (writextag('col', null, col_obj_w(i, col)));\n\t}\n\to[o.length] = \"\";\n\treturn o.join(\"\");\n}\n\nfunction parse_ws_xml_autofilter(data) {\n\tvar o = { ref: (data.match(/ref=\"([^\"]*)\"/)||[])[1]};\n\treturn o;\n}\nfunction write_ws_xml_autofilter(data, ws, wb, idx) {\n\tvar ref = typeof data.ref == \"string\" ? data.ref : encode_range(data.ref);\n\tif(!wb.Workbook) wb.Workbook = ({Sheets:[]});\n\tif(!wb.Workbook.Names) wb.Workbook.Names = [];\n\tvar names = wb.Workbook.Names;\n\tvar range = decode_range(ref);\n\tif(range.s.r == range.e.r) { range.e.r = decode_range(ws[\"!ref\"]).e.r; ref = encode_range(range); }\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar name = names[i];\n\t\tif(name.Name != '_xlnm._FilterDatabase') continue;\n\t\tif(name.Sheet != idx) continue;\n\t\tname.Ref = \"'\" + wb.SheetNames[idx] + \"'!\" + ref; break;\n\t}\n\tif(i == names.length) names.push({ Name: '_xlnm._FilterDatabase', Sheet: idx, Ref: \"'\" + wb.SheetNames[idx] + \"'!\" + ref });\n\treturn writextag(\"autoFilter\", null, {ref:ref});\n}\n\n/* 18.3.1.88 sheetViews CT_SheetViews */\n/* 18.3.1.87 sheetView CT_SheetView */\nvar sviewregex = /<(?:\\w:)?sheetView(?:[^>a-z][^>]*)?\\/?>/;\nfunction parse_ws_xml_sheetviews(data, wb) {\n\tif(!wb.Views) wb.Views = [{}];\n\t(data.match(sviewregex)||[]).forEach(function(r, i) {\n\t\tvar tag = parsexmltag(r);\n\t\t// $FlowIgnore\n\t\tif(!wb.Views[i]) wb.Views[i] = {};\n\t\t// $FlowIgnore\n\t\tif(+tag.zoomScale) wb.Views[i].zoom = +tag.zoomScale;\n\t\t// $FlowIgnore\n\t\tif(parsexmlbool(tag.rightToLeft)) wb.Views[i].RTL = true;\n\t});\n}\nfunction write_ws_xml_sheetviews(ws, opts, idx, wb) {\n\tvar sview = ({workbookViewId:\"0\"});\n\t// $FlowIgnore\n\tif((((wb||{}).Workbook||{}).Views||[])[0]) sview.rightToLeft = wb.Workbook.Views[0].RTL ? \"1\" : \"0\";\n\treturn writextag(\"sheetViews\", writextag(\"sheetView\", null, sview), {});\n}\n\nfunction write_ws_xml_cell(cell, ref, ws, opts) {\n\tif(cell.v === undefined && typeof cell.f !== \"string\" || cell.t === 'z') return \"\";\n\tvar vv = \"\";\n\tvar oldt = cell.t, oldv = cell.v;\n\tif(cell.t !== \"z\") switch(cell.t) {\n\t\tcase 'b': vv = cell.v ? \"1\" : \"0\"; break;\n\t\tcase 'n': vv = ''+cell.v; break;\n\t\tcase 'e': vv = BErr[cell.v]; break;\n\t\tcase 'd':\n\t\t\tif(opts && opts.cellDates) vv = parseDate(cell.v, -1).toISOString();\n\t\t\telse {\n\t\t\t\tcell = dup(cell);\n\t\t\t\tcell.t = 'n';\n\t\t\t\tvv = ''+(cell.v = datenum(parseDate(cell.v)));\n\t\t\t}\n\t\t\tif(typeof cell.z === 'undefined') cell.z = SSF._table[14];\n\t\t\tbreak;\n\t\tdefault: vv = cell.v; break;\n\t}\n\tvar v = writetag('v', escapexml(vv)), o = ({r:ref});\n\t/* TODO: cell style */\n\tvar os = get_cell_style(opts.cellXfs, cell, opts);\n\tif(os !== 0) o.s = os;\n\tswitch(cell.t) {\n\t\tcase 'n': break;\n\t\tcase 'd': o.t = \"d\"; break;\n\t\tcase 'b': o.t = \"b\"; break;\n\t\tcase 'e': o.t = \"e\"; break;\n\t\tcase 'z': break;\n\t\tdefault: if(cell.v == null) { delete cell.t; break; }\n\t\t\tif(cell.v.length > 32767) throw new Error(\"Text length must not exceed 32767 characters\");\n\t\t\tif(opts && opts.bookSST) {\n\t\t\t\tv = writetag('v', ''+get_sst_id(opts.Strings, cell.v, opts.revStrings));\n\t\t\t\to.t = \"s\"; break;\n\t\t\t}\n\t\t\to.t = \"str\"; break;\n\t}\n\tif(cell.t != oldt) { cell.t = oldt; cell.v = oldv; }\n\tif(typeof cell.f == \"string\" && cell.f) {\n\t\tvar ff = cell.F && cell.F.slice(0, ref.length) == ref ? {t:\"array\", ref:cell.F} : null;\n\t\tv = writextag('f', escapexml(cell.f), ff) + (cell.v != null ? v : \"\");\n\t}\n\tif(cell.l) ws['!links'].push([ref, cell.l]);\n\tif(cell.c) ws['!comments'].push([ref, cell.c]);\n\treturn writextag('c', v, o);\n}\n\nvar parse_ws_xml_data = (function() {\n\tvar cellregex = /<(?:\\w+:)?c[ \\/>]/, rowregex = /<\\/(?:\\w+:)?row>/;\n\tvar rregex = /r=[\"']([^\"']*)[\"']/, isregex = /<(?:\\w+:)?is>([\\S\\s]*?)<\\/(?:\\w+:)?is>/;\n\tvar refregex = /ref=[\"']([^\"']*)[\"']/;\n\tvar match_v = matchtag(\"v\"), match_f = matchtag(\"f\");\n\nreturn function parse_ws_xml_data(sdata, s, opts, guess, themes, styles) {\n\tvar ri = 0, x = \"\", cells = [], cref = [], idx=0, i=0, cc=0, d=\"\", p;\n\tvar tag, tagr = 0, tagc = 0;\n\tvar sstr, ftag;\n\tvar fmtid = 0, fillid = 0;\n\tvar do_format = Array.isArray(styles.CellXf), cf;\n\tvar arrayf = [];\n\tvar sharedf = [];\n\tvar dense = Array.isArray(s);\n\tvar rows = [], rowobj = {}, rowrite = false;\n\tvar sheetStubs = !!opts.sheetStubs;\n\tfor(var marr = sdata.split(rowregex), mt = 0, marrlen = marr.length; mt != marrlen; ++mt) {\n\t\tx = marr[mt].trim();\n\t\tvar xlen = x.length;\n\t\tif(xlen === 0) continue;\n\n\t\t/* 18.3.1.73 row CT_Row */\n\t\tvar rstarti = 0;\n\t\touta: for(ri = 0; ri < xlen; ++ri) switch(/*x.charCodeAt(ri)*/x[ri]) {\n\t\t\tcase \">\" /*62*/:\n\t\t\t\tif(/*x.charCodeAt(ri-1) != 47*/x[ri-1] != \"/\") { ++ri; break outa; }\n\t\t\t\tif(opts && opts.cellStyles) {\n\t\t\t\t\t// TODO: avoid duplication\n\t\t\t\t\ttag = parsexmltag(x.slice(rstarti,ri), true);\n\t\t\t\t\ttagr = tag.r != null ? parseInt(tag.r, 10) : tagr+1; tagc = -1;\n\t\t\t\t\tif(opts.sheetRows && opts.sheetRows < tagr) continue;\n\t\t\t\t\trowobj = {}; rowrite = false;\n\t\t\t\t\tif(tag.ht) { rowrite = true; rowobj.hpt = parseFloat(tag.ht); rowobj.hpx = pt2px(rowobj.hpt); }\n\t\t\t\t\tif(tag.hidden == \"1\") { rowrite = true; rowobj.hidden = true; }\n\t\t\t\t\tif(tag.outlineLevel != null) { rowrite = true; rowobj.level = +tag.outlineLevel; }\n\t\t\t\t\tif(rowrite) rows[tagr-1] = rowobj;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"<\" /*60*/: rstarti = ri; break;\n\t\t}\n\t\tif(rstarti >= ri) break;\n\t\ttag = parsexmltag(x.slice(rstarti,ri), true);\n\t\ttagr = tag.r != null ? parseInt(tag.r, 10) : tagr+1; tagc = -1;\n\t\tif(opts.sheetRows && opts.sheetRows < tagr) continue;\n\t\tif(guess.s.r > tagr - 1) guess.s.r = tagr - 1;\n\t\tif(guess.e.r < tagr - 1) guess.e.r = tagr - 1;\n\n\t\tif(opts && opts.cellStyles) {\n\t\t\trowobj = {}; rowrite = false;\n\t\t\tif(tag.ht) { rowrite = true; rowobj.hpt = parseFloat(tag.ht); rowobj.hpx = pt2px(rowobj.hpt); }\n\t\t\tif(tag.hidden == \"1\") { rowrite = true; rowobj.hidden = true; }\n\t\t\tif(tag.outlineLevel != null) { rowrite = true; rowobj.level = +tag.outlineLevel; }\n\t\t\tif(rowrite) rows[tagr-1] = rowobj;\n\t\t}\n\n\t\t/* 18.3.1.4 c CT_Cell */\n\t\tcells = x.slice(ri).split(cellregex);\n\t\tfor(var rslice = 0; rslice != cells.length; ++rslice) if(cells[rslice].trim().charAt(0) != \"<\") break;\n\t\tcells = cells.slice(rslice);\n\t\tfor(ri = 0; ri != cells.length; ++ri) {\n\t\t\tx = cells[ri].trim();\n\t\t\tif(x.length === 0) continue;\n\t\t\tcref = x.match(rregex); idx = ri; i=0; cc=0;\n\t\t\tx = \"\":\"\") + x;\n\t\t\tif(cref != null && cref.length === 2) {\n\t\t\t\tidx = 0; d=cref[1];\n\t\t\t\tfor(i=0; i != d.length; ++i) {\n\t\t\t\t\tif((cc=d.charCodeAt(i)-64) < 1 || cc > 26) break;\n\t\t\t\t\tidx = 26*idx + cc;\n\t\t\t\t}\n\t\t\t\t--idx;\n\t\t\t\ttagc = idx;\n\t\t\t} else ++tagc;\n\t\t\tfor(i = 0; i != x.length; ++i) if(x.charCodeAt(i) === 62) break; ++i;\n\t\t\ttag = parsexmltag(x.slice(0,i), true);\n\t\t\tif(!tag.r) tag.r = encode_cell({r:tagr-1, c:tagc});\n\t\t\td = x.slice(i);\n\t\t\tp = ({t:\"\"});\n\n\t\t\tif((cref=d.match(match_v))!= null && cref[1] !== '') p.v=unescapexml(cref[1]);\n\t\t\tif(opts.cellFormula) {\n\t\t\t\tif((cref=d.match(match_f))!= null && cref[1] !== '') {\n\t\t\t\t\t/* TODO: match against XLSXFutureFunctions */\n\t\t\t\t\tp.f=unescapexml(utf8read(cref[1])).replace(/\\r\\n/g, \"\\n\");\n\t\t\t\t\tif(!opts.xlfn) p.f = _xlfn(p.f);\n\t\t\t\t\tif(cref[0].indexOf('t=\"array\"') > -1) {\n\t\t\t\t\t\tp.F = (d.match(refregex)||[])[1];\n\t\t\t\t\t\tif(p.F.indexOf(\":\") > -1) arrayf.push([safe_decode_range(p.F), p.F]);\n\t\t\t\t\t} else if(cref[0].indexOf('t=\"shared\"') > -1) {\n\t\t\t\t\t\t// TODO: parse formula\n\t\t\t\t\t\tftag = parsexmltag(cref[0]);\n\t\t\t\t\t\tvar ___f = unescapexml(utf8read(cref[1]));\n\t\t\t\t\t\tif(!opts.xlfn) ___f = _xlfn(___f);\n\t\t\t\t\t\tsharedf[parseInt(ftag.si, 10)] = [ftag, ___f, tag.r];\n\t\t\t\t\t}\n\t\t\t\t} else if((cref=d.match(/]*\\/>/))) {\n\t\t\t\t\tftag = parsexmltag(cref[0]);\n\t\t\t\t\tif(sharedf[ftag.si]) p.f = shift_formula_xlsx(sharedf[ftag.si][1], sharedf[ftag.si][2]/*[0].ref*/, tag.r);\n\t\t\t\t}\n\t\t\t\t/* TODO: factor out contains logic */\n\t\t\t\tvar _tag = decode_cell(tag.r);\n\t\t\t\tfor(i = 0; i < arrayf.length; ++i)\n\t\t\t\t\tif(_tag.r >= arrayf[i][0].s.r && _tag.r <= arrayf[i][0].e.r)\n\t\t\t\t\t\tif(_tag.c >= arrayf[i][0].s.c && _tag.c <= arrayf[i][0].e.c)\n\t\t\t\t\t\t\tp.F = arrayf[i][1];\n\t\t\t}\n\n\t\t\tif(tag.t == null && p.v === undefined) {\n\t\t\t\tif(p.f || p.F) {\n\t\t\t\t\tp.v = 0; p.t = \"n\";\n\t\t\t\t} else if(!sheetStubs) continue;\n\t\t\t\telse p.t = \"z\";\n\t\t\t}\n\t\t\telse p.t = tag.t || \"n\";\n\t\t\tif(guess.s.c > tagc) guess.s.c = tagc;\n\t\t\tif(guess.e.c < tagc) guess.e.c = tagc;\n\t\t\t/* 18.18.11 t ST_CellType */\n\t\t\tswitch(p.t) {\n\t\t\t\tcase 'n':\n\t\t\t\t\tif(p.v == \"\" || p.v == null) {\n\t\t\t\t\t\tif(!sheetStubs) continue;\n\t\t\t\t\t\tp.t = 'z';\n\t\t\t\t\t} else p.v = parseFloat(p.v);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 's':\n\t\t\t\t\tif(typeof p.v == 'undefined') {\n\t\t\t\t\t\tif(!sheetStubs) continue;\n\t\t\t\t\t\tp.t = 'z';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsstr = strs[parseInt(p.v, 10)];\n\t\t\t\t\t\tp.v = sstr.t;\n\t\t\t\t\t\tp.r = sstr.r;\n\t\t\t\t\t\tif(opts.cellHTML) p.h = sstr.h;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'str':\n\t\t\t\t\tp.t = \"s\";\n\t\t\t\t\tp.v = (p.v!=null) ? utf8read(p.v) : '';\n\t\t\t\t\tif(opts.cellHTML) p.h = escapehtml(p.v);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'inlineStr':\n\t\t\t\t\tcref = d.match(isregex);\n\t\t\t\t\tp.t = 's';\n\t\t\t\t\tif(cref != null && (sstr = parse_si(cref[1]))) {\n\t\t\t\t\t\tp.v = sstr.t;\n\t\t\t\t\t\tif(opts.cellHTML) p.h = sstr.h;\n\t\t\t\t\t} else p.v = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'b': p.v = parsexmlbool(p.v); break;\n\t\t\t\tcase 'd':\n\t\t\t\t\tif(opts.cellDates) p.v = parseDate(p.v, 1);\n\t\t\t\t\telse { p.v = datenum(parseDate(p.v, 1)); p.t = 'n'; }\n\t\t\t\t\tbreak;\n\t\t\t\t/* error string in .w, number in .v */\n\t\t\t\tcase 'e':\n\t\t\t\t\tif(!opts || opts.cellText !== false) p.w = p.v;\n\t\t\t\t\tp.v = RBErr[p.v]; break;\n\t\t\t}\n\t\t\t/* formatting */\n\t\t\tfmtid = fillid = 0;\n\t\t\tcf = null;\n\t\t\tif(do_format && tag.s !== undefined) {\n\t\t\t\tcf = styles.CellXf[tag.s];\n\t\t\t\tif(cf != null) {\n\t\t\t\t\tif(cf.numFmtId != null) fmtid = cf.numFmtId;\n\t\t\t\t\tif(opts.cellStyles) {\n\t\t\t\t\t\tif(cf.fillId != null) fillid = cf.fillId;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsafe_format(p, fmtid, fillid, opts, themes, styles);\n\t\t\tif(opts.cellDates && do_format && p.t == 'n' && SSF.is_date(SSF._table[fmtid])) { p.t = 'd'; p.v = numdate(p.v); }\n\t\t\tif(dense) {\n\t\t\t\tvar _r = decode_cell(tag.r);\n\t\t\t\tif(!s[_r.r]) s[_r.r] = [];\n\t\t\t\ts[_r.r][_r.c] = p;\n\t\t\t} else s[tag.r] = p;\n\t\t}\n\t}\n\tif(rows.length > 0) s['!rows'] = rows;\n}; })();\n\nfunction write_ws_xml_data(ws, opts, idx, wb) {\n\tvar o = [], r = [], range = safe_decode_range(ws['!ref']), cell=\"\", ref, rr = \"\", cols = [], R=0, C=0, rows = ws['!rows'];\n\tvar dense = Array.isArray(ws);\n\tvar params = ({r:rr}), row, height = -1;\n\tfor(C = range.s.c; C <= range.e.c; ++C) cols[C] = encode_col(C);\n\tfor(R = range.s.r; R <= range.e.r; ++R) {\n\t\tr = [];\n\t\trr = encode_row(R);\n\t\tfor(C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tref = cols[C] + rr;\n\t\t\tvar _cell = dense ? (ws[R]||[])[C]: ws[ref];\n\t\t\tif(_cell === undefined) continue;\n\t\t\tif((cell = write_ws_xml_cell(_cell, ref, ws, opts, idx, wb)) != null) r.push(cell);\n\t\t}\n\t\tif(r.length > 0 || (rows && rows[R])) {\n\t\t\tparams = ({r:rr});\n\t\t\tif(rows && rows[R]) {\n\t\t\t\trow = rows[R];\n\t\t\t\tif(row.hidden) params.hidden = 1;\n\t\t\t\theight = -1;\n\t\t\t\tif(row.hpx) height = px2pt(row.hpx);\n\t\t\t\telse if(row.hpt) height = row.hpt;\n\t\t\t\tif(height > -1) { params.ht = height; params.customHeight = 1; }\n\t\t\t\tif(row.level) { params.outlineLevel = row.level; }\n\t\t\t}\n\t\t\to[o.length] = (writextag('row', r.join(\"\"), params));\n\t\t}\n\t}\n\tif(rows) for(; R < rows.length; ++R) {\n\t\tif(rows && rows[R]) {\n\t\t\tparams = ({r:R+1});\n\t\t\trow = rows[R];\n\t\t\tif(row.hidden) params.hidden = 1;\n\t\t\theight = -1;\n\t\t\tif (row.hpx) height = px2pt(row.hpx);\n\t\t\telse if (row.hpt) height = row.hpt;\n\t\t\tif (height > -1) { params.ht = height; params.customHeight = 1; }\n\t\t\tif (row.level) { params.outlineLevel = row.level; }\n\t\t\to[o.length] = (writextag('row', \"\", params));\n\t\t}\n\t}\n\treturn o.join(\"\");\n}\n\nvar WS_XML_ROOT = writextag('worksheet', null, {\n\t'xmlns': XMLNS.main[0],\n\t'xmlns:r': XMLNS.r\n});\n\nfunction write_ws_xml(idx, opts, wb, rels) {\n\tvar o = [XML_HEADER, WS_XML_ROOT];\n\tvar s = wb.SheetNames[idx], sidx = 0, rdata = \"\";\n\tvar ws = wb.Sheets[s];\n\tif(ws == null) ws = {};\n\tvar ref = ws['!ref'] || 'A1';\n\tvar range = safe_decode_range(ref);\n\tif(range.e.c > 0x3FFF || range.e.r > 0xFFFFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + ref + \" exceeds format limit A1:XFD1048576\");\n\t\trange.e.c = Math.min(range.e.c, 0x3FFF);\n\t\trange.e.r = Math.min(range.e.c, 0xFFFFF);\n\t\tref = encode_range(range);\n\t}\n\tif(!rels) rels = {};\n\tws['!comments'] = [];\n\tvar _drawing = [];\n\n\twrite_ws_xml_sheetpr(ws, wb, idx, opts, o);\n\n\to[o.length] = (writextag('dimension', null, {'ref': ref}));\n\n\to[o.length] = write_ws_xml_sheetviews(ws, opts, idx, wb);\n\n\t/* TODO: store in WB, process styles */\n\tif(opts.sheetFormat) o[o.length] = (writextag('sheetFormatPr', null, {\n\t\tdefaultRowHeight:opts.sheetFormat.defaultRowHeight||'16',\n\t\tbaseColWidth:opts.sheetFormat.baseColWidth||'10',\n\t\toutlineLevelRow:opts.sheetFormat.outlineLevelRow||'7'\n\t}));\n\n\tif(ws['!cols'] != null && ws['!cols'].length > 0) o[o.length] = (write_ws_xml_cols(ws, ws['!cols']));\n\n\to[sidx = o.length] = '';\n\tws['!links'] = [];\n\tif(ws['!ref'] != null) {\n\t\trdata = write_ws_xml_data(ws, opts, idx, wb, rels);\n\t\tif(rdata.length > 0) o[o.length] = (rdata);\n\t}\n\tif(o.length>sidx+1) { o[o.length] = (''); o[sidx]=o[sidx].replace(\"/>\",\">\"); }\n\n\t/* sheetCalcPr */\n\n\tif(ws['!protect']) o[o.length] = write_ws_xml_protection(ws['!protect']);\n\n\t/* protectedRanges */\n\t/* scenarios */\n\n\tif(ws['!autofilter'] != null) o[o.length] = write_ws_xml_autofilter(ws['!autofilter'], ws, wb, idx);\n\n\t/* sortState */\n\t/* dataConsolidate */\n\t/* customSheetViews */\n\n\tif(ws['!merges'] != null && ws['!merges'].length > 0) o[o.length] = (write_ws_xml_merges(ws['!merges']));\n\n\t/* phoneticPr */\n\t/* conditionalFormatting */\n\t/* dataValidations */\n\n\tvar relc = -1, rel, rId = -1;\n\tif(ws['!links'].length > 0) {\n\t\to[o.length] = \"\";\nws['!links'].forEach(function(l) {\n\t\t\tif(!l[1].Target) return;\n\t\t\trel = ({\"ref\":l[0]});\n\t\t\tif(l[1].Target.charAt(0) != \"#\") {\n\t\t\t\trId = add_rels(rels, -1, escapexml(l[1].Target).replace(/#.*$/, \"\"), RELS.HLINK);\n\t\t\t\trel[\"r:id\"] = \"rId\"+rId;\n\t\t\t}\n\t\t\tif((relc = l[1].Target.indexOf(\"#\")) > -1) rel.location = escapexml(l[1].Target.slice(relc+1));\n\t\t\tif(l[1].Tooltip) rel.tooltip = escapexml(l[1].Tooltip);\n\t\t\to[o.length] = writextag(\"hyperlink\",null,rel);\n\t\t});\n\t\to[o.length] = \"\";\n\t}\n\tdelete ws['!links'];\n\n\t/* printOptions */\n\n\tif(ws['!margins'] != null) o[o.length] = write_ws_xml_margins(ws['!margins']);\n\n\t/* pageSetup */\n\t/* headerFooter */\n\t/* rowBreaks */\n\t/* colBreaks */\n\t/* customProperties */\n\t/* cellWatches */\n\n\tif(!opts || opts.ignoreEC || (opts.ignoreEC == (void 0))) o[o.length] = writetag(\"ignoredErrors\", writextag(\"ignoredError\", null, {numberStoredAsText:1, sqref:ref}));\n\n\t/* smartTags */\n\n\tif(_drawing.length > 0) {\n\t\trId = add_rels(rels, -1, \"../drawings/drawing\" + (idx+1) + \".xml\", RELS.DRAW);\n\t\to[o.length] = writextag(\"drawing\", null, {\"r:id\":\"rId\" + rId});\n\t\tws['!drawing'] = _drawing;\n\t}\n\n\tif(ws['!comments'].length > 0) {\n\t\trId = add_rels(rels, -1, \"../drawings/vmlDrawing\" + (idx+1) + \".vml\", RELS.VML);\n\t\to[o.length] = writextag(\"legacyDrawing\", null, {\"r:id\":\"rId\" + rId});\n\t\tws['!legacy'] = rId;\n\t}\n\n\t/* legacyDrawingHF */\n\t/* picture */\n\t/* oleObjects */\n\t/* controls */\n\t/* webPublishItems */\n\t/* tableParts */\n\t/* extLst */\n\n\tif(o.length>1) { o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSB] 2.4.726 BrtRowHdr */\nfunction parse_BrtRowHdr(data, length) {\n\tvar z = ({});\n\tvar tgt = data.l + length;\n\tz.r = data.read_shift(4);\n\tdata.l += 4; // TODO: ixfe\n\tvar miyRw = data.read_shift(2);\n\tdata.l += 1; // TODO: top/bot padding\n\tvar flags = data.read_shift(1);\n\tdata.l = tgt;\n\tif(flags & 0x07) z.level = flags & 0x07;\n\tif(flags & 0x10) z.hidden = true;\n\tif(flags & 0x20) z.hpt = miyRw / 20;\n\treturn z;\n}\nfunction write_BrtRowHdr(R, range, ws) {\n\tvar o = new_buf(17+8*16);\n\tvar row = (ws['!rows']||[])[R]||{};\n\to.write_shift(4, R);\n\n\to.write_shift(4, 0); /* TODO: ixfe */\n\n\tvar miyRw = 0x0140;\n\tif(row.hpx) miyRw = px2pt(row.hpx) * 20;\n\telse if(row.hpt) miyRw = row.hpt * 20;\n\to.write_shift(2, miyRw);\n\n\to.write_shift(1, 0); /* top/bot padding */\n\n\tvar flags = 0x0;\n\tif(row.level) flags |= row.level;\n\tif(row.hidden) flags |= 0x10;\n\tif(row.hpx || row.hpt) flags |= 0x20;\n\to.write_shift(1, flags);\n\n\to.write_shift(1, 0); /* phonetic guide */\n\n\t/* [MS-XLSB] 2.5.8 BrtColSpan explains the mechanism */\n\tvar ncolspan = 0, lcs = o.l;\n\to.l += 4;\n\n\tvar caddr = {r:R, c:0};\n\tfor(var i = 0; i < 16; ++i) {\n\t\tif((range.s.c > ((i+1) << 10)) || (range.e.c < (i << 10))) continue;\n\t\tvar first = -1, last = -1;\n\t\tfor(var j = (i<<10); j < ((i+1)<<10); ++j) {\n\t\t\tcaddr.c = j;\n\t\t\tvar cell = Array.isArray(ws) ? (ws[caddr.r]||[])[caddr.c] : ws[encode_cell(caddr)];\n\t\t\tif(cell) { if(first < 0) first = j; last = j; }\n\t\t}\n\t\tif(first < 0) continue;\n\t\t++ncolspan;\n\t\to.write_shift(4, first);\n\t\to.write_shift(4, last);\n\t}\n\n\tvar l = o.l;\n\to.l = lcs;\n\to.write_shift(4, ncolspan);\n\to.l = l;\n\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\nfunction write_row_header(ba, ws, range, R) {\n\tvar o = write_BrtRowHdr(R, range, ws);\n\tif((o.length > 17) || (ws['!rows']||[])[R]) write_record(ba, 'BrtRowHdr', o);\n}\n\n/* [MS-XLSB] 2.4.820 BrtWsDim */\nvar parse_BrtWsDim = parse_UncheckedRfX;\nvar write_BrtWsDim = write_UncheckedRfX;\n\n/* [MS-XLSB] 2.4.821 BrtWsFmtInfo */\nfunction parse_BrtWsFmtInfo() {\n}\n//function write_BrtWsFmtInfo(ws, o) { }\n\n/* [MS-XLSB] 2.4.823 BrtWsProp */\nfunction parse_BrtWsProp(data, length) {\n\tvar z = {};\n\tvar f = data[data.l]; ++data.l;\n\tz.above = !(f & 0x40);\n\tz.left = !(f & 0x80);\n\t/* TODO: pull flags */\n\tdata.l += 18;\n\tz.name = parse_XLSBCodeName(data, length - 19);\n\treturn z;\n}\nfunction write_BrtWsProp(str, outl, o) {\n\tif(o == null) o = new_buf(84+4*str.length);\n\tvar f = 0xC0;\n\tif(outl) {\n\t\tif(outl.above) f &= ~0x40;\n\t\tif(outl.left) f &= ~0x80;\n\t}\n\to.write_shift(1, f);\n\tfor(var i = 1; i < 3; ++i) o.write_shift(1,0);\n\twrite_BrtColor({auto:1}, o);\n\to.write_shift(-4,-1);\n\to.write_shift(-4,-1);\n\twrite_XLSBCodeName(str, o);\n\treturn o.slice(0, o.l);\n}\n\n/* [MS-XLSB] 2.4.306 BrtCellBlank */\nfunction parse_BrtCellBlank(data) {\n\tvar cell = parse_XLSBCell(data);\n\treturn [cell];\n}\nfunction write_BrtCellBlank(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\treturn write_XLSBCell(ncell, o);\n}\nfunction parse_BrtShortBlank(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\treturn [cell];\n}\nfunction write_BrtShortBlank(cell, ncell, o) {\n\tif(o == null) o = new_buf(4);\n\treturn write_XLSBShortCell(ncell, o);\n}\n\n/* [MS-XLSB] 2.4.307 BrtCellBool */\nfunction parse_BrtCellBool(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar fBool = data.read_shift(1);\n\treturn [cell, fBool, 'b'];\n}\nfunction write_BrtCellBool(cell, ncell, o) {\n\tif(o == null) o = new_buf(9);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(1, cell.v ? 1 : 0);\n\treturn o;\n}\nfunction parse_BrtShortBool(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar fBool = data.read_shift(1);\n\treturn [cell, fBool, 'b'];\n}\nfunction write_BrtShortBool(cell, ncell, o) {\n\tif(o == null) o = new_buf(5);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(1, cell.v ? 1 : 0);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.308 BrtCellError */\nfunction parse_BrtCellError(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar bError = data.read_shift(1);\n\treturn [cell, bError, 'e'];\n}\nfunction write_BrtCellError(cell, ncell, o) {\n\tif(o == null) o = new_buf(9);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(1, cell.v);\n\treturn o;\n}\nfunction parse_BrtShortError(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar bError = data.read_shift(1);\n\treturn [cell, bError, 'e'];\n}\nfunction write_BrtShortError(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(1, cell.v);\n\to.write_shift(2, 0);\n\to.write_shift(1, 0);\n\treturn o;\n}\n\n\n/* [MS-XLSB] 2.4.311 BrtCellIsst */\nfunction parse_BrtCellIsst(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar isst = data.read_shift(4);\n\treturn [cell, isst, 's'];\n}\nfunction write_BrtCellIsst(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBCell(ncell, o);\n\to.write_shift(4, ncell.v);\n\treturn o;\n}\nfunction parse_BrtShortIsst(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar isst = data.read_shift(4);\n\treturn [cell, isst, 's'];\n}\nfunction write_BrtShortIsst(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\to.write_shift(4, ncell.v);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.313 BrtCellReal */\nfunction parse_BrtCellReal(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_Xnum(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtCellReal(cell, ncell, o) {\n\tif(o == null) o = new_buf(16);\n\twrite_XLSBCell(ncell, o);\n\twrite_Xnum(cell.v, o);\n\treturn o;\n}\nfunction parse_BrtShortReal(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_Xnum(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtShortReal(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_Xnum(cell.v, o);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.314 BrtCellRk */\nfunction parse_BrtCellRk(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_RkNumber(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtCellRk(cell, ncell, o) {\n\tif(o == null) o = new_buf(12);\n\twrite_XLSBCell(ncell, o);\n\twrite_RkNumber(cell.v, o);\n\treturn o;\n}\nfunction parse_BrtShortRk(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_RkNumber(data);\n\treturn [cell, value, 'n'];\n}\nfunction write_BrtShortRk(cell, ncell, o) {\n\tif(o == null) o = new_buf(8);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_RkNumber(cell.v, o);\n\treturn o;\n}\n\n\n/* [MS-XLSB] 2.4.317 BrtCellSt */\nfunction parse_BrtCellSt(data) {\n\tvar cell = parse_XLSBCell(data);\n\tvar value = parse_XLWideString(data);\n\treturn [cell, value, 'str'];\n}\nfunction write_BrtCellSt(cell, ncell, o) {\n\tif(o == null) o = new_buf(12 + 4 * cell.v.length);\n\twrite_XLSBCell(ncell, o);\n\twrite_XLWideString(cell.v, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\nfunction parse_BrtShortSt(data) {\n\tvar cell = parse_XLSBShortCell(data);\n\tvar value = parse_XLWideString(data);\n\treturn [cell, value, 'str'];\n}\nfunction write_BrtShortSt(cell, ncell, o) {\n\tif(o == null) o = new_buf(8 + 4 * cell.v.length);\n\twrite_XLSBShortCell(ncell, o);\n\twrite_XLWideString(cell.v, o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.653 BrtFmlaBool */\nfunction parse_BrtFmlaBool(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = data.read_shift(1);\n\tvar o = [cell, value, 'b'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.654 BrtFmlaError */\nfunction parse_BrtFmlaError(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = data.read_shift(1);\n\tvar o = [cell, value, 'e'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.655 BrtFmlaNum */\nfunction parse_BrtFmlaNum(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = parse_Xnum(data);\n\tvar o = [cell, value, 'n'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.656 BrtFmlaString */\nfunction parse_BrtFmlaString(data, length, opts) {\n\tvar end = data.l + length;\n\tvar cell = parse_XLSBCell(data);\n\tcell.r = opts['!row'];\n\tvar value = parse_XLWideString(data);\n\tvar o = [cell, value, 'str'];\n\tif(opts.cellFormula) {\n\t\tdata.l += 2;\n\t\tvar formula = parse_XLSBCellParsedFormula(data, end - data.l, opts);\n\t\to[3] = stringify_formula(formula, null/*range*/, cell, opts.supbooks, opts);/* TODO */\n\t}\n\telse data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.682 BrtMergeCell */\nvar parse_BrtMergeCell = parse_UncheckedRfX;\nvar write_BrtMergeCell = write_UncheckedRfX;\n/* [MS-XLSB] 2.4.107 BrtBeginMergeCells */\nfunction write_BrtBeginMergeCells(cnt, o) {\n\tif(o == null) o = new_buf(4);\n\to.write_shift(4, cnt);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.662 BrtHLink */\nfunction parse_BrtHLink(data, length) {\n\tvar end = data.l + length;\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tvar relId = parse_XLNullableWideString(data);\n\tvar loc = parse_XLWideString(data);\n\tvar tooltip = parse_XLWideString(data);\n\tvar display = parse_XLWideString(data);\n\tdata.l = end;\n\tvar o = ({rfx:rfx, relId:relId, loc:loc, display:display});\n\tif(tooltip) o.Tooltip = tooltip;\n\treturn o;\n}\nfunction write_BrtHLink(l, rId) {\n\tvar o = new_buf(50+4*(l[1].Target.length + (l[1].Tooltip || \"\").length));\n\twrite_UncheckedRfX({s:decode_cell(l[0]), e:decode_cell(l[0])}, o);\n\twrite_RelID(\"rId\" + rId, o);\n\tvar locidx = l[1].Target.indexOf(\"#\");\n\tvar loc = locidx == -1 ? \"\" : l[1].Target.slice(locidx+1);\n\twrite_XLWideString(loc || \"\", o);\n\twrite_XLWideString(l[1].Tooltip || \"\", o);\n\twrite_XLWideString(\"\", o);\n\treturn o.slice(0, o.l);\n}\n\n/* [MS-XLSB] 2.4.692 BrtPane */\nfunction parse_BrtPane(/*data, length, opts*/) {\n}\n\n/* [MS-XLSB] 2.4.6 BrtArrFmla */\nfunction parse_BrtArrFmla(data, length, opts) {\n\tvar end = data.l + length;\n\tvar rfx = parse_RfX(data, 16);\n\tvar fAlwaysCalc = data.read_shift(1);\n\tvar o = [rfx]; o[2] = fAlwaysCalc;\n\tif(opts.cellFormula) {\n\t\tvar formula = parse_XLSBArrayParsedFormula(data, end - data.l, opts);\n\t\to[1] = formula;\n\t} else data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.750 BrtShrFmla */\nfunction parse_BrtShrFmla(data, length, opts) {\n\tvar end = data.l + length;\n\tvar rfx = parse_UncheckedRfX(data, 16);\n\tvar o = [rfx];\n\tif(opts.cellFormula) {\n\t\tvar formula = parse_XLSBSharedParsedFormula(data, end - data.l, opts);\n\t\to[1] = formula;\n\t\tdata.l = end;\n\t} else data.l = end;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.323 BrtColInfo */\n/* TODO: once XLS ColInfo is set, combine the functions */\nfunction write_BrtColInfo(C, col, o) {\n\tif(o == null) o = new_buf(18);\n\tvar p = col_obj_w(C, col);\n\to.write_shift(-4, C);\n\to.write_shift(-4, C);\n\to.write_shift(4, (p.width || 10) * 256);\n\to.write_shift(4, 0/*ixfe*/); // style\n\tvar flags = 0;\n\tif(col.hidden) flags |= 0x01;\n\tif(typeof p.width == 'number') flags |= 0x02;\n\tif(col.level) flags |= (col.level << 8);\n\to.write_shift(2, flags); // bit flag\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.678 BrtMargins */\nvar BrtMarginKeys = [\"left\",\"right\",\"top\",\"bottom\",\"header\",\"footer\"];\nfunction parse_BrtMargins(data) {\n\tvar margins = ({});\n\tBrtMarginKeys.forEach(function(k) { margins[k] = parse_Xnum(data, 8); });\n\treturn margins;\n}\nfunction write_BrtMargins(margins, o) {\n\tif(o == null) o = new_buf(6*8);\n\tdefault_margins(margins);\n\tBrtMarginKeys.forEach(function(k) { write_Xnum((margins)[k], o); });\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.299 BrtBeginWsView */\nfunction parse_BrtBeginWsView(data) {\n\tvar f = data.read_shift(2);\n\tdata.l += 28;\n\treturn { RTL: f & 0x20 };\n}\nfunction write_BrtBeginWsView(ws, Workbook, o) {\n\tif(o == null) o = new_buf(30);\n\tvar f = 0x39c;\n\tif((((Workbook||{}).Views||[])[0]||{}).RTL) f |= 0x20;\n\to.write_shift(2, f); // bit flag\n\to.write_shift(4, 0);\n\to.write_shift(4, 0); // view first row\n\to.write_shift(4, 0); // view first col\n\to.write_shift(1, 0); // gridline color ICV\n\to.write_shift(1, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 100); // zoom scale\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(2, 0);\n\to.write_shift(4, 0); // workbook view id\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.309 BrtCellIgnoreEC */\nfunction write_BrtCellIgnoreEC(ref) {\n\tvar o = new_buf(24);\n\to.write_shift(4, 4);\n\to.write_shift(4, 1);\n\twrite_UncheckedRfX(ref, o);\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.748 BrtSheetProtection */\nfunction write_BrtSheetProtection(sp, o) {\n\tif(o == null) o = new_buf(16*4+2);\n\to.write_shift(2, sp.password ? crypto_CreatePasswordVerifier_Method1(sp.password) : 0);\n\to.write_shift(4, 1); // this record should not be written if no protection\n\t[\n\t\t[\"objects\", false], // fObjects\n\t\t[\"scenarios\", false], // fScenarios\n\t\t[\"formatCells\", true], // fFormatCells\n\t\t[\"formatColumns\", true], // fFormatColumns\n\t\t[\"formatRows\", true], // fFormatRows\n\t\t[\"insertColumns\", true], // fInsertColumns\n\t\t[\"insertRows\", true], // fInsertRows\n\t\t[\"insertHyperlinks\", true], // fInsertHyperlinks\n\t\t[\"deleteColumns\", true], // fDeleteColumns\n\t\t[\"deleteRows\", true], // fDeleteRows\n\t\t[\"selectLockedCells\", false], // fSelLockedCells\n\t\t[\"sort\", true], // fSort\n\t\t[\"autoFilter\", true], // fAutoFilter\n\t\t[\"pivotTables\", true], // fPivotTables\n\t\t[\"selectUnlockedCells\", false] // fSelUnlockedCells\n\t].forEach(function(n) {\nif(n[1]) o.write_shift(4, sp[n[0]] != null && !sp[n[0]] ? 1 : 0);\n\t\telse o.write_shift(4, sp[n[0]] != null && sp[n[0]] ? 0 : 1);\n\t});\n\treturn o;\n}\n\nfunction parse_BrtDVal(/*data, length, opts*/) {\n}\nfunction parse_BrtDVal14(/*data, length, opts*/) {\n}\n/* [MS-XLSB] 2.1.7.61 Worksheet */\nfunction parse_ws_bin(data, _opts, idx, rels, wb, themes, styles) {\n\tif(!data) return data;\n\tvar opts = _opts || {};\n\tif(!rels) rels = {'!id':{}};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar s = (opts.dense ? [] : {});\n\n\tvar ref;\n\tvar refguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\n\tvar state = [];\n\tvar pass = false, end = false;\n\tvar row, p, cf, R, C, addr, sstr, rr, cell;\n\tvar merges = [];\n\topts.biff = 12;\n\topts['!row'] = 0;\n\n\tvar ai = 0, af = false;\n\n\tvar arrayf = [];\n\tvar sharedf = {};\n\tvar supbooks = opts.supbooks || wb.supbooks || ([[]]);\n\tsupbooks.sharedf = sharedf;\n\tsupbooks.arrayf = arrayf;\n\tsupbooks.SheetNames = wb.SheetNames || wb.Sheets.map(function(x) { return x.name; });\n\tif(!opts.supbooks) {\n\t\topts.supbooks = supbooks;\n\t\tif(wb.Names) for(var i = 0; i < wb.Names.length; ++i) supbooks[0][i+1] = wb.Names[i];\n\t}\n\n\tvar colinfo = [], rowinfo = [];\n\tvar seencol = false;\n\n\tXLSBRecordEnum[0x0010] = { n:\"BrtShortReal\", f:parse_BrtShortReal };\n\n\trecordhopper(data, function ws_parse(val, R_n, RT) {\n\t\tif(end) return;\n\t\tswitch(RT) {\n\t\t\tcase 0x0094: /* 'BrtWsDim' */\n\t\t\t\tref = val; break;\n\t\t\tcase 0x0000: /* 'BrtRowHdr' */\n\t\t\t\trow = val;\n\t\t\t\tif(opts.sheetRows && opts.sheetRows <= row.r) end=true;\n\t\t\t\trr = encode_row(R = row.r);\n\t\t\t\topts['!row'] = row.r;\n\t\t\t\tif(val.hidden || val.hpt || val.level != null) {\n\t\t\t\t\tif(val.hpt) val.hpx = pt2px(val.hpt);\n\t\t\t\t\trowinfo[val.r] = val;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0002: /* 'BrtCellRk' */\n\t\t\tcase 0x0003: /* 'BrtCellError' */\n\t\t\tcase 0x0004: /* 'BrtCellBool' */\n\t\t\tcase 0x0005: /* 'BrtCellReal' */\n\t\t\tcase 0x0006: /* 'BrtCellSt' */\n\t\t\tcase 0x0007: /* 'BrtCellIsst' */\n\t\t\tcase 0x0008: /* 'BrtFmlaString' */\n\t\t\tcase 0x0009: /* 'BrtFmlaNum' */\n\t\t\tcase 0x000A: /* 'BrtFmlaBool' */\n\t\t\tcase 0x000B: /* 'BrtFmlaError' */\n\t\t\tcase 0x000D: /* 'BrtShortRk' */\n\t\t\tcase 0x000E: /* 'BrtShortError' */\n\t\t\tcase 0x000F: /* 'BrtShortBool' */\n\t\t\tcase 0x0010: /* 'BrtShortReal' */\n\t\t\tcase 0x0011: /* 'BrtShortSt' */\n\t\t\tcase 0x0012: /* 'BrtShortIsst' */\n\t\t\t\tp = ({t:val[2]});\n\t\t\t\tswitch(val[2]) {\n\t\t\t\t\tcase 'n': p.v = val[1]; break;\n\t\t\t\t\tcase 's': sstr = strs[val[1]]; p.v = sstr.t; p.r = sstr.r; break;\n\t\t\t\t\tcase 'b': p.v = val[1] ? true : false; break;\n\t\t\t\t\tcase 'e': p.v = val[1]; if(opts.cellText !== false) p.w = BErr[p.v]; break;\n\t\t\t\t\tcase 'str': p.t = 's'; p.v = val[1]; break;\n\t\t\t\t}\n\t\t\t\tif((cf = styles.CellXf[val[0].iStyleRef])) safe_format(p,cf.numFmtId,null,opts, themes, styles);\n\t\t\t\tC = val[0].c == -1 ? C + 1 : val[0].c;\n\t\t\t\tif(opts.dense) { if(!s[R]) s[R] = []; s[R][C] = p; }\n\t\t\t\telse s[encode_col(C) + rr] = p;\n\t\t\t\tif(opts.cellFormula) {\n\t\t\t\t\taf = false;\n\t\t\t\t\tfor(ai = 0; ai < arrayf.length; ++ai) {\n\t\t\t\t\t\tvar aii = arrayf[ai];\n\t\t\t\t\t\tif(row.r >= aii[0].s.r && row.r <= aii[0].e.r)\n\t\t\t\t\t\t\tif(C >= aii[0].s.c && C <= aii[0].e.c) {\n\t\t\t\t\t\t\t\tp.F = encode_range(aii[0]); af = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!af && val.length > 3) p.f = val[3];\n\t\t\t\t}\n\t\t\t\tif(refguess.s.r > row.r) refguess.s.r = row.r;\n\t\t\t\tif(refguess.s.c > C) refguess.s.c = C;\n\t\t\t\tif(refguess.e.r < row.r) refguess.e.r = row.r;\n\t\t\t\tif(refguess.e.c < C) refguess.e.c = C;\n\t\t\t\tif(opts.cellDates && cf && p.t == 'n' && SSF.is_date(SSF._table[cf.numFmtId])) {\n\t\t\t\t\tvar _d = SSF.parse_date_code(p.v); if(_d) { p.t = 'd'; p.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0001: /* 'BrtCellBlank' */\n\t\t\tcase 0x000C: /* 'BrtShortBlank' */\n\t\t\t\tif(!opts.sheetStubs || pass) break;\n\t\t\t\tp = ({t:'z',v:undefined});\n\t\t\t\tC = val[0].c == -1 ? C + 1 : val[0].c;\n\t\t\t\tif(opts.dense) { if(!s[R]) s[R] = []; s[R][C] = p; }\n\t\t\t\telse s[encode_col(C) + rr] = p;\n\t\t\t\tif(refguess.s.r > row.r) refguess.s.r = row.r;\n\t\t\t\tif(refguess.s.c > C) refguess.s.c = C;\n\t\t\t\tif(refguess.e.r < row.r) refguess.e.r = row.r;\n\t\t\t\tif(refguess.e.c < C) refguess.e.c = C;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x00B0: /* 'BrtMergeCell' */\n\t\t\t\tmerges.push(val); break;\n\n\t\t\tcase 0x01EE: /* 'BrtHLink' */\n\t\t\t\tvar rel = rels['!id'][val.relId];\n\t\t\t\tif(rel) {\n\t\t\t\t\tval.Target = rel.Target;\n\t\t\t\t\tif(val.loc) val.Target += \"#\"+val.loc;\n\t\t\t\t\tval.Rel = rel;\n\t\t\t\t} else if(val.relId == '') {\n\t\t\t\t\tval.Target = \"#\" + val.loc;\n\t\t\t\t}\n\t\t\t\tfor(R=val.rfx.s.r;R<=val.rfx.e.r;++R) for(C=val.rfx.s.c;C<=val.rfx.e.c;++C) {\n\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\tif(!s[R]) s[R] = [];\n\t\t\t\t\t\tif(!s[R][C]) s[R][C] = {t:'z',v:undefined};\n\t\t\t\t\t\ts[R][C].l = val;\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddr = encode_cell({c:C,r:R});\n\t\t\t\t\t\tif(!s[addr]) s[addr] = {t:'z',v:undefined};\n\t\t\t\t\t\ts[addr].l = val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01AA: /* 'BrtArrFmla' */\n\t\t\t\tif(!opts.cellFormula) break;\n\t\t\t\tarrayf.push(val);\n\t\t\t\tcell = ((opts.dense ? s[R][C] : s[encode_col(C) + rr]));\n\t\t\t\tcell.f = stringify_formula(val[1], refguess, {r:row.r, c:C}, supbooks, opts);\n\t\t\t\tcell.F = encode_range(val[0]);\n\t\t\t\tbreak;\n\t\t\tcase 0x01AB: /* 'BrtShrFmla' */\n\t\t\t\tif(!opts.cellFormula) break;\n\t\t\t\tsharedf[encode_cell(val[0].s)] = val[1];\n\t\t\t\tcell = (opts.dense ? s[R][C] : s[encode_col(C) + rr]);\n\t\t\t\tcell.f = stringify_formula(val[1], refguess, {r:row.r, c:C}, supbooks, opts);\n\t\t\t\tbreak;\n\n\t\t\t/* identical to 'ColInfo' in XLS */\n\t\t\tcase 0x003C: /* 'BrtColInfo' */\n\t\t\t\tif(!opts.cellStyles) break;\n\t\t\t\twhile(val.e >= val.s) {\n\t\t\t\t\tcolinfo[val.e--] = { width: val.w/256, hidden: !!(val.flags & 0x01), level: val.level };\n\t\t\t\t\tif(!seencol) { seencol = true; find_mdw_colw(val.w/256); }\n\t\t\t\t\tprocess_col(colinfo[val.e+1]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 0x00A1: /* 'BrtBeginAFilter' */\n\t\t\t\ts['!autofilter'] = { ref:encode_range(val) };\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01DC: /* 'BrtMargins' */\n\t\t\t\ts['!margins'] = val;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0093: /* 'BrtWsProp' */\n\t\t\t\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\t\t\t\tif(val.name) wb.Sheets[idx].CodeName = val.name;\n\t\t\t\tif(val.above || val.left) s['!outline'] = { above: val.above, left: val.left };\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0089: /* 'BrtBeginWsView' */\n\t\t\t\tif(!wb.Views) wb.Views = [{}];\n\t\t\t\tif(!wb.Views[0]) wb.Views[0] = {};\n\t\t\t\tif(val.RTL) wb.Views[0].RTL = true;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x01E5: /* 'BrtWsFmtInfo' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0040: /* 'BrtDVal' */\n\t\t\tcase 0x041D: /* 'BrtDVal14' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0097: /* 'BrtPane' */\n\t\t\t\tbreak;\n\t\t\tcase 0x0098: /* 'BrtSel' */\n\t\t\tcase 0x00AF: /* 'BrtAFilterDateGroupItem' */\n\t\t\tcase 0x0284: /* 'BrtActiveX' */\n\t\t\tcase 0x0271: /* 'BrtBigName' */\n\t\t\tcase 0x0232: /* 'BrtBkHim' */\n\t\t\tcase 0x018C: /* 'BrtBrk' */\n\t\t\tcase 0x0458: /* 'BrtCFIcon' */\n\t\t\tcase 0x047A: /* 'BrtCFRuleExt' */\n\t\t\tcase 0x01D7: /* 'BrtCFVO' */\n\t\t\tcase 0x041A: /* 'BrtCFVO14' */\n\t\t\tcase 0x0289: /* 'BrtCellIgnoreEC' */\n\t\t\tcase 0x0451: /* 'BrtCellIgnoreEC14' */\n\t\t\tcase 0x0031: /* 'BrtCellMeta' */\n\t\t\tcase 0x024D: /* 'BrtCellSmartTagProperty' */\n\t\t\tcase 0x025F: /* 'BrtCellWatch' */\n\t\t\tcase 0x0234: /* 'BrtColor' */\n\t\t\tcase 0x041F: /* 'BrtColor14' */\n\t\t\tcase 0x00A8: /* 'BrtColorFilter' */\n\t\t\tcase 0x00AE: /* 'BrtCustomFilter' */\n\t\t\tcase 0x049C: /* 'BrtCustomFilter14' */\n\t\t\tcase 0x01F3: /* 'BrtDRef' */\n\t\t\tcase 0x01FB: /* 'BrtDXF' */\n\t\t\tcase 0x0226: /* 'BrtDrawing' */\n\t\t\tcase 0x00AB: /* 'BrtDynamicFilter' */\n\t\t\tcase 0x00A7: /* 'BrtFilter' */\n\t\t\tcase 0x0499: /* 'BrtFilter14' */\n\t\t\tcase 0x00A9: /* 'BrtIconFilter' */\n\t\t\tcase 0x049D: /* 'BrtIconFilter14' */\n\t\t\tcase 0x0227: /* 'BrtLegacyDrawing' */\n\t\t\tcase 0x0228: /* 'BrtLegacyDrawingHF' */\n\t\t\tcase 0x0295: /* 'BrtListPart' */\n\t\t\tcase 0x027F: /* 'BrtOleObject' */\n\t\t\tcase 0x01DE: /* 'BrtPageSetup' */\n\t\t\tcase 0x0219: /* 'BrtPhoneticInfo' */\n\t\t\tcase 0x01DD: /* 'BrtPrintOptions' */\n\t\t\tcase 0x0218: /* 'BrtRangeProtection' */\n\t\t\tcase 0x044F: /* 'BrtRangeProtection14' */\n\t\t\tcase 0x02A8: /* 'BrtRangeProtectionIso' */\n\t\t\tcase 0x0450: /* 'BrtRangeProtectionIso14' */\n\t\t\tcase 0x0400: /* 'BrtRwDescent' */\n\t\t\tcase 0x0297: /* 'BrtSheetCalcProp' */\n\t\t\tcase 0x0217: /* 'BrtSheetProtection' */\n\t\t\tcase 0x02A6: /* 'BrtSheetProtectionIso' */\n\t\t\tcase 0x01F8: /* 'BrtSlc' */\n\t\t\tcase 0x0413: /* 'BrtSparkline' */\n\t\t\tcase 0x01AC: /* 'BrtTable' */\n\t\t\tcase 0x00AA: /* 'BrtTop10Filter' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\tcase 0x0032: /* 'BrtValueMeta' */\n\t\t\tcase 0x0816: /* 'BrtWebExtension' */\n\t\t\tcase 0x0415: /* 'BrtWsFmtInfoEx14' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(R_n); pass = true; break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tdefault:\n\t\t\t\tif((R_n||\"\").indexOf(\"Begin\") > 0){/* empty */}\n\t\t\t\telse if((R_n||\"\").indexOf(\"End\") > 0){/* empty */}\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record \" + RT + \" \" + R_n);\n\t\t}\n\t}, opts);\n\n\tdelete opts.supbooks;\n\tdelete opts['!row'];\n\n\tif(!s[\"!ref\"] && (refguess.s.r < 2000000 || ref && (ref.e.r > 0 || ref.e.c > 0 || ref.s.r > 0 || ref.s.c > 0))) s[\"!ref\"] = encode_range(ref || refguess);\n\tif(opts.sheetRows && s[\"!ref\"]) {\n\t\tvar tmpref = safe_decode_range(s[\"!ref\"]);\n\t\tif(opts.sheetRows <= +tmpref.e.r) {\n\t\t\ttmpref.e.r = opts.sheetRows - 1;\n\t\t\tif(tmpref.e.r > refguess.e.r) tmpref.e.r = refguess.e.r;\n\t\t\tif(tmpref.e.r < tmpref.s.r) tmpref.s.r = tmpref.e.r;\n\t\t\tif(tmpref.e.c > refguess.e.c) tmpref.e.c = refguess.e.c;\n\t\t\tif(tmpref.e.c < tmpref.s.c) tmpref.s.c = tmpref.e.c;\n\t\t\ts[\"!fullref\"] = s[\"!ref\"];\n\t\t\ts[\"!ref\"] = encode_range(tmpref);\n\t\t}\n\t}\n\tif(merges.length > 0) s[\"!merges\"] = merges;\n\tif(colinfo.length > 0) s[\"!cols\"] = colinfo;\n\tif(rowinfo.length > 0) s[\"!rows\"] = rowinfo;\n\treturn s;\n}\n\n/* TODO: something useful -- this is a stub */\nfunction write_ws_bin_cell(ba, cell, R, C, opts, ws, last_seen) {\n\tif(cell.v === undefined) return false;\n\tvar vv = \"\";\n\tswitch(cell.t) {\n\t\tcase 'b': vv = cell.v ? \"1\" : \"0\"; break;\n\t\tcase 'd': // no BrtCellDate :(\n\t\t\tcell = dup(cell);\n\t\t\tcell.z = cell.z || SSF._table[14];\n\t\t\tcell.v = datenum(parseDate(cell.v)); cell.t = 'n';\n\t\t\tbreak;\n\t\t/* falls through */\n\t\tcase 'n': case 'e': vv = ''+cell.v; break;\n\t\tdefault: vv = cell.v; break;\n\t}\n\tvar o = ({r:R, c:C});\n\t/* TODO: cell style */\n\to.s = get_cell_style(opts.cellXfs, cell, opts);\n\tif(cell.l) ws['!links'].push([encode_cell(o), cell.l]);\n\tif(cell.c) ws['!comments'].push([encode_cell(o), cell.c]);\n\tswitch(cell.t) {\n\t\tcase 's': case 'str':\n\t\t\tif(opts.bookSST) {\n\t\t\t\tvv = get_sst_id(opts.Strings, (cell.v), opts.revStrings);\n\t\t\t\to.t = \"s\"; o.v = vv;\n\t\t\t\tif(last_seen) write_record(ba, \"BrtShortIsst\", write_BrtShortIsst(cell, o));\n\t\t\t\telse write_record(ba, \"BrtCellIsst\", write_BrtCellIsst(cell, o));\n\t\t\t} else {\n\t\t\t\to.t = \"str\";\n\t\t\t\tif(last_seen) write_record(ba, \"BrtShortSt\", write_BrtShortSt(cell, o));\n\t\t\t\telse write_record(ba, \"BrtCellSt\", write_BrtCellSt(cell, o));\n\t\t\t}\n\t\t\treturn true;\n\t\tcase 'n':\n\t\t\t/* TODO: determine threshold for Real vs RK */\n\t\t\tif(cell.v == (cell.v | 0) && cell.v > -1000 && cell.v < 1000) {\n\t\t\t\tif(last_seen) write_record(ba, \"BrtShortRk\", write_BrtShortRk(cell, o));\n\t\t\t\telse write_record(ba, \"BrtCellRk\", write_BrtCellRk(cell, o));\n\t\t\t} else {\n\t\t\t\tif(last_seen) write_record(ba, \"BrtShortReal\", write_BrtShortReal(cell, o));\n\t\t\t\telse write_record(ba, \"BrtCellReal\", write_BrtCellReal(cell, o));\n\t\t\t} return true;\n\t\tcase 'b':\n\t\t\to.t = \"b\";\n\t\t\tif(last_seen) write_record(ba, \"BrtShortBool\", write_BrtShortBool(cell, o));\n\t\t\telse write_record(ba, \"BrtCellBool\", write_BrtCellBool(cell, o));\n\t\t\treturn true;\n\t\tcase 'e':\n\t\t\to.t = \"e\";\n\t\t\tif(last_seen) write_record(ba, \"BrtShortError\", write_BrtShortError(cell, o));\n\t\t\telse write_record(ba, \"BrtCellError\", write_BrtCellError(cell, o));\n\t\t\treturn true;\n\t}\n\tif(last_seen) write_record(ba, \"BrtShortBlank\", write_BrtShortBlank(cell, o));\n\telse write_record(ba, \"BrtCellBlank\", write_BrtCellBlank(cell, o));\n\treturn true;\n}\n\nfunction write_CELLTABLE(ba, ws, idx, opts) {\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\"), ref, rr = \"\", cols = [];\n\twrite_record(ba, 'BrtBeginSheetData');\n\tvar dense = Array.isArray(ws);\n\tvar cap = range.e.r;\n\tif(ws['!rows']) cap = Math.max(range.e.r, ws['!rows'].length - 1);\n\tfor(var R = range.s.r; R <= cap; ++R) {\n\t\trr = encode_row(R);\n\t\t/* [ACCELLTABLE] */\n\t\t/* BrtRowHdr */\n\t\twrite_row_header(ba, ws, range, R);\n\t\tvar last_seen = false;\n\t\tif(R <= range.e.r) for(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\t/* *16384CELL */\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) { last_seen = false; continue; }\n\t\t\t/* write cell */\n\t\t\tlast_seen = write_ws_bin_cell(ba, cell, R, C, opts, ws, last_seen);\n\t\t}\n\t}\n\twrite_record(ba, 'BrtEndSheetData');\n}\n\nfunction write_MERGECELLS(ba, ws) {\n\tif(!ws || !ws['!merges']) return;\n\twrite_record(ba, 'BrtBeginMergeCells', write_BrtBeginMergeCells(ws['!merges'].length));\n\tws['!merges'].forEach(function(m) { write_record(ba, 'BrtMergeCell', write_BrtMergeCell(m)); });\n\twrite_record(ba, 'BrtEndMergeCells');\n}\n\nfunction write_COLINFOS(ba, ws) {\n\tif(!ws || !ws['!cols']) return;\n\twrite_record(ba, 'BrtBeginColInfos');\n\tws['!cols'].forEach(function(m, i) { if(m) write_record(ba, 'BrtColInfo', write_BrtColInfo(i, m)); });\n\twrite_record(ba, 'BrtEndColInfos');\n}\n\nfunction write_IGNOREECS(ba, ws) {\n\tif(!ws || !ws['!ref']) return;\n\twrite_record(ba, 'BrtBeginCellIgnoreECs');\n\twrite_record(ba, 'BrtCellIgnoreEC', write_BrtCellIgnoreEC(safe_decode_range(ws['!ref'])));\n\twrite_record(ba, 'BrtEndCellIgnoreECs');\n}\n\nfunction write_HLINKS(ba, ws, rels) {\n\t/* *BrtHLink */\n\tws['!links'].forEach(function(l) {\n\t\tif(!l[1].Target) return;\n\t\tvar rId = add_rels(rels, -1, l[1].Target.replace(/#.*$/, \"\"), RELS.HLINK);\n\t\twrite_record(ba, \"BrtHLink\", write_BrtHLink(l, rId));\n\t});\n\tdelete ws['!links'];\n}\nfunction write_LEGACYDRAWING(ba, ws, idx, rels) {\n\t/* [BrtLegacyDrawing] */\n\tif(ws['!comments'].length > 0) {\n\t\tvar rId = add_rels(rels, -1, \"../drawings/vmlDrawing\" + (idx+1) + \".vml\", RELS.VML);\n\t\twrite_record(ba, \"BrtLegacyDrawing\", write_RelID(\"rId\" + rId));\n\t\tws['!legacy'] = rId;\n\t}\n}\n\nfunction write_AUTOFILTER(ba, ws, wb, idx) {\n\tif(!ws['!autofilter']) return;\n\tvar data = ws['!autofilter'];\n\tvar ref = typeof data.ref === \"string\" ? data.ref : encode_range(data.ref);\n\n\t/* Update FilterDatabase defined name for the worksheet */\n\tif(!wb.Workbook) wb.Workbook = ({Sheets:[]});\n\tif(!wb.Workbook.Names) wb.Workbook.Names = [];\n\tvar names = wb.Workbook.Names;\n\tvar range = decode_range(ref);\n\tif(range.s.r == range.e.r) { range.e.r = decode_range(ws[\"!ref\"]).e.r; ref = encode_range(range); }\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar name = names[i];\n\t\tif(name.Name != '_xlnm._FilterDatabase') continue;\n\t\tif(name.Sheet != idx) continue;\n\t\tname.Ref = \"'\" + wb.SheetNames[idx] + \"'!\" + ref; break;\n\t}\n\tif(i == names.length) names.push({ Name: '_xlnm._FilterDatabase', Sheet: idx, Ref: \"'\" + wb.SheetNames[idx] + \"'!\" + ref });\n\n\twrite_record(ba, \"BrtBeginAFilter\", write_UncheckedRfX(safe_decode_range(ref)));\n\t/* *FILTERCOLUMN */\n\t/* [SORTSTATE] */\n\t/* BrtEndAFilter */\n\twrite_record(ba, \"BrtEndAFilter\");\n}\n\nfunction write_WSVIEWS2(ba, ws, Workbook) {\n\twrite_record(ba, \"BrtBeginWsViews\");\n\t{ /* 1*WSVIEW2 */\n\t\t/* [ACUID] */\n\t\twrite_record(ba, \"BrtBeginWsView\", write_BrtBeginWsView(ws, Workbook));\n\t\t/* [BrtPane] */\n\t\t/* *4BrtSel */\n\t\t/* *4SXSELECT */\n\t\t/* *FRT */\n\t\twrite_record(ba, \"BrtEndWsView\");\n\t}\n\t/* *FRT */\n\twrite_record(ba, \"BrtEndWsViews\");\n}\n\nfunction write_WSFMTINFO() {\n\t/* [ACWSFMTINFO] */\n\t//write_record(ba, \"BrtWsFmtInfo\", write_BrtWsFmtInfo(ws));\n}\n\nfunction write_SHEETPROTECT(ba, ws) {\n\tif(!ws['!protect']) return;\n\t/* [BrtSheetProtectionIso] */\n\twrite_record(ba, \"BrtSheetProtection\", write_BrtSheetProtection(ws['!protect']));\n}\n\nfunction write_ws_bin(idx, opts, wb, rels) {\n\tvar ba = buf_array();\n\tvar s = wb.SheetNames[idx], ws = wb.Sheets[s] || {};\n\tvar c = s; try { if(wb && wb.Workbook) c = wb.Workbook.Sheets[idx].CodeName || c; } catch(e) {}\n\tvar r = safe_decode_range(ws['!ref'] || \"A1\");\n\tif(r.e.c > 0x3FFF || r.e.r > 0xFFFFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:XFD1048576\");\n\t\tr.e.c = Math.min(r.e.c, 0x3FFF);\n\t\tr.e.r = Math.min(r.e.c, 0xFFFFF);\n\t}\n\tws['!links'] = [];\n\t/* passed back to write_zip and removed there */\n\tws['!comments'] = [];\n\twrite_record(ba, \"BrtBeginSheet\");\n\tif(wb.vbaraw || ws['!outline']) write_record(ba, \"BrtWsProp\", write_BrtWsProp(c, ws['!outline']));\n\twrite_record(ba, \"BrtWsDim\", write_BrtWsDim(r));\n\twrite_WSVIEWS2(ba, ws, wb.Workbook);\n\twrite_WSFMTINFO(ba, ws);\n\twrite_COLINFOS(ba, ws, idx, opts, wb);\n\twrite_CELLTABLE(ba, ws, idx, opts, wb);\n\t/* [BrtSheetCalcProp] */\n\twrite_SHEETPROTECT(ba, ws);\n\t/* *([BrtRangeProtectionIso] BrtRangeProtection) */\n\t/* [SCENMAN] */\n\twrite_AUTOFILTER(ba, ws, wb, idx);\n\t/* [SORTSTATE] */\n\t/* [DCON] */\n\t/* [USERSHVIEWS] */\n\twrite_MERGECELLS(ba, ws);\n\t/* [BrtPhoneticInfo] */\n\t/* *CONDITIONALFORMATTING */\n\t/* [DVALS] */\n\twrite_HLINKS(ba, ws, rels);\n\t/* [BrtPrintOptions] */\n\tif(ws['!margins']) write_record(ba, \"BrtMargins\", write_BrtMargins(ws['!margins']));\n\t/* [BrtPageSetup] */\n\t/* [HEADERFOOTER] */\n\t/* [RWBRK] */\n\t/* [COLBRK] */\n\t/* *BrtBigName */\n\t/* [CELLWATCHES] */\n\tif(!opts || opts.ignoreEC || (opts.ignoreEC == (void 0))) write_IGNOREECS(ba, ws);\n\t/* [SMARTTAGS] */\n\t/* [BrtDrawing] */\n\twrite_LEGACYDRAWING(ba, ws, idx, rels);\n\t/* [BrtLegacyDrawingHF] */\n\t/* [BrtBkHim] */\n\t/* [OLEOBJECTS] */\n\t/* [ACTIVEXCONTROLS] */\n\t/* [WEBPUBITEMS] */\n\t/* [LISTPARTS] */\n\t/* FRTWORKSHEET */\n\twrite_record(ba, \"BrtEndSheet\");\n\treturn ba.end();\n}\nRELS.CHART = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart\";\nRELS.CHARTEX = \"http://schemas.microsoft.com/office/2014/relationships/chartEx\";\n\nfunction parse_Cache(data) {\n\tvar col = [];\n\tvar num = data.match(/^/);\n\tvar f;\n\n\t/* 21.2.2.150 pt CT_NumVal */\n\t(data.match(/(.*?)<\\/c:pt>/mg)||[]).forEach(function(pt) {\n\t\tvar q = pt.match(/(.*)<\\/c:v><\\/c:pt>/);\n\t\tif(!q) return;\n\t\tcol[+q[1]] = num ? +q[2] : q[2];\n\t});\n\n\t/* 21.2.2.71 formatCode CT_Xstring */\n\tvar nf = unescapexml((data.match(/([\\s\\S]*?)<\\/c:formatCode>/) || [\"\",\"General\"])[1]);\n\n\t(data.match(/(.*?)<\\/c:f>/mg)||[]).forEach(function(F) { f = F.replace(/<.*?>/g,\"\"); });\n\n\treturn [col, nf, f];\n}\n\n/* 21.2 DrawingML - Charts */\nfunction parse_chart(data, name, opts, rels, wb, csheet) {\n\tvar cs = ((csheet || {\"!type\":\"chart\"}));\n\tif(!data) return csheet;\n\t/* 21.2.2.27 chart CT_Chart */\n\n\tvar C = 0, R = 0, col = \"A\";\n\tvar refguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\n\t/* 21.2.2.120 numCache CT_NumData */\n\t(data.match(/[\\s\\S]*?<\\/c:numCache>/gm)||[]).forEach(function(nc) {\n\t\tvar cache = parse_Cache(nc);\n\t\trefguess.s.r = refguess.s.c = 0;\n\t\trefguess.e.c = C;\n\t\tcol = encode_col(C);\n\t\tcache[0].forEach(function(n,i) {\n\t\t\tcs[col + encode_row(i)] = {t:'n', v:n, z:cache[1] };\n\t\t\tR = i;\n\t\t});\n\t\tif(refguess.e.r < R) refguess.e.r = R;\n\t\t++C;\n\t});\n\tif(C > 0) cs[\"!ref\"] = encode_range(refguess);\n\treturn cs;\n}\nRELS.CS = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet\";\n\nvar CS_XML_ROOT = writextag('chartsheet', null, {\n\t'xmlns': XMLNS.main[0],\n\t'xmlns:r': XMLNS.r\n});\n\n/* 18.3 Worksheets also covers Chartsheets */\nfunction parse_cs_xml(data, opts, idx, rels, wb) {\n\tif(!data) return data;\n\t/* 18.3.1.12 chartsheet CT_ChartSheet */\n\tif(!rels) rels = {'!id':{}};\n\tvar s = ({'!type':\"chart\", '!drawel':null, '!rel':\"\"});\n\tvar m;\n\n\t/* 18.3.1.83 sheetPr CT_ChartsheetPr */\n\tvar sheetPr = data.match(sheetprregex);\n\tif(sheetPr) parse_ws_xml_sheetpr(sheetPr[0], s, wb, idx);\n\n\t/* 18.3.1.36 drawing CT_Drawing */\n\tif((m = data.match(/drawing r:id=\"(.*?)\"/))) s['!rel'] = m[1];\n\n\tif(rels['!id'][s['!rel']]) s['!drawel'] = rels['!id'][s['!rel']];\n\treturn s;\n}\nfunction write_cs_xml(idx, opts, wb, rels) {\n\tvar o = [XML_HEADER, CS_XML_ROOT];\n\to[o.length] = writextag(\"drawing\", null, {\"r:id\": \"rId1\"});\n\tadd_rels(rels, -1, \"../drawings/drawing\" + (idx+1) + \".xml\", RELS.DRAW);\n\tif(o.length>2) { o[o.length] = (''); o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n\n/* [MS-XLSB] 2.4.331 BrtCsProp */\nfunction parse_BrtCsProp(data, length) {\n\tdata.l += 10;\n\tvar name = parse_XLWideString(data, length - 10);\n\treturn { name: name };\n}\n\n/* [MS-XLSB] 2.1.7.7 Chart Sheet */\nfunction parse_cs_bin(data, opts, idx, rels, wb) {\n\tif(!data) return data;\n\tif(!rels) rels = {'!id':{}};\n\tvar s = {'!type':\"chart\", '!drawel':null, '!rel':\"\"};\n\tvar state = [];\n\tvar pass = false;\n\trecordhopper(data, function cs_parse(val, R_n, RT) {\n\t\tswitch(RT) {\n\n\t\t\tcase 0x0226: /* 'BrtDrawing' */\n\t\t\t\ts['!rel'] = val; break;\n\n\t\t\tcase 0x028B: /* 'BrtCsProp' */\n\t\t\t\tif(!wb.Sheets[idx]) wb.Sheets[idx] = {};\n\t\t\t\tif(val.name) wb.Sheets[idx].CodeName = val.name;\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0232: /* 'BrtBkHim' */\n\t\t\tcase 0x028C: /* 'BrtCsPageSetup' */\n\t\t\tcase 0x029D: /* 'BrtCsProtection' */\n\t\t\tcase 0x02A7: /* 'BrtCsProtectionIso' */\n\t\t\tcase 0x0227: /* 'BrtLegacyDrawing' */\n\t\t\tcase 0x0228: /* 'BrtLegacyDrawingHF' */\n\t\t\tcase 0x01DC: /* 'BrtMargins' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tpass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tpass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(R_n); break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); break;\n\n\t\t\tdefault:\n\t\t\t\tif((R_n||\"\").indexOf(\"Begin\") > 0) state.push(R_n);\n\t\t\t\telse if((R_n||\"\").indexOf(\"End\") > 0) state.pop();\n\t\t\t\telse if(!pass || opts.WTF) throw new Error(\"Unexpected record \" + RT + \" \" + R_n);\n\t\t}\n\t}, opts);\n\n\tif(rels['!id'][s['!rel']]) s['!drawel'] = rels['!id'][s['!rel']];\n\treturn s;\n}\nfunction write_cs_bin() {\n\tvar ba = buf_array();\n\twrite_record(ba, \"BrtBeginSheet\");\n\t/* [BrtCsProp] */\n\t/* CSVIEWS */\n\t/* [[BrtCsProtectionIso] BrtCsProtection] */\n\t/* [USERCSVIEWS] */\n\t/* [BrtMargins] */\n\t/* [BrtCsPageSetup] */\n\t/* [HEADERFOOTER] */\n\t/* BrtDrawing */\n\t/* [BrtLegacyDrawing] */\n\t/* [BrtLegacyDrawingHF] */\n\t/* [BrtBkHim] */\n\t/* [WEBPUBITEMS] */\n\t/* FRTCHARTSHEET */\n\twrite_record(ba, \"BrtEndSheet\");\n\treturn ba.end();\n}\n/* 18.2.28 (CT_WorkbookProtection) Defaults */\nvar WBPropsDef = [\n\t['allowRefreshQuery', false, \"bool\"],\n\t['autoCompressPictures', true, \"bool\"],\n\t['backupFile', false, \"bool\"],\n\t['checkCompatibility', false, \"bool\"],\n\t['CodeName', ''],\n\t['date1904', false, \"bool\"],\n\t['defaultThemeVersion', 0, \"int\"],\n\t['filterPrivacy', false, \"bool\"],\n\t['hidePivotFieldList', false, \"bool\"],\n\t['promptedSolutions', false, \"bool\"],\n\t['publishItems', false, \"bool\"],\n\t['refreshAllConnections', false, \"bool\"],\n\t['saveExternalLinkValues', true, \"bool\"],\n\t['showBorderUnselectedTables', true, \"bool\"],\n\t['showInkAnnotation', true, \"bool\"],\n\t['showObjects', 'all'],\n\t['showPivotChartFilter', false, \"bool\"],\n\t['updateLinks', 'userSet']\n];\n\n/* 18.2.30 (CT_BookView) Defaults */\nvar WBViewDef = [\n\t['activeTab', 0, \"int\"],\n\t['autoFilterDateGrouping', true, \"bool\"],\n\t['firstSheet', 0, \"int\"],\n\t['minimized', false, \"bool\"],\n\t['showHorizontalScroll', true, \"bool\"],\n\t['showSheetTabs', true, \"bool\"],\n\t['showVerticalScroll', true, \"bool\"],\n\t['tabRatio', 600, \"int\"],\n\t['visibility', 'visible']\n\t//window{Height,Width}, {x,y}Window\n];\n\n/* 18.2.19 (CT_Sheet) Defaults */\nvar SheetDef = [\n\t//['state', 'visible']\n];\n\n/* 18.2.2 (CT_CalcPr) Defaults */\nvar CalcPrDef = [\n\t['calcCompleted', 'true'],\n\t['calcMode', 'auto'],\n\t['calcOnSave', 'true'],\n\t['concurrentCalc', 'true'],\n\t['fullCalcOnLoad', 'false'],\n\t['fullPrecision', 'true'],\n\t['iterate', 'false'],\n\t['iterateCount', '100'],\n\t['iterateDelta', '0.001'],\n\t['refMode', 'A1']\n];\n\n/* 18.2.3 (CT_CustomWorkbookView) Defaults */\n/*var CustomWBViewDef = [\n\t['autoUpdate', 'false'],\n\t['changesSavedWin', 'false'],\n\t['includeHiddenRowCol', 'true'],\n\t['includePrintSettings', 'true'],\n\t['maximized', 'false'],\n\t['minimized', 'false'],\n\t['onlySync', 'false'],\n\t['personalView', 'false'],\n\t['showComments', 'commIndicator'],\n\t['showFormulaBar', 'true'],\n\t['showHorizontalScroll', 'true'],\n\t['showObjects', 'all'],\n\t['showSheetTabs', 'true'],\n\t['showStatusbar', 'true'],\n\t['showVerticalScroll', 'true'],\n\t['tabRatio', '600'],\n\t['xWindow', '0'],\n\t['yWindow', '0']\n];*/\n\nfunction push_defaults_array(target, defaults) {\n\tfor(var j = 0; j != target.length; ++j) { var w = target[j];\n\t\tfor(var i=0; i != defaults.length; ++i) { var z = defaults[i];\n\t\t\tif(w[z[0]] == null) w[z[0]] = z[1];\n\t\t\telse switch(z[2]) {\n\t\t\tcase \"bool\": if(typeof w[z[0]] == \"string\") w[z[0]] = parsexmlbool(w[z[0]]); break;\n\t\t\tcase \"int\": if(typeof w[z[0]] == \"string\") w[z[0]] = parseInt(w[z[0]], 10); break;\n\t\t\t}\n\t\t}\n\t}\n}\nfunction push_defaults(target, defaults) {\n\tfor(var i = 0; i != defaults.length; ++i) { var z = defaults[i];\n\t\tif(target[z[0]] == null) target[z[0]] = z[1];\n\t\telse switch(z[2]) {\n\t\t\tcase \"bool\": if(typeof target[z[0]] == \"string\") target[z[0]] = parsexmlbool(target[z[0]]); break;\n\t\t\tcase \"int\": if(typeof target[z[0]] == \"string\") target[z[0]] = parseInt(target[z[0]], 10); break;\n\t\t}\n\t}\n}\n\nfunction parse_wb_defaults(wb) {\n\tpush_defaults(wb.WBProps, WBPropsDef);\n\tpush_defaults(wb.CalcPr, CalcPrDef);\n\n\tpush_defaults_array(wb.WBView, WBViewDef);\n\tpush_defaults_array(wb.Sheets, SheetDef);\n\n\t_ssfopts.date1904 = parsexmlbool(wb.WBProps.date1904);\n}\n\nfunction safe1904(wb) {\n\t/* TODO: store date1904 somewhere else */\n\tif(!wb.Workbook) return \"false\";\n\tif(!wb.Workbook.WBProps) return \"false\";\n\treturn parsexmlbool(wb.Workbook.WBProps.date1904) ? \"true\" : \"false\";\n}\n\nvar badchars = \"][*?\\/\\\\\".split(\"\");\nfunction check_ws_name(n, safe) {\n\tif(n.length > 31) { if(safe) return false; throw new Error(\"Sheet names cannot exceed 31 chars\"); }\n\tvar _good = true;\n\tbadchars.forEach(function(c) {\n\t\tif(n.indexOf(c) == -1) return;\n\t\tif(!safe) throw new Error(\"Sheet name cannot contain : \\\\ / ? * [ ]\");\n\t\t_good = false;\n\t});\n\treturn _good;\n}\nfunction check_wb_names(N, S, codes) {\n\tN.forEach(function(n,i) {\n\t\tcheck_ws_name(n);\n\t\tfor(var j = 0; j < i; ++j) if(n == N[j]) throw new Error(\"Duplicate Sheet Name: \" + n);\n\t\tif(codes) {\n\t\t\tvar cn = (S && S[i] && S[i].CodeName) || n;\n\t\t\tif(cn.charCodeAt(0) == 95 && cn.length > 22) throw new Error(\"Bad Code Name: Worksheet\" + cn);\n\t\t}\n\t});\n}\nfunction check_wb(wb) {\n\tif(!wb || !wb.SheetNames || !wb.Sheets) throw new Error(\"Invalid Workbook\");\n\tif(!wb.SheetNames.length) throw new Error(\"Workbook is empty\");\n\tvar Sheets = (wb.Workbook && wb.Workbook.Sheets) || [];\n\tcheck_wb_names(wb.SheetNames, Sheets, !!wb.vbaraw);\n\tfor(var i = 0; i < wb.SheetNames.length; ++i) check_ws(wb.Sheets[wb.SheetNames[i]], wb.SheetNames[i], i);\n\t/* TODO: validate workbook */\n}\n/* 18.2 Workbook */\nvar wbnsregex = /<\\w+:workbook/;\nfunction parse_wb_xml(data, opts) {\n\tif(!data) throw new Error(\"Could not find file\");\n\tvar wb = { AppVersion:{}, WBProps:{}, WBView:[], Sheets:[], CalcPr:{}, Names:[], xmlns: \"\" };\n\tvar pass = false, xmlns = \"xmlns\";\n\tvar dname = {}, dnstart = 0;\n\tdata.replace(tagregex, function xml_wb(x, idx) {\n\t\tvar y = parsexmltag(x);\n\t\tswitch(strip_ns(y[0])) {\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.13 fileVersion CT_FileVersion ? */\n\t\t\tcase '': case '': break;\n\n\t\t\t/* 18.2.12 fileSharing CT_FileSharing ? */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.28 workbookPr CT_WorkbookPr ? */\n\t\t\tcase '':\n\t\t\t\tWBPropsDef.forEach(function(w) {\n\t\t\t\t\tif(y[w[0]] == null) return;\n\t\t\t\t\tswitch(w[2]) {\n\t\t\t\t\t\tcase \"bool\": wb.WBProps[w[0]] = parsexmlbool(y[w[0]]); break;\n\t\t\t\t\t\tcase \"int\": wb.WBProps[w[0]] = parseInt(y[w[0]], 10); break;\n\t\t\t\t\t\tdefault: wb.WBProps[w[0]] = y[w[0]];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif(y.codeName) wb.WBProps.CodeName = utf8read(y.codeName);\n\t\t\t\tbreak;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.29 workbookProtection CT_WorkbookProtection ? */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.1 bookViews CT_BookViews ? */\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.2.30 workbookView CT_BookView + */\n\t\t\tcase '': delete y[0]; wb.WBView.push(y); break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.20 sheets CT_Sheets 1 */\n\t\t\tcase '': case '': break; // aggregate sheet\n\t\t\t/* 18.2.19 sheet CT_Sheet + */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.15 functionGroups CT_FunctionGroups ? */\n\t\t\tcase '': break;\n\t\t\t/* 18.2.14 functionGroup CT_FunctionGroup + */\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.2.8 externalReference CT_ExternalReference + */\n\t\t\tcase '': break;\n\t\t\tcase '': case '': pass=false; break;\n\t\t\t/* 18.2.5 definedName CT_DefinedName + */\n\t\t\tcase '': {\n\t\t\t\tdname.Ref = unescapexml(utf8read(data.slice(dnstart, idx)));\n\t\t\t\twb.Names.push(dname);\n\t\t\t} break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.2 calcPr CT_CalcPr ? */\n\t\t\tcase '': delete y[0]; wb.CalcPr = y; break;\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.16 oleSize CT_OleSize ? (ref required) */\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.2.18 pivotCaches CT_PivotCaches ? */\n\t\t\tcase '': case '': case '': break;\n\n\t\t\t/* 18.2.23 smartTagTypes CT_SmartTagTypes ? */\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.2.22 smartTagType CT_SmartTagType ? */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.11 fileRecoveryPr CT_FileRecoveryPr ? */\n\t\t\tcase '': break;\n\n\t\t\t/* 18.2.26 webPublishObjects CT_WebPublishObjects ? */\n\t\t\tcase '': case '': break;\n\t\t\t/* 18.2.25 webPublishObject CT_WebPublishObject ? */\n\t\t\tcase '': case '': case '': break;\n\t\t\t/* 18.2.7 ext CT_Extension + */\n\t\t\tcase '': pass=false; break;\n\n\t\t\t/* Others */\n\t\t\tcase '': pass=true; break;\n\t\t\tcase '': pass=false; break;\n\n\t\t\t/* TODO */\n\t\t\tcase ' 0);\n\n\t/* fileVersion */\n\t/* fileSharing */\n\n\tvar workbookPr = ({codeName:\"ThisWorkbook\"});\n\tif(wb.Workbook && wb.Workbook.WBProps) {\n\t\tWBPropsDef.forEach(function(x) {\nif((wb.Workbook.WBProps[x[0]]) == null) return;\n\t\t\tif((wb.Workbook.WBProps[x[0]]) == x[1]) return;\n\t\t\tworkbookPr[x[0]] = (wb.Workbook.WBProps[x[0]]);\n\t\t});\nif(wb.Workbook.WBProps.CodeName) { workbookPr.codeName = wb.Workbook.WBProps.CodeName; delete workbookPr.CodeName; }\n\t}\n\to[o.length] = (writextag('workbookPr', null, workbookPr));\n\n\t/* workbookProtection */\n\n\tvar sheets = wb.Workbook && wb.Workbook.Sheets || [];\n\tvar i = 0;\n\n\t/* bookViews only written if first worksheet is hidden */\n\tif(sheets && sheets[0] && !!sheets[0].Hidden) {\n\t\to[o.length] = \"\";\n\t\tfor(i = 0; i != wb.SheetNames.length; ++i) {\n\t\t\tif(!sheets[i]) break;\n\t\t\tif(!sheets[i].Hidden) break;\n\t\t}\n\t\tif(i == wb.SheetNames.length) i = 0;\n\t\to[o.length] = '';\n\t\to[o.length] = \"\";\n\t}\n\n\to[o.length] = \"\";\n\tfor(i = 0; i != wb.SheetNames.length; ++i) {\n\t\tvar sht = ({name:escapexml(wb.SheetNames[i].slice(0,31))});\n\t\tsht.sheetId = \"\"+(i+1);\n\t\tsht[\"r:id\"] = \"rId\"+(i+1);\n\t\tif(sheets[i]) switch(sheets[i].Hidden) {\n\t\t\tcase 1: sht.state = \"hidden\"; break;\n\t\t\tcase 2: sht.state = \"veryHidden\"; break;\n\t\t}\n\t\to[o.length] = (writextag('sheet',null,sht));\n\t}\n\to[o.length] = \"\";\n\n\t/* functionGroups */\n\t/* externalReferences */\n\n\tif(write_names) {\n\t\to[o.length] = \"\";\n\t\tif(wb.Workbook && wb.Workbook.Names) wb.Workbook.Names.forEach(function(n) {\n\t\t\tvar d = {name:n.Name};\n\t\t\tif(n.Comment) d.comment = n.Comment;\n\t\t\tif(n.Sheet != null) d.localSheetId = \"\"+n.Sheet;\n\t\t\tif(n.Hidden) d.hidden = \"1\";\n\t\t\tif(!n.Ref) return;\n\t\t\to[o.length] = writextag('definedName', escapexml(n.Ref), d);\n\t\t});\n\t\to[o.length] = \"\";\n\t}\n\n\t/* calcPr */\n\t/* oleSize */\n\t/* customWorkbookViews */\n\t/* pivotCaches */\n\t/* smartTagPr */\n\t/* smartTagTypes */\n\t/* webPublishing */\n\t/* fileRecoveryPr */\n\t/* webPublishObjects */\n\t/* extLst */\n\n\tif(o.length>2){ o[o.length] = ''; o[1]=o[1].replace(\"/>\",\">\"); }\n\treturn o.join(\"\");\n}\n/* [MS-XLSB] 2.4.304 BrtBundleSh */\nfunction parse_BrtBundleSh(data, length) {\n\tvar z = {};\n\tz.Hidden = data.read_shift(4); //hsState ST_SheetState\n\tz.iTabID = data.read_shift(4);\n\tz.strRelID = parse_RelID(data,length-8);\n\tz.name = parse_XLWideString(data);\n\treturn z;\n}\nfunction write_BrtBundleSh(data, o) {\n\tif(!o) o = new_buf(127);\n\to.write_shift(4, data.Hidden);\n\to.write_shift(4, data.iTabID);\n\twrite_RelID(data.strRelID, o);\n\twrite_XLWideString(data.name.slice(0,31), o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.815 BrtWbProp */\nfunction parse_BrtWbProp(data, length) {\n\tvar o = ({});\n\tvar flags = data.read_shift(4);\n\to.defaultThemeVersion = data.read_shift(4);\n\tvar strName = (length > 8) ? parse_XLWideString(data) : \"\";\n\tif(strName.length > 0) o.CodeName = strName;\n\to.autoCompressPictures = !!(flags & 0x10000);\n\to.backupFile = !!(flags & 0x40);\n\to.checkCompatibility = !!(flags & 0x1000);\n\to.date1904 = !!(flags & 0x01);\n\to.filterPrivacy = !!(flags & 0x08);\n\to.hidePivotFieldList = !!(flags & 0x400);\n\to.promptedSolutions = !!(flags & 0x10);\n\to.publishItems = !!(flags & 0x800);\n\to.refreshAllConnections = !!(flags & 0x40000);\n\to.saveExternalLinkValues = !!(flags & 0x80);\n\to.showBorderUnselectedTables = !!(flags & 0x04);\n\to.showInkAnnotation = !!(flags & 0x20);\n\to.showObjects = [\"all\", \"placeholders\", \"none\"][(flags >> 13) & 0x03];\n\to.showPivotChartFilter = !!(flags & 0x8000);\n\to.updateLinks = [\"userSet\", \"never\", \"always\"][(flags >> 8) & 0x03];\n\treturn o;\n}\nfunction write_BrtWbProp(data, o) {\n\tif(!o) o = new_buf(72);\n\tvar flags = 0;\n\tif(data) {\n\t\t/* TODO: mirror parse_BrtWbProp fields */\n\t\tif(data.filterPrivacy) flags |= 0x08;\n\t}\n\to.write_shift(4, flags);\n\to.write_shift(4, 0);\n\twrite_XLSBCodeName(data && data.CodeName || \"ThisWorkbook\", o);\n\treturn o.slice(0, o.l);\n}\n\nfunction parse_BrtFRTArchID$(data, length) {\n\tvar o = {};\n\tdata.read_shift(4);\n\to.ArchID = data.read_shift(4);\n\tdata.l += length - 8;\n\treturn o;\n}\n\n/* [MS-XLSB] 2.4.687 BrtName */\nfunction parse_BrtName(data, length, opts) {\n\tvar end = data.l + length;\n\tdata.l += 4; //var flags = data.read_shift(4);\n\tdata.l += 1; //var chKey = data.read_shift(1);\n\tvar itab = data.read_shift(4);\n\tvar name = parse_XLNameWideString(data);\n\tvar formula = parse_XLSBNameParsedFormula(data, 0, opts);\n\tvar comment = parse_XLNullableWideString(data);\n\t//if(0 /* fProc */) {\n\t\t// unusedstring1: XLNullableWideString\n\t\t// description: XLNullableWideString\n\t\t// helpTopic: XLNullableWideString\n\t\t// unusedstring2: XLNullableWideString\n\t//}\n\tdata.l = end;\n\tvar out = ({Name:name, Ptg:formula});\n\tif(itab < 0xFFFFFFF) out.Sheet = itab;\n\tif(comment) out.Comment = comment;\n\treturn out;\n}\n\n/* [MS-XLSB] 2.1.7.61 Workbook */\nfunction parse_wb_bin(data, opts) {\n\tvar wb = { AppVersion:{}, WBProps:{}, WBView:[], Sheets:[], CalcPr:{}, xmlns: \"\" };\n\tvar state = [];\n\tvar pass = false;\n\n\tif(!opts) opts = {};\n\topts.biff = 12;\n\n\tvar Names = [];\n\tvar supbooks = ([[]]);\n\tsupbooks.SheetNames = [];\n\tsupbooks.XTI = [];\n\n\tXLSBRecordEnum[0x0010] = { n:\"BrtFRTArchID$\", f:parse_BrtFRTArchID$ };\n\n\trecordhopper(data, function hopper_wb(val, R_n, RT) {\n\t\tswitch(RT) {\n\t\t\tcase 0x009C: /* 'BrtBundleSh' */\n\t\t\t\tsupbooks.SheetNames.push(val.name);\n\t\t\t\twb.Sheets.push(val); break;\n\n\t\t\tcase 0x0099: /* 'BrtWbProp' */\n\t\t\t\twb.WBProps = val; break;\n\n\t\t\tcase 0x0027: /* 'BrtName' */\n\t\t\t\tif(val.Sheet != null) opts.SID = val.Sheet;\n\t\t\t\tval.Ref = stringify_formula(val.Ptg, null, null, supbooks, opts);\n\t\t\t\tdelete opts.SID;\n\t\t\t\tdelete val.Ptg;\n\t\t\t\tNames.push(val);\n\t\t\t\tbreak;\n\t\t\tcase 0x040C: /* 'BrtNameExt' */ break;\n\n\t\t\tcase 0x0165: /* 'BrtSupSelf' */\n\t\t\tcase 0x0166: /* 'BrtSupSame' */\n\t\t\tcase 0x0163: /* 'BrtSupBookSrc' */\n\t\t\tcase 0x029B: /* 'BrtSupAddin' */\n\t\t\t\tif(!supbooks[0].length) supbooks[0] = [RT, val];\n\t\t\t\telse supbooks.push([RT, val]);\n\t\t\t\tsupbooks[supbooks.length - 1].XTI = [];\n\t\t\t\tbreak;\n\t\t\tcase 0x016A: /* 'BrtExternSheet' */\n\t\t\t\tif(supbooks.length === 0) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\tsupbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val);\n\t\t\t\tsupbooks.XTI = supbooks.XTI.concat(val);\n\t\t\t\tbreak;\n\t\t\tcase 0x0169: /* 'BrtPlaceholderName' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0817: /* 'BrtAbsPath15' */\n\t\t\tcase 0x009E: /* 'BrtBookView' */\n\t\t\tcase 0x008F: /* 'BrtBeginBundleShs' */\n\t\t\tcase 0x0298: /* 'BrtBeginFnGroup' */\n\t\t\tcase 0x0161: /* 'BrtBeginExternals' */\n\t\t\t\tbreak;\n\n\t\t\t/* case 'BrtModelTimeGroupingCalcCol' */\n\t\t\tcase 0x0C00: /* 'BrtUid' */\n\t\t\tcase 0x0C01: /* 'BrtRevisionPtr' */\n\t\t\tcase 0x0216: /* 'BrtBookProtection' */\n\t\t\tcase 0x02A5: /* 'BrtBookProtectionIso' */\n\t\t\tcase 0x009D: /* 'BrtCalcProp' */\n\t\t\tcase 0x0262: /* 'BrtCrashRecErr' */\n\t\t\tcase 0x0802: /* 'BrtDecoupledPivotCacheID' */\n\t\t\tcase 0x009B: /* 'BrtFileRecover' */\n\t\t\tcase 0x0224: /* 'BrtFileSharing' */\n\t\t\tcase 0x02A4: /* 'BrtFileSharingIso' */\n\t\t\tcase 0x0080: /* 'BrtFileVersion' */\n\t\t\tcase 0x0299: /* 'BrtFnGroup' */\n\t\t\tcase 0x0850: /* 'BrtModelRelationship' */\n\t\t\tcase 0x084D: /* 'BrtModelTable' */\n\t\t\tcase 0x0225: /* 'BrtOleSize' */\n\t\t\tcase 0x0805: /* 'BrtPivotTableRef' */\n\t\t\tcase 0x0254: /* 'BrtSmartTagType' */\n\t\t\tcase 0x081C: /* 'BrtTableSlicerCacheID' */\n\t\t\tcase 0x081B: /* 'BrtTableSlicerCacheIDs' */\n\t\t\tcase 0x0822: /* 'BrtTimelineCachePivotCacheID' */\n\t\t\tcase 0x018D: /* 'BrtUserBookView' */\n\t\t\tcase 0x009A: /* 'BrtWbFactoid' */\n\t\t\tcase 0x045D: /* 'BrtWbProp14' */\n\t\t\tcase 0x0229: /* 'BrtWebOpt' */\n\t\t\tcase 0x082B: /* 'BrtWorkBookPr15' */\n\t\t\t\tbreak;\n\n\t\t\tcase 0x0023: /* 'BrtFRTBegin' */\n\t\t\t\tstate.push(R_n); pass = true; break;\n\t\t\tcase 0x0024: /* 'BrtFRTEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\t\t\tcase 0x0025: /* 'BrtACBegin' */\n\t\t\t\tstate.push(R_n); pass = true; break;\n\t\t\tcase 0x0026: /* 'BrtACEnd' */\n\t\t\t\tstate.pop(); pass = false; break;\n\n\t\t\tcase 0x0010: /* 'BrtFRTArchID$' */ break;\n\n\t\t\tdefault:\n\t\t\t\tif((R_n||\"\").indexOf(\"Begin\") > 0){/* empty */}\n\t\t\t\telse if((R_n||\"\").indexOf(\"End\") > 0){/* empty */}\n\t\t\t\telse if(!pass || (opts.WTF && state[state.length-1] != \"BrtACBegin\" && state[state.length-1] != \"BrtFRTBegin\")) throw new Error(\"Unexpected record \" + RT + \" \" + R_n);\n\t\t}\n\t}, opts);\n\n\tparse_wb_defaults(wb);\n\n\t// $FlowIgnore\n\twb.Names = Names;\n\n\t(wb).supbooks = supbooks;\n\treturn wb;\n}\n\nfunction write_BUNDLESHS(ba, wb) {\n\twrite_record(ba, \"BrtBeginBundleShs\");\n\tfor(var idx = 0; idx != wb.SheetNames.length; ++idx) {\n\t\tvar viz = wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx] && wb.Workbook.Sheets[idx].Hidden || 0;\n\t\tvar d = { Hidden: viz, iTabID: idx+1, strRelID: 'rId' + (idx+1), name: wb.SheetNames[idx] };\n\t\twrite_record(ba, \"BrtBundleSh\", write_BrtBundleSh(d));\n\t}\n\twrite_record(ba, \"BrtEndBundleShs\");\n}\n\n/* [MS-XLSB] 2.4.649 BrtFileVersion */\nfunction write_BrtFileVersion(data, o) {\n\tif(!o) o = new_buf(127);\n\tfor(var i = 0; i != 4; ++i) o.write_shift(4, 0);\n\twrite_XLWideString(\"SheetJS\", o);\n\twrite_XLWideString(XLSX.version, o);\n\twrite_XLWideString(XLSX.version, o);\n\twrite_XLWideString(\"7262\", o);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\n/* [MS-XLSB] 2.4.301 BrtBookView */\nfunction write_BrtBookView(idx, o) {\n\tif(!o) o = new_buf(29);\n\to.write_shift(-4, 0);\n\to.write_shift(-4, 460);\n\to.write_shift(4, 28800);\n\to.write_shift(4, 17600);\n\to.write_shift(4, 500);\n\to.write_shift(4, idx);\n\to.write_shift(4, idx);\n\tvar flags = 0x78;\n\to.write_shift(1, flags);\n\treturn o.length > o.l ? o.slice(0, o.l) : o;\n}\n\nfunction write_BOOKVIEWS(ba, wb) {\n\t/* required if hidden tab appears before visible tab */\n\tif(!wb.Workbook || !wb.Workbook.Sheets) return;\n\tvar sheets = wb.Workbook.Sheets;\n\tvar i = 0, vistab = -1, hidden = -1;\n\tfor(; i < sheets.length; ++i) {\n\t\tif(!sheets[i] || !sheets[i].Hidden && vistab == -1) vistab = i;\n\t\telse if(sheets[i].Hidden == 1 && hidden == -1) hidden = i;\n\t}\n\tif(hidden > vistab) return;\n\twrite_record(ba, \"BrtBeginBookViews\");\n\twrite_record(ba, \"BrtBookView\", write_BrtBookView(vistab));\n\t/* 1*(BrtBookView *FRT) */\n\twrite_record(ba, \"BrtEndBookViews\");\n}\n\n/* [MS-XLSB] 2.4.305 BrtCalcProp */\n/*function write_BrtCalcProp(data, o) {\n\tif(!o) o = new_buf(26);\n\to.write_shift(4,0); // force recalc\n\to.write_shift(4,1);\n\to.write_shift(4,0);\n\twrite_Xnum(0, o);\n\to.write_shift(-4, 1023);\n\to.write_shift(1, 0x33);\n\to.write_shift(1, 0x00);\n\treturn o;\n}*/\n\n/* [MS-XLSB] 2.4.646 BrtFileRecover */\n/*function write_BrtFileRecover(data, o) {\n\tif(!o) o = new_buf(1);\n\to.write_shift(1,0);\n\treturn o;\n}*/\n\n/* [MS-XLSB] 2.1.7.61 Workbook */\nfunction write_wb_bin(wb, opts) {\n\tvar ba = buf_array();\n\twrite_record(ba, \"BrtBeginBook\");\n\twrite_record(ba, \"BrtFileVersion\", write_BrtFileVersion());\n\t/* [[BrtFileSharingIso] BrtFileSharing] */\n\twrite_record(ba, \"BrtWbProp\", write_BrtWbProp(wb.Workbook && wb.Workbook.WBProps || null));\n\t/* [ACABSPATH] */\n\t/* [[BrtBookProtectionIso] BrtBookProtection] */\n\twrite_BOOKVIEWS(ba, wb, opts);\n\twrite_BUNDLESHS(ba, wb, opts);\n\t/* [FNGROUP] */\n\t/* [EXTERNALS] */\n\t/* *BrtName */\n\t/* write_record(ba, \"BrtCalcProp\", write_BrtCalcProp()); */\n\t/* [BrtOleSize] */\n\t/* *(BrtUserBookView *FRT) */\n\t/* [PIVOTCACHEIDS] */\n\t/* [BrtWbFactoid] */\n\t/* [SMARTTAGTYPES] */\n\t/* [BrtWebOpt] */\n\t/* write_record(ba, \"BrtFileRecover\", write_BrtFileRecover()); */\n\t/* [WEBPUBITEMS] */\n\t/* [CRERRS] */\n\t/* FRTWORKBOOK */\n\twrite_record(ba, \"BrtEndBook\");\n\n\treturn ba.end();\n}\nfunction parse_wb(data, name, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_wb_bin((data), opts);\n\treturn parse_wb_xml((data), opts);\n}\n\nfunction parse_ws(data, name, idx, opts, rels, wb, themes, styles) {\n\tif(name.slice(-4)===\".bin\") return parse_ws_bin((data), opts, idx, rels, wb, themes, styles);\n\treturn parse_ws_xml((data), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_cs(data, name, idx, opts, rels, wb, themes, styles) {\n\tif(name.slice(-4)===\".bin\") return parse_cs_bin((data), opts, idx, rels, wb, themes, styles);\n\treturn parse_cs_xml((data), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_ms(data, name, idx, opts, rels, wb, themes, styles) {\n\tif(name.slice(-4)===\".bin\") return parse_ms_bin((data), opts, idx, rels, wb, themes, styles);\n\treturn parse_ms_xml((data), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_ds(data, name, idx, opts, rels, wb, themes, styles) {\n\tif(name.slice(-4)===\".bin\") return parse_ds_bin((data), opts, idx, rels, wb, themes, styles);\n\treturn parse_ds_xml((data), opts, idx, rels, wb, themes, styles);\n}\n\nfunction parse_sty(data, name, themes, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_sty_bin((data), themes, opts);\n\treturn parse_sty_xml((data), themes, opts);\n}\n\nfunction parse_theme(data, name, opts) {\n\treturn parse_theme_xml(data, opts);\n}\n\nfunction parse_sst(data, name, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_sst_bin((data), opts);\n\treturn parse_sst_xml((data), opts);\n}\n\nfunction parse_cmnt(data, name, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_comments_bin((data), opts);\n\treturn parse_comments_xml((data), opts);\n}\n\nfunction parse_cc(data, name, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_cc_bin((data), name, opts);\n\treturn parse_cc_xml((data), name, opts);\n}\n\nfunction parse_xlink(data, rel, name, opts) {\n\tif(name.slice(-4)===\".bin\") return parse_xlink_bin((data), rel, name, opts);\n\treturn parse_xlink_xml((data), rel, name, opts);\n}\n\nfunction write_wb(wb, name, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_wb_bin : write_wb_xml)(wb, opts);\n}\n\nfunction write_ws(data, name, opts, wb, rels) {\n\treturn (name.slice(-4)===\".bin\" ? write_ws_bin : write_ws_xml)(data, opts, wb, rels);\n}\n\n// eslint-disable-next-line no-unused-vars\nfunction write_cs(data, name, opts, wb, rels) {\n\treturn (name.slice(-4)===\".bin\" ? write_cs_bin : write_cs_xml)(data, opts, wb, rels);\n}\n\nfunction write_sty(data, name, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_sty_bin : write_sty_xml)(data, opts);\n}\n\nfunction write_sst(data, name, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_sst_bin : write_sst_xml)(data, opts);\n}\n\nfunction write_cmnt(data, name, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_comments_bin : write_comments_xml)(data, opts);\n}\n/*\nfunction write_cc(data, name:string, opts) {\n\treturn (name.slice(-4)===\".bin\" ? write_cc_bin : write_cc_xml)(data, opts);\n}\n*/\nvar attregexg2=/([\\w:]+)=((?:\")([^\"]*)(?:\")|(?:')([^']*)(?:'))/g;\nvar attregex2=/([\\w:]+)=((?:\")(?:[^\"]*)(?:\")|(?:')(?:[^']*)(?:'))/;\nfunction xlml_parsexmltag(tag, skip_root) {\n\tvar words = tag.split(/\\s+/);\n\tvar z = ([]); if(!skip_root) z[0] = words[0];\n\tif(words.length === 1) return z;\n\tvar m = tag.match(attregexg2), y, j, w, i;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\ty = m[i].match(attregex2);\nif((j=y[1].indexOf(\":\")) === -1) z[y[1]] = y[2].slice(1,y[2].length-1);\n\t\telse {\n\t\t\tif(y[1].slice(0,6) === \"xmlns:\") w = \"xmlns\"+y[1].slice(6);\n\t\t\telse w = y[1].slice(j+1);\n\t\t\tz[w] = y[2].slice(1,y[2].length-1);\n\t\t}\n\t}\n\treturn z;\n}\nfunction xlml_parsexmltagobj(tag) {\n\tvar words = tag.split(/\\s+/);\n\tvar z = {};\n\tif(words.length === 1) return z;\n\tvar m = tag.match(attregexg2), y, j, w, i;\n\tif(m) for(i = 0; i != m.length; ++i) {\n\t\ty = m[i].match(attregex2);\nif((j=y[1].indexOf(\":\")) === -1) z[y[1]] = y[2].slice(1,y[2].length-1);\n\t\telse {\n\t\t\tif(y[1].slice(0,6) === \"xmlns:\") w = \"xmlns\"+y[1].slice(6);\n\t\t\telse w = y[1].slice(j+1);\n\t\t\tz[w] = y[2].slice(1,y[2].length-1);\n\t\t}\n\t}\n\treturn z;\n}\n\n// ----\n\nfunction xlml_format(format, value) {\n\tvar fmt = XLMLFormatMap[format] || unescapexml(format);\n\tif(fmt === \"General\") return SSF._general(value);\n\treturn SSF.format(fmt, value);\n}\n\nfunction xlml_set_custprop(Custprops, key, cp, val) {\n\tvar oval = val;\n\tswitch((cp[0].match(/dt:dt=\"([\\w.]+)\"/)||[\"\",\"\"])[1]) {\n\t\tcase \"boolean\": oval = parsexmlbool(val); break;\n\t\tcase \"i2\": case \"int\": oval = parseInt(val, 10); break;\n\t\tcase \"r4\": case \"float\": oval = parseFloat(val); break;\n\t\tcase \"date\": case \"dateTime.tz\": oval = parseDate(val); break;\n\t\tcase \"i8\": case \"string\": case \"fixed\": case \"uuid\": case \"bin.base64\": break;\n\t\tdefault: throw new Error(\"bad custprop:\" + cp[0]);\n\t}\n\tCustprops[unescapexml(key)] = oval;\n}\n\nfunction safe_format_xlml(cell, nf, o) {\n\tif(cell.t === 'z') return;\n\tif(!o || o.cellText !== false) try {\n\t\tif(cell.t === 'e') { cell.w = cell.w || BErr[cell.v]; }\n\t\telse if(nf === \"General\") {\n\t\t\tif(cell.t === 'n') {\n\t\t\t\tif((cell.v|0) === cell.v) cell.w = SSF._general_int(cell.v);\n\t\t\t\telse cell.w = SSF._general_num(cell.v);\n\t\t\t}\n\t\t\telse cell.w = SSF._general(cell.v);\n\t\t}\n\t\telse cell.w = xlml_format(nf||\"General\", cell.v);\n\t} catch(e) { if(o.WTF) throw e; }\n\ttry {\n\t\tvar z = XLMLFormatMap[nf]||nf||\"General\";\n\t\tif(o.cellNF) cell.z = z;\n\t\tif(o.cellDates && cell.t == 'n' && SSF.is_date(z)) {\n\t\t\tvar _d = SSF.parse_date_code(cell.v); if(_d) { cell.t = 'd'; cell.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t\t}\n\t} catch(e) { if(o.WTF) throw e; }\n}\n\nfunction process_style_xlml(styles, stag, opts) {\n\tif(opts.cellStyles) {\n\t\tif(stag.Interior) {\n\t\t\tvar I = stag.Interior;\n\t\t\tif(I.Pattern) I.patternType = XLMLPatternTypeMap[I.Pattern] || I.Pattern;\n\t\t}\n\t}\n\tstyles[stag.ID] = stag;\n}\n\n/* TODO: there must exist some form of OSP-blessed spec */\nfunction parse_xlml_data(xml, ss, data, cell, base, styles, csty, row, arrayf, o) {\n\tvar nf = \"General\", sid = cell.StyleID, S = {}; o = o || {};\n\tvar interiors = [];\n\tvar i = 0;\n\tif(sid === undefined && row) sid = row.StyleID;\n\tif(sid === undefined && csty) sid = csty.StyleID;\n\twhile(styles[sid] !== undefined) {\n\t\tif(styles[sid].nf) nf = styles[sid].nf;\n\t\tif(styles[sid].Interior) interiors.push(styles[sid].Interior);\n\t\tif(!styles[sid].Parent) break;\n\t\tsid = styles[sid].Parent;\n\t}\n\tswitch(data.Type) {\n\t\tcase 'Boolean':\n\t\t\tcell.t = 'b';\n\t\t\tcell.v = parsexmlbool(xml);\n\t\t\tbreak;\n\t\tcase 'String':\n\t\t\tcell.t = 's'; cell.r = xlml_fixstr(unescapexml(xml));\n\t\t\tcell.v = (xml.indexOf(\"<\") > -1 ? unescapexml(ss||xml).replace(/<.*?>/g, \"\") : cell.r); // todo: BR etc\n\t\t\tbreak;\n\t\tcase 'DateTime':\n\t\t\tif(xml.slice(-1) != \"Z\") xml += \"Z\";\n\t\t\tcell.v = (parseDate(xml) - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);\n\t\t\tif(cell.v !== cell.v) cell.v = unescapexml(xml);\n\t\t\telse if(cell.v<60) cell.v = cell.v -1;\n\t\t\tif(!nf || nf == \"General\") nf = \"yyyy-mm-dd\";\n\t\t\t/* falls through */\n\t\tcase 'Number':\n\t\t\tif(cell.v === undefined) cell.v=+xml;\n\t\t\tif(!cell.t) cell.t = 'n';\n\t\t\tbreak;\n\t\tcase 'Error': cell.t = 'e'; cell.v = RBErr[xml]; if(o.cellText !== false) cell.w = xml; break;\n\t\tdefault:\n\t\t\tif(xml == \"\" && ss == \"\") { cell.t = 'z'; }\n\t\t\telse { cell.t = 's'; cell.v = xlml_fixstr(ss||xml); }\n\t\t\tbreak;\n\t}\n\tsafe_format_xlml(cell, nf, o);\n\tif(o.cellFormula !== false) {\n\t\tif(cell.Formula) {\n\t\t\tvar fstr = unescapexml(cell.Formula);\n\t\t\t/* strictly speaking, the leading = is required but some writers omit */\n\t\t\tif(fstr.charCodeAt(0) == 61 /* = */) fstr = fstr.slice(1);\n\t\t\tcell.f = rc_to_a1(fstr, base);\n\t\t\tdelete cell.Formula;\n\t\t\tif(cell.ArrayRange == \"RC\") cell.F = rc_to_a1(\"RC:RC\", base);\n\t\t\telse if(cell.ArrayRange) {\n\t\t\t\tcell.F = rc_to_a1(cell.ArrayRange, base);\n\t\t\t\tarrayf.push([safe_decode_range(cell.F), cell.F]);\n\t\t\t}\n\t\t} else {\n\t\t\tfor(i = 0; i < arrayf.length; ++i)\n\t\t\t\tif(base.r >= arrayf[i][0].s.r && base.r <= arrayf[i][0].e.r)\n\t\t\t\t\tif(base.c >= arrayf[i][0].s.c && base.c <= arrayf[i][0].e.c)\n\t\t\t\t\t\tcell.F = arrayf[i][1];\n\t\t}\n\t}\n\tif(o.cellStyles) {\n\t\tinteriors.forEach(function(x) {\n\t\t\tif(!S.patternType && x.patternType) S.patternType = x.patternType;\n\t\t});\n\t\tcell.s = S;\n\t}\n\tif(cell.StyleID !== undefined) cell.ixfe = cell.StyleID;\n}\n\nfunction xlml_clean_comment(comment) {\n\tcomment.t = comment.v || \"\";\n\tcomment.t = comment.t.replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\");\n\tcomment.v = comment.w = comment.ixfe = undefined;\n}\n\nfunction xlml_normalize(d) {\n\tif(has_buf && Buffer.isBuffer(d)) return d.toString('utf8');\n\tif(typeof d === 'string') return d;\n\t/* duktape */\n\tif(typeof Uint8Array !== 'undefined' && d instanceof Uint8Array) return utf8read(a2s(ab2a(d)));\n\tthrow new Error(\"Bad input format: expected Buffer or string\");\n}\n\n/* TODO: Everything */\n/* UOS uses CJK in tags */\nvar xlmlregex = /<(\\/?)([^\\s?>:\\/]+)(?:[\\s?:\\/][^>]*)?>/mg;\n//var xlmlregex = /<(\\/?)([a-z0-9]*:|)(\\w+)[^>]*>/mg;\nfunction parse_xlml_xml(d, _opts) {\n\tvar opts = _opts || {};\n\tmake_ssf(SSF);\n\tvar str = debom(xlml_normalize(d));\n\tif(opts.type == 'binary' || opts.type == 'array' || opts.type == 'base64') {\n\t\tif(typeof cptable !== 'undefined') str = cptable.utils.decode(65001, char_codes(str));\n\t\telse str = utf8read(str);\n\t}\n\tvar opening = str.slice(0, 1024).toLowerCase(), ishtml = false;\n\topening = opening.replace(/\".*?\"/g, \"\");\n\tif((opening.indexOf(\">\") & 1023) > Math.min((opening.indexOf(\",\") & 1023), (opening.indexOf(\";\")&1023))) { var _o = dup(opts); _o.type = \"string\"; return PRN.to_workbook(str, _o); }\n\tif(opening.indexOf(\"= 0) ishtml = true; });\n\tif(ishtml) return HTML_.to_workbook(str, opts);\n\tvar Rn;\n\tvar state = [], tmp;\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar sheets = {}, sheetnames = [], cursheet = (opts.dense ? [] : {}), sheetname = \"\";\n\tvar table = {}, cell = ({}), row = {};// eslint-disable-line no-unused-vars\n\tvar dtag = xlml_parsexmltag(''), didx = 0;\n\tvar c = 0, r = 0;\n\tvar refguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\tvar styles = {}, stag = {};\n\tvar ss = \"\", fidx = 0;\n\tvar merges = [];\n\tvar Props = {}, Custprops = {}, pidx = 0, cp = [];\n\tvar comments = [], comment = ({});\n\tvar cstys = [], csty, seencol = false;\n\tvar arrayf = [];\n\tvar rowinfo = [], rowobj = {}, cc = 0, rr = 0;\n\tvar Workbook = ({ Sheets:[], WBProps:{date1904:false} }), wsprops = {};\n\txlmlregex.lastIndex = 0;\n\tstr = str.replace(//mg,\"\");\n\tvar raw_Rn3 = \"\";\n\twhile((Rn = xlmlregex.exec(str))) switch((Rn[3] = (raw_Rn3 = Rn[3]).toLowerCase())) {\n\t\tcase 'data' /*case 'Data'*/:\n\t\t\tif(raw_Rn3 == \"data\") {\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(state[state.length-1][1]) break;\n\t\t\tif(Rn[1]==='/') parse_xlml_data(str.slice(didx, Rn.index), ss, dtag, state[state.length-1][0]==/*\"Comment\"*/\"comment\"?comment:cell, {c:c,r:r}, styles, cstys[c], row, arrayf, opts);\n\t\t\telse { ss = \"\"; dtag = xlml_parsexmltag(Rn[0]); didx = Rn.index + Rn[0].length; }\n\t\t\tbreak;\n\t\tcase 'cell' /*case 'Cell'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif(comments.length > 0) cell.c = comments;\n\t\t\t\tif((!opts.sheetRows || opts.sheetRows > r) && cell.v !== undefined) {\n\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\tif(!cursheet[r]) cursheet[r] = [];\n\t\t\t\t\t\tcursheet[r][c] = cell;\n\t\t\t\t\t} else cursheet[encode_col(c) + encode_row(r)] = cell;\n\t\t\t\t}\n\t\t\t\tif(cell.HRef) {\n\t\t\t\t\tcell.l = ({Target:unescapexml(cell.HRef)});\n\t\t\t\t\tif(cell.HRefScreenTip) cell.l.Tooltip = cell.HRefScreenTip;\n\t\t\t\t\tdelete cell.HRef; delete cell.HRefScreenTip;\n\t\t\t\t}\n\t\t\t\tif(cell.MergeAcross || cell.MergeDown) {\n\t\t\t\t\tcc = c + (parseInt(cell.MergeAcross,10)|0);\n\t\t\t\t\trr = r + (parseInt(cell.MergeDown,10)|0);\n\t\t\t\t\tmerges.push({s:{c:c,r:r},e:{c:cc,r:rr}});\n\t\t\t\t}\n\t\t\t\tif(!opts.sheetStubs) { if(cell.MergeAcross) c = cc + 1; else ++c; }\n\t\t\t\telse if(cell.MergeAcross || cell.MergeDown) {\nfor(var cma = c; cma <= cc; ++cma) {\n\t\t\t\t\t\tfor(var cmd = r; cmd <= rr; ++cmd) {\n\t\t\t\t\t\t\tif(cma > c || cmd > r) {\n\t\t\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\t\t\tif(!cursheet[cmd]) cursheet[cmd] = [];\n\t\t\t\t\t\t\t\t\tcursheet[cmd][cma] = {t:'z'};\n\t\t\t\t\t\t\t\t} else cursheet[encode_col(cma) + encode_row(cmd)] = {t:'z'};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tc = cc + 1;\n\t\t\t\t}\n\t\t\t\telse ++c;\n\t\t\t} else {\n\t\t\t\tcell = xlml_parsexmltagobj(Rn[0]);\n\t\t\t\tif(cell.Index) c = +cell.Index - 1;\n\t\t\t\tif(c < refguess.s.c) refguess.s.c = c;\n\t\t\t\tif(c > refguess.e.c) refguess.e.c = c;\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") ++c;\n\t\t\t\tcomments = [];\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'row' /*case 'Row'*/:\n\t\t\tif(Rn[1]==='/' || Rn[0].slice(-2) === \"/>\") {\n\t\t\t\tif(r < refguess.s.r) refguess.s.r = r;\n\t\t\t\tif(r > refguess.e.r) refguess.e.r = r;\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") {\n\t\t\t\t\trow = xlml_parsexmltag(Rn[0]);\n\t\t\t\t\tif(row.Index) r = +row.Index - 1;\n\t\t\t\t}\n\t\t\t\tc = 0; ++r;\n\t\t\t} else {\n\t\t\t\trow = xlml_parsexmltag(Rn[0]);\n\t\t\t\tif(row.Index) r = +row.Index - 1;\n\t\t\t\trowobj = {};\n\t\t\t\tif(row.AutoFitHeight == \"0\" || row.Height) {\n\t\t\t\t\trowobj.hpx = parseInt(row.Height, 10); rowobj.hpt = px2pt(rowobj.hpx);\n\t\t\t\t\trowinfo[r] = rowobj;\n\t\t\t\t}\n\t\t\t\tif(row.Hidden == \"1\") { rowobj.hidden = true; rowinfo[r] = rowobj; }\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'worksheet' /*case 'Worksheet'*/: /* TODO: read range from FullRows/FullColumns */\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t\tsheetnames.push(sheetname);\n\t\t\t\tif(refguess.s.r <= refguess.e.r && refguess.s.c <= refguess.e.c) {\n\t\t\t\t\tcursheet[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\tif(opts.sheetRows && opts.sheetRows <= refguess.e.r) {\n\t\t\t\t\t\tcursheet[\"!fullref\"] = cursheet[\"!ref\"];\n\t\t\t\t\t\trefguess.e.r = opts.sheetRows - 1;\n\t\t\t\t\t\tcursheet[\"!ref\"] = encode_range(refguess);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(merges.length) cursheet[\"!merges\"] = merges;\n\t\t\t\tif(cstys.length > 0) cursheet[\"!cols\"] = cstys;\n\t\t\t\tif(rowinfo.length > 0) cursheet[\"!rows\"] = rowinfo;\n\t\t\t\tsheets[sheetname] = cursheet;\n\t\t\t} else {\n\t\t\t\trefguess = {s: {r:2000000, c:2000000}, e: {r:0, c:0} };\n\t\t\t\tr = c = 0;\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\ttmp = xlml_parsexmltag(Rn[0]);\n\t\t\t\tsheetname = unescapexml(tmp.Name);\n\t\t\t\tcursheet = (opts.dense ? [] : {});\n\t\t\t\tmerges = [];\n\t\t\t\tarrayf = [];\n\t\t\t\trowinfo = [];\n\t\t\t\twsprops = {name:sheetname, Hidden:0};\n\t\t\t\tWorkbook.Sheets.push(wsprops);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'table' /*case 'Table'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].slice(-2) == \"/>\") break;\n\t\t\telse {\n\t\t\t\ttable = xlml_parsexmltag(Rn[0]);\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\tcstys = []; seencol = false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'style' /*case 'Style'*/:\n\t\t\tif(Rn[1]==='/') process_style_xlml(styles, stag, opts);\n\t\t\telse stag = xlml_parsexmltag(Rn[0]);\n\t\t\tbreak;\n\n\t\tcase 'numberformat' /*case 'NumberFormat'*/:\n\t\t\tstag.nf = unescapexml(xlml_parsexmltag(Rn[0]).Format || \"General\");\n\t\t\tif(XLMLFormatMap[stag.nf]) stag.nf = XLMLFormatMap[stag.nf];\n\t\t\tfor(var ssfidx = 0; ssfidx != 0x188; ++ssfidx) if(SSF._table[ssfidx] == stag.nf) break;\n\t\t\tif(ssfidx == 0x188) for(ssfidx = 0x39; ssfidx != 0x188; ++ssfidx) if(SSF._table[ssfidx] == null) { SSF.load(stag.nf, ssfidx); break; }\n\t\t\tbreak;\n\n\t\tcase 'column' /*case 'Column'*/:\n\t\t\tif(state[state.length-1][0] !== /*'Table'*/'table') break;\n\t\t\tcsty = xlml_parsexmltag(Rn[0]);\n\t\t\tif(csty.Hidden) { csty.hidden = true; delete csty.Hidden; }\n\t\t\tif(csty.Width) csty.wpx = parseInt(csty.Width, 10);\n\t\t\tif(!seencol && csty.wpx > 10) {\n\t\t\t\tseencol = true; MDW = DEF_MDW; //find_mdw_wpx(csty.wpx);\n\t\t\t\tfor(var _col = 0; _col < cstys.length; ++_col) if(cstys[_col]) process_col(cstys[_col]);\n\t\t\t}\n\t\t\tif(seencol) process_col(csty);\n\t\t\tcstys[(csty.Index-1||cstys.length)] = csty;\n\t\t\tfor(var i = 0; i < +csty.Span; ++i) cstys[cstys.length] = dup(csty);\n\t\t\tbreak;\n\n\t\tcase 'namedrange' /*case 'NamedRange'*/:\n\t\t\tif(Rn[1]==='/') break;\n\t\t\tif(!Workbook.Names) Workbook.Names = [];\n\t\t\tvar _NamedRange = parsexmltag(Rn[0]);\n\t\t\tvar _DefinedName = ({\n\t\t\t\tName: _NamedRange.Name,\n\t\t\t\tRef: rc_to_a1(_NamedRange.RefersTo.slice(1), {r:0, c:0})\n\t\t\t});\n\t\t\tif(Workbook.Sheets.length>0) _DefinedName.Sheet=Workbook.Sheets.length-1;\nWorkbook.Names.push(_DefinedName);\n\t\t\tbreak;\n\n\t\tcase 'namedcell' /*case 'NamedCell'*/: break;\n\t\tcase 'b' /*case 'B'*/: break;\n\t\tcase 'i' /*case 'I'*/: break;\n\t\tcase 'u' /*case 'U'*/: break;\n\t\tcase 's' /*case 'S'*/: break;\n\t\tcase 'em' /*case 'EM'*/: break;\n\t\tcase 'h2' /*case 'H2'*/: break;\n\t\tcase 'h3' /*case 'H3'*/: break;\n\t\tcase 'sub' /*case 'Sub'*/: break;\n\t\tcase 'sup' /*case 'Sup'*/: break;\n\t\tcase 'span' /*case 'Span'*/: break;\n\t\tcase 'alignment' /*case 'Alignment'*/:\n\t\t\tbreak;\n\t\tcase 'borders' /*case 'Borders'*/: break;\n\t\tcase 'border' /*case 'Border'*/: break;\n\t\tcase 'font' /*case 'Font'*/:\n\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\telse if(Rn[1]===\"/\") ss += str.slice(fidx, Rn.index);\n\t\t\telse fidx = Rn.index + Rn[0].length;\n\t\t\tbreak;\n\t\tcase 'interior' /*case 'Interior'*/:\n\t\t\tif(!opts.cellStyles) break;\n\t\t\tstag.Interior = xlml_parsexmltag(Rn[0]);\n\t\t\tbreak;\n\t\tcase 'protection' /*case 'Protection'*/: break;\n\n\t\tcase 'author' /*case 'Author'*/:\n\t\tcase 'title' /*case 'Title'*/:\n\t\tcase 'description' /*case 'Description'*/:\n\t\tcase 'created' /*case 'Created'*/:\n\t\tcase 'keywords' /*case 'Keywords'*/:\n\t\tcase 'subject' /*case 'Subject'*/:\n\t\tcase 'category' /*case 'Category'*/:\n\t\tcase 'company' /*case 'Company'*/:\n\t\tcase 'lastauthor' /*case 'LastAuthor'*/:\n\t\tcase 'lastsaved' /*case 'LastSaved'*/:\n\t\tcase 'lastprinted' /*case 'LastPrinted'*/:\n\t\tcase 'version' /*case 'Version'*/:\n\t\tcase 'revision' /*case 'Revision'*/:\n\t\tcase 'totaltime' /*case 'TotalTime'*/:\n\t\tcase 'hyperlinkbase' /*case 'HyperlinkBase'*/:\n\t\tcase 'manager' /*case 'Manager'*/:\n\t\tcase 'contentstatus' /*case 'ContentStatus'*/:\n\t\tcase 'identifier' /*case 'Identifier'*/:\n\t\tcase 'language' /*case 'Language'*/:\n\t\tcase 'appname' /*case 'AppName'*/:\n\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\telse if(Rn[1]===\"/\") xlml_set_prop(Props, raw_Rn3, str.slice(pidx, Rn.index));\n\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\tbreak;\n\t\tcase 'paragraphs' /*case 'Paragraphs'*/: break;\n\n\t\tcase 'styles' /*case 'Styles'*/:\n\t\tcase 'workbook' /*case 'Workbook'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse state.push([Rn[3], false]);\n\t\t\tbreak;\n\n\t\tcase 'comment' /*case 'Comment'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t\txlml_clean_comment(comment);\n\t\t\t\tcomments.push(comment);\n\t\t\t} else {\n\t\t\t\tstate.push([Rn[3], false]);\n\t\t\t\ttmp = xlml_parsexmltag(Rn[0]);\n\t\t\t\tcomment = ({a:tmp.Author});\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'autofilter' /*case 'AutoFilter'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\tvar AutoFilter = xlml_parsexmltag(Rn[0]);\n\t\t\t\tcursheet['!autofilter'] = { ref:rc_to_a1(AutoFilter.Range).replace(/\\$/g,\"\") };\n\t\t\t\tstate.push([Rn[3], true]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'name' /*case 'Name'*/: break;\n\n\t\tcase 'datavalidation' /*case 'DataValidation'*/:\n\t\t\tif(Rn[1]==='/'){\n\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));\n\t\t\t} else {\n\t\t\t\tif(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'pixelsperinch' /*case 'PixelsPerInch'*/:\n\t\t\tbreak;\n\t\tcase 'componentoptions' /*case 'ComponentOptions'*/:\n\t\tcase 'documentproperties' /*case 'DocumentProperties'*/:\n\t\tcase 'customdocumentproperties' /*case 'CustomDocumentProperties'*/:\n\t\tcase 'officedocumentsettings' /*case 'OfficeDocumentSettings'*/:\n\t\tcase 'pivottable' /*case 'PivotTable'*/:\n\t\tcase 'pivotcache' /*case 'PivotCache'*/:\n\t\tcase 'names' /*case 'Names'*/:\n\t\tcase 'mapinfo' /*case 'MapInfo'*/:\n\t\tcase 'pagebreaks' /*case 'PageBreaks'*/:\n\t\tcase 'querytable' /*case 'QueryTable'*/:\n\t\tcase 'sorting' /*case 'Sorting'*/:\n\t\tcase 'schema' /*case 'Schema'*/: //case 'data' /*case 'data'*/:\n\t\tcase 'conditionalformatting' /*case 'ConditionalFormatting'*/:\n\t\tcase 'smarttagtype' /*case 'SmartTagType'*/:\n\t\tcase 'smarttags' /*case 'SmartTags'*/:\n\t\tcase 'excelworkbook' /*case 'ExcelWorkbook'*/:\n\t\tcase 'workbookoptions' /*case 'WorkbookOptions'*/:\n\t\tcase 'worksheetoptions' /*case 'WorksheetOptions'*/:\n\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw new Error(\"Bad state: \"+tmp.join(\"|\"));}\n\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\tbreak;\n\n\t\tcase 'null' /*case 'Null'*/: break;\n\n\t\tdefault:\n\t\t\t/* FODS file root is */\n\t\t\tif(state.length == 0 && Rn[3] == \"document\") return parse_fods(str, opts);\n\t\t\t/* UOS file root is */\n\t\t\tif(state.length == 0 && Rn[3] == \"uof\"/*\"UOF\"*/) return parse_fods(str, opts);\n\n\t\t\tvar seen = true;\n\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t/* OfficeDocumentSettings */\n\t\t\t\tcase 'officedocumentsettings' /*case 'OfficeDocumentSettings'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'allowpng' /*case 'AllowPNG'*/: break;\n\t\t\t\t\tcase 'removepersonalinformation' /*case 'RemovePersonalInformation'*/: break;\n\t\t\t\t\tcase 'downloadcomponents' /*case 'DownloadComponents'*/: break;\n\t\t\t\t\tcase 'locationofcomponents' /*case 'LocationOfComponents'*/: break;\n\t\t\t\t\tcase 'colors' /*case 'Colors'*/: break;\n\t\t\t\t\tcase 'color' /*case 'Color'*/: break;\n\t\t\t\t\tcase 'index' /*case 'Index'*/: break;\n\t\t\t\t\tcase 'rgb' /*case 'RGB'*/: break;\n\t\t\t\t\tcase 'targetscreensize' /*case 'TargetScreenSize'*/: break;\n\t\t\t\t\tcase 'readonlyrecommended' /*case 'ReadOnlyRecommended'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* ComponentOptions */\n\t\t\t\tcase 'componentoptions' /*case 'ComponentOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'toolbar' /*case 'Toolbar'*/: break;\n\t\t\t\t\tcase 'hideofficelogo' /*case 'HideOfficeLogo'*/: break;\n\t\t\t\t\tcase 'spreadsheetautofit' /*case 'SpreadsheetAutoFit'*/: break;\n\t\t\t\t\tcase 'label' /*case 'Label'*/: break;\n\t\t\t\t\tcase 'caption' /*case 'Caption'*/: break;\n\t\t\t\t\tcase 'maxheight' /*case 'MaxHeight'*/: break;\n\t\t\t\t\tcase 'maxwidth' /*case 'MaxWidth'*/: break;\n\t\t\t\t\tcase 'nextsheetnumber' /*case 'NextSheetNumber'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* ExcelWorkbook */\n\t\t\t\tcase 'excelworkbook' /*case 'ExcelWorkbook'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'date1904' /*case 'Date1904'*/:\nWorkbook.WBProps.date1904 = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'windowheight' /*case 'WindowHeight'*/: break;\n\t\t\t\t\tcase 'windowwidth' /*case 'WindowWidth'*/: break;\n\t\t\t\t\tcase 'windowtopx' /*case 'WindowTopX'*/: break;\n\t\t\t\t\tcase 'windowtopy' /*case 'WindowTopY'*/: break;\n\t\t\t\t\tcase 'tabratio' /*case 'TabRatio'*/: break;\n\t\t\t\t\tcase 'protectstructure' /*case 'ProtectStructure'*/: break;\n\t\t\t\t\tcase 'protectwindow' /*case 'ProtectWindow'*/: break;\n\t\t\t\t\tcase 'protectwindows' /*case 'ProtectWindows'*/: break;\n\t\t\t\t\tcase 'activesheet' /*case 'ActiveSheet'*/: break;\n\t\t\t\t\tcase 'displayinknotes' /*case 'DisplayInkNotes'*/: break;\n\t\t\t\t\tcase 'firstvisiblesheet' /*case 'FirstVisibleSheet'*/: break;\n\t\t\t\t\tcase 'supbook' /*case 'SupBook'*/: break;\n\t\t\t\t\tcase 'sheetname' /*case 'SheetName'*/: break;\n\t\t\t\t\tcase 'sheetindex' /*case 'SheetIndex'*/: break;\n\t\t\t\t\tcase 'sheetindexfirst' /*case 'SheetIndexFirst'*/: break;\n\t\t\t\t\tcase 'sheetindexlast' /*case 'SheetIndexLast'*/: break;\n\t\t\t\t\tcase 'dll' /*case 'Dll'*/: break;\n\t\t\t\t\tcase 'acceptlabelsinformulas' /*case 'AcceptLabelsInFormulas'*/: break;\n\t\t\t\t\tcase 'donotsavelinkvalues' /*case 'DoNotSaveLinkValues'*/: break;\n\t\t\t\t\tcase 'iteration' /*case 'Iteration'*/: break;\n\t\t\t\t\tcase 'maxiterations' /*case 'MaxIterations'*/: break;\n\t\t\t\t\tcase 'maxchange' /*case 'MaxChange'*/: break;\n\t\t\t\t\tcase 'path' /*case 'Path'*/: break;\n\t\t\t\t\tcase 'xct' /*case 'Xct'*/: break;\n\t\t\t\t\tcase 'count' /*case 'Count'*/: break;\n\t\t\t\t\tcase 'selectedsheets' /*case 'SelectedSheets'*/: break;\n\t\t\t\t\tcase 'calculation' /*case 'Calculation'*/: break;\n\t\t\t\t\tcase 'uncalced' /*case 'Uncalced'*/: break;\n\t\t\t\t\tcase 'startupprompt' /*case 'StartupPrompt'*/: break;\n\t\t\t\t\tcase 'crn' /*case 'Crn'*/: break;\n\t\t\t\t\tcase 'externname' /*case 'ExternName'*/: break;\n\t\t\t\t\tcase 'formula' /*case 'Formula'*/: break;\n\t\t\t\t\tcase 'colfirst' /*case 'ColFirst'*/: break;\n\t\t\t\t\tcase 'collast' /*case 'ColLast'*/: break;\n\t\t\t\t\tcase 'wantadvise' /*case 'WantAdvise'*/: break;\n\t\t\t\t\tcase 'boolean' /*case 'Boolean'*/: break;\n\t\t\t\t\tcase 'error' /*case 'Error'*/: break;\n\t\t\t\t\tcase 'text' /*case 'Text'*/: break;\n\t\t\t\t\tcase 'ole' /*case 'OLE'*/: break;\n\t\t\t\t\tcase 'noautorecover' /*case 'NoAutoRecover'*/: break;\n\t\t\t\t\tcase 'publishobjects' /*case 'PublishObjects'*/: break;\n\t\t\t\t\tcase 'donotcalculatebeforesave' /*case 'DoNotCalculateBeforeSave'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'refmoder1c1' /*case 'RefModeR1C1'*/: break;\n\t\t\t\t\tcase 'embedsavesmarttags' /*case 'EmbedSaveSmartTags'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* WorkbookOptions */\n\t\t\t\tcase 'workbookoptions' /*case 'WorkbookOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'owcversion' /*case 'OWCVersion'*/: break;\n\t\t\t\t\tcase 'height' /*case 'Height'*/: break;\n\t\t\t\t\tcase 'width' /*case 'Width'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* WorksheetOptions */\n\t\t\t\tcase 'worksheetoptions' /*case 'WorksheetOptions'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'visible' /*case 'Visible'*/:\n\t\t\t\t\t\tif(Rn[0].slice(-2) === \"/>\"){/* empty */}\n\t\t\t\t\t\telse if(Rn[1]===\"/\") switch(str.slice(pidx, Rn.index)) {\n\t\t\t\t\t\t\tcase \"SheetHidden\": wsprops.Hidden = 1; break;\n\t\t\t\t\t\t\tcase \"SheetVeryHidden\": wsprops.Hidden = 2; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'header' /*case 'Header'*/:\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={}, 'xlml');\n\t\t\t\t\t\tcursheet['!margins'].header = parsexmltag(Rn[0]).Margin;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'footer' /*case 'Footer'*/:\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={}, 'xlml');\n\t\t\t\t\t\tcursheet['!margins'].footer = parsexmltag(Rn[0]).Margin;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'pagemargins' /*case 'PageMargins'*/:\n\t\t\t\t\t\tvar pagemargins = parsexmltag(Rn[0]);\n\t\t\t\t\t\tif(!cursheet['!margins']) default_margins(cursheet['!margins']={},'xlml');\n\t\t\t\t\t\tif(pagemargins.Top) cursheet['!margins'].top = pagemargins.Top;\n\t\t\t\t\t\tif(pagemargins.Left) cursheet['!margins'].left = pagemargins.Left;\n\t\t\t\t\t\tif(pagemargins.Right) cursheet['!margins'].right = pagemargins.Right;\n\t\t\t\t\t\tif(pagemargins.Bottom) cursheet['!margins'].bottom = pagemargins.Bottom;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'displayrighttoleft' /*case 'DisplayRightToLeft'*/:\n\t\t\t\t\t\tif(!Workbook.Views) Workbook.Views = [];\n\t\t\t\t\t\tif(!Workbook.Views[0]) Workbook.Views[0] = {};\n\t\t\t\t\t\tWorkbook.Views[0].RTL = true;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'freezepanes' /*case 'FreezePanes'*/: break;\n\t\t\t\t\tcase 'frozennosplit' /*case 'FrozenNoSplit'*/: break;\n\n\t\t\t\t\tcase 'splithorizontal' /*case 'SplitHorizontal'*/:\n\t\t\t\t\tcase 'splitvertical' /*case 'SplitVertical'*/:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'donotdisplaygridlines' /*case 'DoNotDisplayGridlines'*/:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'activerow' /*case 'ActiveRow'*/: break;\n\t\t\t\t\tcase 'activecol' /*case 'ActiveCol'*/: break;\n\t\t\t\t\tcase 'toprowbottompane' /*case 'TopRowBottomPane'*/: break;\n\t\t\t\t\tcase 'leftcolumnrightpane' /*case 'LeftColumnRightPane'*/: break;\n\n\t\t\t\t\tcase 'unsynced' /*case 'Unsynced'*/: break;\n\t\t\t\t\tcase 'print' /*case 'Print'*/: break;\n\t\t\t\t\tcase 'printerrors' /*case 'PrintErrors'*/: break;\n\t\t\t\t\tcase 'panes' /*case 'Panes'*/: break;\n\t\t\t\t\tcase 'scale' /*case 'Scale'*/: break;\n\t\t\t\t\tcase 'pane' /*case 'Pane'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'layout' /*case 'Layout'*/: break;\n\t\t\t\t\tcase 'pagesetup' /*case 'PageSetup'*/: break;\n\t\t\t\t\tcase 'selected' /*case 'Selected'*/: break;\n\t\t\t\t\tcase 'protectobjects' /*case 'ProtectObjects'*/: break;\n\t\t\t\t\tcase 'enableselection' /*case 'EnableSelection'*/: break;\n\t\t\t\t\tcase 'protectscenarios' /*case 'ProtectScenarios'*/: break;\n\t\t\t\t\tcase 'validprinterinfo' /*case 'ValidPrinterInfo'*/: break;\n\t\t\t\t\tcase 'horizontalresolution' /*case 'HorizontalResolution'*/: break;\n\t\t\t\t\tcase 'verticalresolution' /*case 'VerticalResolution'*/: break;\n\t\t\t\t\tcase 'numberofcopies' /*case 'NumberofCopies'*/: break;\n\t\t\t\t\tcase 'activepane' /*case 'ActivePane'*/: break;\n\t\t\t\t\tcase 'toprowvisible' /*case 'TopRowVisible'*/: break;\n\t\t\t\t\tcase 'leftcolumnvisible' /*case 'LeftColumnVisible'*/: break;\n\t\t\t\t\tcase 'fittopage' /*case 'FitToPage'*/: break;\n\t\t\t\t\tcase 'rangeselection' /*case 'RangeSelection'*/: break;\n\t\t\t\t\tcase 'papersizeindex' /*case 'PaperSizeIndex'*/: break;\n\t\t\t\t\tcase 'pagelayoutzoom' /*case 'PageLayoutZoom'*/: break;\n\t\t\t\t\tcase 'pagebreakzoom' /*case 'PageBreakZoom'*/: break;\n\t\t\t\t\tcase 'filteron' /*case 'FilterOn'*/: break;\n\t\t\t\t\tcase 'fitwidth' /*case 'FitWidth'*/: break;\n\t\t\t\t\tcase 'fitheight' /*case 'FitHeight'*/: break;\n\t\t\t\t\tcase 'commentslayout' /*case 'CommentsLayout'*/: break;\n\t\t\t\t\tcase 'zoom' /*case 'Zoom'*/: break;\n\t\t\t\t\tcase 'lefttoright' /*case 'LeftToRight'*/: break;\n\t\t\t\t\tcase 'gridlines' /*case 'Gridlines'*/: break;\n\t\t\t\t\tcase 'allowsort' /*case 'AllowSort'*/: break;\n\t\t\t\t\tcase 'allowfilter' /*case 'AllowFilter'*/: break;\n\t\t\t\t\tcase 'allowinsertrows' /*case 'AllowInsertRows'*/: break;\n\t\t\t\t\tcase 'allowdeleterows' /*case 'AllowDeleteRows'*/: break;\n\t\t\t\t\tcase 'allowinsertcols' /*case 'AllowInsertCols'*/: break;\n\t\t\t\t\tcase 'allowdeletecols' /*case 'AllowDeleteCols'*/: break;\n\t\t\t\t\tcase 'allowinserthyperlinks' /*case 'AllowInsertHyperlinks'*/: break;\n\t\t\t\t\tcase 'allowformatcells' /*case 'AllowFormatCells'*/: break;\n\t\t\t\t\tcase 'allowsizecols' /*case 'AllowSizeCols'*/: break;\n\t\t\t\t\tcase 'allowsizerows' /*case 'AllowSizeRows'*/: break;\n\t\t\t\t\tcase 'nosummaryrowsbelowdetail' /*case 'NoSummaryRowsBelowDetail'*/:\n\t\t\t\t\t\tif(!cursheet[\"!outline\"]) cursheet[\"!outline\"] = {};\n\t\t\t\t\t\tcursheet[\"!outline\"].above = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tabcolorindex' /*case 'TabColorIndex'*/: break;\n\t\t\t\t\tcase 'donotdisplayheadings' /*case 'DoNotDisplayHeadings'*/: break;\n\t\t\t\t\tcase 'showpagelayoutzoom' /*case 'ShowPageLayoutZoom'*/: break;\n\t\t\t\t\tcase 'nosummarycolumnsrightdetail' /*case 'NoSummaryColumnsRightDetail'*/:\n\t\t\t\t\t\tif(!cursheet[\"!outline\"]) cursheet[\"!outline\"] = {};\n\t\t\t\t\t\tcursheet[\"!outline\"].left = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blackandwhite' /*case 'BlackAndWhite'*/: break;\n\t\t\t\t\tcase 'donotdisplayzeros' /*case 'DoNotDisplayZeros'*/: break;\n\t\t\t\t\tcase 'displaypagebreak' /*case 'DisplayPageBreak'*/: break;\n\t\t\t\t\tcase 'rowcolheadings' /*case 'RowColHeadings'*/: break;\n\t\t\t\t\tcase 'donotdisplayoutline' /*case 'DoNotDisplayOutline'*/: break;\n\t\t\t\t\tcase 'noorientation' /*case 'NoOrientation'*/: break;\n\t\t\t\t\tcase 'allowusepivottables' /*case 'AllowUsePivotTables'*/: break;\n\t\t\t\t\tcase 'zeroheight' /*case 'ZeroHeight'*/: break;\n\t\t\t\t\tcase 'viewablerange' /*case 'ViewableRange'*/: break;\n\t\t\t\t\tcase 'selection' /*case 'Selection'*/: break;\n\t\t\t\t\tcase 'protectcontents' /*case 'ProtectContents'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* PivotTable */\n\t\t\t\tcase 'pivottable' /*case 'PivotTable'*/: case 'pivotcache' /*case 'PivotCache'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'immediateitemsondrop' /*case 'ImmediateItemsOnDrop'*/: break;\n\t\t\t\t\tcase 'showpagemultipleitemlabel' /*case 'ShowPageMultipleItemLabel'*/: break;\n\t\t\t\t\tcase 'compactrowindent' /*case 'CompactRowIndent'*/: break;\n\t\t\t\t\tcase 'location' /*case 'Location'*/: break;\n\t\t\t\t\tcase 'pivotfield' /*case 'PivotField'*/: break;\n\t\t\t\t\tcase 'orientation' /*case 'Orientation'*/: break;\n\t\t\t\t\tcase 'layoutform' /*case 'LayoutForm'*/: break;\n\t\t\t\t\tcase 'layoutsubtotallocation' /*case 'LayoutSubtotalLocation'*/: break;\n\t\t\t\t\tcase 'layoutcompactrow' /*case 'LayoutCompactRow'*/: break;\n\t\t\t\t\tcase 'position' /*case 'Position'*/: break;\n\t\t\t\t\tcase 'pivotitem' /*case 'PivotItem'*/: break;\n\t\t\t\t\tcase 'datatype' /*case 'DataType'*/: break;\n\t\t\t\t\tcase 'datafield' /*case 'DataField'*/: break;\n\t\t\t\t\tcase 'sourcename' /*case 'SourceName'*/: break;\n\t\t\t\t\tcase 'parentfield' /*case 'ParentField'*/: break;\n\t\t\t\t\tcase 'ptlineitems' /*case 'PTLineItems'*/: break;\n\t\t\t\t\tcase 'ptlineitem' /*case 'PTLineItem'*/: break;\n\t\t\t\t\tcase 'countofsameitems' /*case 'CountOfSameItems'*/: break;\n\t\t\t\t\tcase 'item' /*case 'Item'*/: break;\n\t\t\t\t\tcase 'itemtype' /*case 'ItemType'*/: break;\n\t\t\t\t\tcase 'ptsource' /*case 'PTSource'*/: break;\n\t\t\t\t\tcase 'cacheindex' /*case 'CacheIndex'*/: break;\n\t\t\t\t\tcase 'consolidationreference' /*case 'ConsolidationReference'*/: break;\n\t\t\t\t\tcase 'filename' /*case 'FileName'*/: break;\n\t\t\t\t\tcase 'reference' /*case 'Reference'*/: break;\n\t\t\t\t\tcase 'nocolumngrand' /*case 'NoColumnGrand'*/: break;\n\t\t\t\t\tcase 'norowgrand' /*case 'NoRowGrand'*/: break;\n\t\t\t\t\tcase 'blanklineafteritems' /*case 'BlankLineAfterItems'*/: break;\n\t\t\t\t\tcase 'hidden' /*case 'Hidden'*/: break;\n\t\t\t\t\tcase 'subtotal' /*case 'Subtotal'*/: break;\n\t\t\t\t\tcase 'basefield' /*case 'BaseField'*/: break;\n\t\t\t\t\tcase 'mapchilditems' /*case 'MapChildItems'*/: break;\n\t\t\t\t\tcase 'function' /*case 'Function'*/: break;\n\t\t\t\t\tcase 'refreshonfileopen' /*case 'RefreshOnFileOpen'*/: break;\n\t\t\t\t\tcase 'printsettitles' /*case 'PrintSetTitles'*/: break;\n\t\t\t\t\tcase 'mergelabels' /*case 'MergeLabels'*/: break;\n\t\t\t\t\tcase 'defaultversion' /*case 'DefaultVersion'*/: break;\n\t\t\t\t\tcase 'refreshname' /*case 'RefreshName'*/: break;\n\t\t\t\t\tcase 'refreshdate' /*case 'RefreshDate'*/: break;\n\t\t\t\t\tcase 'refreshdatecopy' /*case 'RefreshDateCopy'*/: break;\n\t\t\t\t\tcase 'versionlastrefresh' /*case 'VersionLastRefresh'*/: break;\n\t\t\t\t\tcase 'versionlastupdate' /*case 'VersionLastUpdate'*/: break;\n\t\t\t\t\tcase 'versionupdateablemin' /*case 'VersionUpdateableMin'*/: break;\n\t\t\t\t\tcase 'versionrefreshablemin' /*case 'VersionRefreshableMin'*/: break;\n\t\t\t\t\tcase 'calculation' /*case 'Calculation'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* PageBreaks */\n\t\t\t\tcase 'pagebreaks' /*case 'PageBreaks'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'colbreaks' /*case 'ColBreaks'*/: break;\n\t\t\t\t\tcase 'colbreak' /*case 'ColBreak'*/: break;\n\t\t\t\t\tcase 'rowbreaks' /*case 'RowBreaks'*/: break;\n\t\t\t\t\tcase 'rowbreak' /*case 'RowBreak'*/: break;\n\t\t\t\t\tcase 'colstart' /*case 'ColStart'*/: break;\n\t\t\t\t\tcase 'colend' /*case 'ColEnd'*/: break;\n\t\t\t\t\tcase 'rowend' /*case 'RowEnd'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* AutoFilter */\n\t\t\t\tcase 'autofilter' /*case 'AutoFilter'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'autofiltercolumn' /*case 'AutoFilterColumn'*/: break;\n\t\t\t\t\tcase 'autofiltercondition' /*case 'AutoFilterCondition'*/: break;\n\t\t\t\t\tcase 'autofilterand' /*case 'AutoFilterAnd'*/: break;\n\t\t\t\t\tcase 'autofilteror' /*case 'AutoFilterOr'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* QueryTable */\n\t\t\t\tcase 'querytable' /*case 'QueryTable'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'id' /*case 'Id'*/: break;\n\t\t\t\t\tcase 'autoformatfont' /*case 'AutoFormatFont'*/: break;\n\t\t\t\t\tcase 'autoformatpattern' /*case 'AutoFormatPattern'*/: break;\n\t\t\t\t\tcase 'querysource' /*case 'QuerySource'*/: break;\n\t\t\t\t\tcase 'querytype' /*case 'QueryType'*/: break;\n\t\t\t\t\tcase 'enableredirections' /*case 'EnableRedirections'*/: break;\n\t\t\t\t\tcase 'refreshedinxl9' /*case 'RefreshedInXl9'*/: break;\n\t\t\t\t\tcase 'urlstring' /*case 'URLString'*/: break;\n\t\t\t\t\tcase 'htmltables' /*case 'HTMLTables'*/: break;\n\t\t\t\t\tcase 'connection' /*case 'Connection'*/: break;\n\t\t\t\t\tcase 'commandtext' /*case 'CommandText'*/: break;\n\t\t\t\t\tcase 'refreshinfo' /*case 'RefreshInfo'*/: break;\n\t\t\t\t\tcase 'notitles' /*case 'NoTitles'*/: break;\n\t\t\t\t\tcase 'nextid' /*case 'NextId'*/: break;\n\t\t\t\t\tcase 'columninfo' /*case 'ColumnInfo'*/: break;\n\t\t\t\t\tcase 'overwritecells' /*case 'OverwriteCells'*/: break;\n\t\t\t\t\tcase 'donotpromptforfile' /*case 'DoNotPromptForFile'*/: break;\n\t\t\t\t\tcase 'textwizardsettings' /*case 'TextWizardSettings'*/: break;\n\t\t\t\t\tcase 'source' /*case 'Source'*/: break;\n\t\t\t\t\tcase 'number' /*case 'Number'*/: break;\n\t\t\t\t\tcase 'decimal' /*case 'Decimal'*/: break;\n\t\t\t\t\tcase 'thousandseparator' /*case 'ThousandSeparator'*/: break;\n\t\t\t\t\tcase 'trailingminusnumbers' /*case 'TrailingMinusNumbers'*/: break;\n\t\t\t\t\tcase 'formatsettings' /*case 'FormatSettings'*/: break;\n\t\t\t\t\tcase 'fieldtype' /*case 'FieldType'*/: break;\n\t\t\t\t\tcase 'delimiters' /*case 'Delimiters'*/: break;\n\t\t\t\t\tcase 'tab' /*case 'Tab'*/: break;\n\t\t\t\t\tcase 'comma' /*case 'Comma'*/: break;\n\t\t\t\t\tcase 'autoformatname' /*case 'AutoFormatName'*/: break;\n\t\t\t\t\tcase 'versionlastedit' /*case 'VersionLastEdit'*/: break;\n\t\t\t\t\tcase 'versionlastrefresh' /*case 'VersionLastRefresh'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\tcase 'datavalidation' /*case 'DataValidation'*/:\n\t\t\t\tswitch(Rn[3]) {\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\n\t\t\t\t\tcase 'type' /*case 'Type'*/: break;\n\t\t\t\t\tcase 'min' /*case 'Min'*/: break;\n\t\t\t\t\tcase 'max' /*case 'Max'*/: break;\n\t\t\t\t\tcase 'sort' /*case 'Sort'*/: break;\n\t\t\t\t\tcase 'descending' /*case 'Descending'*/: break;\n\t\t\t\t\tcase 'order' /*case 'Order'*/: break;\n\t\t\t\t\tcase 'casesensitive' /*case 'CaseSensitive'*/: break;\n\t\t\t\t\tcase 'value' /*case 'Value'*/: break;\n\t\t\t\t\tcase 'errorstyle' /*case 'ErrorStyle'*/: break;\n\t\t\t\t\tcase 'errormessage' /*case 'ErrorMessage'*/: break;\n\t\t\t\t\tcase 'errortitle' /*case 'ErrorTitle'*/: break;\n\t\t\t\t\tcase 'inputmessage' /*case 'InputMessage'*/: break;\n\t\t\t\t\tcase 'inputtitle' /*case 'InputTitle'*/: break;\n\t\t\t\t\tcase 'combohide' /*case 'ComboHide'*/: break;\n\t\t\t\t\tcase 'inputhide' /*case 'InputHide'*/: break;\n\t\t\t\t\tcase 'condition' /*case 'Condition'*/: break;\n\t\t\t\t\tcase 'qualifier' /*case 'Qualifier'*/: break;\n\t\t\t\t\tcase 'useblank' /*case 'UseBlank'*/: break;\n\t\t\t\t\tcase 'value1' /*case 'Value1'*/: break;\n\t\t\t\t\tcase 'value2' /*case 'Value2'*/: break;\n\t\t\t\t\tcase 'format' /*case 'Format'*/: break;\n\n\t\t\t\t\tcase 'cellrangelist' /*case 'CellRangeList'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\tcase 'sorting' /*case 'Sorting'*/:\n\t\t\t\tcase 'conditionalformatting' /*case 'ConditionalFormatting'*/:\n\t\t\t\tswitch(Rn[3]) {\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\t\t\t\t\tcase 'type' /*case 'Type'*/: break;\n\t\t\t\t\tcase 'min' /*case 'Min'*/: break;\n\t\t\t\t\tcase 'max' /*case 'Max'*/: break;\n\t\t\t\t\tcase 'sort' /*case 'Sort'*/: break;\n\t\t\t\t\tcase 'descending' /*case 'Descending'*/: break;\n\t\t\t\t\tcase 'order' /*case 'Order'*/: break;\n\t\t\t\t\tcase 'casesensitive' /*case 'CaseSensitive'*/: break;\n\t\t\t\t\tcase 'value' /*case 'Value'*/: break;\n\t\t\t\t\tcase 'errorstyle' /*case 'ErrorStyle'*/: break;\n\t\t\t\t\tcase 'errormessage' /*case 'ErrorMessage'*/: break;\n\t\t\t\t\tcase 'errortitle' /*case 'ErrorTitle'*/: break;\n\t\t\t\t\tcase 'cellrangelist' /*case 'CellRangeList'*/: break;\n\t\t\t\t\tcase 'inputmessage' /*case 'InputMessage'*/: break;\n\t\t\t\t\tcase 'inputtitle' /*case 'InputTitle'*/: break;\n\t\t\t\t\tcase 'combohide' /*case 'ComboHide'*/: break;\n\t\t\t\t\tcase 'inputhide' /*case 'InputHide'*/: break;\n\t\t\t\t\tcase 'condition' /*case 'Condition'*/: break;\n\t\t\t\t\tcase 'qualifier' /*case 'Qualifier'*/: break;\n\t\t\t\t\tcase 'useblank' /*case 'UseBlank'*/: break;\n\t\t\t\t\tcase 'value1' /*case 'Value1'*/: break;\n\t\t\t\t\tcase 'value2' /*case 'Value2'*/: break;\n\t\t\t\t\tcase 'format' /*case 'Format'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* MapInfo (schema) */\n\t\t\t\tcase 'mapinfo' /*case 'MapInfo'*/: case 'schema' /*case 'Schema'*/: case 'data' /*case 'data'*/: switch(Rn[3]) {\n\t\t\t\t\tcase 'map' /*case 'Map'*/: break;\n\t\t\t\t\tcase 'entry' /*case 'Entry'*/: break;\n\t\t\t\t\tcase 'range' /*case 'Range'*/: break;\n\t\t\t\t\tcase 'xpath' /*case 'XPath'*/: break;\n\t\t\t\t\tcase 'field' /*case 'Field'*/: break;\n\t\t\t\t\tcase 'xsdtype' /*case 'XSDType'*/: break;\n\t\t\t\t\tcase 'filteron' /*case 'FilterOn'*/: break;\n\t\t\t\t\tcase 'aggregate' /*case 'Aggregate'*/: break;\n\t\t\t\t\tcase 'elementtype' /*case 'ElementType'*/: break;\n\t\t\t\t\tcase 'attributetype' /*case 'AttributeType'*/: break;\n\t\t\t\t/* These are from xsd (XML Schema Definition) */\n\t\t\t\t\tcase 'schema' /*case 'schema'*/:\n\t\t\t\t\tcase 'element' /*case 'element'*/:\n\t\t\t\t\tcase 'complextype' /*case 'complexType'*/:\n\t\t\t\t\tcase 'datatype' /*case 'datatype'*/:\n\t\t\t\t\tcase 'all' /*case 'all'*/:\n\t\t\t\t\tcase 'attribute' /*case 'attribute'*/:\n\t\t\t\t\tcase 'extends' /*case 'extends'*/: break;\n\n\t\t\t\t\tcase 'row' /*case 'row'*/: break;\n\t\t\t\t\tdefault: seen = false;\n\t\t\t\t} break;\n\n\t\t\t\t/* SmartTags (can be anything) */\n\t\t\t\tcase 'smarttags' /*case 'SmartTags'*/: break;\n\n\t\t\t\tdefault: seen = false; break;\n\t\t\t}\n\t\t\tif(seen) break;\n\t\t\t/* CustomDocumentProperties */\n\t\t\tif(Rn[3].match(/!\\[CDATA/)) break;\n\t\t\tif(!state[state.length-1][1]) throw 'Unrecognized tag: ' + Rn[3] + \"|\" + state.join(\"|\");\n\t\t\tif(state[state.length-1][0]===/*'CustomDocumentProperties'*/'customdocumentproperties') {\n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\t\telse if(Rn[1]===\"/\") xlml_set_custprop(Custprops, raw_Rn3, cp, str.slice(pidx, Rn.index));\n\t\t\t\telse { cp = Rn; pidx = Rn.index + Rn[0].length; }\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(opts.WTF) throw 'Unrecognized tag: ' + Rn[3] + \"|\" + state.join(\"|\");\n\t}\n\tvar out = ({});\n\tif(!opts.bookSheets && !opts.bookProps) out.Sheets = sheets;\n\tout.SheetNames = sheetnames;\n\tout.Workbook = Workbook;\n\tout.SSF = SSF.get_table();\n\tout.Props = Props;\n\tout.Custprops = Custprops;\n\treturn out;\n}\n\nfunction parse_xlml(data, opts) {\n\tfix_read_opts(opts=opts||{});\n\tswitch(opts.type||\"base64\") {\n\t\tcase \"base64\": return parse_xlml_xml(Base64.decode(data), opts);\n\t\tcase \"binary\": case \"buffer\": case \"file\": return parse_xlml_xml(data, opts);\n\t\tcase \"array\": return parse_xlml_xml(a2s(data), opts);\n\t}\n}\n\n/* TODO */\nfunction write_props_xlml(wb, opts) {\n\tvar o = [];\n\t/* DocumentProperties */\n\tif(wb.Props) o.push(xlml_write_docprops(wb.Props, opts));\n\t/* CustomDocumentProperties */\n\tif(wb.Custprops) o.push(xlml_write_custprops(wb.Props, wb.Custprops, opts));\n\treturn o.join(\"\");\n}\n/* TODO */\nfunction write_wb_xlml() {\n\t/* OfficeDocumentSettings */\n\t/* ExcelWorkbook */\n\treturn \"\";\n}\n/* TODO */\nfunction write_sty_xlml(wb, opts) {\n\t/* Styles */\n\tvar styles = [''];\n\topts.cellXfs.forEach(function(xf, id) {\n\t\tvar payload = [];\n\t\tpayload.push(writextag('NumberFormat', null, {\"ss:Format\": escapexml(SSF._table[xf.numFmtId])}));\n\n\t\tvar o = {\"ss:ID\": \"s\" + (21+id)};\n\t\tstyles.push(writextag('Style', payload.join(\"\"), o));\n\t});\n\treturn writextag(\"Styles\", styles.join(\"\"));\n}\nfunction write_name_xlml(n) { return writextag(\"NamedRange\", null, {\"ss:Name\": n.Name, \"ss:RefersTo\":\"=\" + a1_to_rc(n.Ref, {r:0,c:0})}); }\nfunction write_names_xlml(wb) {\n\tif(!((wb||{}).Workbook||{}).Names) return \"\";\nvar names = wb.Workbook.Names;\n\tvar out = [];\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar n = names[i];\n\t\tif(n.Sheet != null) continue;\n\t\tif(n.Name.match(/^_xlfn\\./)) continue;\n\t\tout.push(write_name_xlml(n));\n\t}\n\treturn writextag(\"Names\", out.join(\"\"));\n}\nfunction write_ws_xlml_names(ws, opts, idx, wb) {\n\tif(!ws) return \"\";\n\tif(!((wb||{}).Workbook||{}).Names) return \"\";\nvar names = wb.Workbook.Names;\n\tvar out = [];\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar n = names[i];\n\t\tif(n.Sheet != idx) continue;\n\t\t/*switch(n.Name) {\n\t\t\tcase \"_\": continue;\n\t\t}*/\n\t\tif(n.Name.match(/^_xlfn\\./)) continue;\n\t\tout.push(write_name_xlml(n));\n\t}\n\treturn out.join(\"\");\n}\n/* WorksheetOptions */\nfunction write_ws_xlml_wsopts(ws, opts, idx, wb) {\n\tif(!ws) return \"\";\n\tvar o = [];\n\t/* NOTE: spec technically allows any order, but stick with implied order */\n\n\t/* FitToPage */\n\t/* DoNotDisplayColHeaders */\n\t/* DoNotDisplayRowHeaders */\n\t/* ViewableRange */\n\t/* Selection */\n\t/* GridlineColor */\n\t/* Name */\n\t/* ExcelWorksheetType */\n\t/* IntlMacro */\n\t/* Unsynced */\n\t/* Selected */\n\t/* CodeName */\n\n\tif(ws['!margins']) {\n\t\to.push(\"\");\n\t\tif(ws['!margins'].header) o.push(writextag(\"Header\", null, {'x:Margin':ws['!margins'].header}));\n\t\tif(ws['!margins'].footer) o.push(writextag(\"Footer\", null, {'x:Margin':ws['!margins'].footer}));\n\t\to.push(writextag(\"PageMargins\", null, {\n\t\t\t'x:Bottom': ws['!margins'].bottom || \"0.75\",\n\t\t\t'x:Left': ws['!margins'].left || \"0.7\",\n\t\t\t'x:Right': ws['!margins'].right || \"0.7\",\n\t\t\t'x:Top': ws['!margins'].top || \"0.75\"\n\t\t}));\n\t\to.push(\"\");\n\t}\n\n\t/* PageSetup */\n\t/* DisplayPageBreak */\n\t/* TransitionExpressionEvaluation */\n\t/* TransitionFormulaEntry */\n\t/* Print */\n\t/* Zoom */\n\t/* PageLayoutZoom */\n\t/* PageBreakZoom */\n\t/* ShowPageBreakZoom */\n\t/* DefaultRowHeight */\n\t/* DefaultColumnWidth */\n\t/* StandardWidth */\n\n\tif(wb && wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx]) {\n\t\t/* Visible */\n\t\tif(wb.Workbook.Sheets[idx].Hidden) o.push(writextag(\"Visible\", (wb.Workbook.Sheets[idx].Hidden == 1 ? \"SheetHidden\" : \"SheetVeryHidden\"), {}));\n\t\telse {\n\t\t\t/* Selected */\n\t\t\tfor(var i = 0; i < idx; ++i) if(wb.Workbook.Sheets[i] && !wb.Workbook.Sheets[i].Hidden) break;\n\t\t\tif(i == idx) o.push(\"\");\n\t\t}\n\t}\n\n\t/* LeftColumnVisible */\n\n\tif(((((wb||{}).Workbook||{}).Views||[])[0]||{}).RTL) o.push(\"\");\n\n\t/* GridlineColorIndex */\n\t/* DisplayFormulas */\n\t/* DoNotDisplayGridlines */\n\t/* DoNotDisplayHeadings */\n\t/* DoNotDisplayOutline */\n\t/* ApplyAutomaticOutlineStyles */\n\t/* NoSummaryRowsBelowDetail */\n\t/* NoSummaryColumnsRightDetail */\n\t/* DoNotDisplayZeros */\n\t/* ActiveRow */\n\t/* ActiveColumn */\n\t/* FilterOn */\n\t/* RangeSelection */\n\t/* TopRowVisible */\n\t/* TopRowBottomPane */\n\t/* LeftColumnRightPane */\n\t/* ActivePane */\n\t/* SplitHorizontal */\n\t/* SplitVertical */\n\t/* FreezePanes */\n\t/* FrozenNoSplit */\n\t/* TabColorIndex */\n\t/* Panes */\n\n\t/* NOTE: Password not supported in XLML Format */\n\tif(ws['!protect']) {\n\t\to.push(writetag(\"ProtectContents\", \"True\"));\n\t\tif(ws['!protect'].objects) o.push(writetag(\"ProtectObjects\", \"True\"));\n\t\tif(ws['!protect'].scenarios) o.push(writetag(\"ProtectScenarios\", \"True\"));\n\t\tif(ws['!protect'].selectLockedCells != null && !ws['!protect'].selectLockedCells) o.push(writetag(\"EnableSelection\", \"NoSelection\"));\n\t\telse if(ws['!protect'].selectUnlockedCells != null && !ws['!protect'].selectUnlockedCells) o.push(writetag(\"EnableSelection\", \"UnlockedCells\"));\n\t[\n\t\t[ \"formatCells\", \"AllowFormatCells\" ],\n\t\t[ \"formatColumns\", \"AllowSizeCols\" ],\n\t\t[ \"formatRows\", \"AllowSizeRows\" ],\n\t\t[ \"insertColumns\", \"AllowInsertCols\" ],\n\t\t[ \"insertRows\", \"AllowInsertRows\" ],\n\t\t[ \"insertHyperlinks\", \"AllowInsertHyperlinks\" ],\n\t\t[ \"deleteColumns\", \"AllowDeleteCols\" ],\n\t\t[ \"deleteRows\", \"AllowDeleteRows\" ],\n\t\t[ \"sort\", \"AllowSort\" ],\n\t\t[ \"autoFilter\", \"AllowFilter\" ],\n\t\t[ \"pivotTables\", \"AllowUsePivotTables\" ]\n\t].forEach(function(x) { if(ws['!protect'][x[0]]) o.push(\"<\"+x[1]+\"/>\"); });\n\t}\n\n\tif(o.length == 0) return \"\";\n\treturn writextag(\"WorksheetOptions\", o.join(\"\"), {xmlns:XLMLNS.x});\n}\nfunction write_ws_xlml_comment(comments) {\n\treturn comments.map(function(c) {\n\t\t// TODO: formatted text\n\t\tvar t = xlml_unfixstr(c.t||\"\");\n\t\tvar d =writextag(\"ss:Data\", t, {\"xmlns\":\"http://www.w3.org/TR/REC-html40\"});\n\t\treturn writextag(\"Comment\", d, {\"ss:Author\":c.a});\n\t}).join(\"\");\n}\nfunction write_ws_xlml_cell(cell, ref, ws, opts, idx, wb, addr){\n\tif(!cell || (cell.v == undefined && cell.f == undefined)) return \"\";\n\n\tvar attr = {};\n\tif(cell.f) attr[\"ss:Formula\"] = \"=\" + escapexml(a1_to_rc(cell.f, addr));\n\tif(cell.F && cell.F.slice(0, ref.length) == ref) {\n\t\tvar end = decode_cell(cell.F.slice(ref.length + 1));\n\t\tattr[\"ss:ArrayRange\"] = \"RC:R\" + (end.r == addr.r ? \"\" : \"[\" + (end.r - addr.r) + \"]\") + \"C\" + (end.c == addr.c ? \"\" : \"[\" + (end.c - addr.c) + \"]\");\n\t}\n\n\tif(cell.l && cell.l.Target) {\n\t\tattr[\"ss:HRef\"] = escapexml(cell.l.Target);\n\t\tif(cell.l.Tooltip) attr[\"x:HRefScreenTip\"] = escapexml(cell.l.Tooltip);\n\t}\n\n\tif(ws['!merges']) {\n\t\tvar marr = ws['!merges'];\n\t\tfor(var mi = 0; mi != marr.length; ++mi) {\n\t\t\tif(marr[mi].s.c != addr.c || marr[mi].s.r != addr.r) continue;\n\t\t\tif(marr[mi].e.c > marr[mi].s.c) attr['ss:MergeAcross'] = marr[mi].e.c - marr[mi].s.c;\n\t\t\tif(marr[mi].e.r > marr[mi].s.r) attr['ss:MergeDown'] = marr[mi].e.r - marr[mi].s.r;\n\t\t}\n\t}\n\n\tvar t = \"\", p = \"\";\n\tswitch(cell.t) {\n\t\tcase 'z': if(!opts.sheetStubs) return \"\"; break;\n\t\tcase 'n': t = 'Number'; p = String(cell.v); break;\n\t\tcase 'b': t = 'Boolean'; p = (cell.v ? \"1\" : \"0\"); break;\n\t\tcase 'e': t = 'Error'; p = BErr[cell.v]; break;\n\t\tcase 'd': t = 'DateTime'; p = new Date(cell.v).toISOString(); if(cell.z == null) cell.z = cell.z || SSF._table[14]; break;\n\t\tcase 's': t = 'String'; p = escapexlml(cell.v||\"\"); break;\n\t}\n\t/* TODO: cell style */\n\tvar os = get_cell_style(opts.cellXfs, cell, opts);\n\tattr[\"ss:StyleID\"] = \"s\" + (21+os);\n\tattr[\"ss:Index\"] = addr.c + 1;\n\tvar _v = (cell.v != null ? p : \"\");\n\tvar m = cell.t == 'z' ? \"\" : ('' + _v + '');\n\n\tif((cell.c||[]).length > 0) m += write_ws_xlml_comment(cell.c);\n\n\treturn writextag(\"Cell\", m, attr);\n}\nfunction write_ws_xlml_row(R, row) {\n\tvar o = '';\n}\n/* TODO */\nfunction write_ws_xlml_table(ws, opts, idx, wb) {\n\tif(!ws['!ref']) return \"\";\n\tvar range = safe_decode_range(ws['!ref']);\n\tvar marr = ws['!merges'] || [], mi = 0;\n\tvar o = [];\n\tif(ws['!cols']) ws['!cols'].forEach(function(n, i) {\n\t\tprocess_col(n);\n\t\tvar w = !!n.width;\n\t\tvar p = col_obj_w(i, n);\n\t\tvar k = {\"ss:Index\":i+1};\n\t\tif(w) k['ss:Width'] = width2px(p.width);\n\t\tif(n.hidden) k['ss:Hidden']=\"1\";\n\t\to.push(writextag(\"Column\",null,k));\n\t});\n\tvar dense = Array.isArray(ws);\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\tvar row = [write_ws_xlml_row(R, (ws['!rows']||[])[R])];\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tvar skip = false;\n\t\t\tfor(mi = 0; mi != marr.length; ++mi) {\n\t\t\t\tif(marr[mi].s.c > C) continue;\n\t\t\t\tif(marr[mi].s.r > R) continue;\n\t\t\t\tif(marr[mi].e.c < C) continue;\n\t\t\t\tif(marr[mi].e.r < R) continue;\n\t\t\t\tif(marr[mi].s.c != C || marr[mi].s.r != R) skip = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(skip) continue;\n\t\t\tvar addr = {r:R,c:C};\n\t\t\tvar ref = encode_cell(addr), cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\trow.push(write_ws_xlml_cell(cell, ref, ws, opts, idx, wb, addr));\n\t\t}\n\t\trow.push(\"
\");\n\t\tif(row.length > 2) o.push(row.join(\"\"));\n\t}\n\treturn o.join(\"\");\n}\nfunction write_ws_xlml(idx, opts, wb) {\n\tvar o = [];\n\tvar s = wb.SheetNames[idx];\n\tvar ws = wb.Sheets[s];\n\n\tvar t = ws ? write_ws_xlml_names(ws, opts, idx, wb) : \"\";\n\tif(t.length > 0) o.push(\"\" + t + \"\");\n\n\t/* Table */\n\tt = ws ? write_ws_xlml_table(ws, opts, idx, wb) : \"\";\n\tif(t.length > 0) o.push(\"\");\n\n\t/* WorksheetOptions */\n\to.push(write_ws_xlml_wsopts(ws, opts, idx, wb));\n\n\treturn o.join(\"\");\n}\nfunction write_xlml(wb, opts) {\n\tif(!opts) opts = {};\n\tif(!wb.SSF) wb.SSF = SSF.get_table();\n\tif(wb.SSF) {\n\t\tmake_ssf(SSF); SSF.load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t\topts.cellXfs = [];\n\t\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\t}\n\tvar d = [];\n\td.push(write_props_xlml(wb, opts));\n\td.push(write_wb_xlml(wb, opts));\n\td.push(\"\");\n\td.push(\"\");\n\tfor(var i = 0; i < wb.SheetNames.length; ++i)\n\t\td.push(writextag(\"Worksheet\", write_ws_xlml(i, opts, wb), {\"ss:Name\":escapexml(wb.SheetNames[i])}));\n\td[2] = write_sty_xlml(wb, opts);\n\td[3] = write_names_xlml(wb, opts);\n\treturn XML_HEADER + writextag(\"Workbook\", d.join(\"\"), {\n\t\t'xmlns': XLMLNS.ss,\n\t\t'xmlns:o': XLMLNS.o,\n\t\t'xmlns:x': XLMLNS.x,\n\t\t'xmlns:ss': XLMLNS.ss,\n\t\t'xmlns:dt': XLMLNS.dt,\n\t\t'xmlns:html': XLMLNS.html\n\t});\n}\n/* [MS-OLEDS] 2.3.8 CompObjStream */\nfunction parse_compobj(obj) {\n\tvar v = {};\n\tvar o = obj.content;\n/* [MS-OLEDS] 2.3.7 CompObjHeader -- All fields MUST be ignored */\n\to.l = 28;\n\n\tv.AnsiUserType = o.read_shift(0, \"lpstr-ansi\");\n\tv.AnsiClipboardFormat = parse_ClipboardFormatOrAnsiString(o);\n\n\tif(o.length - o.l <= 4) return v;\n\n\tvar m = o.read_shift(4);\n\tif(m == 0 || m > 40) return v;\n\to.l-=4; v.Reserved1 = o.read_shift(0, \"lpstr-ansi\");\n\n\tif(o.length - o.l <= 4) return v;\n\tm = o.read_shift(4);\n\tif(m !== 0x71b239f4) return v;\n\tv.UnicodeClipboardFormat = parse_ClipboardFormatOrUnicodeString(o);\n\n\tm = o.read_shift(4);\n\tif(m == 0 || m > 40) return v;\n\to.l-=4; v.Reserved2 = o.read_shift(0, \"lpwstr\");\n}\n\n/*\n\tContinue logic for:\n\t- 2.4.58 Continue\n\t- 2.4.59 ContinueBigName\n\t- 2.4.60 ContinueFrt\n\t- 2.4.61 ContinueFrt11\n\t- 2.4.62 ContinueFrt12\n*/\nfunction slurp(R, blob, length, opts) {\n\tvar l = length;\n\tvar bufs = [];\n\tvar d = blob.slice(blob.l,blob.l+l);\n\tif(opts && opts.enc && opts.enc.insitu && d.length > 0) switch(R.n) {\n\tcase 'BOF': case 'FilePass': case 'FileLock': case 'InterfaceHdr': case 'RRDInfo': case 'RRDHead': case 'UsrExcl': case 'EOF':\n\t\tbreak;\n\tcase 'BoundSheet8':\n\t\tbreak;\n\tdefault:\n\t\topts.enc.insitu(d);\n\t}\n\tbufs.push(d);\n\tblob.l += l;\n\tvar next = (XLSRecordEnum[__readUInt16LE(blob,blob.l)]);\n\tvar start = 0;\n\twhile(next != null && next.n.slice(0,8) === 'Continue') {\n\t\tl = __readUInt16LE(blob,blob.l+2);\n\t\tstart = blob.l + 4;\n\t\tif(next.n == 'ContinueFrt') start += 4;\n\t\telse if(next.n.slice(0,11) == 'ContinueFrt') {\n\t\t\tstart += 12;\n\t\t}\n\t\td = blob.slice(start,blob.l+4+l);\n\t\tbufs.push(d);\n\t\tblob.l += 4+l;\n\t\tnext = (XLSRecordEnum[__readUInt16LE(blob, blob.l)]);\n\t}\n\tvar b = (bconcat(bufs));\n\tprep_blob(b, 0);\n\tvar ll = 0; b.lens = [];\n\tfor(var j = 0; j < bufs.length; ++j) { b.lens.push(ll); ll += bufs[j].length; }\n\tif(b.length < length) throw \"XLS Record \" + (R && R.n || \"??\") + \" Truncated: \" + b.length + \" < \" + length;\n\treturn R.f(b, b.length, opts);\n}\n\nfunction safe_format_xf(p, opts, date1904) {\n\tif(p.t === 'z') return;\n\tif(!p.XF) return;\n\tvar fmtid = 0;\n\ttry {\n\t\tfmtid = p.z || p.XF.numFmtId || 0;\n\t\tif(opts.cellNF) p.z = SSF._table[fmtid];\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(!opts || opts.cellText !== false) try {\n\t\tif(p.t === 'e') { p.w = p.w || BErr[p.v]; }\n\t\telse if(fmtid === 0 || fmtid == \"General\") {\n\t\t\tif(p.t === 'n') {\n\t\t\t\tif((p.v|0) === p.v) p.w = SSF._general_int(p.v);\n\t\t\t\telse p.w = SSF._general_num(p.v);\n\t\t\t}\n\t\t\telse p.w = SSF._general(p.v);\n\t\t}\n\t\telse p.w = SSF.format(fmtid,p.v, {date1904:!!date1904, dateNF: opts && opts.dateNF});\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(opts.cellDates && fmtid && p.t == 'n' && SSF.is_date(SSF._table[fmtid] || String(fmtid))) {\n\t\tvar _d = SSF.parse_date_code(p.v); if(_d) { p.t = 'd'; p.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t}\n}\n\nfunction make_cell(val, ixfe, t) {\n\treturn ({v:val, ixfe:ixfe, t:t});\n}\n\n// 2.3.2\nfunction parse_workbook(blob, options) {\n\tvar wb = ({opts:{}});\n\tvar Sheets = {};\n\tif(DENSE != null && options.dense == null) options.dense = DENSE;\n\tvar out = ((options.dense ? [] : {}));\n\tvar Directory = {};\n\tvar range = ({});\n\tvar last_formula = null;\n\tvar sst = ([]);\n\tvar cur_sheet = \"\";\n\tvar Preamble = {};\n\tvar lastcell, last_cell = \"\", cc, cmnt, rngC, rngR;\n\tvar sharedf = {};\n\tvar arrayf = [];\n\tvar temp_val;\n\tvar country;\n\tvar XFs = []; /* XF records */\n\tvar palette = [];\n\tvar Workbook = ({ Sheets:[], WBProps:{date1904:false}, Views:[{}] }), wsprops = {};\n\tvar get_rgb = function getrgb(icv) {\n\t\tif(icv < 8) return XLSIcv[icv];\n\t\tif(icv < 64) return palette[icv-8] || XLSIcv[icv];\n\t\treturn XLSIcv[icv];\n\t};\n\tvar process_cell_style = function pcs(cell, line, options) {\n\t\tvar xfd = line.XF.data;\n\t\tif(!xfd || !xfd.patternType || !options || !options.cellStyles) return;\n\t\tline.s = ({});\n\t\tline.s.patternType = xfd.patternType;\n\t\tvar t;\n\t\tif((t = rgb2Hex(get_rgb(xfd.icvFore)))) { line.s.fgColor = {rgb:t}; }\n\t\tif((t = rgb2Hex(get_rgb(xfd.icvBack)))) { line.s.bgColor = {rgb:t}; }\n\t};\n\tvar addcell = function addcell(cell, line, options) {\n\t\tif(file_depth > 1) return;\n\t\tif(options.sheetRows && cell.r >= options.sheetRows) return;\n\t\tif(options.cellStyles && line.XF && line.XF.data) process_cell_style(cell, line, options);\n\t\tdelete line.ixfe; delete line.XF;\n\t\tlastcell = cell;\n\t\tlast_cell = encode_cell(cell);\n\t\tif(!range || !range.s || !range.e) range = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\tif(cell.r < range.s.r) range.s.r = cell.r;\n\t\tif(cell.c < range.s.c) range.s.c = cell.c;\n\t\tif(cell.r + 1 > range.e.r) range.e.r = cell.r + 1;\n\t\tif(cell.c + 1 > range.e.c) range.e.c = cell.c + 1;\n\t\tif(options.cellFormula && line.f) {\n\t\t\tfor(var afi = 0; afi < arrayf.length; ++afi) {\n\t\t\t\tif(arrayf[afi][0].s.c > cell.c || arrayf[afi][0].s.r > cell.r) continue;\n\t\t\t\tif(arrayf[afi][0].e.c < cell.c || arrayf[afi][0].e.r < cell.r) continue;\n\t\t\t\tline.F = encode_range(arrayf[afi][0]);\n\t\t\t\tif(arrayf[afi][0].s.c != cell.c || arrayf[afi][0].s.r != cell.r) delete line.f;\n\t\t\t\tif(line.f) line.f = \"\" + stringify_formula(arrayf[afi][1], range, cell, supbooks, opts);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t{\n\t\t\tif(options.dense) {\n\t\t\t\tif(!out[cell.r]) out[cell.r] = [];\n\t\t\t\tout[cell.r][cell.c] = line;\n\t\t\t} else out[last_cell] = line;\n\t\t}\n\t};\n\tvar opts = ({\n\t\tenc: false, // encrypted\n\t\tsbcch: 0, // cch in the preceding SupBook\n\t\tsnames: [], // sheetnames\n\t\tsharedf: sharedf, // shared formulae by address\n\t\tarrayf: arrayf, // array formulae array\n\t\trrtabid: [], // RRTabId\n\t\tlastuser: \"\", // Last User from WriteAccess\n\t\tbiff: 8, // BIFF version\n\t\tcodepage: 0, // CP from CodePage record\n\t\twinlocked: 0, // fLockWn from WinProtect\n\t\tcellStyles: !!options && !!options.cellStyles,\n\t\tWTF: !!options && !!options.wtf\n\t});\n\tif(options.password) opts.password = options.password;\n\tvar themes;\n\tvar merges = [];\n\tvar objects = [];\n\tvar colinfo = [], rowinfo = [];\n\t// eslint-disable-next-line no-unused-vars\n\tvar defwidth = 0, defheight = 0; // twips / MDW respectively\n\tvar seencol = false;\n\tvar supbooks = ([]); // 1-indexed, will hold extern names\n\tsupbooks.SheetNames = opts.snames;\n\tsupbooks.sharedf = opts.sharedf;\n\tsupbooks.arrayf = opts.arrayf;\n\tsupbooks.names = [];\n\tsupbooks.XTI = [];\n\tvar last_Rn = '';\n\tvar file_depth = 0; /* TODO: make a real stack */\n\tvar BIFF2Fmt = 0, BIFF2FmtTable = [];\n\tvar FilterDatabases = []; /* TODO: sort out supbooks and process elsewhere */\n\tvar last_lbl;\n\n\t/* explicit override for some broken writers */\n\topts.codepage = 1200;\n\tset_cp(1200);\n\tvar seen_codepage = false;\n\twhile(blob.l < blob.length - 1) {\n\t\tvar s = blob.l;\n\t\tvar RecordType = blob.read_shift(2);\n\t\tif(RecordType === 0 && last_Rn === 'EOF') break;\n\t\tvar length = (blob.l === blob.length ? 0 : blob.read_shift(2));\n\t\tvar R = XLSRecordEnum[RecordType];\n\t\t//console.log(RecordType.toString(16), RecordType, R, blob.l, length, blob.length);\n\t\t//if(!R) console.log(blob.slice(blob.l, blob.l + length));\n\t\tif(R && R.f) {\n\t\t\tif(options.bookSheets) {\n\t\t\t\tif(last_Rn === 'BoundSheet8' && R.n !== 'BoundSheet8') break;\n\t\t\t}\n\t\t\tlast_Rn = R.n;\n\t\t\tif(R.r === 2 || R.r == 12) {\n\t\t\t\tvar rt = blob.read_shift(2); length -= 2;\n\t\t\t\tif(!opts.enc && rt !== RecordType && (((rt&0xFF)<<8)|(rt>>8)) !== RecordType) throw new Error(\"rt mismatch: \" + rt + \"!=\" + RecordType);\n\t\t\t\tif(R.r == 12){\n\t\t\t\t\tblob.l += 10; length -= 10;\n\t\t\t\t} // skip FRT\n\t\t\t}\n\t\t\t//console.error(R,blob.l,length,blob.length);\n\t\t\tvar val = ({});\n\t\t\tif(R.n === 'EOF') val = R.f(blob, length, opts);\n\t\t\telse val = slurp(R, blob, length, opts);\n\t\t\tvar Rn = R.n;\nif(file_depth == 0 && Rn != 'BOF') continue;\n\t\t\t/* nested switch statements to workaround V8 128 limit */\n\t\t\tswitch(Rn) {\n\t\t\t\t/* Workbook Options */\n\t\t\t\tcase 'Date1904':\nwb.opts.Date1904 = Workbook.WBProps.date1904 = val; break;\n\t\t\t\tcase 'WriteProtect': wb.opts.WriteProtect = true; break;\n\t\t\t\tcase 'FilePass':\n\t\t\t\t\tif(!opts.enc) blob.l = 0;\n\t\t\t\t\topts.enc = val;\n\t\t\t\t\tif(!options.password) throw new Error(\"File is password-protected\");\n\t\t\t\t\tif(val.valid == null) throw new Error(\"Encryption scheme unsupported\");\n\t\t\t\t\tif(!val.valid) throw new Error(\"Password is incorrect\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'WriteAccess': opts.lastuser = val; break;\n\t\t\t\tcase 'FileSharing': break; //TODO\n\t\t\t\tcase 'CodePage':\n\t\t\t\t\tvar cpval = Number(val);\n\t\t\t\t\t/* overrides based on test cases */\n\t\t\t\t\tswitch(cpval) {\n\t\t\t\t\t\tcase 0x5212: cpval = 1200; break;\n\t\t\t\t\t\tcase 0x8000: cpval = 10000; break;\n\t\t\t\t\t\tcase 0x8001: cpval = 1252; break;\n\t\t\t\t\t}\n\t\t\t\t\tset_cp(opts.codepage = cpval);\n\t\t\t\t\tseen_codepage = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'RRTabId': opts.rrtabid = val; break;\n\t\t\t\tcase 'WinProtect': opts.winlocked = val; break;\n\t\t\t\tcase 'Template': break; // TODO\n\t\t\t\tcase 'BookBool': break; // TODO\n\t\t\t\tcase 'UsesELFs': break;\n\t\t\t\tcase 'MTRSettings': break;\n\t\t\t\tcase 'RefreshAll':\n\t\t\t\tcase 'CalcCount':\n\t\t\t\tcase 'CalcDelta':\n\t\t\t\tcase 'CalcIter':\n\t\t\t\tcase 'CalcMode':\n\t\t\t\tcase 'CalcPrecision':\n\t\t\t\tcase 'CalcSaveRecalc':\n\t\t\t\t\twb.opts[Rn] = val; break;\n\t\t\t\tcase 'CalcRefMode': opts.CalcRefMode = val; break; // TODO: implement R1C1\n\t\t\t\tcase 'Uncalced': break;\n\t\t\t\tcase 'ForceFullCalculation': wb.opts.FullCalc = val; break;\n\t\t\t\tcase 'WsBool':\n\t\t\t\t\tif(val.fDialog) out[\"!type\"] = \"dialog\";\n\t\t\t\t\tif(!val.fBelow) (out[\"!outline\"] || (out[\"!outline\"] = {})).above = true;\n\t\t\t\t\tif(!val.fRight) (out[\"!outline\"] || (out[\"!outline\"] = {})).left = true;\n\t\t\t\t\tbreak; // TODO\n\t\t\t\tcase 'XF':\n\t\t\t\t\tXFs.push(val); break;\n\t\t\t\tcase 'ExtSST': break; // TODO\n\t\t\t\tcase 'BookExt': break; // TODO\n\t\t\t\tcase 'RichTextStream': break;\n\t\t\t\tcase 'BkHim': break;\n\n\t\t\t\tcase 'SupBook':\n\t\t\t\t\tsupbooks.push([val]);\n\t\t\t\t\tsupbooks[supbooks.length-1].XTI = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ExternName':\n\t\t\t\t\tsupbooks[supbooks.length-1].push(val);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Index': break; // TODO\n\t\t\t\tcase 'Lbl':\n\t\t\t\t\tlast_lbl = ({\n\t\t\t\t\t\tName: val.Name,\n\t\t\t\t\t\tRef: stringify_formula(val.rgce,range,null,supbooks,opts)\n\t\t\t\t\t});\n\t\t\t\t\tif(val.itab > 0) last_lbl.Sheet = val.itab - 1;\n\t\t\t\t\tsupbooks.names.push(last_lbl);\n\t\t\t\t\tif(!supbooks[0]) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\t\tsupbooks[supbooks.length-1].push(val);\n\t\t\t\t\tif(val.Name == \"_xlnm._FilterDatabase\" && val.itab > 0)\n\t\t\t\t\t\tif(val.rgce && val.rgce[0] && val.rgce[0][0] && val.rgce[0][0][0] == 'PtgArea3d')\n\t\t\t\t\t\t\tFilterDatabases[val.itab - 1] = { ref: encode_range(val.rgce[0][0][1][2]) };\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ExternCount': opts.ExternCount = val; break;\n\t\t\t\tcase 'ExternSheet':\n\t\t\t\t\tif(supbooks.length == 0) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\t\tsupbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val); supbooks.XTI = supbooks.XTI.concat(val); break;\n\t\t\t\tcase 'NameCmt':\n\t\t\t\t\t/* TODO: search for correct name */\n\t\t\t\t\tif(opts.biff < 8) break;\n\t\t\t\t\tif(last_lbl != null) last_lbl.Comment = val[1];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Protect': out[\"!protect\"] = val; break; /* for sheet or book */\n\t\t\t\tcase 'Password': if(val !== 0 && opts.WTF) console.error(\"Password verifier: \" + val); break;\n\t\t\t\tcase 'Prot4Rev': case 'Prot4RevPass': break; /*TODO: Revision Control*/\n\n\t\t\t\tcase 'BoundSheet8': {\n\t\t\t\t\tDirectory[val.pos] = val;\n\t\t\t\t\topts.snames.push(val.name);\n\t\t\t\t} break;\n\t\t\t\tcase 'EOF': {\n\t\t\t\t\tif(--file_depth) break;\n\t\t\t\t\tif(range.e) {\n\t\t\t\t\t\tif(range.e.r > 0 && range.e.c > 0) {\n\t\t\t\t\t\t\trange.e.r--; range.e.c--;\n\t\t\t\t\t\t\tout[\"!ref\"] = encode_range(range);\n\t\t\t\t\t\t\tif(options.sheetRows && options.sheetRows <= range.e.r) {\n\t\t\t\t\t\t\t\tvar tmpri = range.e.r;\n\t\t\t\t\t\t\t\trange.e.r = options.sheetRows - 1;\n\t\t\t\t\t\t\t\tout[\"!fullref\"] = out[\"!ref\"];\n\t\t\t\t\t\t\t\tout[\"!ref\"] = encode_range(range);\n\t\t\t\t\t\t\t\trange.e.r = tmpri;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trange.e.r++; range.e.c++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(merges.length > 0) out[\"!merges\"] = merges;\n\t\t\t\t\t\tif(objects.length > 0) out[\"!objects\"] = objects;\n\t\t\t\t\t\tif(colinfo.length > 0) out[\"!cols\"] = colinfo;\n\t\t\t\t\t\tif(rowinfo.length > 0) out[\"!rows\"] = rowinfo;\n\t\t\t\t\t\tWorkbook.Sheets.push(wsprops);\n\t\t\t\t\t}\n\t\t\t\t\tif(cur_sheet === \"\") Preamble = out; else Sheets[cur_sheet] = out;\n\t\t\t\t\tout = ((options.dense ? [] : {}));\n\t\t\t\t} break;\n\t\t\t\tcase 'BOF': {\n\t\t\t\t\tif(opts.biff === 8) opts.biff = {\n0x0009:2,\n0x0209:3,\n0x0409:4\n\t\t\t\t\t}[RecordType] || {\n0x0200:2,\n0x0300:3,\n0x0400:4,\n0x0500:5,\n0x0600:8,\n0x0002:2,\n0x0007:2\n\t\t\t\t\t}[val.BIFFVer] || 8;\n\t\t\t\t\topts.biffguess = val.BIFFVer == 0;\n\t\t\t\t\tif(val.BIFFVer == 0 && val.dt == 0x1000) { opts.biff = 5; seen_codepage = true; set_cp(opts.codepage = 28591); }\n\t\t\t\t\tif(opts.biff == 8 && val.BIFFVer == 0 && val.dt == 16) opts.biff = 2;\n\t\t\t\t\tif(file_depth++) break;\n\t\t\t\t\tout = ((options.dense ? [] : {}));\n\n\t\t\t\t\tif(opts.biff < 8 && !seen_codepage) { seen_codepage = true; set_cp(opts.codepage = options.codepage || 1252); }\n\n\t\t\t\t\tif(opts.biff < 5 || val.BIFFVer == 0 && val.dt == 0x1000) {\n\t\t\t\t\t\tif(cur_sheet === \"\") cur_sheet = \"Sheet1\";\n\t\t\t\t\t\trange = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\t\t\t\t\t/* fake BoundSheet8 */\n\t\t\t\t\t\tvar fakebs8 = {pos: blob.l - length, name:cur_sheet};\n\t\t\t\t\t\tDirectory[fakebs8.pos] = fakebs8;\n\t\t\t\t\t\topts.snames.push(cur_sheet);\n\t\t\t\t\t}\n\t\t\t\t\telse cur_sheet = (Directory[s] || {name:\"\"}).name;\n\t\t\t\t\tif(val.dt == 0x20) out[\"!type\"] = \"chart\";\n\t\t\t\t\tif(val.dt == 0x40) out[\"!type\"] = \"macro\";\n\t\t\t\t\tmerges = [];\n\t\t\t\t\tobjects = [];\n\t\t\t\t\topts.arrayf = arrayf = [];\n\t\t\t\t\tcolinfo = []; rowinfo = [];\n\t\t\t\t\tdefwidth = defheight = 0;\n\t\t\t\t\tseencol = false;\n\t\t\t\t\twsprops = {Hidden:(Directory[s]||{hs:0}).hs, name:cur_sheet };\n\t\t\t\t} break;\n\n\t\t\t\tcase 'Number': case 'BIFF2NUM': case 'BIFF2INT': {\n\t\t\t\t\tif(out[\"!type\"] == \"chart\") if(options.dense ? (out[val.r]||[])[val.c]: out[encode_cell({c:val.c, r:val.r})]) ++val.c;\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe]||{}, v:val.val, t:'n'});\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 'BoolErr': {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.val, t:val.t});\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 'RK': {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.rknum, t:'n'});\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 'MulRk': {\n\t\t\t\t\tfor(var j = val.c; j <= val.C; ++j) {\n\t\t\t\t\t\tvar ixfe = val.rkrec[j-val.c][0];\n\t\t\t\t\t\ttemp_val= ({ixfe:ixfe, XF:XFs[ixfe], v:val.rkrec[j-val.c][1], t:'n'});\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell({c:j, r:val.r}, temp_val, options);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 'Formula': {\n\t\t\t\t\tif(val.val == 'String') { last_formula = val; break; }\n\t\t\t\t\ttemp_val = make_cell(val.val, val.cell.ixfe, val.tt);\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(options.cellFormula) {\n\t\t\t\t\t\tvar _f = val.formula;\n\t\t\t\t\t\tif(_f && _f[0] && _f[0][0] && _f[0][0][0] == 'PtgExp') {\n\t\t\t\t\t\t\tvar _fr = _f[0][0][1][0], _fc = _f[0][0][1][1];\n\t\t\t\t\t\t\tvar _fe = encode_cell({r:_fr, c:_fc});\n\t\t\t\t\t\t\tif(sharedf[_fe]) temp_val.f = \"\"+stringify_formula(val.formula,range,val.cell,supbooks, opts);\n\t\t\t\t\t\t\telse temp_val.F = ((options.dense ? (out[_fr]||[])[_fc]: out[_fe]) || {}).F;\n\t\t\t\t\t\t} else temp_val.f = \"\"+stringify_formula(val.formula,range,val.cell,supbooks, opts);\n\t\t\t\t\t}\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell(val.cell, temp_val, options);\n\t\t\t\t\tlast_formula = val;\n\t\t\t\t} break;\n\t\t\t\tcase 'String': {\n\t\t\t\t\tif(last_formula) { /* technically always true */\n\t\t\t\t\t\tlast_formula.val = val;\n\t\t\t\t\t\ttemp_val = make_cell(val, last_formula.cell.ixfe, 's');\n\t\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\t\tif(options.cellFormula) {\n\t\t\t\t\t\t\ttemp_val.f = \"\"+stringify_formula(last_formula.formula, range, last_formula.cell, supbooks, opts);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell(last_formula.cell, temp_val, options);\n\t\t\t\t\t\tlast_formula = null;\n\t\t\t\t\t} else throw new Error(\"String record expects Formula\");\n\t\t\t\t} break;\n\t\t\t\tcase 'Array': {\n\t\t\t\t\tarrayf.push(val);\n\t\t\t\t\tvar _arraystart = encode_cell(val[0].s);\n\t\t\t\t\tcc = options.dense ? (out[val[0].s.r]||[])[val[0].s.c] : out[_arraystart];\n\t\t\t\t\tif(options.cellFormula && cc) {\n\t\t\t\t\t\tif(!last_formula) break; /* technically unreachable */\n\t\t\t\t\t\tif(!_arraystart || !cc) break;\n\t\t\t\t\t\tcc.f = \"\"+stringify_formula(val[1], range, val[0], supbooks, opts);\n\t\t\t\t\t\tcc.F = encode_range(val[0]);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 'ShrFmla': {\n\t\t\t\t\tif(!options.cellFormula) break;\n\t\t\t\t\tif(last_cell) {\n\t\t\t\t\t\t/* TODO: capture range */\n\t\t\t\t\t\tif(!last_formula) break; /* technically unreachable */\n\t\t\t\t\t\tsharedf[encode_cell(last_formula.cell)]= val[0];\n\t\t\t\t\t\tcc = options.dense ? (out[last_formula.cell.r]||[])[last_formula.cell.c] : out[encode_cell(last_formula.cell)];\n\t\t\t\t\t\t(cc||{}).f = \"\"+stringify_formula(val[0], range, lastcell, supbooks, opts);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 'LabelSst':\n\t\t\t\t\ttemp_val=make_cell(sst[val.isst].t, val.ixfe, 's');\n\t\t\t\t\tif(sst[val.isst].h) temp_val.h = sst[val.isst].h;\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Blank': if(options.sheetStubs) {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], t:'z'});\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 'MulBlank': if(options.sheetStubs) {\n\t\t\t\t\tfor(var _j = val.c; _j <= val.C; ++_j) {\n\t\t\t\t\t\tvar _ixfe = val.ixfe[_j-val.c];\n\t\t\t\t\t\ttemp_val= ({ixfe:_ixfe, XF:XFs[_ixfe], t:'z'});\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell({c:_j, r:val.r}, temp_val, options);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 'RString':\n\t\t\t\tcase 'Label': case 'BIFF2STR':\n\t\t\t\t\ttemp_val=make_cell(val.val, val.ixfe, 's');\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Dimensions': {\n\t\t\t\t\tif(file_depth === 1) range = val; /* TODO: stack */\n\t\t\t\t} break;\n\t\t\t\tcase 'SST': {\n\t\t\t\t\tsst = val;\n\t\t\t\t} break;\n\t\t\t\tcase 'Format': { /* val = [id, fmt] */\n\t\t\t\t\tif(opts.biff == 4) {\n\t\t\t\t\t\tBIFF2FmtTable[BIFF2Fmt++] = val[1];\n\t\t\t\t\t\tfor(var b4idx = 0; b4idx < BIFF2Fmt + 163; ++b4idx) if(SSF._table[b4idx] == val[1]) break;\n\t\t\t\t\t\tif(b4idx >= 163) SSF.load(val[1], BIFF2Fmt + 163);\n\t\t\t\t\t}\n\t\t\t\t\telse SSF.load(val[1], val[0]);\n\t\t\t\t} break;\n\t\t\t\tcase 'BIFF2FORMAT': {\n\t\t\t\t\tBIFF2FmtTable[BIFF2Fmt++] = val;\n\t\t\t\t\tfor(var b2idx = 0; b2idx < BIFF2Fmt + 163; ++b2idx) if(SSF._table[b2idx] == val) break;\n\t\t\t\t\tif(b2idx >= 163) SSF.load(val, BIFF2Fmt + 163);\n\t\t\t\t} break;\n\n\t\t\t\tcase 'MergeCells': merges = merges.concat(val); break;\n\n\t\t\t\tcase 'Obj': objects[val.cmo[0]] = opts.lastobj = val; break;\n\t\t\t\tcase 'TxO': opts.lastobj.TxO = val; break;\n\t\t\t\tcase 'ImData': opts.lastobj.ImData = val; break;\n\n\t\t\t\tcase 'HLink': {\n\t\t\t\t\tfor(rngR = val[0].s.r; rngR <= val[0].e.r; ++rngR)\n\t\t\t\t\t\tfor(rngC = val[0].s.c; rngC <= val[0].e.c; ++rngC) {\n\t\t\t\t\t\t\tcc = options.dense ? (out[rngR]||[])[rngC] : out[encode_cell({c:rngC,r:rngR})];\n\t\t\t\t\t\t\tif(cc) cc.l = val[1];\n\t\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 'HLinkTooltip': {\n\t\t\t\t\tfor(rngR = val[0].s.r; rngR <= val[0].e.r; ++rngR)\n\t\t\t\t\t\tfor(rngC = val[0].s.c; rngC <= val[0].e.c; ++rngC) {\n\t\t\t\t\t\t\tcc = options.dense ? (out[rngR]||[])[rngC] : out[encode_cell({c:rngC,r:rngR})];\n\t\t\t\t\t\t\tif(cc && cc.l) cc.l.Tooltip = val[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t\t/* Comments */\n\t\t\t\tcase 'Note': {\n\t\t\t\t\tif(opts.biff <= 5 && opts.biff >= 2) break; /* TODO: BIFF5 */\n\t\t\t\t\tcc = options.dense ? (out[val[0].r]||[])[val[0].c] : out[encode_cell(val[0])];\n\t\t\t\t\tvar noteobj = objects[val[2]];\n\t\t\t\t\tif(!cc) {\n\t\t\t\t\t\tif(options.dense) {\n\t\t\t\t\t\t\tif(!out[val[0].r]) out[val[0].r] = [];\n\t\t\t\t\t\t\tcc = out[val[0].r][val[0].c] = ({t:\"z\"});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcc = out[encode_cell(val[0])] = ({t:\"z\"});\n\t\t\t\t\t\t}\n\t\t\t\t\t\trange.e.r = Math.max(range.e.r, val[0].r);\n\t\t\t\t\t\trange.s.r = Math.min(range.s.r, val[0].r);\n\t\t\t\t\t\trange.e.c = Math.max(range.e.c, val[0].c);\n\t\t\t\t\t\trange.s.c = Math.min(range.s.c, val[0].c);\n\t\t\t\t\t}\n\t\t\t\t\tif(!cc.c) cc.c = [];\n\t\t\t\t\tcmnt = {a:val[1],t:noteobj.TxO.t};\n\t\t\t\t\tcc.c.push(cmnt);\n\t\t\t\t} break;\n\n\t\t\t\tdefault: switch(R.n) { /* nested */\n\t\t\t\tcase 'ClrtClient': break;\n\t\t\t\tcase 'XFExt': update_xfext(XFs[val.ixfe], val.ext); break;\n\n\t\t\t\tcase 'DefColWidth': defwidth = val; break;\n\t\t\t\tcase 'DefaultRowHeight': defheight = val[1]; break; // TODO: flags\n\n\t\t\t\tcase 'ColInfo': {\n\t\t\t\t\tif(!opts.cellStyles) break;\n\t\t\t\t\twhile(val.e >= val.s) {\n\t\t\t\t\t\tcolinfo[val.e--] = { width: val.w/256, level: (val.level || 0), hidden: !!(val.flags & 1) };\n\t\t\t\t\t\tif(!seencol) { seencol = true; find_mdw_colw(val.w/256); }\n\t\t\t\t\t\tprocess_col(colinfo[val.e+1]);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 'Row': {\n\t\t\t\t\tvar rowobj = {};\n\t\t\t\t\tif(val.level != null) { rowinfo[val.r] = rowobj; rowobj.level = val.level; }\n\t\t\t\t\tif(val.hidden) { rowinfo[val.r] = rowobj; rowobj.hidden = true; }\n\t\t\t\t\tif(val.hpt) {\n\t\t\t\t\t\trowinfo[val.r] = rowobj;\n\t\t\t\t\t\trowobj.hpt = val.hpt; rowobj.hpx = pt2px(val.hpt);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\n\t\t\t\tcase 'LeftMargin':\n\t\t\t\tcase 'RightMargin':\n\t\t\t\tcase 'TopMargin':\n\t\t\t\tcase 'BottomMargin':\n\t\t\t\t\tif(!out['!margins']) default_margins(out['!margins'] = {});\n\t\t\t\t\tout['!margins'][Rn.slice(0,-6).toLowerCase()] = val;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Selection': break;\n\n\t\t\t\tcase 'Setup': // TODO\n\t\t\t\t\tif(!out['!margins']) default_margins(out['!margins'] = {});\n\t\t\t\t\tout['!margins'].header = val.header;\n\t\t\t\t\tout['!margins'].footer = val.footer;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Window2': // TODO\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tif(val.RTL) Workbook.Views[0].RTL = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Header': break; // TODO\n\t\t\t\tcase 'Footer': break; // TODO\n\t\t\t\tcase 'HCenter': break; // TODO\n\t\t\t\tcase 'VCenter': break; // TODO\n\t\t\t\tcase 'Pls': break; // TODO\n\t\t\t\tcase 'GCW': break;\n\t\t\t\tcase 'LHRecord': break;\n\t\t\t\tcase 'DBCell': break; // TODO\n\t\t\t\tcase 'EntExU2': break; // TODO\n\t\t\t\tcase 'SxView': break; // TODO\n\t\t\t\tcase 'Sxvd': break; // TODO\n\t\t\t\tcase 'SXVI': break; // TODO\n\t\t\t\tcase 'SXVDEx': break; // TODO\n\t\t\t\tcase 'SxIvd': break; // TODO\n\t\t\t\tcase 'SXString': break; // TODO\n\t\t\t\tcase 'Sync': break;\n\t\t\t\tcase 'Addin': break;\n\t\t\t\tcase 'SXDI': break; // TODO\n\t\t\t\tcase 'SXLI': break; // TODO\n\t\t\t\tcase 'SXEx': break; // TODO\n\t\t\t\tcase 'QsiSXTag': break; // TODO\n\t\t\t\tcase 'Feat': break;\n\t\t\t\tcase 'FeatHdr': case 'FeatHdr11': break;\n\t\t\t\tcase 'Feature11': case 'Feature12': case 'List12': break;\n\t\t\t\tcase 'Country': country = val; break;\n\t\t\t\tcase 'RecalcId': break;\n\t\t\t\tcase 'DxGCol': break; // TODO: htmlify\n\t\t\t\tcase 'Fbi': case 'Fbi2': case 'GelFrame': break;\n\t\t\t\tcase 'Font': break; // TODO\n\t\t\t\tcase 'XFCRC': break; // TODO\n\t\t\t\tcase 'Style': break; // TODO\n\t\t\t\tcase 'StyleExt': break; // TODO\n\t\t\t\tcase 'Palette': palette = val; break;\n\t\t\t\tcase 'Theme': themes = val; break;\n\t\t\t\t/* Protection */\n\t\t\t\tcase 'ScenarioProtect': break;\n\t\t\t\tcase 'ObjProtect': break;\n\n\t\t\t\t/* Conditional Formatting */\n\t\t\t\tcase 'CondFmt12': break;\n\n\t\t\t\t/* Table */\n\t\t\t\tcase 'Table': break; // TODO\n\t\t\t\tcase 'TableStyles': break; // TODO\n\t\t\t\tcase 'TableStyle': break; // TODO\n\t\t\t\tcase 'TableStyleElement': break; // TODO\n\n\t\t\t\t/* PivotTable */\n\t\t\t\tcase 'SXStreamID': break; // TODO\n\t\t\t\tcase 'SXVS': break; // TODO\n\t\t\t\tcase 'DConRef': break; // TODO\n\t\t\t\tcase 'SXAddl': break; // TODO\n\t\t\t\tcase 'DConBin': break; // TODO\n\t\t\t\tcase 'DConName': break; // TODO\n\t\t\t\tcase 'SXPI': break; // TODO\n\t\t\t\tcase 'SxFormat': break; // TODO\n\t\t\t\tcase 'SxSelect': break; // TODO\n\t\t\t\tcase 'SxRule': break; // TODO\n\t\t\t\tcase 'SxFilt': break; // TODO\n\t\t\t\tcase 'SxItm': break; // TODO\n\t\t\t\tcase 'SxDXF': break; // TODO\n\n\t\t\t\t/* Scenario Manager */\n\t\t\t\tcase 'ScenMan': break;\n\n\t\t\t\t/* Data Consolidation */\n\t\t\t\tcase 'DCon': break;\n\n\t\t\t\t/* Watched Cell */\n\t\t\t\tcase 'CellWatch': break;\n\n\t\t\t\t/* Print Settings */\n\t\t\t\tcase 'PrintRowCol': break;\n\t\t\t\tcase 'PrintGrid': break;\n\t\t\t\tcase 'PrintSize': break;\n\n\t\t\t\tcase 'XCT': break;\n\t\t\t\tcase 'CRN': break;\n\n\t\t\t\tcase 'Scl': {\n\t\t\t\t\t//console.log(\"Zoom Level:\", val[0]/val[1],val);\n\t\t\t\t} break;\n\t\t\t\tcase 'SheetExt': {\n\t\t\t\t\t/* empty */\n\t\t\t\t} break;\n\t\t\t\tcase 'SheetExtOptional': {\n\t\t\t\t\t/* empty */\n\t\t\t\t} break;\n\n\t\t\t\t/* VBA */\n\t\t\t\tcase 'ObNoMacros': {\n\t\t\t\t\t/* empty */\n\t\t\t\t} break;\n\t\t\t\tcase 'ObProj': {\n\t\t\t\t\t/* empty */\n\t\t\t\t} break;\n\t\t\t\tcase 'CodeName': {\nif(!cur_sheet) Workbook.WBProps.CodeName = val || \"ThisWorkbook\";\n\t\t\t\t\telse wsprops.CodeName = val || wsprops.name;\n\t\t\t\t} break;\n\t\t\t\tcase 'GUIDTypeLib': {\n\t\t\t\t\t/* empty */\n\t\t\t\t} break;\n\n\t\t\t\tcase 'WOpt': break; // TODO: WTF?\n\t\t\t\tcase 'PhoneticInfo': break;\n\n\t\t\t\tcase 'OleObjectSize': break;\n\n\t\t\t\t/* Differential Formatting */\n\t\t\t\tcase 'DXF': case 'DXFN': case 'DXFN12': case 'DXFN12List': case 'DXFN12NoCB': break;\n\n\t\t\t\t/* Data Validation */\n\t\t\t\tcase 'Dv': case 'DVal': break;\n\n\t\t\t\t/* Data Series */\n\t\t\t\tcase 'BRAI': case 'Series': case 'SeriesText': break;\n\n\t\t\t\t/* Data Connection */\n\t\t\t\tcase 'DConn': break;\n\t\t\t\tcase 'DbOrParamQry': break;\n\t\t\t\tcase 'DBQueryExt': break;\n\n\t\t\t\tcase 'OleDbConn': break;\n\t\t\t\tcase 'ExtString': break;\n\n\t\t\t\t/* Formatting */\n\t\t\t\tcase 'IFmtRecord': break;\n\t\t\t\tcase 'CondFmt': case 'CF': case 'CF12': case 'CFEx': break;\n\n\t\t\t\t/* Explicitly Ignored */\n\t\t\t\tcase 'Excel9File': break;\n\t\t\t\tcase 'Units': break;\n\t\t\t\tcase 'InterfaceHdr': case 'Mms': case 'InterfaceEnd': case 'DSF': break;\n\t\t\t\tcase 'BuiltInFnGroupCount': /* 2.4.30 0x0E or 0x10 but excel 2011 generates 0x11? */ break;\n\t\t\t\t/* View Stuff */\n\t\t\t\tcase 'Window1': case 'HideObj': case 'GridSet': case 'Guts':\n\t\t\t\tcase 'UserBView': case 'UserSViewBegin': case 'UserSViewEnd': break;\n\t\t\t\tcase 'Pane': break;\n\t\t\t\tdefault: switch(R.n) { /* nested */\n\t\t\t\t/* Chart */\n\t\t\t\tcase 'Dat':\n\t\t\t\tcase 'Begin': case 'End':\n\t\t\t\tcase 'StartBlock': case 'EndBlock':\n\t\t\t\tcase 'Frame': case 'Area':\n\t\t\t\tcase 'Axis': case 'AxisLine': case 'Tick': break;\n\t\t\t\tcase 'AxesUsed':\n\t\t\t\tcase 'CrtLayout12': case 'CrtLayout12A': case 'CrtLink': case 'CrtLine': case 'CrtMlFrt': case 'CrtMlFrtContinue': break;\n\t\t\t\tcase 'LineFormat': case 'AreaFormat':\n\t\t\t\tcase 'Chart': case 'Chart3d': case 'Chart3DBarShape': case 'ChartFormat': case 'ChartFrtInfo': break;\n\t\t\t\tcase 'PlotArea': case 'PlotGrowth': break;\n\t\t\t\tcase 'SeriesList': case 'SerParent': case 'SerAuxTrend': break;\n\t\t\t\tcase 'DataFormat': case 'SerToCrt': case 'FontX': break;\n\t\t\t\tcase 'CatSerRange': case 'AxcExt': case 'SerFmt': break;\n\t\t\t\tcase 'ShtProps': break;\n\t\t\t\tcase 'DefaultText': case 'Text': case 'CatLab': break;\n\t\t\t\tcase 'DataLabExtContents': break;\n\t\t\t\tcase 'Legend': case 'LegendException': break;\n\t\t\t\tcase 'Pie': case 'Scatter': break;\n\t\t\t\tcase 'PieFormat': case 'MarkerFormat': break;\n\t\t\t\tcase 'StartObject': case 'EndObject': break;\n\t\t\t\tcase 'AlRuns': case 'ObjectLink': break;\n\t\t\t\tcase 'SIIndex': break;\n\t\t\t\tcase 'AttachedLabel': case 'YMult': break;\n\n\t\t\t\t/* Chart Group */\n\t\t\t\tcase 'Line': case 'Bar': break;\n\t\t\t\tcase 'Surf': break;\n\n\t\t\t\t/* Axis Group */\n\t\t\t\tcase 'AxisParent': break;\n\t\t\t\tcase 'Pos': break;\n\t\t\t\tcase 'ValueRange': break;\n\n\t\t\t\t/* Pivot Chart */\n\t\t\t\tcase 'SXViewEx9': break; // TODO\n\t\t\t\tcase 'SXViewLink': break;\n\t\t\t\tcase 'PivotChartBits': break;\n\t\t\t\tcase 'SBaseRef': break;\n\t\t\t\tcase 'TextPropsStream': break;\n\n\t\t\t\t/* Chart Misc */\n\t\t\t\tcase 'LnExt': break;\n\t\t\t\tcase 'MkrExt': break;\n\t\t\t\tcase 'CrtCoopt': break;\n\n\t\t\t\t/* Query Table */\n\t\t\t\tcase 'Qsi': case 'Qsif': case 'Qsir': case 'QsiSXTag': break;\n\t\t\t\tcase 'TxtQry': break;\n\n\t\t\t\t/* Filter */\n\t\t\t\tcase 'FilterMode': break;\n\t\t\t\tcase 'AutoFilter': case 'AutoFilterInfo': break;\n\t\t\t\tcase 'AutoFilter12': break;\n\t\t\t\tcase 'DropDownObjIds': break;\n\t\t\t\tcase 'Sort': break;\n\t\t\t\tcase 'SortData': break;\n\n\t\t\t\t/* Drawing */\n\t\t\t\tcase 'ShapePropsStream': break;\n\t\t\t\tcase 'MsoDrawing': case 'MsoDrawingGroup': case 'MsoDrawingSelection': break;\n\t\t\t\t/* Pub Stuff */\n\t\t\t\tcase 'WebPub': case 'AutoWebPub': break;\n\n\t\t\t\t/* Print Stuff */\n\t\t\t\tcase 'HeaderFooter': case 'HFPicture': case 'PLV':\n\t\t\t\tcase 'HorizontalPageBreaks': case 'VerticalPageBreaks': break;\n\t\t\t\t/* Behavioral */\n\t\t\t\tcase 'Backup': case 'CompressPictures': case 'Compat12': break;\n\n\t\t\t\t/* Should not Happen */\n\t\t\t\tcase 'Continue': case 'ContinueFrt12': break;\n\n\t\t\t\t/* Future Records */\n\t\t\t\tcase 'FrtFontList': case 'FrtWrapper': break;\n\n\t\t\t\tdefault: switch(R.n) { /* nested */\n\t\t\t\t/* BIFF5 records */\n\t\t\t\tcase 'TabIdConf': case 'Radar': case 'RadarArea': case 'DropBar': case 'Intl': case 'CoordList': case 'SerAuxErrBar': break;\n\n\t\t\t\t/* BIFF2-4 records */\n\t\t\t\tcase 'BIFF2FONTCLR': case 'BIFF2FMTCNT': case 'BIFF2FONTXTRA': break;\n\t\t\t\tcase 'BIFF2XF': case 'BIFF3XF': case 'BIFF4XF': break;\n\t\t\t\tcase 'BIFF2XFINDEX': break;\n\t\t\t\tcase 'BIFF4FMTCNT': case 'BIFF2ROW': case 'BIFF2WINDOW2': break;\n\n\t\t\t\t/* Miscellaneous */\n\t\t\t\tcase 'SCENARIO': case 'DConBin': case 'PicF': case 'DataLabExt':\n\t\t\t\tcase 'Lel': case 'BopPop': case 'BopPopCustom': case 'RealTimeData':\n\t\t\t\tcase 'Name': break;\n\t\t\t\tcase 'LHNGraph': case 'FnGroupName': case 'AddMenu': case 'LPr': break;\n\t\t\t\tcase 'ListObj': case 'ListField': break;\n\t\t\t\tcase 'RRSort': break;\n\t\t\t\tcase 'BigName': break;\n\t\t\t\tcase 'ToolbarHdr': case 'ToolbarEnd': break;\n\t\t\t\tcase 'DDEObjName': break;\n\t\t\t\tcase 'FRTArchId$': break;\n\t\t\t\tdefault: if(options.WTF) throw 'Unrecognized Record ' + R.n;\n\t\t\t}}}}\n\t\t} else blob.l += length;\n\t}\n\twb.SheetNames=keys(Directory).sort(function(a,b) { return Number(a) - Number(b); }).map(function(x){return Directory[x].name;});\n\tif(!options.bookSheets) wb.Sheets=Sheets;\n\tif(!wb.SheetNames.length && Preamble[\"!ref\"]) {\n\t\twb.SheetNames.push(\"Sheet1\");\n\t\t/*jshint -W069 */\n\t\tif(wb.Sheets) wb.Sheets[\"Sheet1\"] = Preamble;\n\t\t/*jshint +W069 */\n\t} else wb.Preamble=Preamble;\n\tif(wb.Sheets) FilterDatabases.forEach(function(r,i) { wb.Sheets[wb.SheetNames[i]]['!autofilter'] = r; });\n\twb.Strings = sst;\n\twb.SSF = SSF.get_table();\n\tif(opts.enc) wb.Encryption = opts.enc;\n\tif(themes) wb.Themes = themes;\n\twb.Metadata = {};\n\tif(country !== undefined) wb.Metadata.Country = country;\n\tif(supbooks.names.length > 0) Workbook.Names = supbooks.names;\n\twb.Workbook = Workbook;\n\treturn wb;\n}\n\n/* TODO: split props*/\nvar PSCLSID = {\n\tSI: \"e0859ff2f94f6810ab9108002b27b3d9\",\n\tDSI: \"02d5cdd59c2e1b10939708002b2cf9ae\",\n\tUDI: \"05d5cdd59c2e1b10939708002b2cf9ae\"\n};\nfunction parse_xls_props(cfb, props, o) {\n\t/* [MS-OSHARED] 2.3.3.2.2 Document Summary Information Property Set */\n\tvar DSI = CFB.find(cfb, '!DocumentSummaryInformation');\n\tif(DSI && DSI.size > 0) try {\n\t\tvar DocSummary = parse_PropertySetStream(DSI, DocSummaryPIDDSI, PSCLSID.DSI);\n\t\tfor(var d in DocSummary) props[d] = DocSummary[d];\n\t} catch(e) {if(o.WTF) throw e;/* empty */}\n\n\t/* [MS-OSHARED] 2.3.3.2.1 Summary Information Property Set*/\n\tvar SI = CFB.find(cfb, '!SummaryInformation');\n\tif(SI && SI.size > 0) try {\n\t\tvar Summary = parse_PropertySetStream(SI, SummaryPIDSI, PSCLSID.SI);\n\t\tfor(var s in Summary) if(props[s] == null) props[s] = Summary[s];\n\t} catch(e) {if(o.WTF) throw e;/* empty */}\n\n\tif(props.HeadingPairs && props.TitlesOfParts) {\n\t\tload_props_pairs(props.HeadingPairs, props.TitlesOfParts, props, o);\n\t\tdelete props.HeadingPairs; delete props.TitlesOfParts;\n\t}\n}\nfunction write_xls_props(wb, cfb) {\n\tvar DSEntries = [], SEntries = [], CEntries = [];\n\tvar i = 0, Keys;\n\tif(wb.Props) {\n\t\tKeys = keys(wb.Props);\n\t\t// $FlowIgnore\n\t\tfor(i = 0; i < Keys.length; ++i) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i]) ? SEntries : CEntries).push([Keys[i], wb.Props[Keys[i]]]);\n\t}\n\tif(wb.Custprops) {\n\t\tKeys = keys(wb.Custprops);\n\t\t// $FlowIgnore\n\t\tfor(i = 0; i < Keys.length; ++i) if(!Object.prototype.hasOwnProperty.call((wb.Props||{}), Keys[i])) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i]) ? SEntries : CEntries).push([Keys[i], wb.Custprops[Keys[i]]]);\n\t}\n\tvar CEntries2 = [];\n\tfor(i = 0; i < CEntries.length; ++i) {\n\t\tif(XLSPSSkip.indexOf(CEntries[i][0]) > -1) continue;\n\t\tif(CEntries[i][1] == null) continue;\n\t\tCEntries2.push(CEntries[i]);\n\t}\n\tif(SEntries.length) CFB.utils.cfb_add(cfb, \"/\\u0005SummaryInformation\", write_PropertySetStream(SEntries, PSCLSID.SI, SummaryRE, SummaryPIDSI));\n\tif(DSEntries.length || CEntries2.length) CFB.utils.cfb_add(cfb, \"/\\u0005DocumentSummaryInformation\", write_PropertySetStream(DSEntries, PSCLSID.DSI, DocSummaryRE, DocSummaryPIDDSI, CEntries2.length ? CEntries2 : null, PSCLSID.UDI));\n}\n\nfunction parse_xlscfb(cfb, options) {\nif(!options) options = {};\nfix_read_opts(options);\nreset_cp();\nif(options.codepage) set_ansi(options.codepage);\nvar CompObj, WB;\nif(cfb.FullPaths) {\n\tif(CFB.find(cfb, '/encryption')) throw new Error(\"File is password-protected\");\n\tCompObj = CFB.find(cfb, '!CompObj');\n\tWB = CFB.find(cfb, '/Workbook') || CFB.find(cfb, '/Book');\n} else {\n\tswitch(options.type) {\n\t\tcase 'base64': cfb = s2a(Base64.decode(cfb)); break;\n\t\tcase 'binary': cfb = s2a(cfb); break;\n\t\tcase 'buffer': break;\n\t\tcase 'array': if(!Array.isArray(cfb)) cfb = Array.prototype.slice.call(cfb); break;\n\t}\n\tprep_blob(cfb, 0);\n\tWB = ({content: cfb});\n}\nvar WorkbookP;\n\nvar _data;\nif(CompObj) parse_compobj(CompObj);\nif(options.bookProps && !options.bookSheets) WorkbookP = ({});\nelse {\n\tvar T = has_buf ? 'buffer' : 'array';\n\tif(WB && WB.content) WorkbookP = parse_workbook(WB.content, options);\n\t/* Quattro Pro 7-8 */\n\telse if((_data=CFB.find(cfb, 'PerfectOffice_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));\n\t/* Quattro Pro 9 */\n\telse if((_data=CFB.find(cfb, 'NativeContent_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));\n\t/* Works 4 for Mac */\n\telse if((_data=CFB.find(cfb, 'MN0')) && _data.content) throw new Error(\"Unsupported Works 4 for Mac file\");\n\telse throw new Error(\"Cannot find Workbook stream\");\n\tif(options.bookVBA && cfb.FullPaths && CFB.find(cfb, '/_VBA_PROJECT_CUR/VBA/dir')) WorkbookP.vbaraw = make_vba_xls(cfb);\n}\n\nvar props = {};\nif(cfb.FullPaths) parse_xls_props(cfb, props, options);\n\nWorkbookP.Props = WorkbookP.Custprops = props; /* TODO: split up properties */\nif(options.bookFiles) WorkbookP.cfb = cfb;\n/*WorkbookP.CompObjP = CompObjP; // TODO: storage? */\nreturn WorkbookP;\n}\n\n\nfunction write_xlscfb(wb, opts) {\n\tvar o = opts || {};\n\tvar cfb = CFB.utils.cfb_new({root:\"R\"});\n\tvar wbpath = \"/Workbook\";\n\tswitch(o.bookType || \"xls\") {\n\t\tcase \"xls\": o.bookType = \"biff8\";\n\t\t/* falls through */\n\t\tcase \"xla\": if(!o.bookType) o.bookType = \"xla\";\n\t\t/* falls through */\n\t\tcase \"biff8\": wbpath = \"/Workbook\"; o.biff = 8; break;\n\t\tcase \"biff5\": wbpath = \"/Book\"; o.biff = 5; break;\n\t\tdefault: throw new Error(\"invalid type \" + o.bookType + \" for XLS CFB\");\n\t}\n\tCFB.utils.cfb_add(cfb, wbpath, write_biff_buf(wb, o));\n\tif(o.biff == 8 && (wb.Props || wb.Custprops)) write_xls_props(wb, cfb);\n\t// TODO: SI, DSI, CO\n\tif(o.biff == 8 && wb.vbaraw) fill_vba_xls(cfb, CFB.read(wb.vbaraw, {type: typeof wb.vbaraw == \"string\" ? \"binary\" : \"buffer\"}));\n\treturn cfb;\n}\n/* [MS-XLSB] 2.3 Record Enumeration */\nvar XLSBRecordEnum = {\n0x0000: { n:\"BrtRowHdr\", f:parse_BrtRowHdr },\n0x0001: { n:\"BrtCellBlank\", f:parse_BrtCellBlank },\n0x0002: { n:\"BrtCellRk\", f:parse_BrtCellRk },\n0x0003: { n:\"BrtCellError\", f:parse_BrtCellError },\n0x0004: { n:\"BrtCellBool\", f:parse_BrtCellBool },\n0x0005: { n:\"BrtCellReal\", f:parse_BrtCellReal },\n0x0006: { n:\"BrtCellSt\", f:parse_BrtCellSt },\n0x0007: { n:\"BrtCellIsst\", f:parse_BrtCellIsst },\n0x0008: { n:\"BrtFmlaString\", f:parse_BrtFmlaString },\n0x0009: { n:\"BrtFmlaNum\", f:parse_BrtFmlaNum },\n0x000A: { n:\"BrtFmlaBool\", f:parse_BrtFmlaBool },\n0x000B: { n:\"BrtFmlaError\", f:parse_BrtFmlaError },\n0x000C: { n:\"BrtShortBlank\", f:parse_BrtShortBlank },\n0x000D: { n:\"BrtShortRk\", f:parse_BrtShortRk },\n0x000E: { n:\"BrtShortError\", f:parse_BrtShortError },\n0x000F: { n:\"BrtShortBool\", f:parse_BrtShortBool },\n0x0010: { n:\"BrtShortReal\", f:parse_BrtShortReal },\n0x0011: { n:\"BrtShortSt\", f:parse_BrtShortSt },\n0x0012: { n:\"BrtShortIsst\", f:parse_BrtShortIsst },\n0x0013: { n:\"BrtSSTItem\", f:parse_RichStr },\n0x0014: { n:\"BrtPCDIMissing\" },\n0x0015: { n:\"BrtPCDINumber\" },\n0x0016: { n:\"BrtPCDIBoolean\" },\n0x0017: { n:\"BrtPCDIError\" },\n0x0018: { n:\"BrtPCDIString\" },\n0x0019: { n:\"BrtPCDIDatetime\" },\n0x001A: { n:\"BrtPCDIIndex\" },\n0x001B: { n:\"BrtPCDIAMissing\" },\n0x001C: { n:\"BrtPCDIANumber\" },\n0x001D: { n:\"BrtPCDIABoolean\" },\n0x001E: { n:\"BrtPCDIAError\" },\n0x001F: { n:\"BrtPCDIAString\" },\n0x0020: { n:\"BrtPCDIADatetime\" },\n0x0021: { n:\"BrtPCRRecord\" },\n0x0022: { n:\"BrtPCRRecordDt\" },\n0x0023: { n:\"BrtFRTBegin\" },\n0x0024: { n:\"BrtFRTEnd\" },\n0x0025: { n:\"BrtACBegin\" },\n0x0026: { n:\"BrtACEnd\" },\n0x0027: { n:\"BrtName\", f:parse_BrtName },\n0x0028: { n:\"BrtIndexRowBlock\" },\n0x002A: { n:\"BrtIndexBlock\" },\n0x002B: { n:\"BrtFont\", f:parse_BrtFont },\n0x002C: { n:\"BrtFmt\", f:parse_BrtFmt },\n0x002D: { n:\"BrtFill\", f:parse_BrtFill },\n0x002E: { n:\"BrtBorder\", f:parse_BrtBorder },\n0x002F: { n:\"BrtXF\", f:parse_BrtXF },\n0x0030: { n:\"BrtStyle\" },\n0x0031: { n:\"BrtCellMeta\" },\n0x0032: { n:\"BrtValueMeta\" },\n0x0033: { n:\"BrtMdb\" },\n0x0034: { n:\"BrtBeginFmd\" },\n0x0035: { n:\"BrtEndFmd\" },\n0x0036: { n:\"BrtBeginMdx\" },\n0x0037: { n:\"BrtEndMdx\" },\n0x0038: { n:\"BrtBeginMdxTuple\" },\n0x0039: { n:\"BrtEndMdxTuple\" },\n0x003A: { n:\"BrtMdxMbrIstr\" },\n0x003B: { n:\"BrtStr\" },\n0x003C: { n:\"BrtColInfo\", f:parse_ColInfo },\n0x003E: { n:\"BrtCellRString\" },\n0x003F: { n:\"BrtCalcChainItem$\", f:parse_BrtCalcChainItem$ },\n0x0040: { n:\"BrtDVal\", f:parse_BrtDVal },\n0x0041: { n:\"BrtSxvcellNum\" },\n0x0042: { n:\"BrtSxvcellStr\" },\n0x0043: { n:\"BrtSxvcellBool\" },\n0x0044: { n:\"BrtSxvcellErr\" },\n0x0045: { n:\"BrtSxvcellDate\" },\n0x0046: { n:\"BrtSxvcellNil\" },\n0x0080: { n:\"BrtFileVersion\" },\n0x0081: { n:\"BrtBeginSheet\" },\n0x0082: { n:\"BrtEndSheet\" },\n0x0083: { n:\"BrtBeginBook\", f:parsenoop, p:0 },\n0x0084: { n:\"BrtEndBook\" },\n0x0085: { n:\"BrtBeginWsViews\" },\n0x0086: { n:\"BrtEndWsViews\" },\n0x0087: { n:\"BrtBeginBookViews\" },\n0x0088: { n:\"BrtEndBookViews\" },\n0x0089: { n:\"BrtBeginWsView\", f:parse_BrtBeginWsView },\n0x008A: { n:\"BrtEndWsView\" },\n0x008B: { n:\"BrtBeginCsViews\" },\n0x008C: { n:\"BrtEndCsViews\" },\n0x008D: { n:\"BrtBeginCsView\" },\n0x008E: { n:\"BrtEndCsView\" },\n0x008F: { n:\"BrtBeginBundleShs\" },\n0x0090: { n:\"BrtEndBundleShs\" },\n0x0091: { n:\"BrtBeginSheetData\" },\n0x0092: { n:\"BrtEndSheetData\" },\n0x0093: { n:\"BrtWsProp\", f:parse_BrtWsProp },\n0x0094: { n:\"BrtWsDim\", f:parse_BrtWsDim, p:16 },\n0x0097: { n:\"BrtPane\", f:parse_BrtPane },\n0x0098: { n:\"BrtSel\" },\n0x0099: { n:\"BrtWbProp\", f:parse_BrtWbProp },\n0x009A: { n:\"BrtWbFactoid\" },\n0x009B: { n:\"BrtFileRecover\" },\n0x009C: { n:\"BrtBundleSh\", f:parse_BrtBundleSh },\n0x009D: { n:\"BrtCalcProp\" },\n0x009E: { n:\"BrtBookView\" },\n0x009F: { n:\"BrtBeginSst\", f:parse_BrtBeginSst },\n0x00A0: { n:\"BrtEndSst\" },\n0x00A1: { n:\"BrtBeginAFilter\", f:parse_UncheckedRfX },\n0x00A2: { n:\"BrtEndAFilter\" },\n0x00A3: { n:\"BrtBeginFilterColumn\" },\n0x00A4: { n:\"BrtEndFilterColumn\" },\n0x00A5: { n:\"BrtBeginFilters\" },\n0x00A6: { n:\"BrtEndFilters\" },\n0x00A7: { n:\"BrtFilter\" },\n0x00A8: { n:\"BrtColorFilter\" },\n0x00A9: { n:\"BrtIconFilter\" },\n0x00AA: { n:\"BrtTop10Filter\" },\n0x00AB: { n:\"BrtDynamicFilter\" },\n0x00AC: { n:\"BrtBeginCustomFilters\" },\n0x00AD: { n:\"BrtEndCustomFilters\" },\n0x00AE: { n:\"BrtCustomFilter\" },\n0x00AF: { n:\"BrtAFilterDateGroupItem\" },\n0x00B0: { n:\"BrtMergeCell\", f:parse_BrtMergeCell },\n0x00B1: { n:\"BrtBeginMergeCells\" },\n0x00B2: { n:\"BrtEndMergeCells\" },\n0x00B3: { n:\"BrtBeginPivotCacheDef\" },\n0x00B4: { n:\"BrtEndPivotCacheDef\" },\n0x00B5: { n:\"BrtBeginPCDFields\" },\n0x00B6: { n:\"BrtEndPCDFields\" },\n0x00B7: { n:\"BrtBeginPCDField\" },\n0x00B8: { n:\"BrtEndPCDField\" },\n0x00B9: { n:\"BrtBeginPCDSource\" },\n0x00BA: { n:\"BrtEndPCDSource\" },\n0x00BB: { n:\"BrtBeginPCDSRange\" },\n0x00BC: { n:\"BrtEndPCDSRange\" },\n0x00BD: { n:\"BrtBeginPCDFAtbl\" },\n0x00BE: { n:\"BrtEndPCDFAtbl\" },\n0x00BF: { n:\"BrtBeginPCDIRun\" },\n0x00C0: { n:\"BrtEndPCDIRun\" },\n0x00C1: { n:\"BrtBeginPivotCacheRecords\" },\n0x00C2: { n:\"BrtEndPivotCacheRecords\" },\n0x00C3: { n:\"BrtBeginPCDHierarchies\" },\n0x00C4: { n:\"BrtEndPCDHierarchies\" },\n0x00C5: { n:\"BrtBeginPCDHierarchy\" },\n0x00C6: { n:\"BrtEndPCDHierarchy\" },\n0x00C7: { n:\"BrtBeginPCDHFieldsUsage\" },\n0x00C8: { n:\"BrtEndPCDHFieldsUsage\" },\n0x00C9: { n:\"BrtBeginExtConnection\" },\n0x00CA: { n:\"BrtEndExtConnection\" },\n0x00CB: { n:\"BrtBeginECDbProps\" },\n0x00CC: { n:\"BrtEndECDbProps\" },\n0x00CD: { n:\"BrtBeginECOlapProps\" },\n0x00CE: { n:\"BrtEndECOlapProps\" },\n0x00CF: { n:\"BrtBeginPCDSConsol\" },\n0x00D0: { n:\"BrtEndPCDSConsol\" },\n0x00D1: { n:\"BrtBeginPCDSCPages\" },\n0x00D2: { n:\"BrtEndPCDSCPages\" },\n0x00D3: { n:\"BrtBeginPCDSCPage\" },\n0x00D4: { n:\"BrtEndPCDSCPage\" },\n0x00D5: { n:\"BrtBeginPCDSCPItem\" },\n0x00D6: { n:\"BrtEndPCDSCPItem\" },\n0x00D7: { n:\"BrtBeginPCDSCSets\" },\n0x00D8: { n:\"BrtEndPCDSCSets\" },\n0x00D9: { n:\"BrtBeginPCDSCSet\" },\n0x00DA: { n:\"BrtEndPCDSCSet\" },\n0x00DB: { n:\"BrtBeginPCDFGroup\" },\n0x00DC: { n:\"BrtEndPCDFGroup\" },\n0x00DD: { n:\"BrtBeginPCDFGItems\" },\n0x00DE: { n:\"BrtEndPCDFGItems\" },\n0x00DF: { n:\"BrtBeginPCDFGRange\" },\n0x00E0: { n:\"BrtEndPCDFGRange\" },\n0x00E1: { n:\"BrtBeginPCDFGDiscrete\" },\n0x00E2: { n:\"BrtEndPCDFGDiscrete\" },\n0x00E3: { n:\"BrtBeginPCDSDTupleCache\" },\n0x00E4: { n:\"BrtEndPCDSDTupleCache\" },\n0x00E5: { n:\"BrtBeginPCDSDTCEntries\" },\n0x00E6: { n:\"BrtEndPCDSDTCEntries\" },\n0x00E7: { n:\"BrtBeginPCDSDTCEMembers\" },\n0x00E8: { n:\"BrtEndPCDSDTCEMembers\" },\n0x00E9: { n:\"BrtBeginPCDSDTCEMember\" },\n0x00EA: { n:\"BrtEndPCDSDTCEMember\" },\n0x00EB: { n:\"BrtBeginPCDSDTCQueries\" },\n0x00EC: { n:\"BrtEndPCDSDTCQueries\" },\n0x00ED: { n:\"BrtBeginPCDSDTCQuery\" },\n0x00EE: { n:\"BrtEndPCDSDTCQuery\" },\n0x00EF: { n:\"BrtBeginPCDSDTCSets\" },\n0x00F0: { n:\"BrtEndPCDSDTCSets\" },\n0x00F1: { n:\"BrtBeginPCDSDTCSet\" },\n0x00F2: { n:\"BrtEndPCDSDTCSet\" },\n0x00F3: { n:\"BrtBeginPCDCalcItems\" },\n0x00F4: { n:\"BrtEndPCDCalcItems\" },\n0x00F5: { n:\"BrtBeginPCDCalcItem\" },\n0x00F6: { n:\"BrtEndPCDCalcItem\" },\n0x00F7: { n:\"BrtBeginPRule\" },\n0x00F8: { n:\"BrtEndPRule\" },\n0x00F9: { n:\"BrtBeginPRFilters\" },\n0x00FA: { n:\"BrtEndPRFilters\" },\n0x00FB: { n:\"BrtBeginPRFilter\" },\n0x00FC: { n:\"BrtEndPRFilter\" },\n0x00FD: { n:\"BrtBeginPNames\" },\n0x00FE: { n:\"BrtEndPNames\" },\n0x00FF: { n:\"BrtBeginPName\" },\n0x0100: { n:\"BrtEndPName\" },\n0x0101: { n:\"BrtBeginPNPairs\" },\n0x0102: { n:\"BrtEndPNPairs\" },\n0x0103: { n:\"BrtBeginPNPair\" },\n0x0104: { n:\"BrtEndPNPair\" },\n0x0105: { n:\"BrtBeginECWebProps\" },\n0x0106: { n:\"BrtEndECWebProps\" },\n0x0107: { n:\"BrtBeginEcWpTables\" },\n0x0108: { n:\"BrtEndECWPTables\" },\n0x0109: { n:\"BrtBeginECParams\" },\n0x010A: { n:\"BrtEndECParams\" },\n0x010B: { n:\"BrtBeginECParam\" },\n0x010C: { n:\"BrtEndECParam\" },\n0x010D: { n:\"BrtBeginPCDKPIs\" },\n0x010E: { n:\"BrtEndPCDKPIs\" },\n0x010F: { n:\"BrtBeginPCDKPI\" },\n0x0110: { n:\"BrtEndPCDKPI\" },\n0x0111: { n:\"BrtBeginDims\" },\n0x0112: { n:\"BrtEndDims\" },\n0x0113: { n:\"BrtBeginDim\" },\n0x0114: { n:\"BrtEndDim\" },\n0x0115: { n:\"BrtIndexPartEnd\" },\n0x0116: { n:\"BrtBeginStyleSheet\" },\n0x0117: { n:\"BrtEndStyleSheet\" },\n0x0118: { n:\"BrtBeginSXView\" },\n0x0119: { n:\"BrtEndSXVI\" },\n0x011A: { n:\"BrtBeginSXVI\" },\n0x011B: { n:\"BrtBeginSXVIs\" },\n0x011C: { n:\"BrtEndSXVIs\" },\n0x011D: { n:\"BrtBeginSXVD\" },\n0x011E: { n:\"BrtEndSXVD\" },\n0x011F: { n:\"BrtBeginSXVDs\" },\n0x0120: { n:\"BrtEndSXVDs\" },\n0x0121: { n:\"BrtBeginSXPI\" },\n0x0122: { n:\"BrtEndSXPI\" },\n0x0123: { n:\"BrtBeginSXPIs\" },\n0x0124: { n:\"BrtEndSXPIs\" },\n0x0125: { n:\"BrtBeginSXDI\" },\n0x0126: { n:\"BrtEndSXDI\" },\n0x0127: { n:\"BrtBeginSXDIs\" },\n0x0128: { n:\"BrtEndSXDIs\" },\n0x0129: { n:\"BrtBeginSXLI\" },\n0x012A: { n:\"BrtEndSXLI\" },\n0x012B: { n:\"BrtBeginSXLIRws\" },\n0x012C: { n:\"BrtEndSXLIRws\" },\n0x012D: { n:\"BrtBeginSXLICols\" },\n0x012E: { n:\"BrtEndSXLICols\" },\n0x012F: { n:\"BrtBeginSXFormat\" },\n0x0130: { n:\"BrtEndSXFormat\" },\n0x0131: { n:\"BrtBeginSXFormats\" },\n0x0132: { n:\"BrtEndSxFormats\" },\n0x0133: { n:\"BrtBeginSxSelect\" },\n0x0134: { n:\"BrtEndSxSelect\" },\n0x0135: { n:\"BrtBeginISXVDRws\" },\n0x0136: { n:\"BrtEndISXVDRws\" },\n0x0137: { n:\"BrtBeginISXVDCols\" },\n0x0138: { n:\"BrtEndISXVDCols\" },\n0x0139: { n:\"BrtEndSXLocation\" },\n0x013A: { n:\"BrtBeginSXLocation\" },\n0x013B: { n:\"BrtEndSXView\" },\n0x013C: { n:\"BrtBeginSXTHs\" },\n0x013D: { n:\"BrtEndSXTHs\" },\n0x013E: { n:\"BrtBeginSXTH\" },\n0x013F: { n:\"BrtEndSXTH\" },\n0x0140: { n:\"BrtBeginISXTHRws\" },\n0x0141: { n:\"BrtEndISXTHRws\" },\n0x0142: { n:\"BrtBeginISXTHCols\" },\n0x0143: { n:\"BrtEndISXTHCols\" },\n0x0144: { n:\"BrtBeginSXTDMPS\" },\n0x0145: { n:\"BrtEndSXTDMPs\" },\n0x0146: { n:\"BrtBeginSXTDMP\" },\n0x0147: { n:\"BrtEndSXTDMP\" },\n0x0148: { n:\"BrtBeginSXTHItems\" },\n0x0149: { n:\"BrtEndSXTHItems\" },\n0x014A: { n:\"BrtBeginSXTHItem\" },\n0x014B: { n:\"BrtEndSXTHItem\" },\n0x014C: { n:\"BrtBeginMetadata\" },\n0x014D: { n:\"BrtEndMetadata\" },\n0x014E: { n:\"BrtBeginEsmdtinfo\" },\n0x014F: { n:\"BrtMdtinfo\" },\n0x0150: { n:\"BrtEndEsmdtinfo\" },\n0x0151: { n:\"BrtBeginEsmdb\" },\n0x0152: { n:\"BrtEndEsmdb\" },\n0x0153: { n:\"BrtBeginEsfmd\" },\n0x0154: { n:\"BrtEndEsfmd\" },\n0x0155: { n:\"BrtBeginSingleCells\" },\n0x0156: { n:\"BrtEndSingleCells\" },\n0x0157: { n:\"BrtBeginList\" },\n0x0158: { n:\"BrtEndList\" },\n0x0159: { n:\"BrtBeginListCols\" },\n0x015A: { n:\"BrtEndListCols\" },\n0x015B: { n:\"BrtBeginListCol\" },\n0x015C: { n:\"BrtEndListCol\" },\n0x015D: { n:\"BrtBeginListXmlCPr\" },\n0x015E: { n:\"BrtEndListXmlCPr\" },\n0x015F: { n:\"BrtListCCFmla\" },\n0x0160: { n:\"BrtListTrFmla\" },\n0x0161: { n:\"BrtBeginExternals\" },\n0x0162: { n:\"BrtEndExternals\" },\n0x0163: { n:\"BrtSupBookSrc\", f:parse_RelID},\n0x0165: { n:\"BrtSupSelf\" },\n0x0166: { n:\"BrtSupSame\" },\n0x0167: { n:\"BrtSupTabs\" },\n0x0168: { n:\"BrtBeginSupBook\" },\n0x0169: { n:\"BrtPlaceholderName\" },\n0x016A: { n:\"BrtExternSheet\", f:parse_ExternSheet },\n0x016B: { n:\"BrtExternTableStart\" },\n0x016C: { n:\"BrtExternTableEnd\" },\n0x016E: { n:\"BrtExternRowHdr\" },\n0x016F: { n:\"BrtExternCellBlank\" },\n0x0170: { n:\"BrtExternCellReal\" },\n0x0171: { n:\"BrtExternCellBool\" },\n0x0172: { n:\"BrtExternCellError\" },\n0x0173: { n:\"BrtExternCellString\" },\n0x0174: { n:\"BrtBeginEsmdx\" },\n0x0175: { n:\"BrtEndEsmdx\" },\n0x0176: { n:\"BrtBeginMdxSet\" },\n0x0177: { n:\"BrtEndMdxSet\" },\n0x0178: { n:\"BrtBeginMdxMbrProp\" },\n0x0179: { n:\"BrtEndMdxMbrProp\" },\n0x017A: { n:\"BrtBeginMdxKPI\" },\n0x017B: { n:\"BrtEndMdxKPI\" },\n0x017C: { n:\"BrtBeginEsstr\" },\n0x017D: { n:\"BrtEndEsstr\" },\n0x017E: { n:\"BrtBeginPRFItem\" },\n0x017F: { n:\"BrtEndPRFItem\" },\n0x0180: { n:\"BrtBeginPivotCacheIDs\" },\n0x0181: { n:\"BrtEndPivotCacheIDs\" },\n0x0182: { n:\"BrtBeginPivotCacheID\" },\n0x0183: { n:\"BrtEndPivotCacheID\" },\n0x0184: { n:\"BrtBeginISXVIs\" },\n0x0185: { n:\"BrtEndISXVIs\" },\n0x0186: { n:\"BrtBeginColInfos\" },\n0x0187: { n:\"BrtEndColInfos\" },\n0x0188: { n:\"BrtBeginRwBrk\" },\n0x0189: { n:\"BrtEndRwBrk\" },\n0x018A: { n:\"BrtBeginColBrk\" },\n0x018B: { n:\"BrtEndColBrk\" },\n0x018C: { n:\"BrtBrk\" },\n0x018D: { n:\"BrtUserBookView\" },\n0x018E: { n:\"BrtInfo\" },\n0x018F: { n:\"BrtCUsr\" },\n0x0190: { n:\"BrtUsr\" },\n0x0191: { n:\"BrtBeginUsers\" },\n0x0193: { n:\"BrtEOF\" },\n0x0194: { n:\"BrtUCR\" },\n0x0195: { n:\"BrtRRInsDel\" },\n0x0196: { n:\"BrtRREndInsDel\" },\n0x0197: { n:\"BrtRRMove\" },\n0x0198: { n:\"BrtRREndMove\" },\n0x0199: { n:\"BrtRRChgCell\" },\n0x019A: { n:\"BrtRREndChgCell\" },\n0x019B: { n:\"BrtRRHeader\" },\n0x019C: { n:\"BrtRRUserView\" },\n0x019D: { n:\"BrtRRRenSheet\" },\n0x019E: { n:\"BrtRRInsertSh\" },\n0x019F: { n:\"BrtRRDefName\" },\n0x01A0: { n:\"BrtRRNote\" },\n0x01A1: { n:\"BrtRRConflict\" },\n0x01A2: { n:\"BrtRRTQSIF\" },\n0x01A3: { n:\"BrtRRFormat\" },\n0x01A4: { n:\"BrtRREndFormat\" },\n0x01A5: { n:\"BrtRRAutoFmt\" },\n0x01A6: { n:\"BrtBeginUserShViews\" },\n0x01A7: { n:\"BrtBeginUserShView\" },\n0x01A8: { n:\"BrtEndUserShView\" },\n0x01A9: { n:\"BrtEndUserShViews\" },\n0x01AA: { n:\"BrtArrFmla\", f:parse_BrtArrFmla },\n0x01AB: { n:\"BrtShrFmla\", f:parse_BrtShrFmla },\n0x01AC: { n:\"BrtTable\" },\n0x01AD: { n:\"BrtBeginExtConnections\" },\n0x01AE: { n:\"BrtEndExtConnections\" },\n0x01AF: { n:\"BrtBeginPCDCalcMems\" },\n0x01B0: { n:\"BrtEndPCDCalcMems\" },\n0x01B1: { n:\"BrtBeginPCDCalcMem\" },\n0x01B2: { n:\"BrtEndPCDCalcMem\" },\n0x01B3: { n:\"BrtBeginPCDHGLevels\" },\n0x01B4: { n:\"BrtEndPCDHGLevels\" },\n0x01B5: { n:\"BrtBeginPCDHGLevel\" },\n0x01B6: { n:\"BrtEndPCDHGLevel\" },\n0x01B7: { n:\"BrtBeginPCDHGLGroups\" },\n0x01B8: { n:\"BrtEndPCDHGLGroups\" },\n0x01B9: { n:\"BrtBeginPCDHGLGroup\" },\n0x01BA: { n:\"BrtEndPCDHGLGroup\" },\n0x01BB: { n:\"BrtBeginPCDHGLGMembers\" },\n0x01BC: { n:\"BrtEndPCDHGLGMembers\" },\n0x01BD: { n:\"BrtBeginPCDHGLGMember\" },\n0x01BE: { n:\"BrtEndPCDHGLGMember\" },\n0x01BF: { n:\"BrtBeginQSI\" },\n0x01C0: { n:\"BrtEndQSI\" },\n0x01C1: { n:\"BrtBeginQSIR\" },\n0x01C2: { n:\"BrtEndQSIR\" },\n0x01C3: { n:\"BrtBeginDeletedNames\" },\n0x01C4: { n:\"BrtEndDeletedNames\" },\n0x01C5: { n:\"BrtBeginDeletedName\" },\n0x01C6: { n:\"BrtEndDeletedName\" },\n0x01C7: { n:\"BrtBeginQSIFs\" },\n0x01C8: { n:\"BrtEndQSIFs\" },\n0x01C9: { n:\"BrtBeginQSIF\" },\n0x01CA: { n:\"BrtEndQSIF\" },\n0x01CB: { n:\"BrtBeginAutoSortScope\" },\n0x01CC: { n:\"BrtEndAutoSortScope\" },\n0x01CD: { n:\"BrtBeginConditionalFormatting\" },\n0x01CE: { n:\"BrtEndConditionalFormatting\" },\n0x01CF: { n:\"BrtBeginCFRule\" },\n0x01D0: { n:\"BrtEndCFRule\" },\n0x01D1: { n:\"BrtBeginIconSet\" },\n0x01D2: { n:\"BrtEndIconSet\" },\n0x01D3: { n:\"BrtBeginDatabar\" },\n0x01D4: { n:\"BrtEndDatabar\" },\n0x01D5: { n:\"BrtBeginColorScale\" },\n0x01D6: { n:\"BrtEndColorScale\" },\n0x01D7: { n:\"BrtCFVO\" },\n0x01D8: { n:\"BrtExternValueMeta\" },\n0x01D9: { n:\"BrtBeginColorPalette\" },\n0x01DA: { n:\"BrtEndColorPalette\" },\n0x01DB: { n:\"BrtIndexedColor\" },\n0x01DC: { n:\"BrtMargins\", f:parse_BrtMargins },\n0x01DD: { n:\"BrtPrintOptions\" },\n0x01DE: { n:\"BrtPageSetup\" },\n0x01DF: { n:\"BrtBeginHeaderFooter\" },\n0x01E0: { n:\"BrtEndHeaderFooter\" },\n0x01E1: { n:\"BrtBeginSXCrtFormat\" },\n0x01E2: { n:\"BrtEndSXCrtFormat\" },\n0x01E3: { n:\"BrtBeginSXCrtFormats\" },\n0x01E4: { n:\"BrtEndSXCrtFormats\" },\n0x01E5: { n:\"BrtWsFmtInfo\", f:parse_BrtWsFmtInfo },\n0x01E6: { n:\"BrtBeginMgs\" },\n0x01E7: { n:\"BrtEndMGs\" },\n0x01E8: { n:\"BrtBeginMGMaps\" },\n0x01E9: { n:\"BrtEndMGMaps\" },\n0x01EA: { n:\"BrtBeginMG\" },\n0x01EB: { n:\"BrtEndMG\" },\n0x01EC: { n:\"BrtBeginMap\" },\n0x01ED: { n:\"BrtEndMap\" },\n0x01EE: { n:\"BrtHLink\", f:parse_BrtHLink },\n0x01EF: { n:\"BrtBeginDCon\" },\n0x01F0: { n:\"BrtEndDCon\" },\n0x01F1: { n:\"BrtBeginDRefs\" },\n0x01F2: { n:\"BrtEndDRefs\" },\n0x01F3: { n:\"BrtDRef\" },\n0x01F4: { n:\"BrtBeginScenMan\" },\n0x01F5: { n:\"BrtEndScenMan\" },\n0x01F6: { n:\"BrtBeginSct\" },\n0x01F7: { n:\"BrtEndSct\" },\n0x01F8: { n:\"BrtSlc\" },\n0x01F9: { n:\"BrtBeginDXFs\" },\n0x01FA: { n:\"BrtEndDXFs\" },\n0x01FB: { n:\"BrtDXF\" },\n0x01FC: { n:\"BrtBeginTableStyles\" },\n0x01FD: { n:\"BrtEndTableStyles\" },\n0x01FE: { n:\"BrtBeginTableStyle\" },\n0x01FF: { n:\"BrtEndTableStyle\" },\n0x0200: { n:\"BrtTableStyleElement\" },\n0x0201: { n:\"BrtTableStyleClient\" },\n0x0202: { n:\"BrtBeginVolDeps\" },\n0x0203: { n:\"BrtEndVolDeps\" },\n0x0204: { n:\"BrtBeginVolType\" },\n0x0205: { n:\"BrtEndVolType\" },\n0x0206: { n:\"BrtBeginVolMain\" },\n0x0207: { n:\"BrtEndVolMain\" },\n0x0208: { n:\"BrtBeginVolTopic\" },\n0x0209: { n:\"BrtEndVolTopic\" },\n0x020A: { n:\"BrtVolSubtopic\" },\n0x020B: { n:\"BrtVolRef\" },\n0x020C: { n:\"BrtVolNum\" },\n0x020D: { n:\"BrtVolErr\" },\n0x020E: { n:\"BrtVolStr\" },\n0x020F: { n:\"BrtVolBool\" },\n0x0210: { n:\"BrtBeginCalcChain$\" },\n0x0211: { n:\"BrtEndCalcChain$\" },\n0x0212: { n:\"BrtBeginSortState\" },\n0x0213: { n:\"BrtEndSortState\" },\n0x0214: { n:\"BrtBeginSortCond\" },\n0x0215: { n:\"BrtEndSortCond\" },\n0x0216: { n:\"BrtBookProtection\" },\n0x0217: { n:\"BrtSheetProtection\" },\n0x0218: { n:\"BrtRangeProtection\" },\n0x0219: { n:\"BrtPhoneticInfo\" },\n0x021A: { n:\"BrtBeginECTxtWiz\" },\n0x021B: { n:\"BrtEndECTxtWiz\" },\n0x021C: { n:\"BrtBeginECTWFldInfoLst\" },\n0x021D: { n:\"BrtEndECTWFldInfoLst\" },\n0x021E: { n:\"BrtBeginECTwFldInfo\" },\n0x0224: { n:\"BrtFileSharing\" },\n0x0225: { n:\"BrtOleSize\" },\n0x0226: { n:\"BrtDrawing\", f:parse_RelID },\n0x0227: { n:\"BrtLegacyDrawing\" },\n0x0228: { n:\"BrtLegacyDrawingHF\" },\n0x0229: { n:\"BrtWebOpt\" },\n0x022A: { n:\"BrtBeginWebPubItems\" },\n0x022B: { n:\"BrtEndWebPubItems\" },\n0x022C: { n:\"BrtBeginWebPubItem\" },\n0x022D: { n:\"BrtEndWebPubItem\" },\n0x022E: { n:\"BrtBeginSXCondFmt\" },\n0x022F: { n:\"BrtEndSXCondFmt\" },\n0x0230: { n:\"BrtBeginSXCondFmts\" },\n0x0231: { n:\"BrtEndSXCondFmts\" },\n0x0232: { n:\"BrtBkHim\" },\n0x0234: { n:\"BrtColor\" },\n0x0235: { n:\"BrtBeginIndexedColors\" },\n0x0236: { n:\"BrtEndIndexedColors\" },\n0x0239: { n:\"BrtBeginMRUColors\" },\n0x023A: { n:\"BrtEndMRUColors\" },\n0x023C: { n:\"BrtMRUColor\" },\n0x023D: { n:\"BrtBeginDVals\" },\n0x023E: { n:\"BrtEndDVals\" },\n0x0241: { n:\"BrtSupNameStart\" },\n0x0242: { n:\"BrtSupNameValueStart\" },\n0x0243: { n:\"BrtSupNameValueEnd\" },\n0x0244: { n:\"BrtSupNameNum\" },\n0x0245: { n:\"BrtSupNameErr\" },\n0x0246: { n:\"BrtSupNameSt\" },\n0x0247: { n:\"BrtSupNameNil\" },\n0x0248: { n:\"BrtSupNameBool\" },\n0x0249: { n:\"BrtSupNameFmla\" },\n0x024A: { n:\"BrtSupNameBits\" },\n0x024B: { n:\"BrtSupNameEnd\" },\n0x024C: { n:\"BrtEndSupBook\" },\n0x024D: { n:\"BrtCellSmartTagProperty\" },\n0x024E: { n:\"BrtBeginCellSmartTag\" },\n0x024F: { n:\"BrtEndCellSmartTag\" },\n0x0250: { n:\"BrtBeginCellSmartTags\" },\n0x0251: { n:\"BrtEndCellSmartTags\" },\n0x0252: { n:\"BrtBeginSmartTags\" },\n0x0253: { n:\"BrtEndSmartTags\" },\n0x0254: { n:\"BrtSmartTagType\" },\n0x0255: { n:\"BrtBeginSmartTagTypes\" },\n0x0256: { n:\"BrtEndSmartTagTypes\" },\n0x0257: { n:\"BrtBeginSXFilters\" },\n0x0258: { n:\"BrtEndSXFilters\" },\n0x0259: { n:\"BrtBeginSXFILTER\" },\n0x025A: { n:\"BrtEndSXFilter\" },\n0x025B: { n:\"BrtBeginFills\" },\n0x025C: { n:\"BrtEndFills\" },\n0x025D: { n:\"BrtBeginCellWatches\" },\n0x025E: { n:\"BrtEndCellWatches\" },\n0x025F: { n:\"BrtCellWatch\" },\n0x0260: { n:\"BrtBeginCRErrs\" },\n0x0261: { n:\"BrtEndCRErrs\" },\n0x0262: { n:\"BrtCrashRecErr\" },\n0x0263: { n:\"BrtBeginFonts\" },\n0x0264: { n:\"BrtEndFonts\" },\n0x0265: { n:\"BrtBeginBorders\" },\n0x0266: { n:\"BrtEndBorders\" },\n0x0267: { n:\"BrtBeginFmts\" },\n0x0268: { n:\"BrtEndFmts\" },\n0x0269: { n:\"BrtBeginCellXFs\" },\n0x026A: { n:\"BrtEndCellXFs\" },\n0x026B: { n:\"BrtBeginStyles\" },\n0x026C: { n:\"BrtEndStyles\" },\n0x0271: { n:\"BrtBigName\" },\n0x0272: { n:\"BrtBeginCellStyleXFs\" },\n0x0273: { n:\"BrtEndCellStyleXFs\" },\n0x0274: { n:\"BrtBeginComments\" },\n0x0275: { n:\"BrtEndComments\" },\n0x0276: { n:\"BrtBeginCommentAuthors\" },\n0x0277: { n:\"BrtEndCommentAuthors\" },\n0x0278: { n:\"BrtCommentAuthor\", f:parse_BrtCommentAuthor },\n0x0279: { n:\"BrtBeginCommentList\" },\n0x027A: { n:\"BrtEndCommentList\" },\n0x027B: { n:\"BrtBeginComment\", f:parse_BrtBeginComment},\n0x027C: { n:\"BrtEndComment\" },\n0x027D: { n:\"BrtCommentText\", f:parse_BrtCommentText },\n0x027E: { n:\"BrtBeginOleObjects\" },\n0x027F: { n:\"BrtOleObject\" },\n0x0280: { n:\"BrtEndOleObjects\" },\n0x0281: { n:\"BrtBeginSxrules\" },\n0x0282: { n:\"BrtEndSxRules\" },\n0x0283: { n:\"BrtBeginActiveXControls\" },\n0x0284: { n:\"BrtActiveX\" },\n0x0285: { n:\"BrtEndActiveXControls\" },\n0x0286: { n:\"BrtBeginPCDSDTCEMembersSortBy\" },\n0x0288: { n:\"BrtBeginCellIgnoreECs\" },\n0x0289: { n:\"BrtCellIgnoreEC\" },\n0x028A: { n:\"BrtEndCellIgnoreECs\" },\n0x028B: { n:\"BrtCsProp\", f:parse_BrtCsProp },\n0x028C: { n:\"BrtCsPageSetup\" },\n0x028D: { n:\"BrtBeginUserCsViews\" },\n0x028E: { n:\"BrtEndUserCsViews\" },\n0x028F: { n:\"BrtBeginUserCsView\" },\n0x0290: { n:\"BrtEndUserCsView\" },\n0x0291: { n:\"BrtBeginPcdSFCIEntries\" },\n0x0292: { n:\"BrtEndPCDSFCIEntries\" },\n0x0293: { n:\"BrtPCDSFCIEntry\" },\n0x0294: { n:\"BrtBeginListParts\" },\n0x0295: { n:\"BrtListPart\" },\n0x0296: { n:\"BrtEndListParts\" },\n0x0297: { n:\"BrtSheetCalcProp\" },\n0x0298: { n:\"BrtBeginFnGroup\" },\n0x0299: { n:\"BrtFnGroup\" },\n0x029A: { n:\"BrtEndFnGroup\" },\n0x029B: { n:\"BrtSupAddin\" },\n0x029C: { n:\"BrtSXTDMPOrder\" },\n0x029D: { n:\"BrtCsProtection\" },\n0x029F: { n:\"BrtBeginWsSortMap\" },\n0x02A0: { n:\"BrtEndWsSortMap\" },\n0x02A1: { n:\"BrtBeginRRSort\" },\n0x02A2: { n:\"BrtEndRRSort\" },\n0x02A3: { n:\"BrtRRSortItem\" },\n0x02A4: { n:\"BrtFileSharingIso\" },\n0x02A5: { n:\"BrtBookProtectionIso\" },\n0x02A6: { n:\"BrtSheetProtectionIso\" },\n0x02A7: { n:\"BrtCsProtectionIso\" },\n0x02A8: { n:\"BrtRangeProtectionIso\" },\n0x02A9: { n:\"BrtDValList\" },\n0x0400: { n:\"BrtRwDescent\" },\n0x0401: { n:\"BrtKnownFonts\" },\n0x0402: { n:\"BrtBeginSXTupleSet\" },\n0x0403: { n:\"BrtEndSXTupleSet\" },\n0x0404: { n:\"BrtBeginSXTupleSetHeader\" },\n0x0405: { n:\"BrtEndSXTupleSetHeader\" },\n0x0406: { n:\"BrtSXTupleSetHeaderItem\" },\n0x0407: { n:\"BrtBeginSXTupleSetData\" },\n0x0408: { n:\"BrtEndSXTupleSetData\" },\n0x0409: { n:\"BrtBeginSXTupleSetRow\" },\n0x040A: { n:\"BrtEndSXTupleSetRow\" },\n0x040B: { n:\"BrtSXTupleSetRowItem\" },\n0x040C: { n:\"BrtNameExt\" },\n0x040D: { n:\"BrtPCDH14\" },\n0x040E: { n:\"BrtBeginPCDCalcMem14\" },\n0x040F: { n:\"BrtEndPCDCalcMem14\" },\n0x0410: { n:\"BrtSXTH14\" },\n0x0411: { n:\"BrtBeginSparklineGroup\" },\n0x0412: { n:\"BrtEndSparklineGroup\" },\n0x0413: { n:\"BrtSparkline\" },\n0x0414: { n:\"BrtSXDI14\" },\n0x0415: { n:\"BrtWsFmtInfoEx14\" },\n0x0416: { n:\"BrtBeginConditionalFormatting14\" },\n0x0417: { n:\"BrtEndConditionalFormatting14\" },\n0x0418: { n:\"BrtBeginCFRule14\" },\n0x0419: { n:\"BrtEndCFRule14\" },\n0x041A: { n:\"BrtCFVO14\" },\n0x041B: { n:\"BrtBeginDatabar14\" },\n0x041C: { n:\"BrtBeginIconSet14\" },\n0x041D: { n:\"BrtDVal14\", f: parse_BrtDVal14 },\n0x041E: { n:\"BrtBeginDVals14\" },\n0x041F: { n:\"BrtColor14\" },\n0x0420: { n:\"BrtBeginSparklines\" },\n0x0421: { n:\"BrtEndSparklines\" },\n0x0422: { n:\"BrtBeginSparklineGroups\" },\n0x0423: { n:\"BrtEndSparklineGroups\" },\n0x0425: { n:\"BrtSXVD14\" },\n0x0426: { n:\"BrtBeginSXView14\" },\n0x0427: { n:\"BrtEndSXView14\" },\n0x0428: { n:\"BrtBeginSXView16\" },\n0x0429: { n:\"BrtEndSXView16\" },\n0x042A: { n:\"BrtBeginPCD14\" },\n0x042B: { n:\"BrtEndPCD14\" },\n0x042C: { n:\"BrtBeginExtConn14\" },\n0x042D: { n:\"BrtEndExtConn14\" },\n0x042E: { n:\"BrtBeginSlicerCacheIDs\" },\n0x042F: { n:\"BrtEndSlicerCacheIDs\" },\n0x0430: { n:\"BrtBeginSlicerCacheID\" },\n0x0431: { n:\"BrtEndSlicerCacheID\" },\n0x0433: { n:\"BrtBeginSlicerCache\" },\n0x0434: { n:\"BrtEndSlicerCache\" },\n0x0435: { n:\"BrtBeginSlicerCacheDef\" },\n0x0436: { n:\"BrtEndSlicerCacheDef\" },\n0x0437: { n:\"BrtBeginSlicersEx\" },\n0x0438: { n:\"BrtEndSlicersEx\" },\n0x0439: { n:\"BrtBeginSlicerEx\" },\n0x043A: { n:\"BrtEndSlicerEx\" },\n0x043B: { n:\"BrtBeginSlicer\" },\n0x043C: { n:\"BrtEndSlicer\" },\n0x043D: { n:\"BrtSlicerCachePivotTables\" },\n0x043E: { n:\"BrtBeginSlicerCacheOlapImpl\" },\n0x043F: { n:\"BrtEndSlicerCacheOlapImpl\" },\n0x0440: { n:\"BrtBeginSlicerCacheLevelsData\" },\n0x0441: { n:\"BrtEndSlicerCacheLevelsData\" },\n0x0442: { n:\"BrtBeginSlicerCacheLevelData\" },\n0x0443: { n:\"BrtEndSlicerCacheLevelData\" },\n0x0444: { n:\"BrtBeginSlicerCacheSiRanges\" },\n0x0445: { n:\"BrtEndSlicerCacheSiRanges\" },\n0x0446: { n:\"BrtBeginSlicerCacheSiRange\" },\n0x0447: { n:\"BrtEndSlicerCacheSiRange\" },\n0x0448: { n:\"BrtSlicerCacheOlapItem\" },\n0x0449: { n:\"BrtBeginSlicerCacheSelections\" },\n0x044A: { n:\"BrtSlicerCacheSelection\" },\n0x044B: { n:\"BrtEndSlicerCacheSelections\" },\n0x044C: { n:\"BrtBeginSlicerCacheNative\" },\n0x044D: { n:\"BrtEndSlicerCacheNative\" },\n0x044E: { n:\"BrtSlicerCacheNativeItem\" },\n0x044F: { n:\"BrtRangeProtection14\" },\n0x0450: { n:\"BrtRangeProtectionIso14\" },\n0x0451: { n:\"BrtCellIgnoreEC14\" },\n0x0457: { n:\"BrtList14\" },\n0x0458: { n:\"BrtCFIcon\" },\n0x0459: { n:\"BrtBeginSlicerCachesPivotCacheIDs\" },\n0x045A: { n:\"BrtEndSlicerCachesPivotCacheIDs\" },\n0x045B: { n:\"BrtBeginSlicers\" },\n0x045C: { n:\"BrtEndSlicers\" },\n0x045D: { n:\"BrtWbProp14\" },\n0x045E: { n:\"BrtBeginSXEdit\" },\n0x045F: { n:\"BrtEndSXEdit\" },\n0x0460: { n:\"BrtBeginSXEdits\" },\n0x0461: { n:\"BrtEndSXEdits\" },\n0x0462: { n:\"BrtBeginSXChange\" },\n0x0463: { n:\"BrtEndSXChange\" },\n0x0464: { n:\"BrtBeginSXChanges\" },\n0x0465: { n:\"BrtEndSXChanges\" },\n0x0466: { n:\"BrtSXTupleItems\" },\n0x0468: { n:\"BrtBeginSlicerStyle\" },\n0x0469: { n:\"BrtEndSlicerStyle\" },\n0x046A: { n:\"BrtSlicerStyleElement\" },\n0x046B: { n:\"BrtBeginStyleSheetExt14\" },\n0x046C: { n:\"BrtEndStyleSheetExt14\" },\n0x046D: { n:\"BrtBeginSlicerCachesPivotCacheID\" },\n0x046E: { n:\"BrtEndSlicerCachesPivotCacheID\" },\n0x046F: { n:\"BrtBeginConditionalFormattings\" },\n0x0470: { n:\"BrtEndConditionalFormattings\" },\n0x0471: { n:\"BrtBeginPCDCalcMemExt\" },\n0x0472: { n:\"BrtEndPCDCalcMemExt\" },\n0x0473: { n:\"BrtBeginPCDCalcMemsExt\" },\n0x0474: { n:\"BrtEndPCDCalcMemsExt\" },\n0x0475: { n:\"BrtPCDField14\" },\n0x0476: { n:\"BrtBeginSlicerStyles\" },\n0x0477: { n:\"BrtEndSlicerStyles\" },\n0x0478: { n:\"BrtBeginSlicerStyleElements\" },\n0x0479: { n:\"BrtEndSlicerStyleElements\" },\n0x047A: { n:\"BrtCFRuleExt\" },\n0x047B: { n:\"BrtBeginSXCondFmt14\" },\n0x047C: { n:\"BrtEndSXCondFmt14\" },\n0x047D: { n:\"BrtBeginSXCondFmts14\" },\n0x047E: { n:\"BrtEndSXCondFmts14\" },\n0x0480: { n:\"BrtBeginSortCond14\" },\n0x0481: { n:\"BrtEndSortCond14\" },\n0x0482: { n:\"BrtEndDVals14\" },\n0x0483: { n:\"BrtEndIconSet14\" },\n0x0484: { n:\"BrtEndDatabar14\" },\n0x0485: { n:\"BrtBeginColorScale14\" },\n0x0486: { n:\"BrtEndColorScale14\" },\n0x0487: { n:\"BrtBeginSxrules14\" },\n0x0488: { n:\"BrtEndSxrules14\" },\n0x0489: { n:\"BrtBeginPRule14\" },\n0x048A: { n:\"BrtEndPRule14\" },\n0x048B: { n:\"BrtBeginPRFilters14\" },\n0x048C: { n:\"BrtEndPRFilters14\" },\n0x048D: { n:\"BrtBeginPRFilter14\" },\n0x048E: { n:\"BrtEndPRFilter14\" },\n0x048F: { n:\"BrtBeginPRFItem14\" },\n0x0490: { n:\"BrtEndPRFItem14\" },\n0x0491: { n:\"BrtBeginCellIgnoreECs14\" },\n0x0492: { n:\"BrtEndCellIgnoreECs14\" },\n0x0493: { n:\"BrtDxf14\" },\n0x0494: { n:\"BrtBeginDxF14s\" },\n0x0495: { n:\"BrtEndDxf14s\" },\n0x0499: { n:\"BrtFilter14\" },\n0x049A: { n:\"BrtBeginCustomFilters14\" },\n0x049C: { n:\"BrtCustomFilter14\" },\n0x049D: { n:\"BrtIconFilter14\" },\n0x049E: { n:\"BrtPivotCacheConnectionName\" },\n0x0800: { n:\"BrtBeginDecoupledPivotCacheIDs\" },\n0x0801: { n:\"BrtEndDecoupledPivotCacheIDs\" },\n0x0802: { n:\"BrtDecoupledPivotCacheID\" },\n0x0803: { n:\"BrtBeginPivotTableRefs\" },\n0x0804: { n:\"BrtEndPivotTableRefs\" },\n0x0805: { n:\"BrtPivotTableRef\" },\n0x0806: { n:\"BrtSlicerCacheBookPivotTables\" },\n0x0807: { n:\"BrtBeginSxvcells\" },\n0x0808: { n:\"BrtEndSxvcells\" },\n0x0809: { n:\"BrtBeginSxRow\" },\n0x080A: { n:\"BrtEndSxRow\" },\n0x080C: { n:\"BrtPcdCalcMem15\" },\n0x0813: { n:\"BrtQsi15\" },\n0x0814: { n:\"BrtBeginWebExtensions\" },\n0x0815: { n:\"BrtEndWebExtensions\" },\n0x0816: { n:\"BrtWebExtension\" },\n0x0817: { n:\"BrtAbsPath15\" },\n0x0818: { n:\"BrtBeginPivotTableUISettings\" },\n0x0819: { n:\"BrtEndPivotTableUISettings\" },\n0x081B: { n:\"BrtTableSlicerCacheIDs\" },\n0x081C: { n:\"BrtTableSlicerCacheID\" },\n0x081D: { n:\"BrtBeginTableSlicerCache\" },\n0x081E: { n:\"BrtEndTableSlicerCache\" },\n0x081F: { n:\"BrtSxFilter15\" },\n0x0820: { n:\"BrtBeginTimelineCachePivotCacheIDs\" },\n0x0821: { n:\"BrtEndTimelineCachePivotCacheIDs\" },\n0x0822: { n:\"BrtTimelineCachePivotCacheID\" },\n0x0823: { n:\"BrtBeginTimelineCacheIDs\" },\n0x0824: { n:\"BrtEndTimelineCacheIDs\" },\n0x0825: { n:\"BrtBeginTimelineCacheID\" },\n0x0826: { n:\"BrtEndTimelineCacheID\" },\n0x0827: { n:\"BrtBeginTimelinesEx\" },\n0x0828: { n:\"BrtEndTimelinesEx\" },\n0x0829: { n:\"BrtBeginTimelineEx\" },\n0x082A: { n:\"BrtEndTimelineEx\" },\n0x082B: { n:\"BrtWorkBookPr15\" },\n0x082C: { n:\"BrtPCDH15\" },\n0x082D: { n:\"BrtBeginTimelineStyle\" },\n0x082E: { n:\"BrtEndTimelineStyle\" },\n0x082F: { n:\"BrtTimelineStyleElement\" },\n0x0830: { n:\"BrtBeginTimelineStylesheetExt15\" },\n0x0831: { n:\"BrtEndTimelineStylesheetExt15\" },\n0x0832: { n:\"BrtBeginTimelineStyles\" },\n0x0833: { n:\"BrtEndTimelineStyles\" },\n0x0834: { n:\"BrtBeginTimelineStyleElements\" },\n0x0835: { n:\"BrtEndTimelineStyleElements\" },\n0x0836: { n:\"BrtDxf15\" },\n0x0837: { n:\"BrtBeginDxfs15\" },\n0x0838: { n:\"brtEndDxfs15\" },\n0x0839: { n:\"BrtSlicerCacheHideItemsWithNoData\" },\n0x083A: { n:\"BrtBeginItemUniqueNames\" },\n0x083B: { n:\"BrtEndItemUniqueNames\" },\n0x083C: { n:\"BrtItemUniqueName\" },\n0x083D: { n:\"BrtBeginExtConn15\" },\n0x083E: { n:\"BrtEndExtConn15\" },\n0x083F: { n:\"BrtBeginOledbPr15\" },\n0x0840: { n:\"BrtEndOledbPr15\" },\n0x0841: { n:\"BrtBeginDataFeedPr15\" },\n0x0842: { n:\"BrtEndDataFeedPr15\" },\n0x0843: { n:\"BrtTextPr15\" },\n0x0844: { n:\"BrtRangePr15\" },\n0x0845: { n:\"BrtDbCommand15\" },\n0x0846: { n:\"BrtBeginDbTables15\" },\n0x0847: { n:\"BrtEndDbTables15\" },\n0x0848: { n:\"BrtDbTable15\" },\n0x0849: { n:\"BrtBeginDataModel\" },\n0x084A: { n:\"BrtEndDataModel\" },\n0x084B: { n:\"BrtBeginModelTables\" },\n0x084C: { n:\"BrtEndModelTables\" },\n0x084D: { n:\"BrtModelTable\" },\n0x084E: { n:\"BrtBeginModelRelationships\" },\n0x084F: { n:\"BrtEndModelRelationships\" },\n0x0850: { n:\"BrtModelRelationship\" },\n0x0851: { n:\"BrtBeginECTxtWiz15\" },\n0x0852: { n:\"BrtEndECTxtWiz15\" },\n0x0853: { n:\"BrtBeginECTWFldInfoLst15\" },\n0x0854: { n:\"BrtEndECTWFldInfoLst15\" },\n0x0855: { n:\"BrtBeginECTWFldInfo15\" },\n0x0856: { n:\"BrtFieldListActiveItem\" },\n0x0857: { n:\"BrtPivotCacheIdVersion\" },\n0x0858: { n:\"BrtSXDI15\" },\n0x0859: { n:\"BrtBeginModelTimeGroupings\" },\n0x085A: { n:\"BrtEndModelTimeGroupings\" },\n0x085B: { n:\"BrtBeginModelTimeGrouping\" },\n0x085C: { n:\"BrtEndModelTimeGrouping\" },\n0x085D: { n:\"BrtModelTimeGroupingCalcCol\" },\n0x0C00: { n:\"BrtUid\" },\n0x0C01: { n:\"BrtRevisionPtr\" },\n0x13e7: { n:\"BrtBeginCalcFeatures\" },\n0x13e8: { n:\"BrtEndCalcFeatures\" },\n0x13e9: { n:\"BrtCalcFeature\" },\n0xFFFF: { n:\"\" }\n};\n\nvar XLSBRE = evert_key(XLSBRecordEnum, 'n');\n/*jshint -W069 */\nXLSBRE[\"BrtFRTArchID$\"] = 0x0010;\n/*jshint +W069 */\n\n/* [MS-XLS] 2.3 Record Enumeration (and other sources) */\nvar XLSRecordEnum = {\n\t/* [MS-XLS] 2.3 Record Enumeration 2021-08-17 */\n0x0006: { n:\"Formula\", f:parse_Formula },\n0x000a: { n:'EOF', f:parsenoop2 },\n0x000c: { n:\"CalcCount\", f:parseuint16 },\n0x000d: { n:\"CalcMode\", f:parseuint16 },\n0x000e: { n:\"CalcPrecision\", f:parsebool },\n0x000f: { n:\"CalcRefMode\", f:parsebool },\n0x0010: { n:\"CalcDelta\", f:parse_Xnum },\n0x0011: { n:\"CalcIter\", f:parsebool },\n0x0012: { n:\"Protect\", f:parsebool },\n0x0013: { n:\"Password\", f:parseuint16 },\n0x0014: { n:\"Header\", f:parse_XLHeaderFooter },\n0x0015: { n:\"Footer\", f:parse_XLHeaderFooter },\n0x0017: { n:\"ExternSheet\", f:parse_ExternSheet },\n0x0018: { n:\"Lbl\", f:parse_Lbl },\n0x0019: { n:\"WinProtect\", f:parsebool },\n0x001a: { n:\"VerticalPageBreaks\" },\n0x001b: { n:\"HorizontalPageBreaks\" },\n0x001c: { n:\"Note\", f:parse_Note },\n0x001d: { n:\"Selection\" },\n0x0022: { n:\"Date1904\", f:parsebool },\n0x0023: { n:\"ExternName\", f:parse_ExternName },\n0x0026: { n:\"LeftMargin\", f:parse_Xnum },\n0x0027: { n:\"RightMargin\", f:parse_Xnum },\n0x0028: { n:\"TopMargin\", f:parse_Xnum },\n0x0029: { n:\"BottomMargin\", f:parse_Xnum },\n0x002a: { n:\"PrintRowCol\", f:parsebool },\n0x002b: { n:\"PrintGrid\", f:parsebool },\n0x002f: { n:\"FilePass\", f:parse_FilePass },\n0x0031: { n:\"Font\", f:parse_Font },\n0x0033: { n:\"PrintSize\", f:parseuint16 },\n0x003c: { n:\"Continue\" },\n0x003d: { n:\"Window1\", f:parse_Window1 },\n0x0040: { n:\"Backup\", f:parsebool },\n0x0041: { n:\"Pane\", f:parse_Pane },\n0x0042: { n:'CodePage', f:parseuint16 },\n0x004d: { n:\"Pls\" },\n0x0050: { n:\"DCon\" },\n0x0051: { n:\"DConRef\" },\n0x0052: { n:\"DConName\" },\n0x0055: { n:\"DefColWidth\", f:parseuint16 },\n0x0059: { n:\"XCT\" },\n0x005a: { n:\"CRN\" },\n0x005b: { n:\"FileSharing\" },\n0x005c: { n:'WriteAccess', f:parse_WriteAccess },\n0x005d: { n:\"Obj\", f:parse_Obj },\n0x005e: { n:\"Uncalced\" },\n0x005f: { n:\"CalcSaveRecalc\", f:parsebool },\n0x0060: { n:\"Template\" },\n0x0061: { n:\"Intl\" },\n0x0063: { n:\"ObjProtect\", f:parsebool },\n0x007d: { n:\"ColInfo\", f:parse_ColInfo },\n0x0080: { n:\"Guts\", f:parse_Guts },\n0x0081: { n:\"WsBool\", f:parse_WsBool },\n0x0082: { n:\"GridSet\", f:parseuint16 },\n0x0083: { n:\"HCenter\", f:parsebool },\n0x0084: { n:\"VCenter\", f:parsebool },\n0x0085: { n:'BoundSheet8', f:parse_BoundSheet8 },\n0x0086: { n:\"WriteProtect\" },\n0x008c: { n:\"Country\", f:parse_Country },\n0x008d: { n:\"HideObj\", f:parseuint16 },\n0x0090: { n:\"Sort\" },\n0x0092: { n:\"Palette\", f:parse_Palette },\n0x0097: { n:\"Sync\" },\n0x0098: { n:\"LPr\" },\n0x0099: { n:\"DxGCol\" },\n0x009a: { n:\"FnGroupName\" },\n0x009b: { n:\"FilterMode\" },\n0x009c: { n:\"BuiltInFnGroupCount\", f:parseuint16 },\n0x009d: { n:\"AutoFilterInfo\" },\n0x009e: { n:\"AutoFilter\" },\n0x00a0: { n:\"Scl\", f:parse_Scl },\n0x00a1: { n:\"Setup\", f:parse_Setup },\n0x00ae: { n:\"ScenMan\" },\n0x00af: { n:\"SCENARIO\" },\n0x00b0: { n:\"SxView\" },\n0x00b1: { n:\"Sxvd\" },\n0x00b2: { n:\"SXVI\" },\n0x00b4: { n:\"SxIvd\" },\n0x00b5: { n:\"SXLI\" },\n0x00b6: { n:\"SXPI\" },\n0x00b8: { n:\"DocRoute\" },\n0x00b9: { n:\"RecipName\" },\n0x00bd: { n:\"MulRk\", f:parse_MulRk },\n0x00be: { n:\"MulBlank\", f:parse_MulBlank },\n0x00c1: { n:'Mms', f:parsenoop2 },\n0x00c5: { n:\"SXDI\" },\n0x00c6: { n:\"SXDB\" },\n0x00c7: { n:\"SXFDB\" },\n0x00c8: { n:\"SXDBB\" },\n0x00c9: { n:\"SXNum\" },\n0x00ca: { n:\"SxBool\", f:parsebool },\n0x00cb: { n:\"SxErr\" },\n0x00cc: { n:\"SXInt\" },\n0x00cd: { n:\"SXString\" },\n0x00ce: { n:\"SXDtr\" },\n0x00cf: { n:\"SxNil\" },\n0x00d0: { n:\"SXTbl\" },\n0x00d1: { n:\"SXTBRGIITM\" },\n0x00d2: { n:\"SxTbpg\" },\n0x00d3: { n:\"ObProj\" },\n0x00d5: { n:\"SXStreamID\" },\n0x00d7: { n:\"DBCell\" },\n0x00d8: { n:\"SXRng\" },\n0x00d9: { n:\"SxIsxoper\" },\n0x00da: { n:\"BookBool\", f:parseuint16 },\n0x00dc: { n:\"DbOrParamQry\" },\n0x00dd: { n:\"ScenarioProtect\", f:parsebool },\n0x00de: { n:\"OleObjectSize\" },\n0x00e0: { n:\"XF\", f:parse_XF },\n0x00e1: { n:'InterfaceHdr', f:parse_InterfaceHdr },\n0x00e2: { n:'InterfaceEnd', f:parsenoop2 },\n0x00e3: { n:\"SXVS\" },\n0x00e5: { n:\"MergeCells\", f:parse_MergeCells },\n0x00e9: { n:\"BkHim\" },\n0x00eb: { n:\"MsoDrawingGroup\" },\n0x00ec: { n:\"MsoDrawing\" },\n0x00ed: { n:\"MsoDrawingSelection\" },\n0x00ef: { n:\"PhoneticInfo\" },\n0x00f0: { n:\"SxRule\" },\n0x00f1: { n:\"SXEx\" },\n0x00f2: { n:\"SxFilt\" },\n0x00f4: { n:\"SxDXF\" },\n0x00f5: { n:\"SxItm\" },\n0x00f6: { n:\"SxName\" },\n0x00f7: { n:\"SxSelect\" },\n0x00f8: { n:\"SXPair\" },\n0x00f9: { n:\"SxFmla\" },\n0x00fb: { n:\"SxFormat\" },\n0x00fc: { n:\"SST\", f:parse_SST },\n0x00fd: { n:\"LabelSst\", f:parse_LabelSst },\n0x00ff: { n:\"ExtSST\", f:parse_ExtSST },\n0x0100: { n:\"SXVDEx\" },\n0x0103: { n:\"SXFormula\" },\n0x0122: { n:\"SXDBEx\" },\n0x0137: { n:\"RRDInsDel\" },\n0x0138: { n:\"RRDHead\" },\n0x013b: { n:\"RRDChgCell\" },\n0x013d: { n:\"RRTabId\", f:parseuint16a },\n0x013e: { n:\"RRDRenSheet\" },\n0x013f: { n:\"RRSort\" },\n0x0140: { n:\"RRDMove\" },\n0x014a: { n:\"RRFormat\" },\n0x014b: { n:\"RRAutoFmt\" },\n0x014d: { n:\"RRInsertSh\" },\n0x014e: { n:\"RRDMoveBegin\" },\n0x014f: { n:\"RRDMoveEnd\" },\n0x0150: { n:\"RRDInsDelBegin\" },\n0x0151: { n:\"RRDInsDelEnd\" },\n0x0152: { n:\"RRDConflict\" },\n0x0153: { n:\"RRDDefName\" },\n0x0154: { n:\"RRDRstEtxp\" },\n0x015f: { n:\"LRng\" },\n0x0160: { n:\"UsesELFs\", f:parsebool },\n0x0161: { n:\"DSF\", f:parsenoop2 },\n0x0191: { n:\"CUsr\" },\n0x0192: { n:\"CbUsr\" },\n0x0193: { n:\"UsrInfo\" },\n0x0194: { n:\"UsrExcl\" },\n0x0195: { n:\"FileLock\" },\n0x0196: { n:\"RRDInfo\" },\n0x0197: { n:\"BCUsrs\" },\n0x0198: { n:\"UsrChk\" },\n0x01a9: { n:\"UserBView\" },\n0x01aa: { n:\"UserSViewBegin\" },\n0x01ab: { n:\"UserSViewEnd\" },\n0x01ac: { n:\"RRDUserView\" },\n0x01ad: { n:\"Qsi\" },\n0x01ae: { n:\"SupBook\", f:parse_SupBook },\n0x01af: { n:\"Prot4Rev\", f:parsebool },\n0x01b0: { n:\"CondFmt\" },\n0x01b1: { n:\"CF\" },\n0x01b2: { n:\"DVal\" },\n0x01b5: { n:\"DConBin\" },\n0x01b6: { n:\"TxO\", f:parse_TxO },\n0x01b7: { n:\"RefreshAll\", f:parsebool },\n0x01b8: { n:\"HLink\", f:parse_HLink },\n0x01b9: { n:\"Lel\" },\n0x01ba: { n:\"CodeName\", f:parse_XLUnicodeString },\n0x01bb: { n:\"SXFDBType\" },\n0x01bc: { n:\"Prot4RevPass\", f:parseuint16 },\n0x01bd: { n:\"ObNoMacros\" },\n0x01be: { n:\"Dv\" },\n0x01c0: { n:\"Excel9File\", f:parsenoop2 },\n0x01c1: { n:\"RecalcId\", f:parse_RecalcId, r:2},\n0x01c2: { n:\"EntExU2\", f:parsenoop2 },\n0x0200: { n:\"Dimensions\", f:parse_Dimensions },\n0x0201: { n:\"Blank\", f:parse_Blank },\n0x0203: { n:\"Number\", f:parse_Number },\n0x0204: { n:\"Label\", f:parse_Label },\n0x0205: { n:\"BoolErr\", f:parse_BoolErr },\n0x0207: { n:\"String\", f:parse_String },\n0x0208: { n:'Row', f:parse_Row },\n0x020b: { n:\"Index\" },\n0x0221: { n:\"Array\", f:parse_Array },\n0x0225: { n:\"DefaultRowHeight\", f:parse_DefaultRowHeight },\n0x0236: { n:\"Table\" },\n0x023e: { n:\"Window2\", f:parse_Window2 },\n0x027e: { n:\"RK\", f:parse_RK },\n0x0293: { n:\"Style\" },\n0x0418: { n:\"BigName\" },\n0x041e: { n:\"Format\", f:parse_Format },\n0x043c: { n:\"ContinueBigName\" },\n0x04bc: { n:\"ShrFmla\", f:parse_ShrFmla },\n0x0800: { n:\"HLinkTooltip\", f:parse_HLinkTooltip },\n0x0801: { n:\"WebPub\" },\n0x0802: { n:\"QsiSXTag\" },\n0x0803: { n:\"DBQueryExt\" },\n0x0804: { n:\"ExtString\" },\n0x0805: { n:\"TxtQry\" },\n0x0806: { n:\"Qsir\" },\n0x0807: { n:\"Qsif\" },\n0x0808: { n:\"RRDTQSIF\" },\n0x0809: { n:'BOF', f:parse_BOF },\n0x080a: { n:\"OleDbConn\" },\n0x080b: { n:\"WOpt\" },\n0x080c: { n:\"SXViewEx\" },\n0x080d: { n:\"SXTH\" },\n0x080e: { n:\"SXPIEx\" },\n0x080f: { n:\"SXVDTEx\" },\n0x0810: { n:\"SXViewEx9\" },\n0x0812: { n:\"ContinueFrt\" },\n0x0813: { n:\"RealTimeData\" },\n0x0850: { n:\"ChartFrtInfo\" },\n0x0851: { n:\"FrtWrapper\" },\n0x0852: { n:\"StartBlock\" },\n0x0853: { n:\"EndBlock\" },\n0x0854: { n:\"StartObject\" },\n0x0855: { n:\"EndObject\" },\n0x0856: { n:\"CatLab\" },\n0x0857: { n:\"YMult\" },\n0x0858: { n:\"SXViewLink\" },\n0x0859: { n:\"PivotChartBits\" },\n0x085a: { n:\"FrtFontList\" },\n0x0862: { n:\"SheetExt\" },\n0x0863: { n:\"BookExt\", r:12},\n0x0864: { n:\"SXAddl\" },\n0x0865: { n:\"CrErr\" },\n0x0866: { n:\"HFPicture\" },\n0x0867: { n:'FeatHdr', f:parsenoop2 },\n0x0868: { n:\"Feat\" },\n0x086a: { n:\"DataLabExt\" },\n0x086b: { n:\"DataLabExtContents\" },\n0x086c: { n:\"CellWatch\" },\n0x0871: { n:\"FeatHdr11\" },\n0x0872: { n:\"Feature11\" },\n0x0874: { n:\"DropDownObjIds\" },\n0x0875: { n:\"ContinueFrt11\" },\n0x0876: { n:\"DConn\" },\n0x0877: { n:\"List12\" },\n0x0878: { n:\"Feature12\" },\n0x0879: { n:\"CondFmt12\" },\n0x087a: { n:\"CF12\" },\n0x087b: { n:\"CFEx\" },\n0x087c: { n:\"XFCRC\", f:parse_XFCRC, r:12 },\n0x087d: { n:\"XFExt\", f:parse_XFExt, r:12 },\n0x087e: { n:\"AutoFilter12\" },\n0x087f: { n:\"ContinueFrt12\" },\n0x0884: { n:\"MDTInfo\" },\n0x0885: { n:\"MDXStr\" },\n0x0886: { n:\"MDXTuple\" },\n0x0887: { n:\"MDXSet\" },\n0x0888: { n:\"MDXProp\" },\n0x0889: { n:\"MDXKPI\" },\n0x088a: { n:\"MDB\" },\n0x088b: { n:\"PLV\" },\n0x088c: { n:\"Compat12\", f:parsebool, r:12 },\n0x088d: { n:\"DXF\" },\n0x088e: { n:\"TableStyles\", r:12 },\n0x088f: { n:\"TableStyle\" },\n0x0890: { n:\"TableStyleElement\" },\n0x0892: { n:\"StyleExt\" },\n0x0893: { n:\"NamePublish\" },\n0x0894: { n:\"NameCmt\", f:parse_NameCmt, r:12 },\n0x0895: { n:\"SortData\" },\n0x0896: { n:\"Theme\", f:parse_Theme, r:12 },\n0x0897: { n:\"GUIDTypeLib\" },\n0x0898: { n:\"FnGrp12\" },\n0x0899: { n:\"NameFnGrp12\" },\n0x089a: { n:\"MTRSettings\", f:parse_MTRSettings, r:12 },\n0x089b: { n:\"CompressPictures\", f:parsenoop2 },\n0x089c: { n:\"HeaderFooter\" },\n0x089d: { n:\"CrtLayout12\" },\n0x089e: { n:\"CrtMlFrt\" },\n0x089f: { n:\"CrtMlFrtContinue\" },\n0x08a3: { n:\"ForceFullCalculation\", f:parse_ForceFullCalculation },\n0x08a4: { n:\"ShapePropsStream\" },\n0x08a5: { n:\"TextPropsStream\" },\n0x08a6: { n:\"RichTextStream\" },\n0x08a7: { n:\"CrtLayout12A\" },\n0x1001: { n:\"Units\" },\n0x1002: { n:\"Chart\" },\n0x1003: { n:\"Series\" },\n0x1006: { n:\"DataFormat\" },\n0x1007: { n:\"LineFormat\" },\n0x1009: { n:\"MarkerFormat\" },\n0x100a: { n:\"AreaFormat\" },\n0x100b: { n:\"PieFormat\" },\n0x100c: { n:\"AttachedLabel\" },\n0x100d: { n:\"SeriesText\" },\n0x1014: { n:\"ChartFormat\" },\n0x1015: { n:\"Legend\" },\n0x1016: { n:\"SeriesList\" },\n0x1017: { n:\"Bar\" },\n0x1018: { n:\"Line\" },\n0x1019: { n:\"Pie\" },\n0x101a: { n:\"Area\" },\n0x101b: { n:\"Scatter\" },\n0x101c: { n:\"CrtLine\" },\n0x101d: { n:\"Axis\" },\n0x101e: { n:\"Tick\" },\n0x101f: { n:\"ValueRange\" },\n0x1020: { n:\"CatSerRange\" },\n0x1021: { n:\"AxisLine\" },\n0x1022: { n:\"CrtLink\" },\n0x1024: { n:\"DefaultText\" },\n0x1025: { n:\"Text\" },\n0x1026: { n:\"FontX\", f:parseuint16 },\n0x1027: { n:\"ObjectLink\" },\n0x1032: { n:\"Frame\" },\n0x1033: { n:\"Begin\" },\n0x1034: { n:\"End\" },\n0x1035: { n:\"PlotArea\" },\n0x103a: { n:\"Chart3d\" },\n0x103c: { n:\"PicF\" },\n0x103d: { n:\"DropBar\" },\n0x103e: { n:\"Radar\" },\n0x103f: { n:\"Surf\" },\n0x1040: { n:\"RadarArea\" },\n0x1041: { n:\"AxisParent\" },\n0x1043: { n:\"LegendException\" },\n0x1044: { n:\"ShtProps\", f:parse_ShtProps },\n0x1045: { n:\"SerToCrt\" },\n0x1046: { n:\"AxesUsed\" },\n0x1048: { n:\"SBaseRef\" },\n0x104a: { n:\"SerParent\" },\n0x104b: { n:\"SerAuxTrend\" },\n0x104e: { n:\"IFmtRecord\" },\n0x104f: { n:\"Pos\" },\n0x1050: { n:\"AlRuns\" },\n0x1051: { n:\"BRAI\" },\n0x105b: { n:\"SerAuxErrBar\" },\n0x105c: { n:\"ClrtClient\", f:parse_ClrtClient },\n0x105d: { n:\"SerFmt\" },\n0x105f: { n:\"Chart3DBarShape\" },\n0x1060: { n:\"Fbi\" },\n0x1061: { n:\"BopPop\" },\n0x1062: { n:\"AxcExt\" },\n0x1063: { n:\"Dat\" },\n0x1064: { n:\"PlotGrowth\" },\n0x1065: { n:\"SIIndex\" },\n0x1066: { n:\"GelFrame\" },\n0x1067: { n:\"BopPopCustom\" },\n0x1068: { n:\"Fbi2\" },\n\n0x0000: { n:\"Dimensions\", f:parse_Dimensions },\n0x0001: { n:\"BIFF2BLANK\" },\n0x0002: { n:\"BIFF2INT\", f:parse_BIFF2INT },\n0x0003: { n:\"BIFF2NUM\", f:parse_BIFF2NUM },\n0x0004: { n:\"BIFF2STR\", f:parse_BIFF2STR },\n0x0005: { n:\"BoolErr\", f:parse_BoolErr },\n0x0007: { n:\"String\", f:parse_BIFF2STRING },\n0x0008: { n:\"BIFF2ROW\" },\n0x0009: { n:'BOF', f:parse_BOF },\n0x000b: { n:\"Index\" },\n0x0016: { n:\"ExternCount\", f:parseuint16 },\n0x001e: { n:\"BIFF2FORMAT\", f:parse_BIFF2Format },\n0x001f: { n:\"BIFF2FMTCNT\" }, /* 16-bit cnt of BIFF2FORMAT records */\n0x0020: { n:\"BIFF2COLINFO\" },\n0x0021: { n:\"Array\", f:parse_Array },\n0x0024: { n:\"COLWIDTH\" },\n0x0025: { n:\"DefaultRowHeight\", f:parse_DefaultRowHeight },\n\t// 0x2c ??\n\t// 0x2d ??\n\t// 0x2e ??\n\t// 0x30 FONTCOUNT: number of fonts\n0x0032: { n:\"BIFF2FONTXTRA\", f:parse_BIFF2FONTXTRA },\n\t// 0x35: INFOOPTS\n\t// 0x36: TABLE (BIFF2 only)\n\t// 0x37: TABLE2 (BIFF2 only)\n\t// 0x38: WNDESK\n\t// 0x39 ??\n\t// 0x3a: BEGINPREF\n\t// 0x3b: ENDPREF\n0x003e: { n:\"BIFF2WINDOW2\" },\n\t// 0x3f ??\n\t// 0x46: SHOWSCROLL\n\t// 0x47: SHOWFORMULA\n\t// 0x48: STATUSBAR\n\t// 0x49: SHORTMENUS\n\t// 0x4A:\n\t// 0x4B:\n\t// 0x4C:\n\t// 0x4E:\n\t// 0x4F:\n\t// 0x58: TOOLBAR (BIFF3)\n\n\t/* - - - */\n0x0034: { n:\"DDEObjName\" },\n0x0043: { n:\"BIFF2XF\" },\n0x0044: { n:\"BIFF2XFINDEX\", f:parseuint16 },\n0x0045: { n:\"BIFF2FONTCLR\" },\n0x0056: { n:\"BIFF4FMTCNT\" }, /* 16-bit cnt, similar to BIFF2 */\n0x007e: { n:\"RK\" }, /* Not necessarily same as 0x027e */\n0x007f: { n:\"ImData\", f:parse_ImData },\n0x0087: { n:\"Addin\" },\n0x0088: { n:\"Edg\" },\n0x0089: { n:\"Pub\" },\n\t// 0x8A\n\t// 0x8B LH: alternate menu key flag (BIFF3/4)\n\t// 0x8E\n\t// 0x8F\n0x0091: { n:\"Sub\" },\n\t// 0x93 STYLE\n0x0094: { n:\"LHRecord\" },\n0x0095: { n:\"LHNGraph\" },\n0x0096: { n:\"Sound\" },\n\t// 0xA2 FNPROTO: function prototypes (BIFF4)\n\t// 0xA3\n\t// 0xA8\n0x00a9: { n:\"CoordList\" },\n0x00ab: { n:\"GCW\" },\n0x00bc: { n:\"ShrFmla\" }, /* Not necessarily same as 0x04bc */\n0x00bf: { n:\"ToolbarHdr\" },\n0x00c0: { n:\"ToolbarEnd\" },\n0x00c2: { n:\"AddMenu\" },\n0x00c3: { n:\"DelMenu\" },\n0x00d6: { n:\"RString\", f:parse_RString },\n0x00df: { n:\"UDDesc\" },\n0x00ea: { n:\"TabIdConf\" },\n0x0162: { n:\"XL5Modify\" },\n0x01a5: { n:\"FileSharing2\" },\n0x0206: { n:\"Formula\", f:parse_Formula },\n0x0209: { n:'BOF', f:parse_BOF },\n0x0218: { n:\"Lbl\", f:parse_Lbl },\n0x0223: { n:\"ExternName\", f:parse_ExternName },\n0x0231: { n:\"Font\" },\n0x0243: { n:\"BIFF3XF\" },\n0x0406: { n:\"Formula\", f:parse_Formula },\n0x0409: { n:'BOF', f:parse_BOF },\n0x0443: { n:\"BIFF4XF\" },\n0x086d: { n:\"FeatInfo\" },\n0x0873: { n:\"FeatInfo11\" },\n0x0881: { n:\"SXAddl12\" },\n0x08c0: { n:\"AutoWebPub\" },\n0x08c1: { n:\"ListObj\" },\n0x08c2: { n:\"ListField\" },\n0x08c3: { n:\"ListDV\" },\n0x08c4: { n:\"ListCondFmt\" },\n0x08c5: { n:\"ListCF\" },\n0x08c6: { n:\"FMQry\" },\n0x08c7: { n:\"FMSQry\" },\n0x08c8: { n:\"PLV\" },\n0x08c9: { n:\"LnExt\" },\n0x08ca: { n:\"MkrExt\" },\n0x08cb: { n:\"CrtCoopt\" },\n0x08d6: { n:\"FRTArchId$\", r:12 },\n\n0x7262: {}\n};\n\nvar XLSRE = evert_key(XLSRecordEnum, 'n');\nfunction write_biff_rec(ba, type, payload, length) {\n\tvar t = typeof type == \"number\" ? type : (+type || +XLSRE[type]);\n\tif(isNaN(t)) return;\n\tvar len = length || (payload||[]).length || 0;\n\tvar o = ba.next(4);\n\to.write_shift(2, t);\n\to.write_shift(2, len);\n\tif(len > 0 && is_buf(payload)) ba.push(payload);\n}\n\nfunction write_biff_continue(ba, type, payload, length) {\n\tvar len = length || (payload||[]).length || 0;\n\tif(len <= 8224) return write_biff_rec(ba, type, payload, len);\n\tvar t = +type || +XLSRE[type];\n\tif(isNaN(t)) return;\n\tvar parts = payload.parts || [], sidx = 0;\n\tvar i = 0, w = 0;\n\twhile(w + (parts[sidx] || 8224) <= 8224) { w+= (parts[sidx] || 8224); sidx++; }\n\tvar o = ba.next(4);\n\to.write_shift(2, t);\n\to.write_shift(2, w);\n\tba.push(payload.slice(i, i + w));\n\ti += w;\n\twhile(i < len) {\n\t\to = ba.next(4);\n\t\to.write_shift(2, 0x3c); // TODO: figure out correct continue type\n\t\tw = 0;\n\t\twhile(w + (parts[sidx] || 8224) <= 8224) { w+= (parts[sidx] || 8224); sidx++; }\n\t\to.write_shift(2, w);\n\t\tba.push(payload.slice(i, i+w)); i+= w;\n\t}\n}\n\nfunction write_BIFF2Cell(out, r, c) {\n\tif(!out) out = new_buf(7);\n\tout.write_shift(2, r);\n\tout.write_shift(2, c);\n\tout.write_shift(2, 0);\n\tout.write_shift(1, 0);\n\treturn out;\n}\n\nfunction write_BIFF2BERR(r, c, val, t) {\n\tvar out = new_buf(9);\n\twrite_BIFF2Cell(out, r, c);\n\twrite_Bes(val, t || 'b', out);\n\treturn out;\n}\n\n/* TODO: codepage, large strings */\nfunction write_BIFF2LABEL(r, c, val) {\n\tvar out = new_buf(8 + 2*val.length);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(1, val.length);\n\tout.write_shift(val.length, val, 'sbcs');\n\treturn out.l < out.length ? out.slice(0, out.l) : out;\n}\n\nfunction write_ws_biff2_cell(ba, cell, R, C) {\n\tif(cell.v != null) switch(cell.t) {\n\t\tcase 'd': case 'n':\n\t\t\tvar v = cell.t == 'd' ? datenum(parseDate(cell.v)) : cell.v;\n\t\t\tif((v == (v|0)) && (v >= 0) && (v < 65536))\n\t\t\t\twrite_biff_rec(ba, 0x0002, write_BIFF2INT(R, C, v));\n\t\t\telse\n\t\t\t\twrite_biff_rec(ba, 0x0003, write_BIFF2NUM(R,C, v));\n\t\t\treturn;\n\t\tcase 'b': case 'e': write_biff_rec(ba, 0x0005, write_BIFF2BERR(R, C, cell.v, cell.t)); return;\n\t\t/* TODO: codepage, sst */\n\t\tcase 's': case 'str':\n\t\t\twrite_biff_rec(ba, 0x0004, write_BIFF2LABEL(R, C, (cell.v||\"\").slice(0,255)));\n\t\t\treturn;\n\t}\n\twrite_biff_rec(ba, 0x0001, write_BIFF2Cell(null, R, C));\n}\n\nfunction write_ws_biff2(ba, ws, idx, opts) {\n\tvar dense = Array.isArray(ws);\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\"), ref, rr = \"\", cols = [];\n\tif(range.e.c > 0xFF || range.e.r > 0x3FFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:IV16384\");\n\t\trange.e.c = Math.min(range.e.c, 0xFF);\n\t\trange.e.r = Math.min(range.e.c, 0x3FFF);\n\t\tref = encode_range(range);\n\t}\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) continue;\n\t\t\t/* write cell */\n\t\t\twrite_ws_biff2_cell(ba, cell, R, C, opts);\n\t\t}\n\t}\n}\n\n/* Based on test files */\nfunction write_biff2_buf(wb, opts) {\n\tvar o = opts || {};\n\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\tvar ba = buf_array();\n\tvar idx = 0;\n\tfor(var i=0;i 0xFF || range.e.r >= MAX_ROWS) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:IV16384\");\n\t\trange.e.c = Math.min(range.e.c, 0xFF);\n\t\trange.e.r = Math.min(range.e.c, MAX_ROWS-1);\n\t}\n\n\twrite_biff_rec(ba, 0x0809, write_BOF(wb, 0x10, opts));\n\t/* [Uncalced] Index */\n\twrite_biff_rec(ba, \"CalcMode\", writeuint16(1));\n\twrite_biff_rec(ba, \"CalcCount\", writeuint16(100));\n\twrite_biff_rec(ba, \"CalcRefMode\", writebool(true));\n\twrite_biff_rec(ba, \"CalcIter\", writebool(false));\n\twrite_biff_rec(ba, \"CalcDelta\", write_Xnum(0.001));\n\twrite_biff_rec(ba, \"CalcSaveRecalc\", writebool(true));\n\twrite_biff_rec(ba, \"PrintRowCol\", writebool(false));\n\twrite_biff_rec(ba, \"PrintGrid\", writebool(false));\n\twrite_biff_rec(ba, \"GridSet\", writeuint16(1));\n\twrite_biff_rec(ba, \"Guts\", write_Guts([0,0]));\n\t/* DefaultRowHeight WsBool [Sync] [LPr] [HorizontalPageBreaks] [VerticalPageBreaks] */\n\t/* Header (string) */\n\t/* Footer (string) */\n\twrite_biff_rec(ba, \"HCenter\", writebool(false));\n\twrite_biff_rec(ba, \"VCenter\", writebool(false));\n\t/* ... */\n\tif(b8) write_ws_cols_biff8(ba, ws[\"!cols\"], ws);\n\t/* ... */\n\twrite_biff_rec(ba, 0x200, write_Dimensions(range, opts));\n\t/* ... */\n\n\tif(b8) ws['!links'] = [];\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) continue;\n\t\t\t/* write cell */\n\t\t\twrite_ws_biff8_cell(ba, cell, R, C, opts);\n\t\t\tif(b8 && cell.l) ws['!links'].push([ref, cell.l]);\n\t\t}\n\t}\n\tvar cname = _sheet.CodeName || _sheet.name || s;\n\t/* ... */\n\tif(b8) write_biff_rec(ba, \"Window2\", write_Window2((_WB.Views||[])[0]));\n\t/* ... */\n\tif(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, \"MergeCells\", write_MergeCells(ws['!merges']));\n\t/* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */\n\tif(b8) write_ws_biff8_hlinks(ba, ws);\n\t/* [DVAL] */\n\twrite_biff_rec(ba, \"CodeName\", write_XLUnicodeString(cname, opts));\n\t/* *WebPub *CellWatch [SheetExt] */\n\tif(b8) write_FEAT(ba, ws);\n\t/* *FEAT11 *RECORD12 */\n\twrite_biff_rec(ba, \"EOF\");\n\treturn ba.end();\n}\n\n/* [MS-XLS] 2.1.7.20.3 */\nfunction write_biff8_global(wb, bufs, opts) {\n\tvar A = buf_array();\n\tvar _WB = ((wb||{}).Workbook||{});\n\tvar _sheets = (_WB.Sheets||[]);\n\tvar _wb = _WB.WBProps||{};\n\tvar b8 = opts.biff == 8, b5 = opts.biff == 5;\n\twrite_biff_rec(A, 0x0809, write_BOF(wb, 0x05, opts));\n\tif(opts.bookType == \"xla\") write_biff_rec(A, \"Addin\");\n\twrite_biff_rec(A, \"InterfaceHdr\", b8 ? writeuint16(0x04b0) : null);\n\twrite_biff_rec(A, \"Mms\", writezeroes(2));\n\tif(b5) write_biff_rec(A, \"ToolbarHdr\");\n\tif(b5) write_biff_rec(A, \"ToolbarEnd\");\n\twrite_biff_rec(A, \"InterfaceEnd\");\n\twrite_biff_rec(A, \"WriteAccess\", write_WriteAccess(\"SheetJS\", opts));\n\t/* [FileSharing] */\n\twrite_biff_rec(A, \"CodePage\", writeuint16(b8 ? 0x04b0 : 0x04E4));\n\t/* *2047 Lel */\n\tif(b8) write_biff_rec(A, \"DSF\", writeuint16(0));\n\tif(b8) write_biff_rec(A, \"Excel9File\");\n\twrite_biff_rec(A, \"RRTabId\", write_RRTabId(wb.SheetNames.length));\n\tif(b8 && wb.vbaraw) write_biff_rec(A, \"ObProj\");\n\t/* [ObNoMacros] */\n\tif(b8 && wb.vbaraw) {\n\t\tvar cname = _wb.CodeName || \"ThisWorkbook\";\n\t\twrite_biff_rec(A, \"CodeName\", write_XLUnicodeString(cname, opts));\n\t}\n\twrite_biff_rec(A, \"BuiltInFnGroupCount\", writeuint16(0x11));\n\t/* *FnGroupName *FnGrp12 */\n\t/* *Lbl */\n\t/* [OleObjectSize] */\n\twrite_biff_rec(A, \"WinProtect\", writebool(false));\n\twrite_biff_rec(A, \"Protect\", writebool(false));\n\twrite_biff_rec(A, \"Password\", writeuint16(0));\n\tif(b8) write_biff_rec(A, \"Prot4Rev\", writebool(false));\n\tif(b8) write_biff_rec(A, \"Prot4RevPass\", writeuint16(0));\n\twrite_biff_rec(A, \"Window1\", write_Window1(opts));\n\twrite_biff_rec(A, \"Backup\", writebool(false));\n\twrite_biff_rec(A, \"HideObj\", writeuint16(0));\n\twrite_biff_rec(A, \"Date1904\", writebool(safe1904(wb)==\"true\"));\n\twrite_biff_rec(A, \"CalcPrecision\", writebool(true));\n\tif(b8) write_biff_rec(A, \"RefreshAll\", writebool(false));\n\twrite_biff_rec(A, \"BookBool\", writeuint16(0));\n\t/* ... */\n\twrite_FONTS_biff8(A, wb, opts);\n\twrite_FMTS_biff8(A, wb.SSF, opts);\n\twrite_CELLXFS_biff8(A, opts);\n\t/* ... */\n\tif(b8) write_biff_rec(A, \"UsesELFs\", writebool(false));\n\tvar a = A.end();\n\n\tvar C = buf_array();\n\t/* METADATA [MTRSettings] [ForceFullCalculation] */\n\tif(b8) write_biff_rec(C, \"Country\", write_Country());\n\t/* *SUPBOOK *LBL *RTD [RecalcId] *HFPicture *MSODRAWINGGROUP */\n\n\t/* BIFF8: [SST *Continue] ExtSST */\n\tif(b8 && opts.Strings) write_biff_continue(C, \"SST\", write_SST(opts.Strings, opts));\n\n\t/* *WebPub [WOpt] [CrErr] [BookExt] *FeatHdr *DConn [THEME] [CompressPictures] [Compat12] [GUIDTypeLib] */\n\twrite_biff_rec(C, \"EOF\");\n\tvar c = C.end();\n\n\tvar B = buf_array();\n\tvar blen = 0, j = 0;\n\tfor(j = 0; j < wb.SheetNames.length; ++j) blen += (b8 ? 12 : 11) + (b8 ? 2 : 1) * wb.SheetNames[j].length;\n\tvar start = a.length + blen + c.length;\n\tfor(j = 0; j < wb.SheetNames.length; ++j) {\n\t\tvar _sheet = _sheets[j] || ({});\n\t\twrite_biff_rec(B, \"BoundSheet8\", write_BoundSheet8({pos:start, hs:_sheet.Hidden||0, dt:0, name:wb.SheetNames[j]}, opts));\n\t\tstart += bufs[j].length;\n\t}\n\t/* 1*BoundSheet8 */\n\tvar b = B.end();\n\tif(blen != b.length) throw new Error(\"BS8 \" + blen + \" != \" + b.length);\n\n\tvar out = [];\n\tif(a.length) out.push(a);\n\tif(b.length) out.push(b);\n\tif(c.length) out.push(c);\n\treturn __toBuffer([out]);\n}\n\n/* [MS-XLS] 2.1.7.20 Workbook Stream */\nfunction write_biff8_buf(wb, opts) {\n\tvar o = opts || {};\n\tvar bufs = [];\n\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = SSF.get_table();\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(SSF); SSF.load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\to.revssf = evert_num(wb.SSF); o.revssf[wb.SSF[65535]] = 0;\n\t\to.ssf = wb.SSF;\n\t}\n\n\to.Strings = []; o.Strings.Count = 0; o.Strings.Unique = 0;\n\tfix_write_opts(o);\n\n\to.cellXfs = [];\n\tget_cell_style(o.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tfor(var i = 0; i < wb.SheetNames.length; ++i) bufs[bufs.length] = write_ws_biff8(i, o, wb);\n\tbufs.unshift(write_biff8_global(wb, bufs, o));\n\treturn __toBuffer([bufs]);\n}\n\nfunction write_biff_buf(wb, opts) {\n\tfor(var i = 0; i <= wb.SheetNames.length; ++i) {\n\t\tvar ws = wb.Sheets[wb.SheetNames[i]];\n\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\tvar range = decode_range(ws[\"!ref\"]);\n\t\tif(range.e.c > 255) { // note: 255 is IV\n\t\t console.error(\"Worksheet '\" + wb.SheetNames[i] + \"' extends beyond column IV (255). Data may be lost.\");\n\t\t}\n\t}\n\n\tvar o = opts || {};\n\tswitch(o.biff || 2) {\n\t\tcase 8: case 5: return write_biff8_buf(wb, opts);\n\t\tcase 4: case 3: case 2: return write_biff2_buf(wb, opts);\n\t}\n\tthrow new Error(\"invalid type \" + o.bookType + \" for BIFF\");\n}\n/* note: browser DOM element cannot see mso- style attrs, must parse */\nvar HTML_ = (function() {\n\tfunction html_to_sheet(str, _opts) {\n\t\tvar opts = _opts || {};\n\t\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\t\tvar ws = opts.dense ? ([]) : ({});\n\t\tstr = str.replace(//g, \"\");\n\t\tvar mtch = str.match(/\");\n\t\tvar mtch2 = str.match(/<\\/table/i);\n\t\tvar i = mtch.index, j = mtch2 && mtch2.index || str.length;\n\t\tvar rows = split_regex(str.slice(i, j), /(:?]*>)/i, \"
\");\n\t\tvar R = -1, C = 0, RS = 0, CS = 0;\n\t\tvar range = {s:{r:10000000, c:10000000},e:{r:0,c:0}};\n\t\tvar merges = [];\n\t\tfor(i = 0; i < rows.length; ++i) {\n\t\t\tvar row = rows[i].trim();\n\t\t\tvar hd = row.slice(0,3).toLowerCase();\n\t\t\tif(hd == \"
/i);\n\t\t\tfor(j = 0; j < cells.length; ++j) {\n\t\t\t\tvar cell = cells[j].trim();\n\t\t\t\tif(!cell.match(/\")) > -1) m = m.slice(cc+1);\n\t\t\t\tfor(var midx = 0; midx < merges.length; ++midx) {\n\t\t\t\t\tvar _merge = merges[midx];\n\t\t\t\t\tif(_merge.s.c == C && _merge.s.r < R && R <= _merge.e.r) { C = _merge.e.c + 1; midx = -1; }\n\t\t\t\t}\n\t\t\t\tvar tag = parsexmltag(cell.slice(0, cell.indexOf(\">\")));\n\t\t\t\tCS = tag.colspan ? +tag.colspan : 1;\n\t\t\t\tif((RS = +tag.rowspan)>1 || CS>1) merges.push({s:{r:R,c:C},e:{r:R + (RS||1) - 1, c:C + CS - 1}});\n\t\t\t\tvar _t = tag.t || tag[\"data-t\"] || \"\";\n\t\t\t\t/* TODO: generate stub cells */\n\t\t\t\tif(!m.length) { C += CS; continue; }\n\t\t\t\tm = htmldecode(m);\n\t\t\t\tif(range.s.r > R) range.s.r = R; if(range.e.r < R) range.e.r = R;\n\t\t\t\tif(range.s.c > C) range.s.c = C; if(range.e.c < C) range.e.c = C;\n\t\t\t\tif(!m.length) continue;\n\t\t\t\tvar o = {t:'s', v:m};\n\t\t\t\tif(opts.raw || !m.trim().length || _t == 's'){}\n\t\t\t\telse if(m === 'TRUE') o = {t:'b', v:true};\n\t\t\t\telse if(m === 'FALSE') o = {t:'b', v:false};\n\t\t\t\telse if(!isNaN(fuzzynum(m))) o = {t:'n', v:fuzzynum(m)};\n\t\t\t\telse if(!isNaN(fuzzydate(m).getDate())) {\n\t\t\t\t\to = ({t:'d', v:parseDate(m)});\n\t\t\t\t\tif(!opts.cellDates) o = ({t:'n', v:datenum(o.v)});\n\t\t\t\t\to.z = opts.dateNF || SSF._table[14];\n\t\t\t\t}\n\t\t\t\tif(opts.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = o; }\n\t\t\t\telse ws[encode_cell({r:R, c:C})] = o;\n\t\t\t\tC += CS;\n\t\t\t}\n\t\t}\n\t\tws['!ref'] = encode_range(range);\n\t\tif(merges.length) ws[\"!merges\"] = merges;\n\t\treturn ws;\n\t}\n\tfunction html_to_book(str, opts) {\n\t\tvar mtch = str.match(/[\\s\\S]*?<\\/table>/gi);\n\t\tif(!mtch || mtch.length == 0) throw new Error(\"Invalid HTML: could not find \");\n\t\tif(mtch.length == 1) return sheet_to_workbook(html_to_sheet(mtch[0], opts), opts);\n\t\tvar wb = utils.book_new();\n\t\tmtch.forEach(function(s, idx) { utils.book_append_sheet(wb, html_to_sheet(s, opts), \"Sheet\" + (idx+1)); });\n\t\treturn wb;\n\t}\n\tfunction make_html_row(ws, r, R, o) {\n\t\tvar M = (ws['!merges'] ||[]);\n\t\tvar oo = [];\n\t\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\t\tvar RS = 0, CS = 0;\n\t\t\tfor(var j = 0; j < M.length; ++j) {\n\t\t\t\tif(M[j].s.r > R || M[j].s.c > C) continue;\n\t\t\t\tif(M[j].e.r < R || M[j].e.c < C) continue;\n\t\t\t\tif(M[j].s.r < R || M[j].s.c < C) { RS = -1; break; }\n\t\t\t\tRS = M[j].e.r - M[j].s.r + 1; CS = M[j].e.c - M[j].s.c + 1; break;\n\t\t\t}\n\t\t\tif(RS < 0) continue;\n\t\t\tvar coord = encode_cell({r:R,c:C});\n\t\t\tvar cell = o.dense ? (ws[R]||[])[C] : ws[coord];\n\t\t\t/* TODO: html entities */\n\t\t\tvar w = (cell && cell.v != null) && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || \"\")) || \"\";\n\t\t\tvar sp = ({});\n\t\t\tif(RS > 1) sp.rowspan = RS;\n\t\t\tif(CS > 1) sp.colspan = CS;\n\t\t\tif(o.editable) w = '' + w + '';\n\t\t\telse if(cell) {\n\t\t\t\tsp[\"data-t\"] = cell && cell.t || 'z';\n\t\t\t\tif(cell.v != null) sp[\"data-v\"] = cell.v;\n\t\t\t\tif(cell.z != null) sp[\"data-z\"] = cell.z;\n\t\t\t\tif(cell.l && (cell.l.Target || \"#\").charAt(0) != \"#\") w = '' + w + '';\n\t\t\t}\n\t\t\tsp.id = (o.id || \"sjs\") + \"-\" + coord;\n\t\t\too.push(writextag('td', w, sp));\n\t\t}\n\t\tvar preamble = \"\";\n\t\treturn preamble + oo.join(\"\") + \"
\";\n\t}\n\tfunction make_html_preamble(ws, R, o) {\n\t\tvar out = [];\n\t\treturn out.join(\"\") + '';\n\t}\n\tvar _BEGIN = 'SheetJS Table Export';\n\tvar _END = '';\n\tfunction sheet_to_html(ws, opts/*, wb:?Workbook*/) {\n\t\tvar o = opts || {};\n\t\tvar header = o.header != null ? o.header : _BEGIN;\n\t\tvar footer = o.footer != null ? o.footer : _END;\n\t\tvar out = [header];\n\t\tvar r = decode_range(ws['!ref']);\n\t\to.dense = Array.isArray(ws);\n\t\tout.push(make_html_preamble(ws, r, o));\n\t\tfor(var R = r.s.r; R <= r.e.r; ++R) out.push(make_html_row(ws, r, R, o));\n\t\tout.push(\"
\" + footer);\n\t\treturn out.join(\"\");\n\n\t}\n\treturn {\n\t\tto_workbook: html_to_book,\n\t\tto_sheet: html_to_sheet,\n\t\t_row: make_html_row,\n\t\tBEGIN: _BEGIN,\n\t\tEND: _END,\n\t\t_preamble: make_html_preamble,\n\t\tfrom_sheet: sheet_to_html\n\t};\n})();\n\nfunction sheet_add_dom(ws, table, _opts) {\n\tvar opts = _opts || {};\n\tif(DENSE != null) opts.dense = DENSE;\n\tvar or_R = 0, or_C = 0;\n\tif(opts.origin != null) {\n\t\tif(typeof opts.origin == 'number') or_R = opts.origin;\n\t\telse {\n\t\t\tvar _origin = typeof opts.origin == \"string\" ? decode_cell(opts.origin) : opts.origin;\n\t\t\tor_R = _origin.r; or_C = _origin.c;\n\t\t}\n\t}\n\tvar rows = table.getElementsByTagName('tr');\n\tvar sheetRows = Math.min(opts.sheetRows||10000000, rows.length);\n\tvar range = {s:{r:0,c:0},e:{r:or_R,c:or_C}};\n\tif(ws[\"!ref\"]) {\n\t\tvar _range = decode_range(ws[\"!ref\"]);\n\t\trange.s.r = Math.min(range.s.r, _range.s.r);\n\t\trange.s.c = Math.min(range.s.c, _range.s.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\tif(or_R == -1) range.e.r = or_R = _range.e.r + 1;\n\t}\n\tvar merges = [], midx = 0;\n\tvar rowinfo = ws[\"!rows\"] || (ws[\"!rows\"] = []);\n\tvar _R = 0, R = 0, _C = 0, C = 0, RS = 0, CS = 0;\n\tif(!ws[\"!cols\"]) ws['!cols'] = [];\n\tfor(; _R < rows.length && R < sheetRows; ++_R) {\n\t\tvar row = rows[_R];\n\t\tif (is_dom_element_hidden(row)) {\n\t\t\tif (opts.display) continue;\n\t\t\trowinfo[R] = {hidden: true};\n\t\t}\n\t\tvar elts = (row.children);\n\t\tfor(_C = C = 0; _C < elts.length; ++_C) {\n\t\t\tvar elt = elts[_C];\n\t\t\tif (opts.display && is_dom_element_hidden(elt)) continue;\n\t\t\tvar v = elt.hasAttribute('data-v') ? elt.getAttribute('data-v') : elt.hasAttribute('v') ? elt.getAttribute('v') : htmldecode(elt.innerHTML);\n\t\t\tvar z = elt.getAttribute('data-z') || elt.getAttribute('z');\n\t\t\tfor(midx = 0; midx < merges.length; ++midx) {\n\t\t\t\tvar m = merges[midx];\n\t\t\t\tif(m.s.c == C + or_C && m.s.r < R + or_R && R + or_R <= m.e.r) { C = m.e.c+1 - or_C; midx = -1; }\n\t\t\t}\n\t\t\t/* TODO: figure out how to extract nonstandard mso- style */\n\t\t\tCS = +elt.getAttribute(\"colspan\") || 1;\n\t\t\tif( ((RS = (+elt.getAttribute(\"rowspan\") || 1)))>1 || CS>1) merges.push({s:{r:R + or_R,c:C + or_C},e:{r:R + or_R + (RS||1) - 1, c:C + or_C + (CS||1) - 1}});\n\t\t\tvar o = {t:'s', v:v};\n\t\t\tvar _t = elt.getAttribute(\"data-t\") || elt.getAttribute(\"t\") || \"\";\n\t\t\tif(v != null) {\n\t\t\t\tif(v.length == 0) o.t = _t || 'z';\n\t\t\t\telse if(opts.raw || v.trim().length == 0 || _t == \"s\"){}\n\t\t\t\telse if(v === 'TRUE') o = {t:'b', v:true};\n\t\t\t\telse if(v === 'FALSE') o = {t:'b', v:false};\n\t\t\t\telse if(!isNaN(fuzzynum(v))) o = {t:'n', v:fuzzynum(v)};\n\t\t\t\telse if(!isNaN(fuzzydate(v).getDate())) {\n\t\t\t\t\to = ({t:'d', v:parseDate(v)});\n\t\t\t\t\tif(!opts.cellDates) o = ({t:'n', v:datenum(o.v)});\n\t\t\t\t\to.z = opts.dateNF || SSF._table[14];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(o.z === undefined && z != null) o.z = z;\n\t\t\t/* The first link is used. Links are assumed to be fully specified.\n\t\t\t * TODO: The right way to process relative links is to make a new */\n\t\t\tvar l = \"\", Aelts = elt.getElementsByTagName(\"A\");\n\t\t\tif(Aelts && Aelts.length) for(var Aelti = 0; Aelti < Aelts.length; ++Aelti)\tif(Aelts[Aelti].hasAttribute(\"href\")) {\n\t\t\t\tl = Aelts[Aelti].getAttribute(\"href\"); if(l.charAt(0) != \"#\") break;\n\t\t\t}\n\t\t\tif(l && l.charAt(0) != \"#\") o.l = ({ Target: l });\n\t\t\tif(opts.dense) { if(!ws[R + or_R]) ws[R + or_R] = []; ws[R + or_R][C + or_C] = o; }\n\t\t\telse ws[encode_cell({c:C + or_C, r:R + or_R})] = o;\n\t\t\tif(range.e.c < C + or_C) range.e.c = C + or_C;\n\t\t\tC += CS;\n\t\t}\n\t\t++R;\n\t}\n\tif(merges.length) ws['!merges'] = (ws[\"!merges\"] || []).concat(merges);\n\trange.e.r = Math.max(range.e.r, R - 1 + or_R);\n\tws['!ref'] = encode_range(range);\n\tif(R >= sheetRows) ws['!fullref'] = encode_range((range.e.r = rows.length-_R+R-1 + or_R,range)); // We can count the real number of rows to parse but we don't to improve the performance\n\treturn ws;\n}\n\nfunction parse_dom_table(table, _opts) {\n\tvar opts = _opts || {};\n\tvar ws = opts.dense ? ([]) : ({});\n\treturn sheet_add_dom(ws, table, _opts);\n}\n\nfunction table_to_book(table, opts) {\n\treturn sheet_to_workbook(parse_dom_table(table, opts), opts);\n}\n\nfunction is_dom_element_hidden(element) {\n\tvar display = '';\n\tvar get_computed_style = get_get_computed_style_function(element);\n\tif(get_computed_style) display = get_computed_style(element).getPropertyValue('display');\n\tif(!display) display = element.style.display; // Fallback for cases when getComputedStyle is not available (e.g. an old browser or some Node.js environments) or doesn't work (e.g. if the element is not inserted to a document)\n\treturn display === 'none';\n}\n\n/* global getComputedStyle */\nfunction get_get_computed_style_function(element) {\n\t// The proper getComputedStyle implementation is the one defined in the element window\n\tif(element.ownerDocument.defaultView && typeof element.ownerDocument.defaultView.getComputedStyle === 'function') return element.ownerDocument.defaultView.getComputedStyle;\n\t// If it is not available, try to get one from the global namespace\n\tif(typeof getComputedStyle === 'function') return getComputedStyle;\n\treturn null;\n}\n/* OpenDocument */\nvar parse_content_xml = (function() {\n\n\tvar parse_text_p = function(text) {\n\t\t/* 6.1.2 White Space Characters */\n\t\tvar fixed = text\n\t\t\t.replace(/[\\t\\r\\n]/g, \" \").trim().replace(/ +/g, \" \")\n\t\t\t.replace(//g,\" \")\n\t\t\t.replace(//g, function($$,$1) { return Array(parseInt($1,10)+1).join(\" \"); })\n\t\t\t.replace(/]*\\/>/g,\"\\t\")\n\t\t\t.replace(//g,\"\\n\");\n\t\tvar v = unescapexml(fixed.replace(/<[^>]*>/g,\"\"));\n\n\t\treturn [v];\n\t};\n\n\tvar number_formats = {\n\t\t/* ods name: [short ssf fmt, long ssf fmt] */\n\t\tday: [\"d\", \"dd\"],\n\t\tmonth: [\"m\", \"mm\"],\n\t\tyear: [\"y\", \"yy\"],\n\t\thours: [\"h\", \"hh\"],\n\t\tminutes: [\"m\", \"mm\"],\n\t\tseconds: [\"s\", \"ss\"],\n\t\t\"am-pm\": [\"A/P\", \"AM/PM\"],\n\t\t\"day-of-week\": [\"ddd\", \"dddd\"],\n\t\tera: [\"e\", \"ee\"],\n\t\t/* there is no native representation of LO \"Q\" format */\n\t\tquarter: [\"\\\\Qm\", \"m\\\\\\\"th quarter\\\"\"]\n\t};\n\n\treturn function pcx(d, _opts) {\n\t\tvar opts = _opts || {};\n\t\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\t\tvar str = xlml_normalize(d);\n\t\tvar state = [], tmp;\n\t\tvar tag;\n\t\tvar NFtag = {name:\"\"}, NF = \"\", pidx = 0;\n\t\tvar sheetag;\n\t\tvar rowtag;\n\t\tvar Sheets = {}, SheetNames = [];\n\t\tvar ws = opts.dense ? ([]) : ({});\n\t\tvar Rn, q;\n\t\tvar ctag = ({value:\"\"});\n\t\tvar textp = \"\", textpidx = 0, textptag;\n\t\tvar textR = [];\n\t\tvar R = -1, C = -1, range = {s: {r:1000000,c:10000000}, e: {r:0, c:0}};\n\t\tvar row_ol = 0;\n\t\tvar number_format_map = {};\n\t\tvar merges = [], mrange = {}, mR = 0, mC = 0;\n\t\tvar rowinfo = [], rowpeat = 1, colpeat = 1;\n\t\tvar arrayf = [];\n\t\tvar WB = {Names:[]};\n\t\tvar atag = ({});\n\t\tvar _Ref = [\"\", \"\"];\n\t\tvar comments = [], comment = ({});\n\t\tvar creator = \"\", creatoridx = 0;\n\t\tvar isstub = false, intable = false;\n\t\tvar i = 0;\n\t\txlmlregex.lastIndex = 0;\n\t\tstr = str.replace(//mg,\"\").replace(//gm,\"\");\n\t\twhile((Rn = xlmlregex.exec(str))) switch((Rn[3]=Rn[3].replace(/_.*$/,\"\"))) {\n\n\t\t\tcase 'table': case '工作表': // 9.1.2 \n\t\t\t\tif(Rn[1]==='/') {\n\t\t\t\t\tif(range.e.c >= range.s.c && range.e.r >= range.s.r) ws['!ref'] = encode_range(range);\n\t\t\t\t\telse ws['!ref'] = \"A1:A1\";\n\t\t\t\t\tif(opts.sheetRows > 0 && opts.sheetRows <= range.e.r) {\n\t\t\t\t\t\tws['!fullref'] = ws['!ref'];\n\t\t\t\t\t\trange.e.r = opts.sheetRows - 1;\n\t\t\t\t\t\tws['!ref'] = encode_range(range);\n\t\t\t\t\t}\n\t\t\t\t\tif(merges.length) ws['!merges'] = merges;\n\t\t\t\t\tif(rowinfo.length) ws[\"!rows\"] = rowinfo;\n\t\t\t\t\tsheetag.name = sheetag['名称'] || sheetag.name;\n\t\t\t\t\tif(typeof JSON !== 'undefined') JSON.stringify(sheetag);\n\t\t\t\t\tSheetNames.push(sheetag.name);\n\t\t\t\t\tSheets[sheetag.name] = ws;\n\t\t\t\t\tintable = false;\n\t\t\t\t}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\t\tsheetag = parsexmltag(Rn[0], false);\n\t\t\t\t\tR = C = -1;\n\t\t\t\t\trange.s.r = range.s.c = 10000000; range.e.r = range.e.c = 0;\n\t\t\t\t\tws = opts.dense ? ([]) : ({}); merges = [];\n\t\t\t\t\trowinfo = [];\n\t\t\t\t\tintable = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'table-row-group': // 9.1.9 \n\t\t\t\tif(Rn[1] === \"/\") --row_ol; else ++row_ol;\n\t\t\t\tbreak;\n\t\t\tcase 'table-row': case '行': // 9.1.3 \n\t\t\t\tif(Rn[1] === '/') { R+=rowpeat; rowpeat = 1; break; }\n\t\t\t\trowtag = parsexmltag(Rn[0], false);\n\t\t\t\tif(rowtag['行号']) R = rowtag['行号'] - 1; else if(R == -1) R = 0;\n\t\t\t\trowpeat = +rowtag['number-rows-repeated'] || 1;\n\t\t\t\t/* TODO: remove magic */\n\t\t\t\tif(rowpeat < 10) for(i = 0; i < rowpeat; ++i) if(row_ol > 0) rowinfo[R + i] = {level: row_ol};\n\t\t\t\tC = -1; break;\n\t\t\tcase 'covered-table-cell': // 9.1.5 \n\t\t\t\tif(Rn[1] !== '/') ++C;\n\t\t\t\tif(opts.sheetStubs) {\n\t\t\t\t\tif(opts.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = {t:'z'}; }\n\t\t\t\t\telse ws[encode_cell({r:R,c:C})] = {t:'z'};\n\t\t\t\t}\n\t\t\t\ttextp = \"\"; textR = [];\n\t\t\t\tbreak; /* stub */\n\t\t\tcase 'table-cell': case '数据':\n\t\t\t\tif(Rn[0].charAt(Rn[0].length-2) === '/') {\n\t\t\t\t\t++C;\n\t\t\t\t\tctag = parsexmltag(Rn[0], false);\n\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\tq = ({t:'z', v:null});\n\t\t\t\t\tif(ctag.formula && opts.cellFormula != false) q.f = ods_to_csf_formula(unescapexml(ctag.formula));\n\t\t\t\t\tif((ctag['数据类型'] || ctag['value-type']) == \"string\") {\n\t\t\t\t\t\tq.t = \"s\"; q.v = unescapexml(ctag['string-value'] || \"\");\n\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\tif(!ws[R]) ws[R] = [];\n\t\t\t\t\t\t\tws[R][C] = q;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tws[encode_cell({r:R,c:C})] = q;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tC+= colpeat-1;\n\t\t\t\t} else if(Rn[1]!=='/') {\n\t\t\t\t\t++C;\n\t\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\t\tcolpeat = 1;\n\t\t\t\t\tvar rptR = rowpeat ? R + rowpeat - 1 : R;\n\t\t\t\t\tif(C > range.e.c) range.e.c = C;\n\t\t\t\t\tif(C < range.s.c) range.s.c = C;\n\t\t\t\t\tif(R < range.s.r) range.s.r = R;\n\t\t\t\t\tif(rptR > range.e.r) range.e.r = rptR;\n\t\t\t\t\tctag = parsexmltag(Rn[0], false);\n\t\t\t\t\tcomments = []; comment = ({});\n\t\t\t\t\tq = ({t:ctag['数据类型'] || ctag['value-type'], v:null});\n\t\t\t\t\tif(opts.cellFormula) {\n\t\t\t\t\t\tif(ctag.formula) ctag.formula = unescapexml(ctag.formula);\n\t\t\t\t\t\tif(ctag['number-matrix-columns-spanned'] && ctag['number-matrix-rows-spanned']) {\n\t\t\t\t\t\t\tmR = parseInt(ctag['number-matrix-rows-spanned'],10) || 0;\n\t\t\t\t\t\t\tmC = parseInt(ctag['number-matrix-columns-spanned'],10) || 0;\n\t\t\t\t\t\t\tmrange = {s: {r:R,c:C}, e:{r:R + mR-1,c:C + mC-1}};\n\t\t\t\t\t\t\tq.F = encode_range(mrange);\n\t\t\t\t\t\t\tarrayf.push([mrange, q.F]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(ctag.formula) q.f = ods_to_csf_formula(ctag.formula);\n\t\t\t\t\t\telse for(i = 0; i < arrayf.length; ++i)\n\t\t\t\t\t\t\tif(R >= arrayf[i][0].s.r && R <= arrayf[i][0].e.r)\n\t\t\t\t\t\t\t\tif(C >= arrayf[i][0].s.c && C <= arrayf[i][0].e.c)\n\t\t\t\t\t\t\t\t\tq.F = arrayf[i][1];\n\t\t\t\t\t}\n\t\t\t\t\tif(ctag['number-columns-spanned'] || ctag['number-rows-spanned']) {\n\t\t\t\t\t\tmR = parseInt(ctag['number-rows-spanned'],10) || 0;\n\t\t\t\t\t\tmC = parseInt(ctag['number-columns-spanned'],10) || 0;\n\t\t\t\t\t\tmrange = {s: {r:R,c:C}, e:{r:R + mR-1,c:C + mC-1}};\n\t\t\t\t\t\tmerges.push(mrange);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* 19.675.2 table:number-columns-repeated */\n\t\t\t\t\tif(ctag['number-columns-repeated']) colpeat = parseInt(ctag['number-columns-repeated'], 10);\n\n\t\t\t\t\t/* 19.385 office:value-type */\n\t\t\t\t\tswitch(q.t) {\n\t\t\t\t\t\tcase 'boolean': q.t = 'b'; q.v = parsexmlbool(ctag['boolean-value']); break;\n\t\t\t\t\t\tcase 'float': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'percentage': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'currency': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'date': q.t = 'd'; q.v = parseDate(ctag['date-value']);\n\t\t\t\t\t\t\tif(!opts.cellDates) { q.t = 'n'; q.v = datenum(q.v); }\n\t\t\t\t\t\t\tq.z = 'm/d/yy'; break;\n\t\t\t\t\t\tcase 'time': q.t = 'n'; q.v = parse_isodur(ctag['time-value'])/86400;\n\t\t\t\t\t\t\tif(opts.cellDates) { q.t = 'd'; q.v = numdate(q.v); }\n\t\t\t\t\t\t\tq.z = 'HH:MM:SS'; break;\n\t\t\t\t\t\tcase 'number': q.t = 'n'; q.v = parseFloat(ctag['数据数值']); break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(q.t === 'string' || q.t === 'text' || !q.t) {\n\t\t\t\t\t\t\t\tq.t = 's';\n\t\t\t\t\t\t\t\tif(ctag['string-value'] != null) { textp = unescapexml(ctag['string-value']); textR = []; }\n\t\t\t\t\t\t\t} else throw new Error('Unsupported value type ' + q.t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tisstub = false;\n\t\t\t\t\tif(q.t === 's') {\n\t\t\t\t\t\tq.v = textp || '';\n\t\t\t\t\t\tif(textR.length) q.R = textR;\n\t\t\t\t\t\tisstub = textpidx == 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(atag.Target) q.l = atag;\n\t\t\t\t\tif(comments.length > 0) { q.c = comments; comments = []; }\n\t\t\t\t\tif(textp && opts.cellText !== false) q.w = textp;\n\t\t\t\t\tif(isstub) { q.t = \"z\"; delete q.v; }\n\t\t\t\t\tif(!isstub || opts.sheetStubs) {\n\t\t\t\t\t\tif(!(opts.sheetRows && opts.sheetRows <= R)) {\n\t\t\t\t\t\t\tfor(var rpt = 0; rpt < rowpeat; ++rpt) {\n\t\t\t\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\t\t\tif(!ws[R + rpt]) ws[R + rpt] = [];\n\t\t\t\t\t\t\t\t\tws[R + rpt][C] = rpt == 0 ? q : dup(q);\n\t\t\t\t\t\t\t\t\twhile(--colpeat > 0) ws[R + rpt][C + colpeat] = dup(q);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tws[encode_cell({r:R + rpt,c:C})] = q;\n\t\t\t\t\t\t\t\t\twhile(--colpeat > 0) ws[encode_cell({r:R + rpt,c:C + colpeat})] = dup(q);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(range.e.c <= C) range.e.c = C;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\tC += colpeat-1; colpeat = 0;\n\t\t\t\t\tq = {};\n\t\t\t\t\ttextp = \"\"; textR = [];\n\t\t\t\t}\n\t\t\t\tatag = ({});\n\t\t\t\tbreak; // 9.1.4 \n\n\t\t\t/* pure state */\n\t\t\tcase 'document': // TODO: is the root for FODS\n\t\t\tcase 'document-content': case '电子表格文档': // 3.1.3.2 \n\t\t\tcase 'spreadsheet': case '主体': // 3.7 \n\t\t\tcase 'scripts': // 3.12 \n\t\t\tcase 'styles': // TODO \n\t\t\tcase 'font-face-decls': // 3.14 \n\t\t\tcase 'master-styles': // 3.15.4 -- relevant for FODS\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t\tbreak;\n\n\t\t\tcase 'annotation': // 14.1 \n\t\t\t\tif(Rn[1]==='/'){\n\t\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;\n\t\t\t\t\tcomment.t = textp;\n\t\t\t\t\tif(textR.length) comment.R = textR;\n\t\t\t\t\tcomment.a = creator;\n\t\t\t\t\tcomments.push(comment);\n\t\t\t\t}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {state.push([Rn[3], false]);}\n\t\t\t\tcreator = \"\"; creatoridx = 0;\n\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'creator': // 4.3.2.7 \n\t\t\t\tif(Rn[1]==='/') { creator = str.slice(creatoridx,Rn.index); }\n\t\t\t\telse creatoridx = Rn.index + Rn[0].length;\n\t\t\t\tbreak;\n\n\t\t\t/* ignore state */\n\t\t\tcase 'meta': case '元数据': // TODO: FODS/UOF\n\t\t\tcase 'settings': // TODO: \n\t\t\tcase 'config-item-set': // TODO: \n\t\t\tcase 'config-item-map-indexed': // TODO: \n\t\t\tcase 'config-item-map-entry': // TODO: \n\t\t\tcase 'config-item-map-named': // TODO: \n\t\t\tcase 'shapes': // 9.2.8 \n\t\t\tcase 'frame': // 10.4.2 \n\t\t\tcase 'text-box': // 10.4.3 \n\t\t\tcase 'image': // 10.4.4 \n\t\t\tcase 'data-pilot-tables': // 9.6.2 \n\t\t\tcase 'list-style': // 16.30 \n\t\t\tcase 'form': // 13.13 \n\t\t\tcase 'dde-links': // 9.8 \n\t\t\tcase 'event-listeners': // TODO\n\t\t\tcase 'chart': // TODO\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], false]);\n\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'scientific-number': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'currency-symbol': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'currency-style': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'number-style': // 16.27.2 \n\t\t\tcase 'percentage-style': // 16.27.9 \n\t\t\tcase 'date-style': // 16.27.10 \n\t\t\tcase 'time-style': // 16.27.18 \n\t\t\t\tif(Rn[1]==='/'){\n\t\t\t\t\tnumber_format_map[NFtag.name] = NF;\n\t\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;\n\t\t\t\t} else if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\t\tNF = \"\";\n\t\t\t\t\tNFtag = parsexmltag(Rn[0], false);\n\t\t\t\t\tstate.push([Rn[3], true]);\n\t\t\t\t} break;\n\n\t\t\tcase 'script': break; // 3.13 \n\t\t\tcase 'libraries': break; // TODO: \n\t\t\tcase 'automatic-styles': break; // 3.15.3 \n\n\t\t\tcase 'default-style': // TODO: \n\t\t\tcase 'page-layout': break; // TODO: \n\t\t\tcase 'style': // 16.2 \n\t\t\t\tbreak;\n\t\t\tcase 'map': break; // 16.3 \n\t\t\tcase 'font-face': break; // 16.21 \n\n\t\t\tcase 'paragraph-properties': break; // 17.6 \n\t\t\tcase 'table-properties': break; // 17.15 \n\t\t\tcase 'table-column-properties': break; // 17.16 \n\t\t\tcase 'table-row-properties': break; // 17.17 \n\t\t\tcase 'table-cell-properties': break; // 17.18 \n\n\t\t\tcase 'number': // 16.27.3 \n\t\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t\t\tNF += number_formats[Rn[3]][tag.style==='long'?1:0]; break;\n\t\t\t\t} break;\n\n\t\t\tcase 'fraction': break; // TODO 16.27.6 \n\n\t\t\tcase 'day': // 16.27.11 \n\t\t\tcase 'month': // 16.27.12 \n\t\t\tcase 'year': // 16.27.13 \n\t\t\tcase 'era': // 16.27.14 \n\t\t\tcase 'day-of-week': // 16.27.15 \n\t\t\tcase 'week-of-year': // 16.27.16 \n\t\t\tcase 'quarter': // 16.27.17 \n\t\t\tcase 'hours': // 16.27.19 \n\t\t\tcase 'minutes': // 16.27.20 \n\t\t\tcase 'seconds': // 16.27.21 \n\t\t\tcase 'am-pm': // 16.27.22 \n\t\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t\t\tNF += number_formats[Rn[3]][tag.style==='long'?1:0]; break;\n\t\t\t\t} break;\n\n\t\t\tcase 'boolean-style': break; // 16.27.23 \n\t\t\tcase 'boolean': break; // 16.27.24 \n\t\t\tcase 'text-style': break; // 16.27.25 \n\t\t\tcase 'text': // 16.27.26 \n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\t\telse if(Rn[1]===\"/\") switch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'number-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\t\tNF += str.slice(pidx, Rn.index);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\t\tbreak;\n\n\t\t\tcase 'named-range': // 9.4.12 \n\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t_Ref = ods_to_csf_3D(tag['cell-range-address']);\n\t\t\t\tvar nrange = ({Name:tag.name, Ref:_Ref[0] + '!' + _Ref[1]});\n\t\t\t\tif(intable) nrange.Sheet = SheetNames.length;\n\t\t\t\tWB.Names.push(nrange);\n\t\t\t\tbreak;\n\n\t\t\tcase 'text-content': break; // 16.27.27 \n\t\t\tcase 'text-properties': break; // 16.27.27 \n\t\t\tcase 'embedded-text': break; // 16.27.4 \n\n\t\t\tcase 'body': case '电子表格': break; // 3.3 16.9.6 19.726.3\n\n\t\t\tcase 'forms': break; // 12.25.2 13.2\n\t\t\tcase 'table-column': break; // 9.1.6 \n\t\t\tcase 'table-header-rows': break; // 9.1.7 \n\t\t\tcase 'table-rows': break; // 9.1.12 \n\t\t\t/* TODO: outline levels */\n\t\t\tcase 'table-column-group': break; // 9.1.10 \n\t\t\tcase 'table-header-columns': break; // 9.1.11 \n\t\t\tcase 'table-columns': break; // 9.1.12 \n\n\t\t\tcase 'null-date': break; // 9.4.2 TODO: date1904\n\n\t\t\tcase 'graphic-properties': break; // 17.21 \n\t\t\tcase 'calculation-settings': break; // 9.4.1 \n\t\t\tcase 'named-expressions': break; // 9.4.11 \n\t\t\tcase 'label-range': break; // 9.4.9 \n\t\t\tcase 'label-ranges': break; // 9.4.10 \n\t\t\tcase 'named-expression': break; // 9.4.13 \n\t\t\tcase 'sort': break; // 9.4.19 \n\t\t\tcase 'sort-by': break; // 9.4.20 \n\t\t\tcase 'sort-groups': break; // 9.4.22 \n\n\t\t\tcase 'tab': break; // 6.1.4 \n\t\t\tcase 'line-break': break; // 6.1.5 \n\t\t\tcase 'span': break; // 6.1.7 \n\t\t\tcase 'p': case '文本串': // 5.1.3 \n\t\t\t\tif(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;\n\t\t\t\tif(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {\n\t\t\t\t\tvar ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);\n\t\t\t\t\ttextp = (textp.length > 0 ? textp + \"\\n\" : \"\") + ptp[0];\n\t\t\t\t} else { textptag = parsexmltag(Rn[0], false); textpidx = Rn.index + Rn[0].length; }\n\t\t\t\tbreak; // \n\t\t\tcase 's': break; // \n\n\t\t\tcase 'database-range': // 9.4.15 \n\t\t\t\tif(Rn[1]==='/') break;\n\t\t\t\ttry {\n\t\t\t\t\t_Ref = ods_to_csf_3D(parsexmltag(Rn[0])['target-range-address']);\n\t\t\t\t\tSheets[_Ref[0]]['!autofilter'] = { ref:_Ref[1] };\n\t\t\t\t} catch(e) {/* empty */}\n\t\t\t\tbreak;\n\n\t\t\tcase 'date': break; // <*:date>\n\n\t\t\tcase 'object': break; // 10.4.6.2 \n\t\t\tcase 'title': case '标题': break; // <*:title> OR \n\t\t\tcase 'desc': break; // <*:desc>\n\t\t\tcase 'binary-data': break; // 10.4.5 TODO: b64 blob\n\n\t\t\t/* 9.2 Advanced Tables */\n\t\t\tcase 'table-source': break; // 9.2.6\n\t\t\tcase 'scenario': break; // 9.2.6\n\n\t\t\tcase 'iteration': break; // 9.4.3 \n\t\t\tcase 'content-validations': break; // 9.4.4 \n\t\t\tcase 'filter': break; // 9.5.2 \n\t\t\tcase 'filter-and': break; // 9.5.3 \n\t\t\tcase 'filter-or': break; // 9.5.4 \n\t\t\tcase 'filter-condition': break; // 9.5.5 \n\n\t\t\tcase 'list-level-style-bullet': break; // 16.31 \n\t\t\tcase 'page-count': break; // TODO \n\t\t\tcase 'time': break; // TODO \n\n\t\t\t/* 9.3 Advanced Table Cells */\n\t\t\tcase 'cell-range-source': break; // 9.3.1 \n\t\t\tcase 'property': break; // 13.8 \n\n\t\t\tcase 'a': // 6.1.8 hyperlink\n\t\t\t\tif(Rn[1]!== '/') {\n\t\t\t\t\tatag = parsexmltag(Rn[0], false);\n\t\t\t\t\tif(!atag.href) break;\n\t\t\t\t\tatag.Target = unescapexml(atag.href); delete atag.href;\n\t\t\t\t\tif(atag.Target.charAt(0) == \"#\" && atag.Target.indexOf(\".\") > -1) {\n\t\t\t\t\t\t_Ref = ods_to_csf_3D(atag.Target.slice(1));\n\t\t\t\t\t\tatag.Target = \"#\" + _Ref[0] + \"!\" + _Ref[1];\n\t\t\t\t\t} else if(atag.Target.match(/^\\.\\.[\\\\\\/]/)) atag.Target = atag.Target.slice(3);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t/* non-standard */\n\t\t\tcase 'table-protection': break;\n\t\t\tcase 'data-pilot-grand-total': break; // ',\n\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t'',\n\t\t''\n\t].join(\"\");\n\n\tvar payload = '' + master_styles + '';\n\n\treturn function wso() {\n\t\treturn XML_HEADER + payload;\n\t};\n})();\nvar write_content_ods = (function() {\n\t/* 6.1.2 White Space Characters */\n\tvar write_text_p = function(text) {\n\t\treturn escapexml(text)\n\t\t\t.replace(/ +/g, function($$){return '';})\n\t\t\t.replace(/\\t/g, \"\")\n\t\t\t.replace(/\\n/g, \"\")\n\t\t\t.replace(/^ /, \"\").replace(/ $/, \"\");\n\t};\n\n\tvar null_cell_xml = ' \\n';\n\tvar covered_cell_xml = ' \\n';\n\tvar write_ws = function(ws, wb, i) {\n\t\t/* Section 9 Tables */\n\t\tvar o = [];\n\t\to.push(' \\n');\n\t\tvar R=0,C=0, range = decode_range(ws['!ref']||\"A1\");\n\t\tvar marr = ws['!merges'] || [], mi = 0;\n\t\tvar dense = Array.isArray(ws);\n\t\tif(ws[\"!cols\"]) {\n\t\t\tfor(C = 0; C <= range.e.c; ++C) o.push(' \\n');\n\t\t}\n\t\tvar H = \"\", ROWS = ws[\"!rows\"]||[];\n\t\tfor(R = 0; R < range.s.r; ++R) {\n\t\t\tH = ROWS[R] ? ' table:style-name=\"ro' + ROWS[R].ods + '\"' : \"\";\n\t\t\to.push(' \\n');\n\t\t}\n\t\tfor(; R <= range.e.r; ++R) {\n\t\t\tH = ROWS[R] ? ' table:style-name=\"ro' + ROWS[R].ods + '\"' : \"\";\n\t\t\to.push(' \\n');\n\t\t\tfor(C=0; C < range.s.c; ++C) o.push(null_cell_xml);\n\t\t\tfor(; C <= range.e.c; ++C) {\n\t\t\t\tvar skip = false, ct = {}, textp = \"\";\n\t\t\t\tfor(mi = 0; mi != marr.length; ++mi) {\n\t\t\t\t\tif(marr[mi].s.c > C) continue;\n\t\t\t\t\tif(marr[mi].s.r > R) continue;\n\t\t\t\t\tif(marr[mi].e.c < C) continue;\n\t\t\t\t\tif(marr[mi].e.r < R) continue;\n\t\t\t\t\tif(marr[mi].s.c != C || marr[mi].s.r != R) skip = true;\n\t\t\t\t\tct['table:number-columns-spanned'] = (marr[mi].e.c - marr[mi].s.c + 1);\n\t\t\t\t\tct['table:number-rows-spanned'] = (marr[mi].e.r - marr[mi].s.r + 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(skip) { o.push(covered_cell_xml); continue; }\n\t\t\t\tvar ref = encode_cell({r:R, c:C}), cell = dense ? (ws[R]||[])[C]: ws[ref];\n\t\t\t\tif(cell && cell.f) {\n\t\t\t\t\tct['table:formula'] = escapexml(csf_to_ods_formula(cell.f));\n\t\t\t\t\tif(cell.F) {\n\t\t\t\t\t\tif(cell.F.slice(0, ref.length) == ref) {\n\t\t\t\t\t\t\tvar _Fref = decode_range(cell.F);\n\t\t\t\t\t\t\tct['table:number-matrix-columns-spanned'] = (_Fref.e.c - _Fref.s.c + 1);\n\t\t\t\t\t\t\tct['table:number-matrix-rows-spanned'] = (_Fref.e.r - _Fref.s.r + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!cell) { o.push(null_cell_xml); continue; }\n\t\t\t\tswitch(cell.t) {\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\ttextp = (cell.v ? 'TRUE' : 'FALSE');\n\t\t\t\t\t\tct['office:value-type'] = \"boolean\";\n\t\t\t\t\t\tct['office:boolean-value'] = (cell.v ? 'true' : 'false');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\ttextp = (cell.w||String(cell.v||0));\n\t\t\t\t\t\tct['office:value-type'] = \"float\";\n\t\t\t\t\t\tct['office:value'] = (cell.v||0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 's': case 'str':\n\t\t\t\t\t\ttextp = cell.v == null ? \"\" : cell.v;\n\t\t\t\t\t\tct['office:value-type'] = \"string\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'd':\n\t\t\t\t\t\ttextp = (cell.w||(parseDate(cell.v).toISOString()));\n\t\t\t\t\t\tct['office:value-type'] = \"date\";\n\t\t\t\t\t\tct['office:date-value'] = (parseDate(cell.v).toISOString());\n\t\t\t\t\t\tct['table:style-name'] = \"ce1\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//case 'e':\n\t\t\t\t\tdefault: o.push(null_cell_xml); continue;\n\t\t\t\t}\n\t\t\t\tvar text_p = write_text_p(textp);\n\t\t\t\tif(cell.l && cell.l.Target) {\n\t\t\t\t\tvar _tgt = cell.l.Target;\n\t\t\t\t\t_tgt = _tgt.charAt(0) == \"#\" ? \"#\" + csf_to_ods_3D(_tgt.slice(1)) : _tgt;\n\t\t\t\t\t// TODO: choose correct parent path format based on link delimiters\n\t\t\t\t\tif(_tgt.charAt(0) != \"#\" && !_tgt.match(/^\\w+:/)) _tgt = '../' + _tgt;\n\t\t\t\t\ttext_p = writextag('text:a', text_p, {'xlink:href': _tgt.replace(/&/g, \"&\")});\n\t\t\t\t}\n\t\t\t\to.push(' ' + writextag('table:table-cell', writextag('text:p', text_p, {}), ct) + '\\n');\n\t\t\t}\n\t\t\to.push(' \\n');\n\t\t}\n\t\to.push(' \\n');\n\t\treturn o.join(\"\");\n\t};\n\n\tvar write_automatic_styles_ods = function(o, wb) {\n\t\to.push(' \\n');\n\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\to.push(' /\\n');\n\t\to.push(' \\n');\n\t\to.push(' /\\n');\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\n\t\t/* column styles */\n\t\tvar cidx = 0;\n\t\twb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {\n\t\t\tif(!ws) return;\n\t\t\tif(ws[\"!cols\"]) {\n\t\t\t\tfor(var C = 0; C < ws[\"!cols\"].length; ++C) if(ws[\"!cols\"][C]) {\n\t\t\t\t\tvar colobj = ws[\"!cols\"][C];\n\t\t\t\t\tif(colobj.width == null && colobj.wpx == null && colobj.wch == null) continue;\n\t\t\t\t\tprocess_col(colobj);\n\t\t\t\t\tcolobj.ods = cidx;\n\t\t\t\t\tvar w = ws[\"!cols\"][C].wpx + \"px\";\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\t++cidx;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/* row styles */\n\t\tvar ridx = 0;\n\t\twb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {\n\t\t\tif(!ws) return;\n\t\t\tif(ws[\"!rows\"]) {\n\t\t\t\tfor(var R = 0; R < ws[\"!rows\"].length; ++R) if(ws[\"!rows\"][R]) {\n\t\t\t\t\tws[\"!rows\"][R].ods = ridx;\n\t\t\t\t\tvar h = ws[\"!rows\"][R].hpx + \"px\";\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\t++ridx;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/* table */\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\n\t\t/* table cells, text */\n\t\to.push(' \\n');\n\n\t\t/* page-layout */\n\n\t\to.push(' \\n');\n\t};\n\n\treturn function wcx(wb, opts) {\n\t\tvar o = [XML_HEADER];\n\t\t/* 3.1.3.2 */\n\t\tvar attr = wxt_helper({\n\t\t\t'xmlns:office': \"urn:oasis:names:tc:opendocument:xmlns:office:1.0\",\n\t\t\t'xmlns:table': \"urn:oasis:names:tc:opendocument:xmlns:table:1.0\",\n\t\t\t'xmlns:style': \"urn:oasis:names:tc:opendocument:xmlns:style:1.0\",\n\t\t\t'xmlns:text': \"urn:oasis:names:tc:opendocument:xmlns:text:1.0\",\n\t\t\t'xmlns:draw': \"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\",\n\t\t\t'xmlns:fo': \"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\",\n\t\t\t'xmlns:xlink': \"http://www.w3.org/1999/xlink\",\n\t\t\t'xmlns:dc': \"http://purl.org/dc/elements/1.1/\",\n\t\t\t'xmlns:meta': \"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\",\n\t\t\t'xmlns:number': \"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\",\n\t\t\t'xmlns:presentation': \"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\",\n\t\t\t'xmlns:svg': \"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\",\n\t\t\t'xmlns:chart': \"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\",\n\t\t\t'xmlns:dr3d': \"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\",\n\t\t\t'xmlns:math': \"http://www.w3.org/1998/Math/MathML\",\n\t\t\t'xmlns:form': \"urn:oasis:names:tc:opendocument:xmlns:form:1.0\",\n\t\t\t'xmlns:script': \"urn:oasis:names:tc:opendocument:xmlns:script:1.0\",\n\t\t\t'xmlns:ooo': \"http://openoffice.org/2004/office\",\n\t\t\t'xmlns:ooow': \"http://openoffice.org/2004/writer\",\n\t\t\t'xmlns:oooc': \"http://openoffice.org/2004/calc\",\n\t\t\t'xmlns:dom': \"http://www.w3.org/2001/xml-events\",\n\t\t\t'xmlns:xforms': \"http://www.w3.org/2002/xforms\",\n\t\t\t'xmlns:xsd': \"http://www.w3.org/2001/XMLSchema\",\n\t\t\t'xmlns:xsi': \"http://www.w3.org/2001/XMLSchema-instance\",\n\t\t\t'xmlns:sheet': \"urn:oasis:names:tc:opendocument:sh33tjs:1.0\",\n\t\t\t'xmlns:rpt': \"http://openoffice.org/2005/report\",\n\t\t\t'xmlns:of': \"urn:oasis:names:tc:opendocument:xmlns:of:1.2\",\n\t\t\t'xmlns:xhtml': \"http://www.w3.org/1999/xhtml\",\n\t\t\t'xmlns:grddl': \"http://www.w3.org/2003/g/data-view#\",\n\t\t\t'xmlns:tableooo': \"http://openoffice.org/2009/table\",\n\t\t\t'xmlns:drawooo': \"http://openoffice.org/2010/draw\",\n\t\t\t'xmlns:calcext': \"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0\",\n\t\t\t'xmlns:loext': \"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0\",\n\t\t\t'xmlns:field': \"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0\",\n\t\t\t'xmlns:formx': \"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0\",\n\t\t\t'xmlns:css3t': \"http://www.w3.org/TR/css3-text/\",\n\t\t\t'office:version': \"1.2\"\n\t\t});\n\n\t\tvar fods = wxt_helper({\n\t\t\t'xmlns:config': \"urn:oasis:names:tc:opendocument:xmlns:config:1.0\",\n\t\t\t'office:mimetype': \"application/vnd.oasis.opendocument.spreadsheet\"\n\t\t});\n\n\t\tif(opts.bookType == \"fods\") {\n\t\t\to.push('\\n');\n\t\t\to.push(write_meta_ods().replace(/office:document-meta/g, \"office:meta\"));\n\t\t\t// TODO: settings (equiv of settings.xml for ODS)\n\t\t} else o.push('\\n');\n\t\t// o.push(' \\n');\n\t\twrite_automatic_styles_ods(o, wb);\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\tfor(var i = 0; i != wb.SheetNames.length; ++i) o.push(write_ws(wb.Sheets[wb.SheetNames[i]], wb, i, opts));\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\tif(opts.bookType == \"fods\") o.push('');\n\t\telse o.push('');\n\t\treturn o.join(\"\");\n\t};\n})();\n\nfunction write_ods(wb, opts) {\n\tif(opts.bookType == \"fods\") return write_content_ods(wb, opts);\n\n\tvar zip = zip_new();\n\tvar f = \"\";\n\n\tvar manifest = [];\n\tvar rdf = [];\n\n\t/* Part 3 Section 3.3 MIME Media Type */\n\tf = \"mimetype\";\n\tzip_add_file(zip, f, \"application/vnd.oasis.opendocument.spreadsheet\");\n\n\t/* Part 1 Section 2.2 Documents */\n\tf = \"content.xml\";\n\tzip_add_file(zip, f, write_content_ods(wb, opts));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"ContentFile\"]);\n\n\t/* TODO: these are hard-coded styles to satiate excel */\n\tf = \"styles.xml\";\n\tzip_add_file(zip, f, write_styles_ods(wb, opts));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"StylesFile\"]);\n\n\t/* TODO: this is hard-coded to satiate excel */\n\tf = \"meta.xml\";\n\tzip_add_file(zip, f, XML_HEADER + write_meta_ods());\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"MetadataFile\"]);\n\n\t/* Part 3 Section 6 Metadata Manifest File */\n\tf = \"manifest.rdf\";\n\tzip_add_file(zip, f, write_rdf(rdf/*, opts*/));\n\tmanifest.push([f, \"application/rdf+xml\"]);\n\n\t/* Part 3 Section 4 Manifest File */\n\tf = \"META-INF/manifest.xml\";\n\tzip_add_file(zip, f, write_manifest(manifest/*, opts*/));\n\n\treturn zip;\n}\n\nfunction write_sheet_index(wb, sheet) {\n\tif(!sheet) return 0;\n\tvar idx = wb.SheetNames.indexOf(sheet);\n\tif(idx == -1) throw new Error(\"Sheet not found: \" + sheet);\n\treturn idx;\n}\n\nfunction write_obj_str(factory) {\n\treturn function write_str(wb, o) {\n\t\tvar idx = write_sheet_index(wb, o.sheet);\n\t\treturn factory.from_sheet(wb.Sheets[wb.SheetNames[idx]], o, wb);\n\t};\n}\n\nvar write_htm_str = write_obj_str(HTML_);\nvar write_csv_str = write_obj_str({from_sheet:sheet_to_csv});\nvar write_slk_str = write_obj_str(typeof SYLK !== \"undefined\" ? SYLK : {});\nvar write_dif_str = write_obj_str(typeof DIF !== \"undefined\" ? DIF : {});\nvar write_prn_str = write_obj_str(typeof PRN !== \"undefined\" ? PRN : {});\nvar write_rtf_str = write_obj_str(typeof RTF !== \"undefined\" ? RTF : {});\nvar write_txt_str = write_obj_str({from_sheet:sheet_to_txt});\nvar write_dbf_buf = write_obj_str(typeof DBF !== \"undefined\" ? DBF : {});\nvar write_eth_str = write_obj_str(typeof ETH !== \"undefined\" ? ETH : {});\nvar write_wk1_buf = write_obj_str(typeof WK_ !== \"undefined\" ? {from_sheet:WK_.sheet_to_wk1} : {});\n\nfunction fix_opts_func(defaults) {\n\treturn function fix_opts(opts) {\n\t\tfor(var i = 0; i != defaults.length; ++i) {\n\t\t\tvar d = defaults[i];\n\t\t\tif(opts[d[0]] === undefined) opts[d[0]] = d[1];\n\t\t\tif(d[2] === 'n') opts[d[0]] = Number(opts[d[0]]);\n\t\t}\n\t};\n}\n\nvar fix_read_opts = function(opts) {\nfix_opts_func([\n\t['cellNF', false], /* emit cell number format string as .z */\n\t['cellHTML', true], /* emit html string as .h */\n\t['cellFormula', true], /* emit formulae as .f */\n\t['cellStyles', false], /* emits style/theme as .s */\n\t['cellText', true], /* emit formatted text as .w */\n\t['cellDates', false], /* emit date cells with type `d` */\n\n\t['sheetStubs', false], /* emit empty cells */\n\t['sheetRows', 0, 'n'], /* read n rows (0 = read all rows) */\n\n\t['bookDeps', false], /* parse calculation chains */\n\t['bookSheets', false], /* only try to get sheet names (no Sheets) */\n\t['bookProps', false], /* only try to get properties (no Sheets) */\n\t['bookFiles', false], /* include raw file structure (keys, files, cfb) */\n\t['bookVBA', false], /* include vba raw data (vbaraw) */\n\n\t['password',''], /* password */\n\t['WTF', false] /* WTF mode (throws errors) */\n])(opts);\n};\n\nvar fix_write_opts = fix_opts_func([\n\t['cellDates', false], /* write date cells with type `d` */\n\n\t['bookSST', false], /* Generate Shared String Table */\n\n\t['bookType', 'xlsx'], /* Type of workbook (xlsx/m/b) */\n\n\t['compression', false], /* Use file compression */\n\n\t['WTF', false] /* WTF mode (throws errors) */\n]);\nfunction get_sheet_type(n) {\n\tif(RELS.WS.indexOf(n) > -1) return \"sheet\";\n\tif(RELS.CS && n == RELS.CS) return \"chart\";\n\tif(RELS.DS && n == RELS.DS) return \"dialog\";\n\tif(RELS.MS && n == RELS.MS) return \"macro\";\n\treturn (n && n.length) ? n : \"sheet\";\n}\nfunction safe_parse_wbrels(wbrels, sheets) {\n\tif(!wbrels) return 0;\n\ttry {\n\t\twbrels = sheets.map(function pwbr(w) { if(!w.id) w.id = w.strRelID; return [w.name, wbrels['!id'][w.id].Target, get_sheet_type(wbrels['!id'][w.id].Type)]; });\n\t} catch(e) { return null; }\n\treturn !wbrels || wbrels.length === 0 ? null : wbrels;\n}\n\nfunction safe_parse_sheet(zip, path, relsPath, sheet, idx, sheetRels, sheets, stype, opts, wb, themes, styles) {\n\ttry {\n\t\tsheetRels[sheet]=parse_rels(getzipstr(zip, relsPath, true), path);\n\t\tvar data = getzipdata(zip, path);\n\t\tvar _ws;\n\t\tswitch(stype) {\n\t\t\tcase 'sheet': _ws = parse_ws(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tcase 'chart': _ws = parse_cs(data, path, idx, opts, sheetRels[sheet], wb, themes, styles);\n\t\t\t\tif(!_ws || !_ws['!drawel']) break;\n\t\t\t\tvar dfile = resolve_path(_ws['!drawel'].Target, path);\n\t\t\t\tvar drelsp = get_rels_path(dfile);\n\t\t\t\tvar draw = parse_drawing(getzipstr(zip, dfile, true), parse_rels(getzipstr(zip, drelsp, true), dfile));\n\t\t\t\tvar chartp = resolve_path(draw, dfile);\n\t\t\t\tvar crelsp = get_rels_path(chartp);\n\t\t\t\t_ws = parse_chart(getzipstr(zip, chartp, true), chartp, opts, parse_rels(getzipstr(zip, crelsp, true), chartp), wb, _ws);\n\t\t\t\tbreak;\n\t\t\tcase 'macro': _ws = parse_ms(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tcase 'dialog': _ws = parse_ds(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tdefault: throw new Error(\"Unrecognized sheet type \" + stype);\n\t\t}\n\t\tsheets[sheet] = _ws;\n\n\t\t/* scan rels for comments */\n\t\tvar comments = [];\n\t\tif(sheetRels && sheetRels[sheet]) keys(sheetRels[sheet]).forEach(function(n) {\n\t\t\tif(sheetRels[sheet][n].Type == RELS.CMNT) {\n\t\t\t\tvar dfile = resolve_path(sheetRels[sheet][n].Target, path);\n\t\t\t\tcomments = parse_cmnt(getzipdata(zip, dfile, true), dfile, opts);\n\t\t\t\tif(!comments || !comments.length) return;\n\t\t\t\tsheet_insert_comments(_ws, comments);\n\t\t\t}\n\t\t});\n\t} catch(e) { if(opts.WTF) throw e; }\n}\n\nfunction strip_front_slash(x) { return x.charAt(0) == '/' ? x.slice(1) : x; }\n\nfunction parse_zip(zip, opts) {\n\tmake_ssf(SSF);\n\topts = opts || {};\n\tfix_read_opts(opts);\n\n\t/* OpenDocument Part 3 Section 2.2.1 OpenDocument Package */\n\tif(safegetzipfile(zip, 'META-INF/manifest.xml')) return parse_ods(zip, opts);\n\t/* UOC */\n\tif(safegetzipfile(zip, 'objectdata.xml')) return parse_ods(zip, opts);\n\t/* Numbers */\n\tif(safegetzipfile(zip, 'Index/Document.iwa')) throw new Error('Unsupported NUMBERS file');\n\tif(!safegetzipfile(zip, '[Content_Types].xml')) {\n\t\tif(safegetzipfile(zip, 'index.xml.gz')) throw new Error('Unsupported NUMBERS 08 file');\n\t\tif(safegetzipfile(zip, 'index.xml')) throw new Error('Unsupported NUMBERS 09 file');\n\t\tthrow new Error('Unsupported ZIP file');\n\t}\n\n\tvar entries = zipentries(zip);\n\tvar dir = parse_ct((getzipstr(zip, '[Content_Types].xml')));\n\tvar xlsb = false;\n\tvar sheets, binname;\n\tif(dir.workbooks.length === 0) {\n\t\tbinname = \"xl/workbook.xml\";\n\t\tif(getzipdata(zip,binname, true)) dir.workbooks.push(binname);\n\t}\n\tif(dir.workbooks.length === 0) {\n\t\tbinname = \"xl/workbook.bin\";\n\t\tif(!getzipdata(zip,binname,true)) throw new Error(\"Could not find workbook\");\n\t\tdir.workbooks.push(binname);\n\t\txlsb = true;\n\t}\n\tif(dir.workbooks[0].slice(-3) == \"bin\") xlsb = true;\n\n\tvar themes = ({});\n\tvar styles = ({});\n\tif(!opts.bookSheets && !opts.bookProps) {\n\t\tstrs = [];\n\t\tif(dir.sst) try { strs=parse_sst(getzipdata(zip, strip_front_slash(dir.sst)), dir.sst, opts); } catch(e) { if(opts.WTF) throw e; }\n\n\t\tif(opts.cellStyles && dir.themes.length) themes = parse_theme(getzipstr(zip, dir.themes[0].replace(/^\\//,''), true)||\"\",dir.themes[0], opts);\n\n\t\tif(dir.style) styles = parse_sty(getzipdata(zip, strip_front_slash(dir.style)), dir.style, themes, opts);\n\t}\n\n\t/*var externbooks = */dir.links.map(function(link) {\n\t\ttry {\n\t\t\tvar rels = parse_rels(getzipstr(zip, get_rels_path(strip_front_slash(link))), link);\n\t\t\treturn parse_xlink(getzipdata(zip, strip_front_slash(link)), rels, link, opts);\n\t\t} catch(e) {}\n\t});\n\n\tvar wb = parse_wb(getzipdata(zip, strip_front_slash(dir.workbooks[0])), dir.workbooks[0], opts);\n\n\tvar props = {}, propdata = \"\";\n\n\tif(dir.coreprops.length) {\n\t\tpropdata = getzipdata(zip, strip_front_slash(dir.coreprops[0]), true);\n\t\tif(propdata) props = parse_core_props(propdata);\n\t\tif(dir.extprops.length !== 0) {\n\t\t\tpropdata = getzipdata(zip, strip_front_slash(dir.extprops[0]), true);\n\t\t\tif(propdata) parse_ext_props(propdata, props, opts);\n\t\t}\n\t}\n\n\tvar custprops = {};\n\tif(!opts.bookSheets || opts.bookProps) {\n\t\tif (dir.custprops.length !== 0) {\n\t\t\tpropdata = getzipstr(zip, strip_front_slash(dir.custprops[0]), true);\n\t\t\tif(propdata) custprops = parse_cust_props(propdata, opts);\n\t\t}\n\t}\n\n\tvar out = ({});\n\tif(opts.bookSheets || opts.bookProps) {\n\t\tif(wb.Sheets) sheets = wb.Sheets.map(function pluck(x){ return x.name; });\n\t\telse if(props.Worksheets && props.SheetNames.length > 0) sheets=props.SheetNames;\n\t\tif(opts.bookProps) { out.Props = props; out.Custprops = custprops; }\n\t\tif(opts.bookSheets && typeof sheets !== 'undefined') out.SheetNames = sheets;\n\t\tif(opts.bookSheets ? out.SheetNames : opts.bookProps) return out;\n\t}\n\tsheets = {};\n\n\tvar deps = {};\n\tif(opts.bookDeps && dir.calcchain) deps=parse_cc(getzipdata(zip, strip_front_slash(dir.calcchain)),dir.calcchain,opts);\n\n\tvar i=0;\n\tvar sheetRels = ({});\n\tvar path, relsPath;\n\n\t{\n\t\tvar wbsheets = wb.Sheets;\n\t\tprops.Worksheets = wbsheets.length;\n\t\tprops.SheetNames = [];\n\t\tfor(var j = 0; j != wbsheets.length; ++j) {\n\t\t\tprops.SheetNames[j] = wbsheets[j].name;\n\t\t}\n\t}\n\n\tvar wbext = xlsb ? \"bin\" : \"xml\";\n\tvar wbrelsi = dir.workbooks[0].lastIndexOf(\"/\");\n\tvar wbrelsfile = (dir.workbooks[0].slice(0, wbrelsi+1) + \"_rels/\" + dir.workbooks[0].slice(wbrelsi+1) + \".rels\").replace(/^\\//,\"\");\n\tif(!safegetzipfile(zip, wbrelsfile)) wbrelsfile = 'xl/_rels/workbook.' + wbext + '.rels';\n\tvar wbrels = parse_rels(getzipstr(zip, wbrelsfile, true), wbrelsfile);\n\tif(wbrels) wbrels = safe_parse_wbrels(wbrels, wb.Sheets);\n\n\t/* Numbers iOS hack */\n\tvar nmode = (getzipdata(zip,\"xl/worksheets/sheet.xml\",true))?1:0;\n\twsloop: for(i = 0; i != props.Worksheets; ++i) {\n\t\tvar stype = \"sheet\";\n\t\tif(wbrels && wbrels[i]) {\n\t\t\tpath = 'xl/' + (wbrels[i][1]).replace(/[\\/]?xl\\//, \"\");\n\t\t\tif(!safegetzipfile(zip, path)) path = wbrels[i][1];\n\t\t\tif(!safegetzipfile(zip, path)) path = wbrelsfile.replace(/_rels\\/.*$/,\"\") + wbrels[i][1];\n\t\t\tstype = wbrels[i][2];\n\t\t} else {\n\t\t\tpath = 'xl/worksheets/sheet'+(i+1-nmode)+\".\" + wbext;\n\t\t\tpath = path.replace(/sheet0\\./,\"sheet.\");\n\t\t}\n\t\trelsPath = path.replace(/^(.*)(\\/)([^\\/]*)$/, \"$1/_rels/$3.rels\");\n\t\tif(opts && opts.sheets != null) switch(typeof opts.sheets) {\n\t\t\tcase \"number\": if(i != opts.sheets) continue wsloop; break;\n\t\t\tcase \"string\": if(props.SheetNames[i].toLowerCase() != opts.sheets.toLowerCase()) continue wsloop; break;\n\t\t\tdefault: if(Array.isArray && Array.isArray(opts.sheets)) {\n\t\t\t\tvar snjseen = false;\n\t\t\t\tfor(var snj = 0; snj != opts.sheets.length; ++snj) {\n\t\t\t\t\tif(typeof opts.sheets[snj] == \"number\" && opts.sheets[snj] == i) snjseen=1;\n\t\t\t\t\tif(typeof opts.sheets[snj] == \"string\" && opts.sheets[snj].toLowerCase() == props.SheetNames[i].toLowerCase()) snjseen = 1;\n\t\t\t\t}\n\t\t\t\tif(!snjseen) continue wsloop;\n\t\t\t}\n\t\t}\n\t\tsafe_parse_sheet(zip, path, relsPath, props.SheetNames[i], i, sheetRels, sheets, stype, opts, wb, themes, styles);\n\t}\n\n\tout = ({\n\t\tDirectory: dir,\n\t\tWorkbook: wb,\n\t\tProps: props,\n\t\tCustprops: custprops,\n\t\tDeps: deps,\n\t\tSheets: sheets,\n\t\tSheetNames: props.SheetNames,\n\t\tStrings: strs,\n\t\tStyles: styles,\n\t\tThemes: themes,\n\t\tSSF: SSF.get_table()\n\t});\n\tif(opts && opts.bookFiles) {\n\t\tif(zip.files) {\n\t\t\tout.keys = entries;\n\t\t\tout.files = zip.files;\n\t\t} else {\n\t\t\tout.keys = [];\n\t\t\tout.files = {};\n\t\t\tzip.FullPaths.forEach(function(p, idx) {\n\t\t\t\tp = p.replace(/^Root Entry[\\/]/, \"\");\n\t\t\t\tout.keys.push(p);\n\t\t\t\tout.files[p] = zip.FileIndex[idx];\n\t\t\t});\n\t\t}\n\t}\n\tif(opts && opts.bookVBA) {\n\t\tif(dir.vba.length > 0) out.vbaraw = getzipdata(zip,strip_front_slash(dir.vba[0]),true);\n\t\telse if(dir.defaults && dir.defaults.bin === CT_VBA) out.vbaraw = getzipdata(zip, 'xl/vbaProject.bin',true);\n\t}\n\treturn out;\n}\n\n/* [MS-OFFCRYPTO] 2.1.1 */\nfunction parse_xlsxcfb(cfb, _opts) {\n\tvar opts = _opts || {};\n\tvar f = 'Workbook', data = CFB.find(cfb, f);\n\ttry {\n\tf = '/!DataSpaces/Version';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\t/*var version = */parse_DataSpaceVersionInfo(data.content);\n\n\t/* 2.3.4.1 */\n\tf = '/!DataSpaces/DataSpaceMap';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar dsm = parse_DataSpaceMap(data.content);\n\tif(dsm.length !== 1 || dsm[0].comps.length !== 1 || dsm[0].comps[0].t !== 0 || dsm[0].name !== \"StrongEncryptionDataSpace\" || dsm[0].comps[0].v !== \"EncryptedPackage\")\n\t\tthrow new Error(\"ECMA-376 Encrypted file bad \" + f);\n\n\t/* 2.3.4.2 */\n\tf = '/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar seds = parse_DataSpaceDefinition(data.content);\n\tif(seds.length != 1 || seds[0] != \"StrongEncryptionTransform\")\n\t\tthrow new Error(\"ECMA-376 Encrypted file bad \" + f);\n\n\t/* 2.3.4.3 */\n\tf = '/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\t/*var hdr = */parse_Primary(data.content);\n\t} catch(e) {}\n\n\tf = '/EncryptionInfo';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar einfo = parse_EncryptionInfo(data.content);\n\n\t/* 2.3.4.4 */\n\tf = '/EncryptedPackage';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\n/*global decrypt_agile */\nif(einfo[0] == 0x04 && typeof decrypt_agile !== 'undefined') return decrypt_agile(einfo[1], data.content, opts.password || \"\", opts);\n/*global decrypt_std76 */\nif(einfo[0] == 0x02 && typeof decrypt_std76 !== 'undefined') return decrypt_std76(einfo[1], data.content, opts.password || \"\", opts);\n\tthrow new Error(\"File is password-protected\");\n}\n\nfunction write_zip(wb, opts) {\n\t_shapeid = 1024;\n\tif(opts.bookType == \"ods\") return write_ods(wb, opts);\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = SSF.get_table();\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(SSF); SSF.load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t}\n\topts.rels = {}; opts.wbrels = {};\n\topts.Strings = []; opts.Strings.Count = 0; opts.Strings.Unique = 0;\n\tif(browser_has_Map) opts.revStrings = new Map();\n\telse { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; }\n\tvar wbext = opts.bookType == \"xlsb\" ? \"bin\" : \"xml\";\n\tvar vbafmt = VBAFMTS.indexOf(opts.bookType) > -1;\n\tvar ct = new_ct();\n\tfix_write_opts(opts = opts || {});\n\tvar zip = zip_new();\n\tvar f = \"\", rId = 0;\n\n\topts.cellXfs = [];\n\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tf = \"docProps/core.xml\";\n\tzip_add_file(zip, f, write_core_props(wb.Props, opts));\n\tct.coreprops.push(f);\n\tadd_rels(opts.rels, 2, f, RELS.CORE_PROPS);\n\nf = \"docProps/app.xml\";\n\tif(wb.Props && wb.Props.SheetNames){/* empty */}\n\telse if(!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames;\n\telse {\n\t\tvar _sn = [];\n\t\tfor(var _i = 0; _i < wb.SheetNames.length; ++_i)\n\t\t\tif((wb.Workbook.Sheets[_i]||{}).Hidden != 2) _sn.push(wb.SheetNames[_i]);\n\t\twb.Props.SheetNames = _sn;\n\t}\n\twb.Props.Worksheets = wb.Props.SheetNames.length;\n\tzip_add_file(zip, f, write_ext_props(wb.Props, opts));\n\tct.extprops.push(f);\n\tadd_rels(opts.rels, 3, f, RELS.EXT_PROPS);\n\n\tif(wb.Custprops !== wb.Props && keys(wb.Custprops||{}).length > 0) {\n\t\tf = \"docProps/custom.xml\";\n\t\tzip_add_file(zip, f, write_cust_props(wb.Custprops, opts));\n\t\tct.custprops.push(f);\n\t\tadd_rels(opts.rels, 4, f, RELS.CUST_PROPS);\n\t}\n\n\tfor(rId=1;rId <= wb.SheetNames.length; ++rId) {\n\t\tvar wsrels = {'!id':{}};\n\t\tvar ws = wb.Sheets[wb.SheetNames[rId-1]];\n\t\tvar _type = (ws || {})[\"!type\"] || \"sheet\";\n\t\tswitch(_type) {\n\t\tcase \"chart\":\n\t\t\t/* falls through */\n\t\tdefault:\n\t\t\tf = \"xl/worksheets/sheet\" + rId + \".\" + wbext;\n\t\t\tzip_add_file(zip, f, write_ws(rId-1, f, opts, wb, wsrels));\n\t\t\tct.sheets.push(f);\n\t\t\tadd_rels(opts.wbrels, -1, \"worksheets/sheet\" + rId + \".\" + wbext, RELS.WS[0]);\n\t\t}\n\n\t\tif(ws) {\n\t\t\tvar comments = ws['!comments'];\n\t\t\tvar need_vml = false;\n\t\t\tif(comments && comments.length > 0) {\n\t\t\t\tvar cf = \"xl/comments\" + rId + \".\" + wbext;\n\t\t\t\tzip_add_file(zip, cf, write_cmnt(comments, cf, opts));\n\t\t\t\tct.comments.push(cf);\n\t\t\t\tadd_rels(wsrels, -1, \"../comments\" + rId + \".\" + wbext, RELS.CMNT);\n\t\t\t\tneed_vml = true;\n\t\t\t}\n\t\t\tif(ws['!legacy']) {\n\t\t\t\tif(need_vml) zip_add_file(zip, \"xl/drawings/vmlDrawing\" + (rId) + \".vml\", write_comments_vml(rId, ws['!comments']));\n\t\t\t}\n\t\t\tdelete ws['!comments'];\n\t\t\tdelete ws['!legacy'];\n\t\t}\n\n\t\tif(wsrels['!id'].rId1) zip_add_file(zip, get_rels_path(f), write_rels(wsrels));\n\t}\n\n\tif(opts.Strings != null && opts.Strings.length > 0) {\n\t\tf = \"xl/sharedStrings.\" + wbext;\n\t\tzip_add_file(zip, f, write_sst(opts.Strings, f, opts));\n\t\tct.strs.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"sharedStrings.\" + wbext, RELS.SST);\n\t}\n\n\tf = \"xl/workbook.\" + wbext;\n\tzip_add_file(zip, f, write_wb(wb, f, opts));\n\tct.workbooks.push(f);\n\tadd_rels(opts.rels, 1, f, RELS.WB);\n\n\t/* TODO: something more intelligent with themes */\n\n\tf = \"xl/theme/theme1.xml\";\n\tzip_add_file(zip, f, write_theme(wb.Themes, opts));\n\tct.themes.push(f);\n\tadd_rels(opts.wbrels, -1, \"theme/theme1.xml\", RELS.THEME);\n\n\t/* TODO: something more intelligent with styles */\n\n\tf = \"xl/styles.\" + wbext;\n\tzip_add_file(zip, f, write_sty(wb, f, opts));\n\tct.styles.push(f);\n\tadd_rels(opts.wbrels, -1, \"styles.\" + wbext, RELS.STY);\n\n\tif(wb.vbaraw && vbafmt) {\n\t\tf = \"xl/vbaProject.bin\";\n\t\tzip_add_file(zip, f, wb.vbaraw);\n\t\tct.vba.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"vbaProject.bin\", RELS.VBA);\n\t}\n\n\tzip_add_file(zip, \"[Content_Types].xml\", write_ct(ct, opts));\n\tzip_add_file(zip, '_rels/.rels', write_rels(opts.rels));\n\tzip_add_file(zip, 'xl/_rels/workbook.' + wbext + '.rels', write_rels(opts.wbrels));\n\n\tdelete opts.revssf; delete opts.ssf;\n\treturn zip;\n}\nfunction firstbyte(f,o) {\n\tvar x = \"\";\n\tswitch((o||{}).type || \"base64\") {\n\t\tcase 'buffer': return [f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]];\n\t\tcase 'base64': x = Base64.decode(f.slice(0,12)); break;\n\t\tcase 'binary': x = f; break;\n\t\tcase 'array': return [f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]];\n\t\tdefault: throw new Error(\"Unrecognized type \" + (o && o.type || \"undefined\"));\n\t}\n\treturn [x.charCodeAt(0), x.charCodeAt(1), x.charCodeAt(2), x.charCodeAt(3), x.charCodeAt(4), x.charCodeAt(5), x.charCodeAt(6), x.charCodeAt(7)];\n}\n\nfunction read_cfb(cfb, opts) {\n\tif(CFB.find(cfb, \"EncryptedPackage\")) return parse_xlsxcfb(cfb, opts);\n\treturn parse_xlscfb(cfb, opts);\n}\n\nfunction read_zip(data, opts) {\n\tvar zip, d = data;\n\tvar o = opts||{};\n\tif(!o.type) o.type = (has_buf && Buffer.isBuffer(data)) ? \"buffer\" : \"base64\";\n\tzip = zip_read(d, o);\n\treturn parse_zip(zip, o);\n}\n\nfunction read_plaintext(data, o) {\n\tvar i = 0;\n\tmain: while(i < data.length) switch(data.charCodeAt(i)) {\n\t\tcase 0x0A: case 0x0D: case 0x20: ++i; break;\n\t\tcase 0x3C: return parse_xlml(data.slice(i),o);\n\t\tdefault: break main;\n\t}\n\treturn PRN.to_workbook(data, o);\n}\n\nfunction read_plaintext_raw(data, o) {\n\tvar str = \"\", bytes = firstbyte(data, o);\n\tswitch(o.type) {\n\t\tcase 'base64': str = Base64.decode(data); break;\n\t\tcase 'binary': str = data; break;\n\t\tcase 'buffer': str = data.toString('binary'); break;\n\t\tcase 'array': str = cc2str(data); break;\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\tif(bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) str = utf8read(str);\n\treturn read_plaintext(str, o);\n}\n\nfunction read_utf16(data, o) {\n\tvar d = data;\n\tif(o.type == 'base64') d = Base64.decode(d);\n\td = cptable.utils.decode(1200, d.slice(2), 'str');\n\to.type = \"binary\";\n\treturn read_plaintext(d, o);\n}\n\nfunction bstrify(data) {\n\treturn !data.match(/[^\\x00-\\x7F]/) ? data : utf8write(data);\n}\n\nfunction read_prn(data, d, o, str) {\n\tif(str) { o.type = \"string\"; return PRN.to_workbook(data, o); }\n\treturn PRN.to_workbook(d, o);\n}\n\nfunction readSync(data, opts) {\n\treset_cp();\n\tvar o = opts||{};\n\tif(typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer) return readSync(new Uint8Array(data), (o = dup(o), o.type = \"array\", o));\n\tvar d = data, n = [0,0,0,0], str = false;\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\t_ssfopts = {};\n\tif(o.dateNF) _ssfopts.dateNF = o.dateNF;\n\tif(!o.type) o.type = (has_buf && Buffer.isBuffer(data)) ? \"buffer\" : \"base64\";\n\tif(o.type == \"file\") { o.type = has_buf ? \"buffer\" : \"binary\"; d = read_binary(data); }\n\tif(o.type == \"string\") { str = true; o.type = \"binary\"; o.codepage = 65001; d = bstrify(data); }\n\tif(o.type == 'array' && typeof Uint8Array !== 'undefined' && data instanceof Uint8Array && typeof ArrayBuffer !== 'undefined') {\n\t\t// $FlowIgnore\n\t\tvar ab=new ArrayBuffer(3), vu=new Uint8Array(ab); vu.foo=\"bar\";\n\t\t// $FlowIgnore\n\t\tif(!vu.foo) {o=dup(o); o.type='array'; return readSync(ab2a(d), o);}\n\t}\n\tswitch((n = firstbyte(d, o))[0]) {\n\t\tcase 0xD0: if(n[1] === 0xCF && n[2] === 0x11 && n[3] === 0xE0 && n[4] === 0xA1 && n[5] === 0xB1 && n[6] === 0x1A && n[7] === 0xE1) return read_cfb(CFB.read(d, o), o); break;\n\t\tcase 0x09: if(n[1] <= 0x08) return parse_xlscfb(d, o); break;\n\t\tcase 0x3C: return parse_xlml(d, o);\n\t\tcase 0x49:\n\t\t\tif(n[1] === 0x49 && n[2] === 0x2a && n[3] === 0x00) throw new Error(\"TIFF Image File is not a spreadsheet\");\n\t\t\tif(n[1] === 0x44) return read_wb_ID(d, o);\n\t\t\tbreak;\n\t\tcase 0x54: if(n[1] === 0x41 && n[2] === 0x42 && n[3] === 0x4C) return DIF.to_workbook(d, o); break;\n\t\tcase 0x50: return (n[1] === 0x4B && n[2] < 0x09 && n[3] < 0x09) ? read_zip(d, o) : read_prn(data, d, o, str);\n\t\tcase 0xEF: return n[3] === 0x3C ? parse_xlml(d, o) : read_prn(data, d, o, str);\n\t\tcase 0xFF:\n\t\t\tif(n[1] === 0xFE) { return read_utf16(d, o); }\n\t\t\telse if(n[1] === 0x00 && n[2] === 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);\n\t\t\tbreak;\n\t\tcase 0x00:\n\t\t\tif(n[1] === 0x00) {\n\t\t\t\tif(n[2] >= 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);\n\t\t\t\tif(n[2] === 0x00 && (n[3] === 0x08 || n[3] === 0x09)) return WK_.to_workbook(d, o);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 0x03: case 0x83: case 0x8B: case 0x8C: return DBF.to_workbook(d, o);\n\t\tcase 0x7B: if(n[1] === 0x5C && n[2] === 0x72 && n[3] === 0x74) return RTF.to_workbook(d, o); break;\n\t\tcase 0x0A: case 0x0D: case 0x20: return read_plaintext_raw(d, o);\n\t\tcase 0x89: if(n[1] === 0x50 && n[2] === 0x4E && n[3] === 0x47) throw new Error(\"PNG Image File is not a spreadsheet\"); break;\n\t}\n\tif(DBF.versions.indexOf(n[0]) > -1 && n[2] <= 12 && n[3] <= 31) return DBF.to_workbook(d, o);\n\treturn read_prn(data, d, o, str);\n}\n\nfunction readFileSync(filename, opts) {\n\tvar o = opts||{}; o.type = 'file';\n\treturn readSync(filename, o);\n}\nfunction write_cfb_ctr(cfb, o) {\n\tswitch(o.type) {\n\t\tcase \"base64\": case \"binary\": break;\n\t\tcase \"buffer\": case \"array\": o.type = \"\"; break;\n\t\tcase \"file\": return write_dl(o.file, CFB.write(cfb, {type:has_buf ? 'buffer' : \"\"}));\n\t\tcase \"string\": throw new Error(\"'string' output type invalid for '\" + o.bookType + \"' files\");\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\treturn CFB.write(cfb, o);\n}\n\nfunction write_zip_type(wb, opts) {\n\tvar o = dup(opts||{});\n\tvar z = write_zip(wb, o);\n\tvar oopts = {};\n\tif(o.compression) oopts.compression = 'DEFLATE';\n\tif(o.password) oopts.type = has_buf ? \"nodebuffer\" : \"string\";\n\telse switch(o.type) {\n\t\tcase \"base64\": oopts.type = \"base64\"; break;\n\t\tcase \"binary\": oopts.type = \"string\"; break;\n\t\tcase \"string\": throw new Error(\"'string' output type invalid for '\" + o.bookType + \"' files\");\n\t\tcase \"buffer\":\n\t\tcase \"file\": oopts.type = has_buf ? \"nodebuffer\" : \"string\"; break;\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\tvar out = z.FullPaths ? CFB.write(z, {fileType:\"zip\", type: {\"nodebuffer\": \"buffer\", \"string\": \"binary\"}[oopts.type] || oopts.type}) : z.generate(oopts);\n/*jshint -W083 */\n\tif(o.password && typeof encrypt_agile !== 'undefined') return write_cfb_ctr(encrypt_agile(out, o.password), o); // eslint-disable-line no-undef\n/*jshint +W083 */\n\tif(o.type === \"file\") return write_dl(o.file, out);\n\treturn o.type == \"string\" ? utf8read(out) : out;\n}\n\nfunction write_cfb_type(wb, opts) {\n\tvar o = opts||{};\n\tvar cfb = write_xlscfb(wb, o);\n\treturn write_cfb_ctr(cfb, o);\n}\n\nfunction write_string_type(out, opts, bom) {\n\tif(!bom) bom = \"\";\n\tvar o = bom + out;\n\tswitch(opts.type) {\n\t\tcase \"base64\": return Base64.encode(utf8write(o));\n\t\tcase \"binary\": return utf8write(o);\n\t\tcase \"string\": return out;\n\t\tcase \"file\": return write_dl(opts.file, o, 'utf8');\n\t\tcase \"buffer\": {\n\t\t\tif(has_buf) return Buffer_from(o, 'utf8');\n\t\t\telse return write_string_type(o, {type:'binary'}).split(\"\").map(function(c) { return c.charCodeAt(0); });\n\t\t}\n\t}\n\tthrow new Error(\"Unrecognized type \" + opts.type);\n}\n\nfunction write_stxt_type(out, opts) {\n\tswitch(opts.type) {\n\t\tcase \"base64\": return Base64.encode(out);\n\t\tcase \"binary\": return out;\n\t\tcase \"string\": return out; /* override in sheet_to_txt */\n\t\tcase \"file\": return write_dl(opts.file, out, 'binary');\n\t\tcase \"buffer\": {\n\t\t\tif(has_buf) return Buffer_from(out, 'binary');\n\t\t\telse return out.split(\"\").map(function(c) { return c.charCodeAt(0); });\n\t\t}\n\t}\n\tthrow new Error(\"Unrecognized type \" + opts.type);\n}\n\n/* TODO: test consistency */\nfunction write_binary_type(out, opts) {\n\tswitch(opts.type) {\n\t\tcase \"string\":\n\t\tcase \"base64\":\n\t\tcase \"binary\":\n\t\t\tvar bstr = \"\";\n\t\t\t// $FlowIgnore\n\t\t\tfor(var i = 0; i < out.length; ++i) bstr += String.fromCharCode(out[i]);\n\t\t\treturn opts.type == 'base64' ? Base64.encode(bstr) : opts.type == 'string' ? utf8read(bstr) : bstr;\n\t\tcase \"file\": return write_dl(opts.file, out);\n\t\tcase \"buffer\": return out;\n\t\tdefault: throw new Error(\"Unrecognized type \" + opts.type);\n\t}\n}\n\nfunction writeSync(wb, opts) {\n\treset_cp();\n\tcheck_wb(wb);\n\tvar o = dup(opts||{});\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\tif(o.type == \"array\") { o.type = \"binary\"; var out = (writeSync(wb, o)); o.type = \"array\"; return s2ab(out); }\n\tswitch(o.bookType || 'xlsb') {\n\t\tcase 'xml':\n\t\tcase 'xlml': return write_string_type(write_xlml(wb, o), o);\n\t\tcase 'slk':\n\t\tcase 'sylk': return write_string_type(write_slk_str(wb, o), o);\n\t\tcase 'htm':\n\t\tcase 'html': return write_string_type(write_htm_str(wb, o), o);\n\t\tcase 'txt': return write_stxt_type(write_txt_str(wb, o), o);\n\t\tcase 'csv': return write_string_type(write_csv_str(wb, o), o, \"\\ufeff\");\n\t\tcase 'dif': return write_string_type(write_dif_str(wb, o), o);\n\t\tcase 'dbf': return write_binary_type(write_dbf_buf(wb, o), o);\n\t\tcase 'prn': return write_string_type(write_prn_str(wb, o), o);\n\t\tcase 'rtf': return write_string_type(write_rtf_str(wb, o), o);\n\t\tcase 'eth': return write_string_type(write_eth_str(wb, o), o);\n\t\tcase 'fods': return write_string_type(write_ods(wb, o), o);\n\t\tcase 'wk1': return write_binary_type(write_wk1_buf(wb, o), o);\n\t\tcase 'wk3': return write_binary_type(WK_.book_to_wk3(wb, o), o);\n\t\tcase 'biff2': if(!o.biff) o.biff = 2; /* falls through */\n\t\tcase 'biff3': if(!o.biff) o.biff = 3; /* falls through */\n\t\tcase 'biff4': if(!o.biff) o.biff = 4; return write_binary_type(write_biff_buf(wb, o), o);\n\t\tcase 'biff5': if(!o.biff) o.biff = 5; /* falls through */\n\t\tcase 'biff8':\n\t\tcase 'xla':\n\t\tcase 'xls': if(!o.biff) o.biff = 8; return write_cfb_type(wb, o);\n\t\tcase 'xlsx':\n\t\tcase 'xlsm':\n\t\tcase 'xlam':\n\t\tcase 'xlsb':\n\t\tcase 'ods': return write_zip_type(wb, o);\n\t\tdefault: throw new Error (\"Unrecognized bookType |\" + o.bookType + \"|\");\n\t}\n}\n\nfunction resolve_book_type(o) {\n\tif(o.bookType) return;\n\tvar _BT = {\n\t\t\"xls\": \"biff8\",\n\t\t\"htm\": \"html\",\n\t\t\"slk\": \"sylk\",\n\t\t\"socialcalc\": \"eth\",\n\t\t\"Sh33tJS\": \"WTF\"\n\t};\n\tvar ext = o.file.slice(o.file.lastIndexOf(\".\")).toLowerCase();\n\tif(ext.match(/^\\.[a-z]+$/)) o.bookType = ext.slice(1);\n\to.bookType = _BT[o.bookType] || o.bookType;\n}\n\nfunction writeFileSync(wb, filename, opts) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\treturn writeSync(wb, o);\n}\n\nfunction writeFileAsync(filename, wb, opts, cb) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\to.type = 'buffer';\n\tvar _cb = cb; if(!(_cb instanceof Function)) _cb = (opts);\n\treturn _fs.writeFile(filename, writeSync(wb, o), _cb);\n}\nfunction make_json_row(sheet, r, R, cols, header, hdr, dense, o) {\n\tvar rr = encode_row(R);\n\tvar defval = o.defval, raw = o.raw || !Object.prototype.hasOwnProperty.call(o, \"raw\");\n\tvar isempty = true;\n\tvar row = (header === 1) ? [] : {};\n\tif(header !== 1) {\n\t\tif(Object.defineProperty) try { Object.defineProperty(row, '__rowNum__', {value:R, enumerable:false}); } catch(e) { row.__rowNum__ = R; }\n\t\telse row.__rowNum__ = R;\n\t}\n\tif(!dense || sheet[R]) for (var C = r.s.c; C <= r.e.c; ++C) {\n\t\tvar val = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tif(val === undefined || val.t === undefined) {\n\t\t\tif(defval === undefined) continue;\n\t\t\tif(hdr[C] != null) { row[hdr[C]] = defval; }\n\t\t\tcontinue;\n\t\t}\n\t\tvar v = val.v;\n\t\tswitch(val.t){\n\t\t\tcase 'z': if(v == null) break; continue;\n\t\t\tcase 'e': v = (v == 0 ? null : void 0); break;\n\t\t\tcase 's': case 'd': case 'b': case 'n': break;\n\t\t\tdefault: throw new Error('unrecognized type ' + val.t);\n\t\t}\n\t\tif(hdr[C] != null) {\n\t\t\tif(v == null) {\n\t\t\t\tif(val.t == \"e\" && v === null) row[hdr[C]] = null;\n\t\t\t\telse if(defval !== undefined) row[hdr[C]] = defval;\n\t\t\t\telse if(raw && v === null) row[hdr[C]] = null;\n\t\t\t\telse continue;\n\t\t\t} else {\n\t\t\t\trow[hdr[C]] = raw || (o.rawNumbers && val.t == \"n\") ? v : format_cell(val,v,o);\n\t\t\t}\n\t\t\tif(v != null) isempty = false;\n\t\t}\n\t}\n\treturn { row: row, isempty: isempty };\n}\n\n\nfunction sheet_to_json(sheet, opts) {\n\tif(sheet == null || sheet[\"!ref\"] == null) return [];\n\tvar val = {t:'n',v:0}, header = 0, offset = 1, hdr = [], v=0, vv=\"\";\n\tvar r = {s:{r:0,c:0},e:{r:0,c:0}};\n\tvar o = opts || {};\n\tvar range = o.range != null ? o.range : sheet[\"!ref\"];\n\tif(o.header === 1) header = 1;\n\telse if(o.header === \"A\") header = 2;\n\telse if(Array.isArray(o.header)) header = 3;\n\telse if(o.header == null) header = 0;\n\tswitch(typeof range) {\n\t\tcase 'string': r = safe_decode_range(range); break;\n\t\tcase 'number': r = safe_decode_range(sheet[\"!ref\"]); r.s.r = range; break;\n\t\tdefault: r = range;\n\t}\n\tif(header > 0) offset = 0;\n\tvar rr = encode_row(r.s.r);\n\tvar cols = [];\n\tvar out = [];\n\tvar outi = 0, counter = 0;\n\tvar dense = Array.isArray(sheet);\n\tvar R = r.s.r, C = 0, CC = 0;\n\tif(dense && !sheet[R]) sheet[R] = [];\n\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\tcols[C] = encode_col(C);\n\t\tval = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tswitch(header) {\n\t\t\tcase 1: hdr[C] = C - r.s.c; break;\n\t\t\tcase 2: hdr[C] = cols[C]; break;\n\t\t\tcase 3: hdr[C] = o.header[C - r.s.c]; break;\n\t\t\tdefault:\n\t\t\t\tif(val == null) val = {w: \"__EMPTY\", t: \"s\"};\n\t\t\t\tvv = v = format_cell(val, null, o);\n\t\t\t\tcounter = 0;\n\t\t\t\tfor(CC = 0; CC < hdr.length; ++CC) if(hdr[CC] == vv) vv = v + \"_\" + (++counter);\n\t\t\t\thdr[C] = vv;\n\t\t}\n\t}\n\tfor (R = r.s.r + offset; R <= r.e.r; ++R) {\n\t\tvar row = make_json_row(sheet, r, R, cols, header, hdr, dense, o);\n\t\tif((row.isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row.row;\n\t}\n\tout.length = outi;\n\treturn out;\n}\n\nvar qreg = /\"/g;\nfunction make_csv_row(sheet, r, R, cols, fs, rs, FS, o) {\n\tvar isempty = true;\n\tvar row = [], txt = \"\", rr = encode_row(R);\n\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\tif (!cols[C]) continue;\n\t\tvar val = o.dense ? (sheet[R]||[])[C]: sheet[cols[C] + rr];\n\t\tif(val == null) txt = \"\";\n\t\telse if(val.v != null) {\n\t\t\tisempty = false;\n\t\t\ttxt = ''+(o.rawNumbers && val.t == \"n\" ? val.v : format_cell(val, null, o));\n\t\t\tfor(var i = 0, cc = 0; i !== txt.length; ++i) if((cc = txt.charCodeAt(i)) === fs || cc === rs || cc === 34 || o.forceQuotes) {txt = \"\\\"\" + txt.replace(qreg, '\"\"') + \"\\\"\"; break; }\n\t\t\tif(txt == \"ID\") txt = '\"ID\"';\n\t\t} else if(val.f != null && !val.F) {\n\t\t\tisempty = false;\n\t\t\ttxt = '=' + val.f; if(txt.indexOf(\",\") >= 0) txt = '\"' + txt.replace(qreg, '\"\"') + '\"';\n\t\t} else txt = \"\";\n\t\t/* NOTE: Excel CSV does not support array formulae */\n\t\trow.push(txt);\n\t}\n\tif(o.blankrows === false && isempty) return null;\n\treturn row.join(FS);\n}\n\nfunction sheet_to_csv(sheet, opts) {\n\tvar out = [];\n\tvar o = opts == null ? {} : opts;\n\tif(sheet == null || sheet[\"!ref\"] == null) return \"\";\n\tvar r = safe_decode_range(sheet[\"!ref\"]);\n\tvar FS = o.FS !== undefined ? o.FS : \",\", fs = FS.charCodeAt(0);\n\tvar RS = o.RS !== undefined ? o.RS : \"\\n\", rs = RS.charCodeAt(0);\n\tvar endregex = new RegExp((FS==\"|\" ? \"\\\\|\" : FS)+\"+$\");\n\tvar row = \"\", cols = [];\n\to.dense = Array.isArray(sheet);\n\tvar colinfo = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) if (!((colinfo[C]||{}).hidden)) cols[C] = encode_col(C);\n\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\tif ((rowinfo[R]||{}).hidden) continue;\n\t\trow = make_csv_row(sheet, r, R, cols, fs, rs, FS, o);\n\t\tif(row == null) { continue; }\n\t\tif(o.strip) row = row.replace(endregex,\"\");\n\t\tout.push(row + RS);\n\t}\n\tdelete o.dense;\n\treturn out.join(\"\");\n}\n\nfunction sheet_to_txt(sheet, opts) {\n\tif(!opts) opts = {}; opts.FS = \"\\t\"; opts.RS = \"\\n\";\n\tvar s = sheet_to_csv(sheet, opts);\n\tif(typeof cptable == 'undefined' || opts.type == 'string') return s;\n\tvar o = cptable.utils.encode(1200, s, 'str');\n\treturn String.fromCharCode(255) + String.fromCharCode(254) + o;\n}\n\nfunction sheet_to_formulae(sheet) {\n\tvar y = \"\", x, val=\"\";\n\tif(sheet == null || sheet[\"!ref\"] == null) return [];\n\tvar r = safe_decode_range(sheet['!ref']), rr = \"\", cols = [], C;\n\tvar cmds = [];\n\tvar dense = Array.isArray(sheet);\n\tfor(C = r.s.c; C <= r.e.c; ++C) cols[C] = encode_col(C);\n\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\t\ty = cols[C] + rr;\n\t\t\tx = dense ? (sheet[R]||[])[C] : sheet[y];\n\t\t\tval = \"\";\n\t\t\tif(x === undefined) continue;\n\t\t\telse if(x.F != null) {\n\t\t\t\ty = x.F;\n\t\t\t\tif(!x.f) continue;\n\t\t\t\tval = x.f;\n\t\t\t\tif(y.indexOf(\":\") == -1) y = y + \":\" + y;\n\t\t\t}\n\t\t\tif(x.f != null) val = x.f;\n\t\t\telse if(x.t == 'z') continue;\n\t\t\telse if(x.t == 'n' && x.v != null) val = \"\" + x.v;\n\t\t\telse if(x.t == 'b') val = x.v ? \"TRUE\" : \"FALSE\";\n\t\t\telse if(x.w !== undefined) val = \"'\" + x.w;\n\t\t\telse if(x.v === undefined) continue;\n\t\t\telse if(x.t == 's') val = \"'\" + x.v;\n\t\t\telse val = \"\"+x.v;\n\t\t\tcmds[cmds.length] = y + \"=\" + val;\n\t\t}\n\t}\n\treturn cmds;\n}\n\nfunction sheet_add_json(_ws, js, opts) {\n\tvar o = opts || {};\n\tvar offset = +!o.skipHeader;\n\tvar ws = _ws || ({});\n\tvar _R = 0, _C = 0;\n\tif(ws && o.origin != null) {\n\t\tif(typeof o.origin == 'number') _R = o.origin;\n\t\telse {\n\t\t\tvar _origin = typeof o.origin == \"string\" ? decode_cell(o.origin) : o.origin;\n\t\t\t_R = _origin.r; _C = _origin.c;\n\t\t}\n\t}\n\tvar cell;\n\tvar range = ({s: {c:0, r:0}, e: {c:_C, r:_R + js.length - 1 + offset}});\n\tif(ws['!ref']) {\n\t\tvar _range = safe_decode_range(ws['!ref']);\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\tif(_R == -1) { _R = _range.e.r + 1; range.e.r = _R + js.length - 1 + offset; }\n\t} else {\n\t\tif(_R == -1) { _R = 0; range.e.r = js.length - 1 + offset; }\n\t}\n\tvar hdr = o.header || [], C = 0;\n\n\tjs.forEach(function (JS, R) {\n\t\tkeys(JS).forEach(function(k) {\n\t\t\tif((C=hdr.indexOf(k)) == -1) hdr[C=hdr.length] = k;\n\t\t\tvar v = JS[k];\n\t\t\tvar t = 'z';\n\t\t\tvar z = \"\";\n\t\t\tvar ref = encode_cell({c:_C + C,r:_R + R + offset});\n\t\t\tcell = utils.sheet_get_cell(ws, ref);\n\t\t\tif(v && typeof v === 'object' && !(v instanceof Date)){\n\t\t\t\tws[ref] = v;\n\t\t\t} else {\n\t\t\t\tif(typeof v == 'number') t = 'n';\n\t\t\t\telse if(typeof v == 'boolean') t = 'b';\n\t\t\t\telse if(typeof v == 'string') t = 's';\n\t\t\t\telse if(v instanceof Date) {\n\t\t\t\t\tt = 'd';\n\t\t\t\t\tif(!o.cellDates) { t = 'n'; v = datenum(v); }\n\t\t\t\t\tz = (o.dateNF || SSF._table[14]);\n\t\t\t\t}\n\t\t\t\telse if(v === null && o.nullError) { t = 'e'; v = 0; }\n\t\t\t\tif(!cell) ws[ref] = cell = ({t:t, v:v});\n\t\t\t\telse {\n\t\t\t\t\tcell.t = t; cell.v = v;\n\t\t\t\t\tdelete cell.w; delete cell.R;\n\t\t\t\t\tif(z) cell.z = z;\n\t\t\t\t}\n\t\t\t\tif(z) cell.z = z;\n\t\t\t}\n\t\t});\n\t});\n\trange.e.c = Math.max(range.e.c, _C + hdr.length - 1);\n\tvar __R = encode_row(_R);\n\tif(offset) for(C = 0; C < hdr.length; ++C) ws[encode_col(C + _C) + __R] = {t:'s', v:hdr[C]};\n\tws['!ref'] = encode_range(range);\n\treturn ws;\n}\nfunction json_to_sheet(js, opts) { return sheet_add_json(null, js, opts); }\n\nvar utils = {\n\tencode_col: encode_col,\n\tencode_row: encode_row,\n\tencode_cell: encode_cell,\n\tencode_range: encode_range,\n\tdecode_col: decode_col,\n\tdecode_row: decode_row,\n\tsplit_cell: split_cell,\n\tdecode_cell: decode_cell,\n\tdecode_range: decode_range,\n\tformat_cell: format_cell,\n\tget_formulae: sheet_to_formulae,\n\tmake_csv: sheet_to_csv,\n\tmake_json: sheet_to_json,\n\tmake_formulae: sheet_to_formulae,\n\tsheet_add_aoa: sheet_add_aoa,\n\tsheet_add_json: sheet_add_json,\n\tsheet_add_dom: sheet_add_dom,\n\taoa_to_sheet: aoa_to_sheet,\n\tjson_to_sheet: json_to_sheet,\n\ttable_to_sheet: parse_dom_table,\n\ttable_to_book: table_to_book,\n\tsheet_to_csv: sheet_to_csv,\n\tsheet_to_txt: sheet_to_txt,\n\tsheet_to_json: sheet_to_json,\n\tsheet_to_html: HTML_.from_sheet,\n\tsheet_to_formulae: sheet_to_formulae,\n\tsheet_to_row_object_array: sheet_to_json\n};\n\n(function(utils) {\nutils.consts = utils.consts || {};\nfunction add_consts(R/*Array*/) { R.forEach(function(a){ utils.consts[a[0]] = a[1]; }); }\n\nfunction get_default(x, y, z) { return x[y] != null ? x[y] : (x[y] = z); }\n\n/* get cell, creating a stub if necessary */\nfunction ws_get_cell_stub(ws, R, C) {\n\t/* A1 cell address */\n\tif(typeof R == \"string\") {\n\t\t/* dense */\n\t\tif(Array.isArray(ws)) {\n\t\t\tvar RC = decode_cell(R);\n\t\t\tif(!ws[RC.r]) ws[RC.r] = [];\n\t\t\treturn ws[RC.r][RC.c] || (ws[RC.r][RC.c] = {t:'z'});\n\t\t}\n\t\treturn ws[R] || (ws[R] = {t:'z'});\n\t}\n\t/* cell address object */\n\tif(typeof R != \"number\") return ws_get_cell_stub(ws, encode_cell(R));\n\t/* R and C are 0-based indices */\n\treturn ws_get_cell_stub(ws, encode_cell({r:R,c:C||0}));\n}\nutils.sheet_get_cell = ws_get_cell_stub;\n\n/* find sheet index for given name / validate index */\nfunction wb_sheet_idx(wb, sh) {\n\tif(typeof sh == \"number\") {\n\t\tif(sh >= 0 && wb.SheetNames.length > sh) return sh;\n\t\tthrow new Error(\"Cannot find sheet # \" + sh);\n\t} else if(typeof sh == \"string\") {\n\t\tvar idx = wb.SheetNames.indexOf(sh);\n\t\tif(idx > -1) return idx;\n\t\tthrow new Error(\"Cannot find sheet name |\" + sh + \"|\");\n\t} else throw new Error(\"Cannot find sheet |\" + sh + \"|\");\n}\n\n/* simple blank workbook object */\nutils.book_new = function() {\n\treturn { SheetNames: [], Sheets: {} };\n};\n\n/* add a worksheet to the end of a given workbook */\nutils.book_append_sheet = function(wb, ws, name) {\n\tif(!name) for(var i = 1; i <= 0xFFFF; ++i, name = undefined) if(wb.SheetNames.indexOf(name = \"Sheet\" + i) == -1) break;\n\tif(!name || wb.SheetNames.length >= 0xFFFF) throw new Error(\"Too many worksheets\");\n\tcheck_ws_name(name);\n\tif(wb.SheetNames.indexOf(name) >= 0) throw new Error(\"Worksheet with name |\" + name + \"| already exists!\");\n\n\twb.SheetNames.push(name);\n\twb.Sheets[name] = ws;\n};\n\n/* set sheet visibility (visible/hidden/very hidden) */\nutils.book_set_sheet_visibility = function(wb, sh, vis) {\n\tget_default(wb,\"Workbook\",{});\n\tget_default(wb.Workbook,\"Sheets\",[]);\n\n\tvar idx = wb_sheet_idx(wb, sh);\n\t// $FlowIgnore\n\tget_default(wb.Workbook.Sheets,idx, {});\n\n\tswitch(vis) {\n\t\tcase 0: case 1: case 2: break;\n\t\tdefault: throw new Error(\"Bad sheet visibility setting \" + vis);\n\t}\n\t// $FlowIgnore\n\twb.Workbook.Sheets[idx].Hidden = vis;\n};\nadd_consts([\n\t[\"SHEET_VISIBLE\", 0],\n\t[\"SHEET_HIDDEN\", 1],\n\t[\"SHEET_VERY_HIDDEN\", 2]\n]);\n\n/* set number format */\nutils.cell_set_number_format = function(cell, fmt) {\n\tcell.z = fmt;\n\treturn cell;\n};\n\n/* set cell hyperlink */\nutils.cell_set_hyperlink = function(cell, target, tooltip) {\n\tif(!target) {\n\t\tdelete cell.l;\n\t} else {\n\t\tcell.l = ({ Target: target });\n\t\tif(tooltip) cell.l.Tooltip = tooltip;\n\t}\n\treturn cell;\n};\nutils.cell_set_internal_link = function(cell, range, tooltip) { return utils.cell_set_hyperlink(cell, \"#\" + range, tooltip); };\n\n/* add to cell comments */\nutils.cell_add_comment = function(cell, text, author) {\n\tif(!cell.c) cell.c = [];\n\tcell.c.push({t:text, a:author||\"SheetJS\"});\n};\n\n/* set array formula and flush related cells */\nutils.sheet_set_array_formula = function(ws, range, formula) {\n\tvar rng = typeof range != \"string\" ? range : safe_decode_range(range);\n\tvar rngstr = typeof range == \"string\" ? range : encode_range(range);\n\tfor(var R = rng.s.r; R <= rng.e.r; ++R) for(var C = rng.s.c; C <= rng.e.c; ++C) {\n\t\tvar cell = ws_get_cell_stub(ws, R, C);\n\t\tcell.t = 'n';\n\t\tcell.F = rngstr;\n\t\tdelete cell.v;\n\t\tif(R == rng.s.r && C == rng.s.c) cell.f = formula;\n\t}\n\treturn ws;\n};\n\nreturn utils;\n})(utils);\n\nif(has_buf && typeof require != 'undefined') (function() {\n\tvar strmod = require('stream');\n\tif(!strmod) return;\n\tvar Readable = strmod.Readable;\n\tif(!Readable) return;\n\n\tvar write_csv_stream = function(sheet, opts) {\n\t\tvar stream = Readable();\n\t\tvar o = opts == null ? {} : opts;\n\t\tif(sheet == null || sheet[\"!ref\"] == null) { stream.push(null); return stream; }\n\t\tvar r = safe_decode_range(sheet[\"!ref\"]);\n\t\tvar FS = o.FS !== undefined ? o.FS : \",\", fs = FS.charCodeAt(0);\n\t\tvar RS = o.RS !== undefined ? o.RS : \"\\n\", rs = RS.charCodeAt(0);\n\t\tvar endregex = new RegExp((FS==\"|\" ? \"\\\\|\" : FS)+\"+$\");\n\t\tvar row = \"\", cols = [];\n\t\to.dense = Array.isArray(sheet);\n\t\tvar colinfo = o.skipHidden && sheet[\"!cols\"] || [];\n\t\tvar rowinfo = o.skipHidden && sheet[\"!rows\"] || [];\n\t\tfor(var C = r.s.c; C <= r.e.c; ++C) if (!((colinfo[C]||{}).hidden)) cols[C] = encode_col(C);\n\t\tvar R = r.s.r;\n\t\tvar BOM = false;\n\t\tstream._read = function() {\n\t\t\tif(!BOM) { BOM = true; return stream.push(\"\\uFEFF\"); }\n\t\t\twhile(R <= r.e.r) {\n\t\t\t\t++R;\n\t\t\t\tif ((rowinfo[R-1]||{}).hidden) continue;\n\t\t\t\trow = make_csv_row(sheet, r, R-1, cols, fs, rs, FS, o);\n\t\t\t\tif(row != null) {\n\t\t\t\t\tif(o.strip) row = row.replace(endregex,\"\");\n\t\t\t\t\tstream.push(row + RS);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(R > r.e.r) return stream.push(null);\n\t\t};\n\t\treturn stream;\n\t};\n\n\tvar write_html_stream = function(ws, opts) {\n\t\tvar stream = Readable();\n\n\t\tvar o = opts || {};\n\t\tvar header = o.header != null ? o.header : HTML_.BEGIN;\n\t\tvar footer = o.footer != null ? o.footer : HTML_.END;\n\t\tstream.push(header);\n\t\tvar r = decode_range(ws['!ref']);\n\t\to.dense = Array.isArray(ws);\n\t\tstream.push(HTML_._preamble(ws, r, o));\n\t\tvar R = r.s.r;\n\t\tvar end = false;\n\t\tstream._read = function() {\n\t\t\tif(R > r.e.r) {\n\t\t\t\tif(!end) { end = true; stream.push(\"
\" + footer); }\n\t\t\t\treturn stream.push(null);\n\t\t\t}\n\t\t\twhile(R <= r.e.r) {\n\t\t\t\tstream.push(HTML_._row(ws, r, R, o));\n\t\t\t\t++R;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\treturn stream;\n\t};\n\n\tvar write_json_stream = function(sheet, opts) {\n\t\tvar stream = Readable({objectMode:true});\n\n\t\tif(sheet == null || sheet[\"!ref\"] == null) { stream.push(null); return stream; }\n\t\tvar val = {t:'n',v:0}, header = 0, offset = 1, hdr = [], v=0, vv=\"\";\n\t\tvar r = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\tvar o = opts || {};\n\t\tvar range = o.range != null ? o.range : sheet[\"!ref\"];\n\t\tif(o.header === 1) header = 1;\n\t\telse if(o.header === \"A\") header = 2;\n\t\telse if(Array.isArray(o.header)) header = 3;\n\t\tswitch(typeof range) {\n\t\t\tcase 'string': r = safe_decode_range(range); break;\n\t\t\tcase 'number': r = safe_decode_range(sheet[\"!ref\"]); r.s.r = range; break;\n\t\t\tdefault: r = range;\n\t\t}\n\t\tif(header > 0) offset = 0;\n\t\tvar rr = encode_row(r.s.r);\n\t\tvar cols = [];\n\t\tvar counter = 0;\n\t\tvar dense = Array.isArray(sheet);\n\t\tvar R = r.s.r, C = 0, CC = 0;\n\t\tif(dense && !sheet[R]) sheet[R] = [];\n\t\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\t\tcols[C] = encode_col(C);\n\t\t\tval = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\t\tswitch(header) {\n\t\t\t\tcase 1: hdr[C] = C - r.s.c; break;\n\t\t\t\tcase 2: hdr[C] = cols[C]; break;\n\t\t\t\tcase 3: hdr[C] = o.header[C - r.s.c]; break;\n\t\t\t\tdefault:\n\t\t\t\t\tif(val == null) val = {w: \"__EMPTY\", t: \"s\"};\n\t\t\t\t\tvv = v = format_cell(val, null, o);\n\t\t\t\t\tcounter = 0;\n\t\t\t\t\tfor(CC = 0; CC < hdr.length; ++CC) if(hdr[CC] == vv) vv = v + \"_\" + (++counter);\n\t\t\t\t\thdr[C] = vv;\n\t\t\t}\n\t\t}\n\t\tR = r.s.r + offset;\n\t\tstream._read = function() {\n\t\t\tif(R > r.e.r) return stream.push(null);\n\t\t\twhile(R <= r.e.r) {\n\t\t\t\t//if ((rowinfo[R-1]||{}).hidden) continue;\n\t\t\t\tvar row = make_json_row(sheet, r, R, cols, header, hdr, dense, o);\n\t\t\t\t++R;\n\t\t\t\tif((row.isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) {\n\t\t\t\t\tstream.push(row.row);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn stream;\n\t};\n\n\tXLSX.stream = {\n\t\tto_json: write_json_stream,\n\t\tto_html: write_html_stream,\n\t\tto_csv: write_csv_stream\n\t};\n})();\n\nif(typeof parse_xlscfb !== \"undefined\") XLSX.parse_xlscfb = parse_xlscfb;\nXLSX.parse_zip = parse_zip;\nXLSX.read = readSync; //xlsread\nXLSX.readFile = readFileSync; //readFile\nXLSX.readFileSync = readFileSync;\nXLSX.write = writeSync;\nXLSX.writeFile = writeFileSync;\nXLSX.writeFileSync = writeFileSync;\nXLSX.writeFileAsync = writeFileAsync;\nXLSX.utils = utils;\nXLSX.SSF = SSF;\nif(typeof CFB !== \"undefined\") XLSX.CFB = CFB;\n}\n/*global define */\nif(typeof exports !== 'undefined') make_xlsx_lib(exports);\nelse if(typeof module !== 'undefined' && module.exports) make_xlsx_lib(module.exports);\nelse if(typeof define === 'function' && define.amd) define('xlsx', function() { if(!XLSX.version) make_xlsx_lib(XLSX); return XLSX; });\nelse make_xlsx_lib(XLSX);\n/* NOTE: the following extra line is needed for \"Lightning Locker Service\" */\nif(typeof window !== 'undefined' && !window.XLSX) try { window.XLSX = XLSX; } catch(e) {}\n/*exported XLS, ODS */\nvar XLS = XLSX, ODS = XLSX;\n","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useState = _interopRequireDefault(require(\"rc-util/lib/hooks/useState\"));\nvar _button = _interopRequireDefault(require(\"../button\"));\nvar _buttonHelpers = require(\"../button/buttonHelpers\");\nfunction isThenable(thing) {\n return !!(thing === null || thing === void 0 ? void 0 : thing.then);\n}\nconst ActionButton = props => {\n const {\n type,\n children,\n prefixCls,\n buttonProps,\n close,\n autoFocus,\n emitEvent,\n isSilent,\n quitOnNullishReturnValue,\n actionFn\n } = props;\n const clickedRef = React.useRef(false);\n const buttonRef = React.useRef(null);\n const [loading, setLoading] = (0, _useState.default)(false);\n const onInternalClose = function () {\n close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);\n };\n React.useEffect(() => {\n let timeoutId = null;\n if (autoFocus) {\n timeoutId = setTimeout(() => {\n var _a;\n (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n });\n }\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, []);\n const handlePromiseOnOk = returnValueOfOnOk => {\n if (!isThenable(returnValueOfOnOk)) {\n return;\n }\n setLoading(true);\n returnValueOfOnOk.then(function () {\n setLoading(false, true);\n onInternalClose.apply(void 0, arguments);\n clickedRef.current = false;\n }, e => {\n // See: https://github.com/ant-design/ant-design/issues/6183\n setLoading(false, true);\n clickedRef.current = false;\n // Do not throw if is `await` mode\n if (isSilent === null || isSilent === void 0 ? void 0 : isSilent()) {\n return;\n }\n return Promise.reject(e);\n });\n };\n const onClick = e => {\n if (clickedRef.current) {\n return;\n }\n clickedRef.current = true;\n if (!actionFn) {\n onInternalClose();\n return;\n }\n let returnValueOfOnOk;\n if (emitEvent) {\n returnValueOfOnOk = actionFn(e);\n if (quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) {\n clickedRef.current = false;\n onInternalClose(e);\n return;\n }\n } else if (actionFn.length) {\n returnValueOfOnOk = actionFn(close);\n // https://github.com/ant-design/ant-design/issues/23358\n clickedRef.current = false;\n } else {\n returnValueOfOnOk = actionFn();\n if (!isThenable(returnValueOfOnOk)) {\n onInternalClose();\n return;\n }\n }\n handlePromiseOnOk(returnValueOfOnOk);\n };\n return /*#__PURE__*/React.createElement(_button.default, Object.assign({}, (0, _buttonHelpers.convertLegacyProps)(type), {\n onClick: onClick,\n loading: loading,\n prefixCls: prefixCls\n }, buttonProps, {\n ref: buttonRef\n }), children);\n};\nvar _default = exports.default = ActionButton;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _context = require(\"../form/context\");\nvar _Compact = require(\"../space/Compact\");\nconst ContextIsolator = props => {\n const {\n space,\n form,\n children\n } = props;\n if (children === undefined || children === null) {\n return null;\n }\n let result = children;\n if (form) {\n result = /*#__PURE__*/_react.default.createElement(_context.NoFormStyle, {\n override: true,\n status: true\n }, result);\n }\n if (space) {\n result = /*#__PURE__*/_react.default.createElement(_Compact.NoCompactStyle, null, result);\n }\n return result;\n};\nvar _default = exports.default = ContextIsolator;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.withPureRenderTheme = withPureRenderTheme;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _configProvider = _interopRequireWildcard(require(\"../config-provider\"));\nfunction withPureRenderTheme(Component) {\n return props => (/*#__PURE__*/React.createElement(_configProvider.default, {\n theme: {\n token: {\n motion: false,\n zIndexPopupBase: 0\n }\n }\n }, /*#__PURE__*/React.createElement(Component, Object.assign({}, props))));\n}\n/* istanbul ignore next */\nconst genPurePanel = (Component, defaultPrefixCls, getDropdownCls, postProps) => {\n const PurePanel = props => {\n const {\n prefixCls: customizePrefixCls,\n style\n } = props;\n const holderRef = React.useRef(null);\n const [popupHeight, setPopupHeight] = React.useState(0);\n const [popupWidth, setPopupWidth] = React.useState(0);\n const [open, setOpen] = (0, _useMergedState.default)(false, {\n value: props.open\n });\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls(defaultPrefixCls || 'select', customizePrefixCls);\n React.useEffect(() => {\n // We do not care about ssr\n setOpen(true);\n if (typeof ResizeObserver !== 'undefined') {\n const resizeObserver = new ResizeObserver(entries => {\n const element = entries[0].target;\n setPopupHeight(element.offsetHeight + 8);\n setPopupWidth(element.offsetWidth);\n });\n const interval = setInterval(() => {\n var _a;\n const dropdownCls = getDropdownCls ? `.${getDropdownCls(prefixCls)}` : `.${prefixCls}-dropdown`;\n const popup = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(dropdownCls);\n if (popup) {\n clearInterval(interval);\n resizeObserver.observe(popup);\n }\n }, 10);\n return () => {\n clearInterval(interval);\n resizeObserver.disconnect();\n };\n }\n }, []);\n let mergedProps = Object.assign(Object.assign({}, props), {\n style: Object.assign(Object.assign({}, style), {\n margin: 0\n }),\n open,\n visible: open,\n getPopupContainer: () => holderRef.current\n });\n if (postProps) {\n mergedProps = postProps(mergedProps);\n }\n const mergedStyle = {\n paddingBottom: popupHeight,\n position: 'relative',\n minWidth: popupWidth\n };\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: holderRef,\n style: mergedStyle\n }, /*#__PURE__*/React.createElement(Component, Object.assign({}, mergedProps)));\n };\n return withPureRenderTheme(PurePanel);\n};\nvar _default = exports.default = genPurePanel;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = capitalize;\nfunction capitalize(str) {\n if (typeof str !== 'string') {\n return str;\n }\n const ret = str.charAt(0).toUpperCase() + str.slice(1);\n return ret;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PresetStatusColorTypes = void 0;\nexports.isPresetColor = isPresetColor;\nexports.isPresetStatusColor = isPresetStatusColor;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _interface = require(\"../theme/interface\");\nconst inverseColors = _interface.PresetColors.map(color => `${color}-inverse`);\nconst PresetStatusColorTypes = exports.PresetStatusColorTypes = ['success', 'processing', 'error', 'default', 'warning'];\n/**\n * determine if the color keyword belongs to the `Ant Design` {@link PresetColors}.\n * @param color color to be judged\n * @param includeInverse whether to include reversed colors\n */\nfunction isPresetColor(color) {\n let includeInverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (includeInverse) {\n return [].concat((0, _toConsumableArray2.default)(inverseColors), (0, _toConsumableArray2.default)(_interface.PresetColors)).includes(color);\n }\n return _interface.PresetColors.includes(color);\n}\nfunction isPresetStatusColor(color) {\n return PresetStatusColorTypes.includes(color);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.easeInOutCubic = easeInOutCubic;\nfunction easeInOutCubic(t, b, c, d) {\n const cc = c - b;\n // biome-ignore lint: it is a common easing function\n t /= d / 2;\n if (t < 1) {\n return cc / 2 * t * t * t + b;\n }\n // biome-ignore lint: it is a common easing function\n return cc / 2 * ((t -= 2) * t * t + 2) + b;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst extendsObject = function () {\n const result = Object.assign({}, arguments.length <= 0 ? undefined : arguments[0]);\n for (let i = 1; i < arguments.length; i++) {\n const obj = i < 0 || arguments.length <= i ? undefined : arguments[i];\n if (obj) {\n Object.keys(obj).forEach(key => {\n const val = obj[key];\n if (val !== undefined) {\n result[key] = val;\n }\n });\n }\n }\n return result;\n};\nvar _default = exports.default = extendsObject;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isPresetSize = isPresetSize;\nexports.isValidGapNumber = isValidGapNumber;\nfunction isPresetSize(size) {\n return ['small', 'middle', 'large'].includes(size);\n}\nfunction isValidGapNumber(size) {\n if (!size) {\n // The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it.\n return false;\n }\n return typeof size === 'number' && !Number.isNaN(size);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nconst getAllowClear = allowClear => {\n let mergedAllowClear;\n if (typeof allowClear === 'object' && (allowClear === null || allowClear === void 0 ? void 0 : allowClear.clearIcon)) {\n mergedAllowClear = allowClear;\n } else if (allowClear) {\n mergedAllowClear = {\n clearIcon: /*#__PURE__*/_react.default.createElement(_CloseCircleFilled.default, null)\n };\n }\n return mergedAllowClear;\n};\nvar _default = exports.default = getAllowClear;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getRenderPropValue = void 0;\nconst getRenderPropValue = propValue => {\n if (!propValue) {\n return null;\n }\n return typeof propValue === 'function' ? propValue() : propValue;\n};\nexports.getRenderPropValue = getRenderPropValue;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.isWindow = isWindow;\nfunction isWindow(obj) {\n return obj !== null && obj !== undefined && obj === obj.window;\n}\nconst getScroll = target => {\n var _a, _b;\n if (typeof window === 'undefined') {\n return 0;\n }\n let result = 0;\n if (isWindow(target)) {\n result = target.pageYOffset;\n } else if (target instanceof Document) {\n result = target.documentElement.scrollTop;\n } else if (target instanceof HTMLElement) {\n result = target.scrollTop;\n } else if (target) {\n // According to the type inference, the `target` is `never` type.\n // Since we configured the loose mode type checking, and supports mocking the target with such shape below::\n // `{ documentElement: { scrollLeft: 200, scrollTop: 400 } }`,\n // the program may falls into this branch.\n // Check the corresponding tests for details. Don't sure what is the real scenario this happens.\n /* biome-ignore lint/complexity/useLiteralKeys: target is a never type */ /* eslint-disable-next-line dot-notation */\n result = target['scrollTop'];\n }\n if (target && !isWindow(target) && typeof result !== 'number') {\n result = (_b = ((_a = target.ownerDocument) !== null && _a !== void 0 ? _a : target).documentElement) === null || _b === void 0 ? void 0 : _b.scrollTop;\n }\n return result;\n};\nvar _default = exports.default = getScroll;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useClosable;\nexports.pickClosable = pickClosable;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _pickAttrs = _interopRequireDefault(require(\"rc-util/lib/pickAttrs\"));\nfunction pickClosable(context) {\n if (!context) {\n return undefined;\n }\n return {\n closable: context.closable,\n closeIcon: context.closeIcon\n };\n}\n/** Convert `closable` and `closeIcon` to config object */\nfunction useClosableConfig(closableCollection) {\n const {\n closable,\n closeIcon\n } = closableCollection || {};\n return _react.default.useMemo(() => {\n if (\n // If `closable`, whatever rest be should be true\n !closable && (closable === false || closeIcon === false || closeIcon === null)) {\n return false;\n }\n if (closable === undefined && closeIcon === undefined) {\n return null;\n }\n let closableConfig = {\n closeIcon: typeof closeIcon !== 'boolean' && closeIcon !== null ? closeIcon : undefined\n };\n if (closable && typeof closable === 'object') {\n closableConfig = Object.assign(Object.assign({}, closableConfig), closable);\n }\n return closableConfig;\n }, [closable, closeIcon]);\n}\n/**\n * Assign object without `undefined` field. Will skip if is `false`.\n * This helps to handle both closableConfig or false\n */\nfunction assignWithoutUndefined() {\n const target = {};\n for (var _len = arguments.length, objList = new Array(_len), _key = 0; _key < _len; _key++) {\n objList[_key] = arguments[_key];\n }\n objList.forEach(obj => {\n if (obj) {\n Object.keys(obj).forEach(key => {\n if (obj[key] !== undefined) {\n target[key] = obj[key];\n }\n });\n }\n });\n return target;\n}\n/** Use same object to support `useMemo` optimization */\nconst EmptyFallbackCloseCollection = {};\nfunction useClosable(propCloseCollection, contextCloseCollection) {\n let fallbackCloseCollection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EmptyFallbackCloseCollection;\n // Align the `props`, `context` `fallback` to config object first\n const propCloseConfig = useClosableConfig(propCloseCollection);\n const contextCloseConfig = useClosableConfig(contextCloseCollection);\n const closeBtnIsDisabled = typeof propCloseConfig !== 'boolean' ? !!(propCloseConfig === null || propCloseConfig === void 0 ? void 0 : propCloseConfig.disabled) : false;\n const mergedFallbackCloseCollection = _react.default.useMemo(() => Object.assign({\n closeIcon: /*#__PURE__*/_react.default.createElement(_CloseOutlined.default, null)\n }, fallbackCloseCollection), [fallbackCloseCollection]);\n // Use fallback logic to fill the config\n const mergedClosableConfig = _react.default.useMemo(() => {\n // ================ Props First ================\n // Skip if prop is disabled\n if (propCloseConfig === false) {\n return false;\n }\n if (propCloseConfig) {\n return assignWithoutUndefined(mergedFallbackCloseCollection, contextCloseConfig, propCloseConfig);\n }\n // =============== Context Second ==============\n // Skip if context is disabled\n if (contextCloseConfig === false) {\n return false;\n }\n if (contextCloseConfig) {\n return assignWithoutUndefined(mergedFallbackCloseCollection, contextCloseConfig);\n }\n // ============= Fallback Default ==============\n return !mergedFallbackCloseCollection.closable ? false : mergedFallbackCloseCollection;\n }, [propCloseConfig, contextCloseConfig, mergedFallbackCloseCollection]);\n // Calculate the final closeIcon\n return _react.default.useMemo(() => {\n if (mergedClosableConfig === false) {\n return [false, null, closeBtnIsDisabled];\n }\n const {\n closeIconRender\n } = mergedFallbackCloseCollection;\n const {\n closeIcon\n } = mergedClosableConfig;\n let mergedCloseIcon = closeIcon;\n if (mergedCloseIcon !== null && mergedCloseIcon !== undefined) {\n // Wrap the closeIcon if needed\n if (closeIconRender) {\n mergedCloseIcon = closeIconRender(closeIcon);\n }\n // Wrap the closeIcon with aria props\n const ariaProps = (0, _pickAttrs.default)(mergedClosableConfig, true);\n if (Object.keys(ariaProps).length) {\n mergedCloseIcon = /*#__PURE__*/_react.default.isValidElement(mergedCloseIcon) ? (/*#__PURE__*/_react.default.cloneElement(mergedCloseIcon, ariaProps)) : (/*#__PURE__*/_react.default.createElement(\"span\", Object.assign({}, ariaProps), mergedCloseIcon));\n }\n }\n return [true, mergedCloseIcon, closeBtnIsDisabled];\n }, [mergedClosableConfig, mergedFallbackCloseCollection]);\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useForceUpdate;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction useForceUpdate() {\n const [, forceUpdate] = React.useReducer(x => x + 1, 0);\n return forceUpdate;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useMultipleSelect;\nvar _react = require(\"react\");\n/**\n * @title multipleSelect hooks\n * @description multipleSelect by hold down shift key\n */\nfunction useMultipleSelect(getKey) {\n const [prevSelectedIndex, setPrevSelectedIndex] = (0, _react.useState)(null);\n const multipleSelect = (0, _react.useCallback)((currentSelectedIndex, data, selectedKeys) => {\n const configPrevSelectedIndex = prevSelectedIndex !== null && prevSelectedIndex !== void 0 ? prevSelectedIndex : currentSelectedIndex;\n // add/delete the selected range\n const startIndex = Math.min(configPrevSelectedIndex || 0, currentSelectedIndex);\n const endIndex = Math.max(configPrevSelectedIndex || 0, currentSelectedIndex);\n const rangeKeys = data.slice(startIndex, endIndex + 1).map(item => getKey(item));\n const shouldSelected = rangeKeys.some(rangeKey => !selectedKeys.has(rangeKey));\n const changedKeys = [];\n rangeKeys.forEach(item => {\n if (shouldSelected) {\n if (!selectedKeys.has(item)) {\n changedKeys.push(item);\n }\n selectedKeys.add(item);\n } else {\n selectedKeys.delete(item);\n changedKeys.push(item);\n }\n });\n setPrevSelectedIndex(shouldSelected ? endIndex : null);\n return changedKeys;\n }, [prevSelectedIndex]);\n const updatePrevSelectedIndex = val => {\n setPrevSelectedIndex(val);\n };\n return [multipleSelect, updatePrevSelectedIndex];\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = usePatchElement;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction usePatchElement() {\n const [elements, setElements] = React.useState([]);\n const patchElement = React.useCallback(element => {\n // append a new element to elements (and create a new ref)\n setElements(originElements => [].concat((0, _toConsumableArray2.default)(originElements), [element]));\n // return a function that removes the new element out of elements (and create a new ref)\n // it works a little like useEffect\n return () => {\n setElements(originElements => originElements.filter(ele => ele !== element));\n };\n }, []);\n return [elements, patchElement];\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useProxyImperativeHandle;\nvar _react = require(\"react\");\n// Proxy the dom ref with `{ nativeElement, otherFn }` type\n// ref: https://github.com/ant-design/ant-design/discussions/45242\n\nfunction fillProxy(element, handler) {\n element._antProxy = element._antProxy || {};\n Object.keys(handler).forEach(key => {\n if (!(key in element._antProxy)) {\n const ori = element[key];\n element._antProxy[key] = ori;\n element[key] = handler[key];\n }\n });\n return element;\n}\nfunction useProxyImperativeHandle(ref, init) {\n return (0, _react.useImperativeHandle)(ref, () => {\n const refObj = init();\n const {\n nativeElement\n } = refObj;\n if (typeof Proxy !== 'undefined') {\n return new Proxy(nativeElement, {\n get(obj, prop) {\n if (refObj[prop]) {\n return refObj[prop];\n }\n return Reflect.get(obj, prop);\n }\n });\n }\n // Fallback of IE\n return fillProxy(nativeElement, refObj);\n });\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useSyncState;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useForceUpdate = _interopRequireDefault(require(\"./useForceUpdate\"));\nfunction useSyncState(initialValue) {\n const ref = React.useRef(initialValue);\n const forceUpdate = (0, _useForceUpdate.default)();\n return [() => ref.current, newValue => {\n ref.current = newValue;\n // re-render\n forceUpdate();\n }];\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useZIndex = exports.containerBaseZIndexOffset = exports.consumerBaseZIndexOffset = exports.CONTAINER_MAX_OFFSET = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _useToken = _interopRequireDefault(require(\"../../theme/useToken\"));\nvar _warning = require(\"../warning\");\nvar _zindexContext = _interopRequireDefault(require(\"../zindexContext\"));\n// Z-Index control range\n// Container: 1000 + offset 100 (max base + 10 * offset = 2000)\n// Popover: offset 50\n// Notification: Container Max zIndex + componentOffset\nconst CONTAINER_OFFSET = 100;\nconst CONTAINER_OFFSET_MAX_COUNT = 10;\nconst CONTAINER_MAX_OFFSET = exports.CONTAINER_MAX_OFFSET = CONTAINER_OFFSET * CONTAINER_OFFSET_MAX_COUNT;\n/**\n * Static function will default be the `CONTAINER_MAX_OFFSET`.\n * But it still may have children component like Select, Dropdown.\n * So the warning zIndex should exceed the `CONTAINER_MAX_OFFSET`.\n */\nconst CONTAINER_MAX_OFFSET_WITH_CHILDREN = CONTAINER_MAX_OFFSET + CONTAINER_OFFSET;\nconst containerBaseZIndexOffset = exports.containerBaseZIndexOffset = {\n Modal: CONTAINER_OFFSET,\n Drawer: CONTAINER_OFFSET,\n Popover: CONTAINER_OFFSET,\n Popconfirm: CONTAINER_OFFSET,\n Tooltip: CONTAINER_OFFSET,\n Tour: CONTAINER_OFFSET,\n FloatButton: CONTAINER_OFFSET\n};\nconst consumerBaseZIndexOffset = exports.consumerBaseZIndexOffset = {\n SelectLike: 50,\n Dropdown: 50,\n DatePicker: 50,\n Menu: 50,\n ImagePreview: 1\n};\nfunction isContainerType(type) {\n return type in containerBaseZIndexOffset;\n}\nconst useZIndex = (componentType, customZIndex) => {\n const [, token] = (0, _useToken.default)();\n const parentZIndex = _react.default.useContext(_zindexContext.default);\n const isContainer = isContainerType(componentType);\n let result;\n if (customZIndex !== undefined) {\n result = [customZIndex, customZIndex];\n } else {\n let zIndex = parentZIndex !== null && parentZIndex !== void 0 ? parentZIndex : 0;\n if (isContainer) {\n zIndex +=\n // Use preset token zIndex by default but not stack when has parent container\n (parentZIndex ? 0 : token.zIndexPopupBase) +\n // Container offset\n containerBaseZIndexOffset[componentType];\n } else {\n zIndex += consumerBaseZIndexOffset[componentType];\n }\n result = [parentZIndex === undefined ? customZIndex : zIndex, zIndex];\n }\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)(componentType);\n const maxZIndex = token.zIndexPopupBase + CONTAINER_MAX_OFFSET_WITH_CHILDREN;\n const currentZIndex = result[0] || 0;\n process.env.NODE_ENV !== \"production\" ? warning(customZIndex !== undefined || currentZIndex <= maxZIndex, 'usage', '`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.') : void 0;\n }\n return result;\n};\nexports.useZIndex = useZIndex;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst isNumeric = value => !isNaN(parseFloat(value)) && isFinite(value);\nvar _default = exports.default = isNumeric;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getTransitionName = exports.default = void 0;\nvar _configProvider = require(\"../config-provider\");\n// ================== Collapse Motion ==================\nconst getCollapsedHeight = () => ({\n height: 0,\n opacity: 0\n});\nconst getRealHeight = node => {\n const {\n scrollHeight\n } = node;\n return {\n height: scrollHeight,\n opacity: 1\n };\n};\nconst getCurrentHeight = node => ({\n height: node ? node.offsetHeight : 0\n});\nconst skipOpacityTransition = (_, event) => (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';\nconst initCollapseMotion = function () {\n let rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _configProvider.defaultPrefixCls;\n return {\n motionName: `${rootCls}-motion-collapse`,\n onAppearStart: getCollapsedHeight,\n onEnterStart: getCollapsedHeight,\n onAppearActive: getRealHeight,\n onEnterActive: getRealHeight,\n onLeaveStart: getCurrentHeight,\n onLeaveActive: getCollapsedHeight,\n onAppearEnd: skipOpacityTransition,\n onEnterEnd: skipOpacityTransition,\n onLeaveEnd: skipOpacityTransition,\n motionDeadline: 500\n };\n};\nconst _SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];\nconst getTransitionName = (rootPrefixCls, motion, transitionName) => {\n if (transitionName !== undefined) {\n return transitionName;\n }\n return `${rootPrefixCls}-${motion}`;\n};\nexports.getTransitionName = getTransitionName;\nvar _default = exports.default = initCollapseMotion;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getPlacements;\nexports.getOverflowOptions = getOverflowOptions;\nvar _placementArrow = require(\"../style/placementArrow\");\nfunction getOverflowOptions(placement, arrowOffset, arrowWidth, autoAdjustOverflow) {\n if (autoAdjustOverflow === false) {\n return {\n adjustX: false,\n adjustY: false\n };\n }\n const overflow = autoAdjustOverflow && typeof autoAdjustOverflow === 'object' ? autoAdjustOverflow : {};\n const baseOverflow = {};\n switch (placement) {\n case 'top':\n case 'bottom':\n baseOverflow.shiftX = arrowOffset.arrowOffsetHorizontal * 2 + arrowWidth;\n baseOverflow.shiftY = true;\n baseOverflow.adjustY = true;\n break;\n case 'left':\n case 'right':\n baseOverflow.shiftY = arrowOffset.arrowOffsetVertical * 2 + arrowWidth;\n baseOverflow.shiftX = true;\n baseOverflow.adjustX = true;\n break;\n }\n const mergedOverflow = Object.assign(Object.assign({}, baseOverflow), overflow);\n // Support auto shift\n if (!mergedOverflow.shiftX) {\n mergedOverflow.adjustX = true;\n }\n if (!mergedOverflow.shiftY) {\n mergedOverflow.adjustY = true;\n }\n return mergedOverflow;\n}\nconst PlacementAlignMap = {\n left: {\n points: ['cr', 'cl']\n },\n right: {\n points: ['cl', 'cr']\n },\n top: {\n points: ['bc', 'tc']\n },\n bottom: {\n points: ['tc', 'bc']\n },\n topLeft: {\n points: ['bl', 'tl']\n },\n leftTop: {\n points: ['tr', 'tl']\n },\n topRight: {\n points: ['br', 'tr']\n },\n rightTop: {\n points: ['tl', 'tr']\n },\n bottomRight: {\n points: ['tr', 'br']\n },\n rightBottom: {\n points: ['bl', 'br']\n },\n bottomLeft: {\n points: ['tl', 'bl']\n },\n leftBottom: {\n points: ['br', 'bl']\n }\n};\nconst ArrowCenterPlacementAlignMap = {\n topLeft: {\n points: ['bl', 'tc']\n },\n leftTop: {\n points: ['tr', 'cl']\n },\n topRight: {\n points: ['br', 'tc']\n },\n rightTop: {\n points: ['tl', 'cr']\n },\n bottomRight: {\n points: ['tr', 'bc']\n },\n rightBottom: {\n points: ['bl', 'cr']\n },\n bottomLeft: {\n points: ['tl', 'bc']\n },\n leftBottom: {\n points: ['br', 'cl']\n }\n};\nconst DisableAutoArrowList = new Set(['topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom']);\nfunction getPlacements(config) {\n const {\n arrowWidth,\n autoAdjustOverflow,\n arrowPointAtCenter,\n offset,\n borderRadius,\n visibleFirst\n } = config;\n const halfArrowWidth = arrowWidth / 2;\n const placementMap = {};\n Object.keys(PlacementAlignMap).forEach(key => {\n const template = arrowPointAtCenter && ArrowCenterPlacementAlignMap[key] || PlacementAlignMap[key];\n const placementInfo = Object.assign(Object.assign({}, template), {\n offset: [0, 0],\n dynamicInset: true\n });\n placementMap[key] = placementInfo;\n // Disable autoArrow since design is fixed position\n if (DisableAutoArrowList.has(key)) {\n placementInfo.autoArrow = false;\n }\n // Static offset\n switch (key) {\n case 'top':\n case 'topLeft':\n case 'topRight':\n placementInfo.offset[1] = -halfArrowWidth - offset;\n break;\n case 'bottom':\n case 'bottomLeft':\n case 'bottomRight':\n placementInfo.offset[1] = halfArrowWidth + offset;\n break;\n case 'left':\n case 'leftTop':\n case 'leftBottom':\n placementInfo.offset[0] = -halfArrowWidth - offset;\n break;\n case 'right':\n case 'rightTop':\n case 'rightBottom':\n placementInfo.offset[0] = halfArrowWidth + offset;\n break;\n }\n // Dynamic offset\n const arrowOffset = (0, _placementArrow.getArrowOffsetToken)({\n contentRadius: borderRadius,\n limitVerticalRadius: true\n });\n if (arrowPointAtCenter) {\n switch (key) {\n case 'topLeft':\n case 'bottomLeft':\n placementInfo.offset[0] = -arrowOffset.arrowOffsetHorizontal - halfArrowWidth;\n break;\n case 'topRight':\n case 'bottomRight':\n placementInfo.offset[0] = arrowOffset.arrowOffsetHorizontal + halfArrowWidth;\n break;\n case 'leftTop':\n case 'rightTop':\n placementInfo.offset[1] = -arrowOffset.arrowOffsetHorizontal * 2 + halfArrowWidth;\n break;\n case 'leftBottom':\n case 'rightBottom':\n placementInfo.offset[1] = arrowOffset.arrowOffsetHorizontal * 2 - halfArrowWidth;\n break;\n }\n }\n // Overflow\n placementInfo.overflow = getOverflowOptions(key, arrowOffset, arrowWidth, autoAdjustOverflow);\n // VisibleFirst\n if (visibleFirst) {\n placementInfo.htmlRegion = 'visibleFirst';\n }\n });\n return placementMap;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.cloneElement = cloneElement;\nexports.isFragment = isFragment;\nexports.replaceElement = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nfunction isFragment(child) {\n return child && /*#__PURE__*/_react.default.isValidElement(child) && child.type === _react.default.Fragment;\n}\nconst replaceElement = (element, replacement, props) => {\n if (! /*#__PURE__*/_react.default.isValidElement(element)) {\n return replacement;\n }\n return /*#__PURE__*/_react.default.cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);\n};\nexports.replaceElement = replaceElement;\nfunction cloneElement(element, props) {\n return replaceElement(element, element, props);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useResponsiveObserver;\nexports.responsiveArray = exports.matchScreen = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _internal = require(\"../theme/internal\");\nconst responsiveArray = exports.responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];\nconst getResponsiveMap = token => ({\n xs: `(max-width: ${token.screenXSMax}px)`,\n sm: `(min-width: ${token.screenSM}px)`,\n md: `(min-width: ${token.screenMD}px)`,\n lg: `(min-width: ${token.screenLG}px)`,\n xl: `(min-width: ${token.screenXL}px)`,\n xxl: `(min-width: ${token.screenXXL}px)`\n});\n/**\n * Ensures that the breakpoints token are valid, in good order\n * For each breakpoint : screenMin <= screen <= screenMax and screenMax <= nextScreenMin\n */\nconst validateBreakpoints = token => {\n const indexableToken = token;\n const revBreakpoints = [].concat(responsiveArray).reverse();\n revBreakpoints.forEach((breakpoint, i) => {\n const breakpointUpper = breakpoint.toUpperCase();\n const screenMin = `screen${breakpointUpper}Min`;\n const screen = `screen${breakpointUpper}`;\n if (!(indexableToken[screenMin] <= indexableToken[screen])) {\n throw new Error(`${screenMin}<=${screen} fails : !(${indexableToken[screenMin]}<=${indexableToken[screen]})`);\n }\n if (i < revBreakpoints.length - 1) {\n const screenMax = `screen${breakpointUpper}Max`;\n if (!(indexableToken[screen] <= indexableToken[screenMax])) {\n throw new Error(`${screen}<=${screenMax} fails : !(${indexableToken[screen]}<=${indexableToken[screenMax]})`);\n }\n const nextBreakpointUpperMin = revBreakpoints[i + 1].toUpperCase();\n const nextScreenMin = `screen${nextBreakpointUpperMin}Min`;\n if (!(indexableToken[screenMax] <= indexableToken[nextScreenMin])) {\n throw new Error(`${screenMax}<=${nextScreenMin} fails : !(${indexableToken[screenMax]}<=${indexableToken[nextScreenMin]})`);\n }\n }\n });\n return token;\n};\nfunction useResponsiveObserver() {\n const [, token] = (0, _internal.useToken)();\n const responsiveMap = getResponsiveMap(validateBreakpoints(token));\n // To avoid repeat create instance, we add `useMemo` here.\n return _react.default.useMemo(() => {\n const subscribers = new Map();\n let subUid = -1;\n let screens = {};\n return {\n matchHandlers: {},\n dispatch(pointMap) {\n screens = pointMap;\n subscribers.forEach(func => func(screens));\n return subscribers.size >= 1;\n },\n subscribe(func) {\n if (!subscribers.size) this.register();\n subUid += 1;\n subscribers.set(subUid, func);\n func(screens);\n return subUid;\n },\n unsubscribe(paramToken) {\n subscribers.delete(paramToken);\n if (!subscribers.size) this.unregister();\n },\n unregister() {\n Object.keys(responsiveMap).forEach(screen => {\n const matchMediaQuery = responsiveMap[screen];\n const handler = this.matchHandlers[matchMediaQuery];\n handler === null || handler === void 0 ? void 0 : handler.mql.removeListener(handler === null || handler === void 0 ? void 0 : handler.listener);\n });\n subscribers.clear();\n },\n register() {\n Object.keys(responsiveMap).forEach(screen => {\n const matchMediaQuery = responsiveMap[screen];\n const listener = _ref => {\n let {\n matches\n } = _ref;\n this.dispatch(Object.assign(Object.assign({}, screens), {\n [screen]: matches\n }));\n };\n const mql = window.matchMedia(matchMediaQuery);\n mql.addListener(listener);\n this.matchHandlers[matchMediaQuery] = {\n mql,\n listener\n };\n listener(mql);\n });\n },\n responsiveMap\n };\n }, [token]);\n}\nconst matchScreen = (screens, screenSizes) => {\n if (screenSizes && typeof screenSizes === 'object') {\n for (let i = 0; i < responsiveArray.length; i++) {\n const breakpoint = responsiveArray[i];\n if (screens[breakpoint] && screenSizes[breakpoint] !== undefined) {\n return screenSizes[breakpoint];\n }\n }\n }\n};\nexports.matchScreen = matchScreen;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = scrollTo;\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nvar _easings = require(\"./easings\");\nvar _getScroll = _interopRequireWildcard(require(\"./getScroll\"));\nfunction scrollTo(y) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const {\n getContainer = () => window,\n callback,\n duration = 450\n } = options;\n const container = getContainer();\n const scrollTop = (0, _getScroll.default)(container);\n const startTime = Date.now();\n const frameFunc = () => {\n const timestamp = Date.now();\n const time = timestamp - startTime;\n const nextScrollTop = (0, _easings.easeInOutCubic)(time > duration ? duration : time, scrollTop, y, duration);\n if ((0, _getScroll.isWindow)(container)) {\n container.scrollTo(window.pageXOffset, nextScrollTop);\n } else if (container instanceof Document || container.constructor.name === 'HTMLDocument') {\n container.documentElement.scrollTop = nextScrollTop;\n } else {\n container.scrollTop = nextScrollTop;\n }\n if (time < duration) {\n (0, _raf.default)(frameFunc);\n } else if (typeof callback === 'function') {\n callback();\n }\n };\n (0, _raf.default)(frameFunc);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getMergedStatus = void 0;\nexports.getStatusClassNames = getStatusClassNames;\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst _InputStatuses = ['warning', 'error', ''];\nfunction getStatusClassNames(prefixCls, status, hasFeedback) {\n return (0, _classnames.default)({\n [`${prefixCls}-status-success`]: status === 'success',\n [`${prefixCls}-status-warning`]: status === 'warning',\n [`${prefixCls}-status-error`]: status === 'error',\n [`${prefixCls}-status-validating`]: status === 'validating',\n [`${prefixCls}-has-feedback`]: hasFeedback\n });\n}\nconst getMergedStatus = (contextStatus, customStatus) => customStatus || contextStatus;\nexports.getMergedStatus = getMergedStatus;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.canUseDocElement = void 0;\nObject.defineProperty(exports, \"isStyleSupport\", {\n enumerable: true,\n get: function () {\n return _styleChecker.isStyleSupport;\n }\n});\nvar _canUseDom = _interopRequireDefault(require(\"rc-util/lib/Dom/canUseDom\"));\nvar _styleChecker = require(\"rc-util/lib/Dom/styleChecker\");\nconst canUseDocElement = () => (0, _canUseDom.default)() && window.document.documentElement;\nexports.canUseDocElement = canUseDocElement;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nfunction throttleByAnimationFrame(fn) {\n let requestId;\n const later = args => () => {\n requestId = null;\n fn.apply(void 0, (0, _toConsumableArray2.default)(args));\n };\n const throttled = function () {\n if (requestId == null) {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n requestId = (0, _raf.default)(later(args));\n }\n };\n throttled.cancel = () => {\n _raf.default.cancel(requestId);\n requestId = null;\n };\n return throttled;\n}\nvar _default = exports.default = throttleByAnimationFrame;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toList;\nfunction toList(candidate) {\n let skipEmpty = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (skipEmpty && (candidate === undefined || candidate === null)) return [];\n return Array.isArray(candidate) ? candidate : [candidate];\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.groupKeysMap = exports.groupDisabledKeysMap = void 0;\nconst groupKeysMap = keys => {\n const map = new Map();\n keys.forEach((key, index) => {\n map.set(key, index);\n });\n return map;\n};\nexports.groupKeysMap = groupKeysMap;\nconst groupDisabledKeysMap = dataSource => {\n const map = new Map();\n dataSource.forEach((_ref, index) => {\n let {\n disabled,\n key\n } = _ref;\n if (disabled) {\n map.set(key, index);\n }\n });\n return map;\n};\nexports.groupDisabledKeysMap = groupDisabledKeysMap;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.devUseWarning = exports.default = exports.WarningContext = void 0;\nexports.noop = noop;\nexports.resetWarned = resetWarned;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _warning = _interopRequireWildcard(require(\"rc-util/lib/warning\"));\nfunction noop() {}\nlet deprecatedWarnList = null;\nfunction resetWarned() {\n deprecatedWarnList = null;\n (0, _warning.resetWarned)();\n}\n// eslint-disable-next-line import/no-mutable-exports\nlet warning = noop;\nif (process.env.NODE_ENV !== 'production') {\n warning = (valid, component, message) => {\n (0, _warning.default)(valid, `[antd: ${component}] ${message}`);\n // StrictMode will inject console which will not throw warning in React 17.\n if (process.env.NODE_ENV === 'test') {\n resetWarned();\n }\n };\n}\nconst WarningContext = exports.WarningContext = /*#__PURE__*/React.createContext({});\n/**\n * This is a hook but we not named as `useWarning`\n * since this is only used in development.\n * We should always wrap this in `if (process.env.NODE_ENV !== 'production')` condition\n */\nconst devUseWarning = exports.devUseWarning = process.env.NODE_ENV !== 'production' ? component => {\n const {\n strict\n } = React.useContext(WarningContext);\n const typeWarning = (valid, type, message) => {\n if (!valid) {\n if (strict === false && type === 'deprecated') {\n const existWarning = deprecatedWarnList;\n if (!deprecatedWarnList) {\n deprecatedWarnList = {};\n }\n deprecatedWarnList[component] = deprecatedWarnList[component] || [];\n if (!deprecatedWarnList[component].includes(message || '')) {\n deprecatedWarnList[component].push(message || '');\n }\n // Warning for the first time\n if (!existWarning) {\n console.warn('[antd] There exists deprecated usage in your code:', deprecatedWarnList);\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(valid, component, message) : void 0;\n }\n }\n };\n typeWarning.deprecated = (valid, oldProp, newProp, message) => {\n typeWarning(valid, 'deprecated', `\\`${oldProp}\\` is deprecated. Please use \\`${newProp}\\` instead.${message ? ` ${message}` : ''}`);\n };\n return typeWarning;\n} : () => {\n const noopWarning = () => {};\n noopWarning.deprecated = noop;\n return noopWarning;\n};\nvar _default = exports.default = warning;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireDefault(require(\"rc-motion\"));\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nvar _render = require(\"rc-util/lib/React/render\");\nvar _ref2 = require(\"rc-util/lib/ref\");\nvar _interface = require(\"./interface\");\nvar _util = require(\"./util\");\nfunction validateNum(value) {\n return Number.isNaN(value) ? 0 : value;\n}\nconst WaveEffect = props => {\n const {\n className,\n target,\n component\n } = props;\n const divRef = React.useRef(null);\n const [color, setWaveColor] = React.useState(null);\n const [borderRadius, setBorderRadius] = React.useState([]);\n const [left, setLeft] = React.useState(0);\n const [top, setTop] = React.useState(0);\n const [width, setWidth] = React.useState(0);\n const [height, setHeight] = React.useState(0);\n const [enabled, setEnabled] = React.useState(false);\n const waveStyle = {\n left,\n top,\n width,\n height,\n borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')\n };\n if (color) {\n waveStyle['--wave-color'] = color;\n }\n function syncPos() {\n const nodeStyle = getComputedStyle(target);\n // Get wave color from target\n setWaveColor((0, _util.getTargetWaveColor)(target));\n const isStatic = nodeStyle.position === 'static';\n // Rect\n const {\n borderLeftWidth,\n borderTopWidth\n } = nodeStyle;\n setLeft(isStatic ? target.offsetLeft : validateNum(-parseFloat(borderLeftWidth)));\n setTop(isStatic ? target.offsetTop : validateNum(-parseFloat(borderTopWidth)));\n setWidth(target.offsetWidth);\n setHeight(target.offsetHeight);\n // Get border radius\n const {\n borderTopLeftRadius,\n borderTopRightRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius\n } = nodeStyle;\n setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(parseFloat(radius))));\n }\n React.useEffect(() => {\n if (target) {\n // We need delay to check position here\n // since UI may change after click\n const id = (0, _raf.default)(() => {\n syncPos();\n setEnabled(true);\n });\n // Add resize observer to follow size\n let resizeObserver;\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(syncPos);\n resizeObserver.observe(target);\n }\n return () => {\n _raf.default.cancel(id);\n resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();\n };\n }\n }, []);\n if (!enabled) {\n return null;\n }\n const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && (target === null || target === void 0 ? void 0 : target.classList.contains(_interface.TARGET_CLS));\n return /*#__PURE__*/React.createElement(_rcMotion.default, {\n visible: true,\n motionAppear: true,\n motionName: \"wave-motion\",\n motionDeadline: 5000,\n onAppearEnd: (_, event) => {\n var _a;\n if (event.deadline || event.propertyName === 'opacity') {\n const holder = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;\n (0, _render.unmount)(holder).then(() => {\n holder === null || holder === void 0 ? void 0 : holder.remove();\n });\n }\n return false;\n }\n }, (_ref, ref) => {\n let {\n className: motionClassName\n } = _ref;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: (0, _ref2.composeRef)(divRef, ref),\n className: (0, _classnames.default)(className, motionClassName, {\n 'wave-quick': isSmallComponent\n }),\n style: waveStyle\n });\n });\n};\nconst showWaveEffect = (target, info) => {\n var _a;\n const {\n component\n } = info;\n // Skip for unchecked checkbox\n if (component === 'Checkbox' && !((_a = target.querySelector('input')) === null || _a === void 0 ? void 0 : _a.checked)) {\n return;\n }\n // Create holder\n const holder = document.createElement('div');\n holder.style.position = 'absolute';\n holder.style.left = '0px';\n holder.style.top = '0px';\n target === null || target === void 0 ? void 0 : target.insertBefore(holder, target === null || target === void 0 ? void 0 : target.firstChild);\n (0, _render.render)(/*#__PURE__*/React.createElement(WaveEffect, Object.assign({}, info, {\n target: target\n })), holder);\n};\nvar _default = exports.default = showWaveEffect;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _isVisible = _interopRequireDefault(require(\"rc-util/lib/Dom/isVisible\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _configProvider = require(\"../../config-provider\");\nvar _reactNode = require(\"../reactNode\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _useWave = _interopRequireDefault(require(\"./useWave\"));\nconst Wave = props => {\n const {\n children,\n disabled,\n component\n } = props;\n const {\n getPrefixCls\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const containerRef = (0, _react.useRef)(null);\n // ============================== Style ===============================\n const prefixCls = getPrefixCls('wave');\n const [, hashId] = (0, _style.default)(prefixCls);\n // =============================== Wave ===============================\n const showWave = (0, _useWave.default)(containerRef, (0, _classnames.default)(prefixCls, hashId), component);\n // ============================== Effect ==============================\n _react.default.useEffect(() => {\n const node = containerRef.current;\n if (!node || node.nodeType !== 1 || disabled) {\n return;\n }\n // Click handler\n const onClick = e => {\n // Fix radio button click twice\n if (!(0, _isVisible.default)(e.target) ||\n // No need wave\n !node.getAttribute || node.getAttribute('disabled') || node.disabled || node.className.includes('disabled') || node.className.includes('-leave')) {\n return;\n }\n showWave(e);\n };\n // Bind events\n node.addEventListener('click', onClick, true);\n return () => {\n node.removeEventListener('click', onClick, true);\n };\n }, [disabled]);\n // ============================== Render ==============================\n if (! /*#__PURE__*/_react.default.isValidElement(children)) {\n return children !== null && children !== void 0 ? children : null;\n }\n const ref = (0, _ref.supportRef)(children) ? (0, _ref.composeRef)(children.ref, containerRef) : containerRef;\n return (0, _reactNode.cloneElement)(children, {\n ref\n });\n};\nif (process.env.NODE_ENV !== 'production') {\n Wave.displayName = 'Wave';\n}\nvar _default = exports.default = Wave;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TARGET_CLS = void 0;\nvar _configProvider = require(\"../../config-provider\");\nconst TARGET_CLS = exports.TARGET_CLS = `${_configProvider.defaultPrefixCls}-wave-target`;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\nconst genWaveStyle = token => {\n const {\n componentCls,\n colorPrimary\n } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n background: 'transparent',\n pointerEvents: 'none',\n boxSizing: 'border-box',\n color: `var(--wave-color, ${colorPrimary})`,\n boxShadow: `0 0 0 0 currentcolor`,\n opacity: 0.2,\n // =================== Motion ===================\n '&.wave-motion-appear': {\n transition: [`box-shadow 0.4s ${token.motionEaseOutCirc}`, `opacity 2s ${token.motionEaseOutCirc}`].join(','),\n '&-active': {\n boxShadow: `0 0 0 6px currentcolor`,\n opacity: 0\n },\n '&.wave-quick': {\n transition: [`box-shadow ${token.motionDurationSlow} ${token.motionEaseInOut}`, `opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`].join(',')\n }\n }\n }\n };\n};\nvar _default = exports.default = (0, _internal.genComponentStyleHook)('Wave', token => [genWaveStyle(token)]);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nvar _configProvider = require(\"../../config-provider\");\nvar _useToken = _interopRequireDefault(require(\"../../theme/useToken\"));\nvar _interface = require(\"./interface\");\nvar _WaveEffect = _interopRequireDefault(require(\"./WaveEffect\"));\nconst useWave = (nodeRef, className, component) => {\n const {\n wave\n } = React.useContext(_configProvider.ConfigContext);\n const [, token, hashId] = (0, _useToken.default)();\n const showWave = (0, _useEvent.default)(event => {\n const node = nodeRef.current;\n if ((wave === null || wave === void 0 ? void 0 : wave.disabled) || !node) {\n return;\n }\n const targetNode = node.querySelector(`.${_interface.TARGET_CLS}`) || node;\n const {\n showEffect\n } = wave || {};\n // Customize wave effect\n (showEffect || _WaveEffect.default)(targetNode, {\n className,\n token,\n component,\n event,\n hashId\n });\n });\n const rafId = React.useRef();\n // Merge trigger event into one for each frame\n const showDebounceWave = event => {\n _raf.default.cancel(rafId.current);\n rafId.current = (0, _raf.default)(() => {\n showWave(event);\n });\n };\n return showDebounceWave;\n};\nvar _default = exports.default = useWave;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getTargetWaveColor = getTargetWaveColor;\nexports.isValidWaveColor = isValidWaveColor;\nfunction isValidWaveColor(color) {\n return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && !/rgba\\((?:\\d*, ){3}0\\)/.test(color) &&\n // any transparent rgba color\n color !== 'transparent';\n}\nfunction getTargetWaveColor(node) {\n const {\n borderTopColor,\n borderColor,\n backgroundColor\n } = getComputedStyle(node);\n if (isValidWaveColor(borderTopColor)) {\n return borderTopColor;\n }\n if (isValidWaveColor(borderColor)) {\n return borderColor;\n }\n if (isValidWaveColor(backgroundColor)) {\n return backgroundColor;\n }\n return null;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst zIndexContext = /*#__PURE__*/_react.default.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n zIndexContext.displayName = 'zIndexContext';\n}\nvar _default = exports.default = zIndexContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcResizeObserver = _interopRequireDefault(require(\"rc-resize-observer\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _throttleByAnimationFrame = _interopRequireDefault(require(\"../_util/throttleByAnimationFrame\"));\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _utils = require(\"./utils\");\nconst TRIGGER_EVENTS = ['resize', 'scroll', 'touchstart', 'touchmove', 'touchend', 'pageshow', 'load'];\nfunction getDefaultTarget() {\n return typeof window !== 'undefined' ? window : null;\n}\nconst AFFIX_STATUS_NONE = 0;\nconst AFFIX_STATUS_PREPARE = 1;\nconst Affix = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n var _a;\n const {\n style,\n offsetTop,\n offsetBottom,\n prefixCls,\n className,\n rootClassName,\n children,\n target,\n onChange\n } = props;\n const {\n getPrefixCls,\n getTargetContainer\n } = _react.default.useContext(_configProvider.ConfigContext);\n const affixPrefixCls = getPrefixCls('affix', prefixCls);\n const [lastAffix, setLastAffix] = _react.default.useState(false);\n const [affixStyle, setAffixStyle] = _react.default.useState();\n const [placeholderStyle, setPlaceholderStyle] = _react.default.useState();\n const status = _react.default.useRef(AFFIX_STATUS_NONE);\n const prevTarget = _react.default.useRef(null);\n const prevListener = _react.default.useRef();\n const placeholderNodeRef = _react.default.useRef(null);\n const fixedNodeRef = _react.default.useRef(null);\n const timer = _react.default.useRef(null);\n const targetFunc = (_a = target !== null && target !== void 0 ? target : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultTarget;\n const internalOffsetTop = offsetBottom === undefined && offsetTop === undefined ? 0 : offsetTop;\n // =================== Measure ===================\n const measure = () => {\n if (status.current !== AFFIX_STATUS_PREPARE || !fixedNodeRef.current || !placeholderNodeRef.current || !targetFunc) {\n return;\n }\n const targetNode = targetFunc();\n if (targetNode) {\n const newState = {\n status: AFFIX_STATUS_NONE\n };\n const placeholderRect = (0, _utils.getTargetRect)(placeholderNodeRef.current);\n if (placeholderRect.top === 0 && placeholderRect.left === 0 && placeholderRect.width === 0 && placeholderRect.height === 0) {\n return;\n }\n const targetRect = (0, _utils.getTargetRect)(targetNode);\n const fixedTop = (0, _utils.getFixedTop)(placeholderRect, targetRect, internalOffsetTop);\n const fixedBottom = (0, _utils.getFixedBottom)(placeholderRect, targetRect, offsetBottom);\n if (fixedTop !== undefined) {\n newState.affixStyle = {\n position: 'fixed',\n top: fixedTop,\n width: placeholderRect.width,\n height: placeholderRect.height\n };\n newState.placeholderStyle = {\n width: placeholderRect.width,\n height: placeholderRect.height\n };\n } else if (fixedBottom !== undefined) {\n newState.affixStyle = {\n position: 'fixed',\n bottom: fixedBottom,\n width: placeholderRect.width,\n height: placeholderRect.height\n };\n newState.placeholderStyle = {\n width: placeholderRect.width,\n height: placeholderRect.height\n };\n }\n newState.lastAffix = !!newState.affixStyle;\n if (lastAffix !== newState.lastAffix) {\n onChange === null || onChange === void 0 ? void 0 : onChange(newState.lastAffix);\n }\n status.current = newState.status;\n setAffixStyle(newState.affixStyle);\n setPlaceholderStyle(newState.placeholderStyle);\n setLastAffix(newState.lastAffix);\n }\n };\n const prepareMeasure = () => {\n var _a;\n status.current = AFFIX_STATUS_PREPARE;\n measure();\n if (process.env.NODE_ENV === 'test') {\n (_a = props === null || props === void 0 ? void 0 : props.onTestUpdatePosition) === null || _a === void 0 ? void 0 : _a.call(props);\n }\n };\n const updatePosition = (0, _throttleByAnimationFrame.default)(() => {\n prepareMeasure();\n });\n const lazyUpdatePosition = (0, _throttleByAnimationFrame.default)(() => {\n // Check position change before measure to make Safari smooth\n if (targetFunc && affixStyle) {\n const targetNode = targetFunc();\n if (targetNode && placeholderNodeRef.current) {\n const targetRect = (0, _utils.getTargetRect)(targetNode);\n const placeholderRect = (0, _utils.getTargetRect)(placeholderNodeRef.current);\n const fixedTop = (0, _utils.getFixedTop)(placeholderRect, targetRect, internalOffsetTop);\n const fixedBottom = (0, _utils.getFixedBottom)(placeholderRect, targetRect, offsetBottom);\n if (fixedTop !== undefined && affixStyle.top === fixedTop || fixedBottom !== undefined && affixStyle.bottom === fixedBottom) {\n return;\n }\n }\n }\n // Directly call prepare measure since it's already throttled.\n prepareMeasure();\n });\n const addListeners = () => {\n const listenerTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();\n if (!listenerTarget) {\n return;\n }\n TRIGGER_EVENTS.forEach(eventName => {\n var _a;\n if (prevListener.current) {\n (_a = prevTarget.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, prevListener.current);\n }\n listenerTarget === null || listenerTarget === void 0 ? void 0 : listenerTarget.addEventListener(eventName, lazyUpdatePosition);\n });\n prevTarget.current = listenerTarget;\n prevListener.current = lazyUpdatePosition;\n };\n const removeListeners = () => {\n if (timer.current) {\n clearTimeout(timer.current);\n timer.current = null;\n }\n const newTarget = targetFunc === null || targetFunc === void 0 ? void 0 : targetFunc();\n TRIGGER_EVENTS.forEach(eventName => {\n var _a;\n newTarget === null || newTarget === void 0 ? void 0 : newTarget.removeEventListener(eventName, lazyUpdatePosition);\n if (prevListener.current) {\n (_a = prevTarget.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, prevListener.current);\n }\n });\n updatePosition.cancel();\n lazyUpdatePosition.cancel();\n };\n _react.default.useImperativeHandle(ref, () => ({\n updatePosition\n }));\n // mount & unmount\n _react.default.useEffect(() => {\n // [Legacy] Wait for parent component ref has its value.\n // We should use target as directly element instead of function which makes element check hard.\n timer.current = setTimeout(addListeners);\n return () => removeListeners();\n }, []);\n _react.default.useEffect(() => {\n addListeners();\n }, [target, affixStyle]);\n _react.default.useEffect(() => {\n updatePosition();\n }, [target, offsetTop, offsetBottom]);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(affixPrefixCls);\n const rootCls = (0, _classnames.default)(rootClassName, hashId, affixPrefixCls, cssVarCls);\n const mergedCls = (0, _classnames.default)({\n [rootCls]: affixStyle\n });\n let otherProps = (0, _omit.default)(props, ['prefixCls', 'offsetTop', 'offsetBottom', 'target', 'onChange', 'rootClassName']);\n if (process.env.NODE_ENV === 'test') {\n otherProps = (0, _omit.default)(otherProps, ['onTestUpdatePosition']);\n }\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(_rcResizeObserver.default, {\n onResize: updatePosition\n }, /*#__PURE__*/_react.default.createElement(\"div\", Object.assign({\n style: style,\n className: className,\n ref: placeholderNodeRef\n }, otherProps), affixStyle && /*#__PURE__*/_react.default.createElement(\"div\", {\n style: placeholderStyle,\n \"aria-hidden\": \"true\"\n }), /*#__PURE__*/_react.default.createElement(\"div\", {\n className: mergedCls,\n ref: fixedNodeRef,\n style: affixStyle\n }, /*#__PURE__*/_react.default.createElement(_rcResizeObserver.default, {\n onResize: updatePosition\n }, children)))));\n});\nif (process.env.NODE_ENV !== 'production') {\n Affix.displayName = 'Affix';\n}\nvar _default = exports.default = Affix;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\n// ============================== Shared ==============================\nconst genSharedAffixStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: {\n position: 'fixed',\n zIndex: token.zIndexPopup\n }\n };\n};\nconst prepareComponentToken = token => ({\n zIndexPopup: token.zIndexBase + 10\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Affix', genSharedAffixStyle, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFixedBottom = getFixedBottom;\nexports.getFixedTop = getFixedTop;\nexports.getTargetRect = getTargetRect;\nfunction getTargetRect(target) {\n return target !== window ? target.getBoundingClientRect() : {\n top: 0,\n bottom: window.innerHeight\n };\n}\nfunction getFixedTop(placeholderRect, targetRect, offsetTop) {\n if (offsetTop !== undefined && Math.round(targetRect.top) > Math.round(placeholderRect.top) - offsetTop) {\n return offsetTop + targetRect.top;\n }\n return undefined;\n}\nfunction getFixedBottom(placeholderRect, targetRect, offsetBottom) {\n if (offsetBottom !== undefined && Math.round(targetRect.bottom) < Math.round(placeholderRect.bottom) + offsetBottom) {\n const targetBottomOffset = window.innerHeight - targetRect.bottom;\n return offsetBottom + targetBottomOffset;\n }\n return undefined;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CheckCircleFilled\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _ExclamationCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/ExclamationCircleFilled\"));\nvar _InfoCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/InfoCircleFilled\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireDefault(require(\"rc-motion\"));\nvar _pickAttrs = _interopRequireDefault(require(\"rc-util/lib/pickAttrs\"));\nvar _ref2 = require(\"rc-util/lib/ref\");\nvar _reactNode = require(\"../_util/reactNode\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst iconMapFilled = {\n success: _CheckCircleFilled.default,\n info: _InfoCircleFilled.default,\n error: _CloseCircleFilled.default,\n warning: _ExclamationCircleFilled.default\n};\nconst IconNode = props => {\n const {\n icon,\n prefixCls,\n type\n } = props;\n const iconType = iconMapFilled[type] || null;\n if (icon) {\n return (0, _reactNode.replaceElement)(icon, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-icon`\n }, icon), () => ({\n className: (0, _classnames.default)(`${prefixCls}-icon`, {\n [icon.props.className]: icon.props.className\n })\n }));\n }\n return /*#__PURE__*/React.createElement(iconType, {\n className: `${prefixCls}-icon`\n });\n};\nconst CloseIconNode = props => {\n const {\n isClosable,\n prefixCls,\n closeIcon,\n handleClose,\n ariaProps\n } = props;\n const mergedCloseIcon = closeIcon === true || closeIcon === undefined ? /*#__PURE__*/React.createElement(_CloseOutlined.default, null) : closeIcon;\n return isClosable ? (/*#__PURE__*/React.createElement(\"button\", Object.assign({\n type: \"button\",\n onClick: handleClose,\n className: `${prefixCls}-close-icon`,\n tabIndex: 0\n }, ariaProps), mergedCloseIcon)) : null;\n};\nconst Alert = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n description,\n prefixCls: customizePrefixCls,\n message,\n banner,\n className,\n rootClassName,\n style,\n onMouseEnter,\n onMouseLeave,\n onClick,\n afterClose,\n showIcon,\n closable,\n closeText,\n closeIcon,\n action,\n id\n } = props,\n otherProps = __rest(props, [\"description\", \"prefixCls\", \"message\", \"banner\", \"className\", \"rootClassName\", \"style\", \"onMouseEnter\", \"onMouseLeave\", \"onClick\", \"afterClose\", \"showIcon\", \"closable\", \"closeText\", \"closeIcon\", \"action\", \"id\"]);\n const [closed, setClosed] = React.useState(false);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Alert');\n warning.deprecated(!closeText, 'closeText', 'closable.closeIcon');\n }\n const internalRef = React.useRef(null);\n React.useImperativeHandle(ref, () => ({\n nativeElement: internalRef.current\n }));\n const {\n getPrefixCls,\n direction,\n alert\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('alert', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const handleClose = e => {\n var _a;\n setClosed(true);\n (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);\n };\n const type = React.useMemo(() => {\n if (props.type !== undefined) {\n return props.type;\n }\n // banner mode defaults to 'warning'\n return banner ? 'warning' : 'info';\n }, [props.type, banner]);\n // closeable when closeText or closeIcon is assigned\n const isClosable = React.useMemo(() => {\n if (typeof closable === 'object' && closable.closeIcon) return true;\n if (closeText) {\n return true;\n }\n if (typeof closable === 'boolean') {\n return closable;\n }\n // should be true when closeIcon is 0 or ''\n if (closeIcon !== false && closeIcon !== null && closeIcon !== undefined) {\n return true;\n }\n return !!(alert === null || alert === void 0 ? void 0 : alert.closable);\n }, [closeText, closeIcon, closable, alert === null || alert === void 0 ? void 0 : alert.closable]);\n // banner mode defaults to Icon\n const isShowIcon = banner && showIcon === undefined ? true : showIcon;\n const alertCls = (0, _classnames.default)(prefixCls, `${prefixCls}-${type}`, {\n [`${prefixCls}-with-description`]: !!description,\n [`${prefixCls}-no-icon`]: !isShowIcon,\n [`${prefixCls}-banner`]: !!banner,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, alert === null || alert === void 0 ? void 0 : alert.className, className, rootClassName, cssVarCls, hashId);\n const restProps = (0, _pickAttrs.default)(otherProps, {\n aria: true,\n data: true\n });\n const mergedCloseIcon = React.useMemo(() => {\n var _a, _b;\n if (typeof closable === 'object' && closable.closeIcon) {\n return closable.closeIcon;\n }\n if (closeText) {\n return closeText;\n }\n if (closeIcon !== undefined) {\n return closeIcon;\n }\n if (typeof (alert === null || alert === void 0 ? void 0 : alert.closable) === 'object' && ((_a = alert === null || alert === void 0 ? void 0 : alert.closable) === null || _a === void 0 ? void 0 : _a.closeIcon)) {\n return (_b = alert === null || alert === void 0 ? void 0 : alert.closable) === null || _b === void 0 ? void 0 : _b.closeIcon;\n }\n return alert === null || alert === void 0 ? void 0 : alert.closeIcon;\n }, [closeIcon, closable, closeText, alert === null || alert === void 0 ? void 0 : alert.closeIcon]);\n const mergedAriaProps = React.useMemo(() => {\n const merged = closable !== null && closable !== void 0 ? closable : alert === null || alert === void 0 ? void 0 : alert.closable;\n if (typeof merged === 'object') {\n const {\n closeIcon: _\n } = merged,\n ariaProps = __rest(merged, [\"closeIcon\"]);\n return ariaProps;\n }\n return {};\n }, [closable, alert === null || alert === void 0 ? void 0 : alert.closable]);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcMotion.default, {\n visible: !closed,\n motionName: `${prefixCls}-motion`,\n motionAppear: false,\n motionEnter: false,\n onLeaveStart: node => ({\n maxHeight: node.offsetHeight\n }),\n onLeaveEnd: afterClose\n }, (_ref, setRef) => {\n let {\n className: motionClassName,\n style: motionStyle\n } = _ref;\n return /*#__PURE__*/React.createElement(\"div\", Object.assign({\n id: id,\n ref: (0, _ref2.composeRef)(internalRef, setRef),\n \"data-show\": !closed,\n className: (0, _classnames.default)(alertCls, motionClassName),\n style: Object.assign(Object.assign(Object.assign({}, alert === null || alert === void 0 ? void 0 : alert.style), style), motionStyle),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onClick: onClick,\n role: \"alert\"\n }, restProps), isShowIcon ? (/*#__PURE__*/React.createElement(IconNode, {\n description: description,\n icon: props.icon,\n prefixCls: prefixCls,\n type: type\n })) : null, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-content`\n }, message ? /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-message`\n }, message) : null, description ? /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description) : null), action ? /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-action`\n }, action) : null, /*#__PURE__*/React.createElement(CloseIconNode, {\n isClosable: isClosable,\n prefixCls: prefixCls,\n closeIcon: mergedCloseIcon,\n handleClose: handleClose,\n ariaProps: mergedAriaProps\n }));\n }));\n});\nif (process.env.NODE_ENV !== 'production') {\n Alert.displayName = 'Alert';\n}\nvar _default = exports.default = Alert;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\nvar _callSuper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/callSuper\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _Alert = _interopRequireDefault(require(\"./Alert\"));\nlet ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n function ErrorBoundary() {\n var _this;\n (0, _classCallCheck2.default)(this, ErrorBoundary);\n _this = (0, _callSuper2.default)(this, ErrorBoundary, arguments);\n _this.state = {\n error: undefined,\n info: {\n componentStack: ''\n }\n };\n return _this;\n }\n (0, _inherits2.default)(ErrorBoundary, _React$Component);\n return (0, _createClass2.default)(ErrorBoundary, [{\n key: \"componentDidCatch\",\n value: function componentDidCatch(error, info) {\n this.setState({\n error,\n info\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n const {\n message,\n description,\n id,\n children\n } = this.props;\n const {\n error,\n info\n } = this.state;\n const componentStack = (info === null || info === void 0 ? void 0 : info.componentStack) || null;\n const errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;\n const errorDescription = typeof description === 'undefined' ? componentStack : description;\n if (error) {\n return /*#__PURE__*/React.createElement(_Alert.default, {\n id: id,\n type: \"error\",\n message: errorMessage,\n description: /*#__PURE__*/React.createElement(\"pre\", {\n style: {\n fontSize: '0.9em',\n overflowX: 'auto'\n }\n }, errorDescription)\n });\n }\n return children;\n }\n }]);\n}(React.Component);\nvar _default = exports.default = ErrorBoundary;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Alert = _interopRequireDefault(require(\"./Alert\"));\nvar _ErrorBoundary = _interopRequireDefault(require(\"./ErrorBoundary\"));\nconst Alert = _Alert.default;\nAlert.ErrorBoundary = _ErrorBoundary.default;\nvar _default = exports.default = Alert;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.genTypeStyle = exports.genBaseStyle = exports.genActionStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls) => ({\n background: bgColor,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${borderColor}`,\n [`${alertCls}-icon`]: {\n color: iconColor\n }\n});\nconst genBaseStyle = token => {\n const {\n componentCls,\n motionDurationSlow: duration,\n marginXS,\n marginSM,\n fontSize,\n fontSizeLG,\n lineHeight,\n borderRadiusLG: borderRadius,\n motionEaseInOutCirc,\n withDescriptionIconSize,\n colorText,\n colorTextHeading,\n withDescriptionPadding,\n defaultPadding\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n padding: defaultPadding,\n wordWrap: 'break-word',\n borderRadius,\n [`&${componentCls}-rtl`]: {\n direction: 'rtl'\n },\n [`${componentCls}-content`]: {\n flex: 1,\n minWidth: 0\n },\n [`${componentCls}-icon`]: {\n marginInlineEnd: marginXS,\n lineHeight: 0\n },\n '&-description': {\n display: 'none',\n fontSize,\n lineHeight\n },\n '&-message': {\n color: colorTextHeading\n },\n [`&${componentCls}-motion-leave`]: {\n overflow: 'hidden',\n opacity: 1,\n transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},\n padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},\n margin-bottom ${duration} ${motionEaseInOutCirc}`\n },\n [`&${componentCls}-motion-leave-active`]: {\n maxHeight: 0,\n marginBottom: '0 !important',\n paddingTop: 0,\n paddingBottom: 0,\n opacity: 0\n }\n }),\n [`${componentCls}-with-description`]: {\n alignItems: 'flex-start',\n padding: withDescriptionPadding,\n [`${componentCls}-icon`]: {\n marginInlineEnd: marginSM,\n fontSize: withDescriptionIconSize,\n lineHeight: 0\n },\n [`${componentCls}-message`]: {\n display: 'block',\n marginBottom: marginXS,\n color: colorTextHeading,\n fontSize: fontSizeLG\n },\n [`${componentCls}-description`]: {\n display: 'block',\n color: colorText\n }\n },\n [`${componentCls}-banner`]: {\n marginBottom: 0,\n border: '0 !important',\n borderRadius: 0\n }\n };\n};\nexports.genBaseStyle = genBaseStyle;\nconst genTypeStyle = token => {\n const {\n componentCls,\n colorSuccess,\n colorSuccessBorder,\n colorSuccessBg,\n colorWarning,\n colorWarningBorder,\n colorWarningBg,\n colorError,\n colorErrorBorder,\n colorErrorBg,\n colorInfo,\n colorInfoBorder,\n colorInfoBg\n } = token;\n return {\n [componentCls]: {\n '&-success': genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),\n '&-info': genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),\n '&-warning': genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),\n '&-error': Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls)), {\n [`${componentCls}-description > pre`]: {\n margin: 0,\n padding: 0\n }\n })\n }\n };\n};\nexports.genTypeStyle = genTypeStyle;\nconst genActionStyle = token => {\n const {\n componentCls,\n iconCls,\n motionDurationMid,\n marginXS,\n fontSizeIcon,\n colorIcon,\n colorIconHover\n } = token;\n return {\n [componentCls]: {\n '&-action': {\n marginInlineStart: marginXS\n },\n [`${componentCls}-close-icon`]: {\n marginInlineStart: marginXS,\n padding: 0,\n overflow: 'hidden',\n fontSize: fontSizeIcon,\n lineHeight: (0, _cssinjs.unit)(fontSizeIcon),\n backgroundColor: 'transparent',\n border: 'none',\n outline: 'none',\n cursor: 'pointer',\n [`${iconCls}-close`]: {\n color: colorIcon,\n transition: `color ${motionDurationMid}`,\n '&:hover': {\n color: colorIconHover\n }\n }\n },\n '&-close-text': {\n color: colorIcon,\n transition: `color ${motionDurationMid}`,\n '&:hover': {\n color: colorIconHover\n }\n }\n }\n };\n};\nexports.genActionStyle = genActionStyle;\nconst prepareComponentToken = token => {\n const paddingHorizontal = 12; // Fixed value here.\n return {\n withDescriptionIconSize: token.fontSizeHeading3,\n defaultPadding: `${token.paddingContentVerticalSM}px ${paddingHorizontal}px`,\n withDescriptionPadding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Alert', token => [genBaseStyle(token), genTypeStyle(token), genActionStyle(token)], prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _scrollIntoViewIfNeeded = _interopRequireDefault(require(\"scroll-into-view-if-needed\"));\nvar _getScroll = _interopRequireDefault(require(\"../_util/getScroll\"));\nvar _scrollTo = _interopRequireDefault(require(\"../_util/scrollTo\"));\nvar _warning = require(\"../_util/warning\");\nvar _affix = _interopRequireDefault(require(\"../affix\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _AnchorLink = _interopRequireDefault(require(\"./AnchorLink\"));\nvar _context = _interopRequireDefault(require(\"./context\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nfunction getDefaultContainer() {\n return window;\n}\nfunction getOffsetTop(element, container) {\n if (!element.getClientRects().length) {\n return 0;\n }\n const rect = element.getBoundingClientRect();\n if (rect.width || rect.height) {\n if (container === window) {\n return rect.top - element.ownerDocument.documentElement.clientTop;\n }\n return rect.top - container.getBoundingClientRect().top;\n }\n return rect.top;\n}\nconst sharpMatcherRegex = /#([\\S ]+)$/;\nconst Anchor = props => {\n var _a;\n const {\n rootClassName,\n prefixCls: customPrefixCls,\n className,\n style,\n offsetTop,\n affix = true,\n showInkInFixed = false,\n children,\n items,\n direction: anchorDirection = 'vertical',\n bounds,\n targetOffset,\n onClick,\n onChange,\n getContainer,\n getCurrentAnchor,\n replace\n } = props;\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Anchor');\n warning.deprecated(!children, 'Anchor children', 'items');\n process.env.NODE_ENV !== \"production\" ? warning(!(anchorDirection === 'horizontal' && (items === null || items === void 0 ? void 0 : items.some(n => 'children' in n))), 'usage', '`Anchor items#children` is not supported when `Anchor` direction is horizontal.') : void 0;\n }\n const [links, setLinks] = React.useState([]);\n const [activeLink, setActiveLink] = React.useState(null);\n const activeLinkRef = React.useRef(activeLink);\n const wrapperRef = React.useRef(null);\n const spanLinkNode = React.useRef(null);\n const animating = React.useRef(false);\n const {\n direction,\n anchor,\n getTargetContainer,\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('anchor', customPrefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const getCurrentContainer = (_a = getContainer !== null && getContainer !== void 0 ? getContainer : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultContainer;\n const dependencyListItem = JSON.stringify(links);\n const registerLink = (0, _useEvent.default)(link => {\n if (!links.includes(link)) {\n setLinks(prev => [].concat((0, _toConsumableArray2.default)(prev), [link]));\n }\n });\n const unregisterLink = (0, _useEvent.default)(link => {\n if (links.includes(link)) {\n setLinks(prev => prev.filter(i => i !== link));\n }\n });\n const updateInk = () => {\n var _a;\n const linkNode = (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`.${prefixCls}-link-title-active`);\n if (linkNode && spanLinkNode.current) {\n const {\n style: inkStyle\n } = spanLinkNode.current;\n const horizontalAnchor = anchorDirection === 'horizontal';\n inkStyle.top = horizontalAnchor ? '' : `${linkNode.offsetTop + linkNode.clientHeight / 2}px`;\n inkStyle.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;\n inkStyle.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';\n inkStyle.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';\n if (horizontalAnchor) {\n (0, _scrollIntoViewIfNeeded.default)(linkNode, {\n scrollMode: 'if-needed',\n block: 'nearest'\n });\n }\n }\n };\n const getInternalCurrentAnchor = function (_links) {\n let _offsetTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n let _bounds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;\n const linkSections = [];\n const container = getCurrentContainer();\n _links.forEach(link => {\n const sharpLinkMatch = sharpMatcherRegex.exec(link === null || link === void 0 ? void 0 : link.toString());\n if (!sharpLinkMatch) {\n return;\n }\n const target = document.getElementById(sharpLinkMatch[1]);\n if (target) {\n const top = getOffsetTop(target, container);\n if (top <= _offsetTop + _bounds) {\n linkSections.push({\n link,\n top\n });\n }\n }\n });\n if (linkSections.length) {\n const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);\n return maxSection.link;\n }\n return '';\n };\n const setCurrentActiveLink = (0, _useEvent.default)(link => {\n // FIXME: Seems a bug since this compare is not equals\n // `activeLinkRef` is parsed value which will always trigger `onChange` event.\n if (activeLinkRef.current === link) {\n return;\n }\n // https://github.com/ant-design/ant-design/issues/30584\n const newLink = typeof getCurrentAnchor === 'function' ? getCurrentAnchor(link) : link;\n setActiveLink(newLink);\n activeLinkRef.current = newLink;\n // onChange should respect the original link (which may caused by\n // window scroll or user click), not the new link\n onChange === null || onChange === void 0 ? void 0 : onChange(link);\n });\n const handleScroll = React.useCallback(() => {\n if (animating.current) {\n return;\n }\n const currentActiveLink = getInternalCurrentAnchor(links, targetOffset !== undefined ? targetOffset : offsetTop || 0, bounds);\n setCurrentActiveLink(currentActiveLink);\n }, [dependencyListItem, targetOffset, offsetTop]);\n const handleScrollTo = React.useCallback(link => {\n setCurrentActiveLink(link);\n const sharpLinkMatch = sharpMatcherRegex.exec(link);\n if (!sharpLinkMatch) {\n return;\n }\n const targetElement = document.getElementById(sharpLinkMatch[1]);\n if (!targetElement) {\n return;\n }\n const container = getCurrentContainer();\n const scrollTop = (0, _getScroll.default)(container);\n const eleOffsetTop = getOffsetTop(targetElement, container);\n let y = scrollTop + eleOffsetTop;\n y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;\n animating.current = true;\n (0, _scrollTo.default)(y, {\n getContainer: getCurrentContainer,\n callback() {\n animating.current = false;\n }\n });\n }, [targetOffset, offsetTop]);\n const wrapperClass = (0, _classnames.default)(hashId, cssVarCls, rootCls, rootClassName, `${prefixCls}-wrapper`, {\n [`${prefixCls}-wrapper-horizontal`]: anchorDirection === 'horizontal',\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, anchor === null || anchor === void 0 ? void 0 : anchor.className);\n const anchorClass = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-fixed`]: !affix && !showInkInFixed\n });\n const inkClass = (0, _classnames.default)(`${prefixCls}-ink`, {\n [`${prefixCls}-ink-visible`]: activeLink\n });\n const wrapperStyle = Object.assign(Object.assign({\n maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh'\n }, anchor === null || anchor === void 0 ? void 0 : anchor.style), style);\n const createNestedLink = options => Array.isArray(options) ? options.map(item => (/*#__PURE__*/React.createElement(_AnchorLink.default, Object.assign({\n replace: replace\n }, item, {\n key: item.key\n }), anchorDirection === 'vertical' && createNestedLink(item.children)))) : null;\n const anchorContent = /*#__PURE__*/React.createElement(\"div\", {\n ref: wrapperRef,\n className: wrapperClass,\n style: wrapperStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: anchorClass\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: inkClass,\n ref: spanLinkNode\n }), 'items' in props ? createNestedLink(items) : children));\n React.useEffect(() => {\n const scrollContainer = getCurrentContainer();\n handleScroll();\n scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener('scroll', handleScroll);\n return () => {\n scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener('scroll', handleScroll);\n };\n }, [dependencyListItem]);\n React.useEffect(() => {\n if (typeof getCurrentAnchor === 'function') {\n setCurrentActiveLink(getCurrentAnchor(activeLinkRef.current || ''));\n }\n }, [getCurrentAnchor]);\n React.useEffect(() => {\n updateInk();\n }, [anchorDirection, getCurrentAnchor, dependencyListItem, activeLink]);\n const memoizedContextValue = React.useMemo(() => ({\n registerLink,\n unregisterLink,\n scrollTo: handleScrollTo,\n activeLink,\n onClick,\n direction: anchorDirection\n }), [activeLink, onClick, handleScrollTo, anchorDirection]);\n const affixProps = affix && typeof affix === 'object' ? affix : undefined;\n return wrapCSSVar(/*#__PURE__*/React.createElement(_context.default.Provider, {\n value: memoizedContextValue\n }, affix ? (/*#__PURE__*/React.createElement(_affix.default, Object.assign({\n offsetTop: offsetTop,\n target: getCurrentContainer\n }, affixProps), anchorContent)) : anchorContent));\n};\nif (process.env.NODE_ENV !== 'production') {\n Anchor.displayName = 'Anchor';\n}\nvar _default = exports.default = Anchor;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _context = _interopRequireDefault(require(\"./context\"));\nconst AnchorLink = props => {\n const {\n href,\n title,\n prefixCls: customizePrefixCls,\n children,\n className,\n target,\n replace\n } = props;\n const context = React.useContext(_context.default);\n const {\n registerLink,\n unregisterLink,\n scrollTo,\n onClick,\n activeLink,\n direction\n } = context || {};\n React.useEffect(() => {\n registerLink === null || registerLink === void 0 ? void 0 : registerLink(href);\n return () => {\n unregisterLink === null || unregisterLink === void 0 ? void 0 : unregisterLink(href);\n };\n }, [href]);\n const handleClick = e => {\n onClick === null || onClick === void 0 ? void 0 : onClick(e, {\n title,\n href\n });\n scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);\n if (replace) {\n e.preventDefault();\n window.location.replace(href);\n }\n };\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Anchor.Link');\n process.env.NODE_ENV !== \"production\" ? warning(!children || direction !== 'horizontal', 'usage', '`Anchor.Link children` is not supported when `Anchor` direction is horizontal') : void 0;\n }\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('anchor', customizePrefixCls);\n const active = activeLink === href;\n const wrapperClassName = (0, _classnames.default)(`${prefixCls}-link`, className, {\n [`${prefixCls}-link-active`]: active\n });\n const titleClassName = (0, _classnames.default)(`${prefixCls}-link-title`, {\n [`${prefixCls}-link-title-active`]: active\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: wrapperClassName\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: titleClassName,\n href: href,\n title: typeof title === 'string' ? title : '',\n target: target,\n onClick: handleClick\n }, title), direction !== 'horizontal' ? children : null);\n};\nvar _default = exports.default = AnchorLink;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst AnchorContext = /*#__PURE__*/React.createContext(undefined);\nvar _default = exports.default = AnchorContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Anchor = _interopRequireDefault(require(\"./Anchor\"));\nvar _AnchorLink = _interopRequireDefault(require(\"./AnchorLink\"));\nconst Anchor = _Anchor.default;\nAnchor.Link = _AnchorLink.default;\nvar _default = exports.default = Anchor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Shared ==============================\nconst genSharedAnchorStyle = token => {\n const {\n componentCls,\n holderOffsetBlock,\n motionDurationSlow,\n lineWidthBold,\n colorPrimary,\n lineType,\n colorSplit,\n calc\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n marginBlockStart: calc(holderOffsetBlock).mul(-1).equal(),\n paddingBlockStart: holderOffsetBlock,\n // delete overflow: auto\n // overflow: 'auto',\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n paddingInlineStart: lineWidthBold,\n [`${componentCls}-link`]: {\n paddingBlock: token.linkPaddingBlock,\n paddingInline: `${(0, _cssinjs.unit)(token.linkPaddingInlineStart)} 0`,\n '&-title': Object.assign(Object.assign({}, _style.textEllipsis), {\n position: 'relative',\n display: 'block',\n marginBlockEnd: token.anchorTitleBlock,\n color: token.colorText,\n transition: `all ${token.motionDurationSlow}`,\n '&:only-child': {\n marginBlockEnd: 0\n }\n }),\n [`&-active > ${componentCls}-link-title`]: {\n color: token.colorPrimary\n },\n // link link\n [`${componentCls}-link`]: {\n paddingBlock: token.anchorPaddingBlockSecondary\n }\n }\n }),\n [`&:not(${componentCls}-wrapper-horizontal)`]: {\n [componentCls]: {\n '&::before': {\n position: 'absolute',\n insetInlineStart: 0,\n top: 0,\n height: '100%',\n borderInlineStart: `${(0, _cssinjs.unit)(lineWidthBold)} ${lineType} ${colorSplit}`,\n content: '\" \"'\n },\n [`${componentCls}-ink`]: {\n position: 'absolute',\n insetInlineStart: 0,\n display: 'none',\n transform: 'translateY(-50%)',\n transition: `top ${motionDurationSlow} ease-in-out`,\n width: lineWidthBold,\n backgroundColor: colorPrimary,\n [`&${componentCls}-ink-visible`]: {\n display: 'inline-block'\n }\n }\n }\n },\n [`${componentCls}-fixed ${componentCls}-ink ${componentCls}-ink`]: {\n display: 'none'\n }\n }\n };\n};\nconst genSharedAnchorHorizontalStyle = token => {\n const {\n componentCls,\n motionDurationSlow,\n lineWidthBold,\n colorPrimary\n } = token;\n return {\n [`${componentCls}-wrapper-horizontal`]: {\n position: 'relative',\n '&::before': {\n position: 'absolute',\n left: {\n _skip_check_: true,\n value: 0\n },\n right: {\n _skip_check_: true,\n value: 0\n },\n bottom: 0,\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n content: '\" \"'\n },\n [componentCls]: {\n overflowX: 'scroll',\n position: 'relative',\n display: 'flex',\n scrollbarWidth: 'none' /* Firefox */,\n '&::-webkit-scrollbar': {\n display: 'none' /* Safari and Chrome */\n },\n [`${componentCls}-link:first-of-type`]: {\n paddingInline: 0\n },\n [`${componentCls}-ink`]: {\n position: 'absolute',\n bottom: 0,\n transition: `left ${motionDurationSlow} ease-in-out, width ${motionDurationSlow} ease-in-out`,\n height: lineWidthBold,\n backgroundColor: colorPrimary\n }\n }\n }\n };\n};\nconst prepareComponentToken = token => ({\n linkPaddingBlock: token.paddingXXS,\n linkPaddingInlineStart: token.padding\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Anchor', token => {\n const {\n fontSize,\n fontSizeLG,\n paddingXXS,\n calc\n } = token;\n const anchorToken = (0, _internal.mergeToken)(token, {\n holderOffsetBlock: paddingXXS,\n anchorPaddingBlockSecondary: calc(paddingXXS).div(2).equal(),\n anchorTitleBlock: calc(fontSize).div(14).mul(3).equal(),\n anchorBallSize: calc(fontSizeLG).div(2).equal()\n });\n return [genSharedAnchorStyle(anchorToken), genSharedAnchorHorizontalStyle(anchorToken)];\n}, prepareComponentToken);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.AppConfigContext = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst AppConfigContext = exports.AppConfigContext = /*#__PURE__*/_react.default.createContext({});\nconst AppContext = /*#__PURE__*/_react.default.createContext({\n message: {},\n notification: {},\n modal: {}\n});\nvar _default = exports.default = AppContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useMessage = _interopRequireDefault(require(\"../message/useMessage\"));\nvar _useModal = _interopRequireDefault(require(\"../modal/useModal\"));\nvar _useNotification = _interopRequireDefault(require(\"../notification/useNotification\"));\nvar _context = _interopRequireWildcard(require(\"./context\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst useApp = () => _react.default.useContext(_context.default);\nconst App = props => {\n const {\n prefixCls: customizePrefixCls,\n children,\n className,\n rootClassName,\n message,\n notification,\n style,\n component = 'div'\n } = props;\n const {\n direction,\n getPrefixCls\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('app', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const customClassName = (0, _classnames.default)(hashId, prefixCls, className, rootClassName, cssVarCls, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n const appConfig = (0, _react.useContext)(_context.AppConfigContext);\n const mergedAppConfig = _react.default.useMemo(() => ({\n message: Object.assign(Object.assign({}, appConfig.message), message),\n notification: Object.assign(Object.assign({}, appConfig.notification), notification)\n }), [message, notification, appConfig.message, appConfig.notification]);\n const [messageApi, messageContextHolder] = (0, _useMessage.default)(mergedAppConfig.message);\n const [notificationApi, notificationContextHolder] = (0, _useNotification.default)(mergedAppConfig.notification);\n const [ModalApi, ModalContextHolder] = (0, _useModal.default)();\n const memoizedContextValue = _react.default.useMemo(() => ({\n message: messageApi,\n notification: notificationApi,\n modal: ModalApi\n }), [messageApi, notificationApi, ModalApi]);\n // https://github.com/ant-design/ant-design/issues/48802#issuecomment-2097813526\n (0, _warning.devUseWarning)('App')(!(cssVarCls && component === false), 'usage', 'When using cssVar, ensure `component` is assigned a valid React component string.');\n // ============================ Render ============================\n const Component = component === false ? _react.default.Fragment : component;\n const rootProps = {\n className: customClassName,\n style\n };\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(_context.default.Provider, {\n value: memoizedContextValue\n }, /*#__PURE__*/_react.default.createElement(_context.AppConfigContext.Provider, {\n value: mergedAppConfig\n }, /*#__PURE__*/_react.default.createElement(Component, Object.assign({}, component === false ? undefined : rootProps), ModalContextHolder, messageContextHolder, notificationContextHolder, children))));\n};\nif (process.env.NODE_ENV !== 'production') {\n App.displayName = 'App';\n}\nApp.useApp = useApp;\nvar _default = exports.default = App;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n colorText,\n fontSize,\n lineHeight,\n fontFamily\n } = token;\n return {\n [componentCls]: {\n color: colorText,\n fontSize,\n lineHeight,\n fontFamily,\n [`&${componentCls}-rtl`]: {\n direction: 'rtl'\n }\n }\n };\n};\nconst prepareComponentToken = () => ({});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('App', genBaseStyle, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _select = _interopRequireDefault(require(\"../select\"));\nconst {\n Option\n} = _select.default;\nfunction isSelectOptionOrSelectOptGroup(child) {\n return (child === null || child === void 0 ? void 0 : child.type) && (child.type.isSelectOption || child.type.isSelectOptGroup);\n}\nconst AutoComplete = (props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n className,\n popupClassName,\n dropdownClassName,\n children,\n dataSource\n } = props;\n const childNodes = (0, _toArray.default)(children);\n // ============================= Input =============================\n let customizeInput;\n if (childNodes.length === 1 && /*#__PURE__*/React.isValidElement(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {\n [customizeInput] = childNodes;\n }\n const getInputElement = customizeInput ? () => customizeInput : undefined;\n // ============================ Options ============================\n let optionChildren;\n // [Legacy] convert `children` or `dataSource` into option children\n if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {\n optionChildren = children;\n } else {\n optionChildren = dataSource ? dataSource.map(item => {\n if (/*#__PURE__*/React.isValidElement(item)) {\n return item;\n }\n switch (typeof item) {\n case 'string':\n return /*#__PURE__*/React.createElement(Option, {\n key: item,\n value: item\n }, item);\n case 'object':\n {\n const {\n value: optionValue\n } = item;\n return /*#__PURE__*/React.createElement(Option, {\n key: optionValue,\n value: optionValue\n }, item.text);\n }\n default:\n return undefined;\n }\n }) : [];\n }\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('AutoComplete');\n warning.deprecated(!('dataSource' in props), 'dataSource', 'options');\n process.env.NODE_ENV !== \"production\" ? warning(!customizeInput || !('size' in props), 'usage', 'You need to control style self instead of setting `size` when using customize input.') : void 0;\n warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');\n }\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('select', customizePrefixCls);\n // ============================ zIndex ============================\n const [zIndex] = (0, _useZIndex.useZIndex)('SelectLike', (_a = props.dropdownStyle) === null || _a === void 0 ? void 0 : _a.zIndex);\n return /*#__PURE__*/React.createElement(_select.default, Object.assign({\n ref: ref,\n suffixIcon: null\n }, (0, _omit.default)(props, ['dataSource', 'dropdownClassName']), {\n prefixCls: prefixCls,\n popupClassName: popupClassName || dropdownClassName,\n dropdownStyle: Object.assign(Object.assign({}, props.dropdownStyle), {\n zIndex\n }),\n className: (0, _classnames.default)(`${prefixCls}-auto-complete`, className),\n mode: _select.default.SECRET_COMBOBOX_MODE_DO_NOT_USE,\n // Internal api\n getInputElement\n }), optionChildren);\n};\nconst RefAutoComplete = /*#__PURE__*/React.forwardRef(AutoComplete);\n// We don't care debug panel\n/* istanbul ignore next */\nconst PurePanel = (0, _PurePanel.default)(RefAutoComplete);\nRefAutoComplete.Option = Option;\nRefAutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nif (process.env.NODE_ENV !== 'production') {\n RefAutoComplete.displayName = 'AutoComplete';\n}\nvar _default = exports.default = RefAutoComplete;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst AvatarContext = /*#__PURE__*/React.createContext({});\nvar _default = exports.default = AvatarContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcResizeObserver = _interopRequireDefault(require(\"rc-resize-observer\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _responsiveObserver = require(\"../_util/responsiveObserver\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _useBreakpoint = _interopRequireDefault(require(\"../grid/hooks/useBreakpoint\"));\nvar _AvatarContext = _interopRequireDefault(require(\"./AvatarContext\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalAvatar = (props, ref) => {\n const [scale, setScale] = React.useState(1);\n const [mounted, setMounted] = React.useState(false);\n const [isImgExist, setIsImgExist] = React.useState(true);\n const avatarNodeRef = React.useRef(null);\n const avatarChildrenRef = React.useRef(null);\n const avatarNodeMergedRef = (0, _ref.composeRef)(ref, avatarNodeRef);\n const {\n getPrefixCls,\n avatar\n } = React.useContext(_configProvider.ConfigContext);\n const avatarCtx = React.useContext(_AvatarContext.default);\n const setScaleParam = () => {\n if (!avatarChildrenRef.current || !avatarNodeRef.current) {\n return;\n }\n const childrenWidth = avatarChildrenRef.current.offsetWidth; // offsetWidth avoid affecting be transform scale\n const nodeWidth = avatarNodeRef.current.offsetWidth;\n // denominator is 0 is no meaning\n if (childrenWidth !== 0 && nodeWidth !== 0) {\n const {\n gap = 4\n } = props;\n if (gap * 2 < nodeWidth) {\n setScale(nodeWidth - gap * 2 < childrenWidth ? (nodeWidth - gap * 2) / childrenWidth : 1);\n }\n }\n };\n React.useEffect(() => {\n setMounted(true);\n }, []);\n React.useEffect(() => {\n setIsImgExist(true);\n setScale(1);\n }, [props.src]);\n React.useEffect(setScaleParam, [props.gap]);\n const handleImgLoadError = () => {\n const {\n onError\n } = props;\n const errorFlag = onError === null || onError === void 0 ? void 0 : onError();\n if (errorFlag !== false) {\n setIsImgExist(false);\n }\n };\n const {\n prefixCls: customizePrefixCls,\n shape,\n size: customSize,\n src,\n srcSet,\n icon,\n className,\n rootClassName,\n alt,\n draggable,\n children,\n crossOrigin\n } = props,\n others = __rest(props, [\"prefixCls\", \"shape\", \"size\", \"src\", \"srcSet\", \"icon\", \"className\", \"rootClassName\", \"alt\", \"draggable\", \"children\", \"crossOrigin\"]);\n const size = (0, _useSize.default)(ctxSize => {\n var _a, _b;\n return (_b = (_a = customSize !== null && customSize !== void 0 ? customSize : avatarCtx === null || avatarCtx === void 0 ? void 0 : avatarCtx.size) !== null && _a !== void 0 ? _a : ctxSize) !== null && _b !== void 0 ? _b : 'default';\n });\n const needResponsive = Object.keys(typeof size === 'object' ? size || {} : {}).some(key => ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].includes(key));\n const screens = (0, _useBreakpoint.default)(needResponsive);\n const responsiveSizeStyle = React.useMemo(() => {\n if (typeof size !== 'object') {\n return {};\n }\n const currentBreakpoint = _responsiveObserver.responsiveArray.find(screen => screens[screen]);\n const currentSize = size[currentBreakpoint];\n return currentSize ? {\n width: currentSize,\n height: currentSize,\n fontSize: currentSize && (icon || children) ? currentSize / 2 : 18\n } : {};\n }, [screens, size]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Avatar');\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\\`icon\\` is using ReactNode instead of string naming in v4. Please check \\`${icon}\\` at https://ant.design/components/icon`) : void 0;\n }\n const prefixCls = getPrefixCls('avatar', customizePrefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const sizeCls = (0, _classnames.default)({\n [`${prefixCls}-lg`]: size === 'large',\n [`${prefixCls}-sm`]: size === 'small'\n });\n const hasImageElement = /*#__PURE__*/React.isValidElement(src);\n const mergedShape = shape || (avatarCtx === null || avatarCtx === void 0 ? void 0 : avatarCtx.shape) || 'circle';\n const classString = (0, _classnames.default)(prefixCls, sizeCls, avatar === null || avatar === void 0 ? void 0 : avatar.className, `${prefixCls}-${mergedShape}`, {\n [`${prefixCls}-image`]: hasImageElement || src && isImgExist,\n [`${prefixCls}-icon`]: !!icon\n }, cssVarCls, rootCls, className, rootClassName, hashId);\n const sizeStyle = typeof size === 'number' ? {\n width: size,\n height: size,\n fontSize: icon ? size / 2 : 18\n } : {};\n let childrenToRender;\n if (typeof src === 'string' && isImgExist) {\n childrenToRender = /*#__PURE__*/React.createElement(\"img\", {\n src: src,\n draggable: draggable,\n srcSet: srcSet,\n onError: handleImgLoadError,\n alt: alt,\n crossOrigin: crossOrigin\n });\n } else if (hasImageElement) {\n childrenToRender = src;\n } else if (icon) {\n childrenToRender = icon;\n } else if (mounted || scale !== 1) {\n const transformString = `scale(${scale})`;\n const childrenStyle = {\n msTransform: transformString,\n WebkitTransform: transformString,\n transform: transformString\n };\n childrenToRender = /*#__PURE__*/React.createElement(_rcResizeObserver.default, {\n onResize: setScaleParam\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-string`,\n ref: avatarChildrenRef,\n style: Object.assign({}, childrenStyle)\n }, children));\n } else {\n childrenToRender = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-string`,\n style: {\n opacity: 0\n },\n ref: avatarChildrenRef\n }, children);\n }\n // The event is triggered twice from bubbling up the DOM tree.\n // see https://codesandbox.io/s/kind-snow-9lidz\n delete others.onError;\n delete others.gap;\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"span\", Object.assign({}, others, {\n style: Object.assign(Object.assign(Object.assign(Object.assign({}, sizeStyle), responsiveSizeStyle), avatar === null || avatar === void 0 ? void 0 : avatar.style), others.style),\n className: classString,\n ref: avatarNodeMergedRef\n }), childrenToRender));\n};\nconst Avatar = /*#__PURE__*/React.forwardRef(InternalAvatar);\nif (process.env.NODE_ENV !== 'production') {\n Avatar.displayName = 'Avatar';\n}\nvar _default = exports.default = Avatar;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _popover = _interopRequireDefault(require(\"../popover\"));\nvar _avatar = _interopRequireDefault(require(\"./avatar\"));\nvar _AvatarContext = _interopRequireDefault(require(\"./AvatarContext\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst AvatarContextProvider = props => {\n const {\n size,\n shape\n } = React.useContext(_AvatarContext.default);\n const avatarContextValue = React.useMemo(() => ({\n size: props.size || size,\n shape: props.shape || shape\n }), [props.size, props.shape, size, shape]);\n return /*#__PURE__*/React.createElement(_AvatarContext.default.Provider, {\n value: avatarContextValue\n }, props.children);\n};\nconst Group = props => {\n var _a, _b, _c;\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n maxCount,\n maxStyle,\n size,\n shape,\n maxPopoverPlacement,\n maxPopoverTrigger,\n children,\n max\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Avatar.Group');\n warning.deprecated(!maxCount, 'maxCount', 'max={{ count: number }}');\n warning.deprecated(!maxStyle, 'maxStyle', 'max={{ style: CSSProperties }}');\n warning.deprecated(!maxPopoverPlacement, 'maxPopoverPlacement', 'max={{ popover: PopoverProps }}');\n warning.deprecated(!maxPopoverTrigger, 'maxPopoverTrigger', 'max={{ popover: PopoverProps }}');\n }\n const prefixCls = getPrefixCls('avatar', customizePrefixCls);\n const groupPrefixCls = `${prefixCls}-group`;\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const cls = (0, _classnames.default)(groupPrefixCls, {\n [`${groupPrefixCls}-rtl`]: direction === 'rtl'\n }, cssVarCls, rootCls, className, rootClassName, hashId);\n const childrenWithProps = (0, _toArray.default)(children).map((child, index) => (0, _reactNode.cloneElement)(child, {\n key: `avatar-key-${index}`\n }));\n const mergeCount = (max === null || max === void 0 ? void 0 : max.count) || maxCount;\n const numOfChildren = childrenWithProps.length;\n if (mergeCount && mergeCount < numOfChildren) {\n const childrenShow = childrenWithProps.slice(0, mergeCount);\n const childrenHidden = childrenWithProps.slice(mergeCount, numOfChildren);\n const mergeStyle = (max === null || max === void 0 ? void 0 : max.style) || maxStyle;\n const mergePopoverTrigger = ((_a = max === null || max === void 0 ? void 0 : max.popover) === null || _a === void 0 ? void 0 : _a.trigger) || maxPopoverTrigger || 'hover';\n const mergePopoverPlacement = ((_b = max === null || max === void 0 ? void 0 : max.popover) === null || _b === void 0 ? void 0 : _b.placement) || maxPopoverPlacement || 'top';\n const mergeProps = Object.assign(Object.assign({\n content: childrenHidden\n }, max === null || max === void 0 ? void 0 : max.popover), {\n overlayClassName: (0, _classnames.default)(`${groupPrefixCls}-popover`, (_c = max === null || max === void 0 ? void 0 : max.popover) === null || _c === void 0 ? void 0 : _c.overlayClassName),\n placement: mergePopoverPlacement,\n trigger: mergePopoverTrigger\n });\n childrenShow.push(/*#__PURE__*/React.createElement(_popover.default, Object.assign({\n key: \"avatar-popover-key\",\n destroyTooltipOnHide: true\n }, mergeProps), /*#__PURE__*/React.createElement(_avatar.default, {\n style: mergeStyle\n }, `+${numOfChildren - mergeCount}`)));\n return wrapCSSVar(/*#__PURE__*/React.createElement(AvatarContextProvider, {\n shape: shape,\n size: size\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: cls,\n style: style\n }, childrenShow)));\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(AvatarContextProvider, {\n shape: shape,\n size: size\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: cls,\n style: style\n }, childrenWithProps)));\n};\nvar _default = exports.default = Group;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Group\", {\n enumerable: true,\n get: function () {\n return _group.default;\n }\n});\nexports.default = void 0;\nvar _avatar = _interopRequireDefault(require(\"./avatar\"));\nvar _group = _interopRequireDefault(require(\"./group\"));\nconst Avatar = _avatar.default;\nAvatar.Group = _group.default;\nvar _default = exports.default = Avatar;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genBaseStyle = token => {\n const {\n antCls,\n componentCls,\n iconCls,\n avatarBg,\n avatarColor,\n containerSize,\n containerSizeLG,\n containerSizeSM,\n textFontSize,\n textFontSizeLG,\n textFontSizeSM,\n borderRadius,\n borderRadiusLG,\n borderRadiusSM,\n lineWidth,\n lineType\n } = token;\n // Avatar size style\n const avatarSizeStyle = (size, fontSize, radius) => ({\n width: size,\n height: size,\n borderRadius: '50%',\n [`&${componentCls}-square`]: {\n borderRadius: radius\n },\n [`&${componentCls}-icon`]: {\n fontSize,\n [`> ${iconCls}`]: {\n margin: 0\n }\n }\n });\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n display: 'inline-flex',\n justifyContent: 'center',\n alignItems: 'center',\n overflow: 'hidden',\n color: avatarColor,\n whiteSpace: 'nowrap',\n textAlign: 'center',\n verticalAlign: 'middle',\n background: avatarBg,\n border: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} transparent`,\n '&-image': {\n background: 'transparent'\n },\n [`${antCls}-image-img`]: {\n display: 'block'\n }\n }), avatarSizeStyle(containerSize, textFontSize, borderRadius)), {\n '&-lg': Object.assign({}, avatarSizeStyle(containerSizeLG, textFontSizeLG, borderRadiusLG)),\n '&-sm': Object.assign({}, avatarSizeStyle(containerSizeSM, textFontSizeSM, borderRadiusSM)),\n '> img': {\n display: 'block',\n width: '100%',\n height: '100%',\n objectFit: 'cover'\n }\n })\n };\n};\nconst genGroupStyle = token => {\n const {\n componentCls,\n groupBorderColor,\n groupOverlapping,\n groupSpace\n } = token;\n return {\n [`${componentCls}-group`]: {\n display: 'inline-flex',\n [componentCls]: {\n borderColor: groupBorderColor\n },\n '> *:not(:first-child)': {\n marginInlineStart: groupOverlapping\n }\n },\n [`${componentCls}-group-popover`]: {\n [`${componentCls} + ${componentCls}`]: {\n marginInlineStart: groupSpace\n }\n }\n };\n};\nconst prepareComponentToken = token => {\n const {\n controlHeight,\n controlHeightLG,\n controlHeightSM,\n fontSize,\n fontSizeLG,\n fontSizeXL,\n fontSizeHeading3,\n marginXS,\n marginXXS,\n colorBorderBg\n } = token;\n return {\n containerSize: controlHeight,\n containerSizeLG: controlHeightLG,\n containerSizeSM: controlHeightSM,\n textFontSize: Math.round((fontSizeLG + fontSizeXL) / 2),\n textFontSizeLG: fontSizeHeading3,\n textFontSizeSM: fontSize,\n groupSpace: marginXXS,\n groupOverlapping: -marginXS,\n groupBorderColor: colorBorderBg\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Avatar', token => {\n const {\n colorTextLightSolid,\n colorTextPlaceholder\n } = token;\n const avatarToken = (0, _internal.mergeToken)(token, {\n avatarBg: colorTextPlaceholder,\n avatarColor: colorTextLightSolid\n });\n return [genBaseStyle(avatarToken), genGroupStyle(avatarToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _VerticalAlignTopOutlined = _interopRequireDefault(require(\"@ant-design/icons/VerticalAlignTopOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireDefault(require(\"rc-motion\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _getScroll = _interopRequireDefault(require(\"../_util/getScroll\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _scrollTo = _interopRequireDefault(require(\"../_util/scrollTo\"));\nvar _throttleByAnimationFrame = _interopRequireDefault(require(\"../_util/throttleByAnimationFrame\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst BackTop = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n visibilityHeight = 400,\n target,\n onClick,\n duration = 450\n } = props;\n const [visible, setVisible] = React.useState(visibilityHeight === 0);\n const ref = React.useRef(null);\n const getDefaultTarget = () => {\n var _a;\n return ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window;\n };\n const handleScroll = (0, _throttleByAnimationFrame.default)(e => {\n const scrollTop = (0, _getScroll.default)(e.target);\n setVisible(scrollTop >= visibilityHeight);\n });\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('BackTop');\n warning.deprecated(false, 'BackTop', 'FloatButton.BackTop');\n }\n React.useEffect(() => {\n const getTarget = target || getDefaultTarget;\n const container = getTarget();\n handleScroll({\n target: container\n });\n container === null || container === void 0 ? void 0 : container.addEventListener('scroll', handleScroll);\n return () => {\n handleScroll.cancel();\n container === null || container === void 0 ? void 0 : container.removeEventListener('scroll', handleScroll);\n };\n }, [target]);\n const scrollToTop = e => {\n (0, _scrollTo.default)(0, {\n getContainer: target || getDefaultTarget,\n duration\n });\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n };\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('back-top', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const classString = (0, _classnames.default)(hashId, cssVarCls, prefixCls, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName);\n // fix https://fb.me/react-unknown-prop\n const divProps = (0, _omit.default)(props, ['prefixCls', 'className', 'rootClassName', 'children', 'visibilityHeight', 'target']);\n const defaultElement = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-content`\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-icon`\n }, /*#__PURE__*/React.createElement(_VerticalAlignTopOutlined.default, null)));\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({}, divProps, {\n className: classString,\n onClick: scrollToTop,\n ref: ref\n }), /*#__PURE__*/React.createElement(_rcMotion.default, {\n visible: visible,\n motionName: `${rootPrefixCls}-fade`\n }, _ref => {\n let {\n className: motionClassName\n } = _ref;\n return (0, _reactNode.cloneElement)(props.children || defaultElement, _ref2 => {\n let {\n className: cloneCls\n } = _ref2;\n return {\n className: (0, _classnames.default)(motionClassName, cloneCls)\n };\n });\n })));\n};\nif (process.env.NODE_ENV !== 'production') {\n BackTop.displayName = 'BackTop';\n}\nvar _default = exports.default = BackTop;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Shared ==============================\nconst genSharedBackTopStyle = token => {\n const {\n componentCls,\n backTopFontSize,\n backTopSize,\n zIndexPopup\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'fixed',\n insetInlineEnd: token.backTopInlineEnd,\n insetBlockEnd: token.backTopBlockEnd,\n zIndex: zIndexPopup,\n width: 40,\n height: 40,\n cursor: 'pointer',\n '&:empty': {\n display: 'none'\n },\n [`${componentCls}-content`]: {\n width: backTopSize,\n height: backTopSize,\n overflow: 'hidden',\n color: token.backTopColor,\n textAlign: 'center',\n backgroundColor: token.backTopBackground,\n borderRadius: backTopSize,\n transition: `all ${token.motionDurationMid}`,\n '&:hover': {\n backgroundColor: token.backTopHoverBackground,\n transition: `all ${token.motionDurationMid}`\n }\n },\n // change to .backtop .backtop-icon\n [`${componentCls}-icon`]: {\n fontSize: backTopFontSize,\n lineHeight: (0, _cssinjs.unit)(backTopSize)\n }\n })\n };\n};\nconst genMediaBackTopStyle = token => {\n const {\n componentCls,\n screenMD,\n screenXS,\n backTopInlineEndMD,\n backTopInlineEndXS\n } = token;\n return {\n [`@media (max-width: ${(0, _cssinjs.unit)(screenMD)})`]: {\n [componentCls]: {\n insetInlineEnd: backTopInlineEndMD\n }\n },\n [`@media (max-width: ${(0, _cssinjs.unit)(screenXS)})`]: {\n [componentCls]: {\n insetInlineEnd: backTopInlineEndXS\n }\n }\n };\n};\nconst prepareComponentToken = token => ({\n zIndexPopup: token.zIndexBase + 10\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('BackTop', token => {\n const {\n fontSizeHeading3,\n colorTextDescription,\n colorTextLightSolid,\n colorText,\n controlHeightLG,\n calc\n } = token;\n const backTopToken = (0, _internal.mergeToken)(token, {\n backTopBackground: colorTextDescription,\n backTopColor: colorTextLightSolid,\n backTopHoverBackground: colorText,\n backTopFontSize: fontSizeHeading3,\n backTopSize: controlHeightLG,\n backTopBlockEnd: calc(controlHeightLG).mul(1.25).equal(),\n backTopInlineEnd: calc(controlHeightLG).mul(2.5).equal(),\n backTopInlineEndMD: calc(controlHeightLG).mul(1.5).equal(),\n backTopInlineEndXS: calc(controlHeightLG).mul(0.5).equal()\n });\n return [genSharedBackTopStyle(backTopToken), genMediaBackTopStyle(backTopToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _colors = require(\"../_util/colors\");\nvar _configProvider = require(\"../config-provider\");\nvar _ribbon = _interopRequireDefault(require(\"./style/ribbon\"));\nconst Ribbon = props => {\n const {\n className,\n prefixCls: customizePrefixCls,\n style,\n color,\n children,\n text,\n placement = 'end',\n rootClassName\n } = props;\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('ribbon', customizePrefixCls);\n const wrapperCls = `${prefixCls}-wrapper`;\n const [wrapCSSVar, hashId, cssVarCls] = (0, _ribbon.default)(prefixCls, wrapperCls);\n const colorInPreset = (0, _colors.isPresetColor)(color, false);\n const ribbonCls = (0, _classnames.default)(prefixCls, `${prefixCls}-placement-${placement}`, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-color-${color}`]: colorInPreset\n }, className);\n const colorStyle = {};\n const cornerColorStyle = {};\n if (color && !colorInPreset) {\n colorStyle.background = color;\n cornerColorStyle.color = color;\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(wrapperCls, rootClassName, hashId, cssVarCls)\n }, children, /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(ribbonCls, hashId),\n style: Object.assign(Object.assign({}, colorStyle), style)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-text`\n }, text), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-corner`,\n style: cornerColorStyle\n }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Ribbon.displayName = 'Ribbon';\n}\nvar _default = exports.default = Ribbon;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _configProvider = require(\"../config-provider\");\nvar _SingleNumber = _interopRequireDefault(require(\"./SingleNumber\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst ScrollNumber = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n count,\n className,\n motionClassName,\n style,\n title,\n show,\n component: Component = 'sup',\n children\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"count\", \"className\", \"motionClassName\", \"style\", \"title\", \"show\", \"component\", \"children\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);\n // ============================ Render ============================\n const newProps = Object.assign(Object.assign({}, restProps), {\n 'data-show': show,\n style,\n className: (0, _classnames.default)(prefixCls, className, motionClassName),\n title: title\n });\n // Only integer need motion\n let numberNodes = count;\n if (count && Number(count) % 1 === 0) {\n const numberList = String(count).split('');\n numberNodes = /*#__PURE__*/React.createElement(\"bdi\", null, numberList.map((num, i) => (/*#__PURE__*/React.createElement(_SingleNumber.default, {\n prefixCls: prefixCls,\n count: Number(count),\n value: num,\n // eslint-disable-next-line react/no-array-index-key\n key: numberList.length - i\n }))));\n }\n // allow specify the border\n // mock border-color by box-shadow for compatible with old usage:\n // \n if (style === null || style === void 0 ? void 0 : style.borderColor) {\n newProps.style = Object.assign(Object.assign({}, style), {\n boxShadow: `0 0 0 1px ${style.borderColor} inset`\n });\n }\n if (children) {\n return (0, _reactNode.cloneElement)(children, oriProps => ({\n className: (0, _classnames.default)(`${prefixCls}-custom-component`, oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)\n }));\n }\n return /*#__PURE__*/React.createElement(Component, Object.assign({}, newProps, {\n ref: ref\n }), numberNodes);\n});\nvar _default = exports.default = ScrollNumber;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst UnitNumber = props => {\n const {\n prefixCls,\n value,\n current,\n offset = 0\n } = props;\n let style;\n if (offset) {\n style = {\n position: 'absolute',\n top: `${offset}00%`,\n left: 0\n };\n }\n return /*#__PURE__*/React.createElement(\"span\", {\n style: style,\n className: (0, _classnames.default)(`${prefixCls}-only-unit`, {\n current\n })\n }, value);\n};\nfunction getOffset(start, end, unit) {\n let index = start;\n let offset = 0;\n while ((index + 10) % 10 !== end) {\n index += unit;\n offset += unit;\n }\n return offset;\n}\nconst SingleNumber = props => {\n const {\n prefixCls,\n count: originCount,\n value: originValue\n } = props;\n const value = Number(originValue);\n const count = Math.abs(originCount);\n const [prevValue, setPrevValue] = React.useState(value);\n const [prevCount, setPrevCount] = React.useState(count);\n // ============================= Events =============================\n const onTransitionEnd = () => {\n setPrevValue(value);\n setPrevCount(count);\n };\n // Fallback if transition events are not supported\n React.useEffect(() => {\n const timer = setTimeout(onTransitionEnd, 1000);\n return () => clearTimeout(timer);\n }, [value]);\n // ============================= Render =============================\n // Render unit list\n let unitNodes;\n let offsetStyle;\n if (prevValue === value || Number.isNaN(value) || Number.isNaN(prevValue)) {\n // Nothing to change\n unitNodes = [/*#__PURE__*/React.createElement(UnitNumber, Object.assign({}, props, {\n key: value,\n current: true\n }))];\n offsetStyle = {\n transition: 'none'\n };\n } else {\n unitNodes = [];\n // Fill basic number units\n const end = value + 10;\n const unitNumberList = [];\n for (let index = value; index <= end; index += 1) {\n unitNumberList.push(index);\n }\n // Fill with number unit nodes\n const prevIndex = unitNumberList.findIndex(n => n % 10 === prevValue);\n unitNodes = unitNumberList.map((n, index) => {\n const singleUnit = n % 10;\n return /*#__PURE__*/React.createElement(UnitNumber, Object.assign({}, props, {\n key: n,\n value: singleUnit,\n offset: index - prevIndex,\n current: index === prevIndex\n }));\n });\n // Calculate container offset value\n const unit = prevCount < count ? 1 : -1;\n offsetStyle = {\n transform: `translateY(${-getOffset(prevValue, value, unit)}00%)`\n };\n }\n return /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-only`,\n style: offsetStyle,\n onTransitionEnd: onTransitionEnd\n }, unitNodes);\n};\nvar _default = exports.default = SingleNumber;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireDefault(require(\"rc-motion\"));\nvar _colors = require(\"../_util/colors\");\nvar _reactNode = require(\"../_util/reactNode\");\nvar _configProvider = require(\"../config-provider\");\nvar _Ribbon = _interopRequireDefault(require(\"./Ribbon\"));\nvar _ScrollNumber = _interopRequireDefault(require(\"./ScrollNumber\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalBadge = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _a, _b, _c, _d, _e;\n const {\n prefixCls: customizePrefixCls,\n scrollNumberPrefixCls: customizeScrollNumberPrefixCls,\n children,\n status,\n text,\n color,\n count = null,\n overflowCount = 99,\n dot = false,\n size = 'default',\n title,\n offset,\n style,\n className,\n rootClassName,\n classNames,\n styles,\n showZero = false\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"scrollNumberPrefixCls\", \"children\", \"status\", \"text\", \"color\", \"count\", \"overflowCount\", \"dot\", \"size\", \"title\", \"offset\", \"style\", \"className\", \"rootClassName\", \"classNames\", \"styles\", \"showZero\"]);\n const {\n getPrefixCls,\n direction,\n badge\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('badge', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n // ================================ Misc ================================\n const numberedDisplayCount = count > overflowCount ? `${overflowCount}+` : count;\n const isZero = numberedDisplayCount === '0' || numberedDisplayCount === 0;\n const ignoreCount = count === null || isZero && !showZero;\n const hasStatus = (status !== null && status !== undefined || color !== null && color !== undefined) && ignoreCount;\n const showAsDot = dot && !isZero;\n const mergedCount = showAsDot ? '' : numberedDisplayCount;\n const isHidden = (0, _react.useMemo)(() => {\n const isEmpty = mergedCount === null || mergedCount === undefined || mergedCount === '';\n return (isEmpty || isZero && !showZero) && !showAsDot;\n }, [mergedCount, isZero, showZero, showAsDot]);\n // Count should be cache in case hidden change it\n const countRef = (0, _react.useRef)(count);\n if (!isHidden) {\n countRef.current = count;\n }\n const livingCount = countRef.current;\n // We need cache count since remove motion should not change count display\n const displayCountRef = (0, _react.useRef)(mergedCount);\n if (!isHidden) {\n displayCountRef.current = mergedCount;\n }\n const displayCount = displayCountRef.current;\n // We will cache the dot status to avoid shaking on leaved motion\n const isDotRef = (0, _react.useRef)(showAsDot);\n if (!isHidden) {\n isDotRef.current = showAsDot;\n }\n // =============================== Styles ===============================\n const mergedStyle = (0, _react.useMemo)(() => {\n if (!offset) {\n return Object.assign(Object.assign({}, badge === null || badge === void 0 ? void 0 : badge.style), style);\n }\n const offsetStyle = {\n marginTop: offset[1]\n };\n if (direction === 'rtl') {\n offsetStyle.left = parseInt(offset[0], 10);\n } else {\n offsetStyle.right = -parseInt(offset[0], 10);\n }\n return Object.assign(Object.assign(Object.assign({}, offsetStyle), badge === null || badge === void 0 ? void 0 : badge.style), style);\n }, [direction, offset, style, badge === null || badge === void 0 ? void 0 : badge.style]);\n // =============================== Render ===============================\n // >>> Title\n const titleNode = title !== null && title !== void 0 ? title : typeof livingCount === 'string' || typeof livingCount === 'number' ? livingCount : undefined;\n // >>> Status Text\n const statusTextNode = isHidden || !text ? null : /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-status-text`\n }, text);\n // >>> Display Component\n const displayNode = !livingCount || typeof livingCount !== 'object' ? undefined : (0, _reactNode.cloneElement)(livingCount, oriProps => ({\n style: Object.assign(Object.assign({}, mergedStyle), oriProps.style)\n }));\n // InternalColor\n const isInternalColor = (0, _colors.isPresetColor)(color, false);\n // Shared styles\n const statusCls = (0, _classnames.default)(classNames === null || classNames === void 0 ? void 0 : classNames.indicator, (_a = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _a === void 0 ? void 0 : _a.indicator, {\n [`${prefixCls}-status-dot`]: hasStatus,\n [`${prefixCls}-status-${status}`]: !!status,\n [`${prefixCls}-color-${color}`]: isInternalColor\n });\n const statusStyle = {};\n if (color && !isInternalColor) {\n statusStyle.color = color;\n statusStyle.background = color;\n }\n const badgeClassName = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-status`]: hasStatus,\n [`${prefixCls}-not-a-wrapper`]: !children,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, badge === null || badge === void 0 ? void 0 : badge.className, (_b = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _b === void 0 ? void 0 : _b.root, classNames === null || classNames === void 0 ? void 0 : classNames.root, hashId, cssVarCls);\n // \n if (!children && hasStatus) {\n const statusTextColor = mergedStyle.color;\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"span\", Object.assign({}, restProps, {\n className: badgeClassName,\n style: Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.root), (_c = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _c === void 0 ? void 0 : _c.root), mergedStyle)\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: statusCls,\n style: Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.indicator), (_d = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _d === void 0 ? void 0 : _d.indicator), statusStyle)\n }), text && (/*#__PURE__*/React.createElement(\"span\", {\n style: {\n color: statusTextColor\n },\n className: `${prefixCls}-status-text`\n }, text))));\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"span\", Object.assign({\n ref: ref\n }, restProps, {\n className: badgeClassName,\n style: Object.assign(Object.assign({}, (_e = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _e === void 0 ? void 0 : _e.root), styles === null || styles === void 0 ? void 0 : styles.root)\n }), children, /*#__PURE__*/React.createElement(_rcMotion.default, {\n visible: !isHidden,\n motionName: `${prefixCls}-zoom`,\n motionAppear: false,\n motionDeadline: 1000\n }, _ref => {\n let {\n className: motionClassName\n } = _ref;\n var _a, _b;\n const scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls);\n const isDot = isDotRef.current;\n const scrollNumberCls = (0, _classnames.default)(classNames === null || classNames === void 0 ? void 0 : classNames.indicator, (_a = badge === null || badge === void 0 ? void 0 : badge.classNames) === null || _a === void 0 ? void 0 : _a.indicator, {\n [`${prefixCls}-dot`]: isDot,\n [`${prefixCls}-count`]: !isDot,\n [`${prefixCls}-count-sm`]: size === 'small',\n [`${prefixCls}-multiple-words`]: !isDot && displayCount && displayCount.toString().length > 1,\n [`${prefixCls}-status-${status}`]: !!status,\n [`${prefixCls}-color-${color}`]: isInternalColor\n });\n let scrollNumberStyle = Object.assign(Object.assign(Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.indicator), (_b = badge === null || badge === void 0 ? void 0 : badge.styles) === null || _b === void 0 ? void 0 : _b.indicator), mergedStyle);\n if (color && !isInternalColor) {\n scrollNumberStyle = scrollNumberStyle || {};\n scrollNumberStyle.background = color;\n }\n return /*#__PURE__*/React.createElement(_ScrollNumber.default, {\n prefixCls: scrollNumberPrefixCls,\n show: !isHidden,\n motionClassName: motionClassName,\n className: scrollNumberCls,\n count: displayCount,\n title: titleNode,\n style: scrollNumberStyle,\n key: \"scrollNumber\"\n }, displayNode);\n }), statusTextNode));\n});\nconst Badge = InternalBadge;\nBadge.Ribbon = _Ribbon.default;\nif (process.env.NODE_ENV !== 'production') {\n Badge.displayName = 'Badge';\n}\nvar _default = exports.default = Badge;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareToken = exports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst antStatusProcessing = new _cssinjs.Keyframes('antStatusProcessing', {\n '0%': {\n transform: 'scale(0.8)',\n opacity: 0.5\n },\n '100%': {\n transform: 'scale(2.4)',\n opacity: 0\n }\n});\nconst antZoomBadgeIn = new _cssinjs.Keyframes('antZoomBadgeIn', {\n '0%': {\n transform: 'scale(0) translate(50%, -50%)',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1) translate(50%, -50%)'\n }\n});\nconst antZoomBadgeOut = new _cssinjs.Keyframes('antZoomBadgeOut', {\n '0%': {\n transform: 'scale(1) translate(50%, -50%)'\n },\n '100%': {\n transform: 'scale(0) translate(50%, -50%)',\n opacity: 0\n }\n});\nconst antNoWrapperZoomBadgeIn = new _cssinjs.Keyframes('antNoWrapperZoomBadgeIn', {\n '0%': {\n transform: 'scale(0)',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)'\n }\n});\nconst antNoWrapperZoomBadgeOut = new _cssinjs.Keyframes('antNoWrapperZoomBadgeOut', {\n '0%': {\n transform: 'scale(1)'\n },\n '100%': {\n transform: 'scale(0)',\n opacity: 0\n }\n});\nconst antBadgeLoadingCircle = new _cssinjs.Keyframes('antBadgeLoadingCircle', {\n '0%': {\n transformOrigin: '50%'\n },\n '100%': {\n transform: 'translate(50%, -50%) rotate(360deg)',\n transformOrigin: '50%'\n }\n});\nconst genSharedBadgeStyle = token => {\n const {\n componentCls,\n iconCls,\n antCls,\n badgeShadowSize,\n textFontSize,\n textFontSizeSM,\n statusSize,\n dotSize,\n textFontWeight,\n indicatorHeight,\n indicatorHeightSM,\n marginXS,\n calc\n } = token;\n const numberPrefixCls = `${antCls}-scroll-number`;\n const colorPreset = (0, _internal.genPresetColor)(token, (colorKey, _ref) => {\n let {\n darkColor\n } = _ref;\n return {\n [`&${componentCls} ${componentCls}-color-${colorKey}`]: {\n background: darkColor,\n [`&:not(${componentCls}-count)`]: {\n color: darkColor\n },\n 'a:hover &': {\n background: darkColor\n }\n }\n };\n });\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n display: 'inline-block',\n width: 'fit-content',\n lineHeight: 1,\n [`${componentCls}-count`]: {\n display: 'inline-flex',\n justifyContent: 'center',\n zIndex: token.indicatorZIndex,\n minWidth: indicatorHeight,\n height: indicatorHeight,\n color: token.badgeTextColor,\n fontWeight: textFontWeight,\n fontSize: textFontSize,\n lineHeight: (0, _cssinjs.unit)(indicatorHeight),\n whiteSpace: 'nowrap',\n textAlign: 'center',\n background: token.badgeColor,\n borderRadius: calc(indicatorHeight).div(2).equal(),\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(badgeShadowSize)} ${token.badgeShadowColor}`,\n transition: `background ${token.motionDurationMid}`,\n a: {\n color: token.badgeTextColor\n },\n 'a:hover': {\n color: token.badgeTextColor\n },\n 'a:hover &': {\n background: token.badgeColorHover\n }\n },\n [`${componentCls}-count-sm`]: {\n minWidth: indicatorHeightSM,\n height: indicatorHeightSM,\n fontSize: textFontSizeSM,\n lineHeight: (0, _cssinjs.unit)(indicatorHeightSM),\n borderRadius: calc(indicatorHeightSM).div(2).equal()\n },\n [`${componentCls}-multiple-words`]: {\n padding: `0 ${(0, _cssinjs.unit)(token.paddingXS)}`,\n bdi: {\n unicodeBidi: 'plaintext'\n }\n },\n [`${componentCls}-dot`]: {\n zIndex: token.indicatorZIndex,\n width: dotSize,\n minWidth: dotSize,\n height: dotSize,\n background: token.badgeColor,\n borderRadius: '100%',\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(badgeShadowSize)} ${token.badgeShadowColor}`\n },\n [`${componentCls}-count, ${componentCls}-dot, ${numberPrefixCls}-custom-component`]: {\n position: 'absolute',\n top: 0,\n insetInlineEnd: 0,\n transform: 'translate(50%, -50%)',\n transformOrigin: '100% 0%',\n [`&${iconCls}-spin`]: {\n animationName: antBadgeLoadingCircle,\n animationDuration: '1s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear'\n }\n },\n [`&${componentCls}-status`]: {\n lineHeight: 'inherit',\n verticalAlign: 'baseline',\n [`${componentCls}-status-dot`]: {\n position: 'relative',\n top: -1,\n // Magic number, but seems better experience\n display: 'inline-block',\n width: statusSize,\n height: statusSize,\n verticalAlign: 'middle',\n borderRadius: '50%'\n },\n [`${componentCls}-status-success`]: {\n backgroundColor: token.colorSuccess\n },\n [`${componentCls}-status-processing`]: {\n overflow: 'visible',\n color: token.colorInfo,\n backgroundColor: token.colorInfo,\n borderColor: 'currentcolor',\n '&::after': {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n width: '100%',\n height: '100%',\n borderWidth: badgeShadowSize,\n borderStyle: 'solid',\n borderColor: 'inherit',\n borderRadius: '50%',\n animationName: antStatusProcessing,\n animationDuration: token.badgeProcessingDuration,\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n content: '\"\"'\n }\n },\n [`${componentCls}-status-default`]: {\n backgroundColor: token.colorTextPlaceholder\n },\n [`${componentCls}-status-error`]: {\n backgroundColor: token.colorError\n },\n [`${componentCls}-status-warning`]: {\n backgroundColor: token.colorWarning\n },\n [`${componentCls}-status-text`]: {\n marginInlineStart: marginXS,\n color: token.colorText,\n fontSize: token.fontSize\n }\n }\n }), colorPreset), {\n [`${componentCls}-zoom-appear, ${componentCls}-zoom-enter`]: {\n animationName: antZoomBadgeIn,\n animationDuration: token.motionDurationSlow,\n animationTimingFunction: token.motionEaseOutBack,\n animationFillMode: 'both'\n },\n [`${componentCls}-zoom-leave`]: {\n animationName: antZoomBadgeOut,\n animationDuration: token.motionDurationSlow,\n animationTimingFunction: token.motionEaseOutBack,\n animationFillMode: 'both'\n },\n [`&${componentCls}-not-a-wrapper`]: {\n [`${componentCls}-zoom-appear, ${componentCls}-zoom-enter`]: {\n animationName: antNoWrapperZoomBadgeIn,\n animationDuration: token.motionDurationSlow,\n animationTimingFunction: token.motionEaseOutBack\n },\n [`${componentCls}-zoom-leave`]: {\n animationName: antNoWrapperZoomBadgeOut,\n animationDuration: token.motionDurationSlow,\n animationTimingFunction: token.motionEaseOutBack\n },\n [`&:not(${componentCls}-status)`]: {\n verticalAlign: 'middle'\n },\n [`${numberPrefixCls}-custom-component, ${componentCls}-count`]: {\n transform: 'none'\n },\n [`${numberPrefixCls}-custom-component, ${numberPrefixCls}`]: {\n position: 'relative',\n top: 'auto',\n display: 'block',\n transformOrigin: '50% 50%'\n }\n },\n [numberPrefixCls]: {\n overflow: 'hidden',\n transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack}`,\n [`${numberPrefixCls}-only`]: {\n position: 'relative',\n display: 'inline-block',\n height: indicatorHeight,\n transition: `all ${token.motionDurationSlow} ${token.motionEaseOutBack}`,\n WebkitTransformStyle: 'preserve-3d',\n WebkitBackfaceVisibility: 'hidden',\n [`> p${numberPrefixCls}-only-unit`]: {\n height: indicatorHeight,\n margin: 0,\n WebkitTransformStyle: 'preserve-3d',\n WebkitBackfaceVisibility: 'hidden'\n }\n },\n [`${numberPrefixCls}-symbol`]: {\n verticalAlign: 'top'\n }\n },\n // ====================== RTL =======================\n '&-rtl': {\n direction: 'rtl',\n [`${componentCls}-count, ${componentCls}-dot, ${numberPrefixCls}-custom-component`]: {\n transform: 'translate(-50%, -50%)'\n }\n }\n })\n };\n};\n// ============================== Export ==============================\nconst prepareToken = token => {\n const {\n fontHeight,\n lineWidth,\n marginXS,\n colorBorderBg\n } = token;\n const badgeFontHeight = fontHeight;\n const badgeShadowSize = lineWidth;\n const badgeTextColor = token.colorTextLightSolid;\n const badgeColor = token.colorError;\n const badgeColorHover = token.colorErrorHover;\n const badgeToken = (0, _internal.mergeToken)(token, {\n badgeFontHeight,\n badgeShadowSize,\n badgeTextColor,\n badgeColor,\n badgeColorHover,\n badgeShadowColor: colorBorderBg,\n badgeProcessingDuration: '1.2s',\n badgeRibbonOffset: marginXS,\n // Follow token just by Design. Not related with token\n badgeRibbonCornerTransform: 'scaleY(0.75)',\n badgeRibbonCornerFilter: `brightness(75%)`\n });\n return badgeToken;\n};\nexports.prepareToken = prepareToken;\nconst prepareComponentToken = token => {\n const {\n fontSize,\n lineHeight,\n fontSizeSM,\n lineWidth\n } = token;\n return {\n indicatorZIndex: 'auto',\n indicatorHeight: Math.round(fontSize * lineHeight) - 2 * lineWidth,\n indicatorHeightSM: fontSize,\n dotSize: fontSizeSM / 2,\n textFontSize: fontSizeSM,\n textFontSizeSM: fontSizeSM,\n textFontWeight: 'normal',\n statusSize: fontSizeSM / 2\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Badge', token => {\n const badgeToken = prepareToken(token);\n return genSharedBadgeStyle(badgeToken);\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _ = require(\".\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Ribbon ==============================\nconst genRibbonStyle = token => {\n const {\n antCls,\n badgeFontHeight,\n marginXS,\n badgeRibbonOffset,\n calc\n } = token;\n const ribbonPrefixCls = `${antCls}-ribbon`;\n const ribbonWrapperPrefixCls = `${antCls}-ribbon-wrapper`;\n const statusRibbonPreset = (0, _internal.genPresetColor)(token, (colorKey, _ref) => {\n let {\n darkColor\n } = _ref;\n return {\n [`&${ribbonPrefixCls}-color-${colorKey}`]: {\n background: darkColor,\n color: darkColor\n }\n };\n });\n return {\n [ribbonWrapperPrefixCls]: {\n position: 'relative'\n },\n [ribbonPrefixCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'absolute',\n top: marginXS,\n padding: `0 ${(0, _cssinjs.unit)(token.paddingXS)}`,\n color: token.colorPrimary,\n lineHeight: (0, _cssinjs.unit)(badgeFontHeight),\n whiteSpace: 'nowrap',\n backgroundColor: token.colorPrimary,\n borderRadius: token.borderRadiusSM,\n [`${ribbonPrefixCls}-text`]: {\n color: token.badgeTextColor\n },\n [`${ribbonPrefixCls}-corner`]: {\n position: 'absolute',\n top: '100%',\n width: badgeRibbonOffset,\n height: badgeRibbonOffset,\n color: 'currentcolor',\n border: `${(0, _cssinjs.unit)(calc(badgeRibbonOffset).div(2).equal())} solid`,\n transform: token.badgeRibbonCornerTransform,\n transformOrigin: 'top',\n filter: token.badgeRibbonCornerFilter\n }\n }), statusRibbonPreset), {\n [`&${ribbonPrefixCls}-placement-end`]: {\n insetInlineEnd: calc(badgeRibbonOffset).mul(-1).equal(),\n borderEndEndRadius: 0,\n [`${ribbonPrefixCls}-corner`]: {\n insetInlineEnd: 0,\n borderInlineEndColor: 'transparent',\n borderBlockEndColor: 'transparent'\n }\n },\n [`&${ribbonPrefixCls}-placement-start`]: {\n insetInlineStart: calc(badgeRibbonOffset).mul(-1).equal(),\n borderEndStartRadius: 0,\n [`${ribbonPrefixCls}-corner`]: {\n insetInlineStart: 0,\n borderBlockEndColor: 'transparent',\n borderInlineStartColor: 'transparent'\n }\n },\n // ====================== RTL =======================\n '&-rtl': {\n direction: 'rtl'\n }\n })\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genStyleHooks)(['Badge', 'Ribbon'], token => {\n const badgeToken = (0, _.prepareToken)(token);\n return genRibbonStyle(badgeToken);\n}, _.prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _pickAttrs = _interopRequireDefault(require(\"rc-util/lib/pickAttrs\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _BreadcrumbItem = _interopRequireWildcard(require(\"./BreadcrumbItem\"));\nvar _BreadcrumbSeparator = _interopRequireDefault(require(\"./BreadcrumbSeparator\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _useItemRender = _interopRequireDefault(require(\"./useItemRender\"));\nvar _useItems = _interopRequireDefault(require(\"./useItems\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst getPath = (params, path) => {\n if (path === undefined) {\n return path;\n }\n let mergedPath = (path || '').replace(/^\\//, '');\n Object.keys(params).forEach(key => {\n mergedPath = mergedPath.replace(`:${key}`, params[key]);\n });\n return mergedPath;\n};\nconst Breadcrumb = props => {\n const {\n prefixCls: customizePrefixCls,\n separator = '/',\n style,\n className,\n rootClassName,\n routes: legacyRoutes,\n items,\n children,\n itemRender,\n params = {}\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"separator\", \"style\", \"className\", \"rootClassName\", \"routes\", \"items\", \"children\", \"itemRender\", \"params\"]);\n const {\n getPrefixCls,\n direction,\n breadcrumb\n } = React.useContext(_configProvider.ConfigContext);\n let crumbs;\n const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const mergedItems = (0, _useItems.default)(items, legacyRoutes);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Breadcrumb');\n warning.deprecated(!legacyRoutes, 'routes', 'items');\n // Deprecated warning for breadcrumb children\n if (!mergedItems || mergedItems.length === 0) {\n const childList = (0, _toArray.default)(children);\n warning.deprecated(childList.length === 0, 'Breadcrumb.Item and Breadcrumb.Separator', 'items');\n childList.forEach(element => {\n if (element) {\n process.env.NODE_ENV !== \"production\" ? warning(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'usage', \"Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children\") : void 0;\n }\n });\n }\n }\n const mergedItemRender = (0, _useItemRender.default)(prefixCls, itemRender);\n if (mergedItems && mergedItems.length > 0) {\n // generated by route\n const paths = [];\n const itemRenderRoutes = items || legacyRoutes;\n crumbs = mergedItems.map((item, index) => {\n const {\n path,\n key,\n type,\n menu,\n overlay,\n onClick,\n className: itemClassName,\n separator: itemSeparator,\n dropdownProps\n } = item;\n const mergedPath = getPath(params, path);\n if (mergedPath !== undefined) {\n paths.push(mergedPath);\n }\n const mergedKey = key !== null && key !== void 0 ? key : index;\n if (type === 'separator') {\n return /*#__PURE__*/React.createElement(_BreadcrumbSeparator.default, {\n key: mergedKey\n }, itemSeparator);\n }\n const itemProps = {};\n const isLastItem = index === mergedItems.length - 1;\n if (menu) {\n itemProps.menu = menu;\n } else if (overlay) {\n itemProps.overlay = overlay;\n }\n let {\n href\n } = item;\n if (paths.length && mergedPath !== undefined) {\n href = `#/${paths.join('/')}`;\n }\n return /*#__PURE__*/React.createElement(_BreadcrumbItem.InternalBreadcrumbItem, Object.assign({\n key: mergedKey\n }, itemProps, (0, _pickAttrs.default)(item, {\n data: true,\n aria: true\n }), {\n className: itemClassName,\n dropdownProps: dropdownProps,\n href: href,\n separator: isLastItem ? '' : separator,\n onClick: onClick,\n prefixCls: prefixCls\n }), mergedItemRender(item, params, itemRenderRoutes, paths, href));\n });\n } else if (children) {\n const childrenLength = (0, _toArray.default)(children).length;\n crumbs = (0, _toArray.default)(children).map((element, index) => {\n if (!element) {\n return element;\n }\n const isLastItem = index === childrenLength - 1;\n return (0, _reactNode.cloneElement)(element, {\n separator: isLastItem ? '' : separator,\n key: index\n });\n });\n }\n const breadcrumbClassName = (0, _classnames.default)(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"nav\", Object.assign({\n className: breadcrumbClassName,\n style: mergedStyle\n }, restProps), /*#__PURE__*/React.createElement(\"ol\", null, crumbs)));\n};\nBreadcrumb.Item = _BreadcrumbItem.default;\nBreadcrumb.Separator = _BreadcrumbSeparator.default;\nif (process.env.NODE_ENV !== 'production') {\n Breadcrumb.displayName = 'Breadcrumb';\n}\nvar _default = exports.default = Breadcrumb;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.InternalBreadcrumbItem = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _DownOutlined = _interopRequireDefault(require(\"@ant-design/icons/DownOutlined\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _dropdown = _interopRequireDefault(require(\"../dropdown/dropdown\"));\nvar _BreadcrumbSeparator = _interopRequireDefault(require(\"./BreadcrumbSeparator\"));\nvar _useItemRender = require(\"./useItemRender\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalBreadcrumbItem = props => {\n const {\n prefixCls,\n separator = '/',\n children,\n menu,\n overlay,\n dropdownProps,\n href\n } = props;\n // Warning for deprecated usage\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Breadcrumb.Item');\n warning.deprecated(!('overlay' in props), 'overlay', 'menu');\n }\n /** If overlay is have Wrap a Dropdown */\n const renderBreadcrumbNode = breadcrumbItem => {\n if (menu || overlay) {\n const mergeDropDownProps = Object.assign({}, dropdownProps);\n if (menu) {\n const _a = menu || {},\n {\n items\n } = _a,\n menuProps = __rest(_a, [\"items\"]);\n mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {\n items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {\n var {\n key,\n title,\n label,\n path\n } = _a,\n itemProps = __rest(_a, [\"key\", \"title\", \"label\", \"path\"]);\n let mergedLabel = label !== null && label !== void 0 ? label : title;\n if (path) {\n mergedLabel = /*#__PURE__*/React.createElement(\"a\", {\n href: `${href}${path}`\n }, mergedLabel);\n }\n return Object.assign(Object.assign({}, itemProps), {\n key: key !== null && key !== void 0 ? key : index,\n label: mergedLabel\n });\n })\n });\n } else if (overlay) {\n mergeDropDownProps.overlay = overlay;\n }\n return /*#__PURE__*/React.createElement(_dropdown.default, Object.assign({\n placement: \"bottom\"\n }, mergeDropDownProps), /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-overlay-link`\n }, breadcrumbItem, /*#__PURE__*/React.createElement(_DownOutlined.default, null)));\n }\n return breadcrumbItem;\n };\n // wrap to dropDown\n const link = renderBreadcrumbNode(children);\n if (link !== undefined && link !== null) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"li\", null, link), separator && /*#__PURE__*/React.createElement(_BreadcrumbSeparator.default, null, separator));\n }\n return null;\n};\nexports.InternalBreadcrumbItem = InternalBreadcrumbItem;\nconst BreadcrumbItem = props => {\n const {\n prefixCls: customizePrefixCls,\n children,\n href\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"children\", \"href\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);\n return /*#__PURE__*/React.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {\n prefixCls: prefixCls\n }), (0, _useItemRender.renderItem)(prefixCls, restProps, children, href));\n};\nBreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;\nvar _default = exports.default = BreadcrumbItem;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _configProvider = require(\"../config-provider\");\nconst BreadcrumbSeparator = _ref => {\n let {\n children\n } = _ref;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('breadcrumb');\n return /*#__PURE__*/React.createElement(\"li\", {\n className: `${prefixCls}-separator`,\n \"aria-hidden\": \"true\"\n }, children === '' ? children : children || '/');\n};\nBreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;\nvar _default = exports.default = BreadcrumbSeparator;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Breadcrumb = _interopRequireDefault(require(\"./Breadcrumb\"));\nvar _default = exports.default = _Breadcrumb.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genBreadcrumbStyle = token => {\n const {\n componentCls,\n iconCls,\n calc\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n color: token.itemColor,\n fontSize: token.fontSize,\n [iconCls]: {\n fontSize: token.iconFontSize\n },\n ol: {\n display: 'flex',\n flexWrap: 'wrap',\n margin: 0,\n padding: 0,\n listStyle: 'none'\n },\n a: Object.assign({\n color: token.linkColor,\n transition: `color ${token.motionDurationMid}`,\n padding: `0 ${(0, _cssinjs.unit)(token.paddingXXS)}`,\n borderRadius: token.borderRadiusSM,\n height: token.fontHeight,\n display: 'inline-block',\n marginInline: calc(token.marginXXS).mul(-1).equal(),\n '&:hover': {\n color: token.linkHoverColor,\n backgroundColor: token.colorBgTextHover\n }\n }, (0, _style.genFocusStyle)(token)),\n 'li:last-child': {\n color: token.lastItemColor\n },\n [`${componentCls}-separator`]: {\n marginInline: token.separatorMargin,\n color: token.separatorColor\n },\n [`${componentCls}-link`]: {\n [`\n > ${iconCls} + span,\n > ${iconCls} + a\n `]: {\n marginInlineStart: token.marginXXS\n }\n },\n [`${componentCls}-overlay-link`]: {\n borderRadius: token.borderRadiusSM,\n height: token.fontHeight,\n display: 'inline-block',\n padding: `0 ${(0, _cssinjs.unit)(token.paddingXXS)}`,\n marginInline: calc(token.marginXXS).mul(-1).equal(),\n [`> ${iconCls}`]: {\n marginInlineStart: token.marginXXS,\n fontSize: token.fontSizeIcon\n },\n '&:hover': {\n color: token.linkHoverColor,\n backgroundColor: token.colorBgTextHover,\n a: {\n color: token.linkHoverColor\n }\n },\n a: {\n '&:hover': {\n backgroundColor: 'transparent'\n }\n }\n },\n // rtl style\n [`&${token.componentCls}-rtl`]: {\n direction: 'rtl'\n }\n })\n };\n};\nconst prepareComponentToken = token => ({\n itemColor: token.colorTextDescription,\n lastItemColor: token.colorText,\n iconFontSize: token.fontSize,\n linkColor: token.colorTextDescription,\n linkHoverColor: token.colorText,\n separatorColor: token.colorTextDescription,\n separatorMargin: token.marginXS\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Breadcrumb', token => {\n const breadcrumbToken = (0, _internal.mergeToken)(token, {});\n return genBreadcrumbStyle(breadcrumbToken);\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useItemRender;\nexports.renderItem = renderItem;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _pickAttrs = _interopRequireDefault(require(\"rc-util/lib/pickAttrs\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction getBreadcrumbName(route, params) {\n if (route.title === undefined || route.title === null) {\n return null;\n }\n const paramsKeys = Object.keys(params).join('|');\n return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);\n}\nfunction renderItem(prefixCls, item, children, href) {\n if (children === null || children === undefined) {\n return null;\n }\n const {\n className,\n onClick\n } = item,\n restItem = __rest(item, [\"className\", \"onClick\"]);\n const passedProps = Object.assign(Object.assign({}, (0, _pickAttrs.default)(restItem, {\n data: true,\n aria: true\n })), {\n onClick\n });\n if (href !== undefined) {\n return /*#__PURE__*/React.createElement(\"a\", Object.assign({}, passedProps, {\n className: (0, _classnames.default)(`${prefixCls}-link`, className),\n href: href\n }), children);\n }\n return /*#__PURE__*/React.createElement(\"span\", Object.assign({}, passedProps, {\n className: (0, _classnames.default)(`${prefixCls}-link`, className)\n }), children);\n}\nfunction useItemRender(prefixCls, itemRender) {\n const mergedItemRender = (item, params, routes, path, href) => {\n if (itemRender) {\n return itemRender(item, params, routes, path);\n }\n const name = getBreadcrumbName(item, params);\n return renderItem(prefixCls, item, name, href);\n };\n return mergedItemRender;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useItems;\nvar _react = require(\"react\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction route2item(route) {\n const {\n breadcrumbName,\n children\n } = route,\n rest = __rest(route, [\"breadcrumbName\", \"children\"]);\n const clone = Object.assign({\n title: breadcrumbName\n }, rest);\n if (children) {\n clone.menu = {\n items: children.map(_a => {\n var {\n breadcrumbName: itemBreadcrumbName\n } = _a,\n itemProps = __rest(_a, [\"breadcrumbName\"]);\n return Object.assign(Object.assign({}, itemProps), {\n title: itemBreadcrumbName\n });\n })\n };\n }\n return clone;\n}\nfunction useItems(items, routes) {\n return (0, _react.useMemo)(() => {\n if (items) {\n return items;\n }\n if (routes) {\n return routes.map(route2item);\n }\n return null;\n }, [items, routes]);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst IconWrapper = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n const {\n className,\n style,\n children,\n prefixCls\n } = props;\n const iconWrapperCls = (0, _classnames.default)(`${prefixCls}-icon`, className);\n return /*#__PURE__*/_react.default.createElement(\"span\", {\n ref: ref,\n className: iconWrapperCls,\n style: style\n }, children);\n});\nvar _default = exports.default = IconWrapper;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireDefault(require(\"rc-motion\"));\nvar _IconWrapper = _interopRequireDefault(require(\"./IconWrapper\"));\nconst InnerLoadingIcon = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n const {\n prefixCls,\n className,\n style,\n iconClassName\n } = props;\n const mergedIconCls = (0, _classnames.default)(`${prefixCls}-loading-icon`, className);\n return /*#__PURE__*/_react.default.createElement(_IconWrapper.default, {\n prefixCls: prefixCls,\n className: mergedIconCls,\n style: style,\n ref: ref\n }, /*#__PURE__*/_react.default.createElement(_LoadingOutlined.default, {\n className: iconClassName\n }));\n});\nconst getCollapsedWidth = () => ({\n width: 0,\n opacity: 0,\n transform: 'scale(0)'\n});\nconst getRealWidth = node => ({\n width: node.scrollWidth,\n opacity: 1,\n transform: 'scale(1)'\n});\nconst LoadingIcon = props => {\n const {\n prefixCls,\n loading,\n existIcon,\n className,\n style\n } = props;\n const visible = !!loading;\n if (existIcon) {\n return /*#__PURE__*/_react.default.createElement(InnerLoadingIcon, {\n prefixCls: prefixCls,\n className: className,\n style: style\n });\n }\n return /*#__PURE__*/_react.default.createElement(_rcMotion.default, {\n visible: visible,\n // We do not really use this motionName\n motionName: `${prefixCls}-loading-icon-motion`,\n motionLeave: visible,\n removeOnLeave: true,\n onAppearStart: getCollapsedWidth,\n onAppearActive: getRealWidth,\n onEnterStart: getCollapsedWidth,\n onEnterActive: getRealWidth,\n onLeaveStart: getRealWidth,\n onLeaveActive: getCollapsedWidth\n }, (_ref, ref) => {\n let {\n className: motionCls,\n style: motionStyle\n } = _ref;\n return /*#__PURE__*/_react.default.createElement(InnerLoadingIcon, {\n prefixCls: prefixCls,\n className: className,\n style: Object.assign(Object.assign({}, style), motionStyle),\n ref: ref,\n iconClassName: motionCls\n });\n });\n};\nvar _default = exports.default = LoadingIcon;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.GroupSizeContext = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _internal = require(\"../theme/internal\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst GroupSizeContext = exports.GroupSizeContext = /*#__PURE__*/React.createContext(undefined);\nconst ButtonGroup = props => {\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n size,\n className\n } = props,\n others = __rest(props, [\"prefixCls\", \"size\", \"className\"]);\n const prefixCls = getPrefixCls('btn-group', customizePrefixCls);\n const [,, hashId] = (0, _internal.useToken)();\n let sizeCls = '';\n switch (size) {\n case 'large':\n sizeCls = 'lg';\n break;\n case 'small':\n sizeCls = 'sm';\n break;\n default:\n // Do nothing\n }\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Button.Group');\n process.env.NODE_ENV !== \"production\" ? warning(!size || ['large', 'small', 'middle'].includes(size), 'usage', 'Invalid prop `size`.') : void 0;\n }\n const classes = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-${sizeCls}`]: sizeCls,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, hashId);\n return /*#__PURE__*/React.createElement(GroupSizeContext.Provider, {\n value: size\n }, /*#__PURE__*/React.createElement(\"div\", Object.assign({}, others, {\n className: classes\n })));\n};\nvar _default = exports.default = ButtonGroup;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _warning = require(\"../_util/warning\");\nvar _wave = _interopRequireDefault(require(\"../_util/wave\"));\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _Compact = require(\"../space/Compact\");\nvar _buttonGroup = _interopRequireWildcard(require(\"./button-group\"));\nvar _buttonHelpers = require(\"./buttonHelpers\");\nvar _IconWrapper = _interopRequireDefault(require(\"./IconWrapper\"));\nvar _LoadingIcon = _interopRequireDefault(require(\"./LoadingIcon\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _compactCmp = _interopRequireDefault(require(\"./style/compactCmp\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction getLoadingConfig(loading) {\n if (typeof loading === 'object' && loading) {\n let delay = loading === null || loading === void 0 ? void 0 : loading.delay;\n delay = !Number.isNaN(delay) && typeof delay === 'number' ? delay : 0;\n return {\n loading: delay <= 0,\n delay\n };\n }\n return {\n loading: !!loading,\n delay: 0\n };\n}\nconst ButtonTypeMap = {\n default: ['default', 'outlined'],\n primary: ['primary', 'solid'],\n dashed: ['default', 'dashed'],\n link: ['primary', 'link'],\n text: ['default', 'text']\n};\nconst InternalCompoundedButton = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n var _a, _b, _c, _d;\n const {\n loading = false,\n prefixCls: customizePrefixCls,\n color,\n variant,\n type,\n danger = false,\n shape = 'default',\n size: customizeSize,\n styles,\n disabled: customDisabled,\n className,\n rootClassName,\n children,\n icon,\n iconPosition = 'start',\n ghost = false,\n block = false,\n // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.\n htmlType = 'button',\n classNames: customClassNames,\n style: customStyle = {},\n autoInsertSpace\n } = props,\n rest = __rest(props, [\"loading\", \"prefixCls\", \"color\", \"variant\", \"type\", \"danger\", \"shape\", \"size\", \"styles\", \"disabled\", \"className\", \"rootClassName\", \"children\", \"icon\", \"iconPosition\", \"ghost\", \"block\", \"htmlType\", \"classNames\", \"style\", \"autoInsertSpace\"]);\n // https://github.com/ant-design/ant-design/issues/47605\n // Compatible with original `type` behavior\n const mergedType = type || 'default';\n const [mergedColor, mergedVariant] = (0, _react.useMemo)(() => {\n if (color && variant) {\n return [color, variant];\n }\n const colorVariantPair = ButtonTypeMap[mergedType] || [];\n if (danger) {\n return ['danger', colorVariantPair[1]];\n }\n return colorVariantPair;\n }, [type, color, variant, danger]);\n const isDanger = mergedColor === 'danger';\n const mergedColorText = isDanger ? 'dangerous' : mergedColor;\n const {\n getPrefixCls,\n direction,\n button\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const mergedInsertSpace = (_a = autoInsertSpace !== null && autoInsertSpace !== void 0 ? autoInsertSpace : button === null || button === void 0 ? void 0 : button.autoInsertSpace) !== null && _a !== void 0 ? _a : true;\n const prefixCls = getPrefixCls('btn', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const disabled = (0, _react.useContext)(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const groupSize = (0, _react.useContext)(_buttonGroup.GroupSizeContext);\n const loadingOrDelay = (0, _react.useMemo)(() => getLoadingConfig(loading), [loading]);\n const [innerLoading, setLoading] = (0, _react.useState)(loadingOrDelay.loading);\n const [hasTwoCNChar, setHasTwoCNChar] = (0, _react.useState)(false);\n const internalRef = /*#__PURE__*/(0, _react.createRef)();\n const buttonRef = (0, _ref.composeRef)(ref, internalRef);\n const needInserted = _react.Children.count(children) === 1 && !icon && !(0, _buttonHelpers.isUnBorderedButtonVariant)(mergedVariant);\n (0, _react.useEffect)(() => {\n let delayTimer = null;\n if (loadingOrDelay.delay > 0) {\n delayTimer = setTimeout(() => {\n delayTimer = null;\n setLoading(true);\n }, loadingOrDelay.delay);\n } else {\n setLoading(loadingOrDelay.loading);\n }\n function cleanupTimer() {\n if (delayTimer) {\n clearTimeout(delayTimer);\n delayTimer = null;\n }\n }\n return cleanupTimer;\n }, [loadingOrDelay]);\n (0, _react.useEffect)(() => {\n // FIXME: for HOC usage like \n if (!buttonRef || !buttonRef.current || !mergedInsertSpace) {\n return;\n }\n const buttonText = buttonRef.current.textContent;\n if (needInserted && (0, _buttonHelpers.isTwoCNChar)(buttonText)) {\n if (!hasTwoCNChar) {\n setHasTwoCNChar(true);\n }\n } else if (hasTwoCNChar) {\n setHasTwoCNChar(false);\n }\n }, [buttonRef]);\n const handleClick = _react.default.useCallback(e => {\n var _a;\n // FIXME: https://github.com/ant-design/ant-design/issues/30207\n if (innerLoading || mergedDisabled) {\n e.preventDefault();\n return;\n }\n (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);\n }, [props.onClick, innerLoading, mergedDisabled]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Button');\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\\`icon\\` is using ReactNode instead of string naming in v4. Please check \\`${icon}\\` at https://ant.design/components/icon`) : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(ghost && (0, _buttonHelpers.isUnBorderedButtonVariant)(mergedVariant)), 'usage', \"`link` or `text` button can't be a `ghost` button.\") : void 0;\n }\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n const sizeClassNameMap = {\n large: 'lg',\n small: 'sm',\n middle: undefined\n };\n const sizeFullName = (0, _useSize.default)(ctxSize => {\n var _a, _b;\n return (_b = (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : groupSize) !== null && _b !== void 0 ? _b : ctxSize;\n });\n const sizeCls = sizeFullName ? (_b = sizeClassNameMap[sizeFullName]) !== null && _b !== void 0 ? _b : '' : '';\n const iconType = innerLoading ? 'loading' : icon;\n const linkButtonRestProps = (0, _omit.default)(rest, ['navigate']);\n const classes = (0, _classnames.default)(prefixCls, hashId, cssVarCls, {\n [`${prefixCls}-${shape}`]: shape !== 'default' && shape,\n // line(253 - 254): Compatible with versions earlier than 5.21.0\n [`${prefixCls}-${mergedType}`]: mergedType,\n [`${prefixCls}-dangerous`]: danger,\n [`${prefixCls}-color-${mergedColorText}`]: mergedColorText,\n [`${prefixCls}-variant-${mergedVariant}`]: mergedVariant,\n [`${prefixCls}-${sizeCls}`]: sizeCls,\n [`${prefixCls}-icon-only`]: !children && children !== 0 && !!iconType,\n [`${prefixCls}-background-ghost`]: ghost && !(0, _buttonHelpers.isUnBorderedButtonVariant)(mergedVariant),\n [`${prefixCls}-loading`]: innerLoading,\n [`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && mergedInsertSpace && !innerLoading,\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-icon-end`]: iconPosition === 'end'\n }, compactItemClassnames, className, rootClassName, button === null || button === void 0 ? void 0 : button.className);\n const fullStyle = Object.assign(Object.assign({}, button === null || button === void 0 ? void 0 : button.style), customStyle);\n const iconClasses = (0, _classnames.default)(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, (_c = button === null || button === void 0 ? void 0 : button.classNames) === null || _c === void 0 ? void 0 : _c.icon);\n const iconStyle = Object.assign(Object.assign({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), ((_d = button === null || button === void 0 ? void 0 : button.styles) === null || _d === void 0 ? void 0 : _d.icon) || {});\n const iconNode = icon && !innerLoading ? (/*#__PURE__*/_react.default.createElement(_IconWrapper.default, {\n prefixCls: prefixCls,\n className: iconClasses,\n style: iconStyle\n }, icon)) : (/*#__PURE__*/_react.default.createElement(_LoadingIcon.default, {\n existIcon: !!icon,\n prefixCls: prefixCls,\n loading: innerLoading\n }));\n const kids = children || children === 0 ? (0, _buttonHelpers.spaceChildren)(children, needInserted && mergedInsertSpace) : null;\n if (linkButtonRestProps.href !== undefined) {\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(\"a\", Object.assign({}, linkButtonRestProps, {\n className: (0, _classnames.default)(classes, {\n [`${prefixCls}-disabled`]: mergedDisabled\n }),\n href: mergedDisabled ? undefined : linkButtonRestProps.href,\n style: fullStyle,\n onClick: handleClick,\n ref: buttonRef,\n tabIndex: mergedDisabled ? -1 : 0\n }), iconNode, kids));\n }\n let buttonNode = /*#__PURE__*/_react.default.createElement(\"button\", Object.assign({}, rest, {\n type: htmlType,\n className: classes,\n style: fullStyle,\n onClick: handleClick,\n disabled: mergedDisabled,\n ref: buttonRef\n }), iconNode, kids, !!compactItemClassnames && /*#__PURE__*/_react.default.createElement(_compactCmp.default, {\n key: \"compact\",\n prefixCls: prefixCls\n }));\n if (!(0, _buttonHelpers.isUnBorderedButtonVariant)(mergedVariant)) {\n buttonNode = /*#__PURE__*/_react.default.createElement(_wave.default, {\n component: \"Button\",\n disabled: innerLoading\n }, buttonNode);\n }\n return wrapCSSVar(buttonNode);\n});\nconst Button = InternalCompoundedButton;\nButton.Group = _buttonGroup.default;\nButton.__ANT_BUTTON = true;\nif (process.env.NODE_ENV !== 'production') {\n Button.displayName = 'Button';\n}\nvar _default = exports.default = Button;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports._ButtonVariantTypes = exports._ButtonColorTypes = void 0;\nexports.convertLegacyProps = convertLegacyProps;\nexports.isString = isString;\nexports.isTwoCNChar = void 0;\nexports.isUnBorderedButtonVariant = isUnBorderedButtonVariant;\nexports.spaceChildren = spaceChildren;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _reactNode = require(\"../_util/reactNode\");\nconst rxTwoCNChar = /^[\\u4E00-\\u9FA5]{2}$/;\nconst isTwoCNChar = exports.isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);\nfunction convertLegacyProps(type) {\n if (type === 'danger') {\n return {\n danger: true\n };\n }\n return {\n type\n };\n}\nfunction isString(str) {\n return typeof str === 'string';\n}\nfunction isUnBorderedButtonVariant(type) {\n return type === 'text' || type === 'link';\n}\nfunction splitCNCharsBySpace(child, needInserted) {\n if (child === null || child === undefined) {\n return;\n }\n const SPACE = needInserted ? ' ' : '';\n if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {\n return (0, _reactNode.cloneElement)(child, {\n children: child.props.children.split('').join(SPACE)\n });\n }\n if (isString(child)) {\n return isTwoCNChar(child) ? /*#__PURE__*/_react.default.createElement(\"span\", null, child.split('').join(SPACE)) : /*#__PURE__*/_react.default.createElement(\"span\", null, child);\n }\n if ((0, _reactNode.isFragment)(child)) {\n return /*#__PURE__*/_react.default.createElement(\"span\", null, child);\n }\n return child;\n}\nfunction spaceChildren(children, needInserted) {\n let isPrevChildPure = false;\n const childList = [];\n _react.default.Children.forEach(children, child => {\n const type = typeof child;\n const isCurrentChildPure = type === 'string' || type === 'number';\n if (isPrevChildPure && isCurrentChildPure) {\n const lastIndex = childList.length - 1;\n const lastChild = childList[lastIndex];\n childList[lastIndex] = `${lastChild}${child}`;\n } else {\n childList.push(child);\n }\n isPrevChildPure = isCurrentChildPure;\n });\n return _react.default.Children.map(childList, child => splitCNCharsBySpace(child, needInserted));\n}\nconst _ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'];\nconst _ButtonShapes = ['default', 'circle', 'round'];\nconst _ButtonHTMLTypes = ['submit', 'button', 'reset'];\nconst _ButtonVariantTypes = exports._ButtonVariantTypes = ['outlined', 'dashed', 'solid', 'filled', 'text', 'link'];\nconst _ButtonColorTypes = exports._ButtonColorTypes = ['default', 'primary', 'danger'];","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _exportNames = {};\nexports.default = void 0;\nvar _button = _interopRequireDefault(require(\"./button\"));\nvar _buttonHelpers = require(\"./buttonHelpers\");\nObject.keys(_buttonHelpers).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _buttonHelpers[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _buttonHelpers[key];\n }\n });\n});\nvar _default = exports.default = _button.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _compactItem = require(\"../../style/compact-item\");\nvar _compactItemVertical = require(\"../../style/compact-item-vertical\");\nvar _internal = require(\"../../theme/internal\");\nvar _token = require(\"./token\");\n// Style as inline component\n\nconst genButtonCompactStyle = token => {\n const {\n componentCls,\n calc\n } = token;\n return {\n [componentCls]: {\n // Special styles for Primary Button\n [`&-compact-item${componentCls}-primary`]: {\n [`&:not([disabled]) + ${componentCls}-compact-item${componentCls}-primary:not([disabled])`]: {\n position: 'relative',\n '&:before': {\n position: 'absolute',\n top: calc(token.lineWidth).mul(-1).equal(),\n insetInlineStart: calc(token.lineWidth).mul(-1).equal(),\n display: 'inline-block',\n width: token.lineWidth,\n height: `calc(100% + ${(0, _cssinjs.unit)(token.lineWidth)} * 2)`,\n backgroundColor: token.colorPrimaryHover,\n content: '\"\"'\n }\n }\n },\n // Special styles for Primary Button\n '&-compact-vertical-item': {\n [`&${componentCls}-primary`]: {\n [`&:not([disabled]) + ${componentCls}-compact-vertical-item${componentCls}-primary:not([disabled])`]: {\n position: 'relative',\n '&:before': {\n position: 'absolute',\n top: calc(token.lineWidth).mul(-1).equal(),\n insetInlineStart: calc(token.lineWidth).mul(-1).equal(),\n display: 'inline-block',\n width: `calc(100% + ${(0, _cssinjs.unit)(token.lineWidth)} * 2)`,\n height: token.lineWidth,\n backgroundColor: token.colorPrimaryHover,\n content: '\"\"'\n }\n }\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genSubStyleComponent)(['Button', 'compact'], token => {\n const buttonToken = (0, _token.prepareToken)(token);\n return [\n // Space Compact\n (0, _compactItem.genCompactItemStyle)(buttonToken), (0, _compactItemVertical.genCompactItemVerticalStyle)(buttonToken), genButtonCompactStyle(buttonToken)];\n}, _token.prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genButtonBorderStyle = (buttonTypeCls, borderColor) => ({\n // Border\n [`> span, > ${buttonTypeCls}`]: {\n '&:not(:last-child)': {\n [`&, & > ${buttonTypeCls}`]: {\n '&:not(:disabled)': {\n borderInlineEndColor: borderColor\n }\n }\n },\n '&:not(:first-child)': {\n [`&, & > ${buttonTypeCls}`]: {\n '&:not(:disabled)': {\n borderInlineStartColor: borderColor\n }\n }\n }\n }\n});\nconst genGroupStyle = token => {\n const {\n componentCls,\n fontSize,\n lineWidth,\n groupBorderColor,\n colorErrorHover\n } = token;\n return {\n [`${componentCls}-group`]: [{\n position: 'relative',\n display: 'inline-flex',\n // Border\n [`> span, > ${componentCls}`]: {\n '&:not(:last-child)': {\n [`&, & > ${componentCls}`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n '&:not(:first-child)': {\n marginInlineStart: token.calc(lineWidth).mul(-1).equal(),\n [`&, & > ${componentCls}`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n }\n },\n [componentCls]: {\n position: 'relative',\n zIndex: 1,\n '&:hover, &:focus, &:active': {\n zIndex: 2\n },\n '&[disabled]': {\n zIndex: 0\n }\n },\n [`${componentCls}-icon-only`]: {\n fontSize\n }\n },\n // Border Color\n genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]\n };\n};\nvar _default = exports.default = genGroupStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nvar _group = _interopRequireDefault(require(\"./group\"));\nvar _token = require(\"./token\");\n// ============================== Shared ==============================\nconst genSharedButtonStyle = token => {\n const {\n componentCls,\n iconCls,\n fontWeight\n } = token;\n return {\n [componentCls]: {\n outline: 'none',\n position: 'relative',\n display: 'inline-flex',\n gap: token.marginXS,\n alignItems: 'center',\n justifyContent: 'center',\n fontWeight,\n whiteSpace: 'nowrap',\n textAlign: 'center',\n backgroundImage: 'none',\n background: 'transparent',\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,\n cursor: 'pointer',\n transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,\n userSelect: 'none',\n touchAction: 'manipulation',\n color: token.colorText,\n '&:disabled > *': {\n pointerEvents: 'none'\n },\n '> span': {\n // https://github.com/ant-design/ant-design/issues/51380\n display: 'inline-flex'\n },\n [`${componentCls}-icon`]: {\n lineHeight: 1\n },\n '> a': {\n color: 'currentColor'\n },\n '&:not(:disabled)': Object.assign({}, (0, _style.genFocusStyle)(token)),\n [`&${componentCls}-two-chinese-chars::first-letter`]: {\n letterSpacing: '0.34em'\n },\n [`&${componentCls}-two-chinese-chars > *:not(${iconCls})`]: {\n marginInlineEnd: '-0.34em',\n letterSpacing: '0.34em'\n },\n // iconPosition=\"end\"\n '&-icon-end': {\n flexDirection: 'row-reverse'\n }\n }\n };\n};\nconst genHoverActiveButtonStyle = (btnCls, hoverStyle, activeStyle) => ({\n [`&:not(:disabled):not(${btnCls}-disabled)`]: {\n '&:hover': hoverStyle,\n '&:active': activeStyle\n }\n});\n// ============================== Shape ===============================\nconst genCircleButtonStyle = token => ({\n minWidth: token.controlHeight,\n paddingInlineStart: 0,\n paddingInlineEnd: 0,\n borderRadius: '50%'\n});\nconst genRoundButtonStyle = token => ({\n borderRadius: token.controlHeight,\n paddingInlineStart: token.calc(token.controlHeight).div(2).equal(),\n paddingInlineEnd: token.calc(token.controlHeight).div(2).equal()\n});\nconst genDisabledStyle = token => ({\n cursor: 'not-allowed',\n borderColor: token.borderColorDisabled,\n color: token.colorTextDisabled,\n background: token.colorBgContainerDisabled,\n boxShadow: 'none'\n});\nconst genGhostButtonStyle = (btnCls, background, textColor, borderColor, textColorDisabled, borderColorDisabled, hoverStyle, activeStyle) => ({\n [`&${btnCls}-background-ghost`]: Object.assign(Object.assign({\n color: textColor || undefined,\n background,\n borderColor: borderColor || undefined,\n boxShadow: 'none'\n }, genHoverActiveButtonStyle(btnCls, Object.assign({\n background\n }, hoverStyle), Object.assign({\n background\n }, activeStyle))), {\n '&:disabled': {\n cursor: 'not-allowed',\n color: textColorDisabled || undefined,\n borderColor: borderColorDisabled || undefined\n }\n })\n});\nconst genSolidDisabledButtonStyle = token => ({\n [`&:disabled, &${token.componentCls}-disabled`]: Object.assign({}, genDisabledStyle(token))\n});\nconst genPureDisabledButtonStyle = token => ({\n [`&:disabled, &${token.componentCls}-disabled`]: {\n cursor: 'not-allowed',\n color: token.colorTextDisabled\n }\n});\n// ============================== Variant =============================\nconst genVariantButtonStyle = (token, hoverStyle, activeStyle, variant) => {\n const isPureDisabled = variant && ['link', 'text'].includes(variant);\n const genDisabledButtonStyle = isPureDisabled ? genPureDisabledButtonStyle : genSolidDisabledButtonStyle;\n return Object.assign(Object.assign({}, genDisabledButtonStyle(token)), genHoverActiveButtonStyle(token.componentCls, hoverStyle, activeStyle));\n};\nconst genSolidButtonStyle = (token, textColor, background, hoverStyle, activeStyle) => ({\n [`&${token.componentCls}-variant-solid`]: Object.assign({\n color: textColor,\n background\n }, genVariantButtonStyle(token, hoverStyle, activeStyle))\n});\nconst genOutlinedDashedButtonStyle = (token, borderColor, background, hoverStyle, activeStyle) => ({\n [`&${token.componentCls}-variant-outlined, &${token.componentCls}-variant-dashed`]: Object.assign({\n borderColor,\n background\n }, genVariantButtonStyle(token, hoverStyle, activeStyle))\n});\nconst genDashedButtonStyle = token => ({\n [`&${token.componentCls}-variant-dashed`]: {\n borderStyle: 'dashed'\n }\n});\nconst genFilledButtonStyle = (token, background, hoverStyle, activeStyle) => ({\n [`&${token.componentCls}-variant-filled`]: Object.assign({\n boxShadow: 'none',\n background\n }, genVariantButtonStyle(token, hoverStyle, activeStyle))\n});\nconst genTextLinkButtonStyle = (token, textColor, variant, hoverStyle, activeStyle) => ({\n [`&${token.componentCls}-variant-${variant}`]: Object.assign({\n color: textColor,\n boxShadow: 'none'\n }, genVariantButtonStyle(token, hoverStyle, activeStyle, variant))\n});\n// =============================== Color ==============================\nconst genDefaultButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({\n color: token.defaultColor,\n boxShadow: token.defaultShadow\n}, genSolidButtonStyle(token, token.solidTextColor, token.colorBgSolid, {\n background: token.colorBgSolidHover\n}, {\n background: token.colorBgSolidActive\n})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorFillTertiary, {\n background: token.colorFillSecondary\n}, {\n background: token.colorFill\n})), genTextLinkButtonStyle(token, token.textTextColor, 'link', {\n color: token.colorLinkHover,\n background: token.linkHoverBg\n}, {\n color: token.colorLinkActive\n})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder));\nconst genPrimaryButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({\n color: token.colorPrimary,\n boxShadow: token.primaryShadow\n}, genOutlinedDashedButtonStyle(token, token.colorPrimary, token.colorBgContainer, {\n color: token.colorPrimaryTextHover,\n borderColor: token.colorPrimaryHover,\n background: token.colorBgContainer\n}, {\n color: token.colorPrimaryTextActive,\n borderColor: token.colorPrimaryActive,\n background: token.colorBgContainer\n})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorPrimaryBg, {\n background: token.colorPrimaryBgHover\n}, {\n background: token.colorPrimaryBorder\n})), genTextLinkButtonStyle(token, token.colorLink, 'text', {\n color: token.colorPrimaryTextHover,\n background: token.colorPrimaryBg\n}, {\n color: token.colorPrimaryTextActive,\n background: token.colorPrimaryBorder\n})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorPrimary, token.colorPrimary, token.colorTextDisabled, token.colorBorder, {\n color: token.colorPrimaryHover,\n borderColor: token.colorPrimaryHover\n}, {\n color: token.colorPrimaryActive,\n borderColor: token.colorPrimaryActive\n}));\nconst genDangerousStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({\n color: token.colorError,\n boxShadow: token.dangerShadow\n}, genSolidButtonStyle(token, token.dangerColor, token.colorError, {\n background: token.colorErrorHover\n}, {\n background: token.colorErrorActive\n})), genOutlinedDashedButtonStyle(token, token.colorError, token.colorBgContainer, {\n color: token.colorErrorHover,\n borderColor: token.colorErrorBorderHover\n}, {\n color: token.colorErrorActive,\n borderColor: token.colorErrorActive\n})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorErrorBg, {\n background: token.colorErrorBgFilledHover\n}, {\n background: token.colorErrorBgActive\n})), genTextLinkButtonStyle(token, token.colorError, 'text', {\n color: token.colorErrorHover,\n background: token.colorErrorBg\n}, {\n color: token.colorErrorHover,\n background: token.colorErrorBgActive\n})), genTextLinkButtonStyle(token, token.colorError, 'link', {\n color: token.colorErrorHover\n}, {\n color: token.colorErrorActive\n})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder, {\n color: token.colorErrorHover,\n borderColor: token.colorErrorHover\n}, {\n color: token.colorErrorActive,\n borderColor: token.colorErrorActive\n}));\nconst genColorButtonStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-color-default`]: genDefaultButtonStyle(token),\n [`${componentCls}-color-primary`]: genPrimaryButtonStyle(token),\n [`${componentCls}-color-dangerous`]: genDangerousStyle(token)\n };\n};\n// =========== Compatible with versions earlier than 5.21.0 ===========\nconst genCompatibleButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign({}, genOutlinedDashedButtonStyle(token, token.defaultBorderColor, token.defaultBg, {\n color: token.defaultHoverColor,\n borderColor: token.defaultHoverBorderColor,\n background: token.defaultHoverBg\n}, {\n color: token.defaultActiveColor,\n borderColor: token.defaultActiveBorderColor,\n background: token.defaultActiveBg\n})), genTextLinkButtonStyle(token, token.textTextColor, 'text', {\n color: token.textTextHoverColor,\n background: token.textHoverBg\n}, {\n color: token.textTextActiveColor,\n background: token.colorBgTextActive\n})), genSolidButtonStyle(token, token.primaryColor, token.colorPrimary, {\n background: token.colorPrimaryHover,\n color: token.primaryColor\n}, {\n background: token.colorPrimaryActive,\n color: token.primaryColor\n})), genTextLinkButtonStyle(token, token.colorLink, 'link', {\n color: token.colorLinkHover,\n background: token.linkHoverBg\n}, {\n color: token.colorLinkActive\n}));\n// =============================== Size ===============================\nconst genButtonStyle = function (token) {\n let prefixCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n const {\n componentCls,\n controlHeight,\n fontSize,\n lineHeight,\n borderRadius,\n buttonPaddingHorizontal,\n iconCls,\n buttonPaddingVertical\n } = token;\n const iconOnlyCls = `${componentCls}-icon-only`;\n return [{\n [prefixCls]: {\n fontSize,\n lineHeight,\n height: controlHeight,\n padding: `${(0, _cssinjs.unit)(buttonPaddingVertical)} ${(0, _cssinjs.unit)(buttonPaddingHorizontal)}`,\n borderRadius,\n [`&${iconOnlyCls}`]: {\n width: controlHeight,\n paddingInline: 0,\n // make `btn-icon-only` not too narrow\n [`&${componentCls}-compact-item`]: {\n flex: 'none'\n },\n [`&${componentCls}-round`]: {\n width: 'auto'\n },\n [iconCls]: {\n fontSize: token.buttonIconOnlyFontSize\n }\n },\n // Loading\n [`&${componentCls}-loading`]: {\n opacity: token.opacityLoading,\n cursor: 'default'\n },\n [`${componentCls}-loading-icon`]: {\n transition: `width ${token.motionDurationSlow} ${token.motionEaseInOut}, opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`\n }\n }\n },\n // Shape - patch prefixCls again to override solid border radius style\n {\n [`${componentCls}${componentCls}-circle${prefixCls}`]: genCircleButtonStyle(token)\n }, {\n [`${componentCls}${componentCls}-round${prefixCls}`]: genRoundButtonStyle(token)\n }];\n};\nconst genSizeBaseButtonStyle = token => {\n const baseToken = (0, _internal.mergeToken)(token, {\n fontSize: token.contentFontSize,\n lineHeight: token.contentLineHeight\n });\n return genButtonStyle(baseToken, token.componentCls);\n};\nconst genSizeSmallButtonStyle = token => {\n const smallToken = (0, _internal.mergeToken)(token, {\n controlHeight: token.controlHeightSM,\n fontSize: token.contentFontSizeSM,\n lineHeight: token.contentLineHeightSM,\n padding: token.paddingXS,\n buttonPaddingHorizontal: token.paddingInlineSM,\n buttonPaddingVertical: token.paddingBlockSM,\n borderRadius: token.borderRadiusSM,\n buttonIconOnlyFontSize: token.onlyIconSizeSM\n });\n return genButtonStyle(smallToken, `${token.componentCls}-sm`);\n};\nconst genSizeLargeButtonStyle = token => {\n const largeToken = (0, _internal.mergeToken)(token, {\n controlHeight: token.controlHeightLG,\n fontSize: token.contentFontSizeLG,\n lineHeight: token.contentLineHeightLG,\n buttonPaddingHorizontal: token.paddingInlineLG,\n buttonPaddingVertical: token.paddingBlockLG,\n borderRadius: token.borderRadiusLG,\n buttonIconOnlyFontSize: token.onlyIconSizeLG\n });\n return genButtonStyle(largeToken, `${token.componentCls}-lg`);\n};\nconst genBlockButtonStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: {\n [`&${componentCls}-block`]: {\n width: '100%'\n }\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genStyleHooks)('Button', token => {\n const buttonToken = (0, _token.prepareToken)(token);\n return [\n // Shared\n genSharedButtonStyle(buttonToken),\n // Size\n genSizeBaseButtonStyle(buttonToken), genSizeSmallButtonStyle(buttonToken), genSizeLargeButtonStyle(buttonToken),\n // Block\n genBlockButtonStyle(buttonToken),\n // Color\n genColorButtonStyle(buttonToken),\n // https://github.com/ant-design/ant-design/issues/50969\n genCompatibleButtonStyle(buttonToken),\n // Button Group\n (0, _group.default)(buttonToken)];\n}, _token.prepareComponentToken, {\n unitless: {\n fontWeight: true,\n contentLineHeight: true,\n contentLineHeightSM: true,\n contentLineHeightLG: true\n }\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareToken = exports.prepareComponentToken = void 0;\nvar _color = require(\"../../color-picker/color\");\nvar _ColorPresets = require(\"../../color-picker/components/ColorPresets\");\nvar _internal = require(\"../../theme/internal\");\nconst prepareToken = token => {\n const {\n paddingInline,\n onlyIconSize,\n paddingBlock\n } = token;\n const buttonToken = (0, _internal.mergeToken)(token, {\n buttonPaddingHorizontal: paddingInline,\n buttonPaddingVertical: paddingBlock,\n buttonIconOnlyFontSize: onlyIconSize\n });\n return buttonToken;\n};\nexports.prepareToken = prepareToken;\nconst prepareComponentToken = token => {\n var _a, _b, _c, _d, _e, _f;\n const contentFontSize = (_a = token.contentFontSize) !== null && _a !== void 0 ? _a : token.fontSize;\n const contentFontSizeSM = (_b = token.contentFontSizeSM) !== null && _b !== void 0 ? _b : token.fontSize;\n const contentFontSizeLG = (_c = token.contentFontSizeLG) !== null && _c !== void 0 ? _c : token.fontSizeLG;\n const contentLineHeight = (_d = token.contentLineHeight) !== null && _d !== void 0 ? _d : (0, _internal.getLineHeight)(contentFontSize);\n const contentLineHeightSM = (_e = token.contentLineHeightSM) !== null && _e !== void 0 ? _e : (0, _internal.getLineHeight)(contentFontSizeSM);\n const contentLineHeightLG = (_f = token.contentLineHeightLG) !== null && _f !== void 0 ? _f : (0, _internal.getLineHeight)(contentFontSizeLG);\n const solidTextColor = (0, _ColorPresets.isBright)(new _color.AggregationColor(token.colorBgSolid), '#fff') ? '#000' : '#fff';\n return {\n fontWeight: 400,\n defaultShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlTmpOutline}`,\n primaryShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,\n dangerShadow: `0 ${token.controlOutlineWidth}px 0 ${token.colorErrorOutline}`,\n primaryColor: token.colorTextLightSolid,\n dangerColor: token.colorTextLightSolid,\n borderColorDisabled: token.colorBorder,\n defaultGhostColor: token.colorBgContainer,\n ghostBg: 'transparent',\n defaultGhostBorderColor: token.colorBgContainer,\n paddingInline: token.paddingContentHorizontal - token.lineWidth,\n paddingInlineLG: token.paddingContentHorizontal - token.lineWidth,\n paddingInlineSM: 8 - token.lineWidth,\n onlyIconSize: token.fontSizeLG,\n onlyIconSizeSM: token.fontSizeLG - 2,\n onlyIconSizeLG: token.fontSizeLG + 2,\n groupBorderColor: token.colorPrimaryHover,\n linkHoverBg: 'transparent',\n textTextColor: token.colorText,\n textTextHoverColor: token.colorText,\n textTextActiveColor: token.colorText,\n textHoverBg: token.colorFillTertiary,\n defaultColor: token.colorText,\n defaultBg: token.colorBgContainer,\n defaultBorderColor: token.colorBorder,\n defaultBorderColorDisabled: token.colorBorder,\n defaultHoverBg: token.colorBgContainer,\n defaultHoverColor: token.colorPrimaryHover,\n defaultHoverBorderColor: token.colorPrimaryHover,\n defaultActiveBg: token.colorBgContainer,\n defaultActiveColor: token.colorPrimaryActive,\n defaultActiveBorderColor: token.colorPrimaryActive,\n solidTextColor,\n contentFontSize,\n contentFontSizeSM,\n contentFontSizeLG,\n contentLineHeight,\n contentLineHeightSM,\n contentLineHeightLG,\n paddingBlock: Math.max((token.controlHeight - contentFontSize * contentLineHeight) / 2 - token.lineWidth, 0),\n paddingBlockSM: Math.max((token.controlHeightSM - contentFontSizeSM * contentLineHeightSM) / 2 - token.lineWidth, 0),\n paddingBlockLG: Math.max((token.controlHeightLG - contentFontSizeLG * contentLineHeightLG) / 2 - token.lineWidth, 0)\n };\n};\nexports.prepareComponentToken = prepareComponentToken;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _context = require(\"../form/context\");\nvar _radio = require(\"../radio\");\nvar _select = _interopRequireDefault(require(\"../select\"));\nconst YearSelectOffset = 10;\nconst YearSelectTotal = 20;\nfunction YearSelect(props) {\n const {\n fullscreen,\n validRange,\n generateConfig,\n locale,\n prefixCls,\n value,\n onChange,\n divRef\n } = props;\n const year = generateConfig.getYear(value || generateConfig.getNow());\n let start = year - YearSelectOffset;\n let end = start + YearSelectTotal;\n if (validRange) {\n start = generateConfig.getYear(validRange[0]);\n end = generateConfig.getYear(validRange[1]) + 1;\n }\n const suffix = locale && locale.year === '年' ? '年' : '';\n const options = [];\n for (let index = start; index < end; index++) {\n options.push({\n label: `${index}${suffix}`,\n value: index\n });\n }\n return /*#__PURE__*/React.createElement(_select.default, {\n size: fullscreen ? undefined : 'small',\n options: options,\n value: year,\n className: `${prefixCls}-year-select`,\n onChange: numYear => {\n let newDate = generateConfig.setYear(value, numYear);\n if (validRange) {\n const [startDate, endDate] = validRange;\n const newYear = generateConfig.getYear(newDate);\n const newMonth = generateConfig.getMonth(newDate);\n if (newYear === generateConfig.getYear(endDate) && newMonth > generateConfig.getMonth(endDate)) {\n newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(endDate));\n }\n if (newYear === generateConfig.getYear(startDate) && newMonth < generateConfig.getMonth(startDate)) {\n newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(startDate));\n }\n }\n onChange(newDate);\n },\n getPopupContainer: () => divRef.current\n });\n}\nfunction MonthSelect(props) {\n const {\n prefixCls,\n fullscreen,\n validRange,\n value,\n generateConfig,\n locale,\n onChange,\n divRef\n } = props;\n const month = generateConfig.getMonth(value || generateConfig.getNow());\n let start = 0;\n let end = 11;\n if (validRange) {\n const [rangeStart, rangeEnd] = validRange;\n const currentYear = generateConfig.getYear(value);\n if (generateConfig.getYear(rangeEnd) === currentYear) {\n end = generateConfig.getMonth(rangeEnd);\n }\n if (generateConfig.getYear(rangeStart) === currentYear) {\n start = generateConfig.getMonth(rangeStart);\n }\n }\n const months = locale.shortMonths || generateConfig.locale.getShortMonths(locale.locale);\n const options = [];\n for (let index = start; index <= end; index += 1) {\n options.push({\n label: months[index],\n value: index\n });\n }\n return /*#__PURE__*/React.createElement(_select.default, {\n size: fullscreen ? undefined : 'small',\n className: `${prefixCls}-month-select`,\n value: month,\n options: options,\n onChange: newMonth => {\n onChange(generateConfig.setMonth(value, newMonth));\n },\n getPopupContainer: () => divRef.current\n });\n}\nfunction ModeSwitch(props) {\n const {\n prefixCls,\n locale,\n mode,\n fullscreen,\n onModeChange\n } = props;\n return /*#__PURE__*/React.createElement(_radio.Group, {\n onChange: _ref => {\n let {\n target: {\n value\n }\n } = _ref;\n onModeChange(value);\n },\n value: mode,\n size: fullscreen ? undefined : 'small',\n className: `${prefixCls}-mode-switch`\n }, /*#__PURE__*/React.createElement(_radio.Button, {\n value: \"month\"\n }, locale.month), /*#__PURE__*/React.createElement(_radio.Button, {\n value: \"year\"\n }, locale.year));\n}\nfunction CalendarHeader(props) {\n const {\n prefixCls,\n fullscreen,\n mode,\n onChange,\n onModeChange\n } = props;\n const divRef = React.useRef(null);\n const formItemInputContext = (0, _react.useContext)(_context.FormItemInputContext);\n const mergedFormItemInputContext = (0, _react.useMemo)(() => Object.assign(Object.assign({}, formItemInputContext), {\n isFormItemInput: false\n }), [formItemInputContext]);\n const sharedProps = Object.assign(Object.assign({}, props), {\n fullscreen,\n divRef\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-header`,\n ref: divRef\n }, /*#__PURE__*/React.createElement(_context.FormItemInputContext.Provider, {\n value: mergedFormItemInputContext\n }, /*#__PURE__*/React.createElement(YearSelect, Object.assign({}, sharedProps, {\n onChange: v => {\n onChange(v, 'year');\n }\n })), mode === 'month' && (/*#__PURE__*/React.createElement(MonthSelect, Object.assign({}, sharedProps, {\n onChange: v => {\n onChange(v, 'month');\n }\n })))), /*#__PURE__*/React.createElement(ModeSwitch, Object.assign({}, sharedProps, {\n onModeChange: onModeChange\n })));\n}\nvar _default = exports.default = CalendarHeader;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcPicker = require(\"rc-picker\");\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _locale = require(\"../locale\");\nvar _Header = _interopRequireDefault(require(\"./Header\"));\nvar _en_US = _interopRequireDefault(require(\"./locale/en_US\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst isSameYear = (date1, date2, config) => {\n const {\n getYear\n } = config;\n return date1 && date2 && getYear(date1) === getYear(date2);\n};\nconst isSameMonth = (date1, date2, config) => {\n const {\n getMonth\n } = config;\n return isSameYear(date1, date2, config) && getMonth(date1) === getMonth(date2);\n};\nconst isSameDate = (date1, date2, config) => {\n const {\n getDate\n } = config;\n return isSameMonth(date1, date2, config) && getDate(date1) === getDate(date2);\n};\nconst generateCalendar = generateConfig => {\n const Calendar = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n dateFullCellRender,\n dateCellRender,\n monthFullCellRender,\n monthCellRender,\n cellRender,\n fullCellRender,\n headerRender,\n value,\n defaultValue,\n disabledDate,\n mode,\n validRange,\n fullscreen = true,\n onChange,\n onPanelChange,\n onSelect\n } = props;\n const {\n getPrefixCls,\n direction,\n calendar\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('picker', customizePrefixCls);\n const calendarPrefixCls = `${prefixCls}-calendar`;\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, calendarPrefixCls);\n const today = generateConfig.getNow();\n // ====================== Warning =======================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Calendar');\n warning.deprecated(!dateFullCellRender, 'dateFullCellRender', 'fullCellRender');\n warning.deprecated(!dateCellRender, 'dateCellRender', 'cellRender');\n warning.deprecated(!monthFullCellRender, 'monthFullCellRender', 'fullCellRender');\n warning.deprecated(!monthCellRender, 'monthCellRender', 'cellRender');\n }\n // ====================== State =======================\n // Value\n const [mergedValue, setMergedValue] = (0, _useMergedState.default)(() => value || generateConfig.getNow(), {\n defaultValue,\n value\n });\n // Mode\n const [mergedMode, setMergedMode] = (0, _useMergedState.default)('month', {\n value: mode\n });\n const panelMode = React.useMemo(() => mergedMode === 'year' ? 'month' : 'date', [mergedMode]);\n // Disabled Date\n const mergedDisabledDate = React.useCallback(date => {\n const notInRange = validRange ? generateConfig.isAfter(validRange[0], date) || generateConfig.isAfter(date, validRange[1]) : false;\n return notInRange || !!(disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date));\n }, [disabledDate, validRange]);\n // ====================== Events ======================\n const triggerPanelChange = (date, newMode) => {\n onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(date, newMode);\n };\n const triggerChange = date => {\n setMergedValue(date);\n if (!isSameDate(date, mergedValue, generateConfig)) {\n // Trigger when month panel switch month\n if (panelMode === 'date' && !isSameMonth(date, mergedValue, generateConfig) || panelMode === 'month' && !isSameYear(date, mergedValue, generateConfig)) {\n triggerPanelChange(date, mergedMode);\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(date);\n }\n };\n const triggerModeChange = newMode => {\n setMergedMode(newMode);\n triggerPanelChange(mergedValue, newMode);\n };\n const onInternalSelect = (date, source) => {\n triggerChange(date);\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(date, {\n source\n });\n };\n // ====================== Render ======================\n const dateRender = React.useCallback((date, info) => {\n if (fullCellRender) {\n return fullCellRender(date, info);\n }\n if (dateFullCellRender) {\n return dateFullCellRender(date);\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-cell-inner`, `${calendarPrefixCls}-date`, {\n [`${calendarPrefixCls}-date-today`]: isSameDate(today, date, generateConfig)\n })\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${calendarPrefixCls}-date-value`\n }, String(generateConfig.getDate(date)).padStart(2, '0')), /*#__PURE__*/React.createElement(\"div\", {\n className: `${calendarPrefixCls}-date-content`\n }, cellRender ? cellRender(date, info) : dateCellRender === null || dateCellRender === void 0 ? void 0 : dateCellRender(date)));\n }, [dateFullCellRender, dateCellRender, cellRender, fullCellRender]);\n const monthRender = React.useCallback((date, info) => {\n if (fullCellRender) {\n return fullCellRender(date, info);\n }\n if (monthFullCellRender) {\n return monthFullCellRender(date);\n }\n const months = info.locale.shortMonths || generateConfig.locale.getShortMonths(info.locale.locale);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-cell-inner`, `${calendarPrefixCls}-date`, {\n [`${calendarPrefixCls}-date-today`]: isSameMonth(today, date, generateConfig)\n })\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${calendarPrefixCls}-date-value`\n }, months[generateConfig.getMonth(date)]), /*#__PURE__*/React.createElement(\"div\", {\n className: `${calendarPrefixCls}-date-content`\n }, cellRender ? cellRender(date, info) : monthCellRender === null || monthCellRender === void 0 ? void 0 : monthCellRender(date)));\n }, [monthFullCellRender, monthCellRender, cellRender, fullCellRender]);\n const [contextLocale] = (0, _locale.useLocale)('Calendar', _en_US.default);\n const locale = Object.assign(Object.assign({}, contextLocale), props.locale);\n const mergedCellRender = (current, info) => {\n if (info.type === 'date') {\n return dateRender(current, info);\n }\n if (info.type === 'month') {\n return monthRender(current, Object.assign(Object.assign({}, info), {\n locale: locale === null || locale === void 0 ? void 0 : locale.lang\n }));\n }\n };\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(calendarPrefixCls, {\n [`${calendarPrefixCls}-full`]: fullscreen,\n [`${calendarPrefixCls}-mini`]: !fullscreen,\n [`${calendarPrefixCls}-rtl`]: direction === 'rtl'\n }, calendar === null || calendar === void 0 ? void 0 : calendar.className, className, rootClassName, hashId, cssVarCls),\n style: Object.assign(Object.assign({}, calendar === null || calendar === void 0 ? void 0 : calendar.style), style)\n }, headerRender ? headerRender({\n value: mergedValue,\n type: mergedMode,\n onChange: nextDate => {\n onInternalSelect(nextDate, 'customize');\n },\n onTypeChange: triggerModeChange\n }) : (/*#__PURE__*/React.createElement(_Header.default, {\n prefixCls: calendarPrefixCls,\n value: mergedValue,\n generateConfig: generateConfig,\n mode: mergedMode,\n fullscreen: fullscreen,\n locale: locale === null || locale === void 0 ? void 0 : locale.lang,\n validRange: validRange,\n onChange: onInternalSelect,\n onModeChange: triggerModeChange\n })), /*#__PURE__*/React.createElement(_rcPicker.PickerPanel, {\n value: mergedValue,\n prefixCls: prefixCls,\n locale: locale === null || locale === void 0 ? void 0 : locale.lang,\n generateConfig: generateConfig,\n cellRender: mergedCellRender,\n onSelect: nextDate => {\n onInternalSelect(nextDate, panelMode);\n },\n mode: panelMode,\n picker: panelMode,\n disabledDate: mergedDisabledDate,\n hideHeader: true\n })));\n };\n if (process.env.NODE_ENV !== 'production') {\n Calendar.displayName = 'Calendar';\n }\n return Calendar;\n};\nvar _default = exports.default = generateCalendar;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _dayjs = _interopRequireDefault(require(\"rc-picker/lib/generate/dayjs\"));\nvar _generateCalendar = _interopRequireDefault(require(\"./generateCalendar\"));\nconst Calendar = (0, _generateCalendar.default)(_dayjs.default);\nCalendar.generateCalendar = _generateCalendar.default;\nvar _default = exports.default = Calendar;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"../../date-picker/locale/en_US\"));\nvar _default = exports.default = _en_US.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.genCalendarStyles = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../date-picker/style\");\nvar _style2 = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genCalendarStyles = token => {\n const {\n calendarCls,\n componentCls,\n fullBg,\n fullPanelBg,\n itemActiveBg\n } = token;\n return {\n [calendarCls]: Object.assign(Object.assign(Object.assign({}, (0, _style.genPanelStyle)(token)), (0, _style2.resetComponent)(token)), {\n background: fullBg,\n '&-rtl': {\n direction: 'rtl'\n },\n [`${calendarCls}-header`]: {\n display: 'flex',\n justifyContent: 'flex-end',\n padding: `${(0, _cssinjs.unit)(token.paddingSM)} 0`,\n [`${calendarCls}-year-select`]: {\n minWidth: token.yearControlWidth\n },\n [`${calendarCls}-month-select`]: {\n minWidth: token.monthControlWidth,\n marginInlineStart: token.marginXS\n },\n [`${calendarCls}-mode-switch`]: {\n marginInlineStart: token.marginXS\n }\n }\n }),\n [`${calendarCls} ${componentCls}-panel`]: {\n background: fullPanelBg,\n border: 0,\n borderTop: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n borderRadius: 0,\n [`${componentCls}-month-panel, ${componentCls}-date-panel`]: {\n width: 'auto'\n },\n [`${componentCls}-body`]: {\n padding: `${(0, _cssinjs.unit)(token.paddingXS)} 0`\n },\n [`${componentCls}-content`]: {\n width: '100%'\n }\n },\n [`${calendarCls}-mini`]: {\n borderRadius: token.borderRadiusLG,\n [`${calendarCls}-header`]: {\n paddingInlineEnd: token.paddingXS,\n paddingInlineStart: token.paddingXS\n },\n [`${componentCls}-panel`]: {\n borderRadius: `0 0 ${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)}`\n },\n [`${componentCls}-content`]: {\n height: token.miniContentHeight,\n th: {\n height: 'auto',\n padding: 0,\n lineHeight: (0, _cssinjs.unit)(token.weekHeight)\n }\n },\n [`${componentCls}-cell::before`]: {\n pointerEvents: 'none'\n }\n },\n [`${calendarCls}${calendarCls}-full`]: {\n [`${componentCls}-panel`]: {\n display: 'block',\n width: '100%',\n textAlign: 'end',\n background: fullBg,\n border: 0,\n [`${componentCls}-body`]: {\n 'th, td': {\n padding: 0\n },\n th: {\n height: 'auto',\n paddingInlineEnd: token.paddingSM,\n paddingBottom: token.paddingXXS,\n lineHeight: (0, _cssinjs.unit)(token.weekHeight)\n }\n }\n },\n [`${componentCls}-cell`]: {\n '&::before': {\n display: 'none'\n },\n '&:hover': {\n [`${calendarCls}-date`]: {\n background: token.controlItemBgHover\n }\n },\n [`${calendarCls}-date-today::before`]: {\n display: 'none'\n },\n // >>> Selected\n [`&-in-view${componentCls}-cell-selected`]: {\n [`${calendarCls}-date, ${calendarCls}-date-today`]: {\n background: itemActiveBg\n }\n },\n '&-selected, &-selected:hover': {\n [`${calendarCls}-date, ${calendarCls}-date-today`]: {\n [`${calendarCls}-date-value`]: {\n color: token.colorPrimary\n }\n }\n }\n },\n [`${calendarCls}-date`]: {\n display: 'block',\n width: 'auto',\n height: 'auto',\n margin: `0 ${(0, _cssinjs.unit)(token.calc(token.marginXS).div(2).equal())}`,\n padding: `${(0, _cssinjs.unit)(token.calc(token.paddingXS).div(2).equal())} ${(0, _cssinjs.unit)(token.paddingXS)} 0`,\n border: 0,\n borderTop: `${(0, _cssinjs.unit)(token.lineWidthBold)} ${token.lineType} ${token.colorSplit}`,\n borderRadius: 0,\n transition: `background ${token.motionDurationSlow}`,\n '&-value': {\n lineHeight: (0, _cssinjs.unit)(token.dateValueHeight),\n transition: `color ${token.motionDurationSlow}`\n },\n '&-content': {\n position: 'static',\n width: 'auto',\n height: token.dateContentHeight,\n overflowY: 'auto',\n color: token.colorText,\n lineHeight: token.lineHeight,\n textAlign: 'start'\n },\n '&-today': {\n borderColor: token.colorPrimary,\n [`${calendarCls}-date-value`]: {\n color: token.colorText\n }\n }\n }\n },\n [`@media only screen and (max-width: ${(0, _cssinjs.unit)(token.screenXS)}) `]: {\n [calendarCls]: {\n [`${calendarCls}-header`]: {\n display: 'block',\n [`${calendarCls}-year-select`]: {\n width: '50%'\n },\n [`${calendarCls}-month-select`]: {\n width: `calc(50% - ${(0, _cssinjs.unit)(token.paddingXS)})`\n },\n [`${calendarCls}-mode-switch`]: {\n width: '100%',\n marginTop: token.marginXS,\n marginInlineStart: 0,\n '> label': {\n width: '50%',\n textAlign: 'center'\n }\n }\n }\n }\n }\n };\n};\nexports.genCalendarStyles = genCalendarStyles;\nconst prepareComponentToken = token => Object.assign({\n fullBg: token.colorBgContainer,\n fullPanelBg: token.colorBgContainer,\n itemActiveBg: token.controlItemBgActive,\n yearControlWidth: 80,\n monthControlWidth: 70,\n miniContentHeight: 256\n}, (0, _style.initPanelComponentToken)(token));\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Calendar', token => {\n const calendarCls = `${token.componentCls}-calendar`;\n const calendarToken = (0, _internal.mergeToken)(token, (0, _style.initPickerPanelToken)(token), {\n calendarCls,\n pickerCellInnerCls: `${token.componentCls}-cell-inner`,\n dateValueHeight: token.controlHeightSM,\n weekHeight: token.calc(token.controlHeightSM).mul(0.75).equal(),\n dateContentHeight: token.calc(token.calc(token.fontHeightSM).add(token.marginXS)).mul(3).add(token.calc(token.lineWidth).mul(2)).equal()\n });\n return [genCalendarStyles(calendarToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _skeleton = _interopRequireDefault(require(\"../skeleton\"));\nvar _tabs = _interopRequireDefault(require(\"../tabs\"));\nvar _Grid = _interopRequireDefault(require(\"./Grid\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst ActionNode = props => {\n const {\n actionClasses,\n actions = [],\n actionStyle\n } = props;\n return /*#__PURE__*/React.createElement(\"ul\", {\n className: actionClasses,\n style: actionStyle\n }, actions.map((action, index) => {\n // Move this out since eslint not allow index key\n // And eslint-disable makes conflict with rollup\n // ref https://github.com/ant-design/ant-design/issues/46022\n const key = `action-${index}`;\n return /*#__PURE__*/React.createElement(\"li\", {\n style: {\n width: `${100 / actions.length}%`\n },\n key: key\n }, /*#__PURE__*/React.createElement(\"span\", null, action));\n }));\n};\nconst Card = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n extra,\n headStyle = {},\n bodyStyle = {},\n title,\n loading,\n bordered = true,\n size: customizeSize,\n type,\n cover,\n actions,\n tabList,\n children,\n activeTabKey,\n defaultActiveTabKey,\n tabBarExtraContent,\n hoverable,\n tabProps = {},\n classNames: customClassNames,\n styles: customStyles\n } = props,\n others = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"extra\", \"headStyle\", \"bodyStyle\", \"title\", \"loading\", \"bordered\", \"size\", \"type\", \"cover\", \"actions\", \"tabList\", \"children\", \"activeTabKey\", \"defaultActiveTabKey\", \"tabBarExtraContent\", \"hoverable\", \"tabProps\", \"classNames\", \"styles\"]);\n const {\n getPrefixCls,\n direction,\n card\n } = React.useContext(_configProvider.ConfigContext);\n // =================Warning===================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Card');\n [['headStyle', 'styles.header'], ['bodyStyle', 'styles.body']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n }\n const onTabChange = key => {\n var _a;\n (_a = props.onTabChange) === null || _a === void 0 ? void 0 : _a.call(props, key);\n };\n const moduleClass = moduleName => {\n var _a;\n return (0, _classnames.default)((_a = card === null || card === void 0 ? void 0 : card.classNames) === null || _a === void 0 ? void 0 : _a[moduleName], customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames[moduleName]);\n };\n const moduleStyle = moduleName => {\n var _a;\n return Object.assign(Object.assign({}, (_a = card === null || card === void 0 ? void 0 : card.styles) === null || _a === void 0 ? void 0 : _a[moduleName]), customStyles === null || customStyles === void 0 ? void 0 : customStyles[moduleName]);\n };\n const isContainGrid = React.useMemo(() => {\n let containGrid = false;\n React.Children.forEach(children, element => {\n if ((element === null || element === void 0 ? void 0 : element.type) === _Grid.default) {\n containGrid = true;\n }\n });\n return containGrid;\n }, [children]);\n const prefixCls = getPrefixCls('card', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const loadingBlock = /*#__PURE__*/React.createElement(_skeleton.default, {\n loading: true,\n active: true,\n paragraph: {\n rows: 4\n },\n title: false\n }, children);\n const hasActiveTabKey = activeTabKey !== undefined;\n const extraProps = Object.assign(Object.assign({}, tabProps), {\n [hasActiveTabKey ? 'activeKey' : 'defaultActiveKey']: hasActiveTabKey ? activeTabKey : defaultActiveTabKey,\n tabBarExtraContent\n });\n let head;\n const mergedSize = (0, _useSize.default)(customizeSize);\n const tabSize = !mergedSize || mergedSize === 'default' ? 'large' : mergedSize;\n const tabs = tabList ? (/*#__PURE__*/React.createElement(_tabs.default, Object.assign({\n size: tabSize\n }, extraProps, {\n className: `${prefixCls}-head-tabs`,\n onChange: onTabChange,\n items: tabList.map(_a => {\n var {\n tab\n } = _a,\n item = __rest(_a, [\"tab\"]);\n return Object.assign({\n label: tab\n }, item);\n })\n }))) : null;\n if (title || extra || tabs) {\n const headClasses = (0, _classnames.default)(`${prefixCls}-head`, moduleClass('header'));\n const titleClasses = (0, _classnames.default)(`${prefixCls}-head-title`, moduleClass('title'));\n const extraClasses = (0, _classnames.default)(`${prefixCls}-extra`, moduleClass('extra'));\n const mergedHeadStyle = Object.assign(Object.assign({}, headStyle), moduleStyle('header'));\n head = /*#__PURE__*/React.createElement(\"div\", {\n className: headClasses,\n style: mergedHeadStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-head-wrapper`\n }, title && (/*#__PURE__*/React.createElement(\"div\", {\n className: titleClasses,\n style: moduleStyle('title')\n }, title)), extra && (/*#__PURE__*/React.createElement(\"div\", {\n className: extraClasses,\n style: moduleStyle('extra')\n }, extra))), tabs);\n }\n const coverClasses = (0, _classnames.default)(`${prefixCls}-cover`, moduleClass('cover'));\n const coverDom = cover ? (/*#__PURE__*/React.createElement(\"div\", {\n className: coverClasses,\n style: moduleStyle('cover')\n }, cover)) : null;\n const bodyClasses = (0, _classnames.default)(`${prefixCls}-body`, moduleClass('body'));\n const mergedBodyStyle = Object.assign(Object.assign({}, bodyStyle), moduleStyle('body'));\n const body = /*#__PURE__*/React.createElement(\"div\", {\n className: bodyClasses,\n style: mergedBodyStyle\n }, loading ? loadingBlock : children);\n const actionClasses = (0, _classnames.default)(`${prefixCls}-actions`, moduleClass('actions'));\n const actionDom = (actions === null || actions === void 0 ? void 0 : actions.length) ? (/*#__PURE__*/React.createElement(ActionNode, {\n actionClasses: actionClasses,\n actionStyle: moduleStyle('actions'),\n actions: actions\n })) : null;\n const divProps = (0, _omit.default)(others, ['onTabChange']);\n const classString = (0, _classnames.default)(prefixCls, card === null || card === void 0 ? void 0 : card.className, {\n [`${prefixCls}-loading`]: loading,\n [`${prefixCls}-bordered`]: bordered,\n [`${prefixCls}-hoverable`]: hoverable,\n [`${prefixCls}-contain-grid`]: isContainGrid,\n [`${prefixCls}-contain-tabs`]: tabList === null || tabList === void 0 ? void 0 : tabList.length,\n [`${prefixCls}-${mergedSize}`]: mergedSize,\n [`${prefixCls}-type-${type}`]: !!type,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, card === null || card === void 0 ? void 0 : card.style), style);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({\n ref: ref\n }, divProps, {\n className: classString,\n style: mergedStyle\n }), head, coverDom, body, actionDom));\n});\nvar _default = exports.default = Card;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Grid = _a => {\n var {\n prefixCls,\n className,\n hoverable = true\n } = _a,\n props = __rest(_a, [\"prefixCls\", \"className\", \"hoverable\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefix = getPrefixCls('card', prefixCls);\n const classString = (0, _classnames.default)(`${prefix}-grid`, className, {\n [`${prefix}-grid-hoverable`]: hoverable\n });\n return /*#__PURE__*/React.createElement(\"div\", Object.assign({}, props, {\n className: classString\n }));\n};\nvar _default = exports.default = Grid;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Meta = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n avatar,\n title,\n description\n } = props,\n others = __rest(props, [\"prefixCls\", \"className\", \"avatar\", \"title\", \"description\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('card', customizePrefixCls);\n const classString = (0, _classnames.default)(`${prefixCls}-meta`, className);\n const avatarDom = avatar ? (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-meta-avatar`\n }, avatar)) : null;\n const titleDom = title ? (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-meta-title`\n }, title)) : null;\n const descriptionDom = description ? (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-meta-description`\n }, description)) : null;\n const MetaDetail = titleDom || descriptionDom ? (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-meta-detail`\n }, titleDom, descriptionDom)) : null;\n return /*#__PURE__*/React.createElement(\"div\", Object.assign({}, others, {\n className: classString\n }), avatarDom, MetaDetail);\n};\nvar _default = exports.default = Meta;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Card = _interopRequireDefault(require(\"./Card\"));\nvar _Grid = _interopRequireDefault(require(\"./Grid\"));\nvar _Meta = _interopRequireDefault(require(\"./Meta\"));\nconst Card = _Card.default;\nCard.Grid = _Grid.default;\nCard.Meta = _Meta.default;\nif (process.env.NODE_ENV !== 'production') {\n Card.displayName = 'Card';\n}\nvar _default = exports.default = Card;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Styles ==============================\n// ============================== Head ==============================\nconst genCardHeadStyle = token => {\n const {\n antCls,\n componentCls,\n headerHeight,\n cardPaddingBase,\n tabsMarginBottom\n } = token;\n return Object.assign(Object.assign({\n display: 'flex',\n justifyContent: 'center',\n flexDirection: 'column',\n minHeight: headerHeight,\n marginBottom: -1,\n padding: `0 ${(0, _cssinjs.unit)(cardPaddingBase)}`,\n color: token.colorTextHeading,\n fontWeight: token.fontWeightStrong,\n fontSize: token.headerFontSize,\n background: token.headerBg,\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,\n borderRadius: `${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)} 0 0`\n }, (0, _style.clearFix)()), {\n '&-wrapper': {\n width: '100%',\n display: 'flex',\n alignItems: 'center'\n },\n '&-title': Object.assign(Object.assign({\n display: 'inline-block',\n flex: 1\n }, _style.textEllipsis), {\n [`\n > ${componentCls}-typography,\n > ${componentCls}-typography-edit-content\n `]: {\n insetInlineStart: 0,\n marginTop: 0,\n marginBottom: 0\n }\n }),\n [`${antCls}-tabs-top`]: {\n clear: 'both',\n marginBottom: tabsMarginBottom,\n color: token.colorText,\n fontWeight: 'normal',\n fontSize: token.fontSize,\n '&-bar': {\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`\n }\n }\n });\n};\n// ============================== Grid ==============================\nconst genCardGridStyle = token => {\n const {\n cardPaddingBase,\n colorBorderSecondary,\n cardShadow,\n lineWidth\n } = token;\n return {\n width: '33.33%',\n padding: cardPaddingBase,\n border: 0,\n borderRadius: 0,\n boxShadow: `\n ${(0, _cssinjs.unit)(lineWidth)} 0 0 0 ${colorBorderSecondary},\n 0 ${(0, _cssinjs.unit)(lineWidth)} 0 0 ${colorBorderSecondary},\n ${(0, _cssinjs.unit)(lineWidth)} ${(0, _cssinjs.unit)(lineWidth)} 0 0 ${colorBorderSecondary},\n ${(0, _cssinjs.unit)(lineWidth)} 0 0 0 ${colorBorderSecondary} inset,\n 0 ${(0, _cssinjs.unit)(lineWidth)} 0 0 ${colorBorderSecondary} inset;\n `,\n transition: `all ${token.motionDurationMid}`,\n '&-hoverable:hover': {\n position: 'relative',\n zIndex: 1,\n boxShadow: cardShadow\n }\n };\n};\n// ============================== Actions ==============================\nconst genCardActionsStyle = token => {\n const {\n componentCls,\n iconCls,\n actionsLiMargin,\n cardActionsIconSize,\n colorBorderSecondary,\n actionsBg\n } = token;\n return Object.assign(Object.assign({\n margin: 0,\n padding: 0,\n listStyle: 'none',\n background: actionsBg,\n borderTop: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,\n display: 'flex',\n borderRadius: `0 0 ${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)}`\n }, (0, _style.clearFix)()), {\n '& > li': {\n margin: actionsLiMargin,\n color: token.colorTextDescription,\n textAlign: 'center',\n '> span': {\n position: 'relative',\n display: 'block',\n minWidth: token.calc(token.cardActionsIconSize).mul(2).equal(),\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n cursor: 'pointer',\n '&:hover': {\n color: token.colorPrimary,\n transition: `color ${token.motionDurationMid}`\n },\n [`a:not(${componentCls}-btn), > ${iconCls}`]: {\n display: 'inline-block',\n width: '100%',\n color: token.colorTextDescription,\n lineHeight: (0, _cssinjs.unit)(token.fontHeight),\n transition: `color ${token.motionDurationMid}`,\n '&:hover': {\n color: token.colorPrimary\n }\n },\n [`> ${iconCls}`]: {\n fontSize: cardActionsIconSize,\n lineHeight: (0, _cssinjs.unit)(token.calc(cardActionsIconSize).mul(token.lineHeight).equal())\n }\n },\n '&:not(:last-child)': {\n borderInlineEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`\n }\n }\n });\n};\n// ============================== Meta ==============================\nconst genCardMetaStyle = token => Object.assign(Object.assign({\n margin: `${(0, _cssinjs.unit)(token.calc(token.marginXXS).mul(-1).equal())} 0`,\n display: 'flex'\n}, (0, _style.clearFix)()), {\n '&-avatar': {\n paddingInlineEnd: token.padding\n },\n '&-detail': {\n overflow: 'hidden',\n flex: 1,\n '> div:not(:last-child)': {\n marginBottom: token.marginXS\n }\n },\n '&-title': Object.assign({\n color: token.colorTextHeading,\n fontWeight: token.fontWeightStrong,\n fontSize: token.fontSizeLG\n }, _style.textEllipsis),\n '&-description': {\n color: token.colorTextDescription\n }\n});\n// ============================== Inner ==============================\nconst genCardTypeInnerStyle = token => {\n const {\n componentCls,\n cardPaddingBase,\n colorFillAlter\n } = token;\n return {\n [`${componentCls}-head`]: {\n padding: `0 ${(0, _cssinjs.unit)(cardPaddingBase)}`,\n background: colorFillAlter,\n '&-title': {\n fontSize: token.fontSize\n }\n },\n [`${componentCls}-body`]: {\n padding: `${(0, _cssinjs.unit)(token.padding)} ${(0, _cssinjs.unit)(cardPaddingBase)}`\n }\n };\n};\n// ============================== Loading ==============================\nconst genCardLoadingStyle = token => {\n const {\n componentCls\n } = token;\n return {\n overflow: 'hidden',\n [`${componentCls}-body`]: {\n userSelect: 'none'\n }\n };\n};\n// ============================== Basic ==============================\nconst genCardStyle = token => {\n const {\n componentCls,\n cardShadow,\n cardHeadPadding,\n colorBorderSecondary,\n boxShadowTertiary,\n cardPaddingBase,\n extraColor\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n background: token.colorBgContainer,\n borderRadius: token.borderRadiusLG,\n [`&:not(${componentCls}-bordered)`]: {\n boxShadow: boxShadowTertiary\n },\n [`${componentCls}-head`]: genCardHeadStyle(token),\n [`${componentCls}-extra`]: {\n // https://stackoverflow.com/a/22429853/3040605\n marginInlineStart: 'auto',\n color: extraColor,\n fontWeight: 'normal',\n fontSize: token.fontSize\n },\n [`${componentCls}-body`]: Object.assign({\n padding: cardPaddingBase,\n borderRadius: `0 0 ${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)}`\n }, (0, _style.clearFix)()),\n [`${componentCls}-grid`]: genCardGridStyle(token),\n [`${componentCls}-cover`]: {\n '> *': {\n display: 'block',\n width: '100%',\n borderRadius: `${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)} 0 0`\n }\n },\n [`${componentCls}-actions`]: genCardActionsStyle(token),\n [`${componentCls}-meta`]: genCardMetaStyle(token)\n }),\n [`${componentCls}-bordered`]: {\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,\n [`${componentCls}-cover`]: {\n marginTop: -1,\n marginInlineStart: -1,\n marginInlineEnd: -1\n }\n },\n [`${componentCls}-hoverable`]: {\n cursor: 'pointer',\n transition: `box-shadow ${token.motionDurationMid}, border-color ${token.motionDurationMid}`,\n '&:hover': {\n borderColor: 'transparent',\n boxShadow: cardShadow\n }\n },\n [`${componentCls}-contain-grid`]: {\n borderRadius: `${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)} 0 0 `,\n [`${componentCls}-body`]: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n [`&:not(${componentCls}-loading) ${componentCls}-body`]: {\n marginBlockStart: token.calc(token.lineWidth).mul(-1).equal(),\n marginInlineStart: token.calc(token.lineWidth).mul(-1).equal(),\n padding: 0\n }\n },\n [`${componentCls}-contain-tabs`]: {\n [`> div${componentCls}-head`]: {\n minHeight: 0,\n [`${componentCls}-head-title, ${componentCls}-extra`]: {\n paddingTop: cardHeadPadding\n }\n }\n },\n [`${componentCls}-type-inner`]: genCardTypeInnerStyle(token),\n [`${componentCls}-loading`]: genCardLoadingStyle(token),\n [`${componentCls}-rtl`]: {\n direction: 'rtl'\n }\n };\n};\n// ============================== Size ==============================\nconst genCardSizeStyle = token => {\n const {\n componentCls,\n cardPaddingSM,\n headerHeightSM,\n headerFontSizeSM\n } = token;\n return {\n [`${componentCls}-small`]: {\n [`> ${componentCls}-head`]: {\n minHeight: headerHeightSM,\n padding: `0 ${(0, _cssinjs.unit)(cardPaddingSM)}`,\n fontSize: headerFontSizeSM,\n [`> ${componentCls}-head-wrapper`]: {\n [`> ${componentCls}-extra`]: {\n fontSize: token.fontSize\n }\n }\n },\n [`> ${componentCls}-body`]: {\n padding: cardPaddingSM\n }\n },\n [`${componentCls}-small${componentCls}-contain-tabs`]: {\n [`> ${componentCls}-head`]: {\n [`${componentCls}-head-title, ${componentCls}-extra`]: {\n paddingTop: 0,\n display: 'flex',\n alignItems: 'center'\n }\n }\n }\n };\n};\nconst prepareComponentToken = token => ({\n headerBg: 'transparent',\n headerFontSize: token.fontSizeLG,\n headerFontSizeSM: token.fontSize,\n headerHeight: token.fontSizeLG * token.lineHeightLG + token.padding * 2,\n headerHeightSM: token.fontSize * token.lineHeight + token.paddingXS * 2,\n actionsBg: token.colorBgContainer,\n actionsLiMargin: `${token.paddingSM}px 0`,\n tabsMarginBottom: -token.padding - token.lineWidth,\n extraColor: token.colorText\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Card', token => {\n const cardToken = (0, _internal.mergeToken)(token, {\n cardShadow: token.boxShadowCard,\n cardHeadPadding: token.padding,\n cardPaddingBase: token.paddingLG,\n cardActionsIconSize: token.fontSize,\n cardPaddingSM: 12 // Fixed padding.\n });\n return [\n // Style\n genCardStyle(cardToken),\n // Size\n genCardSizeStyle(cardToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _reactSlick = _interopRequireDefault(require(\"@ant-design/react-slick\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst dotsClass = 'slick-dots';\nconst ArrowButton = _a => {\n var {\n currentSlide,\n slideCount\n } = _a,\n rest = __rest(_a, [\"currentSlide\", \"slideCount\"]);\n return /*#__PURE__*/React.createElement(\"button\", Object.assign({\n type: \"button\"\n }, rest));\n};\nconst Carousel = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n dots = true,\n arrows = false,\n prevArrow = /*#__PURE__*/React.createElement(ArrowButton, {\n \"aria-label\": \"prev\"\n }),\n nextArrow = /*#__PURE__*/React.createElement(ArrowButton, {\n \"aria-label\": \"next\"\n }),\n draggable = false,\n waitForAnimate = false,\n dotPosition = 'bottom',\n vertical = dotPosition === 'left' || dotPosition === 'right',\n rootClassName,\n className: customClassName,\n style,\n id\n } = props,\n otherProps = __rest(props, [\"dots\", \"arrows\", \"prevArrow\", \"nextArrow\", \"draggable\", \"waitForAnimate\", \"dotPosition\", \"vertical\", \"rootClassName\", \"className\", \"style\", \"id\"]);\n const {\n getPrefixCls,\n direction,\n carousel\n } = React.useContext(_configProvider.ConfigContext);\n const slickRef = React.useRef();\n const goTo = function (slide) {\n let dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n slickRef.current.slickGoTo(slide, dontAnimate);\n };\n React.useImperativeHandle(ref, () => ({\n goTo,\n autoPlay: slickRef.current.innerSlider.autoPlay,\n innerSlider: slickRef.current.innerSlider,\n prev: slickRef.current.slickPrev,\n next: slickRef.current.slickNext\n }), [slickRef.current]);\n const prevCount = React.useRef(React.Children.count(props.children));\n React.useEffect(() => {\n if (prevCount.current !== React.Children.count(props.children)) {\n goTo(props.initialSlide || 0, false);\n prevCount.current = React.Children.count(props.children);\n }\n }, [props.children]);\n const newProps = Object.assign({\n vertical,\n className: (0, _classnames.default)(customClassName, carousel === null || carousel === void 0 ? void 0 : carousel.className),\n style: Object.assign(Object.assign({}, carousel === null || carousel === void 0 ? void 0 : carousel.style), style)\n }, otherProps);\n if (newProps.effect === 'fade') {\n newProps.fade = true;\n }\n const prefixCls = getPrefixCls('carousel', newProps.prefixCls);\n const enableDots = !!dots;\n const dsClass = (0, _classnames.default)(dotsClass, `${dotsClass}-${dotPosition}`, typeof dots === 'boolean' ? false : dots === null || dots === void 0 ? void 0 : dots.className);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const className = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-vertical`]: newProps.vertical\n }, hashId, cssVarCls, rootClassName);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: className,\n id: id\n }, /*#__PURE__*/React.createElement(_reactSlick.default, Object.assign({\n ref: slickRef\n }, newProps, {\n dots: enableDots,\n dotsClass: dsClass,\n arrows: arrows,\n prevArrow: prevArrow,\n nextArrow: nextArrow,\n draggable: draggable,\n verticalSwiping: vertical,\n waitForAnimate: waitForAnimate\n }))));\n});\nif (process.env.NODE_ENV !== 'production') {\n Carousel.displayName = 'Carousel';\n}\nvar _default = exports.default = Carousel;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genCarouselStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n '.slick-slider': {\n position: 'relative',\n display: 'block',\n boxSizing: 'border-box',\n touchAction: 'pan-y',\n WebkitTouchCallout: 'none',\n WebkitTapHighlightColor: 'transparent',\n '.slick-track, .slick-list': {\n transform: 'translate3d(0, 0, 0)',\n touchAction: 'pan-y'\n }\n },\n '.slick-list': {\n position: 'relative',\n display: 'block',\n margin: 0,\n padding: 0,\n overflow: 'hidden',\n '&:focus': {\n outline: 'none'\n },\n '&.dragging': {\n cursor: 'pointer'\n },\n '.slick-slide': {\n pointerEvents: 'none',\n // https://github.com/ant-design/ant-design/issues/23294\n [`input${antCls}-radio-input, input${antCls}-checkbox-input`]: {\n visibility: 'hidden'\n },\n '&.slick-active': {\n pointerEvents: 'auto',\n [`input${antCls}-radio-input, input${antCls}-checkbox-input`]: {\n visibility: 'visible'\n }\n },\n // fix Carousel content height not match parent node\n // when children is empty node\n // https://github.com/ant-design/ant-design/issues/25878\n '> div > div': {\n verticalAlign: 'bottom'\n }\n }\n },\n '.slick-track': {\n position: 'relative',\n top: 0,\n insetInlineStart: 0,\n display: 'block',\n '&::before, &::after': {\n display: 'table',\n content: '\"\"'\n },\n '&::after': {\n clear: 'both'\n }\n },\n '.slick-slide': {\n display: 'none',\n float: 'left',\n height: '100%',\n minHeight: 1,\n img: {\n display: 'block'\n },\n '&.dragging img': {\n pointerEvents: 'none'\n }\n },\n '.slick-initialized .slick-slide': {\n display: 'block'\n },\n '.slick-vertical .slick-slide': {\n display: 'block',\n height: 'auto'\n }\n })\n };\n};\nconst genArrowsStyle = token => {\n const {\n componentCls,\n motionDurationSlow,\n arrowSize,\n arrowOffset\n } = token;\n const arrowLength = token.calc(arrowSize).div(Math.SQRT2).equal();\n return [{\n [componentCls]: {\n // Arrows\n '.slick-prev, .slick-next': {\n position: 'absolute',\n top: '50%',\n width: arrowSize,\n height: arrowSize,\n transform: 'translateY(-50%)',\n color: '#fff',\n opacity: 0.4,\n background: 'transparent',\n padding: 0,\n lineHeight: 0,\n border: 0,\n outline: 'none',\n cursor: 'pointer',\n zIndex: 1,\n transition: `opacity ${motionDurationSlow}`,\n '&:hover, &:focus': {\n opacity: 1\n },\n '&.slick-disabled': {\n pointerEvents: 'none',\n opacity: 0\n },\n '&::after': {\n boxSizing: 'border-box',\n position: 'absolute',\n top: token.calc(arrowSize).sub(arrowLength).div(2).equal(),\n insetInlineStart: token.calc(arrowSize).sub(arrowLength).div(2).equal(),\n display: 'inline-block',\n width: arrowLength,\n height: arrowLength,\n border: `0 solid currentcolor`,\n borderInlineWidth: '2px 0',\n borderBlockWidth: '2px 0',\n borderRadius: 1,\n content: '\"\"'\n }\n },\n '.slick-prev': {\n insetInlineStart: arrowOffset,\n '&::after': {\n transform: 'rotate(-45deg)'\n }\n },\n '.slick-next': {\n insetInlineEnd: arrowOffset,\n '&::after': {\n transform: 'rotate(135deg)'\n }\n }\n }\n }];\n};\nconst genDotsStyle = token => {\n const {\n componentCls,\n dotOffset,\n dotWidth,\n dotHeight,\n dotGap,\n colorBgContainer,\n motionDurationSlow\n } = token;\n return [{\n [componentCls]: {\n '.slick-dots': {\n position: 'absolute',\n insetInlineEnd: 0,\n bottom: 0,\n insetInlineStart: 0,\n zIndex: 15,\n display: 'flex !important',\n justifyContent: 'center',\n paddingInlineStart: 0,\n margin: 0,\n listStyle: 'none',\n '&-bottom': {\n bottom: dotOffset\n },\n '&-top': {\n top: dotOffset,\n bottom: 'auto'\n },\n li: {\n position: 'relative',\n display: 'inline-block',\n flex: '0 1 auto',\n boxSizing: 'content-box',\n width: dotWidth,\n height: dotHeight,\n marginInline: dotGap,\n padding: 0,\n textAlign: 'center',\n textIndent: -999,\n verticalAlign: 'top',\n transition: `all ${motionDurationSlow}`,\n button: {\n position: 'relative',\n display: 'block',\n width: '100%',\n height: dotHeight,\n padding: 0,\n color: 'transparent',\n fontSize: 0,\n background: colorBgContainer,\n border: 0,\n borderRadius: dotHeight,\n outline: 'none',\n cursor: 'pointer',\n opacity: 0.2,\n transition: `all ${motionDurationSlow}`,\n '&: hover, &:focus': {\n opacity: 0.75\n },\n '&::after': {\n position: 'absolute',\n inset: token.calc(dotGap).mul(-1).equal(),\n content: '\"\"'\n }\n },\n '&.slick-active': {\n width: token.dotActiveWidth,\n '& button': {\n background: colorBgContainer,\n opacity: 1\n },\n '&: hover, &:focus': {\n opacity: 1\n }\n }\n }\n }\n }\n }];\n};\nconst genCarouselVerticalStyle = token => {\n const {\n componentCls,\n dotOffset,\n arrowOffset,\n marginXXS\n } = token;\n const reverseSizeOfDot = {\n width: token.dotHeight,\n height: token.dotWidth\n };\n return {\n [`${componentCls}-vertical`]: {\n '.slick-prev, .slick-next': {\n insetInlineStart: '50%',\n marginBlockStart: 'unset',\n transform: 'translateX(-50%)'\n },\n '.slick-prev': {\n insetBlockStart: arrowOffset,\n insetInlineStart: '50%',\n '&::after': {\n transform: 'rotate(45deg)'\n }\n },\n '.slick-next': {\n insetBlockStart: 'auto',\n insetBlockEnd: arrowOffset,\n '&::after': {\n transform: 'rotate(-135deg)'\n }\n },\n '.slick-dots': {\n top: '50%',\n bottom: 'auto',\n flexDirection: 'column',\n width: token.dotHeight,\n height: 'auto',\n margin: 0,\n transform: 'translateY(-50%)',\n '&-left': {\n insetInlineEnd: 'auto',\n insetInlineStart: dotOffset\n },\n '&-right': {\n insetInlineEnd: dotOffset,\n insetInlineStart: 'auto'\n },\n li: Object.assign(Object.assign({}, reverseSizeOfDot), {\n margin: `${(0, _cssinjs.unit)(marginXXS)} 0`,\n verticalAlign: 'baseline',\n button: reverseSizeOfDot,\n '&.slick-active': Object.assign(Object.assign({}, reverseSizeOfDot), {\n button: reverseSizeOfDot\n })\n })\n }\n }\n };\n};\nconst genCarouselRtlStyle = token => {\n const {\n componentCls\n } = token;\n return [{\n [`${componentCls}-rtl`]: {\n direction: 'rtl',\n // Dots\n '.slick-dots': {\n [`${componentCls}-rtl&`]: {\n flexDirection: 'row-reverse'\n }\n }\n }\n }, {\n [`${componentCls}-vertical`]: {\n '.slick-dots': {\n [`${componentCls}-rtl&`]: {\n flexDirection: 'column'\n }\n }\n }\n }];\n};\nconst prepareComponentToken = token => {\n const dotActiveWidth = 24;\n return {\n arrowSize: 16,\n arrowOffset: token.marginXS,\n dotWidth: 16,\n dotHeight: 3,\n dotGap: token.marginXXS,\n dotOffset: 12,\n dotWidthActive: dotActiveWidth,\n dotActiveWidth\n };\n};\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Carousel', token => [genCarouselStyle(token), genArrowsStyle(token), genDotsStyle(token), genCarouselVerticalStyle(token), genCarouselRtlStyle(token)], prepareComponentToken, {\n deprecatedTokens: [['dotWidthActive', 'dotActiveWidth']]\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcCascader = require(\"rc-cascader\");\nvar _defaultRenderEmpty = _interopRequireDefault(require(\"../config-provider/defaultRenderEmpty\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useBase = _interopRequireDefault(require(\"./hooks/useBase\"));\nvar _useCheckable = _interopRequireDefault(require(\"./hooks/useCheckable\"));\nvar _useColumnIcons = _interopRequireDefault(require(\"./hooks/useColumnIcons\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _panel = _interopRequireDefault(require(\"./style/panel\"));\nfunction CascaderPanel(props) {\n const {\n prefixCls: customizePrefixCls,\n className,\n multiple,\n rootClassName,\n notFoundContent,\n direction,\n expandIcon\n } = props;\n const [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty] = (0, _useBase.default)(customizePrefixCls, direction);\n const rootCls = (0, _useCSSVarCls.default)(cascaderPrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(cascaderPrefixCls, rootCls);\n (0, _panel.default)(cascaderPrefixCls);\n const isRtl = mergedDirection === 'rtl';\n // ===================== Icon ======================\n const [mergedExpandIcon, loadingIcon] = (0, _useColumnIcons.default)(prefixCls, isRtl, expandIcon);\n // ===================== Empty =====================\n const mergedNotFoundContent = notFoundContent || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Cascader')) || (/*#__PURE__*/React.createElement(_defaultRenderEmpty.default, {\n componentName: \"Cascader\"\n }));\n // =================== Multiple ====================\n const checkable = (0, _useCheckable.default)(cascaderPrefixCls, multiple);\n // ==================== Render =====================\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcCascader.Panel, Object.assign({}, props, {\n checkable: checkable,\n prefixCls: cascaderPrefixCls,\n className: (0, _classnames.default)(className, hashId, rootClassName, cssVarCls, rootCls),\n notFoundContent: mergedNotFoundContent,\n direction: mergedDirection,\n expandIcon: mergedExpandIcon,\n loadingIcon: loadingIcon\n })));\n}\nvar _default = exports.default = CascaderPanel;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _configProvider = require(\"../../config-provider\");\nfunction useBase(customizePrefixCls, direction) {\n const {\n getPrefixCls,\n direction: rootDirection,\n renderEmpty\n } = React.useContext(_configProvider.ConfigContext);\n const mergedDirection = direction || rootDirection;\n const prefixCls = getPrefixCls('select', customizePrefixCls);\n const cascaderPrefixCls = getPrefixCls('cascader', customizePrefixCls);\n return [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty];\n}\nvar _default = exports.default = useBase;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useCheckable;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction useCheckable(cascaderPrefixCls, multiple) {\n return React.useMemo(() => multiple ? /*#__PURE__*/React.createElement(\"span\", {\n className: `${cascaderPrefixCls}-checkbox-inner`\n }) : false, [multiple]);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _LeftOutlined = _interopRequireDefault(require(\"@ant-design/icons/LeftOutlined\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _RightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RightOutlined\"));\nconst useColumnIcons = (prefixCls, rtl, expandIcon) => {\n let mergedExpandIcon = expandIcon;\n if (!expandIcon) {\n mergedExpandIcon = rtl ? /*#__PURE__*/React.createElement(_LeftOutlined.default, null) : /*#__PURE__*/React.createElement(_RightOutlined.default, null);\n }\n const loadingIcon = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-menu-item-loading-icon`\n }, /*#__PURE__*/React.createElement(_LoadingOutlined.default, {\n spin: true\n }));\n return React.useMemo(() => [mergedExpandIcon, loadingIcon], [mergedExpandIcon]);\n};\nvar _default = exports.default = useColumnIcons;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcCascader = _interopRequireDefault(require(\"rc-cascader\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _defaultRenderEmpty = _interopRequireDefault(require(\"../config-provider/defaultRenderEmpty\"));\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _context = require(\"../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../form/hooks/useVariants\"));\nvar _mergedBuiltinPlacements = _interopRequireDefault(require(\"../select/mergedBuiltinPlacements\"));\nvar _style = _interopRequireDefault(require(\"../select/style\"));\nvar _useIcons = _interopRequireDefault(require(\"../select/useIcons\"));\nvar _useShowArrow = _interopRequireDefault(require(\"../select/useShowArrow\"));\nvar _Compact = require(\"../space/Compact\");\nvar _useBase = _interopRequireDefault(require(\"./hooks/useBase\"));\nvar _useCheckable = _interopRequireDefault(require(\"./hooks/useCheckable\"));\nvar _useColumnIcons = _interopRequireDefault(require(\"./hooks/useColumnIcons\"));\nvar _Panel = _interopRequireDefault(require(\"./Panel\"));\nvar _style2 = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst {\n SHOW_CHILD,\n SHOW_PARENT\n} = _rcCascader.default;\nfunction highlightKeyword(str, lowerKeyword, prefixCls) {\n const cells = str.toLowerCase().split(lowerKeyword).reduce((list, cur, index) => index === 0 ? [cur] : [].concat((0, _toConsumableArray2.default)(list), [lowerKeyword, cur]), []);\n const fillCells = [];\n let start = 0;\n cells.forEach((cell, index) => {\n const end = start + cell.length;\n let originWorld = str.slice(start, end);\n start = end;\n if (index % 2 === 1) {\n originWorld =\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(\"span\", {\n className: `${prefixCls}-menu-item-keyword`,\n key: `separator-${index}`\n }, originWorld);\n }\n fillCells.push(originWorld);\n });\n return fillCells;\n}\nconst defaultSearchRender = (inputValue, path, prefixCls, fieldNames) => {\n const optionList = [];\n // We do lower here to save perf\n const lower = inputValue.toLowerCase();\n path.forEach((node, index) => {\n if (index !== 0) {\n optionList.push(' / ');\n }\n let label = node[fieldNames.label];\n const type = typeof label;\n if (type === 'string' || type === 'number') {\n label = highlightKeyword(String(label), lower, prefixCls);\n }\n optionList.push(label);\n });\n return optionList;\n};\nconst Cascader = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n size: customizeSize,\n disabled: customDisabled,\n className,\n rootClassName,\n multiple,\n bordered = true,\n transitionName,\n choiceTransitionName = '',\n popupClassName,\n dropdownClassName,\n expandIcon,\n placement,\n showSearch,\n allowClear = true,\n notFoundContent,\n direction,\n getPopupContainer,\n status: customStatus,\n showArrow,\n builtinPlacements,\n style,\n variant: customVariant\n } = props,\n rest = __rest(props, [\"prefixCls\", \"size\", \"disabled\", \"className\", \"rootClassName\", \"multiple\", \"bordered\", \"transitionName\", \"choiceTransitionName\", \"popupClassName\", \"dropdownClassName\", \"expandIcon\", \"placement\", \"showSearch\", \"allowClear\", \"notFoundContent\", \"direction\", \"getPopupContainer\", \"status\", \"showArrow\", \"builtinPlacements\", \"style\", \"variant\"]);\n const restProps = (0, _omit.default)(rest, ['suffixIcon']);\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n popupOverflow,\n cascader\n } = React.useContext(_configProvider.ConfigContext);\n // =================== Form =====================\n const {\n status: contextStatus,\n hasFeedback,\n isFormItemInput,\n feedbackIcon\n } = React.useContext(_context.FormItemInputContext);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(contextStatus, customStatus);\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Cascader');\n warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');\n process.env.NODE_ENV !== \"production\" ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : void 0;\n warning.deprecated(!('bordered' in props), 'bordered', 'variant');\n }\n // ==================== Prefix =====================\n const [prefixCls, cascaderPrefixCls, mergedDirection, renderEmpty] = (0, _useBase.default)(customizePrefixCls, direction);\n const isRtl = mergedDirection === 'rtl';\n const rootPrefixCls = getPrefixCls();\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapSelectCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const cascaderRootCls = (0, _useCSSVarCls.default)(cascaderPrefixCls);\n const [wrapCascaderCSSVar] = (0, _style2.default)(cascaderPrefixCls, cascaderRootCls);\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n const [variant, enableVariantCls] = (0, _useVariants.default)('cascader', customVariant, bordered);\n // =================== No Found ====================\n const mergedNotFoundContent = notFoundContent || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Cascader')) || (/*#__PURE__*/React.createElement(_defaultRenderEmpty.default, {\n componentName: \"Cascader\"\n }));\n // =================== Dropdown ====================\n const mergedDropdownClassName = (0, _classnames.default)(popupClassName || dropdownClassName, `${cascaderPrefixCls}-dropdown`, {\n [`${cascaderPrefixCls}-dropdown-rtl`]: mergedDirection === 'rtl'\n }, rootClassName, rootCls, cascaderRootCls, hashId, cssVarCls);\n // ==================== Search =====================\n const mergedShowSearch = React.useMemo(() => {\n if (!showSearch) {\n return showSearch;\n }\n let searchConfig = {\n render: defaultSearchRender\n };\n if (typeof showSearch === 'object') {\n searchConfig = Object.assign(Object.assign({}, searchConfig), showSearch);\n }\n return searchConfig;\n }, [showSearch]);\n // ===================== Size ======================\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n // ===================== Icon ======================\n const [mergedExpandIcon, loadingIcon] = (0, _useColumnIcons.default)(prefixCls, isRtl, expandIcon);\n // =================== Multiple ====================\n const checkable = (0, _useCheckable.default)(cascaderPrefixCls, multiple);\n // ===================== Icons =====================\n const showSuffixIcon = (0, _useShowArrow.default)(props.suffixIcon, showArrow);\n const {\n suffixIcon,\n removeIcon,\n clearIcon\n } = (0, _useIcons.default)(Object.assign(Object.assign({}, props), {\n hasFeedback,\n feedbackIcon,\n showSuffixIcon,\n multiple,\n prefixCls,\n componentName: 'Cascader'\n }));\n // ===================== Placement =====================\n const memoPlacement = React.useMemo(() => {\n if (placement !== undefined) {\n return placement;\n }\n return isRtl ? 'bottomRight' : 'bottomLeft';\n }, [placement, isRtl]);\n const mergedAllowClear = allowClear === true ? {\n clearIcon\n } : allowClear;\n // ============================ zIndex ============================\n const [zIndex] = (0, _useZIndex.useZIndex)('SelectLike', (_a = restProps.dropdownStyle) === null || _a === void 0 ? void 0 : _a.zIndex);\n // ==================== Render =====================\n const renderNode = /*#__PURE__*/React.createElement(_rcCascader.default, Object.assign({\n prefixCls: prefixCls,\n className: (0, _classnames.default)(!customizePrefixCls && cascaderPrefixCls, {\n [`${prefixCls}-lg`]: mergedSize === 'large',\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-rtl`]: isRtl,\n [`${prefixCls}-${variant}`]: enableVariantCls,\n [`${prefixCls}-in-form-item`]: isFormItemInput\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, cascader === null || cascader === void 0 ? void 0 : cascader.className, className, rootClassName, rootCls, cascaderRootCls, hashId, cssVarCls),\n disabled: mergedDisabled,\n style: Object.assign(Object.assign({}, cascader === null || cascader === void 0 ? void 0 : cascader.style), style)\n }, restProps, {\n builtinPlacements: (0, _mergedBuiltinPlacements.default)(builtinPlacements, popupOverflow),\n direction: mergedDirection,\n placement: memoPlacement,\n notFoundContent: mergedNotFoundContent,\n allowClear: mergedAllowClear,\n showSearch: mergedShowSearch,\n expandIcon: mergedExpandIcon,\n suffixIcon: suffixIcon,\n removeIcon: removeIcon,\n loadingIcon: loadingIcon,\n checkable: checkable,\n dropdownClassName: mergedDropdownClassName,\n dropdownPrefixCls: customizePrefixCls || cascaderPrefixCls,\n dropdownStyle: Object.assign(Object.assign({}, restProps.dropdownStyle), {\n zIndex\n }),\n choiceTransitionName: (0, _motion.getTransitionName)(rootPrefixCls, '', choiceTransitionName),\n transitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),\n getPopupContainer: getPopupContainer || getContextPopupContainer,\n ref: ref\n }));\n return wrapCascaderCSSVar(wrapSelectCSSVar(renderNode));\n});\nif (process.env.NODE_ENV !== 'production') {\n Cascader.displayName = 'Cascader';\n}\n// We don't care debug panel\n/* istanbul ignore next */\nconst PurePanel = (0, _PurePanel.default)(Cascader);\nCascader.SHOW_PARENT = SHOW_PARENT;\nCascader.SHOW_CHILD = SHOW_CHILD;\nCascader.Panel = _Panel.default;\nCascader._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nvar _default = exports.default = Cascader;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../checkbox/style\");\nvar _style2 = require(\"../../style\");\nconst getColumnsStyle = token => {\n const {\n prefixCls,\n componentCls\n } = token;\n const cascaderMenuItemCls = `${componentCls}-menu-item`;\n const iconCls = `\n &${cascaderMenuItemCls}-expand ${cascaderMenuItemCls}-expand-icon,\n ${cascaderMenuItemCls}-loading-icon\n`;\n return [\n // ==================== Checkbox ====================\n (0, _style.getStyle)(`${prefixCls}-checkbox`, token), {\n [componentCls]: {\n // ================== Checkbox ==================\n '&-checkbox': {\n top: 0,\n marginInlineEnd: token.paddingXS\n },\n // ==================== Menu ====================\n // >>> Menus\n '&-menus': {\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'flex-start',\n [`&${componentCls}-menu-empty`]: {\n [`${componentCls}-menu`]: {\n width: '100%',\n height: 'auto',\n [cascaderMenuItemCls]: {\n color: token.colorTextDisabled\n }\n }\n }\n },\n // >>> Menu\n '&-menu': {\n flexGrow: 1,\n flexShrink: 0,\n minWidth: token.controlItemWidth,\n height: token.dropdownHeight,\n margin: 0,\n padding: token.menuPadding,\n overflow: 'auto',\n verticalAlign: 'top',\n listStyle: 'none',\n '-ms-overflow-style': '-ms-autohiding-scrollbar',\n // https://github.com/ant-design/ant-design/issues/11857\n '&:not(:last-child)': {\n borderInlineEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n },\n '&-item': Object.assign(Object.assign({}, _style2.textEllipsis), {\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'center',\n padding: token.optionPadding,\n lineHeight: token.lineHeight,\n cursor: 'pointer',\n transition: `all ${token.motionDurationMid}`,\n borderRadius: token.borderRadiusSM,\n '&:hover': {\n background: token.controlItemBgHover\n },\n '&-disabled': {\n color: token.colorTextDisabled,\n cursor: 'not-allowed',\n '&:hover': {\n background: 'transparent'\n },\n [iconCls]: {\n color: token.colorTextDisabled\n }\n },\n [`&-active:not(${cascaderMenuItemCls}-disabled)`]: {\n '&, &:hover': {\n fontWeight: token.optionSelectedFontWeight,\n backgroundColor: token.optionSelectedBg\n }\n },\n '&-content': {\n flex: 'auto'\n },\n [iconCls]: {\n marginInlineStart: token.paddingXXS,\n color: token.colorTextDescription,\n fontSize: token.fontSizeIcon\n },\n '&-keyword': {\n color: token.colorHighlight\n }\n })\n }\n }\n }];\n};\nvar _default = exports.default = getColumnsStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _compactItem = require(\"../../style/compact-item\");\nvar _internal = require(\"../../theme/internal\");\nvar _columns = _interopRequireDefault(require(\"./columns\"));\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n return [\n // =====================================================\n // == Control ==\n // =====================================================\n {\n [componentCls]: {\n width: token.controlWidth\n }\n },\n // =====================================================\n // == Popup ==\n // =====================================================\n {\n [`${componentCls}-dropdown`]: [{\n [`&${antCls}-select-dropdown`]: {\n padding: 0\n }\n }, (0, _columns.default)(token)]\n },\n // =====================================================\n // == RTL ==\n // =====================================================\n {\n [`${componentCls}-dropdown-rtl`]: {\n direction: 'rtl'\n }\n },\n // =====================================================\n // == Space Compact ==\n // =====================================================\n (0, _compactItem.genCompactItemStyle)(token)];\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => {\n const itemPaddingVertical = Math.round((token.controlHeight - token.fontSize * token.lineHeight) / 2);\n return {\n controlWidth: 184,\n controlItemWidth: 111,\n dropdownHeight: 180,\n optionSelectedBg: token.controlItemBgActive,\n optionSelectedFontWeight: token.fontWeightStrong,\n optionPadding: `${itemPaddingVertical}px ${token.paddingSM}px`,\n menuPadding: token.paddingXXS\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Cascader', token => [genBaseStyle(token)], prepareComponentToken);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _ = require(\".\");\nvar _internal = require(\"../../theme/internal\");\nvar _columns = _interopRequireDefault(require(\"./columns\"));\n// ============================== Panel ===============================\nconst genPanelStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-panel`]: [(0, _columns.default)(token), {\n display: 'inline-flex',\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n borderRadius: token.borderRadiusLG,\n overflowX: 'auto',\n maxWidth: '100%',\n [`${componentCls}-menus`]: {\n alignItems: 'stretch'\n },\n [`${componentCls}-menu`]: {\n height: 'auto'\n },\n '&-empty': {\n padding: token.paddingXXS\n }\n }]\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genComponentStyleHook)(['Cascader', 'Panel'], token => genPanelStyle(token), _.prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcCheckbox = _interopRequireDefault(require(\"rc-checkbox\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _warning = require(\"../_util/warning\");\nvar _wave = _interopRequireDefault(require(\"../_util/wave\"));\nvar _interface = require(\"../_util/wave/interface\");\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _context = require(\"../form/context\");\nvar _GroupContext = _interopRequireDefault(require(\"./GroupContext\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalCheckbox = (props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children,\n indeterminate = false,\n style,\n onMouseEnter,\n onMouseLeave,\n skipGroup = false,\n disabled\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"children\", \"indeterminate\", \"style\", \"onMouseEnter\", \"onMouseLeave\", \"skipGroup\", \"disabled\"]);\n const {\n getPrefixCls,\n direction,\n checkbox\n } = React.useContext(_configProvider.ConfigContext);\n const checkboxGroup = React.useContext(_GroupContext.default);\n const {\n isFormItemInput\n } = React.useContext(_context.FormItemInputContext);\n const contextDisabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = (_a = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled) !== null && _a !== void 0 ? _a : contextDisabled;\n const prevValue = React.useRef(restProps.value);\n const checkboxRef = React.useRef(null);\n const mergedRef = (0, _ref.composeRef)(ref, checkboxRef);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Checkbox');\n process.env.NODE_ENV !== \"production\" ? warning('checked' in restProps || !!checkboxGroup || !('value' in restProps), 'usage', '`value` is not a valid prop, do you mean `checked`?') : void 0;\n }\n React.useEffect(() => {\n checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);\n }, []);\n React.useEffect(() => {\n if (skipGroup) {\n return;\n }\n if (restProps.value !== prevValue.current) {\n checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(prevValue.current);\n checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);\n prevValue.current = restProps.value;\n }\n return () => checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(restProps.value);\n }, [restProps.value]);\n React.useEffect(() => {\n var _a;\n if ((_a = checkboxRef.current) === null || _a === void 0 ? void 0 : _a.input) {\n checkboxRef.current.input.indeterminate = indeterminate;\n }\n }, [indeterminate]);\n const prefixCls = getPrefixCls('checkbox', customizePrefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const checkboxProps = Object.assign({}, restProps);\n if (checkboxGroup && !skipGroup) {\n checkboxProps.onChange = function () {\n if (restProps.onChange) {\n restProps.onChange.apply(restProps, arguments);\n }\n if (checkboxGroup.toggleOption) {\n checkboxGroup.toggleOption({\n label: children,\n value: restProps.value\n });\n }\n };\n checkboxProps.name = checkboxGroup.name;\n checkboxProps.checked = checkboxGroup.value.includes(restProps.value);\n }\n const classString = (0, _classnames.default)(`${prefixCls}-wrapper`, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-wrapper-checked`]: checkboxProps.checked,\n [`${prefixCls}-wrapper-disabled`]: mergedDisabled,\n [`${prefixCls}-wrapper-in-form-item`]: isFormItemInput\n }, checkbox === null || checkbox === void 0 ? void 0 : checkbox.className, className, rootClassName, cssVarCls, rootCls, hashId);\n const checkboxClass = (0, _classnames.default)({\n [`${prefixCls}-indeterminate`]: indeterminate\n }, _interface.TARGET_CLS, hashId);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_wave.default, {\n component: \"Checkbox\",\n disabled: mergedDisabled\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: classString,\n style: Object.assign(Object.assign({}, checkbox === null || checkbox === void 0 ? void 0 : checkbox.style), style),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n }, /*#__PURE__*/React.createElement(_rcCheckbox.default, Object.assign({}, checkboxProps, {\n prefixCls: prefixCls,\n className: checkboxClass,\n disabled: mergedDisabled,\n ref: mergedRef\n })), children !== undefined && /*#__PURE__*/React.createElement(\"span\", null, children))));\n};\nconst Checkbox = /*#__PURE__*/React.forwardRef(InternalCheckbox);\nif (process.env.NODE_ENV !== 'production') {\n Checkbox.displayName = 'Checkbox';\n}\nvar _default = exports.default = Checkbox;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"GroupContext\", {\n enumerable: true,\n get: function () {\n return _GroupContext.default;\n }\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _Checkbox = _interopRequireDefault(require(\"./Checkbox\"));\nvar _GroupContext = _interopRequireDefault(require(\"./GroupContext\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst CheckboxGroup = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n defaultValue,\n children,\n options = [],\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n onChange\n } = props,\n restProps = __rest(props, [\"defaultValue\", \"children\", \"options\", \"prefixCls\", \"className\", \"rootClassName\", \"style\", \"onChange\"]);\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const [value, setValue] = React.useState(restProps.value || defaultValue || []);\n const [registeredValues, setRegisteredValues] = React.useState([]);\n React.useEffect(() => {\n if ('value' in restProps) {\n setValue(restProps.value || []);\n }\n }, [restProps.value]);\n const memoOptions = React.useMemo(() => options.map(option => {\n if (typeof option === 'string' || typeof option === 'number') {\n return {\n label: option,\n value: option\n };\n }\n return option;\n }), [options]);\n const cancelValue = val => {\n setRegisteredValues(prevValues => prevValues.filter(v => v !== val));\n };\n const registerValue = val => {\n setRegisteredValues(prevValues => [].concat((0, _toConsumableArray2.default)(prevValues), [val]));\n };\n const toggleOption = option => {\n const optionIndex = value.indexOf(option.value);\n const newValue = (0, _toConsumableArray2.default)(value);\n if (optionIndex === -1) {\n newValue.push(option.value);\n } else {\n newValue.splice(optionIndex, 1);\n }\n if (!('value' in restProps)) {\n setValue(newValue);\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(newValue.filter(val => registeredValues.includes(val)).sort((a, b) => {\n const indexA = memoOptions.findIndex(opt => opt.value === a);\n const indexB = memoOptions.findIndex(opt => opt.value === b);\n return indexA - indexB;\n }));\n };\n const prefixCls = getPrefixCls('checkbox', customizePrefixCls);\n const groupPrefixCls = `${prefixCls}-group`;\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const domProps = (0, _omit.default)(restProps, ['value', 'disabled']);\n const childrenNode = options.length ? memoOptions.map(option => (/*#__PURE__*/React.createElement(_Checkbox.default, {\n prefixCls: prefixCls,\n key: option.value.toString(),\n disabled: 'disabled' in option ? option.disabled : restProps.disabled,\n value: option.value,\n checked: value.includes(option.value),\n onChange: option.onChange,\n className: `${groupPrefixCls}-item`,\n style: option.style,\n title: option.title,\n id: option.id,\n required: option.required\n }, option.label))) : children;\n const context = {\n toggleOption,\n value,\n disabled: restProps.disabled,\n name: restProps.name,\n // https://github.com/ant-design/ant-design/issues/16376\n registerValue,\n cancelValue\n };\n const classString = (0, _classnames.default)(groupPrefixCls, {\n [`${groupPrefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, cssVarCls, rootCls, hashId);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: classString,\n style: style\n }, domProps, {\n ref: ref\n }), /*#__PURE__*/React.createElement(_GroupContext.default.Provider, {\n value: context\n }, childrenNode)));\n});\nvar _default = exports.default = CheckboxGroup;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst GroupContext = /*#__PURE__*/_react.default.createContext(null);\nvar _default = exports.default = GroupContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Checkbox = _interopRequireDefault(require(\"./Checkbox\"));\nvar _Group = _interopRequireDefault(require(\"./Group\"));\nconst Checkbox = _Checkbox.default;\nCheckbox.Group = _Group.default;\nCheckbox.__ANT_CHECKBOX = true;\nif (process.env.NODE_ENV !== 'production') {\n Checkbox.displayName = 'Checkbox';\n}\nvar _default = exports.default = Checkbox;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genCheckboxStyle = exports.default = void 0;\nexports.getStyle = getStyle;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Styles ==============================\nconst genCheckboxStyle = token => {\n const {\n checkboxCls\n } = token;\n const wrapperCls = `${checkboxCls}-wrapper`;\n return [\n // ===================== Basic =====================\n {\n // Group\n [`${checkboxCls}-group`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'inline-flex',\n flexWrap: 'wrap',\n columnGap: token.marginXS,\n // Group > Grid\n [`> ${token.antCls}-row`]: {\n flex: 1\n }\n }),\n // Wrapper\n [wrapperCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'inline-flex',\n alignItems: 'baseline',\n cursor: 'pointer',\n // Fix checkbox & radio in flex align #30260\n '&:after': {\n display: 'inline-block',\n width: 0,\n overflow: 'hidden',\n content: \"'\\\\a0'\"\n },\n // Checkbox near checkbox\n [`& + ${wrapperCls}`]: {\n marginInlineStart: 0\n },\n [`&${wrapperCls}-in-form-item`]: {\n 'input[type=\"checkbox\"]': {\n width: 14,\n // FIXME: magic\n height: 14 // FIXME: magic\n }\n }\n }),\n // Wrapper > Checkbox\n [checkboxCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n whiteSpace: 'nowrap',\n lineHeight: 1,\n cursor: 'pointer',\n borderRadius: token.borderRadiusSM,\n // To make alignment right when `controlHeight` is changed\n // Ref: https://github.com/ant-design/ant-design/issues/41564\n alignSelf: 'center',\n // Wrapper > Checkbox > input\n [`${checkboxCls}-input`]: {\n position: 'absolute',\n // Since baseline align will get additional space offset,\n // we need to move input to top to make it align with text.\n // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799\n inset: 0,\n zIndex: 1,\n cursor: 'pointer',\n opacity: 0,\n margin: 0,\n [`&:focus-visible + ${checkboxCls}-inner`]: Object.assign({}, (0, _style.genFocusOutline)(token))\n },\n // Wrapper > Checkbox > inner\n [`${checkboxCls}-inner`]: {\n boxSizing: 'border-box',\n display: 'block',\n width: token.checkboxSize,\n height: token.checkboxSize,\n direction: 'ltr',\n backgroundColor: token.colorBgContainer,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderRadius: token.borderRadiusSM,\n borderCollapse: 'separate',\n transition: `all ${token.motionDurationSlow}`,\n '&:after': {\n boxSizing: 'border-box',\n position: 'absolute',\n top: '50%',\n insetInlineStart: '25%',\n display: 'table',\n width: token.calc(token.checkboxSize).div(14).mul(5).equal(),\n height: token.calc(token.checkboxSize).div(14).mul(8).equal(),\n border: `${(0, _cssinjs.unit)(token.lineWidthBold)} solid ${token.colorWhite}`,\n borderTop: 0,\n borderInlineStart: 0,\n transform: 'rotate(45deg) scale(0) translate(-50%,-50%)',\n opacity: 0,\n content: '\"\"',\n transition: `all ${token.motionDurationFast} ${token.motionEaseInBack}, opacity ${token.motionDurationFast}`\n }\n },\n // Wrapper > Checkbox + Text\n '& + span': {\n paddingInlineStart: token.paddingXS,\n paddingInlineEnd: token.paddingXS\n }\n })\n },\n // ===================== Hover =====================\n {\n // Wrapper & Wrapper > Checkbox\n [`\n ${wrapperCls}:not(${wrapperCls}-disabled),\n ${checkboxCls}:not(${checkboxCls}-disabled)\n `]: {\n [`&:hover ${checkboxCls}-inner`]: {\n borderColor: token.colorPrimary\n }\n },\n [`${wrapperCls}:not(${wrapperCls}-disabled)`]: {\n [`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled) ${checkboxCls}-inner`]: {\n backgroundColor: token.colorPrimaryHover,\n borderColor: 'transparent'\n },\n [`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled):after`]: {\n borderColor: token.colorPrimaryHover\n }\n }\n },\n // ==================== Checked ====================\n {\n // Wrapper > Checkbox\n [`${checkboxCls}-checked`]: {\n [`${checkboxCls}-inner`]: {\n backgroundColor: token.colorPrimary,\n borderColor: token.colorPrimary,\n '&:after': {\n opacity: 1,\n transform: 'rotate(45deg) scale(1) translate(-50%,-50%)',\n transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}`\n }\n }\n },\n [`\n ${wrapperCls}-checked:not(${wrapperCls}-disabled),\n ${checkboxCls}-checked:not(${checkboxCls}-disabled)\n `]: {\n [`&:hover ${checkboxCls}-inner`]: {\n backgroundColor: token.colorPrimaryHover,\n borderColor: 'transparent'\n }\n }\n },\n // ================= Indeterminate =================\n {\n [checkboxCls]: {\n '&-indeterminate': {\n // Wrapper > Checkbox > inner\n [`${checkboxCls}-inner`]: {\n backgroundColor: `${token.colorBgContainer} !important`,\n borderColor: `${token.colorBorder} !important`,\n '&:after': {\n top: '50%',\n insetInlineStart: '50%',\n width: token.calc(token.fontSizeLG).div(2).equal(),\n height: token.calc(token.fontSizeLG).div(2).equal(),\n backgroundColor: token.colorPrimary,\n border: 0,\n transform: 'translate(-50%, -50%) scale(1)',\n opacity: 1,\n content: '\"\"'\n }\n },\n // https://github.com/ant-design/ant-design/issues/50074\n [`&:hover ${checkboxCls}-inner`]: {\n backgroundColor: `${token.colorBgContainer} !important`,\n borderColor: `${token.colorPrimary} !important`\n }\n }\n }\n },\n // ==================== Disable ====================\n {\n // Wrapper\n [`${wrapperCls}-disabled`]: {\n cursor: 'not-allowed'\n },\n // Wrapper > Checkbox\n [`${checkboxCls}-disabled`]: {\n // Wrapper > Checkbox > input\n [`&, ${checkboxCls}-input`]: {\n cursor: 'not-allowed',\n // Disabled for native input to enable Tooltip event handler\n // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901\n pointerEvents: 'none'\n },\n // Wrapper > Checkbox > inner\n [`${checkboxCls}-inner`]: {\n background: token.colorBgContainerDisabled,\n borderColor: token.colorBorder,\n '&:after': {\n borderColor: token.colorTextDisabled\n }\n },\n '&:after': {\n display: 'none'\n },\n '& + span': {\n color: token.colorTextDisabled\n },\n [`&${checkboxCls}-indeterminate ${checkboxCls}-inner::after`]: {\n background: token.colorTextDisabled\n }\n }\n }];\n};\n// ============================== Export ==============================\nexports.genCheckboxStyle = genCheckboxStyle;\nfunction getStyle(prefixCls, token) {\n const checkboxToken = (0, _internal.mergeToken)(token, {\n checkboxCls: `.${prefixCls}`,\n checkboxSize: token.controlInteractiveSize\n });\n return [genCheckboxStyle(checkboxToken)];\n}\nvar _default = exports.default = (0, _internal.genStyleHooks)('Checkbox', (token, _ref) => {\n let {\n prefixCls\n } = _ref;\n return [getStyle(prefixCls, token)];\n});","\"use strict\";\n\"use client\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _grid = require(\"../grid\");\nvar _default = exports.default = _grid.Col;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _RightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RightOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcCollapse = _interopRequireDefault(require(\"rc-collapse\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _motion = _interopRequireDefault(require(\"../_util/motion\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _CollapsePanel = _interopRequireDefault(require(\"./CollapsePanel\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst Collapse = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n getPrefixCls,\n direction,\n collapse\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n bordered = true,\n ghost,\n size: customizeSize,\n expandIconPosition = 'start',\n children,\n expandIcon\n } = props;\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : ctx) !== null && _a !== void 0 ? _a : 'middle';\n });\n const prefixCls = getPrefixCls('collapse', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Collapse');\n // Warning if use legacy type `expandIconPosition`\n process.env.NODE_ENV !== \"production\" ? warning(expandIconPosition !== 'left' && expandIconPosition !== 'right', 'deprecated', '`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.') : void 0;\n }\n // Align with logic position\n const mergedExpandIconPosition = React.useMemo(() => {\n if (expandIconPosition === 'left') {\n return 'start';\n }\n return expandIconPosition === 'right' ? 'end' : expandIconPosition;\n }, [expandIconPosition]);\n const mergedExpandIcon = expandIcon !== null && expandIcon !== void 0 ? expandIcon : collapse === null || collapse === void 0 ? void 0 : collapse.expandIcon;\n const renderExpandIcon = React.useCallback(function () {\n let panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const icon = typeof mergedExpandIcon === 'function' ? mergedExpandIcon(panelProps) : (/*#__PURE__*/React.createElement(_RightOutlined.default, {\n rotate: panelProps.isActive ? 90 : undefined,\n \"aria-label\": panelProps.isActive ? 'expanded' : 'collapsed'\n }));\n return (0, _reactNode.cloneElement)(icon, () => {\n var _a;\n return {\n className: (0, _classnames.default)((_a = icon === null || icon === void 0 ? void 0 : icon.props) === null || _a === void 0 ? void 0 : _a.className, `${prefixCls}-arrow`)\n };\n });\n }, [mergedExpandIcon, prefixCls]);\n const collapseClassName = (0, _classnames.default)(`${prefixCls}-icon-position-${mergedExpandIconPosition}`, {\n [`${prefixCls}-borderless`]: !bordered,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-ghost`]: !!ghost,\n [`${prefixCls}-${mergedSize}`]: mergedSize !== 'middle'\n }, collapse === null || collapse === void 0 ? void 0 : collapse.className, className, rootClassName, hashId, cssVarCls);\n const openMotion = Object.assign(Object.assign({}, (0, _motion.default)(rootPrefixCls)), {\n motionAppear: false,\n leavedClassName: `${prefixCls}-content-hidden`\n });\n const items = React.useMemo(() => children ? (0, _toArray.default)(children).map((child, index) => {\n var _a, _b;\n if ((_a = child.props) === null || _a === void 0 ? void 0 : _a.disabled) {\n const key = (_b = child.key) !== null && _b !== void 0 ? _b : String(index);\n const {\n disabled,\n collapsible\n } = child.props;\n const childProps = Object.assign(Object.assign({}, (0, _omit.default)(child.props, ['disabled'])), {\n key,\n collapsible: collapsible !== null && collapsible !== void 0 ? collapsible : disabled ? 'disabled' : undefined\n });\n return (0, _reactNode.cloneElement)(child, childProps);\n }\n return child;\n }) : null, [children]);\n return wrapCSSVar(\n /*#__PURE__*/\n // @ts-ignore\n React.createElement(_rcCollapse.default, Object.assign({\n ref: ref,\n openMotion: openMotion\n }, (0, _omit.default)(props, ['rootClassName']), {\n expandIcon: renderExpandIcon,\n prefixCls: prefixCls,\n className: collapseClassName,\n style: Object.assign(Object.assign({}, collapse === null || collapse === void 0 ? void 0 : collapse.style), style)\n }), items));\n});\nif (process.env.NODE_ENV !== 'production') {\n Collapse.displayName = 'Collapse';\n}\nvar _default = exports.default = Object.assign(Collapse, {\n Panel: _CollapsePanel.default\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcCollapse = _interopRequireDefault(require(\"rc-collapse\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nconst CollapsePanel = /*#__PURE__*/React.forwardRef((props, ref) => {\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Collapse.Panel');\n warning.deprecated(!('disabled' in props), 'disabled', 'collapsible=\"disabled\"');\n }\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className,\n showArrow = true\n } = props;\n const prefixCls = getPrefixCls('collapse', customizePrefixCls);\n const collapsePanelClassName = (0, _classnames.default)({\n [`${prefixCls}-no-arrow`]: !showArrow\n }, className);\n return /*#__PURE__*/React.createElement(_rcCollapse.default.Panel, Object.assign({\n ref: ref\n }, props, {\n prefixCls: prefixCls,\n className: collapsePanelClassName\n }));\n});\nvar _default = exports.default = CollapsePanel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Collapse = _interopRequireDefault(require(\"./Collapse\"));\nvar _default = exports.default = _Collapse.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.genBaseStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _internal = require(\"../../theme/internal\");\nconst genBaseStyle = token => {\n const {\n componentCls,\n contentBg,\n padding,\n headerBg,\n headerPadding,\n collapseHeaderPaddingSM,\n collapseHeaderPaddingLG,\n collapsePanelBorderRadius,\n lineWidth,\n lineType,\n colorBorder,\n colorText,\n colorTextHeading,\n colorTextDisabled,\n fontSizeLG,\n lineHeight,\n lineHeightLG,\n marginSM,\n paddingSM,\n paddingLG,\n paddingXS,\n motionDurationSlow,\n fontSizeIcon,\n contentPadding,\n fontHeight,\n fontHeightLG\n } = token;\n const borderBase = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorBorder}`;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n backgroundColor: headerBg,\n border: borderBase,\n borderRadius: collapsePanelBorderRadius,\n '&-rtl': {\n direction: 'rtl'\n },\n [`& > ${componentCls}-item`]: {\n borderBottom: borderBase,\n '&:last-child': {\n [`\n &,\n & > ${componentCls}-header`]: {\n borderRadius: `0 0 ${(0, _cssinjs.unit)(collapsePanelBorderRadius)} ${(0, _cssinjs.unit)(collapsePanelBorderRadius)}`\n }\n },\n [`> ${componentCls}-header`]: {\n position: 'relative',\n // Compatible with old version of antd, should remove in next version\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'flex-start',\n padding: headerPadding,\n color: colorTextHeading,\n lineHeight,\n cursor: 'pointer',\n transition: `all ${motionDurationSlow}, visibility 0s`,\n [`> ${componentCls}-header-text`]: {\n flex: 'auto'\n },\n '&:focus': {\n outline: 'none'\n },\n // >>>>> Arrow\n [`${componentCls}-expand-icon`]: {\n height: fontHeight,\n display: 'flex',\n alignItems: 'center',\n paddingInlineEnd: marginSM\n },\n [`${componentCls}-arrow`]: Object.assign(Object.assign({}, (0, _style.resetIcon)()), {\n fontSize: fontSizeIcon,\n // when `transform: rotate()` is applied to icon's root element\n transition: `transform ${motionDurationSlow}`,\n // when `transform: rotate()` is applied to icon's child element\n svg: {\n transition: `transform ${motionDurationSlow}`\n }\n }),\n // >>>>> Text\n [`${componentCls}-header-text`]: {\n marginInlineEnd: 'auto'\n }\n },\n [`${componentCls}-icon-collapsible-only`]: {\n cursor: 'unset',\n [`${componentCls}-expand-icon`]: {\n cursor: 'pointer'\n }\n }\n },\n [`${componentCls}-content`]: {\n color: colorText,\n backgroundColor: contentBg,\n borderTop: borderBase,\n [`& > ${componentCls}-content-box`]: {\n padding: contentPadding\n },\n '&-hidden': {\n display: 'none'\n }\n },\n '&-small': {\n [`> ${componentCls}-item`]: {\n [`> ${componentCls}-header`]: {\n padding: collapseHeaderPaddingSM,\n paddingInlineStart: paddingXS,\n [`> ${componentCls}-expand-icon`]: {\n // Arrow offset\n marginInlineStart: token.calc(paddingSM).sub(paddingXS).equal()\n }\n },\n [`> ${componentCls}-content > ${componentCls}-content-box`]: {\n padding: paddingSM\n }\n }\n },\n '&-large': {\n [`> ${componentCls}-item`]: {\n fontSize: fontSizeLG,\n lineHeight: lineHeightLG,\n [`> ${componentCls}-header`]: {\n padding: collapseHeaderPaddingLG,\n paddingInlineStart: padding,\n [`> ${componentCls}-expand-icon`]: {\n height: fontHeightLG,\n // Arrow offset\n marginInlineStart: token.calc(paddingLG).sub(padding).equal()\n }\n },\n [`> ${componentCls}-content > ${componentCls}-content-box`]: {\n padding: paddingLG\n }\n }\n },\n [`${componentCls}-item:last-child`]: {\n borderBottom: 0,\n [`> ${componentCls}-content`]: {\n borderRadius: `0 0 ${(0, _cssinjs.unit)(collapsePanelBorderRadius)} ${(0, _cssinjs.unit)(collapsePanelBorderRadius)}`\n }\n },\n [`& ${componentCls}-item-disabled > ${componentCls}-header`]: {\n [`\n &,\n & > .arrow\n `]: {\n color: colorTextDisabled,\n cursor: 'not-allowed'\n }\n },\n // ========================== Icon Position ==========================\n [`&${componentCls}-icon-position-end`]: {\n [`& > ${componentCls}-item`]: {\n [`> ${componentCls}-header`]: {\n [`${componentCls}-expand-icon`]: {\n order: 1,\n paddingInlineEnd: 0,\n paddingInlineStart: marginSM\n }\n }\n }\n }\n })\n };\n};\nexports.genBaseStyle = genBaseStyle;\nconst genArrowStyle = token => {\n const {\n componentCls\n } = token;\n const fixedSelector = `> ${componentCls}-item > ${componentCls}-header ${componentCls}-arrow`;\n return {\n [`${componentCls}-rtl`]: {\n [fixedSelector]: {\n transform: `rotate(180deg)`\n }\n }\n };\n};\nconst genBorderlessStyle = token => {\n const {\n componentCls,\n headerBg,\n paddingXXS,\n colorBorder\n } = token;\n return {\n [`${componentCls}-borderless`]: {\n backgroundColor: headerBg,\n border: 0,\n [`> ${componentCls}-item`]: {\n borderBottom: `1px solid ${colorBorder}`\n },\n [`\n > ${componentCls}-item:last-child,\n > ${componentCls}-item:last-child ${componentCls}-header\n `]: {\n borderRadius: 0\n },\n [`> ${componentCls}-item:last-child`]: {\n borderBottom: 0\n },\n [`> ${componentCls}-item > ${componentCls}-content`]: {\n backgroundColor: 'transparent',\n borderTop: 0\n },\n [`> ${componentCls}-item > ${componentCls}-content > ${componentCls}-content-box`]: {\n paddingTop: paddingXXS\n }\n }\n };\n};\nconst genGhostStyle = token => {\n const {\n componentCls,\n paddingSM\n } = token;\n return {\n [`${componentCls}-ghost`]: {\n backgroundColor: 'transparent',\n border: 0,\n [`> ${componentCls}-item`]: {\n borderBottom: 0,\n [`> ${componentCls}-content`]: {\n backgroundColor: 'transparent',\n border: 0,\n [`> ${componentCls}-content-box`]: {\n paddingBlock: paddingSM\n }\n }\n }\n }\n };\n};\nconst prepareComponentToken = token => ({\n headerPadding: `${token.paddingSM}px ${token.padding}px`,\n headerBg: token.colorFillAlter,\n contentPadding: `${token.padding}px 16px`,\n // Fixed Value\n contentBg: token.colorBgContainer\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Collapse', token => {\n const collapseToken = (0, _internal.mergeToken)(token, {\n collapseHeaderPaddingSM: `${(0, _cssinjs.unit)(token.paddingXS)} ${(0, _cssinjs.unit)(token.paddingSM)}`,\n collapseHeaderPaddingLG: `${(0, _cssinjs.unit)(token.padding)} ${(0, _cssinjs.unit)(token.paddingLG)}`,\n collapsePanelBorderRadius: token.borderRadiusLG\n });\n return [genBaseStyle(collapseToken), genBorderlessStyle(collapseToken), genGhostStyle(collapseToken), genArrowStyle(collapseToken), (0, _motion.genCollapseMotion)(collapseToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _ContextIsolator = _interopRequireDefault(require(\"../_util/ContextIsolator\"));\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _warning = require(\"../_util/warning\");\nvar _context = require(\"../config-provider/context\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _context2 = require(\"../form/context\");\nvar _popover = _interopRequireDefault(require(\"../popover\"));\nvar _Compact = require(\"../space/Compact\");\nvar _color = require(\"./color\");\nvar _ColorPickerPanel = _interopRequireDefault(require(\"./ColorPickerPanel\"));\nvar _ColorTrigger = _interopRequireDefault(require(\"./components/ColorTrigger\"));\nvar _useModeColor = _interopRequireDefault(require(\"./hooks/useModeColor\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _util = require(\"./util\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst ColorPicker = props => {\n const {\n mode,\n value,\n defaultValue,\n format,\n defaultFormat,\n allowClear = false,\n presets,\n children,\n trigger = 'click',\n open,\n disabled,\n placement = 'bottomLeft',\n arrow = true,\n panelRender,\n showText,\n style,\n className,\n size: customizeSize,\n rootClassName,\n prefixCls: customizePrefixCls,\n styles,\n disabledAlpha = false,\n onFormatChange,\n onChange,\n onClear,\n onOpenChange,\n onChangeComplete,\n getPopupContainer,\n autoAdjustOverflow = true,\n destroyTooltipOnHide\n } = props,\n rest = __rest(props, [\"mode\", \"value\", \"defaultValue\", \"format\", \"defaultFormat\", \"allowClear\", \"presets\", \"children\", \"trigger\", \"open\", \"disabled\", \"placement\", \"arrow\", \"panelRender\", \"showText\", \"style\", \"className\", \"size\", \"rootClassName\", \"prefixCls\", \"styles\", \"disabledAlpha\", \"onFormatChange\", \"onChange\", \"onClear\", \"onOpenChange\", \"onChangeComplete\", \"getPopupContainer\", \"autoAdjustOverflow\", \"destroyTooltipOnHide\"]);\n const {\n getPrefixCls,\n direction,\n colorPicker\n } = (0, _react.useContext)(_context.ConfigContext);\n const contextDisabled = (0, _react.useContext)(_DisabledContext.default);\n const mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;\n const [popupOpen, setPopupOpen] = (0, _useMergedState.default)(false, {\n value: open,\n postState: openData => !mergedDisabled && openData,\n onChange: onOpenChange\n });\n const [formatValue, setFormatValue] = (0, _useMergedState.default)(format, {\n value: format,\n defaultValue: defaultFormat,\n onChange: onFormatChange\n });\n const prefixCls = getPrefixCls('color-picker', customizePrefixCls);\n // ================== Value & Mode =================\n const [mergedColor, setColor, modeState, setModeState, modeOptions] = (0, _useModeColor.default)(defaultValue, value, mode);\n const isAlphaColor = (0, _react.useMemo)(() => (0, _util.getColorAlpha)(mergedColor) < 100, [mergedColor]);\n // ==================== Change =====================\n // To enhance user experience, we cache the gradient color when switch from gradient to single\n // If user not modify single color, we will use the cached gradient color.\n const [cachedGradientColor, setCachedGradientColor] = _react.default.useState(null);\n const onInternalChangeComplete = color => {\n if (onChangeComplete) {\n let changeColor = (0, _util.generateColor)(color);\n // ignore alpha color\n if (disabledAlpha && isAlphaColor) {\n changeColor = (0, _util.genAlphaColor)(color);\n }\n onChangeComplete(changeColor);\n }\n };\n const onInternalChange = (data, changeFromPickerDrag) => {\n let color = (0, _util.generateColor)(data);\n // ignore alpha color\n if (disabledAlpha && isAlphaColor) {\n color = (0, _util.genAlphaColor)(color);\n }\n setColor(color);\n setCachedGradientColor(null);\n // Trigger change event\n if (onChange) {\n onChange(color, color.toCssString());\n }\n // Only for drag-and-drop color picking\n if (!changeFromPickerDrag) {\n onInternalChangeComplete(color);\n }\n };\n // =================== Gradient ====================\n const [activeIndex, setActiveIndex] = _react.default.useState(0);\n const [gradientDragging, setGradientDragging] = _react.default.useState(false);\n // Mode change should also trigger color change\n const onInternalModeChange = newMode => {\n setModeState(newMode);\n if (newMode === 'single' && mergedColor.isGradient()) {\n setActiveIndex(0);\n onInternalChange(new _color.AggregationColor(mergedColor.getColors()[0].color));\n // Should after `onInternalChange` since it will clear the cached color\n setCachedGradientColor(mergedColor);\n } else if (newMode === 'gradient' && !mergedColor.isGradient()) {\n const baseColor = isAlphaColor ? (0, _util.genAlphaColor)(mergedColor) : mergedColor;\n onInternalChange(new _color.AggregationColor(cachedGradientColor || [{\n percent: 0,\n color: baseColor\n }, {\n percent: 100,\n color: baseColor\n }]));\n }\n };\n // ================== Form Status ==================\n const {\n status: contextStatus\n } = _react.default.useContext(_context2.FormItemInputContext);\n // ==================== Compact ====================\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n // ===================== Style =====================\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const rtlCls = {\n [`${prefixCls}-rtl`]: direction\n };\n const mergedRootCls = (0, _classnames.default)(rootClassName, cssVarCls, rootCls, rtlCls);\n const mergedCls = (0, _classnames.default)((0, _statusUtils.getStatusClassNames)(prefixCls, contextStatus), {\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-lg`]: mergedSize === 'large'\n }, compactItemClassnames, colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.className, mergedRootCls, className, hashId);\n const mergedPopupCls = (0, _classnames.default)(prefixCls, mergedRootCls);\n // ===================== Warning ======================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('ColorPicker');\n process.env.NODE_ENV !== \"production\" ? warning(!(disabledAlpha && isAlphaColor), 'usage', '`disabledAlpha` will make the alpha to be 100% when use alpha color.') : void 0;\n }\n const popoverProps = {\n open: popupOpen,\n trigger,\n placement,\n arrow,\n rootClassName,\n getPopupContainer,\n autoAdjustOverflow,\n destroyTooltipOnHide\n };\n const mergedStyle = Object.assign(Object.assign({}, colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.style), style);\n // ============================ zIndex ============================\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(_popover.default, Object.assign({\n style: styles === null || styles === void 0 ? void 0 : styles.popup,\n overlayInnerStyle: styles === null || styles === void 0 ? void 0 : styles.popupOverlayInner,\n onOpenChange: visible => {\n if (!visible || !mergedDisabled) {\n setPopupOpen(visible);\n }\n },\n content: /*#__PURE__*/_react.default.createElement(_ContextIsolator.default, {\n form: true\n }, /*#__PURE__*/_react.default.createElement(_ColorPickerPanel.default, {\n mode: modeState,\n onModeChange: onInternalModeChange,\n modeOptions: modeOptions,\n prefixCls: prefixCls,\n value: mergedColor,\n allowClear: allowClear,\n disabled: mergedDisabled,\n disabledAlpha: disabledAlpha,\n presets: presets,\n panelRender: panelRender,\n format: formatValue,\n onFormatChange: setFormatValue,\n onChange: onInternalChange,\n onChangeComplete: onInternalChangeComplete,\n onClear: onClear,\n activeIndex: activeIndex,\n onActive: setActiveIndex,\n gradientDragging: gradientDragging,\n onGradientDragging: setGradientDragging\n })),\n overlayClassName: mergedPopupCls\n }, popoverProps), children || (/*#__PURE__*/_react.default.createElement(_ColorTrigger.default, Object.assign({\n activeIndex: popupOpen ? activeIndex : -1,\n open: popupOpen,\n className: mergedCls,\n style: mergedStyle,\n prefixCls: prefixCls,\n disabled: mergedDisabled,\n showText: showText,\n format: formatValue\n }, rest, {\n color: mergedColor\n })))));\n};\nif (process.env.NODE_ENV !== 'production') {\n ColorPicker.displayName = 'ColorPicker';\n}\nconst PurePanel = (0, _PurePanel.default)(ColorPicker, 'color-picker', /* istanbul ignore next */\nprefixCls => prefixCls, props => Object.assign(Object.assign({}, props), {\n placement: 'bottom',\n autoAdjustOverflow: false\n}));\nColorPicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nvar _default = exports.default = ColorPicker;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _divider = _interopRequireDefault(require(\"../divider\"));\nvar _PanelPicker = _interopRequireDefault(require(\"./components/PanelPicker\"));\nvar _PanelPresets = _interopRequireDefault(require(\"./components/PanelPresets\"));\nvar _context = require(\"./context\");\nconst ColorPickerPanel = props => {\n const {\n prefixCls,\n presets,\n panelRender,\n value,\n onChange,\n onClear,\n allowClear,\n disabledAlpha,\n mode,\n onModeChange,\n modeOptions,\n onChangeComplete,\n activeIndex,\n onActive,\n format,\n onFormatChange,\n gradientDragging,\n onGradientDragging\n } = props;\n const colorPickerPanelPrefixCls = `${prefixCls}-inner`;\n // ===================== Context ======================\n const panelContext = _react.default.useMemo(() => ({\n prefixCls,\n value,\n onChange,\n onClear,\n allowClear,\n disabledAlpha,\n mode,\n onModeChange,\n modeOptions,\n onChangeComplete,\n activeIndex,\n onActive,\n format,\n onFormatChange,\n gradientDragging,\n onGradientDragging\n }), [prefixCls, value, onChange, onClear, allowClear, disabledAlpha, mode, onModeChange, modeOptions, onChangeComplete, activeIndex, onActive, format, onFormatChange, gradientDragging, onGradientDragging]);\n const presetContext = _react.default.useMemo(() => ({\n prefixCls,\n value,\n presets,\n onChange\n }), [prefixCls, value, presets, onChange]);\n // ====================== Render ======================\n const innerPanel = /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${colorPickerPanelPrefixCls}-content`\n }, /*#__PURE__*/_react.default.createElement(_PanelPicker.default, null), Array.isArray(presets) && /*#__PURE__*/_react.default.createElement(_divider.default, null), /*#__PURE__*/_react.default.createElement(_PanelPresets.default, null));\n return /*#__PURE__*/_react.default.createElement(_context.PanelPickerContext.Provider, {\n value: panelContext\n }, /*#__PURE__*/_react.default.createElement(_context.PanelPresetsContext.Provider, {\n value: presetContext\n }, /*#__PURE__*/_react.default.createElement(\"div\", {\n className: colorPickerPanelPrefixCls\n }, typeof panelRender === 'function' ? panelRender(innerPanel, {\n components: {\n Picker: _PanelPicker.default,\n Presets: _PanelPresets.default\n }\n }) : innerPanel)));\n};\nif (process.env.NODE_ENV !== 'production') {\n ColorPickerPanel.displayName = 'ColorPickerPanel';\n}\nvar _default = exports.default = ColorPickerPanel;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.toHexFormat = exports.getHex = exports.AggregationColor = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\nvar _colorPicker = require(\"@rc-component/color-picker\");\nconst toHexFormat = (value, alpha) => (value === null || value === void 0 ? void 0 : value.replace(/[^\\w/]/g, '').slice(0, alpha ? 8 : 6)) || '';\nexports.toHexFormat = toHexFormat;\nconst getHex = (value, alpha) => value ? toHexFormat(value, alpha) : '';\nexports.getHex = getHex;\nlet AggregationColor = exports.AggregationColor = /*#__PURE__*/function () {\n function AggregationColor(color) {\n (0, _classCallCheck2.default)(this, AggregationColor);\n var _a;\n this.cleared = false;\n // Clone from another AggregationColor\n if (color instanceof AggregationColor) {\n this.metaColor = color.metaColor.clone();\n this.colors = (_a = color.colors) === null || _a === void 0 ? void 0 : _a.map(info => ({\n color: new AggregationColor(info.color),\n percent: info.percent\n }));\n this.cleared = color.cleared;\n return;\n }\n const isArray = Array.isArray(color);\n if (isArray && color.length) {\n this.colors = color.map(_ref => {\n let {\n color: c,\n percent\n } = _ref;\n return {\n color: new AggregationColor(c),\n percent\n };\n });\n this.metaColor = new _colorPicker.Color(this.colors[0].color.metaColor);\n } else {\n this.metaColor = new _colorPicker.Color(isArray ? '' : color);\n }\n if (!color || isArray && !this.colors) {\n this.metaColor = this.metaColor.setA(0);\n this.cleared = true;\n }\n }\n return (0, _createClass2.default)(AggregationColor, [{\n key: \"toHsb\",\n value: function toHsb() {\n return this.metaColor.toHsb();\n }\n }, {\n key: \"toHsbString\",\n value: function toHsbString() {\n return this.metaColor.toHsbString();\n }\n }, {\n key: \"toHex\",\n value: function toHex() {\n return getHex(this.toHexString(), this.metaColor.a < 1);\n }\n }, {\n key: \"toHexString\",\n value: function toHexString() {\n return this.metaColor.toHexString();\n }\n }, {\n key: \"toRgb\",\n value: function toRgb() {\n return this.metaColor.toRgb();\n }\n }, {\n key: \"toRgbString\",\n value: function toRgbString() {\n return this.metaColor.toRgbString();\n }\n }, {\n key: \"isGradient\",\n value: function isGradient() {\n return !!this.colors && !this.cleared;\n }\n }, {\n key: \"getColors\",\n value: function getColors() {\n return this.colors || [{\n color: this,\n percent: 0\n }];\n }\n }, {\n key: \"toCssString\",\n value: function toCssString() {\n const {\n colors\n } = this;\n // CSS line-gradient\n if (colors) {\n const colorsStr = colors.map(c => `${c.color.toRgbString()} ${c.percent}%`).join(', ');\n return `linear-gradient(90deg, ${colorsStr})`;\n }\n return this.metaColor.toRgbString();\n }\n }, {\n key: \"equals\",\n value: function equals(color) {\n if (!color || this.isGradient() !== color.isGradient()) {\n return false;\n }\n if (!this.isGradient()) {\n return this.toHexString() === color.toHexString();\n }\n return this.colors.length === color.colors.length && this.colors.every((c, i) => {\n const target = color.colors[i];\n return c.percent === target.percent && c.color.equals(target.color);\n });\n }\n }]);\n}();","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _util = require(\"../util\");\nvar _ColorSteppers = _interopRequireDefault(require(\"./ColorSteppers\"));\nconst ColorAlphaInput = _ref => {\n let {\n prefixCls,\n value,\n onChange\n } = _ref;\n const colorAlphaInputPrefixCls = `${prefixCls}-alpha-input`;\n const [alphaValue, setAlphaValue] = (0, _react.useState)((0, _util.generateColor)(value || '#000'));\n // Update step value\n (0, _react.useEffect)(() => {\n if (value) {\n setAlphaValue(value);\n }\n }, [value]);\n const handleAlphaChange = step => {\n const hsba = alphaValue.toHsb();\n hsba.a = (step || 0) / 100;\n const genColor = (0, _util.generateColor)(hsba);\n if (!value) {\n setAlphaValue(genColor);\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(genColor);\n };\n return /*#__PURE__*/_react.default.createElement(_ColorSteppers.default, {\n value: (0, _util.getColorAlpha)(alphaValue),\n prefixCls: prefixCls,\n formatter: step => `${step}%`,\n className: colorAlphaInputPrefixCls,\n onChange: handleAlphaChange\n });\n};\nvar _default = exports.default = ColorAlphaInput;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _util = require(\"../util\");\nconst ColorClear = _ref => {\n let {\n prefixCls,\n value,\n onChange\n } = _ref;\n const handleClick = () => {\n if (onChange && value && !value.cleared) {\n const hsba = value.toHsb();\n hsba.a = 0;\n const genColor = (0, _util.generateColor)(hsba);\n genColor.cleared = true;\n onChange(genColor);\n }\n };\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-clear`,\n onClick: handleClick\n });\n};\nvar _default = exports.default = ColorClear;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _input = _interopRequireDefault(require(\"../../input\"));\nvar _color = require(\"../color\");\nvar _util = require(\"../util\");\nconst hexReg = /(^#[\\da-f]{6}$)|(^#[\\da-f]{8}$)/i;\nconst isHexString = hex => hexReg.test(`#${hex}`);\nconst ColorHexInput = _ref => {\n let {\n prefixCls,\n value,\n onChange\n } = _ref;\n const colorHexInputPrefixCls = `${prefixCls}-hex-input`;\n const [hexValue, setHexValue] = (0, _react.useState)(() => value ? (0, _color.toHexFormat)(value.toHexString()) : undefined);\n // Update step value\n (0, _react.useEffect)(() => {\n if (value) {\n setHexValue((0, _color.toHexFormat)(value.toHexString()));\n }\n }, [value]);\n const handleHexChange = e => {\n const originValue = e.target.value;\n setHexValue((0, _color.toHexFormat)(originValue));\n if (isHexString((0, _color.toHexFormat)(originValue, true))) {\n onChange === null || onChange === void 0 ? void 0 : onChange((0, _util.generateColor)(originValue));\n }\n };\n return /*#__PURE__*/_react.default.createElement(_input.default, {\n className: colorHexInputPrefixCls,\n value: hexValue,\n prefix: \"#\",\n onChange: handleHexChange,\n size: \"small\"\n });\n};\nvar _default = exports.default = ColorHexInput;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _util = require(\"../util\");\nvar _ColorSteppers = _interopRequireDefault(require(\"./ColorSteppers\"));\nconst ColorHsbInput = _ref => {\n let {\n prefixCls,\n value,\n onChange\n } = _ref;\n const colorHsbInputPrefixCls = `${prefixCls}-hsb-input`;\n const [hsbValue, setHsbValue] = (0, _react.useState)((0, _util.generateColor)(value || '#000'));\n // Update step value\n (0, _react.useEffect)(() => {\n if (value) {\n setHsbValue(value);\n }\n }, [value]);\n const handleHsbChange = (step, type) => {\n const hsb = hsbValue.toHsb();\n hsb[type] = type === 'h' ? step : (step || 0) / 100;\n const genColor = (0, _util.generateColor)(hsb);\n if (!value) {\n setHsbValue(genColor);\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(genColor);\n };\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: colorHsbInputPrefixCls\n }, /*#__PURE__*/_react.default.createElement(_ColorSteppers.default, {\n max: 360,\n min: 0,\n value: Number(hsbValue.toHsb().h),\n prefixCls: prefixCls,\n className: colorHsbInputPrefixCls,\n formatter: step => (0, _util.getRoundNumber)(step || 0).toString(),\n onChange: step => handleHsbChange(Number(step), 'h')\n }), /*#__PURE__*/_react.default.createElement(_ColorSteppers.default, {\n max: 100,\n min: 0,\n value: Number(hsbValue.toHsb().s) * 100,\n prefixCls: prefixCls,\n className: colorHsbInputPrefixCls,\n formatter: step => `${(0, _util.getRoundNumber)(step || 0)}%`,\n onChange: step => handleHsbChange(Number(step), 's')\n }), /*#__PURE__*/_react.default.createElement(_ColorSteppers.default, {\n max: 100,\n min: 0,\n value: Number(hsbValue.toHsb().b) * 100,\n prefixCls: prefixCls,\n className: colorHsbInputPrefixCls,\n formatter: step => `${(0, _util.getRoundNumber)(step || 0)}%`,\n onChange: step => handleHsbChange(Number(step), 'b')\n }));\n};\nvar _default = exports.default = ColorHsbInput;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _select = _interopRequireDefault(require(\"../../select\"));\nvar _interface = require(\"../interface\");\nvar _ColorAlphaInput = _interopRequireDefault(require(\"./ColorAlphaInput\"));\nvar _ColorHexInput = _interopRequireDefault(require(\"./ColorHexInput\"));\nvar _ColorHsbInput = _interopRequireDefault(require(\"./ColorHsbInput\"));\nvar _ColorRgbInput = _interopRequireDefault(require(\"./ColorRgbInput\"));\nconst selectOptions = [_interface.ColorFormat.hex, _interface.ColorFormat.hsb, _interface.ColorFormat.rgb].map(format => ({\n value: format,\n label: format.toLocaleUpperCase()\n}));\nconst ColorInput = props => {\n const {\n prefixCls,\n format,\n value,\n disabledAlpha,\n onFormatChange,\n onChange\n } = props;\n const [colorFormat, setColorFormat] = (0, _useMergedState.default)(_interface.ColorFormat.hex, {\n value: format,\n onChange: onFormatChange\n });\n const colorInputPrefixCls = `${prefixCls}-input`;\n const handleFormatChange = newFormat => {\n setColorFormat(newFormat);\n };\n const steppersNode = (0, _react.useMemo)(() => {\n const inputProps = {\n value,\n prefixCls,\n onChange\n };\n switch (colorFormat) {\n case _interface.ColorFormat.hsb:\n return /*#__PURE__*/_react.default.createElement(_ColorHsbInput.default, Object.assign({}, inputProps));\n case _interface.ColorFormat.rgb:\n return /*#__PURE__*/_react.default.createElement(_ColorRgbInput.default, Object.assign({}, inputProps));\n // case ColorFormat.hex:\n default:\n return /*#__PURE__*/_react.default.createElement(_ColorHexInput.default, Object.assign({}, inputProps));\n }\n }, [colorFormat, prefixCls, value, onChange]);\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${colorInputPrefixCls}-container`\n }, /*#__PURE__*/_react.default.createElement(_select.default, {\n value: colorFormat,\n variant: \"borderless\",\n getPopupContainer: current => current,\n popupMatchSelectWidth: 68,\n placement: \"bottomRight\",\n onChange: handleFormatChange,\n className: `${prefixCls}-format-select`,\n size: \"small\",\n options: selectOptions\n }), /*#__PURE__*/_react.default.createElement(\"div\", {\n className: colorInputPrefixCls\n }, steppersNode), !disabledAlpha && (/*#__PURE__*/_react.default.createElement(_ColorAlphaInput.default, {\n prefixCls: prefixCls,\n value: value,\n onChange: onChange\n })));\n};\nvar _default = exports.default = ColorInput;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isBright = exports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _colorPicker = require(\"@rc-component/color-picker\");\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _collapse = _interopRequireDefault(require(\"../../collapse\"));\nvar _locale = require(\"../../locale\");\nvar _internal = require(\"../../theme/internal\");\nvar _util = require(\"../util\");\nconst genPresetColor = list => list.map(value => {\n value.colors = value.colors.map(_util.generateColor);\n return value;\n});\nconst isBright = (value, bgColorToken) => {\n const {\n r,\n g,\n b,\n a\n } = value.toRgb();\n const hsv = new _colorPicker.Color(value.toRgbString()).onBackground(bgColorToken).toHsv();\n if (a <= 0.5) {\n // Adapted to dark mode\n return hsv.v > 0.5;\n }\n return r * 0.299 + g * 0.587 + b * 0.114 > 192;\n};\nexports.isBright = isBright;\nconst genCollapsePanelKey = _ref => {\n let {\n label\n } = _ref;\n return `panel-${label}`;\n};\nconst ColorPresets = _ref2 => {\n let {\n prefixCls,\n presets,\n value: color,\n onChange\n } = _ref2;\n const [locale] = (0, _locale.useLocale)('ColorPicker');\n const [, token] = (0, _internal.useToken)();\n const [presetsValue] = (0, _useMergedState.default)(genPresetColor(presets), {\n value: genPresetColor(presets),\n postState: genPresetColor\n });\n const colorPresetsPrefixCls = `${prefixCls}-presets`;\n const activeKeys = (0, _react.useMemo)(() => presetsValue.reduce((acc, preset) => {\n const {\n defaultOpen = true\n } = preset;\n if (defaultOpen) acc.push(genCollapsePanelKey(preset));\n return acc;\n }, []), [presetsValue]);\n const handleClick = colorValue => {\n onChange === null || onChange === void 0 ? void 0 : onChange(colorValue);\n };\n const items = presetsValue.map(preset => {\n var _a;\n return {\n key: genCollapsePanelKey(preset),\n label: /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${colorPresetsPrefixCls}-label`\n }, preset === null || preset === void 0 ? void 0 : preset.label),\n children: (/*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${colorPresetsPrefixCls}-items`\n }, Array.isArray(preset === null || preset === void 0 ? void 0 : preset.colors) && ((_a = preset.colors) === null || _a === void 0 ? void 0 : _a.length) > 0 ? preset.colors.map((presetColor, index) => (/*#__PURE__*/_react.default.createElement(_colorPicker.ColorBlock\n // eslint-disable-next-line react/no-array-index-key\n , {\n // eslint-disable-next-line react/no-array-index-key\n key: `preset-${index}-${presetColor.toHexString()}`,\n color: (0, _util.generateColor)(presetColor).toRgbString(),\n prefixCls: prefixCls,\n className: (0, _classnames.default)(`${colorPresetsPrefixCls}-color`, {\n [`${colorPresetsPrefixCls}-color-checked`]: presetColor.toHexString() === (color === null || color === void 0 ? void 0 : color.toHexString()),\n [`${colorPresetsPrefixCls}-color-bright`]: isBright(presetColor, token.colorBgElevated)\n }),\n onClick: () => handleClick(presetColor)\n }))) : (/*#__PURE__*/_react.default.createElement(\"span\", {\n className: `${colorPresetsPrefixCls}-empty`\n }, locale.presetEmpty))))\n };\n });\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: colorPresetsPrefixCls\n }, /*#__PURE__*/_react.default.createElement(_collapse.default, {\n defaultActiveKey: activeKeys,\n ghost: true,\n items: items\n }));\n};\nvar _default = exports.default = ColorPresets;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _util = require(\"../util\");\nvar _ColorSteppers = _interopRequireDefault(require(\"./ColorSteppers\"));\nconst ColorRgbInput = _ref => {\n let {\n prefixCls,\n value,\n onChange\n } = _ref;\n const colorRgbInputPrefixCls = `${prefixCls}-rgb-input`;\n const [rgbValue, setRgbValue] = (0, _react.useState)((0, _util.generateColor)(value || '#000'));\n // Update step value\n (0, _react.useEffect)(() => {\n if (value) {\n setRgbValue(value);\n }\n }, [value]);\n const handleRgbChange = (step, type) => {\n const rgb = rgbValue.toRgb();\n rgb[type] = step || 0;\n const genColor = (0, _util.generateColor)(rgb);\n if (!value) {\n setRgbValue(genColor);\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(genColor);\n };\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: colorRgbInputPrefixCls\n }, /*#__PURE__*/_react.default.createElement(_ColorSteppers.default, {\n max: 255,\n min: 0,\n value: Number(rgbValue.toRgb().r),\n prefixCls: prefixCls,\n className: colorRgbInputPrefixCls,\n onChange: step => handleRgbChange(Number(step), 'r')\n }), /*#__PURE__*/_react.default.createElement(_ColorSteppers.default, {\n max: 255,\n min: 0,\n value: Number(rgbValue.toRgb().g),\n prefixCls: prefixCls,\n className: colorRgbInputPrefixCls,\n onChange: step => handleRgbChange(Number(step), 'g')\n }), /*#__PURE__*/_react.default.createElement(_ColorSteppers.default, {\n max: 255,\n min: 0,\n value: Number(rgbValue.toRgb().b),\n prefixCls: prefixCls,\n className: colorRgbInputPrefixCls,\n onChange: step => handleRgbChange(Number(step), 'b')\n }));\n};\nvar _default = exports.default = ColorRgbInput;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.GradientColorSlider = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcSlider = require(\"rc-slider\");\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _slider = _interopRequireDefault(require(\"../../slider\"));\nvar _Context = _interopRequireDefault(require(\"../../slider/Context\"));\nvar _util = require(\"../util\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst GradientColorSlider = props => {\n const {\n prefixCls,\n colors,\n type,\n color,\n range = false,\n className,\n activeIndex,\n onActive,\n onDragStart,\n onDragChange,\n onKeyDelete\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"colors\", \"type\", \"color\", \"range\", \"className\", \"activeIndex\", \"onActive\", \"onDragStart\", \"onDragChange\", \"onKeyDelete\"]);\n const sliderProps = Object.assign(Object.assign({}, restProps), {\n track: false\n });\n // ========================== Background ==========================\n const linearCss = React.useMemo(() => {\n const colorsStr = colors.map(c => `${c.color} ${c.percent}%`).join(', ');\n return `linear-gradient(90deg, ${colorsStr})`;\n }, [colors]);\n const pointColor = React.useMemo(() => {\n if (!color || !type) {\n return null;\n }\n if (type === 'alpha') {\n return color.toRgbString();\n }\n return `hsl(${color.toHsb().h}, 100%, 50%)`;\n }, [color, type]);\n // ======================= Context: Slider ========================\n const onInternalDragStart = (0, _useEvent.default)(onDragStart);\n const onInternalDragChange = (0, _useEvent.default)(onDragChange);\n const unstableContext = React.useMemo(() => ({\n onDragStart: onInternalDragStart,\n onDragChange: onInternalDragChange\n }), []);\n // ======================= Context: Render ========================\n const handleRender = (0, _useEvent.default)((ori, info) => {\n const {\n onFocus,\n style,\n className: handleCls,\n onKeyDown\n } = ori.props;\n // Point Color\n const mergedStyle = Object.assign({}, style);\n if (type === 'gradient') {\n mergedStyle.background = (0, _util.getGradientPercentColor)(colors, info.value);\n }\n return /*#__PURE__*/React.cloneElement(ori, {\n onFocus: e => {\n onActive === null || onActive === void 0 ? void 0 : onActive(info.index);\n onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);\n },\n style: mergedStyle,\n className: (0, _classnames.default)(handleCls, {\n [`${prefixCls}-slider-handle-active`]: activeIndex === info.index\n }),\n onKeyDown: e => {\n if ((e.key === 'Delete' || e.key === 'Backspace') && onKeyDelete) {\n onKeyDelete(info.index);\n }\n onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);\n }\n });\n });\n const sliderContext = React.useMemo(() => ({\n direction: 'ltr',\n handleRender\n }), []);\n // ============================ Render ============================\n return /*#__PURE__*/React.createElement(_Context.default.Provider, {\n value: sliderContext\n }, /*#__PURE__*/React.createElement(_rcSlider.UnstableContext.Provider, {\n value: unstableContext\n }, /*#__PURE__*/React.createElement(_slider.default, Object.assign({}, sliderProps, {\n className: (0, _classnames.default)(className, `${prefixCls}-slider`),\n tooltip: {\n open: false\n },\n range: {\n editable: range,\n minCount: 2\n },\n styles: {\n rail: {\n background: linearCss\n },\n handle: pointColor ? {\n background: pointColor\n } : {}\n },\n classNames: {\n rail: `${prefixCls}-slider-rail`,\n handle: `${prefixCls}-slider-handle`\n }\n }))));\n};\nexports.GradientColorSlider = GradientColorSlider;\nconst SingleColorSlider = props => {\n const {\n value,\n onChange,\n onChangeComplete\n } = props;\n const singleOnChange = v => onChange(v[0]);\n const singleOnChangeComplete = v => onChangeComplete(v[0]);\n return /*#__PURE__*/React.createElement(GradientColorSlider, Object.assign({}, props, {\n value: [value],\n onChange: singleOnChange,\n onChangeComplete: singleOnChangeComplete\n }));\n};\nvar _default = exports.default = SingleColorSlider;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _inputNumber = _interopRequireDefault(require(\"../../input-number\"));\nconst ColorSteppers = _ref => {\n let {\n prefixCls,\n min = 0,\n max = 100,\n value,\n onChange,\n className,\n formatter\n } = _ref;\n const colorSteppersPrefixCls = `${prefixCls}-steppers`;\n const [stepValue, setStepValue] = (0, _react.useState)(value);\n // Update step value\n (0, _react.useEffect)(() => {\n if (!Number.isNaN(value)) {\n setStepValue(value);\n }\n }, [value]);\n return /*#__PURE__*/_react.default.createElement(_inputNumber.default, {\n className: (0, _classnames.default)(colorSteppersPrefixCls, className),\n min: min,\n max: max,\n value: stepValue,\n formatter: formatter,\n size: \"small\",\n onChange: step => {\n if (!value) {\n setStepValue(step || 0);\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(step);\n }\n });\n};\nvar _default = exports.default = ColorSteppers;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _colorPicker = require(\"@rc-component/color-picker\");\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _pickAttrs = _interopRequireDefault(require(\"rc-util/lib/pickAttrs\"));\nvar _locale = require(\"../../locale\");\nvar _util = require(\"../util\");\nvar _ColorClear = _interopRequireDefault(require(\"./ColorClear\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst ColorTrigger = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n const {\n color,\n prefixCls,\n open,\n disabled,\n format,\n className,\n showText,\n activeIndex\n } = props,\n rest = __rest(props, [\"color\", \"prefixCls\", \"open\", \"disabled\", \"format\", \"className\", \"showText\", \"activeIndex\"]);\n const colorTriggerPrefixCls = `${prefixCls}-trigger`;\n const colorTextPrefixCls = `${colorTriggerPrefixCls}-text`;\n const colorTextCellPrefixCls = `${colorTextPrefixCls}-cell`;\n const [locale] = (0, _locale.useLocale)('ColorPicker');\n // ============================== Text ==============================\n const desc = _react.default.useMemo(() => {\n if (!showText) {\n return '';\n }\n if (typeof showText === 'function') {\n return showText(color);\n }\n if (color.cleared) {\n return locale.transparent;\n }\n if (color.isGradient()) {\n return color.getColors().map((c, index) => {\n const inactive = activeIndex !== -1 && activeIndex !== index;\n return /*#__PURE__*/_react.default.createElement(\"span\", {\n key: index,\n className: (0, _classnames.default)(colorTextCellPrefixCls, inactive && `${colorTextCellPrefixCls}-inactive`)\n }, c.color.toRgbString(), \" \", c.percent, \"%\");\n });\n }\n const hexString = color.toHexString().toUpperCase();\n const alpha = (0, _util.getColorAlpha)(color);\n switch (format) {\n case 'rgb':\n return color.toRgbString();\n case 'hsb':\n return color.toHsbString();\n // case 'hex':\n default:\n return alpha < 100 ? `${hexString.slice(0, 7)},${alpha}%` : hexString;\n }\n }, [color, format, showText, activeIndex]);\n // ============================= Render =============================\n const containerNode = (0, _react.useMemo)(() => color.cleared ? (/*#__PURE__*/_react.default.createElement(_ColorClear.default, {\n prefixCls: prefixCls\n })) : (/*#__PURE__*/_react.default.createElement(_colorPicker.ColorBlock, {\n prefixCls: prefixCls,\n color: color.toCssString()\n })), [color, prefixCls]);\n return /*#__PURE__*/_react.default.createElement(\"div\", Object.assign({\n ref: ref,\n className: (0, _classnames.default)(colorTriggerPrefixCls, className, {\n [`${colorTriggerPrefixCls}-active`]: open,\n [`${colorTriggerPrefixCls}-disabled`]: disabled\n })\n }, (0, _pickAttrs.default)(rest)), containerNode, showText && /*#__PURE__*/_react.default.createElement(\"div\", {\n className: colorTextPrefixCls\n }, desc));\n});\nvar _default = exports.default = ColorTrigger;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _color = require(\"../../color\");\nvar _util = require(\"../../util\");\nvar _ColorSlider = require(\"../ColorSlider\");\nfunction sortColors(colors) {\n return (0, _toConsumableArray2.default)(colors).sort((a, b) => a.percent - b.percent);\n}\n/**\n * GradientColorBar will auto show when the mode is `gradient`.\n */\nconst GradientColorBar = props => {\n const {\n prefixCls,\n mode,\n onChange,\n onChangeComplete,\n onActive,\n activeIndex,\n onGradientDragging,\n colors\n } = props;\n const isGradient = mode === 'gradient';\n // ============================= Colors =============================\n const colorList = React.useMemo(() => colors.map(info => ({\n percent: info.percent,\n color: info.color.toRgbString()\n })), [colors]);\n const values = React.useMemo(() => colorList.map(info => info.percent), [colorList]);\n // ============================== Drag ==============================\n const colorsRef = React.useRef(colorList);\n // Record current colors\n const onDragStart = _ref => {\n let {\n rawValues,\n draggingIndex,\n draggingValue\n } = _ref;\n if (rawValues.length > colorList.length) {\n // Add new node\n const newPointColor = (0, _util.getGradientPercentColor)(colorList, draggingValue);\n const nextColors = (0, _toConsumableArray2.default)(colorList);\n nextColors.splice(draggingIndex, 0, {\n percent: draggingValue,\n color: newPointColor\n });\n colorsRef.current = nextColors;\n } else {\n colorsRef.current = colorList;\n }\n onGradientDragging(true);\n onChange(new _color.AggregationColor(sortColors(colorsRef.current)), true);\n };\n // Adjust color when dragging\n const onDragChange = _ref2 => {\n let {\n deleteIndex,\n draggingIndex,\n draggingValue\n } = _ref2;\n let nextColors = (0, _toConsumableArray2.default)(colorsRef.current);\n if (deleteIndex !== -1) {\n nextColors.splice(deleteIndex, 1);\n } else {\n nextColors[draggingIndex] = Object.assign(Object.assign({}, nextColors[draggingIndex]), {\n percent: draggingValue\n });\n nextColors = sortColors(nextColors);\n }\n onChange(new _color.AggregationColor(nextColors), true);\n };\n // ============================== Key ===============================\n const onKeyDelete = index => {\n const nextColors = (0, _toConsumableArray2.default)(colorList);\n nextColors.splice(index, 1);\n const nextColor = new _color.AggregationColor(nextColors);\n onChange(nextColor);\n onChangeComplete(nextColor);\n };\n // ============================= Change =============================\n const onInternalChangeComplete = nextValues => {\n onChangeComplete(new _color.AggregationColor(colorList));\n // Reset `activeIndex` if out of range\n if (activeIndex >= nextValues.length) {\n onActive(nextValues.length - 1);\n }\n onGradientDragging(false);\n };\n // ============================= Render =============================\n if (!isGradient) {\n return null;\n }\n return /*#__PURE__*/React.createElement(_ColorSlider.GradientColorSlider, {\n min: 0,\n max: 100,\n prefixCls: prefixCls,\n className: `${prefixCls}-gradient-slider`,\n colors: colorList,\n color: null,\n value: values,\n range: true,\n onChangeComplete: onInternalChangeComplete,\n disabled: false,\n type: \"gradient\",\n // Active\n activeIndex: activeIndex,\n onActive: onActive,\n // Drag\n onDragStart: onDragStart,\n onDragChange: onDragChange,\n onKeyDelete: onKeyDelete\n });\n};\nvar _default = exports.default = /*#__PURE__*/React.memo(GradientColorBar);","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _colorPicker = _interopRequireDefault(require(\"@rc-component/color-picker\"));\nvar _useLayoutEffect = _interopRequireDefault(require(\"rc-util/lib/hooks/useLayoutEffect\"));\nvar _segmented = _interopRequireDefault(require(\"../../../segmented\"));\nvar _color = require(\"../../color\");\nvar _context = require(\"../../context\");\nvar _util = require(\"../../util\");\nvar _ColorClear = _interopRequireDefault(require(\"../ColorClear\"));\nvar _ColorInput = _interopRequireDefault(require(\"../ColorInput\"));\nvar _ColorSlider = _interopRequireDefault(require(\"../ColorSlider\"));\nvar _GradientColorBar = _interopRequireDefault(require(\"./GradientColorBar\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst components = {\n slider: _ColorSlider.default\n};\nconst PanelPicker = () => {\n const panelPickerContext = (0, _react.useContext)(_context.PanelPickerContext);\n const {\n mode,\n onModeChange,\n modeOptions,\n prefixCls,\n allowClear,\n value,\n disabledAlpha,\n onChange,\n onClear,\n onChangeComplete,\n activeIndex,\n gradientDragging\n } = panelPickerContext,\n injectProps = __rest(panelPickerContext, [\"mode\", \"onModeChange\", \"modeOptions\", \"prefixCls\", \"allowClear\", \"value\", \"disabledAlpha\", \"onChange\", \"onClear\", \"onChangeComplete\", \"activeIndex\", \"gradientDragging\"]);\n // ============================ Colors ============================\n const colors = _react.default.useMemo(() => {\n if (!value.cleared) {\n return value.getColors();\n }\n return [{\n percent: 0,\n color: new _color.AggregationColor('')\n }, {\n percent: 100,\n color: new _color.AggregationColor('')\n }];\n }, [value]);\n // ========================= Single Color =========================\n const isSingle = !value.isGradient();\n // We cache the point color in case user drag the gradient point across another one\n const [lockedColor, setLockedColor] = _react.default.useState(value);\n // Use layout effect here since `useEffect` will cause a blink when mouseDown\n (0, _useLayoutEffect.default)(() => {\n var _a;\n if (!isSingle) {\n setLockedColor((_a = colors[activeIndex]) === null || _a === void 0 ? void 0 : _a.color);\n }\n }, [gradientDragging, activeIndex]);\n const activeColor = _react.default.useMemo(() => {\n var _a;\n if (isSingle) {\n return value;\n }\n // Use cache when dragging. User can not operation panel when dragging.\n if (gradientDragging) {\n return lockedColor;\n }\n return (_a = colors[activeIndex]) === null || _a === void 0 ? void 0 : _a.color;\n }, [value, activeIndex, isSingle, lockedColor, gradientDragging]);\n // ========================= Picker Color =========================\n const [pickerColor, setPickerColor] = _react.default.useState(activeColor);\n const [forceSync, setForceSync] = _react.default.useState(0);\n const mergedPickerColor = (pickerColor === null || pickerColor === void 0 ? void 0 : pickerColor.equals(activeColor)) ? activeColor : pickerColor;\n (0, _useLayoutEffect.default)(() => {\n setPickerColor(activeColor);\n }, [forceSync, activeColor === null || activeColor === void 0 ? void 0 : activeColor.toHexString()]);\n // ============================ Change ============================\n const fillColor = (nextColor, info) => {\n let submitColor = (0, _util.generateColor)(nextColor);\n // Fill alpha color to 100% if origin is cleared color\n if (value.cleared) {\n const rgb = submitColor.toRgb();\n // Auto fill color if origin is `0/0/0` to enhance user experience\n if (!rgb.r && !rgb.g && !rgb.b && info) {\n const {\n type: infoType,\n value: infoValue = 0\n } = info;\n submitColor = new _color.AggregationColor({\n h: infoType === 'hue' ? infoValue : 0,\n s: 1,\n b: 1,\n a: infoType === 'alpha' ? infoValue / 100 : 1\n });\n } else {\n submitColor = (0, _util.genAlphaColor)(submitColor);\n }\n }\n if (mode === 'single') {\n return submitColor;\n }\n const nextColors = (0, _toConsumableArray2.default)(colors);\n nextColors[activeIndex] = Object.assign(Object.assign({}, nextColors[activeIndex]), {\n color: submitColor\n });\n return new _color.AggregationColor(nextColors);\n };\n const onPickerChange = (colorValue, fromPicker, info) => {\n const nextColor = fillColor(colorValue, info);\n setPickerColor(nextColor.isGradient() ? nextColor.getColors()[activeIndex].color : nextColor);\n onChange(nextColor, fromPicker);\n };\n const onInternalChangeComplete = (nextColor, info) => {\n // Trigger complete event\n onChangeComplete(fillColor(nextColor, info));\n // Back of origin color in case in controlled\n // This will set after `onChangeComplete` to avoid `setState` trigger rerender\n // which will make `fillColor` get wrong `color.cleared` state\n setForceSync(ori => ori + 1);\n };\n const onInputChange = colorValue => {\n onChange(fillColor(colorValue));\n };\n // ============================ Render ============================\n // Operation bar\n let operationNode = null;\n const showMode = modeOptions.length > 1;\n if (allowClear || showMode) {\n operationNode = /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-operation`\n }, showMode && (/*#__PURE__*/_react.default.createElement(_segmented.default, {\n size: \"small\",\n options: modeOptions,\n value: mode,\n onChange: onModeChange\n })), /*#__PURE__*/_react.default.createElement(_ColorClear.default, Object.assign({\n prefixCls: prefixCls,\n value: value,\n onChange: clearColor => {\n onChange(clearColor);\n onClear === null || onClear === void 0 ? void 0 : onClear();\n }\n }, injectProps)));\n }\n // Return\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, operationNode, /*#__PURE__*/_react.default.createElement(_GradientColorBar.default, Object.assign({}, panelPickerContext, {\n colors: colors\n })), /*#__PURE__*/_react.default.createElement(_colorPicker.default, {\n prefixCls: prefixCls,\n value: mergedPickerColor === null || mergedPickerColor === void 0 ? void 0 : mergedPickerColor.toHsb(),\n disabledAlpha: disabledAlpha,\n onChange: (colorValue, info) => {\n onPickerChange(colorValue, true, info);\n },\n onChangeComplete: (colorValue, info) => {\n onInternalChangeComplete(colorValue, info);\n },\n components: components\n }), /*#__PURE__*/_react.default.createElement(_ColorInput.default, Object.assign({\n value: activeColor,\n onChange: onInputChange,\n prefixCls: prefixCls,\n disabledAlpha: disabledAlpha\n }, injectProps)));\n};\nvar _default = exports.default = PanelPicker;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _context = require(\"../context\");\nvar _ColorPresets = _interopRequireDefault(require(\"./ColorPresets\"));\nconst PanelPresets = () => {\n const {\n prefixCls,\n value,\n presets,\n onChange\n } = (0, _react.useContext)(_context.PanelPresetsContext);\n return Array.isArray(presets) ? (/*#__PURE__*/_react.default.createElement(_ColorPresets.default, {\n value: value,\n presets: presets,\n prefixCls: prefixCls,\n onChange: onChange\n })) : null;\n};\nvar _default = exports.default = PanelPresets;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PanelPresetsContext = exports.PanelPickerContext = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst PanelPickerContext = exports.PanelPickerContext = /*#__PURE__*/_react.default.createContext({});\nconst PanelPresetsContext = exports.PanelPresetsContext = /*#__PURE__*/_react.default.createContext({});","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useModeColor;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _locale = require(\"../../locale\");\nvar _util = require(\"../util\");\n/**\n * Combine the `color` and `mode` to make sure sync of state.\n */\nfunction useModeColor(defaultValue, value, mode) {\n const [locale] = (0, _locale.useLocale)('ColorPicker');\n // ======================== Base ========================\n // Color\n const [mergedColor, setMergedColor] = (0, _useMergedState.default)(defaultValue, {\n value\n });\n // Mode\n const [modeState, setModeState] = React.useState('single');\n const [modeOptionList, modeSet] = React.useMemo(() => {\n const list = (Array.isArray(mode) ? mode : [mode]).filter(m => m);\n if (!list.length) {\n list.push('single');\n }\n const modes = new Set(list);\n const optionList = [];\n const pushOption = (modeType, localeTxt) => {\n if (modes.has(modeType)) {\n optionList.push({\n label: localeTxt,\n value: modeType\n });\n }\n };\n pushOption('single', locale.singleColor);\n pushOption('gradient', locale.gradientColor);\n return [optionList, modes];\n }, [mode]);\n // ======================== Post ========================\n // We need align `mode` with `color` state\n // >>>>> Color\n const [cacheColor, setCacheColor] = React.useState(null);\n const setColor = (0, _useEvent.default)(nextColor => {\n setCacheColor(nextColor);\n setMergedColor(nextColor);\n });\n const postColor = React.useMemo(() => {\n const colorObj = (0, _util.generateColor)(mergedColor || '');\n // Use `cacheColor` in case the color is `cleared`\n return colorObj.equals(cacheColor) ? cacheColor : colorObj;\n }, [mergedColor, cacheColor]);\n // >>>>> Mode\n const postMode = React.useMemo(() => {\n var _a;\n if (modeSet.has(modeState)) {\n return modeState;\n }\n return (_a = modeOptionList[0]) === null || _a === void 0 ? void 0 : _a.value;\n }, [modeSet, modeState, modeOptionList]);\n // ======================= Effect =======================\n // Dynamic update mode when color change\n React.useEffect(() => {\n setModeState(postColor.isGradient() ? 'gradient' : 'single');\n }, [postColor]);\n // ======================= Return =======================\n return [postColor, setColor, postMode, setModeState, modeOptionList];\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ColorPicker = _interopRequireDefault(require(\"./ColorPicker\"));\nvar _default = exports.default = _ColorPicker.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ColorFormat = void 0;\nvar ColorFormat;\n(function (ColorFormat) {\n ColorFormat[\"hex\"] = \"hex\";\n ColorFormat[\"rgb\"] = \"rgb\";\n ColorFormat[\"hsb\"] = \"hsb\";\n})(ColorFormat || (exports.ColorFormat = ColorFormat = {}));","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getTransBg = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\n/**\n * @private Internal usage only\n */\nconst getTransBg = (size, colorFill) => ({\n backgroundImage: `conic-gradient(${colorFill} 0 25%, transparent 0 50%, ${colorFill} 0 75%, transparent 0)`,\n backgroundSize: `${size} ${size}`\n});\nexports.getTransBg = getTransBg;\nconst genColorBlockStyle = (token, size) => {\n const {\n componentCls,\n borderRadiusSM,\n colorPickerInsetShadow,\n lineWidth,\n colorFillSecondary\n } = token;\n return {\n [`${componentCls}-color-block`]: Object.assign(Object.assign({\n position: 'relative',\n borderRadius: borderRadiusSM,\n width: size,\n height: size,\n boxShadow: colorPickerInsetShadow,\n flex: 'none'\n }, getTransBg('50%', token.colorFillSecondary)), {\n [`${componentCls}-color-block-inner`]: {\n width: '100%',\n height: '100%',\n boxShadow: `inset 0 0 0 ${(0, _cssinjs.unit)(lineWidth)} ${colorFillSecondary}`,\n borderRadius: 'inherit'\n }\n })\n };\n};\nvar _default = exports.default = genColorBlockStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genActiveStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _compactItem = require(\"../../style/compact-item\");\nvar _internal = require(\"../../theme/internal\");\nvar _colorBlock = _interopRequireDefault(require(\"./color-block\"));\nvar _input = _interopRequireDefault(require(\"./input\"));\nvar _picker = _interopRequireDefault(require(\"./picker\"));\nvar _presets = _interopRequireDefault(require(\"./presets\"));\nvar _slider = _interopRequireDefault(require(\"./slider\"));\nconst genActiveStyle = (token, borderColor, outlineColor) => ({\n borderInlineEndWidth: token.lineWidth,\n borderColor,\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(token.controlOutlineWidth)} ${outlineColor}`,\n outline: 0\n});\nexports.genActiveStyle = genActiveStyle;\nconst genRtlStyle = token => {\n const {\n componentCls\n } = token;\n return {\n '&-rtl': {\n [`${componentCls}-presets-color`]: {\n '&::after': {\n direction: 'ltr'\n }\n },\n [`${componentCls}-clear`]: {\n '&::after': {\n direction: 'ltr'\n }\n }\n }\n };\n};\nconst genClearStyle = (token, size, extraStyle) => {\n const {\n componentCls,\n borderRadiusSM,\n lineWidth,\n colorSplit,\n colorBorder,\n red6\n } = token;\n return {\n [`${componentCls}-clear`]: Object.assign(Object.assign({\n width: size,\n height: size,\n borderRadius: borderRadiusSM,\n border: `${(0, _cssinjs.unit)(lineWidth)} solid ${colorSplit}`,\n position: 'relative',\n overflow: 'hidden',\n cursor: 'inherit',\n transition: `all ${token.motionDurationFast}`\n }, extraStyle), {\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetInlineEnd: token.calc(lineWidth).mul(-1).equal(),\n top: token.calc(lineWidth).mul(-1).equal(),\n display: 'block',\n width: 40,\n // maximum\n height: 2,\n // fixed\n transformOrigin: `calc(100% - 1px) 1px`,\n transform: 'rotate(-45deg)',\n backgroundColor: red6\n },\n '&:hover': {\n borderColor: colorBorder\n }\n })\n };\n};\nconst genStatusStyle = token => {\n const {\n componentCls,\n colorError,\n colorWarning,\n colorErrorHover,\n colorWarningHover,\n colorErrorOutline,\n colorWarningOutline\n } = token;\n return {\n [`&${componentCls}-status-error`]: {\n borderColor: colorError,\n '&:hover': {\n borderColor: colorErrorHover\n },\n [`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorError, colorErrorOutline))\n },\n [`&${componentCls}-status-warning`]: {\n borderColor: colorWarning,\n '&:hover': {\n borderColor: colorWarningHover\n },\n [`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorWarning, colorWarningOutline))\n }\n };\n};\nconst genSizeStyle = token => {\n const {\n componentCls,\n controlHeightLG,\n controlHeightSM,\n controlHeight,\n controlHeightXS,\n borderRadius,\n borderRadiusSM,\n borderRadiusXS,\n borderRadiusLG,\n fontSizeLG\n } = token;\n return {\n [`&${componentCls}-lg`]: {\n minWidth: controlHeightLG,\n minHeight: controlHeightLG,\n borderRadius: borderRadiusLG,\n [`${componentCls}-color-block, ${componentCls}-clear`]: {\n width: controlHeight,\n height: controlHeight,\n borderRadius\n },\n [`${componentCls}-trigger-text`]: {\n fontSize: fontSizeLG\n }\n },\n [`&${componentCls}-sm`]: {\n minWidth: controlHeightSM,\n minHeight: controlHeightSM,\n borderRadius: borderRadiusSM,\n [`${componentCls}-color-block, ${componentCls}-clear`]: {\n width: controlHeightXS,\n height: controlHeightXS,\n borderRadius: borderRadiusXS\n },\n [`${componentCls}-trigger-text`]: {\n lineHeight: (0, _cssinjs.unit)(controlHeightXS)\n }\n }\n };\n};\nconst genColorPickerStyle = token => {\n const {\n antCls,\n componentCls,\n colorPickerWidth,\n colorPrimary,\n motionDurationMid,\n colorBgElevated,\n colorTextDisabled,\n colorText,\n colorBgContainerDisabled,\n borderRadius,\n marginXS,\n marginSM,\n controlHeight,\n controlHeightSM,\n colorBgTextActive,\n colorPickerPresetColorSize,\n colorPickerPreviewSize,\n lineWidth,\n colorBorder,\n paddingXXS,\n fontSize,\n colorPrimaryHover,\n controlOutline\n } = token;\n return [{\n [componentCls]: Object.assign({\n [`${componentCls}-inner`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({\n '&-content': {\n display: 'flex',\n flexDirection: 'column',\n width: colorPickerWidth,\n [`& > ${antCls}-divider`]: {\n margin: `${(0, _cssinjs.unit)(marginSM)} 0 ${(0, _cssinjs.unit)(marginXS)}`\n }\n },\n [`${componentCls}-panel`]: Object.assign({}, (0, _picker.default)(token))\n }, (0, _slider.default)(token)), (0, _colorBlock.default)(token, colorPickerPreviewSize)), (0, _input.default)(token)), (0, _presets.default)(token)), genClearStyle(token, colorPickerPresetColorSize, {\n marginInlineStart: 'auto'\n })), {\n // Operation bar\n [`${componentCls}-operation`]: {\n display: 'flex',\n justifyContent: 'space-between',\n marginBottom: marginXS\n }\n }),\n '&-trigger': Object.assign(Object.assign(Object.assign(Object.assign({\n minWidth: controlHeight,\n minHeight: controlHeight,\n borderRadius,\n border: `${(0, _cssinjs.unit)(lineWidth)} solid ${colorBorder}`,\n cursor: 'pointer',\n display: 'inline-flex',\n alignItems: 'flex-start',\n justifyContent: 'center',\n transition: `all ${motionDurationMid}`,\n background: colorBgElevated,\n padding: token.calc(paddingXXS).sub(lineWidth).equal(),\n [`${componentCls}-trigger-text`]: {\n marginInlineStart: marginXS,\n marginInlineEnd: token.calc(marginXS).sub(token.calc(paddingXXS).sub(lineWidth)).equal(),\n fontSize,\n color: colorText,\n alignSelf: 'center',\n '&-cell': {\n '&:not(:last-child):after': {\n content: '\", \"'\n },\n '&-inactive': {\n color: colorTextDisabled\n }\n }\n },\n '&:hover': {\n borderColor: colorPrimaryHover\n },\n [`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorPrimary, controlOutline)),\n '&-disabled': {\n color: colorTextDisabled,\n background: colorBgContainerDisabled,\n cursor: 'not-allowed',\n '&:hover': {\n borderColor: colorBgTextActive\n },\n [`${componentCls}-trigger-text`]: {\n color: colorTextDisabled\n }\n }\n }, genClearStyle(token, controlHeightSM)), (0, _colorBlock.default)(token, controlHeightSM)), genStatusStyle(token)), genSizeStyle(token))\n }, genRtlStyle(token))\n }, (0, _compactItem.genCompactItemStyle)(token, {\n focusElCls: `${componentCls}-trigger-active`\n })];\n};\nvar _default = exports.default = (0, _internal.genStyleHooks)('ColorPicker', token => {\n const {\n colorTextQuaternary,\n marginSM\n } = token;\n const colorPickerSliderHeight = 8;\n const colorPickerToken = (0, _internal.mergeToken)(token, {\n colorPickerWidth: 234,\n colorPickerHandlerSize: 16,\n colorPickerHandlerSizeSM: 12,\n colorPickerAlphaInputWidth: 44,\n colorPickerInputNumberHandleWidth: 16,\n colorPickerPresetColorSize: 24,\n colorPickerInsetShadow: `inset 0 0 1px 0 ${colorTextQuaternary}`,\n colorPickerSliderHeight,\n colorPickerPreviewSize: token.calc(colorPickerSliderHeight).mul(2).add(marginSM).equal()\n });\n return [genColorPickerStyle(colorPickerToken)];\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genInputStyle = token => {\n const {\n componentCls,\n antCls,\n fontSizeSM,\n lineHeightSM,\n colorPickerAlphaInputWidth,\n marginXXS,\n paddingXXS,\n controlHeightSM,\n marginXS,\n fontSizeIcon,\n paddingXS,\n colorTextPlaceholder,\n colorPickerInputNumberHandleWidth,\n lineWidth\n } = token;\n return {\n [`${componentCls}-input-container`]: {\n display: 'flex',\n [`${componentCls}-steppers${antCls}-input-number`]: {\n fontSize: fontSizeSM,\n lineHeight: lineHeightSM,\n [`${antCls}-input-number-input`]: {\n paddingInlineStart: paddingXXS,\n paddingInlineEnd: 0\n },\n [`${antCls}-input-number-handler-wrap`]: {\n width: colorPickerInputNumberHandleWidth\n }\n },\n [`${componentCls}-steppers${componentCls}-alpha-input`]: {\n flex: `0 0 ${(0, _cssinjs.unit)(colorPickerAlphaInputWidth)}`,\n marginInlineStart: marginXXS\n },\n [`${componentCls}-format-select${antCls}-select`]: {\n marginInlineEnd: marginXS,\n width: 'auto',\n '&-single': {\n [`${antCls}-select-selector`]: {\n padding: 0,\n border: 0\n },\n [`${antCls}-select-arrow`]: {\n insetInlineEnd: 0\n },\n [`${antCls}-select-selection-item`]: {\n paddingInlineEnd: token.calc(fontSizeIcon).add(marginXXS).equal(),\n fontSize: fontSizeSM,\n lineHeight: (0, _cssinjs.unit)(controlHeightSM)\n },\n [`${antCls}-select-item-option-content`]: {\n fontSize: fontSizeSM,\n lineHeight: lineHeightSM\n },\n [`${antCls}-select-dropdown`]: {\n [`${antCls}-select-item`]: {\n minHeight: 'auto'\n }\n }\n }\n },\n [`${componentCls}-input`]: {\n gap: marginXXS,\n alignItems: 'center',\n flex: 1,\n width: 0,\n [`${componentCls}-hsb-input,${componentCls}-rgb-input`]: {\n display: 'flex',\n gap: marginXXS,\n alignItems: 'center'\n },\n [`${componentCls}-steppers`]: {\n flex: 1\n },\n [`${componentCls}-hex-input${antCls}-input-affix-wrapper`]: {\n flex: 1,\n padding: `0 ${(0, _cssinjs.unit)(paddingXS)}`,\n [`${antCls}-input`]: {\n fontSize: fontSizeSM,\n textTransform: 'uppercase',\n lineHeight: (0, _cssinjs.unit)(token.calc(controlHeightSM).sub(token.calc(lineWidth).mul(2)).equal())\n },\n [`${antCls}-input-prefix`]: {\n color: colorTextPlaceholder\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = genInputStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genPickerStyle = token => {\n const {\n componentCls,\n controlHeightLG,\n borderRadiusSM,\n colorPickerInsetShadow,\n marginSM,\n colorBgElevated,\n colorFillSecondary,\n lineWidthBold,\n colorPickerHandlerSize\n } = token;\n return {\n userSelect: 'none',\n [`${componentCls}-select`]: {\n [`${componentCls}-palette`]: {\n minHeight: token.calc(controlHeightLG).mul(4).equal(),\n overflow: 'hidden',\n borderRadius: borderRadiusSM\n },\n [`${componentCls}-saturation`]: {\n position: 'absolute',\n borderRadius: 'inherit',\n boxShadow: colorPickerInsetShadow,\n inset: 0\n },\n marginBottom: marginSM\n },\n // ======================== Panel =========================\n [`${componentCls}-handler`]: {\n width: colorPickerHandlerSize,\n height: colorPickerHandlerSize,\n border: `${(0, _cssinjs.unit)(lineWidthBold)} solid ${colorBgElevated}`,\n position: 'relative',\n borderRadius: '50%',\n cursor: 'pointer',\n boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${colorFillSecondary}`\n }\n };\n};\nvar _default = exports.default = genPickerStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genPresetsStyle = token => {\n const {\n componentCls,\n antCls,\n colorTextQuaternary,\n paddingXXS,\n colorPickerPresetColorSize,\n fontSizeSM,\n colorText,\n lineHeightSM,\n lineWidth,\n borderRadius,\n colorFill,\n colorWhite,\n marginXXS,\n paddingXS,\n fontHeightSM\n } = token;\n return {\n [`${componentCls}-presets`]: {\n [`${antCls}-collapse-item > ${antCls}-collapse-header`]: {\n padding: 0,\n [`${antCls}-collapse-expand-icon`]: {\n height: fontHeightSM,\n color: colorTextQuaternary,\n paddingInlineEnd: paddingXXS\n }\n },\n [`${antCls}-collapse`]: {\n display: 'flex',\n flexDirection: 'column',\n gap: marginXXS\n },\n [`${antCls}-collapse-item > ${antCls}-collapse-content > ${antCls}-collapse-content-box`]: {\n padding: `${(0, _cssinjs.unit)(paddingXS)} 0`\n },\n '&-label': {\n fontSize: fontSizeSM,\n color: colorText,\n lineHeight: lineHeightSM\n },\n '&-items': {\n display: 'flex',\n flexWrap: 'wrap',\n gap: token.calc(marginXXS).mul(1.5).equal(),\n [`${componentCls}-presets-color`]: {\n position: 'relative',\n cursor: 'pointer',\n width: colorPickerPresetColorSize,\n height: colorPickerPresetColorSize,\n '&::before': {\n content: '\"\"',\n pointerEvents: 'none',\n width: token.calc(colorPickerPresetColorSize).add(token.calc(lineWidth).mul(4)).equal(),\n height: token.calc(colorPickerPresetColorSize).add(token.calc(lineWidth).mul(4)).equal(),\n position: 'absolute',\n top: token.calc(lineWidth).mul(-2).equal(),\n insetInlineStart: token.calc(lineWidth).mul(-2).equal(),\n borderRadius,\n border: `${(0, _cssinjs.unit)(lineWidth)} solid transparent`,\n transition: `border-color ${token.motionDurationMid} ${token.motionEaseInBack}`\n },\n '&:hover::before': {\n borderColor: colorFill\n },\n '&::after': {\n boxSizing: 'border-box',\n position: 'absolute',\n top: '50%',\n insetInlineStart: '21.5%',\n display: 'table',\n width: token.calc(colorPickerPresetColorSize).div(13).mul(5).equal(),\n height: token.calc(colorPickerPresetColorSize).div(13).mul(8).equal(),\n border: `${(0, _cssinjs.unit)(token.lineWidthBold)} solid ${token.colorWhite}`,\n borderTop: 0,\n borderInlineStart: 0,\n transform: 'rotate(45deg) scale(0) translate(-50%,-50%)',\n opacity: 0,\n content: '\"\"',\n transition: `all ${token.motionDurationFast} ${token.motionEaseInBack}, opacity ${token.motionDurationFast}`\n },\n [`&${componentCls}-presets-color-checked`]: {\n '&::after': {\n opacity: 1,\n borderColor: colorWhite,\n transform: 'rotate(45deg) scale(1) translate(-50%,-50%)',\n transition: `transform ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}`\n },\n [`&${componentCls}-presets-color-bright`]: {\n '&::after': {\n borderColor: 'rgba(0, 0, 0, 0.45)'\n }\n }\n }\n }\n },\n '&-empty': {\n fontSize: fontSizeSM,\n color: colorTextQuaternary\n }\n }\n };\n};\nvar _default = exports.default = genPresetsStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _colorBlock = require(\"./color-block\");\nconst genSliderStyle = token => {\n const {\n componentCls,\n colorPickerInsetShadow,\n colorBgElevated,\n colorFillSecondary,\n lineWidthBold,\n colorPickerHandlerSizeSM,\n colorPickerSliderHeight,\n marginSM,\n marginXS\n } = token;\n const handleInnerSize = token.calc(colorPickerHandlerSizeSM).sub(token.calc(lineWidthBold).mul(2).equal()).equal();\n const handleHoverSize = token.calc(colorPickerHandlerSizeSM).add(token.calc(lineWidthBold).mul(2).equal()).equal();\n const activeHandleStyle = {\n '&:after': {\n transform: 'scale(1)',\n boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${token.colorPrimaryActive}`\n }\n };\n return {\n // ======================== Slider ========================\n [`${componentCls}-slider`]: [(0, _colorBlock.getTransBg)((0, _cssinjs.unit)(colorPickerSliderHeight), token.colorFillSecondary), {\n margin: 0,\n padding: 0,\n height: colorPickerSliderHeight,\n borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),\n '&-rail': {\n height: colorPickerSliderHeight,\n borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),\n boxShadow: colorPickerInsetShadow\n },\n [`& ${componentCls}-slider-handle`]: {\n width: handleInnerSize,\n height: handleInnerSize,\n top: 0,\n borderRadius: '100%',\n '&:before': {\n display: 'block',\n position: 'absolute',\n background: 'transparent',\n left: {\n _skip_check_: true,\n value: '50%'\n },\n top: '50%',\n transform: 'translate(-50%, -50%)',\n width: handleHoverSize,\n height: handleHoverSize,\n borderRadius: '100%'\n },\n '&:after': {\n width: colorPickerHandlerSizeSM,\n height: colorPickerHandlerSizeSM,\n border: `${(0, _cssinjs.unit)(lineWidthBold)} solid ${colorBgElevated}`,\n boxShadow: `${colorPickerInsetShadow}, 0 0 0 1px ${colorFillSecondary}`,\n outline: 'none',\n insetInlineStart: token.calc(lineWidthBold).mul(-1).equal(),\n top: token.calc(lineWidthBold).mul(-1).equal(),\n background: 'transparent',\n transition: 'none'\n },\n '&:focus': activeHandleStyle\n }\n }],\n // ======================== Layout ========================\n [`${componentCls}-slider-container`]: {\n display: 'flex',\n gap: marginSM,\n marginBottom: marginSM,\n // Group\n [`${componentCls}-slider-group`]: {\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'space-between',\n display: 'flex',\n '&-disabled-alpha': {\n justifyContent: 'center'\n }\n }\n },\n [`${componentCls}-gradient-slider`]: {\n marginBottom: marginXS,\n [`& ${componentCls}-slider-handle`]: {\n '&:after': {\n transform: 'scale(0.8)'\n },\n '&-active, &:focus': activeHandleStyle\n }\n }\n };\n};\nvar _default = exports.default = genSliderStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getRoundNumber = exports.getGradientPercentColor = exports.getColorAlpha = exports.generateColor = exports.genAlphaColor = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _colorPicker = require(\"@rc-component/color-picker\");\nvar _color = require(\"./color\");\nconst generateColor = color => {\n if (color instanceof _color.AggregationColor) {\n return color;\n }\n return new _color.AggregationColor(color);\n};\nexports.generateColor = generateColor;\nconst getRoundNumber = value => Math.round(Number(value || 0));\nexports.getRoundNumber = getRoundNumber;\nconst getColorAlpha = color => getRoundNumber(color.toHsb().a * 100);\n/** Return the color whose `alpha` is 1 */\nexports.getColorAlpha = getColorAlpha;\nconst genAlphaColor = (color, alpha) => {\n const rgba = color.toRgb();\n // Color from hsb input may get `rgb` is (0/0/0) when `hsb.b` is 0\n // So if rgb is empty, we should get from hsb\n if (!rgba.r && !rgba.g && !rgba.b) {\n const hsba = color.toHsb();\n hsba.a = alpha || 1;\n return generateColor(hsba);\n }\n rgba.a = alpha || 1;\n return generateColor(rgba);\n};\n/**\n * Get percent position color. e.g. [10%-#fff, 20%-#000], 15% => #888\n */\nexports.genAlphaColor = genAlphaColor;\nconst getGradientPercentColor = (colors, percent) => {\n const filledColors = [{\n percent: 0,\n color: colors[0].color\n }].concat((0, _toConsumableArray2.default)(colors), [{\n percent: 100,\n color: colors[colors.length - 1].color\n }]);\n for (let i = 0; i < filledColors.length - 1; i += 1) {\n const startPtg = filledColors[i].percent;\n const endPtg = filledColors[i + 1].percent;\n const startColor = filledColors[i].color;\n const endColor = filledColors[i + 1].color;\n if (startPtg <= percent && percent <= endPtg) {\n const dist = endPtg - startPtg;\n if (dist === 0) {\n return startColor;\n }\n const ratio = (percent - startPtg) / dist * 100;\n const startRcColor = new _colorPicker.Color(startColor);\n const endRcColor = new _colorPicker.Color(endColor);\n return startRcColor.mix(endRcColor, ratio).toRgbString();\n }\n }\n // This will never reach\n /* istanbul ignore next */\n return '';\n};\nexports.getGradientPercentColor = getGradientPercentColor;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.DisabledContextProvider = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst DisabledContext = /*#__PURE__*/React.createContext(false);\nconst DisabledContextProvider = _ref => {\n let {\n children,\n disabled\n } = _ref;\n const originDisabled = React.useContext(DisabledContext);\n return /*#__PURE__*/React.createElement(DisabledContext.Provider, {\n value: disabled !== null && disabled !== void 0 ? disabled : originDisabled\n }, children);\n};\nexports.DisabledContextProvider = DisabledContextProvider;\nvar _default = exports.default = DisabledContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = MotionWrapper;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _rcMotion = require(\"rc-motion\");\nvar _internal = require(\"../theme/internal\");\nfunction MotionWrapper(props) {\n const {\n children\n } = props;\n const [, token] = (0, _internal.useToken)();\n const {\n motion\n } = token;\n const needWrapMotionProviderRef = React.useRef(false);\n needWrapMotionProviderRef.current = needWrapMotionProviderRef.current || motion === false;\n if (needWrapMotionProviderRef.current) {\n return /*#__PURE__*/React.createElement(_rcMotion.Provider, {\n motion: motion\n }, children);\n }\n return children;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _warning = require(\"../_util/warning\");\n/**\n * Warning for ConfigProviderProps.\n * This will be empty function in production.\n */\nconst PropWarning = /*#__PURE__*/React.memo(_ref => {\n let {\n dropdownMatchSelectWidth\n } = _ref;\n const warning = (0, _warning.devUseWarning)('ConfigProvider');\n warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');\n return null;\n});\nif (process.env.NODE_ENV !== 'production') {\n PropWarning.displayName = 'PropWarning';\n}\nvar _default = exports.default = process.env.NODE_ENV !== 'production' ? PropWarning : () => null;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.SizeContextProvider = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst SizeContext = /*#__PURE__*/React.createContext(undefined);\nconst SizeContextProvider = _ref => {\n let {\n children,\n size\n } = _ref;\n const originSize = React.useContext(SizeContext);\n return /*#__PURE__*/React.createElement(SizeContext.Provider, {\n value: size || originSize\n }, children);\n};\nexports.SizeContextProvider = SizeContextProvider;\nvar _default = exports.default = SizeContext;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultPrefixCls = exports.defaultIconPrefixCls = exports.Variants = exports.ConfigContext = exports.ConfigConsumer = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst defaultPrefixCls = exports.defaultPrefixCls = 'ant';\nconst defaultIconPrefixCls = exports.defaultIconPrefixCls = 'anticon';\nconst Variants = exports.Variants = ['outlined', 'borderless', 'filled'];\nconst defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {\n if (customizePrefixCls) {\n return customizePrefixCls;\n }\n return suffixCls ? `${defaultPrefixCls}-${suffixCls}` : defaultPrefixCls;\n};\n// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will cause circular dependency.\nconst ConfigContext = exports.ConfigContext = /*#__PURE__*/React.createContext({\n // We provide a default function for Context without provider\n getPrefixCls: defaultGetPrefixCls,\n iconPrefixCls: defaultIconPrefixCls\n});\nconst {\n Consumer: ConfigConsumer\n} = ConfigContext;\nexports.ConfigConsumer = ConfigConsumer;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getStyle = getStyle;\nexports.registerTheme = registerTheme;\nvar _colors = require(\"@ant-design/colors\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _canUseDom = _interopRequireDefault(require(\"rc-util/lib/Dom/canUseDom\"));\nvar _dynamicCSS = require(\"rc-util/lib/Dom/dynamicCSS\");\nvar _warning = _interopRequireDefault(require(\"../_util/warning\"));\nconst dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;\nfunction getStyle(globalPrefixCls, theme) {\n const variables = {};\n const formatColor = (color, updater) => {\n let clone = color.clone();\n clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;\n return clone.toRgbString();\n };\n const fillColor = (colorVal, type) => {\n const baseColor = new _tinycolor.TinyColor(colorVal);\n const colorPalettes = (0, _colors.generate)(baseColor.toRgbString());\n variables[`${type}-color`] = formatColor(baseColor);\n variables[`${type}-color-disabled`] = colorPalettes[1];\n variables[`${type}-color-hover`] = colorPalettes[4];\n variables[`${type}-color-active`] = colorPalettes[6];\n variables[`${type}-color-outline`] = baseColor.clone().setAlpha(0.2).toRgbString();\n variables[`${type}-color-deprecated-bg`] = colorPalettes[0];\n variables[`${type}-color-deprecated-border`] = colorPalettes[2];\n };\n // ================ Primary Color ================\n if (theme.primaryColor) {\n fillColor(theme.primaryColor, 'primary');\n const primaryColor = new _tinycolor.TinyColor(theme.primaryColor);\n const primaryColors = (0, _colors.generate)(primaryColor.toRgbString());\n // Legacy - We should use semantic naming standard\n primaryColors.forEach((color, index) => {\n variables[`primary-${index + 1}`] = color;\n });\n // Deprecated\n variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, c => c.lighten(35));\n variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, c => c.lighten(20));\n variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, c => c.tint(20));\n variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, c => c.tint(50));\n variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, c => c.setAlpha(c.getAlpha() * 0.12));\n const primaryActiveColor = new _tinycolor.TinyColor(primaryColors[0]);\n variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, c => c.setAlpha(c.getAlpha() * 0.3));\n variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, c => c.darken(2));\n }\n // ================ Success Color ================\n if (theme.successColor) {\n fillColor(theme.successColor, 'success');\n }\n // ================ Warning Color ================\n if (theme.warningColor) {\n fillColor(theme.warningColor, 'warning');\n }\n // ================= Error Color =================\n if (theme.errorColor) {\n fillColor(theme.errorColor, 'error');\n }\n // ================= Info Color ==================\n if (theme.infoColor) {\n fillColor(theme.infoColor, 'info');\n }\n // Convert to css variables\n const cssList = Object.keys(variables).map(key => `--${globalPrefixCls}-${key}: ${variables[key]};`);\n return `\n :root {\n ${cssList.join('\\n')}\n }\n `.trim();\n}\nfunction registerTheme(globalPrefixCls, theme) {\n const style = getStyle(globalPrefixCls, theme);\n if ((0, _canUseDom.default)()) {\n (0, _dynamicCSS.updateCSS)(style, `${dynamicStyleMark}-dynamic-theme`);\n } else {\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;\n }\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _ = require(\".\");\nvar _empty = _interopRequireDefault(require(\"../empty\"));\nconst DefaultRenderEmpty = props => {\n const {\n componentName\n } = props;\n const {\n getPrefixCls\n } = (0, _react.useContext)(_.ConfigContext);\n const prefix = getPrefixCls('empty');\n switch (componentName) {\n case 'Table':\n case 'List':\n return /*#__PURE__*/_react.default.createElement(_empty.default, {\n image: _empty.default.PRESENTED_IMAGE_SIMPLE\n });\n case 'Select':\n case 'TreeSelect':\n case 'Cascader':\n case 'Transfer':\n case 'Mentions':\n return /*#__PURE__*/_react.default.createElement(_empty.default, {\n image: _empty.default.PRESENTED_IMAGE_SIMPLE,\n className: `${prefix}-small`\n });\n /**\n * This type of component should satisfy the nullish coalescing operator(??) on the left-hand side.\n * to let the component itself implement the logic.\n * For example `Table.filter`.\n */\n case 'Table.filter':\n // why `null`? legacy react16 node type `undefined` is not allowed.\n return null;\n default:\n // Should never hit if we take all the component into consider.\n return /*#__PURE__*/_react.default.createElement(_empty.default, null);\n }\n};\nvar _default = exports.default = DefaultRenderEmpty;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\n/**\n * This hook is only for cssVar to add root className for components.\n * If root ClassName is needed, this hook could be refactored with `-root`\n * @param prefixCls\n */\nconst useCSSVarCls = prefixCls => {\n const [,,,, cssVar] = (0, _internal.useToken)();\n return cssVar ? `${prefixCls}-css-var` : '';\n};\nvar _default = exports.default = useCSSVarCls;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nvar _DisabledContext = _interopRequireDefault(require(\"../DisabledContext\"));\nvar _SizeContext = _interopRequireDefault(require(\"../SizeContext\"));\nfunction useConfig() {\n const componentDisabled = (0, _react.useContext)(_DisabledContext.default);\n const componentSize = (0, _react.useContext)(_SizeContext.default);\n return {\n componentDisabled,\n componentSize\n };\n}\nvar _default = exports.default = useConfig;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _SizeContext = _interopRequireDefault(require(\"../SizeContext\"));\nconst useSize = customSize => {\n const size = _react.default.useContext(_SizeContext.default);\n const mergedSize = _react.default.useMemo(() => {\n if (!customSize) {\n return size;\n }\n if (typeof customSize === 'string') {\n return customSize !== null && customSize !== void 0 ? customSize : size;\n }\n if (customSize instanceof Function) {\n return customSize(size);\n }\n return size;\n }, [customSize, size]);\n return mergedSize;\n};\nvar _default = exports.default = useSize;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useTheme;\nvar _useMemo = _interopRequireDefault(require(\"rc-util/lib/hooks/useMemo\"));\nvar _isEqual = _interopRequireDefault(require(\"rc-util/lib/isEqual\"));\nvar _warning = require(\"../../_util/warning\");\nvar _internal = require(\"../../theme/internal\");\nvar _useThemeKey = _interopRequireDefault(require(\"./useThemeKey\"));\nfunction useTheme(theme, parentTheme, config) {\n var _a, _b;\n const warning = (0, _warning.devUseWarning)('ConfigProvider');\n const themeConfig = theme || {};\n const parentThemeConfig = themeConfig.inherit === false || !parentTheme ? Object.assign(Object.assign({}, _internal.defaultConfig), {\n hashed: (_a = parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.hashed) !== null && _a !== void 0 ? _a : _internal.defaultConfig.hashed,\n cssVar: parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.cssVar\n }) : parentTheme;\n const themeKey = (0, _useThemeKey.default)();\n if (process.env.NODE_ENV !== 'production') {\n const cssVarEnabled = themeConfig.cssVar || parentThemeConfig.cssVar;\n const validKey = !!(typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || themeKey);\n process.env.NODE_ENV !== \"production\" ? warning(!cssVarEnabled || validKey, 'breaking', 'Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.') : void 0;\n }\n return (0, _useMemo.default)(() => {\n var _a, _b;\n if (!theme) {\n return parentTheme;\n }\n // Override\n const mergedComponents = Object.assign({}, parentThemeConfig.components);\n Object.keys(theme.components || {}).forEach(componentName => {\n mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]), theme.components[componentName]);\n });\n const cssVarKey = `css-var-${themeKey.replace(/:/g, '')}`;\n const mergedCssVar = ((_a = themeConfig.cssVar) !== null && _a !== void 0 ? _a : parentThemeConfig.cssVar) && Object.assign(Object.assign(Object.assign({\n prefix: config === null || config === void 0 ? void 0 : config.prefixCls\n }, typeof parentThemeConfig.cssVar === 'object' ? parentThemeConfig.cssVar : {}), typeof themeConfig.cssVar === 'object' ? themeConfig.cssVar : {}), {\n key: typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || cssVarKey\n });\n // Base token\n return Object.assign(Object.assign(Object.assign({}, parentThemeConfig), themeConfig), {\n token: Object.assign(Object.assign({}, parentThemeConfig.token), themeConfig.token),\n components: mergedComponents,\n cssVar: mergedCssVar\n });\n }, [themeConfig, parentThemeConfig], (prev, next) => prev.some((prevTheme, index) => {\n const nextTheme = next[index];\n return !(0, _isEqual.default)(prevTheme, nextTheme, true);\n }));\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst fullClone = Object.assign({}, React);\nconst {\n useId\n} = fullClone;\nconst useEmptyId = () => '';\nconst useThemeKey = typeof useId === 'undefined' ? useEmptyId : useId;\nvar _default = exports.default = useThemeKey;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"ConfigConsumer\", {\n enumerable: true,\n get: function () {\n return _context3.ConfigConsumer;\n }\n});\nObject.defineProperty(exports, \"ConfigContext\", {\n enumerable: true,\n get: function () {\n return _context3.ConfigContext;\n }\n});\nObject.defineProperty(exports, \"Variants\", {\n enumerable: true,\n get: function () {\n return _context3.Variants;\n }\n});\nexports.default = exports.configConsumerProps = void 0;\nObject.defineProperty(exports, \"defaultIconPrefixCls\", {\n enumerable: true,\n get: function () {\n return _context3.defaultIconPrefixCls;\n }\n});\nObject.defineProperty(exports, \"defaultPrefixCls\", {\n enumerable: true,\n get: function () {\n return _context3.defaultPrefixCls;\n }\n});\nexports.warnContext = exports.globalConfig = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _Context = _interopRequireDefault(require(\"@ant-design/icons/lib/components/Context\"));\nvar _useMemo = _interopRequireDefault(require(\"rc-util/lib/hooks/useMemo\"));\nvar _set = require(\"rc-util/lib/utils/set\");\nvar _warning = _interopRequireWildcard(require(\"../_util/warning\"));\nvar _validateMessagesContext = _interopRequireDefault(require(\"../form/validateMessagesContext\"));\nvar _locale = _interopRequireWildcard(require(\"../locale\"));\nvar _context = _interopRequireDefault(require(\"../locale/context\"));\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _context2 = require(\"../theme/context\");\nvar _seed = _interopRequireDefault(require(\"../theme/themes/seed\"));\nvar _context3 = require(\"./context\");\nvar _cssVariables = require(\"./cssVariables\");\nvar _DisabledContext = require(\"./DisabledContext\");\nvar _useConfig = _interopRequireDefault(require(\"./hooks/useConfig\"));\nvar _useTheme = _interopRequireDefault(require(\"./hooks/useTheme\"));\nvar _MotionWrapper = _interopRequireDefault(require(\"./MotionWrapper\"));\nvar _PropWarning = _interopRequireDefault(require(\"./PropWarning\"));\nvar _SizeContext = _interopRequireWildcard(require(\"./SizeContext\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/**\n * Since too many feedback using static method like `Modal.confirm` not getting theme, we record the\n * theme register info here to help developer get warning info.\n */\nlet existThemeConfig = false;\nconst warnContext = exports.warnContext = process.env.NODE_ENV !== 'production' ? componentName => {\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(!existThemeConfig, componentName, `Static function can not consume context like dynamic theme. Please use 'App' component instead.`) : void 0;\n} : /* istanbul ignore next */\nnull;\nconst configConsumerProps = exports.configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale'];\n// These props is used by `useContext` directly in sub component\nconst PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'input', 'pagination', 'form', 'select', 'button'];\nlet globalPrefixCls;\nlet globalIconPrefixCls;\nlet globalTheme;\nlet globalHolderRender;\nfunction getGlobalPrefixCls() {\n return globalPrefixCls || _context3.defaultPrefixCls;\n}\nfunction getGlobalIconPrefixCls() {\n return globalIconPrefixCls || _context3.defaultIconPrefixCls;\n}\nfunction isLegacyTheme(theme) {\n return Object.keys(theme).some(key => key.endsWith('Color'));\n}\nconst setGlobalConfig = props => {\n const {\n prefixCls,\n iconPrefixCls,\n theme,\n holderRender\n } = props;\n if (prefixCls !== undefined) {\n globalPrefixCls = prefixCls;\n }\n if (iconPrefixCls !== undefined) {\n globalIconPrefixCls = iconPrefixCls;\n }\n if ('holderRender' in props) {\n globalHolderRender = holderRender;\n }\n if (theme) {\n if (isLegacyTheme(theme)) {\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') : void 0;\n (0, _cssVariables.registerTheme)(getGlobalPrefixCls(), theme);\n } else {\n globalTheme = theme;\n }\n }\n};\nconst globalConfig = () => ({\n getPrefixCls: (suffixCls, customizePrefixCls) => {\n if (customizePrefixCls) {\n return customizePrefixCls;\n }\n return suffixCls ? `${getGlobalPrefixCls()}-${suffixCls}` : getGlobalPrefixCls();\n },\n getIconPrefixCls: getGlobalIconPrefixCls,\n getRootPrefixCls: () => {\n // If Global prefixCls provided, use this\n if (globalPrefixCls) {\n return globalPrefixCls;\n }\n // Fallback to default prefixCls\n return getGlobalPrefixCls();\n },\n getTheme: () => globalTheme,\n holderRender: globalHolderRender\n});\nexports.globalConfig = globalConfig;\nconst ProviderChildren = props => {\n const {\n children,\n csp: customCsp,\n autoInsertSpaceInButton,\n alert,\n anchor,\n form,\n locale,\n componentSize,\n direction,\n space,\n splitter,\n virtual,\n dropdownMatchSelectWidth,\n popupMatchSelectWidth,\n popupOverflow,\n legacyLocale,\n parentContext,\n iconPrefixCls: customIconPrefixCls,\n theme,\n componentDisabled,\n segmented,\n statistic,\n spin,\n calendar,\n carousel,\n cascader,\n collapse,\n typography,\n checkbox,\n descriptions,\n divider,\n drawer,\n skeleton,\n steps,\n image,\n layout,\n list,\n mentions,\n modal,\n progress,\n result,\n slider,\n breadcrumb,\n menu,\n pagination,\n input,\n textArea,\n empty,\n badge,\n radio,\n rate,\n switch: SWITCH,\n transfer,\n avatar,\n message,\n tag,\n table,\n card,\n tabs,\n timeline,\n timePicker,\n upload,\n notification,\n tree,\n colorPicker,\n datePicker,\n rangePicker,\n flex,\n wave,\n dropdown,\n warning: warningConfig,\n tour,\n floatButtonGroup,\n variant,\n inputNumber,\n treeSelect\n } = props;\n // =================================== Context ===================================\n const getPrefixCls = React.useCallback((suffixCls, customizePrefixCls) => {\n const {\n prefixCls\n } = props;\n if (customizePrefixCls) {\n return customizePrefixCls;\n }\n const mergedPrefixCls = prefixCls || parentContext.getPrefixCls('');\n return suffixCls ? `${mergedPrefixCls}-${suffixCls}` : mergedPrefixCls;\n }, [parentContext.getPrefixCls, props.prefixCls]);\n const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || _context3.defaultIconPrefixCls;\n const csp = customCsp || parentContext.csp;\n (0, _style.default)(iconPrefixCls, csp);\n const mergedTheme = (0, _useTheme.default)(theme, parentContext.theme, {\n prefixCls: getPrefixCls('')\n });\n if (process.env.NODE_ENV !== 'production') {\n existThemeConfig = existThemeConfig || !!mergedTheme;\n }\n const baseConfig = {\n csp,\n autoInsertSpaceInButton,\n alert,\n anchor,\n locale: locale || legacyLocale,\n direction,\n space,\n splitter,\n virtual,\n popupMatchSelectWidth: popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth,\n popupOverflow,\n getPrefixCls,\n iconPrefixCls,\n theme: mergedTheme,\n segmented,\n statistic,\n spin,\n calendar,\n carousel,\n cascader,\n collapse,\n typography,\n checkbox,\n descriptions,\n divider,\n drawer,\n skeleton,\n steps,\n image,\n input,\n textArea,\n layout,\n list,\n mentions,\n modal,\n progress,\n result,\n slider,\n breadcrumb,\n menu,\n pagination,\n empty,\n badge,\n radio,\n rate,\n switch: SWITCH,\n transfer,\n avatar,\n message,\n tag,\n table,\n card,\n tabs,\n timeline,\n timePicker,\n upload,\n notification,\n tree,\n colorPicker,\n datePicker,\n rangePicker,\n flex,\n wave,\n dropdown,\n warning: warningConfig,\n tour,\n floatButtonGroup,\n variant,\n inputNumber,\n treeSelect\n };\n if (process.env.NODE_ENV !== 'production') {\n const warningFn = (0, _warning.devUseWarning)('ConfigProvider');\n warningFn(!('autoInsertSpaceInButton' in props), 'deprecated', '`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.');\n }\n const config = Object.assign({}, parentContext);\n Object.keys(baseConfig).forEach(key => {\n if (baseConfig[key] !== undefined) {\n config[key] = baseConfig[key];\n }\n });\n // Pass the props used by `useContext` directly with child component.\n // These props should merged into `config`.\n PASSED_PROPS.forEach(propName => {\n const propValue = props[propName];\n if (propValue) {\n config[propName] = propValue;\n }\n });\n if (typeof autoInsertSpaceInButton !== 'undefined') {\n // merge deprecated api\n config.button = Object.assign({\n autoInsertSpace: autoInsertSpaceInButton\n }, config.button);\n }\n // https://github.com/ant-design/ant-design/issues/27617\n const memoedConfig = (0, _useMemo.default)(() => config, config, (prevConfig, currentConfig) => {\n const prevKeys = Object.keys(prevConfig);\n const currentKeys = Object.keys(currentConfig);\n return prevKeys.length !== currentKeys.length || prevKeys.some(key => prevConfig[key] !== currentConfig[key]);\n });\n const memoIconContextValue = React.useMemo(() => ({\n prefixCls: iconPrefixCls,\n csp\n }), [iconPrefixCls, csp]);\n let childNode = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_PropWarning.default, {\n dropdownMatchSelectWidth: dropdownMatchSelectWidth\n }), children);\n const validateMessages = React.useMemo(() => {\n var _a, _b, _c, _d;\n return (0, _set.merge)(((_a = _en_US.default.Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || {}, ((_c = (_b = memoedConfig.locale) === null || _b === void 0 ? void 0 : _b.Form) === null || _c === void 0 ? void 0 : _c.defaultValidateMessages) || {}, ((_d = memoedConfig.form) === null || _d === void 0 ? void 0 : _d.validateMessages) || {}, (form === null || form === void 0 ? void 0 : form.validateMessages) || {});\n }, [memoedConfig, form === null || form === void 0 ? void 0 : form.validateMessages]);\n if (Object.keys(validateMessages).length > 0) {\n childNode = /*#__PURE__*/React.createElement(_validateMessagesContext.default.Provider, {\n value: validateMessages\n }, childNode);\n }\n if (locale) {\n childNode = /*#__PURE__*/React.createElement(_locale.default, {\n locale: locale,\n _ANT_MARK__: _locale.ANT_MARK\n }, childNode);\n }\n if (iconPrefixCls || csp) {\n childNode = /*#__PURE__*/React.createElement(_Context.default.Provider, {\n value: memoIconContextValue\n }, childNode);\n }\n if (componentSize) {\n childNode = /*#__PURE__*/React.createElement(_SizeContext.SizeContextProvider, {\n size: componentSize\n }, childNode);\n }\n // =================================== Motion ===================================\n childNode = /*#__PURE__*/React.createElement(_MotionWrapper.default, null, childNode);\n // ================================ Dynamic theme ================================\n const memoTheme = React.useMemo(() => {\n const _a = mergedTheme || {},\n {\n algorithm,\n token,\n components,\n cssVar\n } = _a,\n rest = __rest(_a, [\"algorithm\", \"token\", \"components\", \"cssVar\"]);\n const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? (0, _cssinjs.createTheme)(algorithm) : _context2.defaultTheme;\n const parsedComponents = {};\n Object.entries(components || {}).forEach(_ref => {\n let [componentName, componentToken] = _ref;\n const parsedToken = Object.assign({}, componentToken);\n if ('algorithm' in parsedToken) {\n if (parsedToken.algorithm === true) {\n parsedToken.theme = themeObj;\n } else if (Array.isArray(parsedToken.algorithm) || typeof parsedToken.algorithm === 'function') {\n parsedToken.theme = (0, _cssinjs.createTheme)(parsedToken.algorithm);\n }\n delete parsedToken.algorithm;\n }\n parsedComponents[componentName] = parsedToken;\n });\n const mergedToken = Object.assign(Object.assign({}, _seed.default), token);\n return Object.assign(Object.assign({}, rest), {\n theme: themeObj,\n token: mergedToken,\n components: parsedComponents,\n override: Object.assign({\n override: mergedToken\n }, parsedComponents),\n cssVar: cssVar\n });\n }, [mergedTheme]);\n if (theme) {\n childNode = /*#__PURE__*/React.createElement(_context2.DesignTokenContext.Provider, {\n value: memoTheme\n }, childNode);\n }\n // ================================== Warning ===================================\n if (memoedConfig.warning) {\n childNode = /*#__PURE__*/React.createElement(_warning.WarningContext.Provider, {\n value: memoedConfig.warning\n }, childNode);\n }\n // =================================== Render ===================================\n if (componentDisabled !== undefined) {\n childNode = /*#__PURE__*/React.createElement(_DisabledContext.DisabledContextProvider, {\n disabled: componentDisabled\n }, childNode);\n }\n return /*#__PURE__*/React.createElement(_context3.ConfigContext.Provider, {\n value: memoedConfig\n }, childNode);\n};\nconst ConfigProvider = props => {\n const context = React.useContext(_context3.ConfigContext);\n const antLocale = React.useContext(_context.default);\n return /*#__PURE__*/React.createElement(ProviderChildren, Object.assign({\n parentContext: context,\n legacyLocale: antLocale\n }, props));\n};\nConfigProvider.ConfigContext = _context3.ConfigContext;\nConfigProvider.SizeContext = _SizeContext.default;\nConfigProvider.config = setGlobalConfig;\nConfigProvider.useConfig = _useConfig.default;\nObject.defineProperty(ConfigProvider, 'SizeContext', {\n get: () => {\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;\n return _SizeContext.default;\n }\n});\nif (process.env.NODE_ENV !== 'production') {\n ConfigProvider.displayName = 'ConfigProvider';\n}\nvar _default = exports.default = ConfigProvider;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _internal.useResetIconStyle;\n }\n});\nvar _internal = require(\"../../theme/internal\");","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _button = _interopRequireDefault(require(\"../button\"));\nconst PickerButton = props => (/*#__PURE__*/React.createElement(_button.default, Object.assign({\n size: \"small\",\n type: \"primary\"\n}, props)));\nvar _default = exports.default = PickerButton;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.YEARPICKER = exports.YEAR = exports.WEEKPICKER = exports.WEEK = exports.TIMEPICKER = exports.TIME = exports.QUARTERPICKER = exports.QUARTER = exports.MONTHPICKER = exports.MONTH = void 0;\nconst [WEEK, WEEKPICKER] = ['week', 'WeekPicker'];\nexports.WEEKPICKER = WEEKPICKER;\nexports.WEEK = WEEK;\nconst [MONTH, MONTHPICKER] = ['month', 'MonthPicker'];\nexports.MONTHPICKER = MONTHPICKER;\nexports.MONTH = MONTH;\nconst [YEAR, YEARPICKER] = ['year', 'YearPicker'];\nexports.YEARPICKER = YEARPICKER;\nexports.YEAR = YEAR;\nconst [QUARTER, QUARTERPICKER] = ['quarter', 'QuarterPicker'];\nexports.QUARTERPICKER = QUARTERPICKER;\nexports.QUARTER = QUARTER;\nconst [TIME, TIMEPICKER] = ['time', 'TimePicker'];\nexports.TIMEPICKER = TIMEPICKER;\nexports.TIME = TIME;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _CalendarOutlined = _interopRequireDefault(require(\"@ant-design/icons/CalendarOutlined\"));\nvar _ClockCircleOutlined = _interopRequireDefault(require(\"@ant-design/icons/ClockCircleOutlined\"));\nvar _SwapRightOutlined = _interopRequireDefault(require(\"@ant-design/icons/SwapRightOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcPicker = require(\"rc-picker\");\nvar _ContextIsolator = _interopRequireDefault(require(\"../../_util/ContextIsolator\"));\nvar _useZIndex = require(\"../../_util/hooks/useZIndex\");\nvar _statusUtils = require(\"../../_util/statusUtils\");\nvar _warning = require(\"../../_util/warning\");\nvar _configProvider = require(\"../../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../../config-provider/hooks/useSize\"));\nvar _context = require(\"../../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../../form/hooks/useVariants\"));\nvar _locale = require(\"../../locale\");\nvar _Compact = require(\"../../space/Compact\");\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _style = _interopRequireDefault(require(\"../style\"));\nvar _util = require(\"../util\");\nvar _constant = require(\"./constant\");\nvar _useComponents = _interopRequireDefault(require(\"./useComponents\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst generateRangePicker = generateConfig => {\n const RangePicker = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n getPopupContainer: customGetPopupContainer,\n components,\n className,\n style,\n placement,\n size: customizeSize,\n disabled: customDisabled,\n bordered = true,\n placeholder,\n popupClassName,\n dropdownClassName,\n status: customStatus,\n rootClassName,\n variant: customVariant,\n picker\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"getPopupContainer\", \"components\", \"className\", \"style\", \"placement\", \"size\", \"disabled\", \"bordered\", \"placeholder\", \"popupClassName\", \"dropdownClassName\", \"status\", \"rootClassName\", \"variant\", \"picker\"]);\n const innerRef = React.useRef(null);\n const {\n getPrefixCls,\n direction,\n getPopupContainer,\n rangePicker\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('picker', customizePrefixCls);\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n const rootPrefixCls = getPrefixCls();\n const [variant, enableVariantCls] = (0, _useVariants.default)('rangePicker', customVariant, bordered);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('DatePicker.RangePicker');\n warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');\n warning.deprecated(!('bordered' in props), 'bordered', 'variant');\n }\n // ===================== Icon =====================\n const [mergedAllowClear] = (0, _util.useIcons)(props, prefixCls);\n // ================== components ==================\n const mergedComponents = (0, _useComponents.default)(components);\n // ===================== Size =====================\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n // ===================== FormItemInput =====================\n const formItemContext = (0, _react.useContext)(_context.FormItemInputContext);\n const {\n hasFeedback,\n status: contextStatus,\n feedbackIcon\n } = formItemContext;\n const suffixNode = /*#__PURE__*/React.createElement(React.Fragment, null, picker === _constant.TIME ? /*#__PURE__*/React.createElement(_ClockCircleOutlined.default, null) : /*#__PURE__*/React.createElement(_CalendarOutlined.default, null), hasFeedback && feedbackIcon);\n (0, _react.useImperativeHandle)(ref, () => innerRef.current);\n const [contextLocale] = (0, _locale.useLocale)('Calendar', _en_US.default);\n const locale = Object.assign(Object.assign({}, contextLocale), props.locale);\n // ============================ zIndex ============================\n const [zIndex] = (0, _useZIndex.useZIndex)('DatePicker', (_a = props.popupStyle) === null || _a === void 0 ? void 0 : _a.zIndex);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_ContextIsolator.default, {\n space: true\n }, /*#__PURE__*/React.createElement(_rcPicker.RangePicker, Object.assign({\n separator: /*#__PURE__*/React.createElement(\"span\", {\n \"aria-label\": \"to\",\n className: `${prefixCls}-separator`\n }, /*#__PURE__*/React.createElement(_SwapRightOutlined.default, null)),\n disabled: mergedDisabled,\n ref: innerRef,\n popupAlign: (0, _util.transPlacement2DropdownAlign)(direction, placement),\n placement: placement,\n placeholder: (0, _util.getRangePlaceholder)(locale, picker, placeholder),\n suffixIcon: suffixNode,\n prevIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-prev-icon`\n }),\n nextIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-next-icon`\n }),\n superPrevIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-super-prev-icon`\n }),\n superNextIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-super-next-icon`\n }),\n transitionName: `${rootPrefixCls}-slide-up`,\n picker: picker\n }, restProps, {\n className: (0, _classnames.default)({\n [`${prefixCls}-${mergedSize}`]: mergedSize,\n [`${prefixCls}-${variant}`]: enableVariantCls\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, (0, _statusUtils.getMergedStatus)(contextStatus, customStatus), hasFeedback), hashId, compactItemClassnames, className, rangePicker === null || rangePicker === void 0 ? void 0 : rangePicker.className, cssVarCls, rootCls, rootClassName),\n style: Object.assign(Object.assign({}, rangePicker === null || rangePicker === void 0 ? void 0 : rangePicker.style), style),\n locale: locale.lang,\n prefixCls: prefixCls,\n getPopupContainer: customGetPopupContainer || getPopupContainer,\n generateConfig: generateConfig,\n components: mergedComponents,\n direction: direction,\n classNames: {\n popup: (0, _classnames.default)(hashId, popupClassName || dropdownClassName, cssVarCls, rootCls, rootClassName)\n },\n styles: {\n popup: Object.assign(Object.assign({}, props.popupStyle), {\n zIndex\n })\n },\n allowClear: mergedAllowClear\n }))));\n });\n if (process.env.NODE_ENV !== 'production') {\n RangePicker.displayName = 'RangePicker';\n }\n return RangePicker;\n};\nvar _default = exports.default = generateRangePicker;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _CalendarOutlined = _interopRequireDefault(require(\"@ant-design/icons/CalendarOutlined\"));\nvar _ClockCircleOutlined = _interopRequireDefault(require(\"@ant-design/icons/ClockCircleOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcPicker = _interopRequireDefault(require(\"rc-picker\"));\nvar _ContextIsolator = _interopRequireDefault(require(\"../../_util/ContextIsolator\"));\nvar _useZIndex = require(\"../../_util/hooks/useZIndex\");\nvar _statusUtils = require(\"../../_util/statusUtils\");\nvar _warning = require(\"../../_util/warning\");\nvar _configProvider = require(\"../../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../../config-provider/hooks/useSize\"));\nvar _context = require(\"../../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../../form/hooks/useVariants\"));\nvar _locale = require(\"../../locale\");\nvar _Compact = require(\"../../space/Compact\");\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _style = _interopRequireDefault(require(\"../style\"));\nvar _util = require(\"../util\");\nvar _constant = require(\"./constant\");\nvar _useComponents = _interopRequireDefault(require(\"./useComponents\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst generatePicker = generateConfig => {\n const getPicker = (picker, displayName) => {\n const consumerName = displayName === _constant.TIMEPICKER ? 'timePicker' : 'datePicker';\n const Picker = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n getPopupContainer: customizeGetPopupContainer,\n components,\n style,\n className,\n rootClassName,\n size: customizeSize,\n bordered,\n placement,\n placeholder,\n popupClassName,\n dropdownClassName,\n disabled: customDisabled,\n status: customStatus,\n variant: customVariant,\n onCalendarChange\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"getPopupContainer\", \"components\", \"style\", \"className\", \"rootClassName\", \"size\", \"bordered\", \"placement\", \"placeholder\", \"popupClassName\", \"dropdownClassName\", \"disabled\", \"status\", \"variant\", \"onCalendarChange\"]);\n const {\n getPrefixCls,\n direction,\n getPopupContainer,\n // Consume different styles according to different names\n [consumerName]: consumerStyle\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('picker', customizePrefixCls);\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n const innerRef = React.useRef(null);\n const [variant, enableVariantCls] = (0, _useVariants.default)('datePicker', customVariant, bordered);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n (0, _react.useImperativeHandle)(ref, () => innerRef.current);\n const additionalProps = {\n showToday: true\n };\n const mergedPicker = picker || props.picker;\n const rootPrefixCls = getPrefixCls();\n // ==================== Legacy =====================\n const {\n onSelect,\n multiple\n } = restProps;\n const hasLegacyOnSelect = onSelect && picker === 'time' && !multiple;\n const onInternalCalendarChange = (date, dateStr, info) => {\n onCalendarChange === null || onCalendarChange === void 0 ? void 0 : onCalendarChange(date, dateStr, info);\n if (hasLegacyOnSelect) {\n onSelect(date);\n }\n };\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)(displayName || 'DatePicker');\n process.env.NODE_ENV !== \"production\" ? warning(picker !== 'quarter', 'deprecated', `DatePicker.${displayName} is legacy usage. Please use DatePicker[picker='${picker}'] directly.`) : void 0;\n warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');\n warning.deprecated(!('bordered' in props), 'bordered', 'variant');\n warning.deprecated(!hasLegacyOnSelect, 'onSelect', 'onCalendarChange');\n }\n // ===================== Icon =====================\n const [mergedAllowClear, removeIcon] = (0, _util.useIcons)(props, prefixCls);\n // ================== components ==================\n const mergedComponents = (0, _useComponents.default)(components);\n // ===================== Size =====================\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n // ===================== FormItemInput =====================\n const formItemContext = (0, _react.useContext)(_context.FormItemInputContext);\n const {\n hasFeedback,\n status: contextStatus,\n feedbackIcon\n } = formItemContext;\n const suffixNode = /*#__PURE__*/React.createElement(React.Fragment, null, mergedPicker === 'time' ? /*#__PURE__*/React.createElement(_ClockCircleOutlined.default, null) : /*#__PURE__*/React.createElement(_CalendarOutlined.default, null), hasFeedback && feedbackIcon);\n const [contextLocale] = (0, _locale.useLocale)('DatePicker', _en_US.default);\n const locale = Object.assign(Object.assign({}, contextLocale), props.locale);\n // ============================ zIndex ============================\n const [zIndex] = (0, _useZIndex.useZIndex)('DatePicker', (_a = props.popupStyle) === null || _a === void 0 ? void 0 : _a.zIndex);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_ContextIsolator.default, {\n space: true\n }, /*#__PURE__*/React.createElement(_rcPicker.default, Object.assign({\n ref: innerRef,\n placeholder: (0, _util.getPlaceholder)(locale, mergedPicker, placeholder),\n suffixIcon: suffixNode,\n dropdownAlign: (0, _util.transPlacement2DropdownAlign)(direction, placement),\n placement: placement,\n prevIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-prev-icon`\n }),\n nextIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-next-icon`\n }),\n superPrevIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-super-prev-icon`\n }),\n superNextIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-super-next-icon`\n }),\n transitionName: `${rootPrefixCls}-slide-up`,\n picker: picker,\n onCalendarChange: onInternalCalendarChange\n }, additionalProps, restProps, {\n locale: locale.lang,\n className: (0, _classnames.default)({\n [`${prefixCls}-${mergedSize}`]: mergedSize,\n [`${prefixCls}-${variant}`]: enableVariantCls\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, (0, _statusUtils.getMergedStatus)(contextStatus, customStatus), hasFeedback), hashId, compactItemClassnames, consumerStyle === null || consumerStyle === void 0 ? void 0 : consumerStyle.className, className, cssVarCls, rootCls, rootClassName),\n style: Object.assign(Object.assign({}, consumerStyle === null || consumerStyle === void 0 ? void 0 : consumerStyle.style), style),\n prefixCls: prefixCls,\n getPopupContainer: customizeGetPopupContainer || getPopupContainer,\n generateConfig: generateConfig,\n components: mergedComponents,\n direction: direction,\n disabled: mergedDisabled,\n classNames: {\n popup: (0, _classnames.default)(hashId, cssVarCls, rootCls, rootClassName, popupClassName || dropdownClassName)\n },\n styles: {\n popup: Object.assign(Object.assign({}, props.popupStyle), {\n zIndex\n })\n },\n allowClear: mergedAllowClear,\n removeIcon: removeIcon\n }))));\n });\n if (process.env.NODE_ENV !== 'production' && displayName) {\n Picker.displayName = displayName;\n }\n return Picker;\n };\n const DatePicker = getPicker();\n const WeekPicker = getPicker(_constant.WEEK, _constant.WEEKPICKER);\n const MonthPicker = getPicker(_constant.MONTH, _constant.MONTHPICKER);\n const YearPicker = getPicker(_constant.YEAR, _constant.YEARPICKER);\n const QuarterPicker = getPicker(_constant.QUARTER, _constant.QUARTERPICKER);\n const TimePicker = getPicker(_constant.TIME, _constant.TIMEPICKER);\n return {\n DatePicker,\n WeekPicker,\n MonthPicker,\n YearPicker,\n TimePicker,\n QuarterPicker\n };\n};\nvar _default = exports.default = generatePicker;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _generateRangePicker = _interopRequireDefault(require(\"./generateRangePicker\"));\nvar _generateSinglePicker = _interopRequireDefault(require(\"./generateSinglePicker\"));\nconst generatePicker = generateConfig => {\n // =========================== Picker ===========================\n const {\n DatePicker,\n WeekPicker,\n MonthPicker,\n YearPicker,\n TimePicker,\n QuarterPicker\n } = (0, _generateSinglePicker.default)(generateConfig);\n // ======================== Range Picker ========================\n const RangePicker = (0, _generateRangePicker.default)(generateConfig);\n const MergedDatePicker = DatePicker;\n MergedDatePicker.WeekPicker = WeekPicker;\n MergedDatePicker.MonthPicker = MonthPicker;\n MergedDatePicker.YearPicker = YearPicker;\n MergedDatePicker.RangePicker = RangePicker;\n MergedDatePicker.TimePicker = TimePicker;\n MergedDatePicker.QuarterPicker = QuarterPicker;\n if (process.env.NODE_ENV !== 'production') {\n MergedDatePicker.displayName = 'DatePicker';\n }\n return MergedDatePicker;\n};\nvar _default = exports.default = generatePicker;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useComponents;\nvar _react = require(\"react\");\nvar _PickerButton = _interopRequireDefault(require(\"../PickerButton\"));\nfunction useComponents(components) {\n return (0, _react.useMemo)(() => Object.assign({\n button: _PickerButton.default\n }, components), [components]);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _dayjs = _interopRequireDefault(require(\"rc-picker/lib/generate/dayjs\"));\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _generatePicker = _interopRequireDefault(require(\"./generatePicker\"));\nvar _util = require(\"./util\");\nconst DatePicker = (0, _generatePicker.default)(_dayjs.default);\nfunction postPureProps(props) {\n const dropdownAlign = (0, _util.transPlacement2DropdownAlign)(props.direction, props.placement);\n dropdownAlign.overflow.adjustY = false;\n dropdownAlign.overflow.adjustX = false;\n return Object.assign(Object.assign({}, props), {\n dropdownAlign\n });\n}\n// We don't care debug panel\n/* istanbul ignore next */\nconst PurePanel = (0, _PurePanel.default)(DatePicker, 'picker', null, postPureProps);\nDatePicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nconst PureRangePanel = (0, _PurePanel.default)(DatePicker.RangePicker, 'picker', null, postPureProps);\nDatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = PureRangePanel;\nDatePicker.generatePicker = _generatePicker.default;\nvar _default = exports.default = DatePicker;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"rc-picker/lib/locale/en_US\"));\nvar _en_US2 = _interopRequireDefault(require(\"../../time-picker/locale/en_US\"));\n// Merge into a locale object\nconst locale = {\n lang: Object.assign({\n placeholder: 'Select date',\n yearPlaceholder: 'Select year',\n quarterPlaceholder: 'Select quarter',\n monthPlaceholder: 'Select month',\n weekPlaceholder: 'Select week',\n rangePlaceholder: ['Start date', 'End date'],\n rangeYearPlaceholder: ['Start year', 'End year'],\n rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],\n rangeMonthPlaceholder: ['Start month', 'End month'],\n rangeWeekPlaceholder: ['Start week', 'End week']\n }, _en_US.default),\n timePickerLocale: Object.assign({}, _en_US2.default)\n};\n// All settings at:\n// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json\nvar _default = exports.default = locale;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nObject.defineProperty(exports, \"genPanelStyle\", {\n enumerable: true,\n get: function () {\n return _panel.genPanelStyle;\n }\n});\nObject.defineProperty(exports, \"initPanelComponentToken\", {\n enumerable: true,\n get: function () {\n return _token.initPanelComponentToken;\n }\n});\nObject.defineProperty(exports, \"initPickerPanelToken\", {\n enumerable: true,\n get: function () {\n return _token.initPickerPanelToken;\n }\n});\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../input/style\");\nvar _style2 = require(\"../../style\");\nvar _compactItem = require(\"../../style/compact-item\");\nvar _motion = require(\"../../style/motion\");\nvar _roundedArrow = require(\"../../style/roundedArrow\");\nvar _internal = require(\"../../theme/internal\");\nvar _multiple = _interopRequireDefault(require(\"./multiple\"));\nvar _panel = _interopRequireWildcard(require(\"./panel\"));\nvar _token = require(\"./token\");\nvar _variants = _interopRequireDefault(require(\"./variants\"));\nconst genPickerPadding = (token, inputHeight, fontHeight, paddingHorizontal) => {\n const height = token.calc(fontHeight).add(2).equal();\n const paddingTop = token.max(token.calc(inputHeight).sub(height).div(2).equal(), 0);\n const paddingBottom = token.max(token.calc(inputHeight).sub(height).sub(paddingTop).equal(), 0);\n return {\n padding: `${(0, _cssinjs.unit)(paddingTop)} ${(0, _cssinjs.unit)(paddingHorizontal)} ${(0, _cssinjs.unit)(paddingBottom)}`\n };\n};\nconst genPickerStatusStyle = token => {\n const {\n componentCls,\n colorError,\n colorWarning\n } = token;\n return {\n [`${componentCls}:not(${componentCls}-disabled):not([disabled])`]: {\n [`&${componentCls}-status-error`]: {\n [`${componentCls}-active-bar`]: {\n background: colorError\n }\n },\n [`&${componentCls}-status-warning`]: {\n [`${componentCls}-active-bar`]: {\n background: colorWarning\n }\n }\n }\n };\n};\nconst genPickerStyle = token => {\n const {\n componentCls,\n antCls,\n controlHeight,\n paddingInline,\n lineWidth,\n lineType,\n colorBorder,\n borderRadius,\n motionDurationMid,\n colorTextDisabled,\n colorTextPlaceholder,\n controlHeightLG,\n fontSizeLG,\n controlHeightSM,\n paddingInlineSM,\n paddingXS,\n marginXS,\n colorTextDescription,\n lineWidthBold,\n colorPrimary,\n motionDurationSlow,\n zIndexPopup,\n paddingXXS,\n sizePopupArrow,\n colorBgElevated,\n borderRadiusLG,\n boxShadowSecondary,\n borderRadiusSM,\n colorSplit,\n cellHoverBg,\n presetsWidth,\n presetsMaxWidth,\n boxShadowPopoverArrow,\n fontHeight,\n fontHeightLG,\n lineHeightLG\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), genPickerPadding(token, controlHeight, fontHeight, paddingInline)), {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n lineHeight: 1,\n borderRadius,\n transition: `border ${motionDurationMid}, box-shadow ${motionDurationMid}, background ${motionDurationMid}`,\n // ======================== Input =========================\n [`${componentCls}-input`]: {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n width: '100%',\n '> input': Object.assign(Object.assign({\n position: 'relative',\n display: 'inline-block',\n width: '100%',\n color: 'inherit',\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n transition: `all ${motionDurationMid}`\n }, (0, _style.genPlaceholderStyle)(colorTextPlaceholder)), {\n flex: 'auto',\n // Fix Firefox flex not correct:\n // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553\n minWidth: 1,\n height: 'auto',\n padding: 0,\n background: 'transparent',\n border: 0,\n fontFamily: 'inherit',\n '&:focus': {\n boxShadow: 'none',\n outline: 0\n },\n '&[disabled]': {\n background: 'transparent',\n color: colorTextDisabled,\n cursor: 'not-allowed'\n }\n }),\n '&-placeholder': {\n '> input': {\n color: colorTextPlaceholder\n }\n }\n },\n // Size\n '&-large': Object.assign(Object.assign({}, genPickerPadding(token, controlHeightLG, fontHeightLG, paddingInline)), {\n [`${componentCls}-input > input`]: {\n fontSize: fontSizeLG,\n lineHeight: lineHeightLG\n }\n }),\n '&-small': Object.assign({}, genPickerPadding(token, controlHeightSM, fontHeight, paddingInlineSM)),\n [`${componentCls}-suffix`]: {\n display: 'flex',\n flex: 'none',\n alignSelf: 'center',\n marginInlineStart: token.calc(paddingXS).div(2).equal(),\n color: colorTextDisabled,\n lineHeight: 1,\n pointerEvents: 'none',\n transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,\n '> *': {\n verticalAlign: 'top',\n '&:not(:last-child)': {\n marginInlineEnd: marginXS\n }\n }\n },\n [`${componentCls}-clear`]: {\n position: 'absolute',\n top: '50%',\n insetInlineEnd: 0,\n color: colorTextDisabled,\n lineHeight: 1,\n transform: 'translateY(-50%)',\n cursor: 'pointer',\n opacity: 0,\n transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,\n '> *': {\n verticalAlign: 'top'\n },\n '&:hover': {\n color: colorTextDescription\n }\n },\n '&:hover': {\n [`${componentCls}-clear`]: {\n opacity: 1\n },\n // Should use the following selector, but since `:has` has poor compatibility,\n // we use `:not(:last-child)` instead, which may cause some problems in some cases.\n // [`${componentCls}-suffix:has(+ ${componentCls}-clear)`]: {\n [`${componentCls}-suffix:not(:last-child)`]: {\n opacity: 0\n }\n },\n [`${componentCls}-separator`]: {\n position: 'relative',\n display: 'inline-block',\n width: '1em',\n height: fontSizeLG,\n color: colorTextDisabled,\n fontSize: fontSizeLG,\n verticalAlign: 'top',\n cursor: 'default',\n [`${componentCls}-focused &`]: {\n color: colorTextDescription\n },\n [`${componentCls}-range-separator &`]: {\n [`${componentCls}-disabled &`]: {\n cursor: 'not-allowed'\n }\n }\n },\n // ======================== Range =========================\n '&-range': {\n position: 'relative',\n display: 'inline-flex',\n // Active bar\n [`${componentCls}-active-bar`]: {\n bottom: token.calc(lineWidth).mul(-1).equal(),\n height: lineWidthBold,\n background: colorPrimary,\n opacity: 0,\n transition: `all ${motionDurationSlow} ease-out`,\n pointerEvents: 'none'\n },\n [`&${componentCls}-focused`]: {\n [`${componentCls}-active-bar`]: {\n opacity: 1\n }\n },\n [`${componentCls}-range-separator`]: {\n alignItems: 'center',\n padding: `0 ${(0, _cssinjs.unit)(paddingXS)}`,\n lineHeight: 1\n }\n },\n // ======================== Clear =========================\n '&-range, &-multiple': {\n // Clear\n [`${componentCls}-clear`]: {\n insetInlineEnd: paddingInline\n },\n [`&${componentCls}-small`]: {\n [`${componentCls}-clear`]: {\n insetInlineEnd: paddingInlineSM\n }\n }\n },\n // ======================= Dropdown =======================\n '&-dropdown': Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), (0, _panel.genPanelStyle)(token)), {\n pointerEvents: 'none',\n position: 'absolute',\n // Fix incorrect position of picker popup\n // https://github.com/ant-design/ant-design/issues/35590\n top: -9999,\n left: {\n _skip_check_: true,\n value: -9999\n },\n zIndex: zIndexPopup,\n [`&${componentCls}-dropdown-hidden`]: {\n display: 'none'\n },\n '&-rtl': {\n direction: 'rtl'\n },\n [`&${componentCls}-dropdown-placement-bottomLeft,\n &${componentCls}-dropdown-placement-bottomRight`]: {\n [`${componentCls}-range-arrow`]: {\n top: 0,\n display: 'block',\n transform: 'translateY(-100%)'\n }\n },\n [`&${componentCls}-dropdown-placement-topLeft,\n &${componentCls}-dropdown-placement-topRight`]: {\n [`${componentCls}-range-arrow`]: {\n bottom: 0,\n display: 'block',\n transform: 'translateY(100%) rotate(180deg)'\n }\n },\n [`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topLeft,\n &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topRight,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topLeft,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topRight`]: {\n animationName: _motion.slideDownIn\n },\n [`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomLeft,\n &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomRight,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomLeft,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomRight`]: {\n animationName: _motion.slideUpIn\n },\n // https://github.com/ant-design/ant-design/issues/48727\n [`&${antCls}-slide-up-leave ${componentCls}-panel-container`]: {\n pointerEvents: 'none'\n },\n [`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topLeft,\n &${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topRight`]: {\n animationName: _motion.slideDownOut\n },\n [`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomLeft,\n &${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomRight`]: {\n animationName: _motion.slideUpOut\n },\n // Time picker with additional style\n [`${componentCls}-panel > ${componentCls}-time-panel`]: {\n paddingTop: paddingXXS\n },\n // ======================== Ranges ========================\n [`${componentCls}-range-wrapper`]: {\n display: 'flex',\n position: 'relative'\n },\n [`${componentCls}-range-arrow`]: Object.assign(Object.assign({\n position: 'absolute',\n zIndex: 1,\n display: 'none',\n paddingInline: token.calc(paddingInline).mul(1.5).equal(),\n boxSizing: 'content-box',\n transition: `all ${motionDurationSlow} ease-out`\n }, (0, _roundedArrow.genRoundedArrow)(token, colorBgElevated, boxShadowPopoverArrow)), {\n '&:before': {\n insetInlineStart: token.calc(paddingInline).mul(1.5).equal()\n }\n }),\n [`${componentCls}-panel-container`]: {\n overflow: 'hidden',\n verticalAlign: 'top',\n background: colorBgElevated,\n borderRadius: borderRadiusLG,\n boxShadow: boxShadowSecondary,\n transition: `margin ${motionDurationSlow}`,\n display: 'inline-block',\n pointerEvents: 'auto',\n // ======================== Layout ========================\n [`${componentCls}-panel-layout`]: {\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'stretch'\n },\n // ======================== Preset ========================\n [`${componentCls}-presets`]: {\n display: 'flex',\n flexDirection: 'column',\n minWidth: presetsWidth,\n maxWidth: presetsMaxWidth,\n ul: {\n height: 0,\n flex: 'auto',\n listStyle: 'none',\n overflow: 'auto',\n margin: 0,\n padding: paddingXS,\n borderInlineEnd: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,\n li: Object.assign(Object.assign({}, _style2.textEllipsis), {\n borderRadius: borderRadiusSM,\n paddingInline: paddingXS,\n paddingBlock: token.calc(controlHeightSM).sub(fontHeight).div(2).equal(),\n cursor: 'pointer',\n transition: `all ${motionDurationSlow}`,\n '+ li': {\n marginTop: marginXS\n },\n '&:hover': {\n background: cellHoverBg\n }\n })\n }\n },\n // ======================== Panels ========================\n [`${componentCls}-panels`]: {\n display: 'inline-flex',\n flexWrap: 'nowrap',\n // [`${componentCls}-panel`]: {\n // borderWidth: `0 0 ${unit(lineWidth)}`,\n // },\n '&:last-child': {\n [`${componentCls}-panel`]: {\n borderWidth: 0\n }\n }\n },\n [`${componentCls}-panel`]: {\n verticalAlign: 'top',\n background: 'transparent',\n borderRadius: 0,\n borderWidth: 0,\n [`${componentCls}-content, table`]: {\n textAlign: 'center'\n },\n '&-focused': {\n borderColor: colorBorder\n }\n }\n }\n }),\n '&-dropdown-range': {\n padding: `${(0, _cssinjs.unit)(token.calc(sizePopupArrow).mul(2).div(3).equal())} 0`,\n '&-hidden': {\n display: 'none'\n }\n },\n '&-rtl': {\n direction: 'rtl',\n [`${componentCls}-separator`]: {\n transform: 'rotate(180deg)'\n },\n [`${componentCls}-footer`]: {\n '&-extra': {\n direction: 'rtl'\n }\n }\n }\n })\n },\n // Follow code may reuse in other components\n (0, _motion.initSlideMotion)(token, 'slide-up'), (0, _motion.initSlideMotion)(token, 'slide-down'), (0, _motion.initMoveMotion)(token, 'move-up'), (0, _motion.initMoveMotion)(token, 'move-down')];\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genStyleHooks)('DatePicker', token => {\n const pickerToken = (0, _internal.mergeToken)((0, _style.initInputToken)(token), (0, _token.initPickerPanelToken)(token), {\n inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal(),\n multipleSelectItemHeight: token.multipleItemHeight,\n selectHeight: token.controlHeight\n });\n return [(0, _panel.default)(pickerToken), genPickerStyle(pickerToken), (0, _variants.default)(pickerToken), genPickerStatusStyle(pickerToken), (0, _multiple.default)(pickerToken),\n // =====================================================\n // == Space Compact ==\n // =====================================================\n (0, _compactItem.genCompactItemStyle)(token, {\n focusElCls: `${token.componentCls}-focused`\n })];\n}, _token.prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _multiple = require(\"../../select/style/multiple\");\nvar _internal = require(\"../../theme/internal\");\nconst genSize = (token, suffix) => {\n const {\n componentCls,\n controlHeight\n } = token;\n const suffixCls = suffix ? `${componentCls}-${suffix}` : '';\n const multipleSelectorUnit = (0, _multiple.getMultipleSelectorUnit)(token);\n return [\n // genSelectionStyle(token, suffix),\n {\n [`${componentCls}-multiple${suffixCls}`]: {\n paddingBlock: multipleSelectorUnit.containerPadding,\n paddingInlineStart: multipleSelectorUnit.basePadding,\n minHeight: controlHeight,\n // ======================== Selections ========================\n [`${componentCls}-selection-item`]: {\n height: multipleSelectorUnit.itemHeight,\n lineHeight: (0, _cssinjs.unit)(multipleSelectorUnit.itemLineHeight)\n }\n }\n }];\n};\nconst genPickerMultipleStyle = token => {\n const {\n componentCls,\n calc,\n lineWidth\n } = token;\n const smallToken = (0, _internal.mergeToken)(token, {\n fontHeight: token.fontSize,\n selectHeight: token.controlHeightSM,\n multipleSelectItemHeight: token.multipleItemHeightSM,\n borderRadius: token.borderRadiusSM,\n borderRadiusSM: token.borderRadiusXS,\n controlHeight: token.controlHeightSM\n });\n const largeToken = (0, _internal.mergeToken)(token, {\n fontHeight: calc(token.multipleItemHeightLG).sub(calc(lineWidth).mul(2).equal()).equal(),\n fontSize: token.fontSizeLG,\n selectHeight: token.controlHeightLG,\n multipleSelectItemHeight: token.multipleItemHeightLG,\n borderRadius: token.borderRadiusLG,\n borderRadiusSM: token.borderRadius,\n controlHeight: token.controlHeightLG\n });\n return [\n // ======================== Size ========================\n genSize(smallToken, 'small'), genSize(token), genSize(largeToken, 'large'),\n // ====================== Selection ======================\n {\n [`${componentCls}${componentCls}-multiple`]: Object.assign(Object.assign({\n width: '100%',\n cursor: 'text',\n // ==================== Selector =====================\n [`${componentCls}-selector`]: {\n flex: 'auto',\n padding: 0,\n position: 'relative',\n '&:after': {\n margin: 0\n },\n // ================== placeholder ==================\n [`${componentCls}-selection-placeholder`]: {\n position: 'absolute',\n top: '50%',\n insetInlineStart: token.inputPaddingHorizontalBase,\n insetInlineEnd: 0,\n transform: 'translateY(-50%)',\n transition: `all ${token.motionDurationSlow}`,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n flex: 1,\n color: token.colorTextPlaceholder,\n pointerEvents: 'none'\n }\n }\n }, (0, _multiple.genOverflowStyle)(token)), {\n // ====================== Input ======================\n // Input is `readonly`, which is used for a11y only\n [`${componentCls}-multiple-input`]: {\n width: 0,\n height: 0,\n border: 0,\n visibility: 'hidden',\n position: 'absolute',\n zIndex: -1\n }\n })\n }];\n};\nvar _default = exports.default = genPickerMultipleStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genPanelStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nconst genPickerCellInnerStyle = token => {\n const {\n pickerCellCls,\n pickerCellInnerCls,\n cellHeight,\n borderRadiusSM,\n motionDurationMid,\n cellHoverBg,\n lineWidth,\n lineType,\n colorPrimary,\n cellActiveWithRangeBg,\n colorTextLightSolid,\n colorTextDisabled,\n cellBgDisabled,\n colorFillSecondary\n } = token;\n return {\n '&::before': {\n position: 'absolute',\n top: '50%',\n insetInlineStart: 0,\n insetInlineEnd: 0,\n zIndex: 1,\n height: cellHeight,\n transform: 'translateY(-50%)',\n content: '\"\"'\n },\n // >>> Default\n [pickerCellInnerCls]: {\n position: 'relative',\n zIndex: 2,\n display: 'inline-block',\n minWidth: cellHeight,\n height: cellHeight,\n lineHeight: (0, _cssinjs.unit)(cellHeight),\n borderRadius: borderRadiusSM,\n transition: `background ${motionDurationMid}`\n },\n // >>> Hover\n [`&:hover:not(${pickerCellCls}-in-view):not(${pickerCellCls}-disabled),\n &:hover:not(${pickerCellCls}-selected):not(${pickerCellCls}-range-start):not(${pickerCellCls}-range-end):not(${pickerCellCls}-disabled)`]: {\n [pickerCellInnerCls]: {\n background: cellHoverBg\n }\n },\n // >>> Today\n [`&-in-view${pickerCellCls}-today ${pickerCellInnerCls}`]: {\n '&::before': {\n position: 'absolute',\n top: 0,\n insetInlineEnd: 0,\n bottom: 0,\n insetInlineStart: 0,\n zIndex: 1,\n border: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorPrimary}`,\n borderRadius: borderRadiusSM,\n content: '\"\"'\n }\n },\n // >>> In Range\n [`&-in-view${pickerCellCls}-in-range,\n &-in-view${pickerCellCls}-range-start,\n &-in-view${pickerCellCls}-range-end`]: {\n position: 'relative',\n [`&:not(${pickerCellCls}-disabled):before`]: {\n background: cellActiveWithRangeBg\n }\n },\n // >>> Selected\n [`&-in-view${pickerCellCls}-selected,\n &-in-view${pickerCellCls}-range-start,\n &-in-view${pickerCellCls}-range-end`]: {\n [`&:not(${pickerCellCls}-disabled) ${pickerCellInnerCls}`]: {\n color: colorTextLightSolid,\n background: colorPrimary\n },\n [`&${pickerCellCls}-disabled ${pickerCellInnerCls}`]: {\n background: colorFillSecondary\n }\n },\n [`&-in-view${pickerCellCls}-range-start:not(${pickerCellCls}-disabled):before`]: {\n insetInlineStart: '50%'\n },\n [`&-in-view${pickerCellCls}-range-end:not(${pickerCellCls}-disabled):before`]: {\n insetInlineEnd: '50%'\n },\n // range start border-radius\n [`&-in-view${pickerCellCls}-range-start:not(${pickerCellCls}-range-end) ${pickerCellInnerCls}`]: {\n borderStartStartRadius: borderRadiusSM,\n borderEndStartRadius: borderRadiusSM,\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n },\n // range end border-radius\n [`&-in-view${pickerCellCls}-range-end:not(${pickerCellCls}-range-start) ${pickerCellInnerCls}`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0,\n borderStartEndRadius: borderRadiusSM,\n borderEndEndRadius: borderRadiusSM\n },\n // >>> Disabled\n '&-disabled': {\n color: colorTextDisabled,\n cursor: 'not-allowed',\n [pickerCellInnerCls]: {\n background: 'transparent'\n },\n '&::before': {\n background: cellBgDisabled\n }\n },\n [`&-disabled${pickerCellCls}-today ${pickerCellInnerCls}::before`]: {\n borderColor: colorTextDisabled\n }\n };\n};\nconst genPanelStyle = token => {\n const {\n componentCls,\n pickerCellCls,\n pickerCellInnerCls,\n pickerYearMonthCellWidth,\n pickerControlIconSize,\n cellWidth,\n paddingSM,\n paddingXS,\n paddingXXS,\n colorBgContainer,\n lineWidth,\n lineType,\n borderRadiusLG,\n colorPrimary,\n colorTextHeading,\n colorSplit,\n pickerControlIconBorderWidth,\n colorIcon,\n textHeight,\n motionDurationMid,\n colorIconHover,\n fontWeightStrong,\n cellHeight,\n pickerCellPaddingVertical,\n colorTextDisabled,\n colorText,\n fontSize,\n motionDurationSlow,\n withoutTimeCellHeight,\n pickerQuarterPanelContentHeight,\n borderRadiusSM,\n colorTextLightSolid,\n cellHoverBg,\n timeColumnHeight,\n timeColumnWidth,\n timeCellHeight,\n controlItemBgActive,\n marginXXS,\n pickerDatePanelPaddingHorizontal,\n pickerControlIconMargin\n } = token;\n const pickerPanelWidth = token.calc(cellWidth).mul(7).add(token.calc(pickerDatePanelPaddingHorizontal).mul(2)).equal();\n return {\n [componentCls]: {\n '&-panel': {\n display: 'inline-flex',\n flexDirection: 'column',\n textAlign: 'center',\n background: colorBgContainer,\n borderRadius: borderRadiusLG,\n outline: 'none',\n '&-focused': {\n borderColor: colorPrimary\n },\n '&-rtl': {\n [`${componentCls}-prev-icon,\n ${componentCls}-super-prev-icon`]: {\n transform: 'rotate(45deg)'\n },\n [`${componentCls}-next-icon,\n ${componentCls}-super-next-icon`]: {\n transform: 'rotate(-135deg)'\n },\n [`${componentCls}-time-panel`]: {\n [`${componentCls}-content`]: {\n direction: 'ltr',\n '> *': {\n direction: 'rtl'\n }\n }\n }\n }\n },\n // ========================================================\n // = Shared Panel =\n // ========================================================\n [`&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel`]: {\n display: 'flex',\n flexDirection: 'column',\n width: pickerPanelWidth\n },\n // ======================= Header =======================\n '&-header': {\n display: 'flex',\n padding: `0 ${(0, _cssinjs.unit)(paddingXS)}`,\n color: colorTextHeading,\n borderBottom: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,\n '> *': {\n flex: 'none'\n },\n button: {\n padding: 0,\n color: colorIcon,\n lineHeight: (0, _cssinjs.unit)(textHeight),\n background: 'transparent',\n border: 0,\n cursor: 'pointer',\n transition: `color ${motionDurationMid}`,\n fontSize: 'inherit',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n '> button': {\n minWidth: '1.6em',\n fontSize,\n '&:hover': {\n color: colorIconHover\n },\n '&:disabled': {\n opacity: 0.25,\n pointerEvents: 'none'\n }\n },\n '&-view': {\n flex: 'auto',\n fontWeight: fontWeightStrong,\n lineHeight: (0, _cssinjs.unit)(textHeight),\n '> button': {\n color: 'inherit',\n fontWeight: 'inherit',\n '&:not(:first-child)': {\n marginInlineStart: paddingXS\n },\n '&:hover': {\n color: colorPrimary\n }\n }\n }\n },\n // Arrow button\n [`&-prev-icon,\n &-next-icon,\n &-super-prev-icon,\n &-super-next-icon`]: {\n position: 'relative',\n width: pickerControlIconSize,\n height: pickerControlIconSize,\n '&::before': {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n width: pickerControlIconSize,\n height: pickerControlIconSize,\n border: `0 solid currentcolor`,\n borderBlockWidth: `${(0, _cssinjs.unit)(pickerControlIconBorderWidth)} 0`,\n borderInlineWidth: `${(0, _cssinjs.unit)(pickerControlIconBorderWidth)} 0`,\n content: '\"\"'\n }\n },\n [`&-super-prev-icon,\n &-super-next-icon`]: {\n '&::after': {\n position: 'absolute',\n top: pickerControlIconMargin,\n insetInlineStart: pickerControlIconMargin,\n display: 'inline-block',\n width: pickerControlIconSize,\n height: pickerControlIconSize,\n border: '0 solid currentcolor',\n borderBlockWidth: `${(0, _cssinjs.unit)(pickerControlIconBorderWidth)} 0`,\n borderInlineWidth: `${(0, _cssinjs.unit)(pickerControlIconBorderWidth)} 0`,\n content: '\"\"'\n }\n },\n '&-prev-icon, &-super-prev-icon': {\n transform: 'rotate(-45deg)'\n },\n '&-next-icon, &-super-next-icon': {\n transform: 'rotate(135deg)'\n },\n // ======================== Body ========================\n '&-content': {\n width: '100%',\n tableLayout: 'fixed',\n borderCollapse: 'collapse',\n 'th, td': {\n position: 'relative',\n minWidth: cellHeight,\n fontWeight: 'normal'\n },\n th: {\n height: token.calc(cellHeight).add(token.calc(pickerCellPaddingVertical).mul(2)).equal(),\n color: colorText,\n verticalAlign: 'middle'\n }\n },\n '&-cell': Object.assign({\n padding: `${(0, _cssinjs.unit)(pickerCellPaddingVertical)} 0`,\n color: colorTextDisabled,\n cursor: 'pointer',\n // In view\n '&-in-view': {\n color: colorText\n }\n }, genPickerCellInnerStyle(token)),\n [`&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel`]: {\n [`${componentCls}-content`]: {\n height: token.calc(withoutTimeCellHeight).mul(4).equal()\n },\n [pickerCellInnerCls]: {\n padding: `0 ${(0, _cssinjs.unit)(paddingXS)}`\n }\n },\n '&-quarter-panel': {\n [`${componentCls}-content`]: {\n height: pickerQuarterPanelContentHeight\n }\n },\n // ========================================================\n // = Special =\n // ========================================================\n // ===================== Decade Panel =====================\n '&-decade-panel': {\n [pickerCellInnerCls]: {\n padding: `0 ${(0, _cssinjs.unit)(token.calc(paddingXS).div(2).equal())}`\n },\n [`${componentCls}-cell::before`]: {\n display: 'none'\n }\n },\n // ============= Year & Quarter & Month Panel =============\n [`&-year-panel,\n &-quarter-panel,\n &-month-panel`]: {\n [`${componentCls}-body`]: {\n padding: `0 ${(0, _cssinjs.unit)(paddingXS)}`\n },\n [pickerCellInnerCls]: {\n width: pickerYearMonthCellWidth\n }\n },\n // ====================== Date Panel ======================\n '&-date-panel': {\n [`${componentCls}-body`]: {\n padding: `${(0, _cssinjs.unit)(paddingXS)} ${(0, _cssinjs.unit)(pickerDatePanelPaddingHorizontal)}`\n },\n [`${componentCls}-content th`]: {\n boxSizing: 'border-box',\n padding: 0\n }\n },\n // ====================== Week Panel ======================\n '&-week-panel': {\n // Clear cell style\n [`${componentCls}-cell`]: {\n [`&:hover ${pickerCellInnerCls},\n &-selected ${pickerCellInnerCls},\n ${pickerCellInnerCls}`]: {\n background: 'transparent !important'\n }\n },\n '&-row': {\n td: {\n '&:before': {\n transition: `background ${motionDurationMid}`\n },\n '&:first-child:before': {\n borderStartStartRadius: borderRadiusSM,\n borderEndStartRadius: borderRadiusSM\n },\n '&:last-child:before': {\n borderStartEndRadius: borderRadiusSM,\n borderEndEndRadius: borderRadiusSM\n }\n },\n '&:hover td': {\n '&:before': {\n background: cellHoverBg\n }\n },\n '&-range-start td, &-range-end td, &-selected td, &-hover td': {\n // Rise priority to override hover style\n [`&${pickerCellCls}`]: {\n '&:before': {\n background: colorPrimary\n },\n [`&${componentCls}-cell-week`]: {\n color: new _tinycolor.TinyColor(colorTextLightSolid).setAlpha(0.5).toHexString()\n },\n [pickerCellInnerCls]: {\n color: colorTextLightSolid\n }\n }\n },\n '&-range-hover td:before': {\n background: controlItemBgActive\n }\n }\n },\n // >>> ShowWeek\n '&-week-panel, &-date-panel-show-week': {\n [`${componentCls}-body`]: {\n padding: `${(0, _cssinjs.unit)(paddingXS)} ${(0, _cssinjs.unit)(paddingSM)}`\n },\n [`${componentCls}-content th`]: {\n width: 'auto'\n }\n },\n // ==================== Datetime Panel ====================\n '&-datetime-panel': {\n display: 'flex',\n [`${componentCls}-time-panel`]: {\n borderInlineStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`\n },\n [`${componentCls}-date-panel,\n ${componentCls}-time-panel`]: {\n transition: `opacity ${motionDurationSlow}`\n },\n // Keyboard\n '&-active': {\n [`${componentCls}-date-panel,\n ${componentCls}-time-panel`]: {\n opacity: 0.3,\n '&-active': {\n opacity: 1\n }\n }\n }\n },\n // ====================== Time Panel ======================\n '&-time-panel': {\n width: 'auto',\n minWidth: 'auto',\n [`${componentCls}-content`]: {\n display: 'flex',\n flex: 'auto',\n height: timeColumnHeight\n },\n '&-column': {\n flex: '1 0 auto',\n width: timeColumnWidth,\n margin: `${(0, _cssinjs.unit)(paddingXXS)} 0`,\n padding: 0,\n overflowY: 'hidden',\n textAlign: 'start',\n listStyle: 'none',\n transition: `background ${motionDurationMid}`,\n overflowX: 'hidden',\n '&::-webkit-scrollbar': {\n width: 8,\n backgroundColor: 'transparent'\n },\n '&::-webkit-scrollbar-thumb': {\n backgroundColor: token.colorTextTertiary,\n borderRadius: token.borderRadiusSM\n },\n // For Firefox\n '&': {\n scrollbarWidth: 'thin',\n scrollbarColor: `${token.colorTextTertiary} transparent`\n },\n '&::after': {\n display: 'block',\n height: token.calc('100%').sub(timeCellHeight).equal(),\n content: '\"\"'\n },\n '&:not(:first-child)': {\n borderInlineStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`\n },\n '&-active': {\n background: new _tinycolor.TinyColor(controlItemBgActive).setAlpha(0.2).toHexString()\n },\n '&:hover': {\n overflowY: 'auto'\n },\n '> li': {\n margin: 0,\n padding: 0,\n [`&${componentCls}-time-panel-cell`]: {\n marginInline: marginXXS,\n [`${componentCls}-time-panel-cell-inner`]: {\n display: 'block',\n width: token.calc(timeColumnWidth).sub(token.calc(marginXXS).mul(2)).equal(),\n height: timeCellHeight,\n margin: 0,\n paddingBlock: 0,\n paddingInlineEnd: 0,\n paddingInlineStart: token.calc(timeColumnWidth).sub(timeCellHeight).div(2).equal(),\n color: colorText,\n lineHeight: (0, _cssinjs.unit)(timeCellHeight),\n borderRadius: borderRadiusSM,\n cursor: 'pointer',\n transition: `background ${motionDurationMid}`,\n '&:hover': {\n background: cellHoverBg\n }\n },\n '&-selected': {\n [`${componentCls}-time-panel-cell-inner`]: {\n background: controlItemBgActive\n }\n },\n '&-disabled': {\n [`${componentCls}-time-panel-cell-inner`]: {\n color: colorTextDisabled,\n background: 'transparent',\n cursor: 'not-allowed'\n }\n }\n }\n }\n }\n }\n }\n };\n};\nexports.genPanelStyle = genPanelStyle;\nconst genPickerPanelStyle = token => {\n const {\n componentCls,\n textHeight,\n lineWidth,\n paddingSM,\n antCls,\n colorPrimary,\n cellActiveWithRangeBg,\n colorPrimaryBorder,\n lineType,\n colorSplit\n } = token;\n return {\n [`${componentCls}-dropdown`]: {\n // ======================== Footer ========================\n [`${componentCls}-footer`]: {\n borderTop: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,\n '&-extra': {\n padding: `0 ${(0, _cssinjs.unit)(paddingSM)}`,\n lineHeight: (0, _cssinjs.unit)(token.calc(textHeight).sub(token.calc(lineWidth).mul(2)).equal()),\n textAlign: 'start',\n '&:not(:last-child)': {\n borderBottom: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`\n }\n }\n },\n // ==================== Footer > Ranges ===================\n [`${componentCls}-panels + ${componentCls}-footer ${componentCls}-ranges`]: {\n justifyContent: 'space-between'\n },\n [`${componentCls}-ranges`]: {\n marginBlock: 0,\n paddingInline: (0, _cssinjs.unit)(paddingSM),\n overflow: 'hidden',\n textAlign: 'start',\n listStyle: 'none',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n '> li': {\n lineHeight: (0, _cssinjs.unit)(token.calc(textHeight).sub(token.calc(lineWidth).mul(2)).equal()),\n display: 'inline-block'\n },\n [`${componentCls}-now-btn-disabled`]: {\n pointerEvents: 'none',\n color: token.colorTextDisabled\n },\n // https://github.com/ant-design/ant-design/issues/23687\n [`${componentCls}-preset > ${antCls}-tag-blue`]: {\n color: colorPrimary,\n background: cellActiveWithRangeBg,\n borderColor: colorPrimaryBorder,\n cursor: 'pointer'\n },\n [`${componentCls}-ok`]: {\n paddingBlock: token.calc(lineWidth).mul(2).equal(),\n marginInlineStart: 'auto'\n }\n }\n }\n };\n};\nvar _default = exports.default = genPickerPanelStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.initPickerPanelToken = exports.initPanelComponentToken = void 0;\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _token = require(\"../../input/style/token\");\nvar _roundedArrow = require(\"../../style/roundedArrow\");\nconst initPickerPanelToken = token => {\n const {\n componentCls,\n controlHeightLG,\n paddingXXS,\n padding\n } = token;\n return {\n pickerCellCls: `${componentCls}-cell`,\n pickerCellInnerCls: `${componentCls}-cell-inner`,\n pickerYearMonthCellWidth: token.calc(controlHeightLG).mul(1.5).equal(),\n pickerQuarterPanelContentHeight: token.calc(controlHeightLG).mul(1.4).equal(),\n pickerCellPaddingVertical: token.calc(paddingXXS).add(token.calc(paddingXXS).div(2)).equal(),\n pickerCellBorderGap: 2,\n // Magic for gap between cells\n pickerControlIconSize: 7,\n pickerControlIconMargin: 4,\n pickerControlIconBorderWidth: 1.5,\n pickerDatePanelPaddingHorizontal: token.calc(padding).add(token.calc(paddingXXS).div(2)).equal() // 18 in normal\n };\n};\nexports.initPickerPanelToken = initPickerPanelToken;\nconst initPanelComponentToken = token => {\n const {\n colorBgContainerDisabled,\n controlHeight,\n controlHeightSM,\n controlHeightLG,\n paddingXXS,\n lineWidth\n } = token;\n // Item height default use `controlHeight - 2 * paddingXXS`,\n // but some case `paddingXXS=0`.\n // Let's fallback it.\n const dblPaddingXXS = paddingXXS * 2;\n const dblLineWidth = lineWidth * 2;\n const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);\n const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);\n const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);\n // FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding\n const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);\n const filledToken = {\n INTERNAL_FIXED_ITEM_MARGIN,\n cellHoverBg: token.controlItemBgHover,\n cellActiveWithRangeBg: token.controlItemBgActive,\n cellHoverWithRangeBg: new _tinycolor.TinyColor(token.colorPrimary).lighten(35).toHexString(),\n cellRangeBorderColor: new _tinycolor.TinyColor(token.colorPrimary).lighten(20).toHexString(),\n cellBgDisabled: colorBgContainerDisabled,\n timeColumnWidth: controlHeightLG * 1.4,\n timeColumnHeight: 28 * 8,\n timeCellHeight: 28,\n cellWidth: controlHeightSM * 1.5,\n cellHeight: controlHeightSM,\n textHeight: controlHeightLG,\n withoutTimeCellHeight: controlHeightLG * 1.65,\n multipleItemBg: token.colorFillSecondary,\n multipleItemBorderColor: 'transparent',\n multipleItemHeight,\n multipleItemHeightSM,\n multipleItemHeightLG,\n multipleSelectorBgDisabled: colorBgContainerDisabled,\n multipleItemColorDisabled: token.colorTextDisabled,\n multipleItemBorderColorDisabled: 'transparent'\n };\n return filledToken;\n};\nexports.initPanelComponentToken = initPanelComponentToken;\nconst prepareComponentToken = token => Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _token.initComponentToken)(token)), initPanelComponentToken(token)), (0, _roundedArrow.getArrowToken)(token)), {\n presetsWidth: 120,\n presetsMaxWidth: 200,\n zIndexPopup: token.zIndexPopupBase + 50\n});\nexports.prepareComponentToken = prepareComponentToken;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _variants = require(\"../../input/style/variants\");\nconst genVariantsStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: [Object.assign(Object.assign(Object.assign({}, (0, _variants.genOutlinedStyle)(token)), (0, _variants.genFilledStyle)(token)), (0, _variants.genBorderlessStyle)(token)),\n // ========================= Multiple =========================\n {\n '&-outlined': {\n [`&${componentCls}-multiple ${componentCls}-selection-item`]: {\n background: token.multipleItemBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`\n }\n },\n '&-filled': {\n [`&${componentCls}-multiple ${componentCls}-selection-item`]: {\n background: token.colorBgContainer,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n }\n },\n '&-borderless': {\n [`&${componentCls}-multiple ${componentCls}-selection-item`]: {\n background: token.multipleItemBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`\n }\n }\n }]\n };\n};\nvar _default = exports.default = genVariantsStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getPlaceholder = getPlaceholder;\nexports.getRangePlaceholder = getRangePlaceholder;\nexports.transPlacement2DropdownAlign = transPlacement2DropdownAlign;\nexports.useIcons = useIcons;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useIcons = _interopRequireDefault(require(\"../select/useIcons\"));\nfunction getPlaceholder(locale, picker, customizePlaceholder) {\n if (customizePlaceholder !== undefined) {\n return customizePlaceholder;\n }\n if (picker === 'year' && locale.lang.yearPlaceholder) {\n return locale.lang.yearPlaceholder;\n }\n if (picker === 'quarter' && locale.lang.quarterPlaceholder) {\n return locale.lang.quarterPlaceholder;\n }\n if (picker === 'month' && locale.lang.monthPlaceholder) {\n return locale.lang.monthPlaceholder;\n }\n if (picker === 'week' && locale.lang.weekPlaceholder) {\n return locale.lang.weekPlaceholder;\n }\n if (picker === 'time' && locale.timePickerLocale.placeholder) {\n return locale.timePickerLocale.placeholder;\n }\n return locale.lang.placeholder;\n}\nfunction getRangePlaceholder(locale, picker, customizePlaceholder) {\n if (customizePlaceholder !== undefined) {\n return customizePlaceholder;\n }\n if (picker === 'year' && locale.lang.yearPlaceholder) {\n return locale.lang.rangeYearPlaceholder;\n }\n if (picker === 'quarter' && locale.lang.quarterPlaceholder) {\n return locale.lang.rangeQuarterPlaceholder;\n }\n if (picker === 'month' && locale.lang.monthPlaceholder) {\n return locale.lang.rangeMonthPlaceholder;\n }\n if (picker === 'week' && locale.lang.weekPlaceholder) {\n return locale.lang.rangeWeekPlaceholder;\n }\n if (picker === 'time' && locale.timePickerLocale.placeholder) {\n return locale.timePickerLocale.rangePlaceholder;\n }\n return locale.lang.rangePlaceholder;\n}\nfunction transPlacement2DropdownAlign(direction, placement) {\n const overflow = {\n adjustX: 1,\n adjustY: 1\n };\n switch (placement) {\n case 'bottomLeft':\n {\n return {\n points: ['tl', 'bl'],\n offset: [0, 4],\n overflow\n };\n }\n case 'bottomRight':\n {\n return {\n points: ['tr', 'br'],\n offset: [0, 4],\n overflow\n };\n }\n case 'topLeft':\n {\n return {\n points: ['bl', 'tl'],\n offset: [0, -4],\n overflow\n };\n }\n case 'topRight':\n {\n return {\n points: ['br', 'tr'],\n offset: [0, -4],\n overflow\n };\n }\n default:\n {\n return {\n points: direction === 'rtl' ? ['tr', 'br'] : ['tl', 'bl'],\n offset: [0, 4],\n overflow\n };\n }\n }\n}\nfunction useIcons(props, prefixCls) {\n const {\n allowClear = true\n } = props;\n const {\n clearIcon,\n removeIcon\n } = (0, _useIcons.default)(Object.assign(Object.assign({}, props), {\n prefixCls,\n componentName: 'DatePicker'\n }));\n const mergedAllowClear = React.useMemo(() => {\n if (allowClear === false) {\n return false;\n }\n const allowClearConfig = allowClear === true ? {} : allowClear;\n return Object.assign({\n clearIcon: clearIcon\n }, allowClearConfig);\n }, [allowClear, clearIcon]);\n return [mergedAllowClear, removeIcon];\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nfunction notEmpty(val) {\n return val !== undefined && val !== null;\n}\nconst Cell = props => {\n const {\n itemPrefixCls,\n component,\n span,\n className,\n style,\n labelStyle,\n contentStyle,\n bordered,\n label,\n content,\n colon,\n type\n } = props;\n const Component = component;\n if (bordered) {\n return /*#__PURE__*/React.createElement(Component, {\n className: (0, _classnames.default)({\n [`${itemPrefixCls}-item-label`]: type === 'label',\n [`${itemPrefixCls}-item-content`]: type === 'content'\n }, className),\n style: style,\n colSpan: span\n }, notEmpty(label) && /*#__PURE__*/React.createElement(\"span\", {\n style: labelStyle\n }, label), notEmpty(content) && /*#__PURE__*/React.createElement(\"span\", {\n style: contentStyle\n }, content));\n }\n return /*#__PURE__*/React.createElement(Component, {\n className: (0, _classnames.default)(`${itemPrefixCls}-item`, className),\n style: style,\n colSpan: span\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${itemPrefixCls}-item-container`\n }, (label || label === 0) && (/*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(`${itemPrefixCls}-item-label`, {\n [`${itemPrefixCls}-item-no-colon`]: !colon\n }),\n style: labelStyle\n }, label)), (content || content === 0) && (/*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(`${itemPrefixCls}-item-content`),\n style: contentStyle\n }, content))));\n};\nvar _default = exports.default = Cell;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst DescriptionsContext = /*#__PURE__*/_react.default.createContext({});\nvar _default = exports.default = DescriptionsContext;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst DescriptionsItem = _ref => {\n let {\n children\n } = _ref;\n return children;\n};\nvar _default = exports.default = DescriptionsItem;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _Cell = _interopRequireDefault(require(\"./Cell\"));\nvar _DescriptionsContext = _interopRequireDefault(require(\"./DescriptionsContext\"));\nfunction renderCells(items, _ref, _ref2) {\n let {\n colon,\n prefixCls,\n bordered\n } = _ref;\n let {\n component,\n type,\n showLabel,\n showContent,\n labelStyle: rootLabelStyle,\n contentStyle: rootContentStyle\n } = _ref2;\n return items.map((_ref3, index) => {\n let {\n label,\n children,\n prefixCls: itemPrefixCls = prefixCls,\n className,\n style,\n labelStyle,\n contentStyle,\n span = 1,\n key\n } = _ref3;\n if (typeof component === 'string') {\n return /*#__PURE__*/React.createElement(_Cell.default, {\n key: `${type}-${key || index}`,\n className: className,\n style: style,\n labelStyle: Object.assign(Object.assign({}, rootLabelStyle), labelStyle),\n contentStyle: Object.assign(Object.assign({}, rootContentStyle), contentStyle),\n span: span,\n colon: colon,\n component: component,\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n label: showLabel ? label : null,\n content: showContent ? children : null,\n type: type\n });\n }\n return [/*#__PURE__*/React.createElement(_Cell.default, {\n key: `label-${key || index}`,\n className: className,\n style: Object.assign(Object.assign(Object.assign({}, rootLabelStyle), style), labelStyle),\n span: 1,\n colon: colon,\n component: component[0],\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n label: label,\n type: \"label\"\n }), /*#__PURE__*/React.createElement(_Cell.default, {\n key: `content-${key || index}`,\n className: className,\n style: Object.assign(Object.assign(Object.assign({}, rootContentStyle), style), contentStyle),\n span: span * 2 - 1,\n component: component[1],\n itemPrefixCls: itemPrefixCls,\n bordered: bordered,\n content: children,\n type: \"content\"\n })];\n });\n}\nconst Row = props => {\n const descContext = React.useContext(_DescriptionsContext.default);\n const {\n prefixCls,\n vertical,\n row,\n index,\n bordered\n } = props;\n if (vertical) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"tr\", {\n key: `label-${index}`,\n className: `${prefixCls}-row`\n }, renderCells(row, props, Object.assign({\n component: 'th',\n type: 'label',\n showLabel: true\n }, descContext))), /*#__PURE__*/React.createElement(\"tr\", {\n key: `content-${index}`,\n className: `${prefixCls}-row`\n }, renderCells(row, props, Object.assign({\n component: 'td',\n type: 'content',\n showContent: true\n }, descContext))));\n }\n return /*#__PURE__*/React.createElement(\"tr\", {\n key: index,\n className: `${prefixCls}-row`\n }, renderCells(row, props, Object.assign({\n component: bordered ? ['th', 'td'] : 'td',\n type: 'item',\n showLabel: true,\n showContent: true\n }, descContext)));\n};\nvar _default = exports.default = Row;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst DEFAULT_COLUMN_MAP = {\n xxl: 3,\n xl: 3,\n lg: 3,\n md: 3,\n sm: 2,\n xs: 1\n};\nvar _default = exports.default = DEFAULT_COLUMN_MAP;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useItems;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _responsiveObserver = require(\"../../_util/responsiveObserver\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n// Convert children into items\nconst transChildren2Items = childNodes => (0, _toArray.default)(childNodes).map(node => Object.assign(Object.assign({}, node === null || node === void 0 ? void 0 : node.props), {\n key: node.key\n}));\nfunction useItems(screens, items, children) {\n const mergedItems = React.useMemo(() =>\n // Take `items` first or convert `children` into items\n items || transChildren2Items(children), [items, children]);\n const responsiveItems = React.useMemo(() => mergedItems.map(_a => {\n var {\n span\n } = _a,\n restItem = __rest(_a, [\"span\"]);\n return Object.assign(Object.assign({}, restItem), {\n span: typeof span === 'number' ? span : (0, _responsiveObserver.matchScreen)(screens, span)\n });\n }), [mergedItems, screens]);\n return responsiveItems;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nvar _warning = require(\"../../_util/warning\");\nfunction getFilledItem(rowItem, rowRestCol, span) {\n let clone = rowItem;\n let exceed = false;\n if (span === undefined || span > rowRestCol) {\n clone = Object.assign(Object.assign({}, rowItem), {\n span: rowRestCol\n });\n exceed = span !== undefined;\n }\n return [clone, exceed];\n}\n// Calculate the sum of span in a row\nfunction getCalcRows(rowItems, mergedColumn) {\n const rows = [];\n let tmpRow = [];\n let rowRestCol = mergedColumn;\n let exceed = false;\n rowItems.filter(n => n).forEach((rowItem, index) => {\n const span = rowItem === null || rowItem === void 0 ? void 0 : rowItem.span;\n const mergedSpan = span || 1;\n // Additional handle last one\n if (index === rowItems.length - 1) {\n const [item, itemExceed] = getFilledItem(rowItem, rowRestCol, span);\n exceed = exceed || itemExceed;\n tmpRow.push(item);\n rows.push(tmpRow);\n return;\n }\n if (mergedSpan < rowRestCol) {\n rowRestCol -= mergedSpan;\n tmpRow.push(rowItem);\n } else {\n const [item, itemExceed] = getFilledItem(rowItem, rowRestCol, mergedSpan);\n exceed = exceed || itemExceed;\n tmpRow.push(item);\n rows.push(tmpRow);\n rowRestCol = mergedColumn;\n tmpRow = [];\n }\n });\n return [rows, exceed];\n}\nconst useRow = (mergedColumn, items) => {\n const [rows, exceed] = (0, _react.useMemo)(() => getCalcRows(items, mergedColumn), [items, mergedColumn]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Descriptions');\n process.env.NODE_ENV !== \"production\" ? warning(!exceed, 'usage', 'Sum of column `span` in a line not match `column` of Descriptions.') : void 0;\n }\n return rows;\n};\nvar _default = exports.default = useRow;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"DescriptionsContext\", {\n enumerable: true,\n get: function () {\n return _DescriptionsContext.default;\n }\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _responsiveObserver = require(\"../_util/responsiveObserver\");\nvar _configProvider = require(\"../config-provider\");\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _useBreakpoint = _interopRequireDefault(require(\"../grid/hooks/useBreakpoint\"));\nvar _constant = _interopRequireDefault(require(\"./constant\"));\nvar _DescriptionsContext = _interopRequireDefault(require(\"./DescriptionsContext\"));\nvar _useItems = _interopRequireDefault(require(\"./hooks/useItems\"));\nvar _useRow = _interopRequireDefault(require(\"./hooks/useRow\"));\nvar _Item = _interopRequireDefault(require(\"./Item\"));\nvar _Row = _interopRequireDefault(require(\"./Row\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/* eslint-disable react/no-array-index-key */\n\nconst Descriptions = props => {\n const {\n prefixCls: customizePrefixCls,\n title,\n extra,\n column,\n colon = true,\n bordered,\n layout,\n children,\n className,\n rootClassName,\n style,\n size: customizeSize,\n labelStyle,\n contentStyle,\n items\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"title\", \"extra\", \"column\", \"colon\", \"bordered\", \"layout\", \"children\", \"className\", \"rootClassName\", \"style\", \"size\", \"labelStyle\", \"contentStyle\", \"items\"]);\n const {\n getPrefixCls,\n direction,\n descriptions\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('descriptions', customizePrefixCls);\n const screens = (0, _useBreakpoint.default)();\n // Column count\n const mergedColumn = React.useMemo(() => {\n var _a;\n if (typeof column === 'number') {\n return column;\n }\n return (_a = (0, _responsiveObserver.matchScreen)(screens, Object.assign(Object.assign({}, _constant.default), column))) !== null && _a !== void 0 ? _a : 3;\n }, [screens, column]);\n // Items with responsive\n const mergedItems = (0, _useItems.default)(screens, items, children);\n const mergedSize = (0, _useSize.default)(customizeSize);\n const rows = (0, _useRow.default)(mergedColumn, mergedItems);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n // ======================== Render ========================\n const contextValue = React.useMemo(() => ({\n labelStyle,\n contentStyle\n }), [labelStyle, contentStyle]);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_DescriptionsContext.default.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: (0, _classnames.default)(prefixCls, descriptions === null || descriptions === void 0 ? void 0 : descriptions.className, {\n [`${prefixCls}-${mergedSize}`]: mergedSize && mergedSize !== 'default',\n [`${prefixCls}-bordered`]: !!bordered,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId, cssVarCls),\n style: Object.assign(Object.assign({}, descriptions === null || descriptions === void 0 ? void 0 : descriptions.style), style)\n }, restProps), (title || extra) && (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-header`\n }, title && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title), extra && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-extra`\n }, extra))), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-view`\n }, /*#__PURE__*/React.createElement(\"table\", null, /*#__PURE__*/React.createElement(\"tbody\", null, rows.map((row, index) => (/*#__PURE__*/React.createElement(_Row.default, {\n key: index,\n index: index,\n colon: colon,\n prefixCls: prefixCls,\n vertical: layout === 'vertical',\n bordered: bordered,\n row: row\n })))))))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Descriptions.displayName = 'Descriptions';\n}\nDescriptions.Item = _Item.default;\nvar _default = exports.default = Descriptions;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genBorderedStyle = token => {\n const {\n componentCls,\n labelBg\n } = token;\n return {\n [`&${componentCls}-bordered`]: {\n [`> ${componentCls}-view`]: {\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n '> table': {\n tableLayout: 'auto'\n },\n [`${componentCls}-row`]: {\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n '&:last-child': {\n borderBottom: 'none'\n },\n [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {\n padding: `${(0, _cssinjs.unit)(token.padding)} ${(0, _cssinjs.unit)(token.paddingLG)}`,\n borderInlineEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n '&:last-child': {\n borderInlineEnd: 'none'\n }\n },\n [`> ${componentCls}-item-label`]: {\n color: token.colorTextSecondary,\n backgroundColor: labelBg,\n '&::after': {\n display: 'none'\n }\n }\n }\n },\n [`&${componentCls}-middle`]: {\n [`${componentCls}-row`]: {\n [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {\n padding: `${(0, _cssinjs.unit)(token.paddingSM)} ${(0, _cssinjs.unit)(token.paddingLG)}`\n }\n }\n },\n [`&${componentCls}-small`]: {\n [`${componentCls}-row`]: {\n [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {\n padding: `${(0, _cssinjs.unit)(token.paddingXS)} ${(0, _cssinjs.unit)(token.padding)}`\n }\n }\n }\n }\n };\n};\nconst genDescriptionStyles = token => {\n const {\n componentCls,\n extraColor,\n itemPaddingBottom,\n itemPaddingEnd,\n colonMarginRight,\n colonMarginLeft,\n titleMarginBottom\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), genBorderedStyle(token)), {\n '&-rtl': {\n direction: 'rtl'\n },\n [`${componentCls}-header`]: {\n display: 'flex',\n alignItems: 'center',\n marginBottom: titleMarginBottom\n },\n [`${componentCls}-title`]: Object.assign(Object.assign({}, _style.textEllipsis), {\n flex: 'auto',\n color: token.titleColor,\n fontWeight: token.fontWeightStrong,\n fontSize: token.fontSizeLG,\n lineHeight: token.lineHeightLG\n }),\n [`${componentCls}-extra`]: {\n marginInlineStart: 'auto',\n color: extraColor,\n fontSize: token.fontSize\n },\n [`${componentCls}-view`]: {\n width: '100%',\n borderRadius: token.borderRadiusLG,\n table: {\n width: '100%',\n tableLayout: 'fixed',\n borderCollapse: 'collapse'\n }\n },\n [`${componentCls}-row`]: {\n '> th, > td': {\n paddingBottom: itemPaddingBottom,\n paddingInlineEnd: itemPaddingEnd\n },\n '> th:last-child, > td:last-child': {\n paddingInlineEnd: 0\n },\n '&:last-child': {\n borderBottom: 'none',\n '> th, > td': {\n paddingBottom: 0\n }\n }\n },\n [`${componentCls}-item-label`]: {\n color: token.colorTextTertiary,\n fontWeight: 'normal',\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n textAlign: 'start',\n '&::after': {\n content: '\":\"',\n position: 'relative',\n top: -0.5,\n // magic for position\n marginInline: `${(0, _cssinjs.unit)(colonMarginLeft)} ${(0, _cssinjs.unit)(colonMarginRight)}`\n },\n [`&${componentCls}-item-no-colon::after`]: {\n content: '\"\"'\n }\n },\n [`${componentCls}-item-no-label`]: {\n '&::after': {\n margin: 0,\n content: '\"\"'\n }\n },\n [`${componentCls}-item-content`]: {\n display: 'table-cell',\n flex: 1,\n color: token.contentColor,\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n wordBreak: 'break-word',\n overflowWrap: 'break-word'\n },\n [`${componentCls}-item`]: {\n paddingBottom: 0,\n verticalAlign: 'top',\n '&-container': {\n display: 'flex',\n [`${componentCls}-item-label`]: {\n display: 'inline-flex',\n alignItems: 'baseline'\n },\n [`${componentCls}-item-content`]: {\n display: 'inline-flex',\n alignItems: 'baseline',\n minWidth: '1em'\n }\n }\n },\n '&-middle': {\n [`${componentCls}-row`]: {\n '> th, > td': {\n paddingBottom: token.paddingSM\n }\n }\n },\n '&-small': {\n [`${componentCls}-row`]: {\n '> th, > td': {\n paddingBottom: token.paddingXS\n }\n }\n }\n })\n };\n};\nconst prepareComponentToken = token => ({\n labelBg: token.colorFillAlter,\n titleColor: token.colorText,\n titleMarginBottom: token.fontSizeSM * token.lineHeightSM,\n itemPaddingBottom: token.padding,\n itemPaddingEnd: token.padding,\n colonMarginRight: token.marginXS,\n colonMarginLeft: token.marginXXS / 2,\n contentColor: token.colorText,\n extraColor: token.colorText\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Descriptions', token => {\n const descriptionToken = (0, _internal.mergeToken)(token, {});\n return genDescriptionStyles(descriptionToken);\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Divider = props => {\n const {\n getPrefixCls,\n direction,\n divider\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n type = 'horizontal',\n orientation = 'center',\n orientationMargin,\n className,\n rootClassName,\n children,\n dashed,\n variant = 'solid',\n plain,\n style\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"type\", \"orientation\", \"orientationMargin\", \"className\", \"rootClassName\", \"children\", \"dashed\", \"variant\", \"plain\", \"style\"]);\n const prefixCls = getPrefixCls('divider', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const hasChildren = !!children;\n const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null;\n const hasCustomMarginRight = orientation === 'right' && orientationMargin != null;\n const classString = (0, _classnames.default)(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, cssVarCls, `${prefixCls}-${type}`, {\n [`${prefixCls}-with-text`]: hasChildren,\n [`${prefixCls}-with-text-${orientation}`]: hasChildren,\n [`${prefixCls}-dashed`]: !!dashed,\n [`${prefixCls}-${variant}`]: variant !== 'solid',\n [`${prefixCls}-plain`]: !!plain,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft,\n [`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight\n }, className, rootClassName);\n const memoizedOrientationMargin = React.useMemo(() => {\n if (typeof orientationMargin === 'number') {\n return orientationMargin;\n }\n if (/^\\d+$/.test(orientationMargin)) {\n return Number(orientationMargin);\n }\n return orientationMargin;\n }, [orientationMargin]);\n const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && {\n marginLeft: memoizedOrientationMargin\n }), hasCustomMarginRight && {\n marginRight: memoizedOrientationMargin\n });\n // Warning children not work in vertical mode\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Divider');\n process.env.NODE_ENV !== \"production\" ? warning(!children || type !== 'vertical', 'usage', '`children` not working in `vertical` mode.') : void 0;\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: classString,\n style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style)\n }, restProps, {\n role: \"separator\"\n }), children && type !== 'vertical' && (/*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-inner-text`,\n style: innerStyle\n }, children))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Divider.displayName = 'Divider';\n}\nvar _default = exports.default = Divider;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Shared ==============================\nconst genSharedDividerStyle = token => {\n const {\n componentCls,\n sizePaddingEdgeHorizontal,\n colorSplit,\n lineWidth,\n textPaddingInline,\n orientationMargin,\n verticalMarginInline\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n borderBlockStart: `${(0, _cssinjs.unit)(lineWidth)} solid ${colorSplit}`,\n // vertical\n '&-vertical': {\n position: 'relative',\n top: '-0.06em',\n display: 'inline-block',\n height: '0.9em',\n marginInline: verticalMarginInline,\n marginBlock: 0,\n verticalAlign: 'middle',\n borderTop: 0,\n borderInlineStart: `${(0, _cssinjs.unit)(lineWidth)} solid ${colorSplit}`\n },\n '&-horizontal': {\n display: 'flex',\n clear: 'both',\n width: '100%',\n minWidth: '100%',\n // Fix https://github.com/ant-design/ant-design/issues/10914\n margin: `${(0, _cssinjs.unit)(token.dividerHorizontalGutterMargin)} 0`\n },\n [`&-horizontal${componentCls}-with-text`]: {\n display: 'flex',\n alignItems: 'center',\n margin: `${(0, _cssinjs.unit)(token.dividerHorizontalWithTextGutterMargin)} 0`,\n color: token.colorTextHeading,\n fontWeight: 500,\n fontSize: token.fontSizeLG,\n whiteSpace: 'nowrap',\n textAlign: 'center',\n borderBlockStart: `0 ${colorSplit}`,\n '&::before, &::after': {\n position: 'relative',\n width: '50%',\n borderBlockStart: `${(0, _cssinjs.unit)(lineWidth)} solid transparent`,\n // Chrome not accept `inherit` in `border-top`\n borderBlockStartColor: 'inherit',\n borderBlockEnd: 0,\n transform: 'translateY(50%)',\n content: \"''\"\n }\n },\n [`&-horizontal${componentCls}-with-text-left`]: {\n '&::before': {\n width: `calc(${orientationMargin} * 100%)`\n },\n '&::after': {\n width: `calc(100% - ${orientationMargin} * 100%)`\n }\n },\n [`&-horizontal${componentCls}-with-text-right`]: {\n '&::before': {\n width: `calc(100% - ${orientationMargin} * 100%)`\n },\n '&::after': {\n width: `calc(${orientationMargin} * 100%)`\n }\n },\n [`${componentCls}-inner-text`]: {\n display: 'inline-block',\n paddingBlock: 0,\n paddingInline: textPaddingInline\n },\n '&-dashed': {\n background: 'none',\n borderColor: colorSplit,\n borderStyle: 'dashed',\n borderWidth: `${(0, _cssinjs.unit)(lineWidth)} 0 0`\n },\n [`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: {\n '&::before, &::after': {\n borderStyle: 'dashed none none'\n }\n },\n [`&-vertical${componentCls}-dashed`]: {\n borderInlineStartWidth: lineWidth,\n borderInlineEnd: 0,\n borderBlockStart: 0,\n borderBlockEnd: 0\n },\n '&-dotted': {\n background: 'none',\n borderColor: colorSplit,\n borderStyle: 'dotted',\n borderWidth: `${(0, _cssinjs.unit)(lineWidth)} 0 0`\n },\n [`&-horizontal${componentCls}-with-text${componentCls}-dotted`]: {\n '&::before, &::after': {\n borderStyle: 'dotted none none'\n }\n },\n [`&-vertical${componentCls}-dotted`]: {\n borderInlineStartWidth: lineWidth,\n borderInlineEnd: 0,\n borderBlockStart: 0,\n borderBlockEnd: 0\n },\n [`&-plain${componentCls}-with-text`]: {\n color: token.colorText,\n fontWeight: 'normal',\n fontSize: token.fontSize\n },\n [`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: {\n '&::before': {\n width: 0\n },\n '&::after': {\n width: '100%'\n },\n [`${componentCls}-inner-text`]: {\n paddingInlineStart: sizePaddingEdgeHorizontal\n }\n },\n [`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: {\n '&::before': {\n width: '100%'\n },\n '&::after': {\n width: 0\n },\n [`${componentCls}-inner-text`]: {\n paddingInlineEnd: sizePaddingEdgeHorizontal\n }\n }\n })\n };\n};\nconst prepareComponentToken = token => ({\n textPaddingInline: '1em',\n orientationMargin: 0.05,\n verticalMarginInline: token.marginXS\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Divider', token => {\n const dividerToken = (0, _internal.mergeToken)(token, {\n dividerHorizontalWithTextGutterMargin: token.margin,\n dividerHorizontalGutterMargin: token.marginLG,\n sizePaddingEdgeHorizontal: 0\n });\n return [genSharedDividerStyle(dividerToken)];\n}, prepareComponentToken, {\n unitless: {\n orientationMargin: true\n }\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useClosable = _interopRequireWildcard(require(\"../_util/hooks/useClosable\"));\nvar _configProvider = require(\"../config-provider\");\nvar _skeleton = _interopRequireDefault(require(\"../skeleton\"));\nconst DrawerPanel = props => {\n var _a, _b;\n const {\n prefixCls,\n title,\n footer,\n extra,\n loading,\n onClose,\n headerStyle,\n bodyStyle,\n footerStyle,\n children,\n classNames: drawerClassNames,\n styles: drawerStyles\n } = props;\n const {\n drawer: drawerContext\n } = React.useContext(_configProvider.ConfigContext);\n const customCloseIconRender = React.useCallback(icon => (/*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: onClose,\n \"aria-label\": \"Close\",\n className: `${prefixCls}-close`\n }, icon)), [onClose]);\n const [mergedClosable, mergedCloseIcon] = (0, _useClosable.default)((0, _useClosable.pickClosable)(props), (0, _useClosable.pickClosable)(drawerContext), {\n closable: true,\n closeIconRender: customCloseIconRender\n });\n const headerNode = React.useMemo(() => {\n var _a, _b;\n if (!title && !mergedClosable) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n style: Object.assign(Object.assign(Object.assign({}, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _a === void 0 ? void 0 : _a.header), headerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.header),\n className: (0, _classnames.default)(`${prefixCls}-header`, {\n [`${prefixCls}-header-close-only`]: mergedClosable && !title && !extra\n }, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _b === void 0 ? void 0 : _b.header, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.header)\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-header-title`\n }, mergedCloseIcon, title && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title)), extra && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-extra`\n }, extra));\n }, [mergedClosable, mergedCloseIcon, extra, headerStyle, prefixCls, title]);\n const footerNode = React.useMemo(() => {\n var _a, _b;\n if (!footer) {\n return null;\n }\n const footerClassName = `${prefixCls}-footer`;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(footerClassName, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.footer, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.footer),\n style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _b === void 0 ? void 0 : _b.footer), footerStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.footer)\n }, footer);\n }, [footer, footerStyle, prefixCls]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, headerNode, /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-body`, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.body, (_a = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.classNames) === null || _a === void 0 ? void 0 : _a.body),\n style: Object.assign(Object.assign(Object.assign({}, (_b = drawerContext === null || drawerContext === void 0 ? void 0 : drawerContext.styles) === null || _b === void 0 ? void 0 : _b.body), bodyStyle), drawerStyles === null || drawerStyles === void 0 ? void 0 : drawerStyles.body)\n }, loading ? (/*#__PURE__*/React.createElement(_skeleton.default, {\n active: true,\n title: false,\n paragraph: {\n rows: 5\n },\n className: `${prefixCls}-body-skeleton`\n })) : children), footerNode);\n};\nvar _default = exports.default = DrawerPanel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcDrawer = _interopRequireDefault(require(\"rc-drawer\"));\nvar _ContextIsolator = _interopRequireDefault(require(\"../_util/ContextIsolator\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _warning = require(\"../_util/warning\");\nvar _zindexContext = _interopRequireDefault(require(\"../_util/zindexContext\"));\nvar _configProvider = require(\"../config-provider\");\nvar _context = require(\"../watermark/context\");\nvar _DrawerPanel = _interopRequireDefault(require(\"./DrawerPanel\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst _SizeTypes = ['default', 'large'];\nconst defaultPushState = {\n distance: 180\n};\nconst Drawer = props => {\n var _a;\n const {\n rootClassName,\n width,\n height,\n size = 'default',\n mask = true,\n push = defaultPushState,\n open,\n afterOpenChange,\n onClose,\n prefixCls: customizePrefixCls,\n getContainer: customizeGetContainer,\n style,\n className,\n // Deprecated\n visible,\n afterVisibleChange,\n maskStyle,\n drawerStyle,\n contentWrapperStyle\n } = props,\n rest = __rest(props, [\"rootClassName\", \"width\", \"height\", \"size\", \"mask\", \"push\", \"open\", \"afterOpenChange\", \"onClose\", \"prefixCls\", \"getContainer\", \"style\", \"className\", \"visible\", \"afterVisibleChange\", \"maskStyle\", \"drawerStyle\", \"contentWrapperStyle\"]);\n const {\n getPopupContainer,\n getPrefixCls,\n direction,\n drawer\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('drawer', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const getContainer =\n // 有可能为 false,所以不能直接判断\n customizeGetContainer === undefined && getPopupContainer ? () => getPopupContainer(document.body) : customizeGetContainer;\n const drawerClassName = (0, _classnames.default)({\n 'no-mask': !mask,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, rootClassName, hashId, cssVarCls);\n // ========================== Warning ===========================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Drawer');\n [['visible', 'open'], ['afterVisibleChange', 'afterOpenChange'], ['headerStyle', 'styles.header'], ['bodyStyle', 'styles.body'], ['footerStyle', 'styles.footer'], ['contentWrapperStyle', 'styles.wrapper'], ['maskStyle', 'styles.mask'], ['drawerStyle', 'styles.content']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n if (getContainer !== undefined && ((_a = props.style) === null || _a === void 0 ? void 0 : _a.position) === 'absolute') {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'breaking', '`style` is replaced by `rootStyle` in v5. Please check that `position: absolute` is necessary.') : void 0;\n }\n }\n // ============================ Size ============================\n const mergedWidth = React.useMemo(() => width !== null && width !== void 0 ? width : size === 'large' ? 736 : 378, [width, size]);\n const mergedHeight = React.useMemo(() => height !== null && height !== void 0 ? height : size === 'large' ? 736 : 378, [height, size]);\n // =========================== Motion ===========================\n const maskMotion = {\n motionName: (0, _motion.getTransitionName)(prefixCls, 'mask-motion'),\n motionAppear: true,\n motionEnter: true,\n motionLeave: true,\n motionDeadline: 500\n };\n const panelMotion = motionPlacement => ({\n motionName: (0, _motion.getTransitionName)(prefixCls, `panel-motion-${motionPlacement}`),\n motionAppear: true,\n motionEnter: true,\n motionLeave: true,\n motionDeadline: 500\n });\n // ============================ Refs ============================\n // Select `ant-modal-content` by `panelRef`\n const panelRef = (0, _context.usePanelRef)();\n // ============================ zIndex ============================\n const [zIndex, contextZIndex] = (0, _useZIndex.useZIndex)('Drawer', rest.zIndex);\n // =========================== Render ===========================\n const {\n classNames: propClassNames = {},\n styles: propStyles = {}\n } = rest;\n const {\n classNames: contextClassNames = {},\n styles: contextStyles = {}\n } = drawer || {};\n return wrapCSSVar(/*#__PURE__*/React.createElement(_ContextIsolator.default, {\n form: true,\n space: true\n }, /*#__PURE__*/React.createElement(_zindexContext.default.Provider, {\n value: contextZIndex\n }, /*#__PURE__*/React.createElement(_rcDrawer.default, Object.assign({\n prefixCls: prefixCls,\n onClose: onClose,\n maskMotion: maskMotion,\n motion: panelMotion\n }, rest, {\n classNames: {\n mask: (0, _classnames.default)(propClassNames.mask, contextClassNames.mask),\n content: (0, _classnames.default)(propClassNames.content, contextClassNames.content),\n wrapper: (0, _classnames.default)(propClassNames.wrapper, contextClassNames.wrapper)\n },\n styles: {\n mask: Object.assign(Object.assign(Object.assign({}, propStyles.mask), maskStyle), contextStyles.mask),\n content: Object.assign(Object.assign(Object.assign({}, propStyles.content), drawerStyle), contextStyles.content),\n wrapper: Object.assign(Object.assign(Object.assign({}, propStyles.wrapper), contentWrapperStyle), contextStyles.wrapper)\n },\n open: open !== null && open !== void 0 ? open : visible,\n mask: mask,\n push: push,\n width: mergedWidth,\n height: mergedHeight,\n style: Object.assign(Object.assign({}, drawer === null || drawer === void 0 ? void 0 : drawer.style), style),\n className: (0, _classnames.default)(drawer === null || drawer === void 0 ? void 0 : drawer.className, className),\n rootClassName: drawerClassName,\n getContainer: getContainer,\n afterOpenChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange,\n panelRef: panelRef,\n zIndex: zIndex\n }), /*#__PURE__*/React.createElement(_DrawerPanel.default, Object.assign({\n prefixCls: prefixCls\n }, rest, {\n onClose: onClose\n }))))));\n};\n/** @private Internal Component. Do not use in your production. */\nconst PurePanel = props => {\n const {\n prefixCls: customizePrefixCls,\n style,\n className,\n placement = 'right'\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"style\", \"className\", \"placement\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('drawer', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-pure`, `${prefixCls}-${placement}`, hashId, cssVarCls, className);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: cls,\n style: style\n }, /*#__PURE__*/React.createElement(_DrawerPanel.default, Object.assign({\n prefixCls: prefixCls\n }, restProps))));\n};\nDrawer._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nif (process.env.NODE_ENV !== 'production') {\n Drawer.displayName = 'Drawer';\n}\nvar _default = exports.default = Drawer;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nvar _motion = _interopRequireDefault(require(\"./motion\"));\n// =============================== Base ===============================\nconst genDrawerStyle = token => {\n const {\n borderRadiusSM,\n componentCls,\n zIndexPopup,\n colorBgMask,\n colorBgElevated,\n motionDurationSlow,\n motionDurationMid,\n paddingXS,\n padding,\n paddingLG,\n fontSizeLG,\n lineHeightLG,\n lineWidth,\n lineType,\n colorSplit,\n marginXS,\n colorIcon,\n colorIconHover,\n colorBgTextHover,\n colorBgTextActive,\n colorText,\n fontWeightStrong,\n footerPaddingBlock,\n footerPaddingInline,\n calc\n } = token;\n const wrapperCls = `${componentCls}-content-wrapper`;\n return {\n [componentCls]: {\n position: 'fixed',\n inset: 0,\n zIndex: zIndexPopup,\n pointerEvents: 'none',\n color: colorText,\n '&-pure': {\n position: 'relative',\n background: colorBgElevated,\n display: 'flex',\n flexDirection: 'column',\n [`&${componentCls}-left`]: {\n boxShadow: token.boxShadowDrawerLeft\n },\n [`&${componentCls}-right`]: {\n boxShadow: token.boxShadowDrawerRight\n },\n [`&${componentCls}-top`]: {\n boxShadow: token.boxShadowDrawerUp\n },\n [`&${componentCls}-bottom`]: {\n boxShadow: token.boxShadowDrawerDown\n }\n },\n '&-inline': {\n position: 'absolute'\n },\n // ====================== Mask ======================\n [`${componentCls}-mask`]: {\n position: 'absolute',\n inset: 0,\n zIndex: zIndexPopup,\n background: colorBgMask,\n pointerEvents: 'auto'\n },\n // ==================== Content =====================\n [wrapperCls]: {\n position: 'absolute',\n zIndex: zIndexPopup,\n maxWidth: '100vw',\n transition: `all ${motionDurationSlow}`,\n '&-hidden': {\n display: 'none'\n }\n },\n // Placement\n [`&-left > ${wrapperCls}`]: {\n top: 0,\n bottom: 0,\n left: {\n _skip_check_: true,\n value: 0\n },\n boxShadow: token.boxShadowDrawerLeft\n },\n [`&-right > ${wrapperCls}`]: {\n top: 0,\n right: {\n _skip_check_: true,\n value: 0\n },\n bottom: 0,\n boxShadow: token.boxShadowDrawerRight\n },\n [`&-top > ${wrapperCls}`]: {\n top: 0,\n insetInline: 0,\n boxShadow: token.boxShadowDrawerUp\n },\n [`&-bottom > ${wrapperCls}`]: {\n bottom: 0,\n insetInline: 0,\n boxShadow: token.boxShadowDrawerDown\n },\n [`${componentCls}-content`]: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n overflow: 'auto',\n background: colorBgElevated,\n pointerEvents: 'auto'\n },\n // Header\n [`${componentCls}-header`]: {\n display: 'flex',\n flex: 0,\n alignItems: 'center',\n padding: `${(0, _cssinjs.unit)(padding)} ${(0, _cssinjs.unit)(paddingLG)}`,\n fontSize: fontSizeLG,\n lineHeight: lineHeightLG,\n borderBottom: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,\n '&-title': {\n display: 'flex',\n flex: 1,\n alignItems: 'center',\n minWidth: 0,\n minHeight: 0\n }\n },\n [`${componentCls}-extra`]: {\n flex: 'none'\n },\n [`${componentCls}-close`]: Object.assign({\n display: 'inline-flex',\n width: calc(fontSizeLG).add(paddingXS).equal(),\n height: calc(fontSizeLG).add(paddingXS).equal(),\n borderRadius: borderRadiusSM,\n justifyContent: 'center',\n alignItems: 'center',\n marginInlineEnd: marginXS,\n color: colorIcon,\n fontWeight: fontWeightStrong,\n fontSize: fontSizeLG,\n fontStyle: 'normal',\n lineHeight: 1,\n textAlign: 'center',\n textTransform: 'none',\n textDecoration: 'none',\n background: 'transparent',\n border: 0,\n cursor: 'pointer',\n transition: `all ${motionDurationMid}`,\n textRendering: 'auto',\n '&:hover': {\n color: colorIconHover,\n backgroundColor: colorBgTextHover,\n textDecoration: 'none'\n },\n '&:active': {\n backgroundColor: colorBgTextActive\n }\n }, (0, _style.genFocusStyle)(token)),\n [`${componentCls}-title`]: {\n flex: 1,\n margin: 0,\n fontWeight: token.fontWeightStrong,\n fontSize: fontSizeLG,\n lineHeight: lineHeightLG\n },\n // Body\n [`${componentCls}-body`]: {\n flex: 1,\n minWidth: 0,\n minHeight: 0,\n padding: paddingLG,\n overflow: 'auto',\n [`${componentCls}-body-skeleton`]: {\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center'\n }\n },\n // Footer\n [`${componentCls}-footer`]: {\n flexShrink: 0,\n padding: `${(0, _cssinjs.unit)(footerPaddingBlock)} ${(0, _cssinjs.unit)(footerPaddingInline)}`,\n borderTop: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`\n },\n // ====================== RTL =======================\n '&-rtl': {\n direction: 'rtl'\n }\n }\n };\n};\nconst prepareComponentToken = token => ({\n zIndexPopup: token.zIndexPopupBase,\n footerPaddingBlock: token.paddingXS,\n footerPaddingInline: token.padding\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Drawer', token => {\n const drawerToken = (0, _internal.mergeToken)(token, {});\n return [genDrawerStyle(drawerToken), (0, _motion.default)(drawerToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst getMoveTranslate = direction => {\n const value = '100%';\n return {\n left: `translateX(-${value})`,\n right: `translateX(${value})`,\n top: `translateY(-${value})`,\n bottom: `translateY(${value})`\n }[direction];\n};\nconst getEnterLeaveStyle = (startStyle, endStyle) => ({\n '&-enter, &-appear': Object.assign(Object.assign({}, startStyle), {\n '&-active': endStyle\n }),\n '&-leave': Object.assign(Object.assign({}, endStyle), {\n '&-active': startStyle\n })\n});\nconst getFadeStyle = (from, duration) => Object.assign({\n '&-enter, &-appear, &-leave': {\n '&-start': {\n transition: 'none'\n },\n '&-active': {\n transition: `all ${duration}`\n }\n }\n}, getEnterLeaveStyle({\n opacity: from\n}, {\n opacity: 1\n}));\nconst getPanelMotionStyles = (direction, duration) => [getFadeStyle(0.7, duration), getEnterLeaveStyle({\n transform: getMoveTranslate(direction)\n}, {\n transform: 'none'\n})];\nconst genMotionStyle = token => {\n const {\n componentCls,\n motionDurationSlow\n } = token;\n return {\n [componentCls]: {\n // ======================== Mask ========================\n [`${componentCls}-mask-motion`]: getFadeStyle(0, motionDurationSlow),\n // ======================= Panel ========================\n [`${componentCls}-panel-motion`]: ['left', 'right', 'top', 'bottom'].reduce((obj, direction) => Object.assign(Object.assign({}, obj), {\n [`&-${direction}`]: getPanelMotionStyles(direction, motionDurationSlow)\n }), {})\n }\n };\n};\nvar _default = exports.default = genMotionStyle;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _EllipsisOutlined = _interopRequireDefault(require(\"@ant-design/icons/EllipsisOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _button = _interopRequireDefault(require(\"../button\"));\nvar _configProvider = require(\"../config-provider\");\nvar _space = _interopRequireDefault(require(\"../space\"));\nvar _Compact = require(\"../space/Compact\");\nvar _dropdown = _interopRequireDefault(require(\"./dropdown\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst DropdownButton = props => {\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n type = 'default',\n danger,\n disabled,\n loading,\n onClick,\n htmlType,\n children,\n className,\n menu,\n arrow,\n autoFocus,\n overlay,\n trigger,\n align,\n open,\n onOpenChange,\n placement,\n getPopupContainer,\n href,\n icon = /*#__PURE__*/React.createElement(_EllipsisOutlined.default, null),\n title,\n buttonsRender = buttons => buttons,\n mouseEnterDelay,\n mouseLeaveDelay,\n overlayClassName,\n overlayStyle,\n destroyPopupOnHide,\n dropdownRender\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"type\", \"danger\", \"disabled\", \"loading\", \"onClick\", \"htmlType\", \"children\", \"className\", \"menu\", \"arrow\", \"autoFocus\", \"overlay\", \"trigger\", \"align\", \"open\", \"onOpenChange\", \"placement\", \"getPopupContainer\", \"href\", \"icon\", \"title\", \"buttonsRender\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"overlayClassName\", \"overlayStyle\", \"destroyPopupOnHide\", \"dropdownRender\"]);\n const prefixCls = getPrefixCls('dropdown', customizePrefixCls);\n const buttonPrefixCls = `${prefixCls}-button`;\n const dropdownProps = {\n menu,\n arrow,\n autoFocus,\n align,\n disabled,\n trigger: disabled ? [] : trigger,\n onOpenChange,\n getPopupContainer: getPopupContainer || getContextPopupContainer,\n mouseEnterDelay,\n mouseLeaveDelay,\n overlayClassName,\n overlayStyle,\n destroyPopupOnHide,\n dropdownRender\n };\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n const classes = (0, _classnames.default)(buttonPrefixCls, compactItemClassnames, className);\n if ('overlay' in props) {\n dropdownProps.overlay = overlay;\n }\n if ('open' in props) {\n dropdownProps.open = open;\n }\n if ('placement' in props) {\n dropdownProps.placement = placement;\n } else {\n dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';\n }\n const leftButton = /*#__PURE__*/React.createElement(_button.default, {\n type: type,\n danger: danger,\n disabled: disabled,\n loading: loading,\n onClick: onClick,\n htmlType: htmlType,\n href: href,\n title: title\n }, children);\n const rightButton = /*#__PURE__*/React.createElement(_button.default, {\n type: type,\n danger: danger,\n icon: icon\n });\n const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]);\n return /*#__PURE__*/React.createElement(_space.default.Compact, Object.assign({\n className: classes,\n size: compactSize,\n block: true\n }, restProps), leftButtonToRender, /*#__PURE__*/React.createElement(_dropdown.default, Object.assign({}, dropdownProps), rightButtonToRender));\n};\nDropdownButton.__ANT_BUTTON = true;\nvar _default = exports.default = DropdownButton;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _RightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RightOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcDropdown = _interopRequireDefault(require(\"rc-dropdown\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _placements = _interopRequireDefault(require(\"../_util/placements\"));\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _warning = require(\"../_util/warning\");\nvar _zindexContext = _interopRequireDefault(require(\"../_util/zindexContext\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _menu = _interopRequireDefault(require(\"../menu\"));\nvar _OverrideContext = require(\"../menu/OverrideContext\");\nvar _internal = require(\"../theme/internal\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst _Placements = ['topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight', 'top', 'bottom'];\nconst Dropdown = props => {\n var _a;\n const {\n menu,\n arrow,\n prefixCls: customizePrefixCls,\n children,\n trigger,\n disabled,\n dropdownRender,\n getPopupContainer,\n overlayClassName,\n rootClassName,\n overlayStyle,\n open,\n onOpenChange,\n // Deprecated\n visible,\n onVisibleChange,\n mouseEnterDelay = 0.15,\n mouseLeaveDelay = 0.1,\n autoAdjustOverflow = true,\n placement = '',\n overlay,\n transitionName\n } = props;\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n direction,\n dropdown\n } = React.useContext(_configProvider.ConfigContext);\n // Warning for deprecated usage\n const warning = (0, _warning.devUseWarning)('Dropdown');\n if (process.env.NODE_ENV !== 'production') {\n [['visible', 'open'], ['onVisibleChange', 'onOpenChange']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n warning.deprecated(!('overlay' in props), 'overlay', 'menu');\n }\n const memoTransitionName = React.useMemo(() => {\n const rootPrefixCls = getPrefixCls();\n if (transitionName !== undefined) {\n return transitionName;\n }\n if (placement.includes('top')) {\n return `${rootPrefixCls}-slide-down`;\n }\n return `${rootPrefixCls}-slide-up`;\n }, [getPrefixCls, placement, transitionName]);\n const memoPlacement = React.useMemo(() => {\n if (!placement) {\n return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';\n }\n if (placement.includes('Center')) {\n return placement.slice(0, placement.indexOf('Center'));\n }\n return placement;\n }, [placement, direction]);\n if (process.env.NODE_ENV !== 'production') {\n if (placement.includes('Center')) {\n const newPlacement = placement.slice(0, placement.indexOf('Center'));\n process.env.NODE_ENV !== \"production\" ? warning(!placement.includes('Center'), 'deprecated', `You are using '${placement}' placement in Dropdown, which is deprecated. Try to use '${newPlacement}' instead.`) : void 0;\n }\n [['visible', 'open'], ['onVisibleChange', 'onOpenChange']].forEach(_ref2 => {\n let [deprecatedName, newName] = _ref2;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n }\n const prefixCls = getPrefixCls('dropdown', customizePrefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const [, token] = (0, _internal.useToken)();\n const child = React.Children.only(children);\n const dropdownTrigger = (0, _reactNode.cloneElement)(child, {\n className: (0, _classnames.default)(`${prefixCls}-trigger`, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, child.props.className),\n disabled: (_a = child.props.disabled) !== null && _a !== void 0 ? _a : disabled\n });\n const triggerActions = disabled ? [] : trigger;\n const alignPoint = !!(triggerActions === null || triggerActions === void 0 ? void 0 : triggerActions.includes('contextMenu'));\n // =========================== Open ============================\n const [mergedOpen, setOpen] = (0, _useMergedState.default)(false, {\n value: open !== null && open !== void 0 ? open : visible\n });\n const onInnerOpenChange = (0, _useEvent.default)(nextOpen => {\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen, {\n source: 'trigger'\n });\n onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(nextOpen);\n setOpen(nextOpen);\n });\n // =========================== Overlay ============================\n const overlayClassNameCustomized = (0, _classnames.default)(overlayClassName, rootClassName, hashId, cssVarCls, rootCls, dropdown === null || dropdown === void 0 ? void 0 : dropdown.className, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n const builtinPlacements = (0, _placements.default)({\n arrowPointAtCenter: typeof arrow === 'object' && arrow.pointAtCenter,\n autoAdjustOverflow,\n offset: token.marginXXS,\n arrowWidth: arrow ? token.sizePopupArrow : 0,\n borderRadius: token.borderRadius\n });\n const onMenuClick = React.useCallback(() => {\n if ((menu === null || menu === void 0 ? void 0 : menu.selectable) && (menu === null || menu === void 0 ? void 0 : menu.multiple)) {\n return;\n }\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false, {\n source: 'menu'\n });\n setOpen(false);\n }, [menu === null || menu === void 0 ? void 0 : menu.selectable, menu === null || menu === void 0 ? void 0 : menu.multiple]);\n const renderOverlay = () => {\n // rc-dropdown already can process the function of overlay, but we have check logic here.\n // So we need render the element to check and pass back to rc-dropdown.\n let overlayNode;\n if (menu === null || menu === void 0 ? void 0 : menu.items) {\n overlayNode = /*#__PURE__*/React.createElement(_menu.default, Object.assign({}, menu));\n } else if (typeof overlay === 'function') {\n overlayNode = overlay();\n } else {\n overlayNode = overlay;\n }\n if (dropdownRender) {\n overlayNode = dropdownRender(overlayNode);\n }\n overlayNode = React.Children.only(typeof overlayNode === 'string' ? /*#__PURE__*/React.createElement(\"span\", null, overlayNode) : overlayNode);\n return /*#__PURE__*/React.createElement(_OverrideContext.OverrideProvider, {\n prefixCls: `${prefixCls}-menu`,\n rootClassName: (0, _classnames.default)(cssVarCls, rootCls),\n expandIcon: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-menu-submenu-arrow`\n }, /*#__PURE__*/React.createElement(_RightOutlined.default, {\n className: `${prefixCls}-menu-submenu-arrow-icon`\n })),\n mode: \"vertical\",\n selectable: false,\n onClick: onMenuClick,\n validator: _ref3 => {\n let {\n mode\n } = _ref3;\n // Warning if use other mode\n process.env.NODE_ENV !== \"production\" ? warning(!mode || mode === 'vertical', 'usage', `mode=\"${mode}\" is not supported for Dropdown's Menu.`) : void 0;\n }\n }, overlayNode);\n };\n // =========================== zIndex ============================\n const [zIndex, contextZIndex] = (0, _useZIndex.useZIndex)('Dropdown', overlayStyle === null || overlayStyle === void 0 ? void 0 : overlayStyle.zIndex);\n // ============================ Render ============================\n let renderNode = /*#__PURE__*/React.createElement(_rcDropdown.default, Object.assign({\n alignPoint: alignPoint\n }, (0, _omit.default)(props, ['rootClassName']), {\n mouseEnterDelay: mouseEnterDelay,\n mouseLeaveDelay: mouseLeaveDelay,\n visible: mergedOpen,\n builtinPlacements: builtinPlacements,\n arrow: !!arrow,\n overlayClassName: overlayClassNameCustomized,\n prefixCls: prefixCls,\n getPopupContainer: getPopupContainer || getContextPopupContainer,\n transitionName: memoTransitionName,\n trigger: triggerActions,\n overlay: renderOverlay,\n placement: memoPlacement,\n onVisibleChange: onInnerOpenChange,\n overlayStyle: Object.assign(Object.assign(Object.assign({}, dropdown === null || dropdown === void 0 ? void 0 : dropdown.style), overlayStyle), {\n zIndex\n })\n }), dropdownTrigger);\n if (zIndex) {\n renderNode = /*#__PURE__*/React.createElement(_zindexContext.default.Provider, {\n value: contextZIndex\n }, renderNode);\n }\n return wrapCSSVar(renderNode);\n};\nfunction postPureProps(props) {\n return Object.assign(Object.assign({}, props), {\n align: {\n overflow: {\n adjustX: false,\n adjustY: false\n }\n }\n });\n}\n// We don't care debug panel\nconst PurePanel = (0, _PurePanel.default)(Dropdown, 'dropdown', prefixCls => prefixCls, postPureProps);\n/* istanbul ignore next */\nconst WrapPurePanel = props => (/*#__PURE__*/React.createElement(PurePanel, Object.assign({}, props), /*#__PURE__*/React.createElement(\"span\", null)));\nDropdown._InternalPanelDoNotUseOrYouWillBeFired = WrapPurePanel;\nif (process.env.NODE_ENV !== 'production') {\n Dropdown.displayName = 'Dropdown';\n}\nvar _default = exports.default = Dropdown;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _dropdown = _interopRequireDefault(require(\"./dropdown\"));\nvar _dropdownButton = _interopRequireDefault(require(\"./dropdown-button\"));\nconst Dropdown = _dropdown.default;\nDropdown.Button = _dropdownButton.default;\nvar _default = exports.default = Dropdown;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _placementArrow = _interopRequireWildcard(require(\"../../style/placementArrow\"));\nvar _roundedArrow = require(\"../../style/roundedArrow\");\nvar _internal = require(\"../../theme/internal\");\nvar _status = _interopRequireDefault(require(\"./status\"));\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n menuCls,\n zIndexPopup,\n dropdownArrowDistance,\n sizePopupArrow,\n antCls,\n iconCls,\n motionDurationMid,\n paddingBlock,\n fontSize,\n dropdownEdgeChildPadding,\n colorTextDisabled,\n fontSizeIcon,\n controlPaddingHorizontal,\n colorBgElevated\n } = token;\n return [{\n [componentCls]: {\n position: 'absolute',\n top: -9999,\n left: {\n _skip_check_: true,\n value: -9999\n },\n zIndex: zIndexPopup,\n display: 'block',\n // A placeholder out of dropdown visible range to avoid close when user moving\n '&::before': {\n position: 'absolute',\n insetBlock: token.calc(sizePopupArrow).div(2).sub(dropdownArrowDistance).equal(),\n // insetInlineStart: -7, // FIXME: Seems not work for hidden element\n zIndex: -9999,\n opacity: 0.0001,\n content: '\"\"'\n },\n // Makes vertical dropdowns have a scrollbar once they become taller than the viewport.\n '&-menu-vertical': {\n maxHeight: '100vh',\n overflowY: 'auto'\n },\n [`&-trigger${antCls}-btn`]: {\n [`& > ${iconCls}-down, & > ${antCls}-btn-icon > ${iconCls}-down`]: {\n fontSize: fontSizeIcon\n }\n },\n [`${componentCls}-wrap`]: {\n position: 'relative',\n [`${antCls}-btn > ${iconCls}-down`]: {\n fontSize: fontSizeIcon\n },\n [`${iconCls}-down::before`]: {\n transition: `transform ${motionDurationMid}`\n }\n },\n [`${componentCls}-wrap-open`]: {\n [`${iconCls}-down::before`]: {\n transform: `rotate(180deg)`\n }\n },\n [`\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n `]: {\n display: 'none'\n },\n // =============================================================\n // == Motion ==\n // =============================================================\n // When position is not enough for dropdown, the placement will revert.\n // We will handle this with revert motion name.\n [`&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomLeft,\n &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomLeft,\n &${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottom,\n &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottom,\n &${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomRight,\n &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomRight`]: {\n animationName: _motion.slideUpIn\n },\n [`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topLeft,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topLeft,\n &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-top,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-top,\n &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topRight,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topRight`]: {\n animationName: _motion.slideDownIn\n },\n [`&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomLeft,\n &${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottom,\n &${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomRight`]: {\n animationName: _motion.slideUpOut\n },\n [`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topLeft,\n &${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-top,\n &${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topRight`]: {\n animationName: _motion.slideDownOut\n }\n }\n },\n // =============================================================\n // == Arrow style ==\n // =============================================================\n (0, _placementArrow.default)(token, colorBgElevated, {\n arrowPlacement: {\n top: true,\n bottom: true\n }\n }), {\n // =============================================================\n // == Menu ==\n // =============================================================\n [`${componentCls} ${menuCls}`]: {\n position: 'relative',\n margin: 0\n },\n [`${menuCls}-submenu-popup`]: {\n position: 'absolute',\n zIndex: zIndexPopup,\n background: 'transparent',\n boxShadow: 'none',\n transformOrigin: '0 0',\n 'ul, li': {\n listStyle: 'none',\n margin: 0\n }\n },\n [`${componentCls}, ${componentCls}-menu-submenu`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n [menuCls]: Object.assign(Object.assign({\n padding: dropdownEdgeChildPadding,\n listStyleType: 'none',\n backgroundColor: colorBgElevated,\n backgroundClip: 'padding-box',\n borderRadius: token.borderRadiusLG,\n outline: 'none',\n boxShadow: token.boxShadowSecondary\n }, (0, _style.genFocusStyle)(token)), {\n '&:empty': {\n padding: 0,\n boxShadow: 'none'\n },\n [`${menuCls}-item-group-title`]: {\n padding: `${(0, _cssinjs.unit)(paddingBlock)} ${(0, _cssinjs.unit)(controlPaddingHorizontal)}`,\n color: token.colorTextDescription,\n transition: `all ${motionDurationMid}`\n },\n // ======================= Item Content =======================\n [`${menuCls}-item`]: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center'\n },\n [`${menuCls}-item-icon`]: {\n minWidth: fontSize,\n marginInlineEnd: token.marginXS,\n fontSize: token.fontSizeSM\n },\n [`${menuCls}-title-content`]: {\n display: 'flex',\n alignItems: 'center',\n flex: 'auto',\n '> a': {\n color: 'inherit',\n transition: `all ${motionDurationMid}`,\n '&:hover': {\n color: 'inherit'\n },\n '&::after': {\n position: 'absolute',\n inset: 0,\n content: '\"\"'\n }\n },\n [`${menuCls}-item-extra`]: {\n paddingInlineStart: token.padding,\n marginInlineStart: 'auto',\n fontSize: token.fontSizeSM,\n color: token.colorTextDescription\n }\n },\n // =========================== Item ===========================\n [`${menuCls}-item, ${menuCls}-submenu-title`]: Object.assign(Object.assign({\n display: 'flex',\n margin: 0,\n padding: `${(0, _cssinjs.unit)(paddingBlock)} ${(0, _cssinjs.unit)(controlPaddingHorizontal)}`,\n color: token.colorText,\n fontWeight: 'normal',\n fontSize,\n lineHeight: token.lineHeight,\n cursor: 'pointer',\n transition: `all ${motionDurationMid}`,\n borderRadius: token.borderRadiusSM,\n '&:hover, &-active': {\n backgroundColor: token.controlItemBgHover\n }\n }, (0, _style.genFocusStyle)(token)), {\n '&-selected': {\n color: token.colorPrimary,\n backgroundColor: token.controlItemBgActive,\n '&:hover, &-active': {\n backgroundColor: token.controlItemBgActiveHover\n }\n },\n '&-disabled': {\n color: colorTextDisabled,\n cursor: 'not-allowed',\n '&:hover': {\n color: colorTextDisabled,\n backgroundColor: colorBgElevated,\n cursor: 'not-allowed'\n },\n a: {\n pointerEvents: 'none'\n }\n },\n '&-divider': {\n height: 1,\n // By design\n margin: `${(0, _cssinjs.unit)(token.marginXXS)} 0`,\n overflow: 'hidden',\n lineHeight: 0,\n backgroundColor: token.colorSplit\n },\n [`${componentCls}-menu-submenu-expand-icon`]: {\n position: 'absolute',\n insetInlineEnd: token.paddingXS,\n [`${componentCls}-menu-submenu-arrow-icon`]: {\n marginInlineEnd: '0 !important',\n color: token.colorTextDescription,\n fontSize: fontSizeIcon,\n fontStyle: 'normal'\n }\n }\n }),\n [`${menuCls}-item-group-list`]: {\n margin: `0 ${(0, _cssinjs.unit)(token.marginXS)}`,\n padding: 0,\n listStyle: 'none'\n },\n [`${menuCls}-submenu-title`]: {\n paddingInlineEnd: token.calc(controlPaddingHorizontal).add(token.fontSizeSM).equal()\n },\n [`${menuCls}-submenu-vertical`]: {\n position: 'relative'\n },\n [`${menuCls}-submenu${menuCls}-submenu-disabled ${componentCls}-menu-submenu-title`]: {\n [`&, ${componentCls}-menu-submenu-arrow-icon`]: {\n color: colorTextDisabled,\n backgroundColor: colorBgElevated,\n cursor: 'not-allowed'\n }\n },\n // https://github.com/ant-design/ant-design/issues/19264\n [`${menuCls}-submenu-selected ${componentCls}-menu-submenu-title`]: {\n color: token.colorPrimary\n }\n })\n })\n },\n // Follow code may reuse in other components\n [(0, _motion.initSlideMotion)(token, 'slide-up'), (0, _motion.initSlideMotion)(token, 'slide-down'), (0, _motion.initMoveMotion)(token, 'move-up'), (0, _motion.initMoveMotion)(token, 'move-down'), (0, _motion.initZoomMotion)(token, 'zoom-big')]];\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => Object.assign(Object.assign({\n zIndexPopup: token.zIndexPopupBase + 50,\n paddingBlock: (token.controlHeight - token.fontSize * token.lineHeight) / 2\n}, (0, _placementArrow.getArrowOffsetToken)({\n contentRadius: token.borderRadiusLG,\n limitVerticalRadius: true\n})), (0, _roundedArrow.getArrowToken)(token));\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Dropdown', token => {\n const {\n marginXXS,\n sizePopupArrow,\n paddingXXS,\n componentCls\n } = token;\n const dropdownToken = (0, _internal.mergeToken)(token, {\n menuCls: `${componentCls}-menu`,\n dropdownArrowDistance: token.calc(sizePopupArrow).div(2).add(marginXXS).equal(),\n dropdownEdgeChildPadding: paddingXXS\n });\n return [genBaseStyle(dropdownToken), (0, _status.default)(dropdownToken)];\n}, prepareComponentToken, {\n resetStyle: false\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genStatusStyle = token => {\n const {\n componentCls,\n menuCls,\n colorError,\n colorTextLightSolid\n } = token;\n const itemCls = `${menuCls}-item`;\n return {\n [`${componentCls}, ${componentCls}-menu-submenu`]: {\n [`${menuCls} ${itemCls}`]: {\n [`&${itemCls}-danger:not(${itemCls}-disabled)`]: {\n color: colorError,\n '&:hover': {\n color: colorTextLightSolid,\n backgroundColor: colorError\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = genStatusStyle;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _locale = require(\"../locale\");\nvar _internal = require(\"../theme/internal\");\nconst Empty = () => {\n const [, token] = (0, _internal.useToken)();\n const [locale] = (0, _locale.useLocale)('Empty');\n const bgColor = new _tinycolor.TinyColor(token.colorBgBase);\n // Dark Theme need more dark of this\n const themeStyle = bgColor.toHsl().l < 0.5 ? {\n opacity: 0.65\n } : {};\n return /*#__PURE__*/React.createElement(\"svg\", {\n style: themeStyle,\n width: \"184\",\n height: \"152\",\n viewBox: \"0 0 184 152\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, /*#__PURE__*/React.createElement(\"title\", null, (locale === null || locale === void 0 ? void 0 : locale.description) || 'Empty'), /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(24 31.67)\"\n }, /*#__PURE__*/React.createElement(\"ellipse\", {\n fillOpacity: \".8\",\n fill: \"#F5F5F7\",\n cx: \"67.797\",\n cy: \"106.89\",\n rx: \"67.797\",\n ry: \"12.668\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z\",\n fill: \"#AEB8C2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z\",\n fill: \"url(#linearGradient-1)\",\n transform: \"translate(13.56)\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z\",\n fill: \"#F5F5F7\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z\",\n fill: \"#DCE0E6\"\n })), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z\",\n fill: \"#DCE0E6\"\n }), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(149.65 15.383)\",\n fill: \"#FFF\"\n }, /*#__PURE__*/React.createElement(\"ellipse\", {\n cx: \"20.654\",\n cy: \"3.167\",\n rx: \"2.849\",\n ry: \"2.815\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z\"\n }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Empty.displayName = 'EmptyImage';\n}\nvar _default = exports.default = Empty;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar _locale = require(\"../locale\");\nvar _empty = _interopRequireDefault(require(\"./empty\"));\nvar _simple = _interopRequireDefault(require(\"./simple\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst defaultEmptyImg = /*#__PURE__*/React.createElement(_empty.default, null);\nconst simpleEmptyImg = /*#__PURE__*/React.createElement(_simple.default, null);\nconst Empty = _a => {\n var {\n className,\n rootClassName,\n prefixCls: customizePrefixCls,\n image = defaultEmptyImg,\n description,\n children,\n imageStyle,\n style\n } = _a,\n restProps = __rest(_a, [\"className\", \"rootClassName\", \"prefixCls\", \"image\", \"description\", \"children\", \"imageStyle\", \"style\"]);\n const {\n getPrefixCls,\n direction,\n empty\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('empty', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const [locale] = (0, _locale.useLocale)('Empty');\n const des = typeof description !== 'undefined' ? description : locale === null || locale === void 0 ? void 0 : locale.description;\n const alt = typeof des === 'string' ? des : 'empty';\n let imageNode = null;\n if (typeof image === 'string') {\n imageNode = /*#__PURE__*/React.createElement(\"img\", {\n alt: alt,\n src: image\n });\n } else {\n imageNode = image;\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: (0, _classnames.default)(hashId, cssVarCls, prefixCls, empty === null || empty === void 0 ? void 0 : empty.className, {\n [`${prefixCls}-normal`]: image === simpleEmptyImg,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName),\n style: Object.assign(Object.assign({}, empty === null || empty === void 0 ? void 0 : empty.style), style)\n }, restProps), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-image`,\n style: imageStyle\n }, imageNode), des && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, des), children && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-footer`\n }, children)));\n};\nEmpty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg;\nEmpty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg;\nif (process.env.NODE_ENV !== 'production') {\n Empty.displayName = 'Empty';\n}\nvar _default = exports.default = Empty;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _internal = require(\"../theme/internal\");\nvar _locale = require(\"../locale\");\nconst Simple = () => {\n const [, token] = (0, _internal.useToken)();\n const [locale] = (0, _locale.useLocale)('Empty');\n const {\n colorFill,\n colorFillTertiary,\n colorFillQuaternary,\n colorBgContainer\n } = token;\n const {\n borderColor,\n shadowColor,\n contentColor\n } = (0, _react.useMemo)(() => ({\n borderColor: new _tinycolor.TinyColor(colorFill).onBackground(colorBgContainer).toHexShortString(),\n shadowColor: new _tinycolor.TinyColor(colorFillTertiary).onBackground(colorBgContainer).toHexShortString(),\n contentColor: new _tinycolor.TinyColor(colorFillQuaternary).onBackground(colorBgContainer).toHexShortString()\n }), [colorFill, colorFillTertiary, colorFillQuaternary, colorBgContainer]);\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"64\",\n height: \"41\",\n viewBox: \"0 0 64 41\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, /*#__PURE__*/React.createElement(\"title\", null, (locale === null || locale === void 0 ? void 0 : locale.description) || 'Empty'), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 1)\",\n fill: \"none\",\n fillRule: \"evenodd\"\n }, /*#__PURE__*/React.createElement(\"ellipse\", {\n fill: shadowColor,\n cx: \"32\",\n cy: \"33\",\n rx: \"32\",\n ry: \"7\"\n }), /*#__PURE__*/React.createElement(\"g\", {\n fillRule: \"nonzero\",\n stroke: borderColor\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z\",\n fill: contentColor\n }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Simple.displayName = 'SimpleImage';\n}\nvar _default = exports.default = Simple;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\n// ============================== Shared ==============================\nconst genSharedEmptyStyle = token => {\n const {\n componentCls,\n margin,\n marginXS,\n marginXL,\n fontSize,\n lineHeight\n } = token;\n return {\n [componentCls]: {\n marginInline: marginXS,\n fontSize,\n lineHeight,\n textAlign: 'center',\n // 原来 &-image 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构\n [`${componentCls}-image`]: {\n height: token.emptyImgHeight,\n marginBottom: marginXS,\n opacity: token.opacityImage,\n img: {\n height: '100%'\n },\n svg: {\n maxWidth: '100%',\n height: '100%',\n margin: 'auto'\n }\n },\n [`${componentCls}-description`]: {\n color: token.colorTextDescription\n },\n // 原来 &-footer 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构\n [`${componentCls}-footer`]: {\n marginTop: margin\n },\n '&-normal': {\n marginBlock: marginXL,\n color: token.colorTextDescription,\n [`${componentCls}-description`]: {\n color: token.colorTextDescription\n },\n [`${componentCls}-image`]: {\n height: token.emptyImgHeightMD\n }\n },\n '&-small': {\n marginBlock: marginXS,\n color: token.colorTextDescription,\n [`${componentCls}-image`]: {\n height: token.emptyImgHeightSM\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genStyleHooks)('Empty', token => {\n const {\n componentCls,\n controlHeightLG,\n calc\n } = token;\n const emptyToken = (0, _internal.mergeToken)(token, {\n emptyImgCls: `${componentCls}-img`,\n emptyImgHeight: calc(controlHeightLG).mul(2.5).equal(),\n emptyImgHeightMD: controlHeightLG,\n emptyImgHeightSM: calc(controlHeightLG).mul(0.875).equal()\n });\n return [genSharedEmptyStyle(emptyToken)];\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _gapSize = require(\"../_util/gapSize\");\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _utils = _interopRequireDefault(require(\"./utils\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Flex = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n rootClassName,\n className,\n style,\n flex,\n gap,\n children,\n vertical = false,\n component: Component = 'div'\n } = props,\n othersProps = __rest(props, [\"prefixCls\", \"rootClassName\", \"className\", \"style\", \"flex\", \"gap\", \"children\", \"vertical\", \"component\"]);\n const {\n flex: ctxFlex,\n direction: ctxDirection,\n getPrefixCls\n } = _react.default.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('flex', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const mergedVertical = vertical !== null && vertical !== void 0 ? vertical : ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.vertical;\n const mergedCls = (0, _classnames.default)(className, rootClassName, ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.className, prefixCls, hashId, cssVarCls, (0, _utils.default)(prefixCls, props), {\n [`${prefixCls}-rtl`]: ctxDirection === 'rtl',\n [`${prefixCls}-gap-${gap}`]: (0, _gapSize.isPresetSize)(gap),\n [`${prefixCls}-vertical`]: mergedVertical\n });\n const mergedStyle = Object.assign(Object.assign({}, ctxFlex === null || ctxFlex === void 0 ? void 0 : ctxFlex.style), style);\n if (flex) {\n mergedStyle.flex = flex;\n }\n if (gap && !(0, _gapSize.isPresetSize)(gap)) {\n mergedStyle.gap = gap;\n }\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(Component, Object.assign({\n ref: ref,\n className: mergedCls,\n style: mergedStyle\n }, (0, _omit.default)(othersProps, ['justify', 'wrap', 'align'])), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n Flex.displayName = 'Flex';\n}\nvar _default = exports.default = Flex;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\nvar _utils = require(\"../utils\");\nconst genFlexStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: {\n display: 'flex',\n '&-vertical': {\n flexDirection: 'column'\n },\n '&-rtl': {\n direction: 'rtl'\n },\n '&:empty': {\n display: 'none'\n }\n }\n };\n};\nconst genFlexGapStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: {\n '&-gap-small': {\n gap: token.flexGapSM\n },\n '&-gap-middle': {\n gap: token.flexGap\n },\n '&-gap-large': {\n gap: token.flexGapLG\n }\n }\n };\n};\nconst genFlexWrapStyle = token => {\n const {\n componentCls\n } = token;\n const wrapStyle = {};\n _utils.flexWrapValues.forEach(value => {\n wrapStyle[`${componentCls}-wrap-${value}`] = {\n flexWrap: value\n };\n });\n return wrapStyle;\n};\nconst genAlignItemsStyle = token => {\n const {\n componentCls\n } = token;\n const alignStyle = {};\n _utils.alignItemsValues.forEach(value => {\n alignStyle[`${componentCls}-align-${value}`] = {\n alignItems: value\n };\n });\n return alignStyle;\n};\nconst genJustifyContentStyle = token => {\n const {\n componentCls\n } = token;\n const justifyStyle = {};\n _utils.justifyContentValues.forEach(value => {\n justifyStyle[`${componentCls}-justify-${value}`] = {\n justifyContent: value\n };\n });\n return justifyStyle;\n};\nconst prepareComponentToken = () => ({});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Flex', token => {\n const {\n paddingXS,\n padding,\n paddingLG\n } = token;\n const flexToken = (0, _internal.mergeToken)(token, {\n flexGapSM: paddingXS,\n flexGap: padding,\n flexGapLG: paddingLG\n });\n return [genFlexStyle(flexToken), genFlexGapStyle(flexToken), genFlexWrapStyle(flexToken), genAlignItemsStyle(flexToken), genJustifyContentStyle(flexToken)];\n}, prepareComponentToken, {\n // Flex component don't apply extra font style\n // https://github.com/ant-design/ant-design/issues/46403\n resetStyle: false\n});","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.justifyContentValues = exports.flexWrapValues = exports.default = exports.alignItemsValues = void 0;\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst flexWrapValues = exports.flexWrapValues = ['wrap', 'nowrap', 'wrap-reverse'];\nconst justifyContentValues = exports.justifyContentValues = ['flex-start', 'flex-end', 'start', 'end', 'center', 'space-between', 'space-around', 'space-evenly', 'stretch', 'normal', 'left', 'right'];\nconst alignItemsValues = exports.alignItemsValues = ['center', 'start', 'end', 'flex-start', 'flex-end', 'self-start', 'self-end', 'baseline', 'normal', 'stretch'];\nconst genClsWrap = (prefixCls, props) => {\n const wrap = props.wrap === true ? 'wrap' : props.wrap;\n return {\n [`${prefixCls}-wrap-${wrap}`]: wrap && flexWrapValues.includes(wrap)\n };\n};\nconst genClsAlign = (prefixCls, props) => {\n const alignCls = {};\n alignItemsValues.forEach(cssKey => {\n alignCls[`${prefixCls}-align-${cssKey}`] = props.align === cssKey;\n });\n alignCls[`${prefixCls}-align-stretch`] = !props.align && !!props.vertical;\n return alignCls;\n};\nconst genClsJustify = (prefixCls, props) => {\n const justifyCls = {};\n justifyContentValues.forEach(cssKey => {\n justifyCls[`${prefixCls}-justify-${cssKey}`] = props.justify === cssKey;\n });\n return justifyCls;\n};\nfunction createFlexClassNames(prefixCls, props) {\n return (0, _classnames.default)(Object.assign(Object.assign(Object.assign({}, genClsWrap(prefixCls, props)), genClsAlign(prefixCls, props)), genClsJustify(prefixCls, props)));\n}\nvar _default = exports.default = createFlexClassNames;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _VerticalAlignTopOutlined = _interopRequireDefault(require(\"@ant-design/icons/VerticalAlignTopOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireDefault(require(\"rc-motion\"));\nvar _ref2 = require(\"rc-util/lib/ref\");\nvar _getScroll = _interopRequireDefault(require(\"../_util/getScroll\"));\nvar _scrollTo = _interopRequireDefault(require(\"../_util/scrollTo\"));\nvar _throttleByAnimationFrame = _interopRequireDefault(require(\"../_util/throttleByAnimationFrame\"));\nvar _configProvider = require(\"../config-provider\");\nvar _context = _interopRequireDefault(require(\"./context\"));\nvar _FloatButton = _interopRequireWildcard(require(\"./FloatButton\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst BackTop = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n type = 'default',\n shape = 'circle',\n visibilityHeight = 400,\n icon = /*#__PURE__*/_react.default.createElement(_VerticalAlignTopOutlined.default, null),\n target,\n onClick,\n duration = 450\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"type\", \"shape\", \"visibilityHeight\", \"icon\", \"target\", \"onClick\", \"duration\"]);\n const [visible, setVisible] = (0, _react.useState)(visibilityHeight === 0);\n const internalRef = _react.default.useRef(null);\n _react.default.useImperativeHandle(ref, () => ({\n nativeElement: internalRef.current\n }));\n const getDefaultTarget = () => {\n var _a;\n return ((_a = internalRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument) || window;\n };\n const handleScroll = (0, _throttleByAnimationFrame.default)(e => {\n const scrollTop = (0, _getScroll.default)(e.target);\n setVisible(scrollTop >= visibilityHeight);\n });\n (0, _react.useEffect)(() => {\n const getTarget = target || getDefaultTarget;\n const container = getTarget();\n handleScroll({\n target: container\n });\n container === null || container === void 0 ? void 0 : container.addEventListener('scroll', handleScroll);\n return () => {\n handleScroll.cancel();\n container === null || container === void 0 ? void 0 : container.removeEventListener('scroll', handleScroll);\n };\n }, [target]);\n const scrollToTop = e => {\n (0, _scrollTo.default)(0, {\n getContainer: target || getDefaultTarget,\n duration\n });\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n };\n const {\n getPrefixCls\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls(_FloatButton.floatButtonPrefixCls, customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const groupShape = (0, _react.useContext)(_context.default);\n const mergedShape = groupShape || shape;\n const contentProps = Object.assign({\n prefixCls,\n icon,\n type,\n shape: mergedShape\n }, restProps);\n return /*#__PURE__*/_react.default.createElement(_rcMotion.default, {\n visible: visible,\n motionName: `${rootPrefixCls}-fade`\n }, (_ref, setRef) => {\n let {\n className: motionClassName\n } = _ref;\n return /*#__PURE__*/_react.default.createElement(_FloatButton.default, Object.assign({\n ref: (0, _ref2.composeRef)(internalRef, setRef)\n }, contentProps, {\n onClick: scrollToTop,\n className: (0, _classnames.default)(className, motionClassName)\n }));\n });\n});\nif (process.env.NODE_ENV !== 'production') {\n BackTop.displayName = 'BackTop';\n}\nvar _default = exports.default = BackTop;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.floatButtonPrefixCls = exports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _warning = require(\"../_util/warning\");\nvar _badge = _interopRequireDefault(require(\"../badge\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\nvar _context = _interopRequireDefault(require(\"./context\"));\nvar _FloatButtonContent = _interopRequireDefault(require(\"./FloatButtonContent\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst floatButtonPrefixCls = exports.floatButtonPrefixCls = 'float-btn';\nconst InternalFloatButton = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n type = 'default',\n shape = 'circle',\n icon,\n description,\n tooltip,\n htmlType = 'button',\n badge = {}\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"type\", \"shape\", \"icon\", \"description\", \"tooltip\", \"htmlType\", \"badge\"]);\n const {\n getPrefixCls,\n direction\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const groupShape = (0, _react.useContext)(_context.default);\n const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const mergedShape = groupShape || shape;\n const classString = (0, _classnames.default)(hashId, cssVarCls, rootCls, prefixCls, className, rootClassName, `${prefixCls}-${type}`, `${prefixCls}-${mergedShape}`, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n // ============================ zIndex ============================\n const [zIndex] = (0, _useZIndex.useZIndex)('FloatButton', style === null || style === void 0 ? void 0 : style.zIndex);\n const mergedStyle = Object.assign(Object.assign({}, style), {\n zIndex\n });\n // 虽然在 ts 中已经 omit 过了,但是为了防止多余的属性被透传进来,这里再 omit 一遍,以防万一\n const badgeProps = (0, _omit.default)(badge, ['title', 'children', 'status', 'text']);\n const contentProps = (0, _react.useMemo)(() => ({\n prefixCls,\n description,\n icon,\n type\n }), [prefixCls, description, icon, type]);\n let buttonNode = /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-body`\n }, /*#__PURE__*/_react.default.createElement(_FloatButtonContent.default, Object.assign({}, contentProps)));\n if ('badge' in props) {\n buttonNode = /*#__PURE__*/_react.default.createElement(_badge.default, Object.assign({}, badgeProps), buttonNode);\n }\n if ('tooltip' in props) {\n buttonNode = /*#__PURE__*/_react.default.createElement(_tooltip.default, {\n title: tooltip,\n placement: direction === 'rtl' ? 'right' : 'left'\n }, buttonNode);\n }\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('FloatButton');\n process.env.NODE_ENV !== \"production\" ? warning(!(shape === 'circle' && description), 'usage', 'supported only when `shape` is `square`. Due to narrow space for text, short sentence is recommended.') : void 0;\n }\n return wrapCSSVar(props.href ? (/*#__PURE__*/_react.default.createElement(\"a\", Object.assign({\n ref: ref\n }, restProps, {\n className: classString,\n style: mergedStyle\n }), buttonNode)) : (/*#__PURE__*/_react.default.createElement(\"button\", Object.assign({\n ref: ref\n }, restProps, {\n className: classString,\n style: mergedStyle,\n type: htmlType\n }), buttonNode)));\n});\nconst FloatButton = InternalFloatButton;\nif (process.env.NODE_ENV !== 'production') {\n FloatButton.displayName = 'FloatButton';\n}\nvar _default = exports.default = FloatButton;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _FileTextOutlined = _interopRequireDefault(require(\"@ant-design/icons/FileTextOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst FloatButtonContent = props => {\n const {\n icon,\n description,\n prefixCls,\n className\n } = props;\n const defaultElement = /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-icon`\n }, /*#__PURE__*/_react.default.createElement(_FileTextOutlined.default, null));\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n onClick: props.onClick,\n onFocus: props.onFocus,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n className: (0, _classnames.default)(className, `${prefixCls}-content`)\n }, icon || description ? (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, icon && /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-icon`\n }, icon), description && /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description))) : defaultElement);\n};\nvar _default = exports.default = /*#__PURE__*/(0, _react.memo)(FloatButtonContent);","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _FileTextOutlined = _interopRequireDefault(require(\"@ant-design/icons/FileTextOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireDefault(require(\"rc-motion\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _context = require(\"./context\");\nvar _FloatButton = _interopRequireWildcard(require(\"./FloatButton\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst FloatButtonGroup = props => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n className,\n style,\n shape = 'circle',\n type = 'default',\n placement = 'top',\n icon = /*#__PURE__*/_react.default.createElement(_FileTextOutlined.default, null),\n closeIcon,\n description,\n trigger,\n children,\n onOpenChange,\n open: customOpen,\n onClick: onTriggerButtonClick\n } = props,\n floatButtonProps = __rest(props, [\"prefixCls\", \"className\", \"style\", \"shape\", \"type\", \"placement\", \"icon\", \"closeIcon\", \"description\", \"trigger\", \"children\", \"onOpenChange\", \"open\", \"onClick\"]);\n const {\n direction,\n getPrefixCls,\n floatButtonGroup\n } = _react.default.useContext(_configProvider.ConfigContext);\n const mergedCloseIcon = (_a = closeIcon !== null && closeIcon !== void 0 ? closeIcon : floatButtonGroup === null || floatButtonGroup === void 0 ? void 0 : floatButtonGroup.closeIcon) !== null && _a !== void 0 ? _a : /*#__PURE__*/_react.default.createElement(_CloseOutlined.default, null);\n const prefixCls = getPrefixCls(_FloatButton.floatButtonPrefixCls, customizePrefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const groupPrefixCls = `${prefixCls}-group`;\n const isMenuMode = trigger && ['click', 'hover'].includes(trigger);\n const isValidPlacement = placement && ['top', 'left', 'right', 'bottom'].includes(placement);\n const groupCls = (0, _classnames.default)(groupPrefixCls, hashId, cssVarCls, rootCls, className, {\n [`${groupPrefixCls}-rtl`]: direction === 'rtl',\n [`${groupPrefixCls}-${shape}`]: shape,\n [`${groupPrefixCls}-${shape}-shadow`]: !isMenuMode,\n [`${groupPrefixCls}-${placement}`]: isMenuMode && isValidPlacement // 只有菜单模式才支持弹出方向\n });\n // ============================ zIndex ============================\n const [zIndex] = (0, _useZIndex.useZIndex)('FloatButton', style === null || style === void 0 ? void 0 : style.zIndex);\n const mergedStyle = Object.assign(Object.assign({}, style), {\n zIndex\n });\n const wrapperCls = (0, _classnames.default)(hashId, `${groupPrefixCls}-wrap`);\n const [open, setOpen] = (0, _useMergedState.default)(false, {\n value: customOpen\n });\n const floatButtonGroupRef = _react.default.useRef(null);\n // ========================== Open ==========================\n const hoverTrigger = trigger === 'hover';\n const clickTrigger = trigger === 'click';\n const triggerOpen = (0, _useEvent.default)(nextOpen => {\n if (open !== nextOpen) {\n setOpen(nextOpen);\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen);\n }\n });\n // ===================== Trigger: Hover =====================\n const onMouseEnter = () => {\n if (hoverTrigger) {\n triggerOpen(true);\n }\n };\n const onMouseLeave = () => {\n if (hoverTrigger) {\n triggerOpen(false);\n }\n };\n // ===================== Trigger: Click =====================\n const onInternalTriggerButtonClick = e => {\n if (clickTrigger) {\n triggerOpen(!open);\n }\n onTriggerButtonClick === null || onTriggerButtonClick === void 0 ? void 0 : onTriggerButtonClick(e);\n };\n _react.default.useEffect(() => {\n if (clickTrigger) {\n const onDocClick = e => {\n var _a;\n // Skip if click on the group\n if ((_a = floatButtonGroupRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {\n return;\n }\n triggerOpen(false);\n };\n document.addEventListener('click', onDocClick, {\n capture: true\n });\n return () => document.removeEventListener('click', onDocClick, {\n capture: true\n });\n }\n }, [clickTrigger]);\n // ======================== Warning =========================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('FloatButton.Group');\n process.env.NODE_ENV !== \"production\" ? warning(!('open' in props) || !!trigger, 'usage', '`open` need to be used together with `trigger`') : void 0;\n }\n // ========================= Render =========================\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(_context.FloatButtonGroupProvider, {\n value: shape\n }, /*#__PURE__*/_react.default.createElement(\"div\", {\n ref: floatButtonGroupRef,\n className: groupCls,\n style: mergedStyle,\n // Hover trigger\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n }, isMenuMode ? (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_rcMotion.default, {\n visible: open,\n motionName: `${groupPrefixCls}-wrap`\n }, _ref => {\n let {\n className: motionClassName\n } = _ref;\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: (0, _classnames.default)(motionClassName, wrapperCls)\n }, children);\n }), /*#__PURE__*/_react.default.createElement(_FloatButton.default, Object.assign({\n type: type,\n icon: open ? mergedCloseIcon : icon,\n description: description,\n \"aria-label\": props['aria-label'],\n className: `${groupPrefixCls}-trigger`,\n onClick: onInternalTriggerButtonClick\n }, floatButtonProps)))) : children)));\n};\nvar _default = exports.default = FloatButtonGroup;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar _BackTop = _interopRequireDefault(require(\"./BackTop\"));\nvar _FloatButton = _interopRequireWildcard(require(\"./FloatButton\"));\nvar _FloatButtonGroup = _interopRequireDefault(require(\"./FloatButtonGroup\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/* eslint-disable react/no-array-index-key */\n\nconst PureFloatButton = _a => {\n var {\n backTop\n } = _a,\n props = __rest(_a, [\"backTop\"]);\n return backTop ? /*#__PURE__*/React.createElement(_BackTop.default, Object.assign({}, props, {\n visibilityHeight: 0\n })) : /*#__PURE__*/React.createElement(_FloatButton.default, Object.assign({}, props));\n};\n/** @private Internal Component. Do not use in your production. */\nconst PurePanel = _a => {\n var {\n className,\n items\n } = _a,\n props = __rest(_a, [\"className\", \"items\"]);\n const {\n prefixCls: customizePrefixCls\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls(_FloatButton.floatButtonPrefixCls, customizePrefixCls);\n const pureCls = `${prefixCls}-pure`;\n if (items) {\n return /*#__PURE__*/React.createElement(_FloatButtonGroup.default, Object.assign({\n className: (0, _classnames.default)(className, pureCls)\n }, props), items.map((item, index) => (/*#__PURE__*/React.createElement(PureFloatButton, Object.assign({\n key: index\n }, item)))));\n }\n return /*#__PURE__*/React.createElement(PureFloatButton, Object.assign({\n className: (0, _classnames.default)(className, pureCls)\n }, props));\n};\nvar _default = exports.default = PurePanel;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.FloatButtonGroupProvider = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst FloatButtonGroupContext = /*#__PURE__*/_react.default.createContext(undefined);\nconst {\n Provider: FloatButtonGroupProvider\n} = FloatButtonGroupContext;\nexports.FloatButtonGroupProvider = FloatButtonGroupProvider;\nvar _default = exports.default = FloatButtonGroupContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _BackTop = _interopRequireDefault(require(\"./BackTop\"));\nvar _FloatButton = _interopRequireDefault(require(\"./FloatButton\"));\nvar _FloatButtonGroup = _interopRequireDefault(require(\"./FloatButtonGroup\"));\nvar _PurePanel = _interopRequireDefault(require(\"./PurePanel\"));\n_FloatButton.default.BackTop = _BackTop.default;\n_FloatButton.default.Group = _FloatButtonGroup.default;\n_FloatButton.default._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel.default;\nvar _default = exports.default = _FloatButton.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _fade = require(\"../../style/motion/fade\");\nvar _internal = require(\"../../theme/internal\");\nvar _util = _interopRequireDefault(require(\"../util\"));\nvar _keyframes = _interopRequireDefault(require(\"./keyframes\"));\n// ============================== Group ==============================\nconst floatButtonGroupStyle = token => {\n const {\n antCls,\n componentCls,\n floatButtonSize,\n margin,\n borderRadiusLG,\n borderRadiusSM,\n badgeOffset,\n floatButtonBodyPadding,\n zIndexPopupBase,\n calc\n } = token;\n const groupPrefixCls = `${componentCls}-group`;\n return {\n [groupPrefixCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n zIndex: zIndexPopupBase,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n border: 'none',\n position: 'fixed',\n height: 'auto',\n boxShadow: 'none',\n minWidth: floatButtonSize,\n minHeight: floatButtonSize,\n insetInlineEnd: token.floatButtonInsetInlineEnd,\n bottom: token.floatButtonInsetBlockEnd,\n borderRadius: borderRadiusLG,\n [`${groupPrefixCls}-wrap`]: {\n zIndex: -1,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'absolute'\n },\n [`&${groupPrefixCls}-rtl`]: {\n direction: 'rtl'\n },\n [componentCls]: {\n position: 'static'\n }\n }),\n [`${groupPrefixCls}-top > ${groupPrefixCls}-wrap`]: {\n flexDirection: 'column',\n top: 'auto',\n bottom: calc(floatButtonSize).add(margin).equal(),\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n width: '100%',\n height: margin,\n bottom: calc(margin).mul(-1).equal()\n }\n },\n [`${groupPrefixCls}-bottom > ${groupPrefixCls}-wrap`]: {\n flexDirection: 'column',\n top: calc(floatButtonSize).add(margin).equal(),\n bottom: 'auto',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n width: '100%',\n height: margin,\n top: calc(margin).mul(-1).equal()\n }\n },\n [`${groupPrefixCls}-right > ${groupPrefixCls}-wrap`]: {\n flexDirection: 'row',\n left: {\n _skip_check_: true,\n value: calc(floatButtonSize).add(margin).equal()\n },\n right: {\n _skip_check_: true,\n value: 'auto'\n },\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n width: margin,\n height: '100%',\n left: {\n _skip_check_: true,\n value: calc(margin).mul(-1).equal()\n }\n }\n },\n [`${groupPrefixCls}-left > ${groupPrefixCls}-wrap`]: {\n flexDirection: 'row',\n left: {\n _skip_check_: true,\n value: 'auto'\n },\n right: {\n _skip_check_: true,\n value: calc(floatButtonSize).add(margin).equal()\n },\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n width: margin,\n height: '100%',\n right: {\n _skip_check_: true,\n value: calc(margin).mul(-1).equal()\n }\n }\n },\n [`${groupPrefixCls}-circle`]: {\n gap: margin,\n [`${groupPrefixCls}-wrap`]: {\n gap: margin\n }\n },\n [`${groupPrefixCls}-square`]: {\n [`${componentCls}-square`]: {\n padding: 0,\n borderRadius: 0,\n [`&${groupPrefixCls}-trigger`]: {\n borderRadius: borderRadiusLG\n },\n '&:first-child': {\n borderStartStartRadius: borderRadiusLG,\n borderStartEndRadius: borderRadiusLG\n },\n '&:last-child': {\n borderEndStartRadius: borderRadiusLG,\n borderEndEndRadius: borderRadiusLG\n },\n '&:not(:last-child)': {\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n },\n [`${antCls}-badge`]: {\n [`${antCls}-badge-count`]: {\n top: calc(calc(floatButtonBodyPadding).add(badgeOffset)).mul(-1).equal(),\n insetInlineEnd: calc(calc(floatButtonBodyPadding).add(badgeOffset)).mul(-1).equal()\n }\n }\n },\n [`${groupPrefixCls}-wrap`]: {\n borderRadius: borderRadiusLG,\n boxShadow: token.boxShadowSecondary,\n [`${componentCls}-square`]: {\n boxShadow: 'none',\n borderRadius: 0,\n padding: floatButtonBodyPadding,\n [`${componentCls}-body`]: {\n width: token.floatButtonBodySize,\n height: token.floatButtonBodySize,\n borderRadius: borderRadiusSM\n }\n }\n }\n },\n [`${groupPrefixCls}-top > ${groupPrefixCls}-wrap, ${groupPrefixCls}-bottom > ${groupPrefixCls}-wrap`]: {\n [`> ${componentCls}-square`]: {\n '&:first-child': {\n borderStartStartRadius: borderRadiusLG,\n borderStartEndRadius: borderRadiusLG\n },\n '&:last-child': {\n borderEndStartRadius: borderRadiusLG,\n borderEndEndRadius: borderRadiusLG\n },\n '&:not(:last-child)': {\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n }\n }\n },\n [`${groupPrefixCls}-left > ${groupPrefixCls}-wrap, ${groupPrefixCls}-right > ${groupPrefixCls}-wrap`]: {\n [`> ${componentCls}-square`]: {\n '&:first-child': {\n borderStartStartRadius: borderRadiusLG,\n borderEndStartRadius: borderRadiusLG\n },\n '&:last-child': {\n borderStartEndRadius: borderRadiusLG,\n borderEndEndRadius: borderRadiusLG\n },\n '&:not(:last-child)': {\n borderInlineEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n }\n }\n },\n [`${groupPrefixCls}-circle-shadow`]: {\n boxShadow: 'none'\n },\n [`${groupPrefixCls}-square-shadow`]: {\n boxShadow: token.boxShadowSecondary,\n [`${componentCls}-square`]: {\n boxShadow: 'none',\n padding: floatButtonBodyPadding,\n [`${componentCls}-body`]: {\n width: token.floatButtonBodySize,\n height: token.floatButtonBodySize,\n borderRadius: borderRadiusSM\n }\n }\n }\n };\n};\n// ============================== Shared ==============================\nconst sharedFloatButtonStyle = token => {\n const {\n antCls,\n componentCls,\n floatButtonBodyPadding,\n floatButtonIconSize,\n floatButtonSize,\n borderRadiusLG,\n badgeOffset,\n dotOffsetInSquare,\n dotOffsetInCircle,\n zIndexPopupBase,\n calc\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n border: 'none',\n position: 'fixed',\n cursor: 'pointer',\n zIndex: zIndexPopupBase,\n // Do not remove the 'display: block' here.\n // Deleting it will cause marginBottom to become ineffective.\n // Ref: https://github.com/ant-design/ant-design/issues/44700\n display: 'block',\n width: floatButtonSize,\n height: floatButtonSize,\n insetInlineEnd: token.floatButtonInsetInlineEnd,\n bottom: token.floatButtonInsetBlockEnd,\n boxShadow: token.boxShadowSecondary,\n // Pure Panel\n '&-pure': {\n position: 'relative',\n inset: 'auto'\n },\n '&:empty': {\n display: 'none'\n },\n [`${antCls}-badge`]: {\n width: '100%',\n height: '100%',\n [`${antCls}-badge-count`]: {\n transform: 'translate(0, 0)',\n transformOrigin: 'center',\n top: calc(badgeOffset).mul(-1).equal(),\n insetInlineEnd: calc(badgeOffset).mul(-1).equal()\n }\n },\n [`${componentCls}-body`]: {\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n transition: `all ${token.motionDurationMid}`,\n [`${componentCls}-content`]: {\n overflow: 'hidden',\n textAlign: 'center',\n minHeight: floatButtonSize,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n padding: `${(0, _cssinjs.unit)(calc(floatButtonBodyPadding).div(2).equal())} ${(0, _cssinjs.unit)(floatButtonBodyPadding)}`,\n [`${componentCls}-icon`]: {\n textAlign: 'center',\n margin: 'auto',\n width: floatButtonIconSize,\n fontSize: floatButtonIconSize,\n lineHeight: 1\n }\n }\n }\n }),\n [`${componentCls}-rtl`]: {\n direction: 'rtl'\n },\n [`${componentCls}-circle`]: {\n height: floatButtonSize,\n borderRadius: '50%',\n [`${antCls}-badge`]: {\n [`${antCls}-badge-dot`]: {\n top: dotOffsetInCircle,\n insetInlineEnd: dotOffsetInCircle\n }\n },\n [`${componentCls}-body`]: {\n borderRadius: '50%'\n }\n },\n [`${componentCls}-square`]: {\n height: 'auto',\n minHeight: floatButtonSize,\n borderRadius: borderRadiusLG,\n [`${antCls}-badge`]: {\n [`${antCls}-badge-dot`]: {\n top: dotOffsetInSquare,\n insetInlineEnd: dotOffsetInSquare\n }\n },\n [`${componentCls}-body`]: {\n height: 'auto',\n borderRadius: borderRadiusLG\n }\n },\n [`${componentCls}-default`]: {\n backgroundColor: token.floatButtonBackgroundColor,\n transition: `background-color ${token.motionDurationMid}`,\n [`${componentCls}-body`]: {\n backgroundColor: token.floatButtonBackgroundColor,\n transition: `background-color ${token.motionDurationMid}`,\n '&:hover': {\n backgroundColor: token.colorFillContent\n },\n [`${componentCls}-content`]: {\n [`${componentCls}-icon`]: {\n color: token.colorText\n },\n [`${componentCls}-description`]: {\n display: 'flex',\n alignItems: 'center',\n lineHeight: (0, _cssinjs.unit)(token.fontSizeLG),\n color: token.colorText,\n fontSize: token.fontSizeSM\n }\n }\n }\n },\n [`${componentCls}-primary`]: {\n backgroundColor: token.colorPrimary,\n [`${componentCls}-body`]: {\n backgroundColor: token.colorPrimary,\n transition: `background-color ${token.motionDurationMid}`,\n '&:hover': {\n backgroundColor: token.colorPrimaryHover\n },\n [`${componentCls}-content`]: {\n [`${componentCls}-icon`]: {\n color: token.colorTextLightSolid\n },\n [`${componentCls}-description`]: {\n display: 'flex',\n alignItems: 'center',\n lineHeight: (0, _cssinjs.unit)(token.fontSizeLG),\n color: token.colorTextLightSolid,\n fontSize: token.fontSizeSM\n }\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => ({\n dotOffsetInCircle: (0, _util.default)(token.controlHeightLG / 2),\n dotOffsetInSquare: (0, _util.default)(token.borderRadiusLG)\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('FloatButton', token => {\n const {\n colorTextLightSolid,\n colorBgElevated,\n controlHeightLG,\n marginXXL,\n marginLG,\n fontSize,\n fontSizeIcon,\n controlItemBgHover,\n paddingXXS,\n calc\n } = token;\n const floatButtonToken = (0, _internal.mergeToken)(token, {\n floatButtonBackgroundColor: colorBgElevated,\n floatButtonColor: colorTextLightSolid,\n floatButtonHoverBackgroundColor: controlItemBgHover,\n floatButtonFontSize: fontSize,\n floatButtonIconSize: calc(fontSizeIcon).mul(1.5).equal(),\n floatButtonSize: controlHeightLG,\n floatButtonInsetBlockEnd: marginXXL,\n floatButtonInsetInlineEnd: marginLG,\n floatButtonBodySize: calc(controlHeightLG).sub(calc(paddingXXS).mul(2)).equal(),\n // 这里的 paddingXXS 是简写,完整逻辑是 (controlHeightLG - (controlHeightLG - paddingXXS * 2)) / 2,\n floatButtonBodyPadding: paddingXXS,\n badgeOffset: calc(paddingXXS).mul(1.5).equal()\n });\n return [floatButtonGroupStyle(floatButtonToken), sharedFloatButtonStyle(floatButtonToken), (0, _fade.initFadeMotion)(token), (0, _keyframes.default)(floatButtonToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _motion = require(\"../../style/motion/motion\");\nconst floatButtonGroupMotion = token => {\n const {\n componentCls,\n floatButtonSize,\n motionDurationSlow,\n motionEaseInOutCirc,\n calc\n } = token;\n const moveTopIn = new _cssinjs.Keyframes('antFloatButtonMoveTopIn', {\n '0%': {\n transform: `translate3d(0, ${(0, _cssinjs.unit)(floatButtonSize)}, 0)`,\n transformOrigin: '0 0',\n opacity: 0\n },\n '100%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n }\n });\n const moveTopOut = new _cssinjs.Keyframes('antFloatButtonMoveTopOut', {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n },\n '100%': {\n transform: `translate3d(0, ${(0, _cssinjs.unit)(floatButtonSize)}, 0)`,\n transformOrigin: '0 0',\n opacity: 0\n }\n });\n const moveRightIn = new _cssinjs.Keyframes('antFloatButtonMoveRightIn', {\n '0%': {\n transform: `translate3d(${calc(floatButtonSize).mul(-1).equal()}, 0, 0)`,\n transformOrigin: '0 0',\n opacity: 0\n },\n '100%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n }\n });\n const moveRightOut = new _cssinjs.Keyframes('antFloatButtonMoveRightOut', {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n },\n '100%': {\n transform: `translate3d(${calc(floatButtonSize).mul(-1).equal()}, 0, 0)`,\n transformOrigin: '0 0',\n opacity: 0\n }\n });\n const moveBottomIn = new _cssinjs.Keyframes('antFloatButtonMoveBottomIn', {\n '0%': {\n transform: `translate3d(0, ${calc(floatButtonSize).mul(-1).equal()}, 0)`,\n transformOrigin: '0 0',\n opacity: 0\n },\n '100%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n }\n });\n const moveBottomOut = new _cssinjs.Keyframes('antFloatButtonMoveBottomOut', {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n },\n '100%': {\n transform: `translate3d(0, ${calc(floatButtonSize).mul(-1).equal()}, 0)`,\n transformOrigin: '0 0',\n opacity: 0\n }\n });\n const moveLeftIn = new _cssinjs.Keyframes('antFloatButtonMoveLeftIn', {\n '0%': {\n transform: `translate3d(${(0, _cssinjs.unit)(floatButtonSize)}, 0, 0)`,\n transformOrigin: '0 0',\n opacity: 0\n },\n '100%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n }\n });\n const moveLeftOut = new _cssinjs.Keyframes('antFloatButtonMoveLeftOut', {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n },\n '100%': {\n transform: `translate3d(${(0, _cssinjs.unit)(floatButtonSize)}, 0, 0)`,\n transformOrigin: '0 0',\n opacity: 0\n }\n });\n const groupPrefixCls = `${componentCls}-group`;\n return [{\n [groupPrefixCls]: {\n [`&${groupPrefixCls}-top ${groupPrefixCls}-wrap`]: (0, _motion.initMotion)(`${groupPrefixCls}-wrap`, moveTopIn, moveTopOut, motionDurationSlow, true),\n [`&${groupPrefixCls}-bottom ${groupPrefixCls}-wrap`]: (0, _motion.initMotion)(`${groupPrefixCls}-wrap`, moveBottomIn, moveBottomOut, motionDurationSlow, true),\n [`&${groupPrefixCls}-left ${groupPrefixCls}-wrap`]: (0, _motion.initMotion)(`${groupPrefixCls}-wrap`, moveLeftIn, moveLeftOut, motionDurationSlow, true),\n [`&${groupPrefixCls}-right ${groupPrefixCls}-wrap`]: (0, _motion.initMotion)(`${groupPrefixCls}-wrap`, moveRightIn, moveRightOut, motionDurationSlow, true)\n }\n }, {\n [`${groupPrefixCls}-wrap`]: {\n [`&${groupPrefixCls}-wrap-enter, &${groupPrefixCls}-wrap-appear`]: {\n opacity: 0,\n animationTimingFunction: motionEaseInOutCirc\n },\n [`&${groupPrefixCls}-wrap-leave`]: {\n opacity: 1,\n animationTimingFunction: motionEaseInOutCirc\n }\n }\n }];\n};\nvar _default = exports.default = floatButtonGroupMotion;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst getOffset = radius => {\n if (radius === 0) {\n return 0;\n }\n // 如果要考虑通用性,这里应该用三角函数 Math.sin(45)\n // 但是这个场景比较特殊,始终是等腰直角三角形,所以直接用 Math.sqrt() 开方即可\n return radius - Math.sqrt(Math.pow(radius, 2) / 2);\n};\nvar _default = exports.default = getOffset;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireWildcard(require(\"rc-motion\"));\nvar _motion = _interopRequireDefault(require(\"../_util/motion\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _context = require(\"./context\");\nvar _useDebounce = _interopRequireDefault(require(\"./hooks/useDebounce\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst EMPTY_LIST = [];\nfunction toErrorEntity(error, prefix, errorStatus) {\n let index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n return {\n key: typeof error === 'string' ? error : `${prefix}-${index}`,\n error,\n errorStatus\n };\n}\nconst ErrorList = _ref => {\n let {\n help,\n helpStatus,\n errors = EMPTY_LIST,\n warnings = EMPTY_LIST,\n className: rootClassName,\n fieldId,\n onVisibleChanged\n } = _ref;\n const {\n prefixCls\n } = React.useContext(_context.FormItemPrefixContext);\n const baseClassName = `${prefixCls}-item-explain`;\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const collapseMotion = (0, _react.useMemo)(() => (0, _motion.default)(prefixCls), [prefixCls]);\n // We have to debounce here again since somewhere use ErrorList directly still need no shaking\n // ref: https://github.com/ant-design/ant-design/issues/36336\n const debounceErrors = (0, _useDebounce.default)(errors);\n const debounceWarnings = (0, _useDebounce.default)(warnings);\n const fullKeyList = React.useMemo(() => {\n if (help !== undefined && help !== null) {\n return [toErrorEntity(help, 'help', helpStatus)];\n }\n return [].concat((0, _toConsumableArray2.default)(debounceErrors.map((error, index) => toErrorEntity(error, 'error', 'error', index))), (0, _toConsumableArray2.default)(debounceWarnings.map((warning, index) => toErrorEntity(warning, 'warning', 'warning', index))));\n }, [help, helpStatus, debounceErrors, debounceWarnings]);\n const helpProps = {};\n if (fieldId) {\n helpProps.id = `${fieldId}_help`;\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcMotion.default, {\n motionDeadline: collapseMotion.motionDeadline,\n motionName: `${prefixCls}-show-help`,\n visible: !!fullKeyList.length,\n onVisibleChanged: onVisibleChanged\n }, holderProps => {\n const {\n className: holderClassName,\n style: holderStyle\n } = holderProps;\n return /*#__PURE__*/React.createElement(\"div\", Object.assign({}, helpProps, {\n className: (0, _classnames.default)(baseClassName, holderClassName, cssVarCls, rootCls, rootClassName, hashId),\n style: holderStyle,\n role: \"alert\"\n }), /*#__PURE__*/React.createElement(_rcMotion.CSSMotionList, Object.assign({\n keys: fullKeyList\n }, (0, _motion.default)(prefixCls), {\n motionName: `${prefixCls}-show-help-item`,\n component: false\n }), itemProps => {\n const {\n key,\n error,\n errorStatus,\n className: itemClassName,\n style: itemStyle\n } = itemProps;\n return /*#__PURE__*/React.createElement(\"div\", {\n key: key,\n className: (0, _classnames.default)(itemClassName, {\n [`${baseClassName}-${errorStatus}`]: errorStatus\n }),\n style: itemStyle\n }, error);\n }));\n }));\n};\nvar _default = exports.default = ErrorList;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"List\", {\n enumerable: true,\n get: function () {\n return _rcFieldForm.List;\n }\n});\nexports.default = void 0;\nObject.defineProperty(exports, \"useForm\", {\n enumerable: true,\n get: function () {\n return _useForm.default;\n }\n});\nObject.defineProperty(exports, \"useWatch\", {\n enumerable: true,\n get: function () {\n return _rcFieldForm.useWatch;\n }\n});\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcFieldForm = _interopRequireWildcard(require(\"rc-field-form\"));\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireWildcard(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _SizeContext = _interopRequireDefault(require(\"../config-provider/SizeContext\"));\nvar _context = require(\"./context\");\nvar _useForm = _interopRequireDefault(require(\"./hooks/useForm\"));\nvar _useFormWarning = _interopRequireDefault(require(\"./hooks/useFormWarning\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _validateMessagesContext = _interopRequireDefault(require(\"./validateMessagesContext\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalForm = (props, ref) => {\n const contextDisabled = React.useContext(_DisabledContext.default);\n const {\n getPrefixCls,\n direction,\n form: contextForm\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n size,\n disabled = contextDisabled,\n form,\n colon,\n labelAlign,\n labelWrap,\n labelCol,\n wrapperCol,\n hideRequiredMark,\n layout = 'horizontal',\n scrollToFirstError,\n requiredMark,\n onFinishFailed,\n name,\n style,\n feedbackIcons,\n variant\n } = props,\n restFormProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"size\", \"disabled\", \"form\", \"colon\", \"labelAlign\", \"labelWrap\", \"labelCol\", \"wrapperCol\", \"hideRequiredMark\", \"layout\", \"scrollToFirstError\", \"requiredMark\", \"onFinishFailed\", \"name\", \"style\", \"feedbackIcons\", \"variant\"]);\n const mergedSize = (0, _useSize.default)(size);\n const contextValidateMessages = React.useContext(_validateMessagesContext.default);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, _useFormWarning.default)(props);\n }\n const mergedRequiredMark = (0, _react.useMemo)(() => {\n if (requiredMark !== undefined) {\n return requiredMark;\n }\n if (hideRequiredMark) {\n return false;\n }\n if (contextForm && contextForm.requiredMark !== undefined) {\n return contextForm.requiredMark;\n }\n return true;\n }, [hideRequiredMark, requiredMark, contextForm]);\n const mergedColon = colon !== null && colon !== void 0 ? colon : contextForm === null || contextForm === void 0 ? void 0 : contextForm.colon;\n const prefixCls = getPrefixCls('form', customizePrefixCls);\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const formClassName = (0, _classnames.default)(prefixCls, `${prefixCls}-${layout}`, {\n [`${prefixCls}-hide-required-mark`]: mergedRequiredMark === false,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-${mergedSize}`]: mergedSize\n }, cssVarCls, rootCls, hashId, contextForm === null || contextForm === void 0 ? void 0 : contextForm.className, className, rootClassName);\n const [wrapForm] = (0, _useForm.default)(form);\n const {\n __INTERNAL__\n } = wrapForm;\n __INTERNAL__.name = name;\n const formContextValue = (0, _react.useMemo)(() => ({\n name,\n labelAlign,\n labelCol,\n labelWrap,\n wrapperCol,\n vertical: layout === 'vertical',\n colon: mergedColon,\n requiredMark: mergedRequiredMark,\n itemRef: __INTERNAL__.itemRef,\n form: wrapForm,\n feedbackIcons\n }), [name, labelAlign, labelCol, wrapperCol, layout, mergedColon, mergedRequiredMark, wrapForm, feedbackIcons]);\n const nativeElementRef = React.useRef(null);\n React.useImperativeHandle(ref, () => {\n var _a;\n return Object.assign(Object.assign({}, wrapForm), {\n nativeElement: (_a = nativeElementRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement\n });\n });\n const scrollToField = (options, fieldName) => {\n if (options) {\n let defaultScrollToFirstError = {\n block: 'nearest'\n };\n if (typeof options === 'object') {\n defaultScrollToFirstError = options;\n }\n wrapForm.scrollToField(fieldName, defaultScrollToFirstError);\n }\n };\n const onInternalFinishFailed = errorInfo => {\n onFinishFailed === null || onFinishFailed === void 0 ? void 0 : onFinishFailed(errorInfo);\n if (errorInfo.errorFields.length) {\n const fieldName = errorInfo.errorFields[0].name;\n if (scrollToFirstError !== undefined) {\n scrollToField(scrollToFirstError, fieldName);\n return;\n }\n if (contextForm && contextForm.scrollToFirstError !== undefined) {\n scrollToField(contextForm.scrollToFirstError, fieldName);\n }\n }\n };\n return wrapCSSVar(/*#__PURE__*/React.createElement(_context.VariantContext.Provider, {\n value: variant\n }, /*#__PURE__*/React.createElement(_DisabledContext.DisabledContextProvider, {\n disabled: disabled\n }, /*#__PURE__*/React.createElement(_SizeContext.default.Provider, {\n value: mergedSize\n }, /*#__PURE__*/React.createElement(_context.FormProvider, {\n // This is not list in API, we pass with spread\n validateMessages: contextValidateMessages\n }, /*#__PURE__*/React.createElement(_context.FormContext.Provider, {\n value: formContextValue\n }, /*#__PURE__*/React.createElement(_rcFieldForm.default, Object.assign({\n id: name\n }, restFormProps, {\n name: name,\n onFinishFailed: onInternalFinishFailed,\n form: wrapForm,\n ref: nativeElementRef,\n style: Object.assign(Object.assign({}, contextForm === null || contextForm === void 0 ? void 0 : contextForm.style), style),\n className: formClassName\n }))))))));\n};\nconst Form = /*#__PURE__*/React.forwardRef(InternalForm);\nif (process.env.NODE_ENV !== 'production') {\n Form.displayName = 'Form';\n}\nvar _default = exports.default = Form;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _col = _interopRequireDefault(require(\"../grid/col\"));\nvar _context = require(\"./context\");\nvar _ErrorList = _interopRequireDefault(require(\"./ErrorList\"));\nvar _fallbackCmp = _interopRequireDefault(require(\"./style/fallbackCmp\"));\nconst FormItemInput = props => {\n const {\n prefixCls,\n status,\n wrapperCol,\n children,\n errors,\n warnings,\n _internalItemRender: formItemRender,\n extra,\n help,\n fieldId,\n marginBottom,\n onErrorVisibleChanged\n } = props;\n const baseClassName = `${prefixCls}-item`;\n const formContext = React.useContext(_context.FormContext);\n const mergedWrapperCol = wrapperCol || formContext.wrapperCol || {};\n const className = (0, _classnames.default)(`${baseClassName}-control`, mergedWrapperCol.className);\n // Pass to sub FormItem should not with col info\n const subFormContext = React.useMemo(() => Object.assign({}, formContext), [formContext]);\n delete subFormContext.labelCol;\n delete subFormContext.wrapperCol;\n const inputDom = /*#__PURE__*/React.createElement(\"div\", {\n className: `${baseClassName}-control-input`\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${baseClassName}-control-input-content`\n }, children));\n const formItemContext = React.useMemo(() => ({\n prefixCls,\n status\n }), [prefixCls, status]);\n const errorListDom = marginBottom !== null || errors.length || warnings.length ? (/*#__PURE__*/React.createElement(\"div\", {\n style: {\n display: 'flex',\n flexWrap: 'nowrap'\n }\n }, /*#__PURE__*/React.createElement(_context.FormItemPrefixContext.Provider, {\n value: formItemContext\n }, /*#__PURE__*/React.createElement(_ErrorList.default, {\n fieldId: fieldId,\n errors: errors,\n warnings: warnings,\n help: help,\n helpStatus: status,\n className: `${baseClassName}-explain-connected`,\n onVisibleChanged: onErrorVisibleChanged\n })), !!marginBottom && /*#__PURE__*/React.createElement(\"div\", {\n style: {\n width: 0,\n height: marginBottom\n }\n }))) : null;\n const extraProps = {};\n if (fieldId) {\n extraProps.id = `${fieldId}_extra`;\n }\n // If extra = 0, && will goes wrong\n // 0&&error -> 0\n const extraDom = extra ? (/*#__PURE__*/React.createElement(\"div\", Object.assign({}, extraProps, {\n className: `${baseClassName}-extra`\n }), extra)) : null;\n const dom = formItemRender && formItemRender.mark === 'pro_table_render' && formItemRender.render ? formItemRender.render(props, {\n input: inputDom,\n errorList: errorListDom,\n extra: extraDom\n }) : (/*#__PURE__*/React.createElement(React.Fragment, null, inputDom, errorListDom, extraDom));\n return /*#__PURE__*/React.createElement(_context.FormContext.Provider, {\n value: subFormContext\n }, /*#__PURE__*/React.createElement(_col.default, Object.assign({}, mergedWrapperCol, {\n className: className\n }), dom), /*#__PURE__*/React.createElement(_fallbackCmp.default, {\n prefixCls: prefixCls\n }));\n};\nvar _default = exports.default = FormItemInput;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _QuestionCircleOutlined = _interopRequireDefault(require(\"@ant-design/icons/QuestionCircleOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _col = _interopRequireDefault(require(\"../grid/col\"));\nvar _locale = require(\"../locale\");\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\nvar _context = require(\"./context\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction toTooltipProps(tooltip) {\n if (!tooltip) {\n return null;\n }\n if (typeof tooltip === 'object' && ! /*#__PURE__*/React.isValidElement(tooltip)) {\n return tooltip;\n }\n return {\n title: tooltip\n };\n}\nconst FormItemLabel = _ref => {\n let {\n prefixCls,\n label,\n htmlFor,\n labelCol,\n labelAlign,\n colon,\n required,\n requiredMark,\n tooltip,\n vertical\n } = _ref;\n var _a;\n const [formLocale] = (0, _locale.useLocale)('Form');\n const {\n labelAlign: contextLabelAlign,\n labelCol: contextLabelCol,\n labelWrap,\n colon: contextColon\n } = React.useContext(_context.FormContext);\n if (!label) {\n return null;\n }\n const mergedLabelCol = labelCol || contextLabelCol || {};\n const mergedLabelAlign = labelAlign || contextLabelAlign;\n const labelClsBasic = `${prefixCls}-item-label`;\n const labelColClassName = (0, _classnames.default)(labelClsBasic, mergedLabelAlign === 'left' && `${labelClsBasic}-left`, mergedLabelCol.className, {\n [`${labelClsBasic}-wrap`]: !!labelWrap\n });\n let labelChildren = label;\n // Keep label is original where there should have no colon\n const computedColon = colon === true || contextColon !== false && colon !== false;\n const haveColon = computedColon && !vertical;\n // Remove duplicated user input colon\n if (haveColon && typeof label === 'string' && label.trim()) {\n labelChildren = label.replace(/[:|:]\\s*$/, '');\n }\n // Tooltip\n const tooltipProps = toTooltipProps(tooltip);\n if (tooltipProps) {\n const {\n icon = /*#__PURE__*/React.createElement(_QuestionCircleOutlined.default, null)\n } = tooltipProps,\n restTooltipProps = __rest(tooltipProps, [\"icon\"]);\n const tooltipNode = /*#__PURE__*/React.createElement(_tooltip.default, Object.assign({}, restTooltipProps), /*#__PURE__*/React.cloneElement(icon, {\n className: `${prefixCls}-item-tooltip`,\n title: '',\n onClick: e => {\n // Prevent label behavior in tooltip icon\n // https://github.com/ant-design/ant-design/issues/46154\n e.preventDefault();\n },\n tabIndex: null\n }));\n labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, tooltipNode);\n }\n // Required Mark\n const isOptionalMark = requiredMark === 'optional';\n const isRenderMark = typeof requiredMark === 'function';\n if (isRenderMark) {\n labelChildren = requiredMark(labelChildren, {\n required: !!required\n });\n } else if (isOptionalMark && !required) {\n labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-item-optional`,\n title: \"\"\n }, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = _en_US.default.Form) === null || _a === void 0 ? void 0 : _a.optional)));\n }\n const labelClassName = (0, _classnames.default)({\n [`${prefixCls}-item-required`]: required,\n [`${prefixCls}-item-required-mark-optional`]: isOptionalMark || isRenderMark,\n [`${prefixCls}-item-no-colon`]: !computedColon\n });\n return /*#__PURE__*/React.createElement(_col.default, Object.assign({}, mergedLabelCol, {\n className: labelColClassName\n }), /*#__PURE__*/React.createElement(\"label\", {\n htmlFor: htmlFor,\n className: labelClassName,\n title: typeof label === 'string' ? label : ''\n }, labelChildren));\n};\nvar _default = exports.default = FormItemLabel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = ItemHolder;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _isVisible = _interopRequireDefault(require(\"rc-util/lib/Dom/isVisible\"));\nvar _useLayoutEffect = _interopRequireDefault(require(\"rc-util/lib/hooks/useLayoutEffect\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _grid = require(\"../../grid\");\nvar _context = require(\"../context\");\nvar _FormItemInput = _interopRequireDefault(require(\"../FormItemInput\"));\nvar _FormItemLabel = _interopRequireDefault(require(\"../FormItemLabel\"));\nvar _useDebounce = _interopRequireDefault(require(\"../hooks/useDebounce\"));\nvar _util = require(\"../util\");\nvar _StatusProvider = _interopRequireDefault(require(\"./StatusProvider\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction ItemHolder(props) {\n const {\n prefixCls,\n className,\n rootClassName,\n style,\n help,\n errors,\n warnings,\n validateStatus,\n meta,\n hasFeedback,\n hidden,\n children,\n fieldId,\n required,\n isRequired,\n onSubItemMetaChange,\n layout\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"help\", \"errors\", \"warnings\", \"validateStatus\", \"meta\", \"hasFeedback\", \"hidden\", \"children\", \"fieldId\", \"required\", \"isRequired\", \"onSubItemMetaChange\", \"layout\"]);\n const itemPrefixCls = `${prefixCls}-item`;\n const {\n requiredMark,\n vertical: formVertical\n } = React.useContext(_context.FormContext);\n const vertical = formVertical || layout === 'vertical';\n // ======================== Margin ========================\n const itemRef = React.useRef(null);\n const debounceErrors = (0, _useDebounce.default)(errors);\n const debounceWarnings = (0, _useDebounce.default)(warnings);\n const hasHelp = help !== undefined && help !== null;\n const hasError = !!(hasHelp || errors.length || warnings.length);\n const isOnScreen = !!itemRef.current && (0, _isVisible.default)(itemRef.current);\n const [marginBottom, setMarginBottom] = React.useState(null);\n (0, _useLayoutEffect.default)(() => {\n if (hasError && itemRef.current) {\n // The element must be part of the DOMTree to use getComputedStyle\n // https://stackoverflow.com/questions/35360711/getcomputedstyle-returns-a-cssstyledeclaration-but-all-properties-are-empty-on-a\n const itemStyle = getComputedStyle(itemRef.current);\n setMarginBottom(parseInt(itemStyle.marginBottom, 10));\n }\n }, [hasError, isOnScreen]);\n const onErrorVisibleChanged = nextVisible => {\n if (!nextVisible) {\n setMarginBottom(null);\n }\n };\n // ======================== Status ========================\n const getValidateState = function () {\n let isDebounce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n const _errors = isDebounce ? debounceErrors : meta.errors;\n const _warnings = isDebounce ? debounceWarnings : meta.warnings;\n return (0, _util.getStatus)(_errors, _warnings, meta, '', !!hasFeedback, validateStatus);\n };\n const mergedValidateStatus = getValidateState();\n // ======================== Render ========================\n const itemClassName = (0, _classnames.default)(itemPrefixCls, className, rootClassName, {\n [`${itemPrefixCls}-with-help`]: hasHelp || debounceErrors.length || debounceWarnings.length,\n // Status\n [`${itemPrefixCls}-has-feedback`]: mergedValidateStatus && hasFeedback,\n [`${itemPrefixCls}-has-success`]: mergedValidateStatus === 'success',\n [`${itemPrefixCls}-has-warning`]: mergedValidateStatus === 'warning',\n [`${itemPrefixCls}-has-error`]: mergedValidateStatus === 'error',\n [`${itemPrefixCls}-is-validating`]: mergedValidateStatus === 'validating',\n [`${itemPrefixCls}-hidden`]: hidden,\n // Layout\n [`${itemPrefixCls}-${layout}`]: layout\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: itemClassName,\n style: style,\n ref: itemRef\n }, /*#__PURE__*/React.createElement(_grid.Row, Object.assign({\n className: `${itemPrefixCls}-row`\n }, (0, _omit.default)(restProps, ['_internalItemRender', 'colon', 'dependencies', 'extra', 'fieldKey', 'getValueFromEvent', 'getValueProps', 'htmlFor', 'id',\n // It is deprecated because `htmlFor` is its replacement.\n 'initialValue', 'isListField', 'label', 'labelAlign', 'labelCol', 'labelWrap', 'messageVariables', 'name', 'normalize', 'noStyle', 'preserve', 'requiredMark', 'rules', 'shouldUpdate', 'trigger', 'tooltip', 'validateFirst', 'validateTrigger', 'valuePropName', 'wrapperCol', 'validateDebounce'])), /*#__PURE__*/React.createElement(_FormItemLabel.default, Object.assign({\n htmlFor: fieldId\n }, props, {\n requiredMark: requiredMark,\n required: required !== null && required !== void 0 ? required : isRequired,\n prefixCls: prefixCls,\n vertical: vertical\n })), /*#__PURE__*/React.createElement(_FormItemInput.default, Object.assign({}, props, meta, {\n errors: debounceErrors,\n warnings: debounceWarnings,\n prefixCls: prefixCls,\n status: mergedValidateStatus,\n help: help,\n marginBottom: marginBottom,\n onErrorVisibleChanged: onErrorVisibleChanged\n }), /*#__PURE__*/React.createElement(_context.NoStyleItemContext.Provider, {\n value: onSubItemMetaChange\n }, /*#__PURE__*/React.createElement(_StatusProvider.default, {\n prefixCls: prefixCls,\n meta: meta,\n errors: meta.errors,\n warnings: meta.warnings,\n hasFeedback: hasFeedback,\n // Already calculated\n validateStatus: mergedValidateStatus\n }, children)))), !!marginBottom && (/*#__PURE__*/React.createElement(\"div\", {\n className: `${itemPrefixCls}-margin-offset`,\n style: {\n marginBottom: -marginBottom\n }\n })));\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = StatusProvider;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CheckCircleFilled\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nvar _ExclamationCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/ExclamationCircleFilled\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _context = require(\"../context\");\nvar _util = require(\"../util\");\nconst iconMap = {\n success: _CheckCircleFilled.default,\n warning: _ExclamationCircleFilled.default,\n error: _CloseCircleFilled.default,\n validating: _LoadingOutlined.default\n};\nfunction StatusProvider(_ref) {\n let {\n children,\n errors,\n warnings,\n hasFeedback,\n validateStatus,\n prefixCls,\n meta,\n noStyle\n } = _ref;\n const itemPrefixCls = `${prefixCls}-item`;\n const {\n feedbackIcons\n } = React.useContext(_context.FormContext);\n const mergedValidateStatus = (0, _util.getStatus)(errors, warnings, meta, null, !!hasFeedback, validateStatus);\n const {\n isFormItemInput: parentIsFormItemInput,\n status: parentStatus,\n hasFeedback: parentHasFeedback,\n feedbackIcon: parentFeedbackIcon\n } = React.useContext(_context.FormItemInputContext);\n // ====================== Context =======================\n const formItemStatusContext = React.useMemo(() => {\n var _a;\n let feedbackIcon;\n if (hasFeedback) {\n const customIcons = hasFeedback !== true && hasFeedback.icons || feedbackIcons;\n const customIconNode = mergedValidateStatus && ((_a = customIcons === null || customIcons === void 0 ? void 0 : customIcons({\n status: mergedValidateStatus,\n errors,\n warnings\n })) === null || _a === void 0 ? void 0 : _a[mergedValidateStatus]);\n const IconNode = mergedValidateStatus && iconMap[mergedValidateStatus];\n feedbackIcon = customIconNode !== false && IconNode ? (/*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(`${itemPrefixCls}-feedback-icon`, `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`)\n }, customIconNode || /*#__PURE__*/React.createElement(IconNode, null))) : null;\n }\n const context = {\n status: mergedValidateStatus || '',\n errors,\n warnings,\n hasFeedback: !!hasFeedback,\n feedbackIcon,\n isFormItemInput: true\n };\n // No style will follow parent context\n if (noStyle) {\n context.status = (mergedValidateStatus !== null && mergedValidateStatus !== void 0 ? mergedValidateStatus : parentStatus) || '';\n context.isFormItemInput = parentIsFormItemInput;\n context.hasFeedback = !!(hasFeedback !== null && hasFeedback !== void 0 ? hasFeedback : parentHasFeedback);\n context.feedbackIcon = hasFeedback !== undefined ? context.feedbackIcon : parentFeedbackIcon;\n }\n return context;\n }, [mergedValidateStatus, hasFeedback, noStyle, parentIsFormItemInput, parentStatus]);\n // ======================= Render =======================\n return /*#__PURE__*/React.createElement(_context.FormItemInputContext.Provider, {\n value: formItemStatusContext\n }, children);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcFieldForm = require(\"rc-field-form\");\nvar _useState = _interopRequireDefault(require(\"rc-util/lib/hooks/useState\"));\nvar _ref2 = require(\"rc-util/lib/ref\");\nvar _reactNode = require(\"../../_util/reactNode\");\nvar _warning = require(\"../../_util/warning\");\nvar _configProvider = require(\"../../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../../config-provider/hooks/useCSSVarCls\"));\nvar _context = require(\"../context\");\nvar _useChildren = _interopRequireDefault(require(\"../hooks/useChildren\"));\nvar _useFormItemStatus = _interopRequireDefault(require(\"../hooks/useFormItemStatus\"));\nvar _useFrameState = _interopRequireDefault(require(\"../hooks/useFrameState\"));\nvar _useItemRef = _interopRequireDefault(require(\"../hooks/useItemRef\"));\nvar _style = _interopRequireDefault(require(\"../style\"));\nvar _util = require(\"../util\");\nvar _ItemHolder = _interopRequireDefault(require(\"./ItemHolder\"));\nvar _StatusProvider = _interopRequireDefault(require(\"./StatusProvider\"));\nconst NAME_SPLIT = '__SPLIT__';\nconst _ValidateStatuses = ['success', 'warning', 'error', 'validating', ''];\n// https://github.com/ant-design/ant-design/issues/46417\n// `getValueProps` may modify the value props name,\n// we should check if the control is similar.\nfunction isSimilarControl(a, b) {\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(key => {\n const propValueA = a[key];\n const propValueB = b[key];\n return propValueA === propValueB || typeof propValueA === 'function' || typeof propValueB === 'function';\n });\n}\nconst MemoInput = /*#__PURE__*/React.memo(_ref => {\n let {\n children\n } = _ref;\n return children;\n}, (prev, next) => isSimilarControl(prev.control, next.control) && prev.update === next.update && prev.childProps.length === next.childProps.length && prev.childProps.every((value, index) => value === next.childProps[index]));\nfunction genEmptyMeta() {\n return {\n errors: [],\n warnings: [],\n touched: false,\n validating: false,\n name: [],\n validated: false\n };\n}\nfunction InternalFormItem(props) {\n const {\n name,\n noStyle,\n className,\n dependencies,\n prefixCls: customizePrefixCls,\n shouldUpdate,\n rules,\n children,\n required,\n label,\n messageVariables,\n trigger = 'onChange',\n validateTrigger,\n hidden,\n help,\n layout\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const {\n name: formName\n } = React.useContext(_context.FormContext);\n const mergedChildren = (0, _useChildren.default)(children);\n const isRenderProps = typeof mergedChildren === 'function';\n const notifyParentMetaChange = React.useContext(_context.NoStyleItemContext);\n const {\n validateTrigger: contextValidateTrigger\n } = React.useContext(_rcFieldForm.FieldContext);\n const mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : contextValidateTrigger;\n const hasName = !(name === undefined || name === null);\n const prefixCls = getPrefixCls('form', customizePrefixCls);\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n // ========================= Warn =========================\n const warning = (0, _warning.devUseWarning)('Form.Item');\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? warning(name !== null, 'usage', '`null` is passed as `name` property') : void 0;\n }\n // ========================= MISC =========================\n // Get `noStyle` required info\n const listContext = React.useContext(_rcFieldForm.ListContext);\n const fieldKeyPathRef = React.useRef();\n // ======================== Errors ========================\n // >>>>> Collect sub field errors\n const [subFieldErrors, setSubFieldErrors] = (0, _useFrameState.default)({});\n // >>>>> Current field errors\n const [meta, setMeta] = (0, _useState.default)(() => genEmptyMeta());\n const onMetaChange = nextMeta => {\n // This keyInfo is not correct when field is removed\n // Since origin keyManager no longer keep the origin key anymore\n // Which means we need cache origin one and reuse when removed\n const keyInfo = listContext === null || listContext === void 0 ? void 0 : listContext.getKey(nextMeta.name);\n // Destroy will reset all the meta\n setMeta(nextMeta.destroy ? genEmptyMeta() : nextMeta, true);\n // Bump to parent since noStyle\n if (noStyle && help !== false && notifyParentMetaChange) {\n let namePath = nextMeta.name;\n if (!nextMeta.destroy) {\n if (keyInfo !== undefined) {\n const [fieldKey, restPath] = keyInfo;\n namePath = [fieldKey].concat((0, _toConsumableArray2.default)(restPath));\n fieldKeyPathRef.current = namePath;\n }\n } else {\n // Use origin cache data\n namePath = fieldKeyPathRef.current || namePath;\n }\n notifyParentMetaChange(nextMeta, namePath);\n }\n };\n // >>>>> Collect noStyle Field error to the top FormItem\n const onSubItemMetaChange = (subMeta, uniqueKeys) => {\n // Only `noStyle` sub item will trigger\n setSubFieldErrors(prevSubFieldErrors => {\n const clone = Object.assign({}, prevSubFieldErrors);\n // name: ['user', 1] + key: [4] = ['user', 4]\n const mergedNamePath = [].concat((0, _toConsumableArray2.default)(subMeta.name.slice(0, -1)), (0, _toConsumableArray2.default)(uniqueKeys));\n const mergedNameKey = mergedNamePath.join(NAME_SPLIT);\n if (subMeta.destroy) {\n // Remove\n delete clone[mergedNameKey];\n } else {\n // Update\n clone[mergedNameKey] = subMeta;\n }\n return clone;\n });\n };\n // >>>>> Get merged errors\n const [mergedErrors, mergedWarnings] = React.useMemo(() => {\n const errorList = (0, _toConsumableArray2.default)(meta.errors);\n const warningList = (0, _toConsumableArray2.default)(meta.warnings);\n Object.values(subFieldErrors).forEach(subFieldError => {\n errorList.push.apply(errorList, (0, _toConsumableArray2.default)(subFieldError.errors || []));\n warningList.push.apply(warningList, (0, _toConsumableArray2.default)(subFieldError.warnings || []));\n });\n return [errorList, warningList];\n }, [subFieldErrors, meta.errors, meta.warnings]);\n // ===================== Children Ref =====================\n const getItemRef = (0, _useItemRef.default)();\n // ======================== Render ========================\n function renderLayout(baseChildren, fieldId, isRequired) {\n if (noStyle && !hidden) {\n return /*#__PURE__*/React.createElement(_StatusProvider.default, {\n prefixCls: prefixCls,\n hasFeedback: props.hasFeedback,\n validateStatus: props.validateStatus,\n meta: meta,\n errors: mergedErrors,\n warnings: mergedWarnings,\n noStyle: true\n }, baseChildren);\n }\n return /*#__PURE__*/React.createElement(_ItemHolder.default, Object.assign({\n key: \"row\"\n }, props, {\n className: (0, _classnames.default)(className, cssVarCls, rootCls, hashId),\n prefixCls: prefixCls,\n fieldId: fieldId,\n isRequired: isRequired,\n errors: mergedErrors,\n warnings: mergedWarnings,\n meta: meta,\n onSubItemMetaChange: onSubItemMetaChange,\n layout: layout\n }), baseChildren);\n }\n if (!hasName && !isRenderProps && !dependencies) {\n return wrapCSSVar(renderLayout(mergedChildren));\n }\n let variables = {};\n if (typeof label === 'string') {\n variables.label = label;\n } else if (name) {\n variables.label = String(name);\n }\n if (messageVariables) {\n variables = Object.assign(Object.assign({}, variables), messageVariables);\n }\n // >>>>> With Field\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcFieldForm.Field, Object.assign({}, props, {\n messageVariables: variables,\n trigger: trigger,\n validateTrigger: mergedValidateTrigger,\n onMetaChange: onMetaChange\n }), (control, renderMeta, context) => {\n const mergedName = (0, _util.toArray)(name).length && renderMeta ? renderMeta.name : [];\n const fieldId = (0, _util.getFieldId)(mergedName, formName);\n const isRequired = required !== undefined ? required : !!(rules === null || rules === void 0 ? void 0 : rules.some(rule => {\n if (rule && typeof rule === 'object' && rule.required && !rule.warningOnly) {\n return true;\n }\n if (typeof rule === 'function') {\n const ruleEntity = rule(context);\n return (ruleEntity === null || ruleEntity === void 0 ? void 0 : ruleEntity.required) && !(ruleEntity === null || ruleEntity === void 0 ? void 0 : ruleEntity.warningOnly);\n }\n return false;\n }));\n // ======================= Children =======================\n const mergedControl = Object.assign({}, control);\n let childNode = null;\n process.env.NODE_ENV !== \"production\" ? warning(!(shouldUpdate && dependencies), 'usage', \"`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps.\") : void 0;\n if (Array.isArray(mergedChildren) && hasName) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', 'A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item.') : void 0;\n childNode = mergedChildren;\n } else if (isRenderProps && (!(shouldUpdate || dependencies) || hasName)) {\n process.env.NODE_ENV !== \"production\" ? warning(!!(shouldUpdate || dependencies), 'usage', 'A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!hasName, 'usage', 'A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.') : void 0;\n } else if (dependencies && !isRenderProps && !hasName) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', 'Must set `name` or use a render function when `dependencies` is set.') : void 0;\n } else if (/*#__PURE__*/React.isValidElement(mergedChildren)) {\n process.env.NODE_ENV !== \"production\" ? warning(mergedChildren.props.defaultValue === undefined, 'usage', '`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.') : void 0;\n const childProps = Object.assign(Object.assign({}, mergedChildren.props), mergedControl);\n if (!childProps.id) {\n childProps.id = fieldId;\n }\n if (help || mergedErrors.length > 0 || mergedWarnings.length > 0 || props.extra) {\n const describedbyArr = [];\n if (help || mergedErrors.length > 0) {\n describedbyArr.push(`${fieldId}_help`);\n }\n if (props.extra) {\n describedbyArr.push(`${fieldId}_extra`);\n }\n childProps['aria-describedby'] = describedbyArr.join(' ');\n }\n if (mergedErrors.length > 0) {\n childProps['aria-invalid'] = 'true';\n }\n if (isRequired) {\n childProps['aria-required'] = 'true';\n }\n if ((0, _ref2.supportRef)(mergedChildren)) {\n childProps.ref = getItemRef(mergedName, mergedChildren);\n }\n // We should keep user origin event handler\n const triggers = new Set([].concat((0, _toConsumableArray2.default)((0, _util.toArray)(trigger)), (0, _toConsumableArray2.default)((0, _util.toArray)(mergedValidateTrigger))));\n triggers.forEach(eventName => {\n childProps[eventName] = function () {\n var _a2, _c2;\n var _a, _b, _c;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args));\n (_c = (_b = mergedChildren.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args));\n };\n });\n // List of props that need to be watched for changes -> if changes are detected in MemoInput -> rerender\n const watchingChildProps = [childProps['aria-required'], childProps['aria-invalid'], childProps['aria-describedby']];\n childNode = /*#__PURE__*/React.createElement(MemoInput, {\n control: mergedControl,\n update: mergedChildren,\n childProps: watchingChildProps\n }, (0, _reactNode.cloneElement)(mergedChildren, childProps));\n } else if (isRenderProps && (shouldUpdate || dependencies) && !hasName) {\n childNode = mergedChildren(context);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(!mergedName.length || !!noStyle, 'usage', '`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.') : void 0;\n childNode = mergedChildren;\n }\n return renderLayout(childNode, fieldId, isRequired);\n }));\n}\nconst FormItem = InternalFormItem;\nFormItem.useStatus = _useFormItemStatus.default;\nvar _default = exports.default = FormItem;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _rcFieldForm = require(\"rc-field-form\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _context = require(\"./context\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst FormList = _a => {\n var {\n prefixCls: customizePrefixCls,\n children\n } = _a,\n props = __rest(_a, [\"prefixCls\", \"children\"]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Form.List');\n process.env.NODE_ENV !== \"production\" ? warning(typeof props.name === 'number' || (Array.isArray(props.name) ? !!props.name.length : !!props.name), 'usage', 'Miss `name` prop.') : void 0;\n }\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('form', customizePrefixCls);\n const contextValue = React.useMemo(() => ({\n prefixCls,\n status: 'error'\n }), [prefixCls]);\n return /*#__PURE__*/React.createElement(_rcFieldForm.List, Object.assign({}, props), (fields, operation, meta) => (/*#__PURE__*/React.createElement(_context.FormItemPrefixContext.Provider, {\n value: contextValue\n }, children(fields.map(field => Object.assign(Object.assign({}, field), {\n fieldKey: field.key\n })), operation, {\n errors: meta.errors,\n warnings: meta.warnings\n }))));\n};\nvar _default = exports.default = FormList;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.VariantContext = exports.NoStyleItemContext = exports.NoFormStyle = exports.FormProvider = exports.FormItemPrefixContext = exports.FormItemInputContext = exports.FormContext = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _rcFieldForm = require(\"rc-field-form\");\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nconst FormContext = exports.FormContext = /*#__PURE__*/React.createContext({\n labelAlign: 'right',\n vertical: false,\n itemRef: () => {}\n});\nconst NoStyleItemContext = exports.NoStyleItemContext = /*#__PURE__*/React.createContext(null);\nconst FormProvider = props => {\n const providerProps = (0, _omit.default)(props, ['prefixCls']);\n return /*#__PURE__*/React.createElement(_rcFieldForm.FormProvider, Object.assign({}, providerProps));\n};\nexports.FormProvider = FormProvider;\nconst FormItemPrefixContext = exports.FormItemPrefixContext = /*#__PURE__*/React.createContext({\n prefixCls: ''\n});\nconst FormItemInputContext = exports.FormItemInputContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n FormItemInputContext.displayName = 'FormItemInputContext';\n}\nconst NoFormStyle = _ref => {\n let {\n children,\n status,\n override\n } = _ref;\n const formItemInputContext = (0, _react.useContext)(FormItemInputContext);\n const newFormItemInputContext = (0, _react.useMemo)(() => {\n const newContext = Object.assign({}, formItemInputContext);\n if (override) {\n delete newContext.isFormItemInput;\n }\n if (status) {\n delete newContext.status;\n delete newContext.hasFeedback;\n delete newContext.feedbackIcon;\n }\n return newContext;\n }, [status, override, formItemInputContext]);\n return /*#__PURE__*/React.createElement(FormItemInputContext.Provider, {\n value: newFormItemInputContext\n }, children);\n};\nexports.NoFormStyle = NoFormStyle;\nconst VariantContext = exports.VariantContext = /*#__PURE__*/(0, _react.createContext)(undefined);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useChildren;\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nfunction useChildren(children) {\n if (typeof children === 'function') {\n return children;\n }\n const childList = (0, _toArray.default)(children);\n return childList.length <= 1 ? childList[0] : childList;\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useDebounce;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction useDebounce(value) {\n const [cacheValue, setCacheValue] = React.useState(value);\n React.useEffect(() => {\n const timeout = setTimeout(() => {\n setCacheValue(value);\n }, value.length ? 0 : 10);\n return () => {\n clearTimeout(timeout);\n };\n }, [value]);\n return cacheValue;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useForm;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _rcFieldForm = require(\"rc-field-form\");\nvar _findDOMNode = require(\"rc-util/lib/Dom/findDOMNode\");\nvar _scrollIntoViewIfNeeded = _interopRequireDefault(require(\"scroll-into-view-if-needed\"));\nvar _util = require(\"../util\");\nfunction toNamePathStr(name) {\n const namePath = (0, _util.toArray)(name);\n return namePath.join('_');\n}\nfunction getFieldDOMNode(name, wrapForm) {\n const field = wrapForm.getFieldInstance(name);\n const fieldDom = (0, _findDOMNode.getDOM)(field);\n if (fieldDom) {\n return fieldDom;\n }\n const fieldId = (0, _util.getFieldId)((0, _util.toArray)(name), wrapForm.__INTERNAL__.name);\n if (fieldId) {\n return document.getElementById(fieldId);\n }\n}\nfunction useForm(form) {\n const [rcForm] = (0, _rcFieldForm.useForm)();\n const itemsRef = React.useRef({});\n const wrapForm = React.useMemo(() => form !== null && form !== void 0 ? form : Object.assign(Object.assign({}, rcForm), {\n __INTERNAL__: {\n itemRef: name => node => {\n const namePathStr = toNamePathStr(name);\n if (node) {\n itemsRef.current[namePathStr] = node;\n } else {\n delete itemsRef.current[namePathStr];\n }\n }\n },\n scrollToField: function (name) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const node = getFieldDOMNode(name, wrapForm);\n if (node) {\n (0, _scrollIntoViewIfNeeded.default)(node, Object.assign({\n scrollMode: 'if-needed',\n block: 'nearest'\n }, options));\n }\n },\n getFieldInstance: name => {\n const namePathStr = toNamePathStr(name);\n return itemsRef.current[namePathStr];\n }\n }), [form, rcForm]);\n return [wrapForm];\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useFormInstance;\nvar _react = require(\"react\");\nvar _context = require(\"../context\");\nfunction useFormInstance() {\n const {\n form\n } = (0, _react.useContext)(_context.FormContext);\n return form;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nvar _warning = require(\"../../_util/warning\");\nvar _context = require(\"../context\");\nconst useFormItemStatus = () => {\n const {\n status,\n errors = [],\n warnings = []\n } = (0, _react.useContext)(_context.FormItemInputContext);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Form.Item');\n process.env.NODE_ENV !== \"production\" ? warning(status !== undefined, 'usage', 'Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus') : void 0;\n }\n return {\n status,\n errors,\n warnings\n };\n};\n// Only used for compatible package. Not promise this will work on future version.\nuseFormItemStatus.Context = _context.FormItemInputContext;\nvar _default = exports.default = useFormItemStatus;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useFormWarning;\nvar _react = require(\"react\");\nvar _warning = require(\"../../_util/warning\");\nconst names = {};\nfunction useFormWarning(_ref) {\n let {\n name\n } = _ref;\n const warning = (0, _warning.devUseWarning)('Form');\n (0, _react.useEffect)(() => {\n if (name) {\n names[name] = (names[name] || 0) + 1;\n process.env.NODE_ENV !== \"production\" ? warning(names[name] <= 1, 'usage', 'There exist multiple Form with same `name`.') : void 0;\n return () => {\n names[name] -= 1;\n };\n }\n }, [name]);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useFrameState;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nfunction useFrameState(defaultValue) {\n const [value, setValue] = React.useState(defaultValue);\n const frameRef = (0, _react.useRef)(null);\n const batchRef = (0, _react.useRef)([]);\n const destroyRef = (0, _react.useRef)(false);\n React.useEffect(() => {\n destroyRef.current = false;\n return () => {\n destroyRef.current = true;\n _raf.default.cancel(frameRef.current);\n frameRef.current = null;\n };\n }, []);\n function setFrameValue(updater) {\n if (destroyRef.current) {\n return;\n }\n if (frameRef.current === null) {\n batchRef.current = [];\n frameRef.current = (0, _raf.default)(() => {\n frameRef.current = null;\n setValue(prevValue => {\n let current = prevValue;\n batchRef.current.forEach(func => {\n current = func(current);\n });\n return current;\n });\n });\n }\n batchRef.current.push(updater);\n }\n return [value, setFrameValue];\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useItemRef;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _context = require(\"../context\");\nfunction useItemRef() {\n const {\n itemRef\n } = React.useContext(_context.FormContext);\n const cacheRef = React.useRef({});\n function getRef(name, children) {\n const childrenRef = children && typeof children === 'object' && children.ref;\n const nameStr = name.join('_');\n if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) {\n cacheRef.current.name = nameStr;\n cacheRef.current.originRef = childrenRef;\n cacheRef.current.ref = (0, _ref.composeRef)(itemRef(name), childrenRef);\n }\n return cacheRef.current.ref;\n }\n return getRef;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nvar _context = require(\"../context\");\nvar _configProvider = require(\"../../config-provider\");\n/**\n * Compatible for legacy `bordered` prop.\n */\nconst useVariant = function (component, variant) {\n let legacyBordered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n var _a, _b;\n const {\n variant: configVariant,\n [component]: componentConfig\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const ctxVariant = (0, _react.useContext)(_context.VariantContext);\n const configComponentVariant = componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.variant;\n let mergedVariant;\n if (typeof variant !== 'undefined') {\n mergedVariant = variant;\n } else if (legacyBordered === false) {\n mergedVariant = 'borderless';\n } else {\n // form variant > component global variant > global variant\n mergedVariant = (_b = (_a = ctxVariant !== null && ctxVariant !== void 0 ? ctxVariant : configComponentVariant) !== null && _a !== void 0 ? _a : configVariant) !== null && _b !== void 0 ? _b : 'outlined';\n }\n const enableVariantCls = _configProvider.Variants.includes(mergedVariant);\n return [mergedVariant, enableVariantCls];\n};\nvar _default = exports.default = useVariant;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _warning = _interopRequireDefault(require(\"../_util/warning\"));\nvar _context = require(\"./context\");\nvar _ErrorList = _interopRequireDefault(require(\"./ErrorList\"));\nvar _Form = _interopRequireWildcard(require(\"./Form\"));\nvar _FormItem = _interopRequireDefault(require(\"./FormItem\"));\nvar _FormList = _interopRequireDefault(require(\"./FormList\"));\nvar _useFormInstance = _interopRequireDefault(require(\"./hooks/useFormInstance\"));\nconst Form = _Form.default;\nForm.Item = _FormItem.default;\nForm.List = _FormList.default;\nForm.ErrorList = _ErrorList.default;\nForm.useForm = _Form.useForm;\nForm.useFormInstance = _useFormInstance.default;\nForm.useWatch = _Form.useWatch;\nForm.Provider = _context.FormProvider;\nForm.create = () => {\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.') : void 0;\n};\nvar _default = exports.default = Form;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genFormValidateMotionStyle = token => {\n const {\n componentCls\n } = token;\n const helpCls = `${componentCls}-show-help`;\n const helpItemCls = `${componentCls}-show-help-item`;\n return {\n [helpCls]: {\n // Explain holder\n transition: `opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`,\n '&-appear, &-enter': {\n opacity: 0,\n '&-active': {\n opacity: 1\n }\n },\n '&-leave': {\n opacity: 1,\n '&-active': {\n opacity: 0\n }\n },\n // Explain\n [helpItemCls]: {\n overflow: 'hidden',\n transition: `height ${token.motionDurationSlow} ${token.motionEaseInOut},\n opacity ${token.motionDurationSlow} ${token.motionEaseInOut},\n transform ${token.motionDurationSlow} ${token.motionEaseInOut} !important`,\n [`&${helpItemCls}-appear, &${helpItemCls}-enter`]: {\n transform: `translateY(-5px)`,\n opacity: 0,\n '&-active': {\n transform: 'translateY(0)',\n opacity: 1\n }\n },\n [`&${helpItemCls}-leave-active`]: {\n transform: `translateY(-5px)`\n }\n }\n }\n };\n};\nvar _default = exports.default = genFormValidateMotionStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ = require(\".\");\nvar _internal = require(\"../../theme/internal\");\n/**\n * Fallback of IE.\n * Safe to remove.\n */\n// Style as inline component\n\n// ============================= Fallback =============================\nconst genFallbackStyle = token => {\n const {\n formItemCls\n } = token;\n return {\n '@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)': {\n // Fallback for IE, safe to remove we not support it anymore\n [`${formItemCls}-control`]: {\n display: 'flex'\n }\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genSubStyleComponent)(['Form', 'item-item'], (token, _ref) => {\n let {\n rootPrefixCls\n } = _ref;\n const formToken = (0, _.prepareToken)(token, rootPrefixCls);\n return [genFallbackStyle(formToken)];\n});","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareToken = exports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _internal = require(\"../../theme/internal\");\nvar _explain = _interopRequireDefault(require(\"./explain\"));\nconst resetForm = token => ({\n legend: {\n display: 'block',\n width: '100%',\n marginBottom: token.marginLG,\n padding: 0,\n color: token.colorTextDescription,\n fontSize: token.fontSizeLG,\n lineHeight: 'inherit',\n border: 0,\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`\n },\n 'input[type=\"search\"]': {\n boxSizing: 'border-box'\n },\n // Position radios and checkboxes better\n 'input[type=\"radio\"], input[type=\"checkbox\"]': {\n lineHeight: 'normal'\n },\n 'input[type=\"file\"]': {\n display: 'block'\n },\n // Make range inputs behave like textual form controls\n 'input[type=\"range\"]': {\n display: 'block',\n width: '100%'\n },\n // Make multiple select elements height not fixed\n 'select[multiple], select[size]': {\n height: 'auto'\n },\n // Focus for file, radio, and checkbox\n [`input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus`]: {\n outline: 0,\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(token.controlOutlineWidth)} ${token.controlOutline}`\n },\n // Adjust output element\n output: {\n display: 'block',\n paddingTop: 15,\n color: token.colorText,\n fontSize: token.fontSize,\n lineHeight: token.lineHeight\n }\n});\nconst genFormSize = (token, height) => {\n const {\n formItemCls\n } = token;\n return {\n [formItemCls]: {\n [`${formItemCls}-label > label`]: {\n height\n },\n [`${formItemCls}-control-input`]: {\n minHeight: height\n }\n }\n };\n};\nconst genFormStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [token.componentCls]: Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), resetForm(token)), {\n [`${componentCls}-text`]: {\n display: 'inline-block',\n paddingInlineEnd: token.paddingSM\n },\n // ================================================================\n // = Size =\n // ================================================================\n '&-small': Object.assign({}, genFormSize(token, token.controlHeightSM)),\n '&-large': Object.assign({}, genFormSize(token, token.controlHeightLG))\n })\n };\n};\nconst genFormItemStyle = token => {\n const {\n formItemCls,\n iconCls,\n componentCls,\n rootPrefixCls,\n antCls,\n labelRequiredMarkColor,\n labelColor,\n labelFontSize,\n labelHeight,\n labelColonMarginInlineStart,\n labelColonMarginInlineEnd,\n itemMarginBottom\n } = token;\n return {\n [formItemCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n marginBottom: itemMarginBottom,\n verticalAlign: 'top',\n '&-with-help': {\n transition: 'none'\n },\n [`&-hidden,\n &-hidden${antCls}-row`]: {\n // https://github.com/ant-design/ant-design/issues/26141\n display: 'none'\n },\n '&-has-warning': {\n [`${formItemCls}-split`]: {\n color: token.colorError\n }\n },\n '&-has-error': {\n [`${formItemCls}-split`]: {\n color: token.colorWarning\n }\n },\n // ==============================================================\n // = Label =\n // ==============================================================\n [`${formItemCls}-label`]: {\n flexGrow: 0,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textAlign: 'end',\n verticalAlign: 'middle',\n '&-left': {\n textAlign: 'start'\n },\n '&-wrap': {\n overflow: 'unset',\n lineHeight: token.lineHeight,\n whiteSpace: 'unset'\n },\n '> label': {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n maxWidth: '100%',\n height: labelHeight,\n color: labelColor,\n fontSize: labelFontSize,\n [`> ${iconCls}`]: {\n fontSize: token.fontSize,\n verticalAlign: 'top'\n },\n // Required mark\n [`&${formItemCls}-required:not(${formItemCls}-required-mark-optional)::before`]: {\n display: 'inline-block',\n marginInlineEnd: token.marginXXS,\n color: labelRequiredMarkColor,\n fontSize: token.fontSize,\n fontFamily: 'SimSun, sans-serif',\n lineHeight: 1,\n content: '\"*\"',\n [`${componentCls}-hide-required-mark &`]: {\n display: 'none'\n }\n },\n // Optional mark\n [`${formItemCls}-optional`]: {\n display: 'inline-block',\n marginInlineStart: token.marginXXS,\n color: token.colorTextDescription,\n [`${componentCls}-hide-required-mark &`]: {\n display: 'none'\n }\n },\n // Optional mark\n [`${formItemCls}-tooltip`]: {\n color: token.colorTextDescription,\n cursor: 'help',\n writingMode: 'horizontal-tb',\n marginInlineStart: token.marginXXS\n },\n '&::after': {\n content: '\":\"',\n position: 'relative',\n marginBlock: 0,\n marginInlineStart: labelColonMarginInlineStart,\n marginInlineEnd: labelColonMarginInlineEnd\n },\n [`&${formItemCls}-no-colon::after`]: {\n content: '\"\\\\a0\"'\n }\n }\n },\n // ==============================================================\n // = Input =\n // ==============================================================\n [`${formItemCls}-control`]: {\n ['--ant-display']: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n [`&:first-child:not([class^=\"'${rootPrefixCls}-col-'\"]):not([class*=\"' ${rootPrefixCls}-col-'\"])`]: {\n width: '100%'\n },\n '&-input': {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n minHeight: token.controlHeight,\n '&-content': {\n flex: 'auto',\n maxWidth: '100%'\n }\n }\n },\n // ==============================================================\n // = Explain =\n // ==============================================================\n [formItemCls]: {\n '&-explain, &-extra': {\n clear: 'both',\n color: token.colorTextDescription,\n fontSize: token.fontSize,\n lineHeight: token.lineHeight\n },\n '&-explain-connected': {\n width: '100%'\n },\n '&-extra': {\n minHeight: token.controlHeightSM,\n transition: `color ${token.motionDurationMid} ${token.motionEaseOut}` // sync input color transition\n },\n '&-explain': {\n '&-error': {\n color: token.colorError\n },\n '&-warning': {\n color: token.colorWarning\n }\n }\n },\n [`&-with-help ${formItemCls}-explain`]: {\n height: 'auto',\n opacity: 1\n },\n // ==============================================================\n // = Feedback Icon =\n // ==============================================================\n [`${formItemCls}-feedback-icon`]: {\n fontSize: token.fontSize,\n textAlign: 'center',\n visibility: 'visible',\n animationName: _motion.zoomIn,\n animationDuration: token.motionDurationMid,\n animationTimingFunction: token.motionEaseOutBack,\n pointerEvents: 'none',\n '&-success': {\n color: token.colorSuccess\n },\n '&-error': {\n color: token.colorError\n },\n '&-warning': {\n color: token.colorWarning\n },\n '&-validating': {\n color: token.colorPrimary\n }\n }\n })\n };\n};\nconst genHorizontalStyle = (token, className) => {\n const {\n formItemCls\n } = token;\n return {\n [`${className}-horizontal`]: {\n [`${formItemCls}-label`]: {\n flexGrow: 0\n },\n [`${formItemCls}-control`]: {\n flex: '1 1 0',\n // https://github.com/ant-design/ant-design/issues/32777\n // https://github.com/ant-design/ant-design/issues/33773\n minWidth: 0\n },\n // Do not change this to `ant-col-24`! `-24` match all the responsive rules\n // https://github.com/ant-design/ant-design/issues/32980\n // https://github.com/ant-design/ant-design/issues/34903\n // https://github.com/ant-design/ant-design/issues/44538\n [`${formItemCls}-label[class$='-24'], ${formItemCls}-label[class*='-24 ']`]: {\n [`& + ${formItemCls}-control`]: {\n minWidth: 'unset'\n }\n }\n }\n };\n};\nconst genInlineStyle = token => {\n const {\n componentCls,\n formItemCls,\n inlineItemMarginBottom\n } = token;\n return {\n [`${componentCls}-inline`]: {\n display: 'flex',\n flexWrap: 'wrap',\n [formItemCls]: {\n flex: 'none',\n marginInlineEnd: token.margin,\n marginBottom: inlineItemMarginBottom,\n '&-row': {\n flexWrap: 'nowrap'\n },\n [`> ${formItemCls}-label,\n > ${formItemCls}-control`]: {\n display: 'inline-block',\n verticalAlign: 'top'\n },\n [`> ${formItemCls}-label`]: {\n flex: 'none'\n },\n [`${componentCls}-text`]: {\n display: 'inline-block'\n },\n [`${formItemCls}-has-feedback`]: {\n display: 'inline-block'\n }\n }\n }\n };\n};\nconst makeVerticalLayoutLabel = token => ({\n padding: token.verticalLabelPadding,\n margin: token.verticalLabelMargin,\n whiteSpace: 'initial',\n textAlign: 'start',\n '> label': {\n margin: 0,\n '&::after': {\n // https://github.com/ant-design/ant-design/issues/43538\n visibility: 'hidden'\n }\n }\n});\nconst makeVerticalLayout = token => {\n const {\n componentCls,\n formItemCls,\n rootPrefixCls\n } = token;\n return {\n [`${formItemCls} ${formItemCls}-label`]: makeVerticalLayoutLabel(token),\n // ref: https://github.com/ant-design/ant-design/issues/45122\n [`${componentCls}:not(${componentCls}-inline)`]: {\n [formItemCls]: {\n flexWrap: 'wrap',\n [`${formItemCls}-label, ${formItemCls}-control`]: {\n // When developer pass `xs: { span }`,\n // It should follow the `xs` screen config\n // ref: https://github.com/ant-design/ant-design/issues/44386\n [`&:not([class*=\" ${rootPrefixCls}-col-xs\"])`]: {\n flex: '0 0 100%',\n maxWidth: '100%'\n }\n }\n }\n }\n };\n};\nconst genVerticalStyle = token => {\n const {\n componentCls,\n formItemCls,\n antCls\n } = token;\n return {\n [`${componentCls}-vertical`]: {\n [`${formItemCls}:not(${formItemCls}-horizontal)`]: {\n [`${formItemCls}-row`]: {\n flexDirection: 'column'\n },\n [`${formItemCls}-label > label`]: {\n height: 'auto'\n },\n [`${formItemCls}-control`]: {\n width: '100%'\n },\n [`${formItemCls}-label,\n ${antCls}-col-24${formItemCls}-label,\n ${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n },\n [`@media (max-width: ${(0, _cssinjs.unit)(token.screenXSMax)})`]: [makeVerticalLayout(token), {\n [componentCls]: {\n [`${formItemCls}:not(${formItemCls}-horizontal)`]: {\n [`${antCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n }\n }],\n [`@media (max-width: ${(0, _cssinjs.unit)(token.screenSMMax)})`]: {\n [componentCls]: {\n [`${formItemCls}:not(${formItemCls}-horizontal)`]: {\n [`${antCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n }\n },\n [`@media (max-width: ${(0, _cssinjs.unit)(token.screenMDMax)})`]: {\n [componentCls]: {\n [`${formItemCls}:not(${formItemCls}-horizontal)`]: {\n [`${antCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n }\n },\n [`@media (max-width: ${(0, _cssinjs.unit)(token.screenLGMax)})`]: {\n [componentCls]: {\n [`${formItemCls}:not(${formItemCls}-horizontal)`]: {\n [`${antCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n }\n }\n };\n};\nconst genItemVerticalStyle = token => {\n const {\n formItemCls,\n antCls\n } = token;\n return {\n [`${formItemCls}-vertical`]: {\n [`${formItemCls}-row`]: {\n flexDirection: 'column'\n },\n [`${formItemCls}-label > label`]: {\n height: 'auto'\n },\n [`${formItemCls}-control`]: {\n width: '100%'\n }\n },\n [`${formItemCls}-vertical ${formItemCls}-label,\n ${antCls}-col-24${formItemCls}-label,\n ${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token),\n [`@media (max-width: ${(0, _cssinjs.unit)(token.screenXSMax)})`]: [makeVerticalLayout(token), {\n [formItemCls]: {\n [`${antCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n }],\n [`@media (max-width: ${(0, _cssinjs.unit)(token.screenSMMax)})`]: {\n [formItemCls]: {\n [`${antCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n },\n [`@media (max-width: ${(0, _cssinjs.unit)(token.screenMDMax)})`]: {\n [formItemCls]: {\n [`${antCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n },\n [`@media (max-width: ${(0, _cssinjs.unit)(token.screenLGMax)})`]: {\n [formItemCls]: {\n [`${antCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)\n }\n }\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => ({\n labelRequiredMarkColor: token.colorError,\n labelColor: token.colorTextHeading,\n labelFontSize: token.fontSize,\n labelHeight: token.controlHeight,\n labelColonMarginInlineStart: token.marginXXS / 2,\n labelColonMarginInlineEnd: token.marginXS,\n itemMarginBottom: token.marginLG,\n verticalLabelPadding: `0 0 ${token.paddingXS}px`,\n verticalLabelMargin: 0,\n inlineItemMarginBottom: 0\n});\nexports.prepareComponentToken = prepareComponentToken;\nconst prepareToken = (token, rootPrefixCls) => {\n const formToken = (0, _internal.mergeToken)(token, {\n formItemCls: `${token.componentCls}-item`,\n rootPrefixCls\n });\n return formToken;\n};\nexports.prepareToken = prepareToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Form', (token, _ref) => {\n let {\n rootPrefixCls\n } = _ref;\n const formToken = prepareToken(token, rootPrefixCls);\n return [genFormStyle(formToken), genFormItemStyle(formToken), (0, _explain.default)(formToken), genHorizontalStyle(formToken, formToken.componentCls), genHorizontalStyle(formToken, formToken.formItemCls), genInlineStyle(formToken), genVerticalStyle(formToken), genItemVerticalStyle(formToken), (0, _motion.genCollapseMotion)(formToken), _motion.zoomIn];\n}, prepareComponentToken, {\n // Let From style before the Grid\n // ref https://github.com/ant-design/ant-design/issues/44386\n order: -1000\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFieldId = getFieldId;\nexports.getStatus = getStatus;\nexports.toArray = toArray;\n// form item name black list. in form ,you can use form.id get the form item element.\n// use object hasOwnProperty will get better performance if black list is longer.\nconst formItemNameBlackList = ['parentNode'];\n// default form item id prefix.\nconst defaultItemNamePrefixCls = 'form_item';\nfunction toArray(candidate) {\n if (candidate === undefined || candidate === false) return [];\n return Array.isArray(candidate) ? candidate : [candidate];\n}\nfunction getFieldId(namePath, formName) {\n if (!namePath.length) {\n return undefined;\n }\n const mergedId = namePath.join('_');\n if (formName) {\n return `${formName}_${mergedId}`;\n }\n const isIllegalName = formItemNameBlackList.includes(mergedId);\n return isIllegalName ? `${defaultItemNamePrefixCls}_${mergedId}` : mergedId;\n}\n/**\n * Get merged status by meta or passed `validateStatus`.\n */\nfunction getStatus(errors, warnings, meta, defaultValidateStatus, hasFeedback, validateStatus) {\n let status = defaultValidateStatus;\n if (validateStatus !== undefined) {\n status = validateStatus;\n } else if (meta.validating) {\n status = 'validating';\n } else if (errors.length) {\n status = 'error';\n } else if (warnings.length) {\n status = 'warning';\n } else if (meta.touched || hasFeedback && meta.validated) {\n // success feedback should display when pass hasFeedback prop and current value is valid value\n status = 'success';\n }\n return status;\n}","\"use strict\";\n\"use client\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\n// ZombieJ: We export single file here since\n// ConfigProvider use this which will make loop deps\n// to import whole `rc-field-form`\nvar _default = exports.default = /*#__PURE__*/(0, _react.createContext)(undefined);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nconst RowContext = /*#__PURE__*/(0, _react.createContext)({});\nvar _default = exports.default = RowContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar _RowContext = _interopRequireDefault(require(\"./RowContext\"));\nvar _style = require(\"./style\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction parseFlex(flex) {\n if (typeof flex === 'number') {\n return `${flex} ${flex} auto`;\n }\n if (/^\\d+(\\.\\d+)?(px|em|rem|%)$/.test(flex)) {\n return `0 0 ${flex}`;\n }\n return flex;\n}\nconst sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];\nconst Col = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const {\n gutter,\n wrap\n } = React.useContext(_RowContext.default);\n const {\n prefixCls: customizePrefixCls,\n span,\n order,\n offset,\n push,\n pull,\n className,\n children,\n flex,\n style\n } = props,\n others = __rest(props, [\"prefixCls\", \"span\", \"order\", \"offset\", \"push\", \"pull\", \"className\", \"children\", \"flex\", \"style\"]);\n const prefixCls = getPrefixCls('col', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.useColStyle)(prefixCls);\n // ===================== Size ======================\n const sizeStyle = {};\n let sizeClassObj = {};\n sizes.forEach(size => {\n let sizeProps = {};\n const propSize = props[size];\n if (typeof propSize === 'number') {\n sizeProps.span = propSize;\n } else if (typeof propSize === 'object') {\n sizeProps = propSize || {};\n }\n delete others[size];\n sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {\n [`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span !== undefined,\n [`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,\n [`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,\n [`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,\n [`${prefixCls}-${size}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n // Responsive flex layout\n if (sizeProps.flex) {\n sizeClassObj[`${prefixCls}-${size}-flex`] = true;\n sizeStyle[`--${prefixCls}-${size}-flex`] = parseFlex(sizeProps.flex);\n }\n });\n // ==================== Normal =====================\n const classes = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-${span}`]: span !== undefined,\n [`${prefixCls}-order-${order}`]: order,\n [`${prefixCls}-offset-${offset}`]: offset,\n [`${prefixCls}-push-${push}`]: push,\n [`${prefixCls}-pull-${pull}`]: pull\n }, className, sizeClassObj, hashId, cssVarCls);\n const mergedStyle = {};\n // Horizontal gutter use padding\n if (gutter && gutter[0] > 0) {\n const horizontalGutter = gutter[0] / 2;\n mergedStyle.paddingLeft = horizontalGutter;\n mergedStyle.paddingRight = horizontalGutter;\n }\n if (flex) {\n mergedStyle.flex = parseFlex(flex);\n // Hack for Firefox to avoid size issue\n // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553\n if (wrap === false && !mergedStyle.minWidth) {\n mergedStyle.minWidth = 0;\n }\n }\n // ==================== Render =====================\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({}, others, {\n style: Object.assign(Object.assign(Object.assign({}, mergedStyle), style), sizeStyle),\n className: classes,\n ref: ref\n }), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n Col.displayName = 'Col';\n}\nvar _default = exports.default = Col;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nvar _useLayoutEffect = _interopRequireDefault(require(\"rc-util/lib/hooks/useLayoutEffect\"));\nvar _useForceUpdate = _interopRequireDefault(require(\"../../_util/hooks/useForceUpdate\"));\nvar _responsiveObserver = _interopRequireDefault(require(\"../../_util/responsiveObserver\"));\nfunction useBreakpoint() {\n let refreshOnChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n const screensRef = (0, _react.useRef)({});\n const forceUpdate = (0, _useForceUpdate.default)();\n const responsiveObserver = (0, _responsiveObserver.default)();\n (0, _useLayoutEffect.default)(() => {\n const token = responsiveObserver.subscribe(supportScreens => {\n screensRef.current = supportScreens;\n if (refreshOnChange) {\n forceUpdate();\n }\n });\n return () => responsiveObserver.unsubscribe(token);\n }, []);\n return screensRef.current;\n}\nvar _default = exports.default = useBreakpoint;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Col\", {\n enumerable: true,\n get: function () {\n return _col.default;\n }\n});\nObject.defineProperty(exports, \"Row\", {\n enumerable: true,\n get: function () {\n return _row.default;\n }\n});\nexports.default = void 0;\nvar _col = _interopRequireDefault(require(\"./col\"));\nvar _useBreakpoint = _interopRequireDefault(require(\"./hooks/useBreakpoint\"));\nvar _row = _interopRequireDefault(require(\"./row\"));\n// Do not export params\nfunction useBreakpoint() {\n return (0, _useBreakpoint.default)();\n}\nvar _default = exports.default = {\n useBreakpoint\n};","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _responsiveObserver = _interopRequireWildcard(require(\"../_util/responsiveObserver\"));\nvar _configProvider = require(\"../config-provider\");\nvar _RowContext = _interopRequireDefault(require(\"./RowContext\"));\nvar _style = require(\"./style\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst _RowAligns = ['top', 'middle', 'bottom', 'stretch'];\nconst _RowJustify = ['start', 'end', 'center', 'space-around', 'space-between', 'space-evenly'];\nfunction useMergedPropByScreen(oriProp, screen) {\n const [prop, setProp] = React.useState(typeof oriProp === 'string' ? oriProp : '');\n const calcMergedAlignOrJustify = () => {\n if (typeof oriProp === 'string') {\n setProp(oriProp);\n }\n if (typeof oriProp !== 'object') {\n return;\n }\n for (let i = 0; i < _responsiveObserver.responsiveArray.length; i++) {\n const breakpoint = _responsiveObserver.responsiveArray[i];\n // if do not match, do nothing\n if (!screen[breakpoint]) {\n continue;\n }\n const curVal = oriProp[breakpoint];\n if (curVal !== undefined) {\n setProp(curVal);\n return;\n }\n }\n };\n React.useEffect(() => {\n calcMergedAlignOrJustify();\n }, [JSON.stringify(oriProp), screen]);\n return prop;\n}\nconst Row = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n justify,\n align,\n className,\n style,\n children,\n gutter = 0,\n wrap\n } = props,\n others = __rest(props, [\"prefixCls\", \"justify\", \"align\", \"className\", \"style\", \"children\", \"gutter\", \"wrap\"]);\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const [screens, setScreens] = React.useState({\n xs: true,\n sm: true,\n md: true,\n lg: true,\n xl: true,\n xxl: true\n });\n // to save screens info when responsiveObserve callback had been call\n const [curScreens, setCurScreens] = React.useState({\n xs: false,\n sm: false,\n md: false,\n lg: false,\n xl: false,\n xxl: false\n });\n // ================================== calc responsive data ==================================\n const mergedAlign = useMergedPropByScreen(align, curScreens);\n const mergedJustify = useMergedPropByScreen(justify, curScreens);\n const gutterRef = React.useRef(gutter);\n const responsiveObserver = (0, _responsiveObserver.default)();\n // ================================== Effect ==================================\n React.useEffect(() => {\n const token = responsiveObserver.subscribe(screen => {\n setCurScreens(screen);\n const currentGutter = gutterRef.current || 0;\n if (!Array.isArray(currentGutter) && typeof currentGutter === 'object' || Array.isArray(currentGutter) && (typeof currentGutter[0] === 'object' || typeof currentGutter[1] === 'object')) {\n setScreens(screen);\n }\n });\n return () => responsiveObserver.unsubscribe(token);\n }, []);\n // ================================== Render ==================================\n const getGutter = () => {\n const results = [undefined, undefined];\n const normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, undefined];\n normalizedGutter.forEach((g, index) => {\n if (typeof g === 'object') {\n for (let i = 0; i < _responsiveObserver.responsiveArray.length; i++) {\n const breakpoint = _responsiveObserver.responsiveArray[i];\n if (screens[breakpoint] && g[breakpoint] !== undefined) {\n results[index] = g[breakpoint];\n break;\n }\n }\n } else {\n results[index] = g;\n }\n });\n return results;\n };\n const prefixCls = getPrefixCls('row', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.useRowStyle)(prefixCls);\n const gutters = getGutter();\n const classes = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-no-wrap`]: wrap === false,\n [`${prefixCls}-${mergedJustify}`]: mergedJustify,\n [`${prefixCls}-${mergedAlign}`]: mergedAlign,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, hashId, cssVarCls);\n // Add gutter related style\n const rowStyle = {};\n const horizontalGutter = gutters[0] != null && gutters[0] > 0 ? gutters[0] / -2 : undefined;\n if (horizontalGutter) {\n rowStyle.marginLeft = horizontalGutter;\n rowStyle.marginRight = horizontalGutter;\n }\n // \"gutters\" is a new array in each rendering phase, it'll make 'React.useMemo' effectless.\n // So we deconstruct \"gutters\" variable here.\n const [gutterH, gutterV] = gutters;\n rowStyle.rowGap = gutterV;\n const rowContext = React.useMemo(() => ({\n gutter: [gutterH, gutterV],\n wrap\n }), [gutterH, gutterV, wrap]);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_RowContext.default.Provider, {\n value: rowContext\n }, /*#__PURE__*/React.createElement(\"div\", Object.assign({}, others, {\n className: classes,\n style: Object.assign(Object.assign({}, rowStyle), style),\n ref: ref\n }), children)));\n});\nif (process.env.NODE_ENV !== 'production') {\n Row.displayName = 'Row';\n}\nvar _default = exports.default = Row;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useRowStyle = exports.useColStyle = exports.prepareRowComponentToken = exports.prepareColComponentToken = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Row-Shared ==============================\nconst genGridRowStyle = token => {\n const {\n componentCls\n } = token;\n return {\n // Grid system\n [componentCls]: {\n display: 'flex',\n flexFlow: 'row wrap',\n minWidth: 0,\n '&::before, &::after': {\n display: 'flex'\n },\n '&-no-wrap': {\n flexWrap: 'nowrap'\n },\n // The origin of the X-axis\n '&-start': {\n justifyContent: 'flex-start'\n },\n // The center of the X-axis\n '&-center': {\n justifyContent: 'center'\n },\n // The opposite of the X-axis\n '&-end': {\n justifyContent: 'flex-end'\n },\n '&-space-between': {\n justifyContent: 'space-between'\n },\n '&-space-around': {\n justifyContent: 'space-around'\n },\n '&-space-evenly': {\n justifyContent: 'space-evenly'\n },\n // Align at the top\n '&-top': {\n alignItems: 'flex-start'\n },\n // Align at the center\n '&-middle': {\n alignItems: 'center'\n },\n '&-bottom': {\n alignItems: 'flex-end'\n }\n }\n };\n};\n// ============================== Col-Shared ==============================\nconst genGridColStyle = token => {\n const {\n componentCls\n } = token;\n return {\n // Grid system\n [componentCls]: {\n position: 'relative',\n maxWidth: '100%',\n // Prevent columns from collapsing when empty\n minHeight: 1\n }\n };\n};\nconst genLoopGridColumnsStyle = (token, sizeCls) => {\n const {\n prefixCls,\n componentCls,\n gridColumns\n } = token;\n const gridColumnsStyle = {};\n for (let i = gridColumns; i >= 0; i--) {\n if (i === 0) {\n gridColumnsStyle[`${componentCls}${sizeCls}-${i}`] = {\n display: 'none'\n };\n gridColumnsStyle[`${componentCls}-push-${i}`] = {\n insetInlineStart: 'auto'\n };\n gridColumnsStyle[`${componentCls}-pull-${i}`] = {\n insetInlineEnd: 'auto'\n };\n gridColumnsStyle[`${componentCls}${sizeCls}-push-${i}`] = {\n insetInlineStart: 'auto'\n };\n gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i}`] = {\n insetInlineEnd: 'auto'\n };\n gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i}`] = {\n marginInlineStart: 0\n };\n gridColumnsStyle[`${componentCls}${sizeCls}-order-${i}`] = {\n order: 0\n };\n } else {\n gridColumnsStyle[`${componentCls}${sizeCls}-${i}`] = [\n // https://github.com/ant-design/ant-design/issues/44456\n // Form set `display: flex` on Col which will override `display: block`.\n // Let's get it from css variable to support override.\n {\n ['--ant-display']: 'block',\n // Fallback to display if variable not support\n display: 'block'\n }, {\n display: 'var(--ant-display)',\n flex: `0 0 ${i / gridColumns * 100}%`,\n maxWidth: `${i / gridColumns * 100}%`\n }];\n gridColumnsStyle[`${componentCls}${sizeCls}-push-${i}`] = {\n insetInlineStart: `${i / gridColumns * 100}%`\n };\n gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i}`] = {\n insetInlineEnd: `${i / gridColumns * 100}%`\n };\n gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i}`] = {\n marginInlineStart: `${i / gridColumns * 100}%`\n };\n gridColumnsStyle[`${componentCls}${sizeCls}-order-${i}`] = {\n order: i\n };\n }\n }\n // Flex CSS Var\n gridColumnsStyle[`${componentCls}${sizeCls}-flex`] = {\n flex: `var(--${prefixCls}${sizeCls}-flex)`\n };\n return gridColumnsStyle;\n};\nconst genGridStyle = (token, sizeCls) => genLoopGridColumnsStyle(token, sizeCls);\nconst genGridMediaStyle = (token, screenSize, sizeCls) => ({\n [`@media (min-width: ${(0, _cssinjs.unit)(screenSize)})`]: Object.assign({}, genGridStyle(token, sizeCls))\n});\nconst prepareRowComponentToken = () => ({});\nexports.prepareRowComponentToken = prepareRowComponentToken;\nconst prepareColComponentToken = () => ({});\n// ============================== Export ==============================\nexports.prepareColComponentToken = prepareColComponentToken;\nconst useRowStyle = exports.useRowStyle = (0, _internal.genStyleHooks)('Grid', genGridRowStyle, prepareRowComponentToken);\nconst useColStyle = exports.useColStyle = (0, _internal.genStyleHooks)('Grid', token => {\n const gridToken = (0, _internal.mergeToken)(token, {\n gridColumns: 24 // Row is divided into 24 parts in Grid\n });\n const gridMediaSizesMap = {\n '-sm': gridToken.screenSMMin,\n '-md': gridToken.screenMDMin,\n '-lg': gridToken.screenLGMin,\n '-xl': gridToken.screenXLMin,\n '-xxl': gridToken.screenXXLMin\n };\n return [genGridColStyle(gridToken), genGridStyle(gridToken, ''), genGridStyle(gridToken, '-xs'), Object.keys(gridMediaSizesMap).map(key => genGridMediaStyle(gridToken, gridMediaSizesMap[key], key)).reduce((pre, cur) => Object.assign(Object.assign({}, pre), cur), {})];\n}, prepareColComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.icons = exports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _LeftOutlined = _interopRequireDefault(require(\"@ant-design/icons/LeftOutlined\"));\nvar _RightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RightOutlined\"));\nvar _RotateLeftOutlined = _interopRequireDefault(require(\"@ant-design/icons/RotateLeftOutlined\"));\nvar _RotateRightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RotateRightOutlined\"));\nvar _SwapOutlined = _interopRequireDefault(require(\"@ant-design/icons/SwapOutlined\"));\nvar _ZoomInOutlined = _interopRequireDefault(require(\"@ant-design/icons/ZoomInOutlined\"));\nvar _ZoomOutOutlined = _interopRequireDefault(require(\"@ant-design/icons/ZoomOutOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcImage = _interopRequireDefault(require(\"rc-image\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst icons = exports.icons = {\n rotateLeft: /*#__PURE__*/React.createElement(_RotateLeftOutlined.default, null),\n rotateRight: /*#__PURE__*/React.createElement(_RotateRightOutlined.default, null),\n zoomIn: /*#__PURE__*/React.createElement(_ZoomInOutlined.default, null),\n zoomOut: /*#__PURE__*/React.createElement(_ZoomOutOutlined.default, null),\n close: /*#__PURE__*/React.createElement(_CloseOutlined.default, null),\n left: /*#__PURE__*/React.createElement(_LeftOutlined.default, null),\n right: /*#__PURE__*/React.createElement(_RightOutlined.default, null),\n flipX: /*#__PURE__*/React.createElement(_SwapOutlined.default, null),\n flipY: /*#__PURE__*/React.createElement(_SwapOutlined.default, {\n rotate: 90\n })\n};\nconst InternalPreviewGroup = _a => {\n var {\n previewPrefixCls: customizePrefixCls,\n preview\n } = _a,\n otherProps = __rest(_a, [\"previewPrefixCls\", \"preview\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('image', customizePrefixCls);\n const previewPrefixCls = `${prefixCls}-preview`;\n const rootPrefixCls = getPrefixCls();\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const [zIndex] = (0, _useZIndex.useZIndex)('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);\n const mergedPreview = React.useMemo(() => {\n var _a;\n if (preview === false) {\n return preview;\n }\n const _preview = typeof preview === 'object' ? preview : {};\n const mergedRootClassName = (0, _classnames.default)(hashId, cssVarCls, rootCls, (_a = _preview.rootClassName) !== null && _a !== void 0 ? _a : '');\n return Object.assign(Object.assign({}, _preview), {\n transitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'zoom', _preview.transitionName),\n maskTransitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'fade', _preview.maskTransitionName),\n rootClassName: mergedRootClassName,\n zIndex\n });\n }, [preview]);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcImage.default.PreviewGroup, Object.assign({\n preview: mergedPreview,\n previewPrefixCls: previewPrefixCls,\n icons: icons\n }, otherProps)));\n};\nvar _default = exports.default = InternalPreviewGroup;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _EyeOutlined = _interopRequireDefault(require(\"@ant-design/icons/EyeOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcImage = _interopRequireDefault(require(\"rc-image\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _PreviewGroup = _interopRequireWildcard(require(\"./PreviewGroup\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Image = props => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n preview,\n className,\n rootClassName,\n style\n } = props,\n otherProps = __rest(props, [\"prefixCls\", \"preview\", \"className\", \"rootClassName\", \"style\"]);\n const {\n getPrefixCls,\n locale: contextLocale = _en_US.default,\n getPopupContainer: getContextPopupContainer,\n image\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('image', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const imageLocale = contextLocale.Image || _en_US.default.Image;\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const mergedRootClassName = (0, _classnames.default)(rootClassName, hashId, cssVarCls, rootCls);\n const mergedClassName = (0, _classnames.default)(className, hashId, image === null || image === void 0 ? void 0 : image.className);\n const [zIndex] = (0, _useZIndex.useZIndex)('ImagePreview', typeof preview === 'object' ? preview.zIndex : undefined);\n const mergedPreview = React.useMemo(() => {\n var _a;\n if (preview === false) {\n return preview;\n }\n const _preview = typeof preview === 'object' ? preview : {};\n const {\n getContainer,\n closeIcon\n } = _preview,\n restPreviewProps = __rest(_preview, [\"getContainer\", \"closeIcon\"]);\n return Object.assign(Object.assign({\n mask: (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-mask-info`\n }, /*#__PURE__*/React.createElement(_EyeOutlined.default, null), imageLocale === null || imageLocale === void 0 ? void 0 : imageLocale.preview)),\n icons: _PreviewGroup.icons\n }, restPreviewProps), {\n getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : getContextPopupContainer,\n transitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'zoom', _preview.transitionName),\n maskTransitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'fade', _preview.maskTransitionName),\n zIndex,\n closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : (_a = image === null || image === void 0 ? void 0 : image.preview) === null || _a === void 0 ? void 0 : _a.closeIcon\n });\n }, [preview, imageLocale, (_a = image === null || image === void 0 ? void 0 : image.preview) === null || _a === void 0 ? void 0 : _a.closeIcon]);\n const mergedStyle = Object.assign(Object.assign({}, image === null || image === void 0 ? void 0 : image.style), style);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcImage.default, Object.assign({\n prefixCls: prefixCls,\n preview: mergedPreview,\n rootClassName: mergedRootClassName,\n className: mergedClassName,\n style: mergedStyle\n }, otherProps)));\n};\nImage.PreviewGroup = _PreviewGroup.default;\nif (process.env.NODE_ENV !== 'production') {\n Image.displayName = 'Image';\n}\nvar _default = exports.default = Image;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.genPreviewSwitchStyle = exports.genPreviewOperationsStyle = exports.genImagePreviewStyle = exports.genImageMaskStyle = exports.genBoxStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _style = require(\"../../modal/style\");\nvar _style2 = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _internal = require(\"../../theme/internal\");\nconst genBoxStyle = position => ({\n position: position || 'absolute',\n inset: 0\n});\nexports.genBoxStyle = genBoxStyle;\nconst genImageMaskStyle = token => {\n const {\n iconCls,\n motionDurationSlow,\n paddingXXS,\n marginXXS,\n prefixCls,\n colorTextLightSolid\n } = token;\n return {\n position: 'absolute',\n inset: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: colorTextLightSolid,\n background: new _tinycolor.TinyColor('#000').setAlpha(0.5).toRgbString(),\n cursor: 'pointer',\n opacity: 0,\n transition: `opacity ${motionDurationSlow}`,\n [`.${prefixCls}-mask-info`]: Object.assign(Object.assign({}, _style2.textEllipsis), {\n padding: `0 ${(0, _cssinjs.unit)(paddingXXS)}`,\n [iconCls]: {\n marginInlineEnd: marginXXS,\n svg: {\n verticalAlign: 'baseline'\n }\n }\n })\n };\n};\nexports.genImageMaskStyle = genImageMaskStyle;\nconst genPreviewOperationsStyle = token => {\n const {\n previewCls,\n modalMaskBg,\n paddingSM,\n marginXL,\n margin,\n paddingLG,\n previewOperationColorDisabled,\n previewOperationHoverColor,\n motionDurationSlow,\n iconCls,\n colorTextLightSolid\n } = token;\n const operationBg = new _tinycolor.TinyColor(modalMaskBg).setAlpha(0.1);\n const operationBgHover = operationBg.clone().setAlpha(0.2);\n return {\n [`${previewCls}-footer`]: {\n position: 'fixed',\n bottom: marginXL,\n left: {\n _skip_check_: true,\n value: '50%'\n },\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n color: token.previewOperationColor,\n transform: 'translateX(-50%)'\n },\n [`${previewCls}-progress`]: {\n marginBottom: margin\n },\n [`${previewCls}-close`]: {\n position: 'fixed',\n top: marginXL,\n right: {\n _skip_check_: true,\n value: marginXL\n },\n display: 'flex',\n color: colorTextLightSolid,\n backgroundColor: operationBg.toRgbString(),\n borderRadius: '50%',\n padding: paddingSM,\n outline: 0,\n border: 0,\n cursor: 'pointer',\n transition: `all ${motionDurationSlow}`,\n '&:hover': {\n backgroundColor: operationBgHover.toRgbString()\n },\n [`& > ${iconCls}`]: {\n fontSize: token.previewOperationSize\n }\n },\n [`${previewCls}-operations`]: {\n display: 'flex',\n alignItems: 'center',\n padding: `0 ${(0, _cssinjs.unit)(paddingLG)}`,\n backgroundColor: operationBg.toRgbString(),\n borderRadius: 100,\n '&-operation': {\n marginInlineStart: paddingSM,\n padding: paddingSM,\n cursor: 'pointer',\n transition: `all ${motionDurationSlow}`,\n userSelect: 'none',\n [`&:not(${previewCls}-operations-operation-disabled):hover > ${iconCls}`]: {\n color: previewOperationHoverColor\n },\n '&-disabled': {\n color: previewOperationColorDisabled,\n cursor: 'not-allowed'\n },\n '&:first-of-type': {\n marginInlineStart: 0\n },\n [`& > ${iconCls}`]: {\n fontSize: token.previewOperationSize\n }\n }\n }\n };\n};\nexports.genPreviewOperationsStyle = genPreviewOperationsStyle;\nconst genPreviewSwitchStyle = token => {\n const {\n modalMaskBg,\n iconCls,\n previewOperationColorDisabled,\n previewCls,\n zIndexPopup,\n motionDurationSlow\n } = token;\n const operationBg = new _tinycolor.TinyColor(modalMaskBg).setAlpha(0.1);\n const operationBgHover = operationBg.clone().setAlpha(0.2);\n return {\n [`${previewCls}-switch-left, ${previewCls}-switch-right`]: {\n position: 'fixed',\n insetBlockStart: '50%',\n zIndex: token.calc(zIndexPopup).add(1).equal(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: token.imagePreviewSwitchSize,\n height: token.imagePreviewSwitchSize,\n marginTop: token.calc(token.imagePreviewSwitchSize).mul(-1).div(2).equal(),\n color: token.previewOperationColor,\n background: operationBg.toRgbString(),\n borderRadius: '50%',\n transform: `translateY(-50%)`,\n cursor: 'pointer',\n transition: `all ${motionDurationSlow}`,\n userSelect: 'none',\n '&:hover': {\n background: operationBgHover.toRgbString()\n },\n '&-disabled': {\n '&, &:hover': {\n color: previewOperationColorDisabled,\n background: 'transparent',\n cursor: 'not-allowed',\n [`> ${iconCls}`]: {\n cursor: 'not-allowed'\n }\n }\n },\n [`> ${iconCls}`]: {\n fontSize: token.previewOperationSize\n }\n },\n [`${previewCls}-switch-left`]: {\n insetInlineStart: token.marginSM\n },\n [`${previewCls}-switch-right`]: {\n insetInlineEnd: token.marginSM\n }\n };\n};\nexports.genPreviewSwitchStyle = genPreviewSwitchStyle;\nconst genImagePreviewStyle = token => {\n const {\n motionEaseOut,\n previewCls,\n motionDurationSlow,\n componentCls\n } = token;\n return [{\n [`${componentCls}-preview-root`]: {\n [previewCls]: {\n height: '100%',\n textAlign: 'center',\n pointerEvents: 'none'\n },\n [`${previewCls}-body`]: Object.assign(Object.assign({}, genBoxStyle()), {\n overflow: 'hidden'\n }),\n [`${previewCls}-img`]: {\n maxWidth: '100%',\n maxHeight: '70%',\n verticalAlign: 'middle',\n transform: 'scale3d(1, 1, 1)',\n cursor: 'grab',\n transition: `transform ${motionDurationSlow} ${motionEaseOut} 0s`,\n userSelect: 'none',\n '&-wrapper': Object.assign(Object.assign({}, genBoxStyle()), {\n transition: `transform ${motionDurationSlow} ${motionEaseOut} 0s`,\n // https://github.com/ant-design/ant-design/issues/39913\n // TailwindCSS will reset img default style.\n // Let's set back.\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n '& > *': {\n pointerEvents: 'auto'\n },\n '&::before': {\n display: 'inline-block',\n width: 1,\n height: '50%',\n marginInlineEnd: -1,\n content: '\"\"'\n }\n })\n },\n [`${previewCls}-moving`]: {\n [`${previewCls}-preview-img`]: {\n cursor: 'grabbing',\n '&-wrapper': {\n transitionDuration: '0s'\n }\n }\n }\n }\n },\n // Override\n {\n [`${componentCls}-preview-root`]: {\n [`${previewCls}-wrap`]: {\n zIndex: token.zIndexPopup\n }\n }\n },\n // Preview operations & switch\n {\n [`${componentCls}-preview-operations-wrapper`]: {\n position: 'fixed',\n zIndex: token.calc(token.zIndexPopup).add(1).equal()\n },\n '&': [genPreviewOperationsStyle(token), genPreviewSwitchStyle(token)]\n }];\n};\nexports.genImagePreviewStyle = genImagePreviewStyle;\nconst genImageStyle = token => {\n const {\n componentCls\n } = token;\n return {\n // ============================== image ==============================\n [componentCls]: {\n position: 'relative',\n display: 'inline-block',\n [`${componentCls}-img`]: {\n width: '100%',\n height: 'auto',\n verticalAlign: 'middle'\n },\n [`${componentCls}-img-placeholder`]: {\n backgroundColor: token.colorBgContainerDisabled,\n backgroundImage: \"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')\",\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'center center',\n backgroundSize: '30%'\n },\n [`${componentCls}-mask`]: Object.assign({}, genImageMaskStyle(token)),\n [`${componentCls}-mask:hover`]: {\n opacity: 1\n },\n [`${componentCls}-placeholder`]: Object.assign({}, genBoxStyle())\n }\n };\n};\nconst genPreviewMotion = token => {\n const {\n previewCls\n } = token;\n return {\n [`${previewCls}-root`]: (0, _motion.initZoomMotion)(token, 'zoom'),\n '&': (0, _motion.initFadeMotion)(token, true)\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => ({\n zIndexPopup: token.zIndexPopupBase + 80,\n previewOperationColor: new _tinycolor.TinyColor(token.colorTextLightSolid).setAlpha(0.65).toRgbString(),\n previewOperationHoverColor: new _tinycolor.TinyColor(token.colorTextLightSolid).setAlpha(0.85).toRgbString(),\n previewOperationColorDisabled: new _tinycolor.TinyColor(token.colorTextLightSolid).setAlpha(0.25).toRgbString(),\n previewOperationSize: token.fontSizeIcon * 1.5 // FIXME: fontSizeIconLG\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Image', token => {\n const previewCls = `${token.componentCls}-preview`;\n const imageToken = (0, _internal.mergeToken)(token, {\n previewCls,\n modalMaskBg: new _tinycolor.TinyColor('#000').setAlpha(0.45).toRgbString(),\n // FIXME: Shared Token\n imagePreviewSwitchSize: token.controlHeightLG\n });\n return [genImageStyle(imageToken), genImagePreviewStyle(imageToken), (0, _style.genModalMaskStyle)((0, _internal.mergeToken)(imageToken, {\n componentCls: previewCls\n })), genPreviewMotion(imageToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Affix\", {\n enumerable: true,\n get: function () {\n return _affix.default;\n }\n});\nObject.defineProperty(exports, \"Alert\", {\n enumerable: true,\n get: function () {\n return _alert.default;\n }\n});\nObject.defineProperty(exports, \"Anchor\", {\n enumerable: true,\n get: function () {\n return _anchor.default;\n }\n});\nObject.defineProperty(exports, \"App\", {\n enumerable: true,\n get: function () {\n return _app.default;\n }\n});\nObject.defineProperty(exports, \"AutoComplete\", {\n enumerable: true,\n get: function () {\n return _autoComplete.default;\n }\n});\nObject.defineProperty(exports, \"Avatar\", {\n enumerable: true,\n get: function () {\n return _avatar.default;\n }\n});\nObject.defineProperty(exports, \"BackTop\", {\n enumerable: true,\n get: function () {\n return _backTop.default;\n }\n});\nObject.defineProperty(exports, \"Badge\", {\n enumerable: true,\n get: function () {\n return _badge.default;\n }\n});\nObject.defineProperty(exports, \"Breadcrumb\", {\n enumerable: true,\n get: function () {\n return _breadcrumb.default;\n }\n});\nObject.defineProperty(exports, \"Button\", {\n enumerable: true,\n get: function () {\n return _button.default;\n }\n});\nObject.defineProperty(exports, \"Calendar\", {\n enumerable: true,\n get: function () {\n return _calendar.default;\n }\n});\nObject.defineProperty(exports, \"Card\", {\n enumerable: true,\n get: function () {\n return _card.default;\n }\n});\nObject.defineProperty(exports, \"Carousel\", {\n enumerable: true,\n get: function () {\n return _carousel.default;\n }\n});\nObject.defineProperty(exports, \"Cascader\", {\n enumerable: true,\n get: function () {\n return _cascader.default;\n }\n});\nObject.defineProperty(exports, \"Checkbox\", {\n enumerable: true,\n get: function () {\n return _checkbox.default;\n }\n});\nObject.defineProperty(exports, \"Col\", {\n enumerable: true,\n get: function () {\n return _col.default;\n }\n});\nObject.defineProperty(exports, \"Collapse\", {\n enumerable: true,\n get: function () {\n return _collapse.default;\n }\n});\nObject.defineProperty(exports, \"ColorPicker\", {\n enumerable: true,\n get: function () {\n return _colorPicker.default;\n }\n});\nObject.defineProperty(exports, \"ConfigProvider\", {\n enumerable: true,\n get: function () {\n return _configProvider.default;\n }\n});\nObject.defineProperty(exports, \"DatePicker\", {\n enumerable: true,\n get: function () {\n return _datePicker.default;\n }\n});\nObject.defineProperty(exports, \"Descriptions\", {\n enumerable: true,\n get: function () {\n return _descriptions.default;\n }\n});\nObject.defineProperty(exports, \"Divider\", {\n enumerable: true,\n get: function () {\n return _divider.default;\n }\n});\nObject.defineProperty(exports, \"Drawer\", {\n enumerable: true,\n get: function () {\n return _drawer.default;\n }\n});\nObject.defineProperty(exports, \"Dropdown\", {\n enumerable: true,\n get: function () {\n return _dropdown.default;\n }\n});\nObject.defineProperty(exports, \"Empty\", {\n enumerable: true,\n get: function () {\n return _empty.default;\n }\n});\nObject.defineProperty(exports, \"Flex\", {\n enumerable: true,\n get: function () {\n return _flex.default;\n }\n});\nObject.defineProperty(exports, \"FloatButton\", {\n enumerable: true,\n get: function () {\n return _floatButton.default;\n }\n});\nObject.defineProperty(exports, \"Form\", {\n enumerable: true,\n get: function () {\n return _form.default;\n }\n});\nObject.defineProperty(exports, \"Grid\", {\n enumerable: true,\n get: function () {\n return _grid.default;\n }\n});\nObject.defineProperty(exports, \"Image\", {\n enumerable: true,\n get: function () {\n return _image.default;\n }\n});\nObject.defineProperty(exports, \"Input\", {\n enumerable: true,\n get: function () {\n return _input.default;\n }\n});\nObject.defineProperty(exports, \"InputNumber\", {\n enumerable: true,\n get: function () {\n return _inputNumber.default;\n }\n});\nObject.defineProperty(exports, \"Layout\", {\n enumerable: true,\n get: function () {\n return _layout.default;\n }\n});\nObject.defineProperty(exports, \"List\", {\n enumerable: true,\n get: function () {\n return _list.default;\n }\n});\nObject.defineProperty(exports, \"Mentions\", {\n enumerable: true,\n get: function () {\n return _mentions.default;\n }\n});\nObject.defineProperty(exports, \"Menu\", {\n enumerable: true,\n get: function () {\n return _menu.default;\n }\n});\nObject.defineProperty(exports, \"Modal\", {\n enumerable: true,\n get: function () {\n return _modal.default;\n }\n});\nObject.defineProperty(exports, \"Pagination\", {\n enumerable: true,\n get: function () {\n return _pagination.default;\n }\n});\nObject.defineProperty(exports, \"Popconfirm\", {\n enumerable: true,\n get: function () {\n return _popconfirm.default;\n }\n});\nObject.defineProperty(exports, \"Popover\", {\n enumerable: true,\n get: function () {\n return _popover.default;\n }\n});\nObject.defineProperty(exports, \"Progress\", {\n enumerable: true,\n get: function () {\n return _progress.default;\n }\n});\nObject.defineProperty(exports, \"QRCode\", {\n enumerable: true,\n get: function () {\n return _qrCode.default;\n }\n});\nObject.defineProperty(exports, \"Radio\", {\n enumerable: true,\n get: function () {\n return _radio.default;\n }\n});\nObject.defineProperty(exports, \"Rate\", {\n enumerable: true,\n get: function () {\n return _rate.default;\n }\n});\nObject.defineProperty(exports, \"Result\", {\n enumerable: true,\n get: function () {\n return _result.default;\n }\n});\nObject.defineProperty(exports, \"Row\", {\n enumerable: true,\n get: function () {\n return _row.default;\n }\n});\nObject.defineProperty(exports, \"Segmented\", {\n enumerable: true,\n get: function () {\n return _segmented.default;\n }\n});\nObject.defineProperty(exports, \"Select\", {\n enumerable: true,\n get: function () {\n return _select.default;\n }\n});\nObject.defineProperty(exports, \"Skeleton\", {\n enumerable: true,\n get: function () {\n return _skeleton.default;\n }\n});\nObject.defineProperty(exports, \"Slider\", {\n enumerable: true,\n get: function () {\n return _slider.default;\n }\n});\nObject.defineProperty(exports, \"Space\", {\n enumerable: true,\n get: function () {\n return _space.default;\n }\n});\nObject.defineProperty(exports, \"Spin\", {\n enumerable: true,\n get: function () {\n return _spin.default;\n }\n});\nObject.defineProperty(exports, \"Splitter\", {\n enumerable: true,\n get: function () {\n return _splitter.default;\n }\n});\nObject.defineProperty(exports, \"Statistic\", {\n enumerable: true,\n get: function () {\n return _statistic.default;\n }\n});\nObject.defineProperty(exports, \"Steps\", {\n enumerable: true,\n get: function () {\n return _steps.default;\n }\n});\nObject.defineProperty(exports, \"Switch\", {\n enumerable: true,\n get: function () {\n return _switch.default;\n }\n});\nObject.defineProperty(exports, \"Table\", {\n enumerable: true,\n get: function () {\n return _table.default;\n }\n});\nObject.defineProperty(exports, \"Tabs\", {\n enumerable: true,\n get: function () {\n return _tabs.default;\n }\n});\nObject.defineProperty(exports, \"Tag\", {\n enumerable: true,\n get: function () {\n return _tag.default;\n }\n});\nObject.defineProperty(exports, \"TimePicker\", {\n enumerable: true,\n get: function () {\n return _timePicker.default;\n }\n});\nObject.defineProperty(exports, \"Timeline\", {\n enumerable: true,\n get: function () {\n return _timeline.default;\n }\n});\nObject.defineProperty(exports, \"Tooltip\", {\n enumerable: true,\n get: function () {\n return _tooltip.default;\n }\n});\nObject.defineProperty(exports, \"Tour\", {\n enumerable: true,\n get: function () {\n return _tour.default;\n }\n});\nObject.defineProperty(exports, \"Transfer\", {\n enumerable: true,\n get: function () {\n return _transfer.default;\n }\n});\nObject.defineProperty(exports, \"Tree\", {\n enumerable: true,\n get: function () {\n return _tree.default;\n }\n});\nObject.defineProperty(exports, \"TreeSelect\", {\n enumerable: true,\n get: function () {\n return _treeSelect.default;\n }\n});\nObject.defineProperty(exports, \"Typography\", {\n enumerable: true,\n get: function () {\n return _typography.default;\n }\n});\nObject.defineProperty(exports, \"Upload\", {\n enumerable: true,\n get: function () {\n return _upload.default;\n }\n});\nObject.defineProperty(exports, \"Watermark\", {\n enumerable: true,\n get: function () {\n return _watermark.default;\n }\n});\nObject.defineProperty(exports, \"message\", {\n enumerable: true,\n get: function () {\n return _message.default;\n }\n});\nObject.defineProperty(exports, \"notification\", {\n enumerable: true,\n get: function () {\n return _notification.default;\n }\n});\nObject.defineProperty(exports, \"theme\", {\n enumerable: true,\n get: function () {\n return _theme.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nvar _affix = _interopRequireDefault(require(\"./affix\"));\nvar _alert = _interopRequireDefault(require(\"./alert\"));\nvar _anchor = _interopRequireDefault(require(\"./anchor\"));\nvar _app = _interopRequireDefault(require(\"./app\"));\nvar _autoComplete = _interopRequireDefault(require(\"./auto-complete\"));\nvar _avatar = _interopRequireDefault(require(\"./avatar\"));\nvar _backTop = _interopRequireDefault(require(\"./back-top\"));\nvar _badge = _interopRequireDefault(require(\"./badge\"));\nvar _breadcrumb = _interopRequireDefault(require(\"./breadcrumb\"));\nvar _button = _interopRequireDefault(require(\"./button\"));\nvar _calendar = _interopRequireDefault(require(\"./calendar\"));\nvar _card = _interopRequireDefault(require(\"./card\"));\nvar _carousel = _interopRequireDefault(require(\"./carousel\"));\nvar _cascader = _interopRequireDefault(require(\"./cascader\"));\nvar _checkbox = _interopRequireDefault(require(\"./checkbox\"));\nvar _col = _interopRequireDefault(require(\"./col\"));\nvar _collapse = _interopRequireDefault(require(\"./collapse\"));\nvar _colorPicker = _interopRequireDefault(require(\"./color-picker\"));\nvar _configProvider = _interopRequireDefault(require(\"./config-provider\"));\nvar _datePicker = _interopRequireDefault(require(\"./date-picker\"));\nvar _descriptions = _interopRequireDefault(require(\"./descriptions\"));\nvar _divider = _interopRequireDefault(require(\"./divider\"));\nvar _drawer = _interopRequireDefault(require(\"./drawer\"));\nvar _dropdown = _interopRequireDefault(require(\"./dropdown\"));\nvar _empty = _interopRequireDefault(require(\"./empty\"));\nvar _flex = _interopRequireDefault(require(\"./flex\"));\nvar _floatButton = _interopRequireDefault(require(\"./float-button\"));\nvar _form = _interopRequireDefault(require(\"./form\"));\nvar _grid = _interopRequireDefault(require(\"./grid\"));\nvar _image = _interopRequireDefault(require(\"./image\"));\nvar _input = _interopRequireDefault(require(\"./input\"));\nvar _inputNumber = _interopRequireDefault(require(\"./input-number\"));\nvar _layout = _interopRequireDefault(require(\"./layout\"));\nvar _list = _interopRequireDefault(require(\"./list\"));\nvar _mentions = _interopRequireDefault(require(\"./mentions\"));\nvar _menu = _interopRequireDefault(require(\"./menu\"));\nvar _message = _interopRequireDefault(require(\"./message\"));\nvar _modal = _interopRequireDefault(require(\"./modal\"));\nvar _notification = _interopRequireDefault(require(\"./notification\"));\nvar _pagination = _interopRequireDefault(require(\"./pagination\"));\nvar _popconfirm = _interopRequireDefault(require(\"./popconfirm\"));\nvar _popover = _interopRequireDefault(require(\"./popover\"));\nvar _progress = _interopRequireDefault(require(\"./progress\"));\nvar _qrCode = _interopRequireDefault(require(\"./qr-code\"));\nvar _radio = _interopRequireDefault(require(\"./radio\"));\nvar _rate = _interopRequireDefault(require(\"./rate\"));\nvar _result = _interopRequireDefault(require(\"./result\"));\nvar _row = _interopRequireDefault(require(\"./row\"));\nvar _segmented = _interopRequireDefault(require(\"./segmented\"));\nvar _select = _interopRequireDefault(require(\"./select\"));\nvar _skeleton = _interopRequireDefault(require(\"./skeleton\"));\nvar _slider = _interopRequireDefault(require(\"./slider\"));\nvar _space = _interopRequireDefault(require(\"./space\"));\nvar _spin = _interopRequireDefault(require(\"./spin\"));\nvar _statistic = _interopRequireDefault(require(\"./statistic\"));\nvar _steps = _interopRequireDefault(require(\"./steps\"));\nvar _switch = _interopRequireDefault(require(\"./switch\"));\nvar _table = _interopRequireDefault(require(\"./table\"));\nvar _tabs = _interopRequireDefault(require(\"./tabs\"));\nvar _tag = _interopRequireDefault(require(\"./tag\"));\nvar _theme = _interopRequireDefault(require(\"./theme\"));\nvar _timePicker = _interopRequireDefault(require(\"./time-picker\"));\nvar _timeline = _interopRequireDefault(require(\"./timeline\"));\nvar _tooltip = _interopRequireDefault(require(\"./tooltip\"));\nvar _tour = _interopRequireDefault(require(\"./tour\"));\nvar _transfer = _interopRequireDefault(require(\"./transfer\"));\nvar _tree = _interopRequireDefault(require(\"./tree\"));\nvar _treeSelect = _interopRequireDefault(require(\"./tree-select\"));\nvar _typography = _interopRequireDefault(require(\"./typography\"));\nvar _upload = _interopRequireDefault(require(\"./upload\"));\nvar _version = _interopRequireDefault(require(\"./version\"));\nvar _watermark = _interopRequireDefault(require(\"./watermark\"));\nvar _splitter = _interopRequireDefault(require(\"./splitter\"));","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _DownOutlined = _interopRequireDefault(require(\"@ant-design/icons/DownOutlined\"));\nvar _UpOutlined = _interopRequireDefault(require(\"@ant-design/icons/UpOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcInputNumber = _interopRequireDefault(require(\"rc-input-number\"));\nvar _ContextIsolator = _interopRequireDefault(require(\"../_util/ContextIsolator\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = _interopRequireWildcard(require(\"../config-provider\"));\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _context = require(\"../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../form/hooks/useVariants\"));\nvar _Compact = require(\"../space/Compact\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InputNumber = /*#__PURE__*/React.forwardRef((props, ref) => {\n if (process.env.NODE_ENV !== 'production') {\n const typeWarning = (0, _warning.devUseWarning)('InputNumber');\n typeWarning.deprecated(!('bordered' in props), 'bordered', 'variant');\n typeWarning(!(props.type === 'number' && props.changeOnWheel), 'usage', 'When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.');\n }\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const inputRef = React.useRef(null);\n React.useImperativeHandle(ref, () => inputRef.current);\n const {\n className,\n rootClassName,\n size: customizeSize,\n disabled: customDisabled,\n prefixCls: customizePrefixCls,\n addonBefore,\n addonAfter,\n prefix,\n suffix,\n bordered,\n readOnly,\n status: customStatus,\n controls,\n variant: customVariant\n } = props,\n others = __rest(props, [\"className\", \"rootClassName\", \"size\", \"disabled\", \"prefixCls\", \"addonBefore\", \"addonAfter\", \"prefix\", \"suffix\", \"bordered\", \"readOnly\", \"status\", \"controls\", \"variant\"]);\n const prefixCls = getPrefixCls('input-number', customizePrefixCls);\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n let upIcon = /*#__PURE__*/React.createElement(_UpOutlined.default, {\n className: `${prefixCls}-handler-up-inner`\n });\n let downIcon = /*#__PURE__*/React.createElement(_DownOutlined.default, {\n className: `${prefixCls}-handler-down-inner`\n });\n const controlsTemp = typeof controls === 'boolean' ? controls : undefined;\n if (typeof controls === 'object') {\n upIcon = typeof controls.upIcon === 'undefined' ? upIcon : (/*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-handler-up-inner`\n }, controls.upIcon));\n downIcon = typeof controls.downIcon === 'undefined' ? downIcon : (/*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-handler-down-inner`\n }, controls.downIcon));\n }\n const {\n hasFeedback,\n status: contextStatus,\n isFormItemInput,\n feedbackIcon\n } = React.useContext(_context.FormItemInputContext);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(contextStatus, customStatus);\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const [variant, enableVariantCls] = (0, _useVariants.default)('inputNumber', customVariant, bordered);\n /* biome-ignore lint/complexity/noUselessFragments: avoid falsy value */\n const suffixNode = hasFeedback && /*#__PURE__*/React.createElement(React.Fragment, null, feedbackIcon);\n const inputNumberClass = (0, _classnames.default)({\n [`${prefixCls}-lg`]: mergedSize === 'large',\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-in-form-item`]: isFormItemInput\n }, hashId);\n const wrapperClassName = `${prefixCls}-group`;\n const element = /*#__PURE__*/React.createElement(_rcInputNumber.default, Object.assign({\n ref: inputRef,\n disabled: mergedDisabled,\n className: (0, _classnames.default)(cssVarCls, rootCls, className, rootClassName, compactItemClassnames),\n upHandler: upIcon,\n downHandler: downIcon,\n prefixCls: prefixCls,\n readOnly: readOnly,\n controls: controlsTemp,\n prefix: prefix,\n suffix: suffixNode || suffix,\n addonBefore: addonBefore && (/*#__PURE__*/React.createElement(_ContextIsolator.default, {\n form: true,\n space: true\n }, addonBefore)),\n addonAfter: addonAfter && (/*#__PURE__*/React.createElement(_ContextIsolator.default, {\n form: true,\n space: true\n }, addonAfter)),\n classNames: {\n input: inputNumberClass,\n variant: (0, _classnames.default)({\n [`${prefixCls}-${variant}`]: enableVariantCls\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus, hasFeedback)),\n affixWrapper: (0, _classnames.default)({\n [`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',\n [`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',\n [`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',\n [`${prefixCls}-affix-wrapper-without-controls`]: controls === false\n }, hashId),\n wrapper: (0, _classnames.default)({\n [`${wrapperClassName}-rtl`]: direction === 'rtl'\n }, hashId),\n groupWrapper: (0, _classnames.default)({\n [`${prefixCls}-group-wrapper-sm`]: mergedSize === 'small',\n [`${prefixCls}-group-wrapper-lg`]: mergedSize === 'large',\n [`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',\n [`${prefixCls}-group-wrapper-${variant}`]: enableVariantCls\n }, (0, _statusUtils.getStatusClassNames)(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback), hashId)\n }\n }, others));\n return wrapCSSVar(element);\n});\nconst TypedInputNumber = InputNumber;\n/** @private Internal Component. Do not use in your production. */\nconst PureInputNumber = props => (/*#__PURE__*/React.createElement(_configProvider.default, {\n theme: {\n components: {\n InputNumber: {\n handleVisible: true\n }\n }\n }\n}, /*#__PURE__*/React.createElement(InputNumber, Object.assign({}, props))));\nif (process.env.NODE_ENV !== 'production') {\n TypedInputNumber.displayName = 'InputNumber';\n}\nTypedInputNumber._InternalPanelDoNotUseOrYouWillBeFired = PureInputNumber;\nvar _default = exports.default = TypedInputNumber;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genRadiusStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../input/style\");\nvar _variants = require(\"../../input/style/variants\");\nvar _style2 = require(\"../../style\");\nvar _compactItem = require(\"../../style/compact-item\");\nvar _internal = require(\"../../theme/internal\");\nvar _token = require(\"./token\");\nconst genRadiusStyle = (_ref, size) => {\n let {\n componentCls,\n borderRadiusSM,\n borderRadiusLG\n } = _ref;\n const borderRadius = size === 'lg' ? borderRadiusLG : borderRadiusSM;\n return {\n [`&-${size}`]: {\n [`${componentCls}-handler-wrap`]: {\n borderStartEndRadius: borderRadius,\n borderEndEndRadius: borderRadius\n },\n [`${componentCls}-handler-up`]: {\n borderStartEndRadius: borderRadius\n },\n [`${componentCls}-handler-down`]: {\n borderEndEndRadius: borderRadius\n }\n }\n };\n};\nexports.genRadiusStyle = genRadiusStyle;\nconst genInputNumberStyles = token => {\n const {\n componentCls,\n lineWidth,\n lineType,\n borderRadius,\n inputFontSizeSM,\n inputFontSizeLG,\n controlHeightLG,\n controlHeightSM,\n colorError,\n paddingInlineSM,\n paddingBlockSM,\n paddingBlockLG,\n paddingInlineLG,\n colorTextDescription,\n motionDurationMid,\n handleHoverColor,\n handleOpacity,\n paddingInline,\n paddingBlock,\n handleBg,\n handleActiveBg,\n colorTextDisabled,\n borderRadiusSM,\n borderRadiusLG,\n controlWidth,\n handleBorderColor,\n filledHandleBg,\n lineHeightLG,\n calc\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), (0, _style.genBasicInputStyle)(token)), {\n display: 'inline-block',\n width: controlWidth,\n margin: 0,\n padding: 0,\n borderRadius\n }), (0, _variants.genOutlinedStyle)(token, {\n [`${componentCls}-handler-wrap`]: {\n background: handleBg,\n [`${componentCls}-handler-down`]: {\n borderBlockStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`\n }\n }\n })), (0, _variants.genFilledStyle)(token, {\n [`${componentCls}-handler-wrap`]: {\n background: filledHandleBg,\n [`${componentCls}-handler-down`]: {\n borderBlockStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`\n }\n },\n '&:focus-within': {\n [`${componentCls}-handler-wrap`]: {\n background: handleBg\n }\n }\n })), (0, _variants.genBorderlessStyle)(token)), {\n '&-rtl': {\n direction: 'rtl',\n [`${componentCls}-input`]: {\n direction: 'rtl'\n }\n },\n '&-lg': {\n padding: 0,\n fontSize: inputFontSizeLG,\n lineHeight: lineHeightLG,\n borderRadius: borderRadiusLG,\n [`input${componentCls}-input`]: {\n height: calc(controlHeightLG).sub(calc(lineWidth).mul(2)).equal(),\n padding: `${(0, _cssinjs.unit)(paddingBlockLG)} ${(0, _cssinjs.unit)(paddingInlineLG)}`\n }\n },\n '&-sm': {\n padding: 0,\n fontSize: inputFontSizeSM,\n borderRadius: borderRadiusSM,\n [`input${componentCls}-input`]: {\n height: calc(controlHeightSM).sub(calc(lineWidth).mul(2)).equal(),\n padding: `${(0, _cssinjs.unit)(paddingBlockSM)} ${(0, _cssinjs.unit)(paddingInlineSM)}`\n }\n },\n // ===================== Out Of Range =====================\n '&-out-of-range': {\n [`${componentCls}-input-wrap`]: {\n input: {\n color: colorError\n }\n }\n },\n // Style for input-group: input with label, with button or dropdown...\n '&-group': Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), (0, _style.genInputGroupStyle)(token)), {\n '&-wrapper': Object.assign(Object.assign(Object.assign({\n display: 'inline-block',\n textAlign: 'start',\n verticalAlign: 'top',\n [`${componentCls}-affix-wrapper`]: {\n width: '100%'\n },\n // Size\n '&-lg': {\n [`${componentCls}-group-addon`]: {\n borderRadius: borderRadiusLG,\n fontSize: token.fontSizeLG\n }\n },\n '&-sm': {\n [`${componentCls}-group-addon`]: {\n borderRadius: borderRadiusSM\n }\n }\n }, (0, _variants.genOutlinedGroupStyle)(token)), (0, _variants.genFilledGroupStyle)(token)), {\n // Fix the issue of using icons in Space Compact mode\n // https://github.com/ant-design/ant-design/issues/45764\n [`&:not(${componentCls}-compact-first-item):not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {\n [`${componentCls}, ${componentCls}-group-addon`]: {\n borderRadius: 0\n }\n },\n [`&:not(${componentCls}-compact-last-item)${componentCls}-compact-first-item`]: {\n [`${componentCls}, ${componentCls}-group-addon`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n [`&:not(${componentCls}-compact-first-item)${componentCls}-compact-last-item`]: {\n [`${componentCls}, ${componentCls}-group-addon`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n }\n })\n }),\n [`&-disabled ${componentCls}-input`]: {\n cursor: 'not-allowed'\n },\n [componentCls]: {\n '&-input': Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), {\n width: '100%',\n padding: `${(0, _cssinjs.unit)(paddingBlock)} ${(0, _cssinjs.unit)(paddingInline)}`,\n textAlign: 'start',\n backgroundColor: 'transparent',\n border: 0,\n borderRadius,\n outline: 0,\n transition: `all ${motionDurationMid} linear`,\n appearance: 'textfield',\n fontSize: 'inherit'\n }), (0, _style.genPlaceholderStyle)(token.colorTextPlaceholder)), {\n '&[type=\"number\"]::-webkit-inner-spin-button, &[type=\"number\"]::-webkit-outer-spin-button': {\n margin: 0,\n webkitAppearance: 'none',\n appearance: 'none'\n }\n })\n },\n [`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {\n width: token.handleWidth,\n opacity: 1\n }\n })\n },\n // Handler\n {\n [componentCls]: Object.assign(Object.assign(Object.assign({\n [`${componentCls}-handler-wrap`]: {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineEnd: 0,\n width: 0,\n opacity: handleOpacity,\n height: '100%',\n borderStartStartRadius: 0,\n borderStartEndRadius: borderRadius,\n borderEndEndRadius: borderRadius,\n borderEndStartRadius: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'stretch',\n transition: `all ${motionDurationMid}`,\n overflow: 'hidden',\n // Fix input number inside Menu makes icon too large\n // We arise the selector priority by nest selector here\n // https://github.com/ant-design/ant-design/issues/14367\n [`${componentCls}-handler`]: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: 'auto',\n height: '40%',\n [`\n ${componentCls}-handler-up-inner,\n ${componentCls}-handler-down-inner\n `]: {\n marginInlineEnd: 0,\n fontSize: token.handleFontSize\n }\n }\n },\n [`${componentCls}-handler`]: {\n height: '50%',\n overflow: 'hidden',\n color: colorTextDescription,\n fontWeight: 'bold',\n lineHeight: 0,\n textAlign: 'center',\n cursor: 'pointer',\n borderInlineStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${handleBorderColor}`,\n transition: `all ${motionDurationMid} linear`,\n '&:active': {\n background: handleActiveBg\n },\n // Hover\n '&:hover': {\n height: `60%`,\n [`\n ${componentCls}-handler-up-inner,\n ${componentCls}-handler-down-inner\n `]: {\n color: handleHoverColor\n }\n },\n '&-up-inner, &-down-inner': Object.assign(Object.assign({}, (0, _style2.resetIcon)()), {\n color: colorTextDescription,\n transition: `all ${motionDurationMid} linear`,\n userSelect: 'none'\n })\n },\n [`${componentCls}-handler-up`]: {\n borderStartEndRadius: borderRadius\n },\n [`${componentCls}-handler-down`]: {\n borderEndEndRadius: borderRadius\n }\n }, genRadiusStyle(token, 'lg')), genRadiusStyle(token, 'sm')), {\n // Disabled\n '&-disabled, &-readonly': {\n [`${componentCls}-handler-wrap`]: {\n display: 'none'\n },\n [`${componentCls}-input`]: {\n color: 'inherit'\n }\n },\n [`\n ${componentCls}-handler-up-disabled,\n ${componentCls}-handler-down-disabled\n `]: {\n cursor: 'not-allowed'\n },\n [`\n ${componentCls}-handler-up-disabled:hover &-handler-up-inner,\n ${componentCls}-handler-down-disabled:hover &-handler-down-inner\n `]: {\n color: colorTextDisabled\n }\n })\n }];\n};\nconst genAffixWrapperStyles = token => {\n const {\n componentCls,\n paddingBlock,\n paddingInline,\n inputAffixPadding,\n controlWidth,\n borderRadiusLG,\n borderRadiusSM,\n paddingInlineLG,\n paddingInlineSM,\n paddingBlockLG,\n paddingBlockSM,\n motionDurationMid\n } = token;\n return {\n [`${componentCls}-affix-wrapper`]: Object.assign(Object.assign({\n [`input${componentCls}-input`]: {\n padding: `${(0, _cssinjs.unit)(paddingBlock)} 0`\n }\n }, (0, _style.genBasicInputStyle)(token)), {\n // or number handler will cover form status\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n width: controlWidth,\n padding: 0,\n paddingInlineStart: paddingInline,\n '&-lg': {\n borderRadius: borderRadiusLG,\n paddingInlineStart: paddingInlineLG,\n [`input${componentCls}-input`]: {\n padding: `${(0, _cssinjs.unit)(paddingBlockLG)} 0`\n }\n },\n '&-sm': {\n borderRadius: borderRadiusSM,\n paddingInlineStart: paddingInlineSM,\n [`input${componentCls}-input`]: {\n padding: `${(0, _cssinjs.unit)(paddingBlockSM)} 0`\n }\n },\n [`&:not(${componentCls}-disabled):hover`]: {\n zIndex: 1\n },\n '&-focused, &:focus': {\n zIndex: 1\n },\n [`&-disabled > ${componentCls}-disabled`]: {\n background: 'transparent'\n },\n [`> div${componentCls}`]: {\n width: '100%',\n border: 'none',\n outline: 'none',\n [`&${componentCls}-focused`]: {\n boxShadow: 'none !important'\n }\n },\n '&::before': {\n display: 'inline-block',\n width: 0,\n visibility: 'hidden',\n content: '\"\\\\a0\"'\n },\n [`${componentCls}-handler-wrap`]: {\n zIndex: 2\n },\n [componentCls]: {\n position: 'static',\n color: 'inherit',\n '&-prefix, &-suffix': {\n display: 'flex',\n flex: 'none',\n alignItems: 'center',\n pointerEvents: 'none'\n },\n '&-prefix': {\n marginInlineEnd: inputAffixPadding\n },\n '&-suffix': {\n insetBlockStart: 0,\n insetInlineEnd: 0,\n height: '100%',\n marginInlineEnd: paddingInline,\n marginInlineStart: inputAffixPadding,\n transition: `margin ${motionDurationMid}`\n }\n },\n [`&:hover ${componentCls}-handler-wrap, &-focused ${componentCls}-handler-wrap`]: {\n width: token.handleWidth,\n opacity: 1\n },\n [`&:not(${componentCls}-affix-wrapper-without-controls):hover ${componentCls}-suffix`]: {\n marginInlineEnd: token.calc(token.handleWidth).add(paddingInline).equal()\n }\n })\n };\n};\nvar _default = exports.default = (0, _internal.genStyleHooks)('InputNumber', token => {\n const inputNumberToken = (0, _internal.mergeToken)(token, (0, _style.initInputToken)(token));\n return [genInputNumberStyles(inputNumberToken), genAffixWrapperStyles(inputNumberToken),\n // =====================================================\n // == Space Compact ==\n // =====================================================\n (0, _compactItem.genCompactItemStyle)(inputNumberToken)];\n}, _token.prepareComponentToken, {\n unitless: {\n handleOpacity: true\n }\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = void 0;\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _token = require(\"../../input/style/token\");\nconst prepareComponentToken = token => {\n var _a;\n const handleVisible = (_a = token.handleVisible) !== null && _a !== void 0 ? _a : 'auto';\n return Object.assign(Object.assign({}, (0, _token.initComponentToken)(token)), {\n controlWidth: 90,\n handleWidth: token.controlHeightSM - token.lineWidth * 2,\n handleFontSize: token.fontSize / 2,\n handleVisible,\n handleActiveBg: token.colorFillAlter,\n handleBg: token.colorBgContainer,\n filledHandleBg: new _tinycolor.TinyColor(token.colorFillSecondary).onBackground(token.colorBgContainer).toHexString(),\n handleHoverColor: token.colorPrimary,\n handleBorderColor: token.colorBorder,\n handleOpacity: handleVisible === true ? 1 : 0\n });\n};\nexports.prepareComponentToken = prepareComponentToken;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _context = require(\"../form/context\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst Group = props => {\n const {\n getPrefixCls,\n direction\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className\n } = props;\n const prefixCls = getPrefixCls('input-group', customizePrefixCls);\n const inputPrefixCls = getPrefixCls('input');\n const [wrapCSSVar, hashId] = (0, _style.default)(inputPrefixCls);\n const cls = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-lg`]: props.size === 'large',\n [`${prefixCls}-sm`]: props.size === 'small',\n [`${prefixCls}-compact`]: props.compact,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, hashId, className);\n const formItemContext = (0, _react.useContext)(_context.FormItemInputContext);\n const groupFormItemContext = (0, _react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {\n isFormItemInput: false\n }), [formItemContext]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Input.Group');\n warning.deprecated(false, 'Input.Group', 'Space.Compact');\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"span\", {\n className: cls,\n style: props.style,\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n onFocus: props.onFocus,\n onBlur: props.onBlur\n }, /*#__PURE__*/React.createElement(_context.FormItemInputContext.Provider, {\n value: groupFormItemContext\n }, props.children)));\n};\nvar _default = exports.default = Group;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.triggerFocus = triggerFocus;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcInput = _interopRequireDefault(require(\"rc-input\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _ContextIsolator = _interopRequireDefault(require(\"../_util/ContextIsolator\"));\nvar _getAllowClear = _interopRequireDefault(require(\"../_util/getAllowClear\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _context = require(\"../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../form/hooks/useVariants\"));\nvar _Compact = require(\"../space/Compact\");\nvar _useRemovePasswordTimeout = _interopRequireDefault(require(\"./hooks/useRemovePasswordTimeout\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _utils = require(\"./utils\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction triggerFocus(element, option) {\n if (!element) {\n return;\n }\n element.focus(option);\n // Selection content\n const {\n cursor\n } = option || {};\n if (cursor) {\n const len = element.value.length;\n switch (cursor) {\n case 'start':\n element.setSelectionRange(0, 0);\n break;\n case 'end':\n element.setSelectionRange(len, len);\n break;\n default:\n element.setSelectionRange(0, len);\n }\n }\n}\nconst Input = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n bordered = true,\n status: customStatus,\n size: customSize,\n disabled: customDisabled,\n onBlur,\n onFocus,\n suffix,\n allowClear,\n addonAfter,\n addonBefore,\n className,\n style,\n styles,\n rootClassName,\n onChange,\n classNames: classes,\n variant: customVariant\n } = props,\n rest = __rest(props, [\"prefixCls\", \"bordered\", \"status\", \"size\", \"disabled\", \"onBlur\", \"onFocus\", \"suffix\", \"allowClear\", \"addonAfter\", \"addonBefore\", \"className\", \"style\", \"styles\", \"rootClassName\", \"onChange\", \"classNames\", \"variant\"]);\n if (process.env.NODE_ENV !== 'production') {\n const {\n deprecated\n } = (0, _warning.devUseWarning)('Input');\n deprecated(!('bordered' in props), 'bordered', 'variant');\n }\n const {\n getPrefixCls,\n direction,\n input\n } = _react.default.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('input', customizePrefixCls);\n const inputRef = (0, _react.useRef)(null);\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n // ===================== Compact Item =====================\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n // ===================== Size =====================\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customSize !== null && customSize !== void 0 ? customSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n // ===================== Disabled =====================\n const disabled = _react.default.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n // ===================== Status =====================\n const {\n status: contextStatus,\n hasFeedback,\n feedbackIcon\n } = (0, _react.useContext)(_context.FormItemInputContext);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(contextStatus, customStatus);\n // ===================== Focus warning =====================\n const inputHasPrefixSuffix = (0, _utils.hasPrefixSuffix)(props) || !!hasFeedback;\n const prevHasPrefixSuffix = (0, _react.useRef)(inputHasPrefixSuffix);\n /* eslint-disable react-hooks/rules-of-hooks */\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Input');\n (0, _react.useEffect)(() => {\n var _a;\n if (inputHasPrefixSuffix && !prevHasPrefixSuffix.current) {\n process.env.NODE_ENV !== \"production\" ? warning(document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input), 'usage', `When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ`) : void 0;\n }\n prevHasPrefixSuffix.current = inputHasPrefixSuffix;\n }, [inputHasPrefixSuffix]);\n }\n /* eslint-enable */\n // ===================== Remove Password value =====================\n const removePasswordTimeout = (0, _useRemovePasswordTimeout.default)(inputRef, true);\n const handleBlur = e => {\n removePasswordTimeout();\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);\n };\n const handleFocus = e => {\n removePasswordTimeout();\n onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);\n };\n const handleChange = e => {\n removePasswordTimeout();\n onChange === null || onChange === void 0 ? void 0 : onChange(e);\n };\n const suffixNode = (hasFeedback || suffix) && (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, suffix, hasFeedback && feedbackIcon));\n const mergedAllowClear = (0, _getAllowClear.default)(allowClear !== null && allowClear !== void 0 ? allowClear : input === null || input === void 0 ? void 0 : input.allowClear);\n const [variant, enableVariantCls] = (0, _useVariants.default)('input', customVariant, bordered);\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(_rcInput.default, Object.assign({\n ref: (0, _ref.composeRef)(ref, inputRef),\n prefixCls: prefixCls,\n autoComplete: input === null || input === void 0 ? void 0 : input.autoComplete\n }, rest, {\n disabled: mergedDisabled,\n onBlur: handleBlur,\n onFocus: handleFocus,\n style: Object.assign(Object.assign({}, input === null || input === void 0 ? void 0 : input.style), style),\n styles: Object.assign(Object.assign({}, input === null || input === void 0 ? void 0 : input.styles), styles),\n suffix: suffixNode,\n allowClear: mergedAllowClear,\n className: (0, _classnames.default)(className, rootClassName, cssVarCls, rootCls, compactItemClassnames, input === null || input === void 0 ? void 0 : input.className),\n onChange: handleChange,\n addonBefore: addonBefore && (/*#__PURE__*/_react.default.createElement(_ContextIsolator.default, {\n form: true,\n space: true\n }, addonBefore)),\n addonAfter: addonAfter && (/*#__PURE__*/_react.default.createElement(_ContextIsolator.default, {\n form: true,\n space: true\n }, addonAfter)),\n classNames: Object.assign(Object.assign(Object.assign({}, classes), input === null || input === void 0 ? void 0 : input.classNames), {\n input: (0, _classnames.default)({\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-lg`]: mergedSize === 'large',\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, classes === null || classes === void 0 ? void 0 : classes.input, (_a = input === null || input === void 0 ? void 0 : input.classNames) === null || _a === void 0 ? void 0 : _a.input, hashId),\n variant: (0, _classnames.default)({\n [`${prefixCls}-${variant}`]: enableVariantCls\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus)),\n affixWrapper: (0, _classnames.default)({\n [`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',\n [`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',\n [`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl'\n }, hashId),\n wrapper: (0, _classnames.default)({\n [`${prefixCls}-group-rtl`]: direction === 'rtl'\n }, hashId),\n groupWrapper: (0, _classnames.default)({\n [`${prefixCls}-group-wrapper-sm`]: mergedSize === 'small',\n [`${prefixCls}-group-wrapper-lg`]: mergedSize === 'large',\n [`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',\n [`${prefixCls}-group-wrapper-${variant}`]: enableVariantCls\n }, (0, _statusUtils.getStatusClassNames)(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback), hashId)\n })\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Input.displayName = 'Input';\n}\nvar _default = exports.default = Input;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nvar _Input = _interopRequireDefault(require(\"../Input\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst OTPInput = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n value,\n onChange,\n onActiveChange,\n index,\n mask\n } = props,\n restProps = __rest(props, [\"value\", \"onChange\", \"onActiveChange\", \"index\", \"mask\"]);\n const internalValue = value && typeof mask === 'string' ? mask : value;\n const onInternalChange = e => {\n onChange(index, e.target.value);\n };\n // ========================== Ref ===========================\n const inputRef = React.useRef(null);\n React.useImperativeHandle(ref, () => inputRef.current);\n // ========================= Focus ==========================\n const syncSelection = () => {\n (0, _raf.default)(() => {\n var _a;\n const inputEle = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input;\n if (document.activeElement === inputEle && inputEle) {\n inputEle.select();\n }\n });\n };\n // ======================== Keyboard ========================\n const onInternalKeyDown = _ref => {\n let {\n key\n } = _ref;\n if (key === 'ArrowLeft') {\n onActiveChange(index - 1);\n } else if (key === 'ArrowRight') {\n onActiveChange(index + 1);\n }\n syncSelection();\n };\n const onInternalKeyUp = e => {\n if (e.key === 'Backspace' && !value) {\n onActiveChange(index - 1);\n }\n syncSelection();\n };\n // ========================= Render =========================\n return /*#__PURE__*/React.createElement(_Input.default, Object.assign({\n type: mask === true ? 'password' : 'text'\n }, restProps, {\n ref: inputRef,\n value: internalValue,\n onInput: onInternalChange,\n onFocus: syncSelection,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onMouseDown: syncSelection,\n onMouseUp: syncSelection\n }));\n});\nvar _default = exports.default = OTPInput;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _pickAttrs = _interopRequireDefault(require(\"rc-util/lib/pickAttrs\"));\nvar _statusUtils = require(\"../../_util/statusUtils\");\nvar _warning = require(\"../../_util/warning\");\nvar _configProvider = require(\"../../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../../config-provider/hooks/useSize\"));\nvar _context = require(\"../../form/context\");\nvar _otp = _interopRequireDefault(require(\"../style/otp\"));\nvar _OTPInput = _interopRequireDefault(require(\"./OTPInput\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction strToArr(str) {\n return (str || '').split('');\n}\nconst OTP = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n length = 6,\n size: customSize,\n defaultValue,\n value,\n onChange,\n formatter,\n variant,\n disabled,\n status: customStatus,\n autoFocus,\n mask,\n type\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"length\", \"size\", \"defaultValue\", \"value\", \"onChange\", \"formatter\", \"variant\", \"disabled\", \"status\", \"autoFocus\", \"mask\", \"type\"]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Input.OTP');\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof mask === 'string' && mask.length > 1), 'usage', '`mask` prop should be a single character.') : void 0;\n }\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('otp', customizePrefixCls);\n const domAttrs = (0, _pickAttrs.default)(restProps, {\n aria: true,\n data: true,\n attr: true\n });\n // ========================= Root =========================\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _otp.default)(prefixCls, rootCls);\n // ========================= Size =========================\n const mergedSize = (0, _useSize.default)(ctx => customSize !== null && customSize !== void 0 ? customSize : ctx);\n // ======================== Status ========================\n const formContext = React.useContext(_context.FormItemInputContext);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(formContext.status, customStatus);\n const proxyFormContext = React.useMemo(() => Object.assign(Object.assign({}, formContext), {\n status: mergedStatus,\n hasFeedback: false,\n feedbackIcon: null\n }), [formContext, mergedStatus]);\n // ========================= Refs =========================\n const containerRef = React.useRef(null);\n const refs = React.useRef({});\n React.useImperativeHandle(ref, () => ({\n focus: () => {\n var _a;\n (_a = refs.current[0]) === null || _a === void 0 ? void 0 : _a.focus();\n },\n blur: () => {\n var _a;\n for (let i = 0; i < length; i += 1) {\n (_a = refs.current[i]) === null || _a === void 0 ? void 0 : _a.blur();\n }\n },\n nativeElement: containerRef.current\n }));\n // ======================= Formatter ======================\n const internalFormatter = txt => formatter ? formatter(txt) : txt;\n // ======================== Values ========================\n const [valueCells, setValueCells] = React.useState(strToArr(internalFormatter(defaultValue || '')));\n React.useEffect(() => {\n if (value !== undefined) {\n setValueCells(strToArr(value));\n }\n }, [value]);\n const triggerValueCellsChange = (0, _useEvent.default)(nextValueCells => {\n setValueCells(nextValueCells);\n // Trigger if all cells are filled\n if (onChange && nextValueCells.length === length && nextValueCells.every(c => c) && nextValueCells.some((c, index) => valueCells[index] !== c)) {\n onChange(nextValueCells.join(''));\n }\n });\n const patchValue = (0, _useEvent.default)((index, txt) => {\n let nextCells = (0, _toConsumableArray2.default)(valueCells);\n // Fill cells till index\n for (let i = 0; i < index; i += 1) {\n if (!nextCells[i]) {\n nextCells[i] = '';\n }\n }\n if (txt.length <= 1) {\n nextCells[index] = txt;\n } else {\n nextCells = nextCells.slice(0, index).concat(strToArr(txt));\n }\n nextCells = nextCells.slice(0, length);\n // Clean the last empty cell\n for (let i = nextCells.length - 1; i >= 0; i -= 1) {\n if (nextCells[i]) {\n break;\n }\n nextCells.pop();\n }\n // Format if needed\n const formattedValue = internalFormatter(nextCells.map(c => c || ' ').join(''));\n nextCells = strToArr(formattedValue).map((c, i) => {\n if (c === ' ' && !nextCells[i]) {\n return nextCells[i];\n }\n return c;\n });\n return nextCells;\n });\n // ======================== Change ========================\n const onInputChange = (index, txt) => {\n var _a;\n const nextCells = patchValue(index, txt);\n const nextIndex = Math.min(index + txt.length, length - 1);\n if (nextIndex !== index) {\n (_a = refs.current[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();\n }\n triggerValueCellsChange(nextCells);\n };\n const onInputActiveChange = nextIndex => {\n var _a;\n (_a = refs.current[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();\n };\n // ======================== Render ========================\n const inputSharedProps = {\n variant,\n disabled,\n status: mergedStatus,\n mask,\n type\n };\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({}, domAttrs, {\n ref: containerRef,\n className: (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-lg`]: mergedSize === 'large',\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, cssVarCls, hashId)\n }), /*#__PURE__*/React.createElement(_context.FormItemInputContext.Provider, {\n value: proxyFormContext\n }, Array.from({\n length\n }).map((_, index) => {\n const key = `otp-${index}`;\n const singleValue = valueCells[index] || '';\n return /*#__PURE__*/React.createElement(_OTPInput.default, Object.assign({\n ref: inputEle => {\n refs.current[index] = inputEle;\n },\n key: key,\n index: index,\n size: mergedSize,\n htmlSize: 1,\n className: `${prefixCls}-input`,\n onChange: onInputChange,\n value: singleValue,\n onActiveChange: onInputActiveChange,\n autoFocus: index === 0 && autoFocus\n }, inputSharedProps));\n }))));\n});\nvar _default = exports.default = OTP;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _EyeInvisibleOutlined = _interopRequireDefault(require(\"@ant-design/icons/EyeInvisibleOutlined\"));\nvar _EyeOutlined = _interopRequireDefault(require(\"@ant-design/icons/EyeOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _configProvider = require(\"../config-provider\");\nvar _useRemovePasswordTimeout = _interopRequireDefault(require(\"./hooks/useRemovePasswordTimeout\"));\nvar _Input = _interopRequireDefault(require(\"./Input\"));\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst defaultIconRender = visible => visible ? /*#__PURE__*/React.createElement(_EyeOutlined.default, null) : /*#__PURE__*/React.createElement(_EyeInvisibleOutlined.default, null);\nconst actionMap = {\n click: 'onClick',\n hover: 'onMouseOver'\n};\nconst Password = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n disabled: customDisabled,\n action = 'click',\n visibilityToggle = true,\n iconRender = defaultIconRender\n } = props;\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;\n const [visible, setVisible] = (0, _react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);\n const inputRef = (0, _react.useRef)(null);\n React.useEffect(() => {\n if (visibilityControlled) {\n setVisible(visibilityToggle.visible);\n }\n }, [visibilityControlled, visibilityToggle]);\n // Remove Password value\n const removePasswordTimeout = (0, _useRemovePasswordTimeout.default)(inputRef);\n const onVisibleChange = () => {\n if (mergedDisabled) {\n return;\n }\n if (visible) {\n removePasswordTimeout();\n }\n setVisible(prevState => {\n var _a;\n const newState = !prevState;\n if (typeof visibilityToggle === 'object') {\n (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);\n }\n return newState;\n });\n };\n const getIcon = prefixCls => {\n const iconTrigger = actionMap[action] || '';\n const icon = iconRender(visible);\n const iconProps = {\n [iconTrigger]: onVisibleChange,\n className: `${prefixCls}-icon`,\n key: 'passwordIcon',\n onMouseDown: e => {\n // Prevent focused state lost\n // https://github.com/ant-design/ant-design/issues/15173\n e.preventDefault();\n },\n onMouseUp: e => {\n // Prevent caret position change\n // https://github.com/ant-design/ant-design/issues/23524\n e.preventDefault();\n }\n };\n return /*#__PURE__*/React.cloneElement(/*#__PURE__*/React.isValidElement(icon) ? icon : /*#__PURE__*/React.createElement(\"span\", null, icon), iconProps);\n };\n const {\n className,\n prefixCls: customizePrefixCls,\n inputPrefixCls: customizeInputPrefixCls,\n size\n } = props,\n restProps = __rest(props, [\"className\", \"prefixCls\", \"inputPrefixCls\", \"size\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);\n const prefixCls = getPrefixCls('input-password', customizePrefixCls);\n const suffixIcon = visibilityToggle && getIcon(prefixCls);\n const inputClassName = (0, _classnames.default)(prefixCls, className, {\n [`${prefixCls}-${size}`]: !!size\n });\n const omittedProps = Object.assign(Object.assign({}, (0, _omit.default)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {\n type: visible ? 'text' : 'password',\n className: inputClassName,\n prefixCls: inputPrefixCls,\n suffix: suffixIcon\n });\n if (size) {\n omittedProps.size = size;\n }\n return /*#__PURE__*/React.createElement(_Input.default, Object.assign({\n ref: (0, _ref.composeRef)(ref, inputRef)\n }, omittedProps));\n});\nif (process.env.NODE_ENV !== 'production') {\n Password.displayName = 'Input.Password';\n}\nvar _default = exports.default = Password;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _SearchOutlined = _interopRequireDefault(require(\"@ant-design/icons/SearchOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _reactNode = require(\"../_util/reactNode\");\nvar _button = _interopRequireDefault(require(\"../button\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _Compact = require(\"../space/Compact\");\nvar _Input = _interopRequireDefault(require(\"./Input\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Search = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n inputPrefixCls: customizeInputPrefixCls,\n className,\n size: customizeSize,\n suffix,\n enterButton = false,\n addonAfter,\n loading,\n disabled,\n onSearch: customOnSearch,\n onChange: customOnChange,\n onCompositionStart,\n onCompositionEnd\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"inputPrefixCls\", \"className\", \"size\", \"suffix\", \"enterButton\", \"addonAfter\", \"loading\", \"disabled\", \"onSearch\", \"onChange\", \"onCompositionStart\", \"onCompositionEnd\"]);\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const composedRef = React.useRef(false);\n const prefixCls = getPrefixCls('input-search', customizePrefixCls);\n const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);\n const {\n compactSize\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n const size = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n const inputRef = React.useRef(null);\n const onChange = e => {\n if ((e === null || e === void 0 ? void 0 : e.target) && e.type === 'click' && customOnSearch) {\n customOnSearch(e.target.value, e, {\n source: 'clear'\n });\n }\n customOnChange === null || customOnChange === void 0 ? void 0 : customOnChange(e);\n };\n const onMouseDown = e => {\n var _a;\n if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {\n e.preventDefault();\n }\n };\n const onSearch = e => {\n var _a, _b;\n if (customOnSearch) {\n customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e, {\n source: 'input'\n });\n }\n };\n const onPressEnter = e => {\n if (composedRef.current || loading) {\n return;\n }\n onSearch(e);\n };\n const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/React.createElement(_SearchOutlined.default, null) : null;\n const btnClassName = `${prefixCls}-button`;\n let button;\n const enterButtonAsElement = enterButton || {};\n const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;\n if (isAntdButton || enterButtonAsElement.type === 'button') {\n button = (0, _reactNode.cloneElement)(enterButtonAsElement, Object.assign({\n onMouseDown,\n onClick: e => {\n var _a, _b;\n (_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n onSearch(e);\n },\n key: 'enterButton'\n }, isAntdButton ? {\n className: btnClassName,\n size\n } : {}));\n } else {\n button = /*#__PURE__*/React.createElement(_button.default, {\n className: btnClassName,\n type: enterButton ? 'primary' : undefined,\n size: size,\n disabled: disabled,\n key: \"enterButton\",\n onMouseDown: onMouseDown,\n onClick: onSearch,\n loading: loading,\n icon: searchIcon\n }, enterButton);\n }\n if (addonAfter) {\n button = [button, (0, _reactNode.cloneElement)(addonAfter, {\n key: 'addonAfter'\n })];\n }\n const cls = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-${size}`]: !!size,\n [`${prefixCls}-with-button`]: !!enterButton\n }, className);\n const handleOnCompositionStart = e => {\n composedRef.current = true;\n onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);\n };\n const handleOnCompositionEnd = e => {\n composedRef.current = false;\n onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);\n };\n return /*#__PURE__*/React.createElement(_Input.default, Object.assign({\n ref: (0, _ref.composeRef)(inputRef, ref),\n onPressEnter: onPressEnter\n }, restProps, {\n size: size,\n onCompositionStart: handleOnCompositionStart,\n onCompositionEnd: handleOnCompositionEnd,\n prefixCls: inputPrefixCls,\n addonAfter: button,\n suffix: suffix,\n onChange: onChange,\n className: cls,\n disabled: disabled\n }));\n});\nif (process.env.NODE_ENV !== 'production') {\n Search.displayName = 'Search';\n}\nvar _default = exports.default = Search;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTextarea = _interopRequireDefault(require(\"rc-textarea\"));\nvar _getAllowClear = _interopRequireDefault(require(\"../_util/getAllowClear\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _context = require(\"../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../form/hooks/useVariants\"));\nvar _Input = require(\"./Input\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst TextArea = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n var _a, _b;\n const {\n prefixCls: customizePrefixCls,\n bordered = true,\n size: customizeSize,\n disabled: customDisabled,\n status: customStatus,\n allowClear,\n classNames: classes,\n rootClassName,\n className,\n style,\n styles,\n variant: customVariant\n } = props,\n rest = __rest(props, [\"prefixCls\", \"bordered\", \"size\", \"disabled\", \"status\", \"allowClear\", \"classNames\", \"rootClassName\", \"className\", \"style\", \"styles\", \"variant\"]);\n if (process.env.NODE_ENV !== 'production') {\n const {\n deprecated\n } = (0, _warning.devUseWarning)('TextArea');\n deprecated(!('bordered' in props), 'bordered', 'variant');\n }\n const {\n getPrefixCls,\n direction,\n textArea\n } = React.useContext(_configProvider.ConfigContext);\n // ===================== Size =====================\n const mergedSize = (0, _useSize.default)(customizeSize);\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n // ===================== Status =====================\n const {\n status: contextStatus,\n hasFeedback,\n feedbackIcon\n } = React.useContext(_context.FormItemInputContext);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(contextStatus, customStatus);\n // ===================== Ref =====================\n const innerRef = React.useRef(null);\n React.useImperativeHandle(ref, () => {\n var _a;\n return {\n resizableTextArea: (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea,\n focus: option => {\n var _a, _b;\n (0, _Input.triggerFocus)((_b = (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea) === null || _b === void 0 ? void 0 : _b.textArea, option);\n },\n blur: () => {\n var _a;\n return (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.blur();\n }\n };\n });\n const prefixCls = getPrefixCls('input', customizePrefixCls);\n // ===================== Style =====================\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const [variant, enableVariantCls] = (0, _useVariants.default)('textArea', customVariant, bordered);\n const mergedAllowClear = (0, _getAllowClear.default)(allowClear !== null && allowClear !== void 0 ? allowClear : textArea === null || textArea === void 0 ? void 0 : textArea.allowClear);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcTextarea.default, Object.assign({\n autoComplete: textArea === null || textArea === void 0 ? void 0 : textArea.autoComplete\n }, rest, {\n style: Object.assign(Object.assign({}, textArea === null || textArea === void 0 ? void 0 : textArea.style), style),\n styles: Object.assign(Object.assign({}, textArea === null || textArea === void 0 ? void 0 : textArea.styles), styles),\n disabled: mergedDisabled,\n allowClear: mergedAllowClear,\n className: (0, _classnames.default)(cssVarCls, rootCls, className, rootClassName, textArea === null || textArea === void 0 ? void 0 : textArea.className),\n classNames: Object.assign(Object.assign(Object.assign({}, classes), textArea === null || textArea === void 0 ? void 0 : textArea.classNames), {\n textarea: (0, _classnames.default)({\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-lg`]: mergedSize === 'large'\n }, hashId, classes === null || classes === void 0 ? void 0 : classes.textarea, (_a = textArea === null || textArea === void 0 ? void 0 : textArea.classNames) === null || _a === void 0 ? void 0 : _a.textarea),\n variant: (0, _classnames.default)({\n [`${prefixCls}-${variant}`]: enableVariantCls\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus)),\n affixWrapper: (0, _classnames.default)(`${prefixCls}-textarea-affix-wrapper`, {\n [`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',\n [`${prefixCls}-affix-wrapper-sm`]: mergedSize === 'small',\n [`${prefixCls}-affix-wrapper-lg`]: mergedSize === 'large',\n [`${prefixCls}-textarea-show-count`]: props.showCount || ((_b = props.count) === null || _b === void 0 ? void 0 : _b.show)\n }, hashId)\n }),\n prefixCls: prefixCls,\n suffix: hasFeedback && /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-textarea-suffix`\n }, feedbackIcon),\n ref: innerRef\n })));\n});\nvar _default = exports.default = TextArea;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useRemovePasswordTimeout;\nvar _react = require(\"react\");\nfunction useRemovePasswordTimeout(inputRef, triggerOnMount) {\n const removePasswordTimeoutRef = (0, _react.useRef)([]);\n const removePasswordTimeout = () => {\n removePasswordTimeoutRef.current.push(setTimeout(() => {\n var _a, _b, _c, _d;\n if (((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) && ((_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.input.getAttribute('type')) === 'password' && ((_c = inputRef.current) === null || _c === void 0 ? void 0 : _c.input.hasAttribute('value'))) {\n (_d = inputRef.current) === null || _d === void 0 ? void 0 : _d.input.removeAttribute('value');\n }\n }));\n };\n (0, _react.useEffect)(() => {\n if (triggerOnMount) {\n removePasswordTimeout();\n }\n return () => removePasswordTimeoutRef.current.forEach(timer => {\n if (timer) {\n clearTimeout(timer);\n }\n });\n }, []);\n return removePasswordTimeout;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Group = _interopRequireDefault(require(\"./Group\"));\nvar _Input = _interopRequireDefault(require(\"./Input\"));\nvar _OTP = _interopRequireDefault(require(\"./OTP\"));\nvar _Password = _interopRequireDefault(require(\"./Password\"));\nvar _Search = _interopRequireDefault(require(\"./Search\"));\nvar _TextArea = _interopRequireDefault(require(\"./TextArea\"));\nconst Input = _Input.default;\nInput.Group = _Group.default;\nInput.Search = _Search.default;\nInput.TextArea = _TextArea.default;\nInput.Password = _Password.default;\nInput.OTP = _OTP.default;\nvar _default = exports.default = Input;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genPlaceholderStyle = exports.genInputSmallStyle = exports.genInputGroupStyle = exports.genBasicInputStyle = exports.genActiveStyle = exports.default = void 0;\nObject.defineProperty(exports, \"initComponentToken\", {\n enumerable: true,\n get: function () {\n return _token.initComponentToken;\n }\n});\nObject.defineProperty(exports, \"initInputToken\", {\n enumerable: true,\n get: function () {\n return _token.initInputToken;\n }\n});\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _compactItem = require(\"../../style/compact-item\");\nvar _internal = require(\"../../theme/internal\");\nvar _token = require(\"./token\");\nvar _variants = require(\"./variants\");\nconst genPlaceholderStyle = color => ({\n // Firefox\n '&::-moz-placeholder': {\n opacity: 1\n },\n '&::placeholder': {\n color,\n userSelect: 'none' // https://github.com/ant-design/ant-design/pull/32639\n },\n '&:placeholder-shown': {\n textOverflow: 'ellipsis'\n }\n});\nexports.genPlaceholderStyle = genPlaceholderStyle;\nconst genActiveStyle = token => ({\n borderColor: token.activeBorderColor,\n boxShadow: token.activeShadow,\n outline: 0,\n backgroundColor: token.activeBg\n});\nexports.genActiveStyle = genActiveStyle;\nconst genInputLargeStyle = token => {\n const {\n paddingBlockLG,\n lineHeightLG,\n borderRadiusLG,\n paddingInlineLG\n } = token;\n return {\n padding: `${(0, _cssinjs.unit)(paddingBlockLG)} ${(0, _cssinjs.unit)(paddingInlineLG)}`,\n fontSize: token.inputFontSizeLG,\n lineHeight: lineHeightLG,\n borderRadius: borderRadiusLG\n };\n};\nconst genInputSmallStyle = token => ({\n padding: `${(0, _cssinjs.unit)(token.paddingBlockSM)} ${(0, _cssinjs.unit)(token.paddingInlineSM)}`,\n fontSize: token.inputFontSizeSM,\n borderRadius: token.borderRadiusSM\n});\nexports.genInputSmallStyle = genInputSmallStyle;\nconst genBasicInputStyle = token => Object.assign(Object.assign({\n position: 'relative',\n display: 'inline-block',\n width: '100%',\n minWidth: 0,\n padding: `${(0, _cssinjs.unit)(token.paddingBlock)} ${(0, _cssinjs.unit)(token.paddingInline)}`,\n color: token.colorText,\n fontSize: token.inputFontSize,\n lineHeight: token.lineHeight,\n borderRadius: token.borderRadius,\n transition: `all ${token.motionDurationMid}`\n}, genPlaceholderStyle(token.colorTextPlaceholder)), {\n // Reset height for `textarea`s\n 'textarea&': {\n maxWidth: '100%',\n // prevent textarea resize from coming out of its container\n height: 'auto',\n minHeight: token.controlHeight,\n lineHeight: token.lineHeight,\n verticalAlign: 'bottom',\n transition: `all ${token.motionDurationSlow}, height 0s`,\n resize: 'vertical'\n },\n // Size\n '&-lg': Object.assign({}, genInputLargeStyle(token)),\n '&-sm': Object.assign({}, genInputSmallStyle(token)),\n // RTL\n '&-rtl, &-textarea-rtl': {\n direction: 'rtl'\n }\n});\nexports.genBasicInputStyle = genBasicInputStyle;\nconst genInputGroupStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n return {\n position: 'relative',\n display: 'table',\n width: '100%',\n borderCollapse: 'separate',\n borderSpacing: 0,\n // Undo padding and float of grid classes\n \"&[class*='col-']\": {\n paddingInlineEnd: token.paddingXS,\n '&:last-child': {\n paddingInlineEnd: 0\n }\n },\n // Sizing options\n [`&-lg ${componentCls}, &-lg > ${componentCls}-group-addon`]: Object.assign({}, genInputLargeStyle(token)),\n [`&-sm ${componentCls}, &-sm > ${componentCls}-group-addon`]: Object.assign({}, genInputSmallStyle(token)),\n // Fix https://github.com/ant-design/ant-design/issues/5754\n [`&-lg ${antCls}-select-single ${antCls}-select-selector`]: {\n height: token.controlHeightLG\n },\n [`&-sm ${antCls}-select-single ${antCls}-select-selector`]: {\n height: token.controlHeightSM\n },\n [`> ${componentCls}`]: {\n display: 'table-cell',\n '&:not(:first-child):not(:last-child)': {\n borderRadius: 0\n }\n },\n [`${componentCls}-group`]: {\n '&-addon, &-wrap': {\n display: 'table-cell',\n width: 1,\n whiteSpace: 'nowrap',\n verticalAlign: 'middle',\n '&:not(:first-child):not(:last-child)': {\n borderRadius: 0\n }\n },\n '&-wrap > *': {\n display: 'block !important'\n },\n '&-addon': {\n position: 'relative',\n padding: `0 ${(0, _cssinjs.unit)(token.paddingInline)}`,\n color: token.colorText,\n fontWeight: 'normal',\n fontSize: token.inputFontSize,\n textAlign: 'center',\n borderRadius: token.borderRadius,\n transition: `all ${token.motionDurationSlow}`,\n lineHeight: 1,\n // Reset Select's style in addon\n [`${antCls}-select`]: {\n margin: `${(0, _cssinjs.unit)(token.calc(token.paddingBlock).add(1).mul(-1).equal())} ${(0, _cssinjs.unit)(token.calc(token.paddingInline).mul(-1).equal())}`,\n [`&${antCls}-select-single:not(${antCls}-select-customize-input):not(${antCls}-pagination-size-changer)`]: {\n [`${antCls}-select-selector`]: {\n backgroundColor: 'inherit',\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,\n boxShadow: 'none'\n }\n }\n },\n // https://github.com/ant-design/ant-design/issues/31333\n [`${antCls}-cascader-picker`]: {\n margin: `-9px ${(0, _cssinjs.unit)(token.calc(token.paddingInline).mul(-1).equal())}`,\n backgroundColor: 'transparent',\n [`${antCls}-cascader-input`]: {\n textAlign: 'start',\n border: 0,\n boxShadow: 'none'\n }\n }\n }\n },\n [componentCls]: {\n width: '100%',\n marginBottom: 0,\n textAlign: 'inherit',\n '&:focus': {\n zIndex: 1,\n // Fix https://gw.alipayobjects.com/zos/rmsportal/DHNpoqfMXSfrSnlZvhsJ.png\n borderInlineEndWidth: 1\n },\n '&:hover': {\n zIndex: 1,\n borderInlineEndWidth: 1,\n [`${componentCls}-search-with-button &`]: {\n zIndex: 0\n }\n }\n },\n // Reset rounded corners\n [`> ${componentCls}:first-child, ${componentCls}-group-addon:first-child`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0,\n // Reset Select's style in addon\n [`${antCls}-select ${antCls}-select-selector`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n [`> ${componentCls}-affix-wrapper`]: {\n [`&:not(:first-child) ${componentCls}`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n },\n [`&:not(:last-child) ${componentCls}`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n [`> ${componentCls}:last-child, ${componentCls}-group-addon:last-child`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0,\n // Reset Select's style in addon\n [`${antCls}-select ${antCls}-select-selector`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n },\n [`${componentCls}-affix-wrapper`]: {\n '&:not(:last-child)': {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0,\n [`${componentCls}-search &`]: {\n borderStartStartRadius: token.borderRadius,\n borderEndStartRadius: token.borderRadius\n }\n },\n [`&:not(:first-child), ${componentCls}-search &:not(:first-child)`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n },\n [`&${componentCls}-group-compact`]: Object.assign(Object.assign({\n display: 'block'\n }, (0, _style.clearFix)()), {\n [`${componentCls}-group-addon, ${componentCls}-group-wrap, > ${componentCls}`]: {\n '&:not(:first-child):not(:last-child)': {\n borderInlineEndWidth: token.lineWidth,\n '&:hover, &:focus': {\n zIndex: 1\n }\n }\n },\n '& > *': {\n display: 'inline-flex',\n float: 'none',\n verticalAlign: 'top',\n // https://github.com/ant-design/ant-design-pro/issues/139\n borderRadius: 0\n },\n [`\n & > ${componentCls}-affix-wrapper,\n & > ${componentCls}-number-affix-wrapper,\n & > ${antCls}-picker-range\n `]: {\n display: 'inline-flex'\n },\n '& > *:not(:last-child)': {\n marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal(),\n borderInlineEndWidth: token.lineWidth\n },\n // Undo float for .ant-input-group .ant-input\n [componentCls]: {\n float: 'none'\n },\n // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input\n [`& > ${antCls}-select > ${antCls}-select-selector,\n & > ${antCls}-select-auto-complete ${componentCls},\n & > ${antCls}-cascader-picker ${componentCls},\n & > ${componentCls}-group-wrapper ${componentCls}`]: {\n borderInlineEndWidth: token.lineWidth,\n borderRadius: 0,\n '&:hover, &:focus': {\n zIndex: 1\n }\n },\n [`& > ${antCls}-select-focused`]: {\n zIndex: 1\n },\n // update z-index for arrow icon\n [`& > ${antCls}-select > ${antCls}-select-arrow`]: {\n zIndex: 1 // https://github.com/ant-design/ant-design/issues/20371\n },\n [`& > *:first-child,\n & > ${antCls}-select:first-child > ${antCls}-select-selector,\n & > ${antCls}-select-auto-complete:first-child ${componentCls},\n & > ${antCls}-cascader-picker:first-child ${componentCls}`]: {\n borderStartStartRadius: token.borderRadius,\n borderEndStartRadius: token.borderRadius\n },\n [`& > *:last-child,\n & > ${antCls}-select:last-child > ${antCls}-select-selector,\n & > ${antCls}-cascader-picker:last-child ${componentCls},\n & > ${antCls}-cascader-picker-focused:last-child ${componentCls}`]: {\n borderInlineEndWidth: token.lineWidth,\n borderStartEndRadius: token.borderRadius,\n borderEndEndRadius: token.borderRadius\n },\n // https://github.com/ant-design/ant-design/issues/12493\n [`& > ${antCls}-select-auto-complete ${componentCls}`]: {\n verticalAlign: 'top'\n },\n [`${componentCls}-group-wrapper + ${componentCls}-group-wrapper`]: {\n marginInlineStart: token.calc(token.lineWidth).mul(-1).equal(),\n [`${componentCls}-affix-wrapper`]: {\n borderRadius: 0\n }\n },\n [`${componentCls}-group-wrapper:not(:last-child)`]: {\n [`&${componentCls}-search > ${componentCls}-group`]: {\n [`& > ${componentCls}-group-addon > ${componentCls}-search-button`]: {\n borderRadius: 0\n },\n [`& > ${componentCls}`]: {\n borderStartStartRadius: token.borderRadius,\n borderStartEndRadius: 0,\n borderEndEndRadius: 0,\n borderEndStartRadius: token.borderRadius\n }\n }\n }\n })\n };\n};\nexports.genInputGroupStyle = genInputGroupStyle;\nconst genInputStyle = token => {\n const {\n componentCls,\n controlHeightSM,\n lineWidth,\n calc\n } = token;\n const FIXED_CHROME_COLOR_HEIGHT = 16;\n const colorSmallPadding = calc(controlHeightSM).sub(calc(lineWidth).mul(2)).sub(FIXED_CHROME_COLOR_HEIGHT).div(2).equal();\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), genBasicInputStyle(token)), (0, _variants.genOutlinedStyle)(token)), (0, _variants.genFilledStyle)(token)), (0, _variants.genBorderlessStyle)(token)), {\n '&[type=\"color\"]': {\n height: token.controlHeight,\n [`&${componentCls}-lg`]: {\n height: token.controlHeightLG\n },\n [`&${componentCls}-sm`]: {\n height: controlHeightSM,\n paddingTop: colorSmallPadding,\n paddingBottom: colorSmallPadding\n }\n },\n '&[type=\"search\"]::-webkit-search-cancel-button, &[type=\"search\"]::-webkit-search-decoration': {\n '-webkit-appearance': 'none'\n }\n })\n };\n};\nconst genAllowClearStyle = token => {\n const {\n componentCls\n } = token;\n return {\n // ========================= Input =========================\n [`${componentCls}-clear-icon`]: {\n margin: 0,\n color: token.colorTextQuaternary,\n fontSize: token.fontSizeIcon,\n verticalAlign: -1,\n // https://github.com/ant-design/ant-design/pull/18151\n // https://codesandbox.io/s/wizardly-sun-u10br\n cursor: 'pointer',\n transition: `color ${token.motionDurationSlow}`,\n '&:hover': {\n color: token.colorTextTertiary\n },\n '&:active': {\n color: token.colorText\n },\n '&-hidden': {\n visibility: 'hidden'\n },\n '&-has-suffix': {\n margin: `0 ${(0, _cssinjs.unit)(token.inputAffixPadding)}`\n }\n }\n };\n};\nconst genAffixStyle = token => {\n const {\n componentCls,\n inputAffixPadding,\n colorTextDescription,\n motionDurationSlow,\n colorIcon,\n colorIconHover,\n iconCls\n } = token;\n const affixCls = `${componentCls}-affix-wrapper`;\n const affixClsDisabled = `${componentCls}-affix-wrapper-disabled`;\n return {\n [affixCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, genBasicInputStyle(token)), {\n display: 'inline-flex',\n [`&:not(${componentCls}-disabled):hover`]: {\n zIndex: 1,\n [`${componentCls}-search-with-button &`]: {\n zIndex: 0\n }\n },\n '&-focused, &:focus': {\n zIndex: 1\n },\n [`> input${componentCls}`]: {\n padding: 0\n },\n [`> input${componentCls}, > textarea${componentCls}`]: {\n fontSize: 'inherit',\n border: 'none',\n borderRadius: 0,\n outline: 'none',\n background: 'transparent',\n color: 'inherit',\n '&::-ms-reveal': {\n display: 'none'\n },\n '&:focus': {\n boxShadow: 'none !important'\n }\n },\n '&::before': {\n display: 'inline-block',\n width: 0,\n visibility: 'hidden',\n content: '\"\\\\a0\"'\n },\n [componentCls]: {\n '&-prefix, &-suffix': {\n display: 'flex',\n flex: 'none',\n alignItems: 'center',\n '> *:not(:last-child)': {\n marginInlineEnd: token.paddingXS\n }\n },\n '&-show-count-suffix': {\n color: colorTextDescription\n },\n '&-show-count-has-suffix': {\n marginInlineEnd: token.paddingXXS\n },\n '&-prefix': {\n marginInlineEnd: inputAffixPadding\n },\n '&-suffix': {\n marginInlineStart: inputAffixPadding\n }\n }\n }), genAllowClearStyle(token)), {\n // password\n [`${iconCls}${componentCls}-password-icon`]: {\n color: colorIcon,\n cursor: 'pointer',\n transition: `all ${motionDurationSlow}`,\n '&:hover': {\n color: colorIconHover\n }\n }\n }),\n [affixClsDisabled]: {\n // password disabled\n [`${iconCls}${componentCls}-password-icon`]: {\n color: colorIcon,\n cursor: 'not-allowed',\n '&:hover': {\n color: colorIcon\n }\n }\n }\n };\n};\nconst genGroupStyle = token => {\n const {\n componentCls,\n borderRadiusLG,\n borderRadiusSM\n } = token;\n return {\n [`${componentCls}-group`]: Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), genInputGroupStyle(token)), {\n '&-rtl': {\n direction: 'rtl'\n },\n '&-wrapper': Object.assign(Object.assign(Object.assign({\n display: 'inline-block',\n width: '100%',\n textAlign: 'start',\n verticalAlign: 'top',\n '&-rtl': {\n direction: 'rtl'\n },\n // Size\n '&-lg': {\n [`${componentCls}-group-addon`]: {\n borderRadius: borderRadiusLG,\n fontSize: token.inputFontSizeLG\n }\n },\n '&-sm': {\n [`${componentCls}-group-addon`]: {\n borderRadius: borderRadiusSM\n }\n }\n }, (0, _variants.genOutlinedGroupStyle)(token)), (0, _variants.genFilledGroupStyle)(token)), {\n // '&-disabled': {\n // [`${componentCls}-group-addon`]: {\n // ...genDisabledStyle(token),\n // },\n // },\n // Fix the issue of using icons in Space Compact mode\n // https://github.com/ant-design/ant-design/issues/42122\n [`&:not(${componentCls}-compact-first-item):not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {\n [`${componentCls}, ${componentCls}-group-addon`]: {\n borderRadius: 0\n }\n },\n [`&:not(${componentCls}-compact-last-item)${componentCls}-compact-first-item`]: {\n [`${componentCls}, ${componentCls}-group-addon`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n [`&:not(${componentCls}-compact-first-item)${componentCls}-compact-last-item`]: {\n [`${componentCls}, ${componentCls}-group-addon`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n },\n // Fix the issue of input use show-count param in space compact mode\n // https://github.com/ant-design/ant-design/issues/46872\n [`&:not(${componentCls}-compact-last-item)${componentCls}-compact-item`]: {\n [`${componentCls}-affix-wrapper`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n }\n })\n })\n };\n};\nconst genSearchInputStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n const searchPrefixCls = `${componentCls}-search`;\n return {\n [searchPrefixCls]: {\n [componentCls]: {\n '&:hover, &:focus': {\n [`+ ${componentCls}-group-addon ${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {\n borderInlineStartColor: token.colorPrimaryHover\n }\n }\n },\n [`${componentCls}-affix-wrapper`]: {\n height: token.controlHeight,\n borderRadius: 0\n },\n // fix slight height diff in Firefox:\n // https://ant.design/components/auto-complete-cn/#auto-complete-demo-certain-category\n [`${componentCls}-lg`]: {\n lineHeight: token.calc(token.lineHeightLG).sub(0.0002).equal()\n },\n [`> ${componentCls}-group`]: {\n [`> ${componentCls}-group-addon:last-child`]: {\n insetInlineStart: -1,\n padding: 0,\n border: 0,\n [`${searchPrefixCls}-button`]: {\n // Fix https://github.com/ant-design/ant-design/issues/47150\n marginInlineEnd: -1,\n paddingTop: 0,\n paddingBottom: 0,\n borderStartStartRadius: 0,\n borderEndStartRadius: 0,\n boxShadow: 'none'\n },\n [`${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {\n color: token.colorTextDescription,\n '&:hover': {\n color: token.colorPrimaryHover\n },\n '&:active': {\n color: token.colorPrimaryActive\n },\n [`&${antCls}-btn-loading::before`]: {\n insetInlineStart: 0,\n insetInlineEnd: 0,\n insetBlockStart: 0,\n insetBlockEnd: 0\n }\n }\n }\n },\n [`${searchPrefixCls}-button`]: {\n height: token.controlHeight,\n '&:hover, &:focus': {\n zIndex: 1\n }\n },\n '&-large': {\n [`${componentCls}-affix-wrapper, ${searchPrefixCls}-button`]: {\n height: token.controlHeightLG\n }\n },\n '&-small': {\n [`${componentCls}-affix-wrapper, ${searchPrefixCls}-button`]: {\n height: token.controlHeightSM\n }\n },\n '&-rtl': {\n direction: 'rtl'\n },\n // ===================== Compact Item Customized Styles =====================\n [`&${componentCls}-compact-item`]: {\n [`&:not(${componentCls}-compact-last-item)`]: {\n [`${componentCls}-group-addon`]: {\n [`${componentCls}-search-button`]: {\n marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal(),\n borderRadius: 0\n }\n }\n },\n [`&:not(${componentCls}-compact-first-item)`]: {\n [`${componentCls},${componentCls}-affix-wrapper`]: {\n borderRadius: 0\n }\n },\n [`> ${componentCls}-group-addon ${componentCls}-search-button,\n > ${componentCls},\n ${componentCls}-affix-wrapper`]: {\n '&:hover, &:focus, &:active': {\n zIndex: 2\n }\n },\n [`> ${componentCls}-affix-wrapper-focused`]: {\n zIndex: 2\n }\n }\n }\n };\n};\nconst genTextAreaStyle = token => {\n const {\n componentCls,\n paddingLG\n } = token;\n const textareaPrefixCls = `${componentCls}-textarea`;\n return {\n [textareaPrefixCls]: {\n position: 'relative',\n '&-show-count': {\n // https://github.com/ant-design/ant-design/issues/33049\n [`> ${componentCls}`]: {\n height: '100%'\n },\n [`${componentCls}-data-count`]: {\n position: 'absolute',\n bottom: token.calc(token.fontSize).mul(token.lineHeight).mul(-1).equal(),\n insetInlineEnd: 0,\n color: token.colorTextDescription,\n whiteSpace: 'nowrap',\n pointerEvents: 'none'\n }\n },\n [`\n &-allow-clear > ${componentCls},\n &-affix-wrapper${textareaPrefixCls}-has-feedback ${componentCls}\n `]: {\n paddingInlineEnd: paddingLG\n },\n [`&-affix-wrapper${componentCls}-affix-wrapper`]: {\n padding: 0,\n [`> textarea${componentCls}`]: {\n fontSize: 'inherit',\n border: 'none',\n outline: 'none',\n background: 'transparent',\n '&:focus': {\n boxShadow: 'none !important'\n }\n },\n [`${componentCls}-suffix`]: {\n margin: 0,\n '> *:not(:last-child)': {\n marginInline: 0\n },\n // Clear Icon\n [`${componentCls}-clear-icon`]: {\n position: 'absolute',\n insetInlineEnd: token.paddingInline,\n insetBlockStart: token.paddingXS\n },\n // Feedback Icon\n [`${textareaPrefixCls}-suffix`]: {\n position: 'absolute',\n top: 0,\n insetInlineEnd: token.paddingInline,\n bottom: 0,\n zIndex: 1,\n display: 'inline-flex',\n alignItems: 'center',\n margin: 'auto',\n pointerEvents: 'none'\n }\n }\n },\n [`&-affix-wrapper${componentCls}-affix-wrapper-sm`]: {\n [`${componentCls}-suffix`]: {\n [`${componentCls}-clear-icon`]: {\n insetInlineEnd: token.paddingInlineSM\n }\n }\n }\n }\n };\n};\n// ============================== Range ===============================\nconst genRangeStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-out-of-range`]: {\n [`&, & input, & textarea, ${componentCls}-show-count-suffix, ${componentCls}-data-count`]: {\n color: token.colorError\n }\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genStyleHooks)('Input', token => {\n const inputToken = (0, _internal.mergeToken)(token, (0, _token.initInputToken)(token));\n return [genInputStyle(inputToken), genTextAreaStyle(inputToken), genAffixStyle(inputToken), genGroupStyle(inputToken), genSearchInputStyle(inputToken), genRangeStyle(inputToken),\n // =====================================================\n // == Space Compact ==\n // =====================================================\n (0, _compactItem.genCompactItemStyle)(inputToken)];\n}, _token.initComponentToken, {\n resetFont: false\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\nvar _token = require(\"./token\");\n// =============================== OTP ================================\nconst genOTPStyle = token => {\n const {\n componentCls,\n paddingXS\n } = token;\n return {\n [componentCls]: {\n display: 'inline-flex',\n alignItems: 'center',\n flexWrap: 'nowrap',\n columnGap: paddingXS,\n '&-rtl': {\n direction: 'rtl'\n },\n [`${componentCls}-input`]: {\n textAlign: 'center',\n paddingInline: token.paddingXXS\n },\n // ================= Size =================\n [`&${componentCls}-sm ${componentCls}-input`]: {\n paddingInline: token.calc(token.paddingXXS).div(2).equal()\n },\n [`&${componentCls}-lg ${componentCls}-input`]: {\n paddingInline: token.paddingXS\n }\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genStyleHooks)(['Input', 'OTP'], token => {\n const inputToken = (0, _internal.mergeToken)(token, (0, _token.initInputToken)(token));\n return [genOTPStyle(inputToken)];\n}, _token.initComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.initComponentToken = void 0;\nexports.initInputToken = initInputToken;\nvar _internal = require(\"../../theme/internal\");\nfunction initInputToken(token) {\n return (0, _internal.mergeToken)(token, {\n inputAffixPadding: token.paddingXXS\n });\n}\nconst initComponentToken = token => {\n const {\n controlHeight,\n fontSize,\n lineHeight,\n lineWidth,\n controlHeightSM,\n controlHeightLG,\n fontSizeLG,\n lineHeightLG,\n paddingSM,\n controlPaddingHorizontalSM,\n controlPaddingHorizontal,\n colorFillAlter,\n colorPrimaryHover,\n colorPrimary,\n controlOutlineWidth,\n controlOutline,\n colorErrorOutline,\n colorWarningOutline,\n colorBgContainer\n } = token;\n return {\n paddingBlock: Math.max(Math.round((controlHeight - fontSize * lineHeight) / 2 * 10) / 10 - lineWidth, 0),\n paddingBlockSM: Math.max(Math.round((controlHeightSM - fontSize * lineHeight) / 2 * 10) / 10 - lineWidth, 0),\n paddingBlockLG: Math.ceil((controlHeightLG - fontSizeLG * lineHeightLG) / 2 * 10) / 10 - lineWidth,\n paddingInline: paddingSM - lineWidth,\n paddingInlineSM: controlPaddingHorizontalSM - lineWidth,\n paddingInlineLG: controlPaddingHorizontal - lineWidth,\n addonBg: colorFillAlter,\n activeBorderColor: colorPrimary,\n hoverBorderColor: colorPrimaryHover,\n activeShadow: `0 0 0 ${controlOutlineWidth}px ${controlOutline}`,\n errorActiveShadow: `0 0 0 ${controlOutlineWidth}px ${colorErrorOutline}`,\n warningActiveShadow: `0 0 0 ${controlOutlineWidth}px ${colorWarningOutline}`,\n hoverBg: colorBgContainer,\n activeBg: colorBgContainer,\n inputFontSize: fontSize,\n inputFontSizeLG: fontSizeLG,\n inputFontSizeSM: fontSize\n };\n};\nexports.initComponentToken = initComponentToken;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genOutlinedStyle = exports.genOutlinedGroupStyle = exports.genHoverStyle = exports.genFilledStyle = exports.genFilledGroupStyle = exports.genDisabledStyle = exports.genBorderlessStyle = exports.genBaseOutlinedStyle = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _internal = require(\"../../theme/internal\");\nconst genHoverStyle = token => ({\n borderColor: token.hoverBorderColor,\n backgroundColor: token.hoverBg\n});\nexports.genHoverStyle = genHoverStyle;\nconst genDisabledStyle = token => ({\n color: token.colorTextDisabled,\n backgroundColor: token.colorBgContainerDisabled,\n borderColor: token.colorBorder,\n boxShadow: 'none',\n cursor: 'not-allowed',\n opacity: 1,\n 'input[disabled], textarea[disabled]': {\n cursor: 'not-allowed'\n },\n '&:hover:not([disabled])': Object.assign({}, genHoverStyle((0, _internal.mergeToken)(token, {\n hoverBorderColor: token.colorBorder,\n hoverBg: token.colorBgContainerDisabled\n })))\n});\n/* ============== Outlined ============== */\nexports.genDisabledStyle = genDisabledStyle;\nconst genBaseOutlinedStyle = (token, options) => ({\n background: token.colorBgContainer,\n borderWidth: token.lineWidth,\n borderStyle: token.lineType,\n borderColor: options.borderColor,\n '&:hover': {\n borderColor: options.hoverBorderColor,\n backgroundColor: token.hoverBg\n },\n '&:focus, &:focus-within': {\n borderColor: options.activeBorderColor,\n boxShadow: options.activeShadow,\n outline: 0,\n backgroundColor: token.activeBg\n }\n});\nexports.genBaseOutlinedStyle = genBaseOutlinedStyle;\nconst genOutlinedStatusStyle = (token, options) => ({\n [`&${token.componentCls}-status-${options.status}:not(${token.componentCls}-disabled)`]: Object.assign(Object.assign({}, genBaseOutlinedStyle(token, options)), {\n [`${token.componentCls}-prefix, ${token.componentCls}-suffix`]: {\n color: options.affixColor\n }\n }),\n [`&${token.componentCls}-status-${options.status}${token.componentCls}-disabled`]: {\n borderColor: options.borderColor\n }\n});\nconst genOutlinedStyle = (token, extraStyles) => ({\n '&-outlined': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseOutlinedStyle(token, {\n borderColor: token.colorBorder,\n hoverBorderColor: token.hoverBorderColor,\n activeBorderColor: token.activeBorderColor,\n activeShadow: token.activeShadow\n })), {\n [`&${token.componentCls}-disabled, &[disabled]`]: Object.assign({}, genDisabledStyle(token))\n }), genOutlinedStatusStyle(token, {\n status: 'error',\n borderColor: token.colorError,\n hoverBorderColor: token.colorErrorBorderHover,\n activeBorderColor: token.colorError,\n activeShadow: token.errorActiveShadow,\n affixColor: token.colorError\n })), genOutlinedStatusStyle(token, {\n status: 'warning',\n borderColor: token.colorWarning,\n hoverBorderColor: token.colorWarningBorderHover,\n activeBorderColor: token.colorWarning,\n activeShadow: token.warningActiveShadow,\n affixColor: token.colorWarning\n })), extraStyles)\n});\nexports.genOutlinedStyle = genOutlinedStyle;\nconst genOutlinedGroupStatusStyle = (token, options) => ({\n [`&${token.componentCls}-group-wrapper-status-${options.status}`]: {\n [`${token.componentCls}-group-addon`]: {\n borderColor: options.addonBorderColor,\n color: options.addonColor\n }\n }\n});\nconst genOutlinedGroupStyle = token => ({\n '&-outlined': Object.assign(Object.assign(Object.assign({\n [`${token.componentCls}-group`]: {\n '&-addon': {\n background: token.addonBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`\n },\n '&-addon:first-child': {\n borderInlineEnd: 0\n },\n '&-addon:last-child': {\n borderInlineStart: 0\n }\n }\n }, genOutlinedGroupStatusStyle(token, {\n status: 'error',\n addonBorderColor: token.colorError,\n addonColor: token.colorErrorText\n })), genOutlinedGroupStatusStyle(token, {\n status: 'warning',\n addonBorderColor: token.colorWarning,\n addonColor: token.colorWarningText\n })), {\n [`&${token.componentCls}-group-wrapper-disabled`]: {\n [`${token.componentCls}-group-addon`]: Object.assign({}, genDisabledStyle(token))\n }\n })\n});\n/* ============ Borderless ============ */\nexports.genOutlinedGroupStyle = genOutlinedGroupStyle;\nconst genBorderlessStyle = (token, extraStyles) => {\n const {\n componentCls\n } = token;\n return {\n '&-borderless': Object.assign({\n background: 'transparent',\n border: 'none',\n '&:focus, &:focus-within': {\n outline: 'none'\n },\n // >>>>> Disabled\n [`&${componentCls}-disabled, &[disabled]`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n },\n // >>>>> Status\n [`&${componentCls}-status-error`]: {\n '&, & input, & textarea': {\n color: token.colorError\n }\n },\n [`&${componentCls}-status-warning`]: {\n '&, & input, & textarea': {\n color: token.colorWarning\n }\n }\n }, extraStyles)\n };\n};\n/* ============== Filled ============== */\nexports.genBorderlessStyle = genBorderlessStyle;\nconst genBaseFilledStyle = (token, options) => ({\n background: options.bg,\n borderWidth: token.lineWidth,\n borderStyle: token.lineType,\n borderColor: 'transparent',\n 'input&, & input, textarea&, & textarea': {\n color: options === null || options === void 0 ? void 0 : options.inputColor\n },\n '&:hover': {\n background: options.hoverBg\n },\n '&:focus, &:focus-within': {\n outline: 0,\n borderColor: options.activeBorderColor,\n backgroundColor: token.activeBg\n }\n});\nconst genFilledStatusStyle = (token, options) => ({\n [`&${token.componentCls}-status-${options.status}:not(${token.componentCls}-disabled)`]: Object.assign(Object.assign({}, genBaseFilledStyle(token, options)), {\n [`${token.componentCls}-prefix, ${token.componentCls}-suffix`]: {\n color: options.affixColor\n }\n })\n});\nconst genFilledStyle = (token, extraStyles) => ({\n '&-filled': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseFilledStyle(token, {\n bg: token.colorFillTertiary,\n hoverBg: token.colorFillSecondary,\n activeBorderColor: token.activeBorderColor\n })), {\n [`&${token.componentCls}-disabled, &[disabled]`]: Object.assign({}, genDisabledStyle(token))\n }), genFilledStatusStyle(token, {\n status: 'error',\n bg: token.colorErrorBg,\n hoverBg: token.colorErrorBgHover,\n activeBorderColor: token.colorError,\n inputColor: token.colorErrorText,\n affixColor: token.colorError\n })), genFilledStatusStyle(token, {\n status: 'warning',\n bg: token.colorWarningBg,\n hoverBg: token.colorWarningBgHover,\n activeBorderColor: token.colorWarning,\n inputColor: token.colorWarningText,\n affixColor: token.colorWarning\n })), extraStyles)\n});\nexports.genFilledStyle = genFilledStyle;\nconst genFilledGroupStatusStyle = (token, options) => ({\n [`&${token.componentCls}-group-wrapper-status-${options.status}`]: {\n [`${token.componentCls}-group-addon`]: {\n background: options.addonBg,\n color: options.addonColor\n }\n }\n});\nconst genFilledGroupStyle = token => ({\n '&-filled': Object.assign(Object.assign(Object.assign({\n [`${token.componentCls}-group`]: {\n '&-addon': {\n background: token.colorFillTertiary\n },\n [`${token.componentCls}-filled:not(:focus):not(:focus-within)`]: {\n '&:not(:first-child)': {\n borderInlineStart: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n },\n '&:not(:last-child)': {\n borderInlineEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n }\n }\n }\n }, genFilledGroupStatusStyle(token, {\n status: 'error',\n addonBg: token.colorErrorBg,\n addonColor: token.colorErrorText\n })), genFilledGroupStatusStyle(token, {\n status: 'warning',\n addonBg: token.colorWarningBg,\n addonColor: token.colorWarningText\n })), {\n [`&${token.componentCls}-group-wrapper-disabled`]: {\n [`${token.componentCls}-group`]: {\n '&-addon': {\n background: token.colorFillTertiary,\n color: token.colorTextDisabled\n },\n '&-addon:first-child': {\n borderInlineStart: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderTop: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`\n },\n '&-addon:last-child': {\n borderInlineEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderTop: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`\n }\n }\n }\n })\n});\nexports.genFilledGroupStyle = genFilledGroupStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hasPrefixSuffix = hasPrefixSuffix;\nfunction hasPrefixSuffix(props) {\n return !!(props.prefix || props.suffix || props.allowClear || props.showCount);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.SiderContext = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _BarsOutlined = _interopRequireDefault(require(\"@ant-design/icons/BarsOutlined\"));\nvar _LeftOutlined = _interopRequireDefault(require(\"@ant-design/icons/LeftOutlined\"));\nvar _RightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RightOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _isNumeric = _interopRequireDefault(require(\"../_util/isNumeric\"));\nvar _configProvider = require(\"../config-provider\");\nvar _context = require(\"./context\");\nvar _sider = _interopRequireDefault(require(\"./style/sider\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst dimensionMaxMap = {\n xs: '479.98px',\n sm: '575.98px',\n md: '767.98px',\n lg: '991.98px',\n xl: '1199.98px',\n xxl: '1599.98px'\n};\nconst SiderContext = exports.SiderContext = /*#__PURE__*/React.createContext({});\nconst generateId = (() => {\n let i = 0;\n return function () {\n let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n i += 1;\n return `${prefix}${i}`;\n };\n})();\nconst Sider = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n trigger,\n children,\n defaultCollapsed = false,\n theme = 'dark',\n style = {},\n collapsible = false,\n reverseArrow = false,\n width = 200,\n collapsedWidth = 80,\n zeroWidthTriggerStyle,\n breakpoint,\n onCollapse,\n onBreakpoint\n } = props,\n otherProps = __rest(props, [\"prefixCls\", \"className\", \"trigger\", \"children\", \"defaultCollapsed\", \"theme\", \"style\", \"collapsible\", \"reverseArrow\", \"width\", \"collapsedWidth\", \"zeroWidthTriggerStyle\", \"breakpoint\", \"onCollapse\", \"onBreakpoint\"]);\n const {\n siderHook\n } = (0, _react.useContext)(_context.LayoutContext);\n const [collapsed, setCollapsed] = (0, _react.useState)('collapsed' in props ? props.collapsed : defaultCollapsed);\n const [below, setBelow] = (0, _react.useState)(false);\n (0, _react.useEffect)(() => {\n if ('collapsed' in props) {\n setCollapsed(props.collapsed);\n }\n }, [props.collapsed]);\n const handleSetCollapsed = (value, type) => {\n if (!('collapsed' in props)) {\n setCollapsed(value);\n }\n onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(value, type);\n };\n // =========================== Prefix ===========================\n const {\n getPrefixCls\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('layout-sider', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _sider.default)(prefixCls);\n // ========================= Responsive =========================\n const responsiveHandlerRef = (0, _react.useRef)();\n responsiveHandlerRef.current = mql => {\n setBelow(mql.matches);\n onBreakpoint === null || onBreakpoint === void 0 ? void 0 : onBreakpoint(mql.matches);\n if (collapsed !== mql.matches) {\n handleSetCollapsed(mql.matches, 'responsive');\n }\n };\n (0, _react.useEffect)(() => {\n function responsiveHandler(mql) {\n return responsiveHandlerRef.current(mql);\n }\n let mql;\n if (typeof window !== 'undefined') {\n const {\n matchMedia\n } = window;\n if (matchMedia && breakpoint && breakpoint in dimensionMaxMap) {\n mql = matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);\n try {\n mql.addEventListener('change', responsiveHandler);\n } catch (_a) {\n mql.addListener(responsiveHandler);\n }\n responsiveHandler(mql);\n }\n }\n return () => {\n try {\n mql === null || mql === void 0 ? void 0 : mql.removeEventListener('change', responsiveHandler);\n } catch (_a) {\n mql === null || mql === void 0 ? void 0 : mql.removeListener(responsiveHandler);\n }\n };\n }, [breakpoint]); // in order to accept dynamic 'breakpoint' property, we need to add 'breakpoint' into dependency array.\n (0, _react.useEffect)(() => {\n const uniqueId = generateId('ant-sider-');\n siderHook.addSider(uniqueId);\n return () => siderHook.removeSider(uniqueId);\n }, []);\n const toggle = () => {\n handleSetCollapsed(!collapsed, 'clickTrigger');\n };\n const renderSider = () => {\n const divProps = (0, _omit.default)(otherProps, ['collapsed']);\n const rawWidth = collapsed ? collapsedWidth : width;\n // use \"px\" as fallback unit for width\n const siderWidth = (0, _isNumeric.default)(rawWidth) ? `${rawWidth}px` : String(rawWidth);\n // special trigger when collapsedWidth == 0\n const zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? (/*#__PURE__*/React.createElement(\"span\", {\n onClick: toggle,\n className: (0, _classnames.default)(`${prefixCls}-zero-width-trigger`, `${prefixCls}-zero-width-trigger-${reverseArrow ? 'right' : 'left'}`),\n style: zeroWidthTriggerStyle\n }, trigger || /*#__PURE__*/React.createElement(_BarsOutlined.default, null))) : null;\n const iconObj = {\n expanded: reverseArrow ? /*#__PURE__*/React.createElement(_RightOutlined.default, null) : /*#__PURE__*/React.createElement(_LeftOutlined.default, null),\n collapsed: reverseArrow ? /*#__PURE__*/React.createElement(_LeftOutlined.default, null) : /*#__PURE__*/React.createElement(_RightOutlined.default, null)\n };\n const status = collapsed ? 'collapsed' : 'expanded';\n const defaultTrigger = iconObj[status];\n const triggerDom = trigger !== null ? zeroWidthTrigger || (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-trigger`,\n onClick: toggle,\n style: {\n width: siderWidth\n }\n }, trigger || defaultTrigger)) : null;\n const divStyle = Object.assign(Object.assign({}, style), {\n flex: `0 0 ${siderWidth}`,\n maxWidth: siderWidth,\n minWidth: siderWidth,\n width: siderWidth\n });\n const siderCls = (0, _classnames.default)(prefixCls, `${prefixCls}-${theme}`, {\n [`${prefixCls}-collapsed`]: !!collapsed,\n [`${prefixCls}-has-trigger`]: collapsible && trigger !== null && !zeroWidthTrigger,\n [`${prefixCls}-below`]: !!below,\n [`${prefixCls}-zero-width`]: parseFloat(siderWidth) === 0\n }, className, hashId, cssVarCls);\n return /*#__PURE__*/React.createElement(\"aside\", Object.assign({\n className: siderCls\n }, divProps, {\n style: divStyle,\n ref: ref\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-children`\n }, children), collapsible || below && zeroWidthTrigger ? triggerDom : null);\n };\n const contextValue = React.useMemo(() => ({\n siderCollapsed: collapsed\n }), [collapsed]);\n return wrapCSSVar(/*#__PURE__*/React.createElement(SiderContext.Provider, {\n value: contextValue\n }, renderSider()));\n});\nif (process.env.NODE_ENV !== 'production') {\n Sider.displayName = 'Sider';\n}\nvar _default = exports.default = Sider;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.LayoutContext = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst LayoutContext = exports.LayoutContext = /*#__PURE__*/React.createContext({\n siderHook: {\n addSider: () => null,\n removeSider: () => null\n }\n});","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useHasSider;\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _Sider = _interopRequireDefault(require(\"../Sider\"));\nfunction useHasSider(siders, children, hasSider) {\n if (typeof hasSider === 'boolean') {\n return hasSider;\n }\n if (siders.length) {\n return true;\n }\n const childNodes = (0, _toArray.default)(children);\n return childNodes.some(node => node.type === _Sider.default);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _layout = _interopRequireWildcard(require(\"./layout\"));\nvar _Sider = _interopRequireWildcard(require(\"./Sider\"));\nconst Layout = _layout.default;\nLayout.Header = _layout.Header;\nLayout.Footer = _layout.Footer;\nLayout.Content = _layout.Content;\nLayout.Sider = _Sider.default;\nLayout._InternalSiderContext = _Sider.SiderContext;\nvar _default = exports.default = Layout;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.Header = exports.Footer = exports.Content = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _configProvider = require(\"../config-provider\");\nvar _context = require(\"./context\");\nvar _useHasSider = _interopRequireDefault(require(\"./hooks/useHasSider\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction generator(_ref) {\n let {\n suffixCls,\n tagName,\n displayName\n } = _ref;\n return BasicComponent => {\n const Adapter = /*#__PURE__*/React.forwardRef((props, ref) => (/*#__PURE__*/React.createElement(BasicComponent, Object.assign({\n ref: ref,\n suffixCls: suffixCls,\n tagName: tagName\n }, props))));\n if (process.env.NODE_ENV !== 'production') {\n Adapter.displayName = displayName;\n }\n return Adapter;\n };\n}\nconst Basic = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n suffixCls,\n className,\n tagName: TagName\n } = props,\n others = __rest(props, [\"prefixCls\", \"suffixCls\", \"className\", \"tagName\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('layout', customizePrefixCls);\n const [wrapSSR, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const prefixWithSuffixCls = suffixCls ? `${prefixCls}-${suffixCls}` : prefixCls;\n return wrapSSR(/*#__PURE__*/React.createElement(TagName, Object.assign({\n className: (0, _classnames.default)(customizePrefixCls || prefixWithSuffixCls, className, hashId, cssVarCls),\n ref: ref\n }, others)));\n});\nconst BasicLayout = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const [siders, setSiders] = React.useState([]);\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children,\n hasSider,\n tagName: Tag,\n style\n } = props,\n others = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"children\", \"hasSider\", \"tagName\", \"style\"]);\n const passedProps = (0, _omit.default)(others, ['suffixCls']);\n const {\n getPrefixCls,\n layout\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('layout', customizePrefixCls);\n const mergedHasSider = (0, _useHasSider.default)(siders, children, hasSider);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const classString = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-has-sider`]: mergedHasSider,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, layout === null || layout === void 0 ? void 0 : layout.className, className, rootClassName, hashId, cssVarCls);\n const contextValue = React.useMemo(() => ({\n siderHook: {\n addSider: id => {\n setSiders(prev => [].concat((0, _toConsumableArray2.default)(prev), [id]));\n },\n removeSider: id => {\n setSiders(prev => prev.filter(currentId => currentId !== id));\n }\n }\n }), []);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_context.LayoutContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Tag, Object.assign({\n ref: ref,\n className: classString,\n style: Object.assign(Object.assign({}, layout === null || layout === void 0 ? void 0 : layout.style), style)\n }, passedProps), children)));\n});\nconst Layout = generator({\n tagName: 'div',\n displayName: 'Layout'\n})(BasicLayout);\nconst Header = exports.Header = generator({\n suffixCls: 'header',\n tagName: 'header',\n displayName: 'Header'\n})(Basic);\nconst Footer = exports.Footer = generator({\n suffixCls: 'footer',\n tagName: 'footer',\n displayName: 'Footer'\n})(Basic);\nconst Content = exports.Content = generator({\n suffixCls: 'content',\n tagName: 'main',\n displayName: 'Content'\n})(Basic);\nvar _default = exports.default = Layout;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = exports.DEPRECATED_TOKENS = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _internal = require(\"../../theme/internal\");\nconst genLayoutStyle = token => {\n const {\n antCls,\n // .ant\n componentCls,\n // .ant-layout\n colorText,\n footerBg,\n headerHeight,\n headerPadding,\n headerColor,\n footerPadding,\n fontSize,\n bodyBg,\n headerBg\n } = token;\n return {\n [componentCls]: {\n display: 'flex',\n flex: 'auto',\n flexDirection: 'column',\n /* fix firefox can't set height smaller than content on flex item */\n minHeight: 0,\n background: bodyBg,\n '&, *': {\n boxSizing: 'border-box'\n },\n [`&${componentCls}-has-sider`]: {\n flexDirection: 'row',\n [`> ${componentCls}, > ${componentCls}-content`]: {\n // https://segmentfault.com/a/1190000019498300\n width: 0\n }\n },\n [`${componentCls}-header, &${componentCls}-footer`]: {\n flex: '0 0 auto'\n },\n // RTL\n '&-rtl': {\n direction: 'rtl'\n }\n },\n // ==================== Header ====================\n [`${componentCls}-header`]: {\n height: headerHeight,\n padding: headerPadding,\n color: headerColor,\n lineHeight: (0, _cssinjs.unit)(headerHeight),\n background: headerBg,\n // Other components/menu/style/index.less line:686\n // Integration with header element so menu items have the same height\n [`${antCls}-menu`]: {\n lineHeight: 'inherit'\n }\n },\n // ==================== Footer ====================\n [`${componentCls}-footer`]: {\n padding: footerPadding,\n color: colorText,\n fontSize,\n background: footerBg\n },\n // =================== Content ====================\n [`${componentCls}-content`]: {\n flex: 'auto',\n color: colorText,\n // fix firefox can't set height smaller than content on flex item\n minHeight: 0\n }\n };\n};\nconst prepareComponentToken = token => {\n const {\n colorBgLayout,\n controlHeight,\n controlHeightLG,\n colorText,\n controlHeightSM,\n marginXXS,\n colorTextLightSolid,\n colorBgContainer\n } = token;\n const paddingInline = controlHeightLG * 1.25;\n return {\n // Deprecated\n colorBgHeader: '#001529',\n colorBgBody: colorBgLayout,\n colorBgTrigger: '#002140',\n bodyBg: colorBgLayout,\n headerBg: '#001529',\n headerHeight: controlHeight * 2,\n headerPadding: `0 ${paddingInline}px`,\n headerColor: colorText,\n footerPadding: `${controlHeightSM}px ${paddingInline}px`,\n footerBg: colorBgLayout,\n siderBg: '#001529',\n triggerHeight: controlHeightLG + marginXXS * 2,\n triggerBg: '#002140',\n triggerColor: colorTextLightSolid,\n zeroTriggerWidth: controlHeightLG,\n zeroTriggerHeight: controlHeightLG,\n lightSiderBg: colorBgContainer,\n lightTriggerBg: colorBgContainer,\n lightTriggerColor: colorText\n };\n};\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nconst DEPRECATED_TOKENS = exports.DEPRECATED_TOKENS = [['colorBgBody', 'bodyBg'], ['colorBgHeader', 'headerBg'], ['colorBgTrigger', 'triggerBg']];\nvar _default = exports.default = (0, _internal.genStyleHooks)('Layout', token => [genLayoutStyle(token)], prepareComponentToken, {\n deprecatedTokens: DEPRECATED_TOKENS\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _ = require(\".\");\nvar _internal = require(\"../../theme/internal\");\nconst genSiderStyle = token => {\n const {\n componentCls,\n siderBg,\n motionDurationMid,\n motionDurationSlow,\n antCls,\n triggerHeight,\n triggerColor,\n triggerBg,\n headerHeight,\n zeroTriggerWidth,\n zeroTriggerHeight,\n borderRadius,\n lightSiderBg,\n lightTriggerColor,\n lightTriggerBg,\n bodyBg\n } = token;\n return {\n [componentCls]: {\n position: 'relative',\n // fix firefox can't set width smaller than content on flex item\n minWidth: 0,\n background: siderBg,\n transition: `all ${motionDurationMid}, background 0s`,\n '&-has-trigger': {\n paddingBottom: triggerHeight\n },\n '&-right': {\n order: 1\n },\n [`${componentCls}-children`]: {\n height: '100%',\n // Hack for fixing margin collapse bug\n // https://github.com/ant-design/ant-design/issues/7967\n // solution from https://stackoverflow.com/a/33132624/3040605\n marginTop: -0.1,\n paddingTop: 0.1,\n [`${antCls}-menu${antCls}-menu-inline-collapsed`]: {\n width: 'auto'\n }\n },\n [`${componentCls}-trigger`]: {\n position: 'fixed',\n bottom: 0,\n zIndex: 1,\n height: triggerHeight,\n color: triggerColor,\n lineHeight: (0, _cssinjs.unit)(triggerHeight),\n textAlign: 'center',\n background: triggerBg,\n cursor: 'pointer',\n transition: `all ${motionDurationMid}`\n },\n '&-zero-width': {\n '> *': {\n overflow: 'hidden'\n },\n '&-trigger': {\n position: 'absolute',\n top: headerHeight,\n insetInlineEnd: token.calc(zeroTriggerWidth).mul(-1).equal(),\n zIndex: 1,\n width: zeroTriggerWidth,\n height: zeroTriggerHeight,\n color: triggerColor,\n fontSize: token.fontSizeXL,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n background: siderBg,\n borderStartStartRadius: 0,\n borderStartEndRadius: borderRadius,\n borderEndEndRadius: borderRadius,\n borderEndStartRadius: 0,\n cursor: 'pointer',\n transition: `background ${motionDurationSlow} ease`,\n '&::after': {\n position: 'absolute',\n inset: 0,\n background: 'transparent',\n transition: `all ${motionDurationSlow}`,\n content: '\"\"'\n },\n '&:hover::after': {\n background: `rgba(255, 255, 255, 0.2)`\n },\n '&-right': {\n insetInlineStart: token.calc(zeroTriggerWidth).mul(-1).equal(),\n borderStartStartRadius: borderRadius,\n borderStartEndRadius: 0,\n borderEndEndRadius: 0,\n borderEndStartRadius: borderRadius\n }\n }\n },\n // Light\n '&-light': {\n background: lightSiderBg,\n [`${componentCls}-trigger`]: {\n color: lightTriggerColor,\n background: lightTriggerBg\n },\n [`${componentCls}-zero-width-trigger`]: {\n color: lightTriggerColor,\n background: lightTriggerBg,\n border: `1px solid ${bodyBg}`,\n // Safe to modify to any other color\n borderInlineStart: 0\n }\n }\n }\n };\n};\nvar _default = exports.default = (0, _internal.genStyleHooks)(['Layout', 'Sider'], token => [genSiderStyle(token)], _.prepareComponentToken, {\n deprecatedTokens: _.DEPRECATED_TOKENS\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.Meta = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _configProvider = require(\"../config-provider\");\nvar _grid = require(\"../grid\");\nvar _context = require(\"./context\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Meta = _a => {\n var {\n prefixCls: customizePrefixCls,\n className,\n avatar,\n title,\n description\n } = _a,\n others = __rest(_a, [\"prefixCls\", \"className\", \"avatar\", \"title\", \"description\"]);\n const {\n getPrefixCls\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('list', customizePrefixCls);\n const classString = (0, _classnames.default)(`${prefixCls}-item-meta`, className);\n const content = /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-item-meta-content`\n }, title && /*#__PURE__*/_react.default.createElement(\"h4\", {\n className: `${prefixCls}-item-meta-title`\n }, title), description && /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-item-meta-description`\n }, description));\n return /*#__PURE__*/_react.default.createElement(\"div\", Object.assign({}, others, {\n className: classString\n }), avatar && /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-item-meta-avatar`\n }, avatar), (title || description) && content);\n};\nexports.Meta = Meta;\nconst InternalItem = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n children,\n actions,\n extra,\n styles,\n className,\n classNames: customizeClassNames,\n colStyle\n } = props,\n others = __rest(props, [\"prefixCls\", \"children\", \"actions\", \"extra\", \"styles\", \"className\", \"classNames\", \"colStyle\"]);\n const {\n grid,\n itemLayout\n } = (0, _react.useContext)(_context.ListContext);\n const {\n getPrefixCls,\n list\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const moduleClass = moduleName => {\n var _a, _b;\n return (0, _classnames.default)((_b = (_a = list === null || list === void 0 ? void 0 : list.item) === null || _a === void 0 ? void 0 : _a.classNames) === null || _b === void 0 ? void 0 : _b[moduleName], customizeClassNames === null || customizeClassNames === void 0 ? void 0 : customizeClassNames[moduleName]);\n };\n const moduleStyle = moduleName => {\n var _a, _b;\n return Object.assign(Object.assign({}, (_b = (_a = list === null || list === void 0 ? void 0 : list.item) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b[moduleName]), styles === null || styles === void 0 ? void 0 : styles[moduleName]);\n };\n const isItemContainsTextNodeAndNotSingular = () => {\n let result = false;\n _react.Children.forEach(children, element => {\n if (typeof element === 'string') {\n result = true;\n }\n });\n return result && _react.Children.count(children) > 1;\n };\n const isFlexMode = () => {\n if (itemLayout === 'vertical') {\n return !!extra;\n }\n return !isItemContainsTextNodeAndNotSingular();\n };\n const prefixCls = getPrefixCls('list', customizePrefixCls);\n const actionsContent = actions && actions.length > 0 && (/*#__PURE__*/_react.default.createElement(\"ul\", {\n className: (0, _classnames.default)(`${prefixCls}-item-action`, moduleClass('actions')),\n key: \"actions\",\n style: moduleStyle('actions')\n }, actions.map((action, i) => (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n _react.default.createElement(\"li\", {\n key: `${prefixCls}-item-action-${i}`\n }, action, i !== actions.length - 1 && /*#__PURE__*/_react.default.createElement(\"em\", {\n className: `${prefixCls}-item-action-split`\n }))))));\n const Element = grid ? 'div' : 'li';\n const itemChildren = /*#__PURE__*/_react.default.createElement(Element, Object.assign({}, others, !grid ? {\n ref\n } : {}, {\n className: (0, _classnames.default)(`${prefixCls}-item`, {\n [`${prefixCls}-item-no-flex`]: !isFlexMode()\n }, className)\n }), itemLayout === 'vertical' && extra ? [/*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-item-main`,\n key: \"content\"\n }, children, actionsContent), /*#__PURE__*/_react.default.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-item-extra`, moduleClass('extra')),\n key: \"extra\",\n style: moduleStyle('extra')\n }, extra)] : [children, actionsContent, (0, _reactNode.cloneElement)(extra, {\n key: 'extra'\n })]);\n return grid ? (/*#__PURE__*/_react.default.createElement(_grid.Col, {\n ref: ref,\n flex: 1,\n style: colStyle\n }, itemChildren)) : itemChildren;\n});\nconst Item = InternalItem;\nItem.Meta = Meta;\nvar _default = exports.default = Item;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ListContext = exports.ListConsumer = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst ListContext = exports.ListContext = /*#__PURE__*/_react.default.createContext({});\nconst ListConsumer = exports.ListConsumer = ListContext.Consumer;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _extendsObject = _interopRequireDefault(require(\"../_util/extendsObject\"));\nvar _responsiveObserver = require(\"../_util/responsiveObserver\");\nvar _configProvider = require(\"../config-provider\");\nvar _defaultRenderEmpty = _interopRequireDefault(require(\"../config-provider/defaultRenderEmpty\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _grid = require(\"../grid\");\nvar _useBreakpoint = _interopRequireDefault(require(\"../grid/hooks/useBreakpoint\"));\nvar _pagination = _interopRequireDefault(require(\"../pagination\"));\nvar _spin = _interopRequireDefault(require(\"../spin\"));\nvar _context = require(\"./context\");\nvar _Item = _interopRequireDefault(require(\"./Item\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction InternalList(_a, ref) {\n var {\n pagination = false,\n prefixCls: customizePrefixCls,\n bordered = false,\n split = true,\n className,\n rootClassName,\n style,\n children,\n itemLayout,\n loadMore,\n grid,\n dataSource = [],\n size: customizeSize,\n header,\n footer,\n loading = false,\n rowKey,\n renderItem,\n locale\n } = _a,\n rest = __rest(_a, [\"pagination\", \"prefixCls\", \"bordered\", \"split\", \"className\", \"rootClassName\", \"style\", \"children\", \"itemLayout\", \"loadMore\", \"grid\", \"dataSource\", \"size\", \"header\", \"footer\", \"loading\", \"rowKey\", \"renderItem\", \"locale\"]);\n const paginationObj = pagination && typeof pagination === 'object' ? pagination : {};\n const [paginationCurrent, setPaginationCurrent] = React.useState(paginationObj.defaultCurrent || 1);\n const [paginationSize, setPaginationSize] = React.useState(paginationObj.defaultPageSize || 10);\n const {\n getPrefixCls,\n renderEmpty,\n direction,\n list\n } = React.useContext(_configProvider.ConfigContext);\n const defaultPaginationProps = {\n current: 1,\n total: 0\n };\n const triggerPaginationEvent = eventName => (page, pageSize) => {\n var _a;\n setPaginationCurrent(page);\n setPaginationSize(pageSize);\n if (pagination) {\n (_a = pagination === null || pagination === void 0 ? void 0 : pagination[eventName]) === null || _a === void 0 ? void 0 : _a.call(pagination, page, pageSize);\n }\n };\n const onPaginationChange = triggerPaginationEvent('onChange');\n const onPaginationShowSizeChange = triggerPaginationEvent('onShowSizeChange');\n const renderInnerItem = (item, index) => {\n if (!renderItem) return null;\n let key;\n if (typeof rowKey === 'function') {\n key = rowKey(item);\n } else if (rowKey) {\n key = item[rowKey];\n } else {\n key = item.key;\n }\n if (!key) {\n key = `list-item-${index}`;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: key\n }, renderItem(item, index));\n };\n const isSomethingAfterLastItem = () => !!(loadMore || pagination || footer);\n const prefixCls = getPrefixCls('list', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n let loadingProp = loading;\n if (typeof loadingProp === 'boolean') {\n loadingProp = {\n spinning: loadingProp\n };\n }\n const isLoading = !!(loadingProp === null || loadingProp === void 0 ? void 0 : loadingProp.spinning);\n const mergedSize = (0, _useSize.default)(customizeSize);\n // large => lg\n // small => sm\n let sizeCls = '';\n switch (mergedSize) {\n case 'large':\n sizeCls = 'lg';\n break;\n case 'small':\n sizeCls = 'sm';\n break;\n default:\n break;\n }\n const classString = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-vertical`]: itemLayout === 'vertical',\n [`${prefixCls}-${sizeCls}`]: sizeCls,\n [`${prefixCls}-split`]: split,\n [`${prefixCls}-bordered`]: bordered,\n [`${prefixCls}-loading`]: isLoading,\n [`${prefixCls}-grid`]: !!grid,\n [`${prefixCls}-something-after-last-item`]: isSomethingAfterLastItem(),\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, list === null || list === void 0 ? void 0 : list.className, className, rootClassName, hashId, cssVarCls);\n const paginationProps = (0, _extendsObject.default)(defaultPaginationProps, {\n total: dataSource.length,\n current: paginationCurrent,\n pageSize: paginationSize\n }, pagination || {});\n const largestPage = Math.ceil(paginationProps.total / paginationProps.pageSize);\n if (paginationProps.current > largestPage) {\n paginationProps.current = largestPage;\n }\n const paginationContent = pagination && (/*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-pagination`)\n }, /*#__PURE__*/React.createElement(_pagination.default, Object.assign({\n align: \"end\"\n }, paginationProps, {\n onChange: onPaginationChange,\n onShowSizeChange: onPaginationShowSizeChange\n }))));\n let splitDataSource = (0, _toConsumableArray2.default)(dataSource);\n if (pagination) {\n if (dataSource.length > (paginationProps.current - 1) * paginationProps.pageSize) {\n splitDataSource = (0, _toConsumableArray2.default)(dataSource).splice((paginationProps.current - 1) * paginationProps.pageSize, paginationProps.pageSize);\n }\n }\n const needResponsive = Object.keys(grid || {}).some(key => ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].includes(key));\n const screens = (0, _useBreakpoint.default)(needResponsive);\n const currentBreakpoint = React.useMemo(() => {\n for (let i = 0; i < _responsiveObserver.responsiveArray.length; i += 1) {\n const breakpoint = _responsiveObserver.responsiveArray[i];\n if (screens[breakpoint]) {\n return breakpoint;\n }\n }\n return undefined;\n }, [screens]);\n const colStyle = React.useMemo(() => {\n if (!grid) {\n return undefined;\n }\n const columnCount = currentBreakpoint && grid[currentBreakpoint] ? grid[currentBreakpoint] : grid.column;\n if (columnCount) {\n return {\n width: `${100 / columnCount}%`,\n maxWidth: `${100 / columnCount}%`\n };\n }\n }, [JSON.stringify(grid), currentBreakpoint]);\n let childrenContent = isLoading && /*#__PURE__*/React.createElement(\"div\", {\n style: {\n minHeight: 53\n }\n });\n if (splitDataSource.length > 0) {\n const items = splitDataSource.map((item, index) => renderInnerItem(item, index));\n childrenContent = grid ? (/*#__PURE__*/React.createElement(_grid.Row, {\n gutter: grid.gutter\n }, React.Children.map(items, child => (/*#__PURE__*/React.createElement(\"div\", {\n key: child === null || child === void 0 ? void 0 : child.key,\n style: colStyle\n }, child))))) : (/*#__PURE__*/React.createElement(\"ul\", {\n className: `${prefixCls}-items`\n }, items));\n } else if (!children && !isLoading) {\n childrenContent = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-empty-text`\n }, (locale === null || locale === void 0 ? void 0 : locale.emptyText) || (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('List')) || /*#__PURE__*/React.createElement(_defaultRenderEmpty.default, {\n componentName: \"List\"\n }));\n }\n const paginationPosition = paginationProps.position || 'bottom';\n const contextValue = React.useMemo(() => ({\n grid,\n itemLayout\n }), [JSON.stringify(grid), itemLayout]);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_context.ListContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(\"div\", Object.assign({\n ref: ref,\n style: Object.assign(Object.assign({}, list === null || list === void 0 ? void 0 : list.style), style),\n className: classString\n }, rest), (paginationPosition === 'top' || paginationPosition === 'both') && paginationContent, header && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-header`\n }, header), /*#__PURE__*/React.createElement(_spin.default, Object.assign({}, loadingProp), childrenContent, children), footer && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-footer`\n }, footer), loadMore || (paginationPosition === 'bottom' || paginationPosition === 'both') && paginationContent)));\n}\nconst ListWithForwardRef = /*#__PURE__*/React.forwardRef(InternalList);\nif (process.env.NODE_ENV !== 'production') {\n ListWithForwardRef.displayName = 'List';\n}\nconst List = ListWithForwardRef;\nList.Item = _Item.default;\nvar _default = exports.default = List;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genBorderedStyle = token => {\n const {\n listBorderedCls,\n componentCls,\n paddingLG,\n margin,\n itemPaddingSM,\n itemPaddingLG,\n marginLG,\n borderRadiusLG\n } = token;\n return {\n [listBorderedCls]: {\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderRadius: borderRadiusLG,\n [`${componentCls}-header,${componentCls}-footer,${componentCls}-item`]: {\n paddingInline: paddingLG\n },\n [`${componentCls}-pagination`]: {\n margin: `${(0, _cssinjs.unit)(margin)} ${(0, _cssinjs.unit)(marginLG)}`\n }\n },\n [`${listBorderedCls}${componentCls}-sm`]: {\n [`${componentCls}-item,${componentCls}-header,${componentCls}-footer`]: {\n padding: itemPaddingSM\n }\n },\n [`${listBorderedCls}${componentCls}-lg`]: {\n [`${componentCls}-item,${componentCls}-header,${componentCls}-footer`]: {\n padding: itemPaddingLG\n }\n }\n };\n};\nconst genResponsiveStyle = token => {\n const {\n componentCls,\n screenSM,\n screenMD,\n marginLG,\n marginSM,\n margin\n } = token;\n return {\n [`@media screen and (max-width:${screenMD}px)`]: {\n [componentCls]: {\n [`${componentCls}-item`]: {\n [`${componentCls}-item-action`]: {\n marginInlineStart: marginLG\n }\n }\n },\n [`${componentCls}-vertical`]: {\n [`${componentCls}-item`]: {\n [`${componentCls}-item-extra`]: {\n marginInlineStart: marginLG\n }\n }\n }\n },\n [`@media screen and (max-width: ${screenSM}px)`]: {\n [componentCls]: {\n [`${componentCls}-item`]: {\n flexWrap: 'wrap',\n [`${componentCls}-action`]: {\n marginInlineStart: marginSM\n }\n }\n },\n [`${componentCls}-vertical`]: {\n [`${componentCls}-item`]: {\n flexWrap: 'wrap-reverse',\n [`${componentCls}-item-main`]: {\n minWidth: token.contentWidth\n },\n [`${componentCls}-item-extra`]: {\n margin: `auto auto ${(0, _cssinjs.unit)(margin)}`\n }\n }\n }\n }\n };\n};\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n antCls,\n controlHeight,\n minHeight,\n paddingSM,\n marginLG,\n padding,\n itemPadding,\n colorPrimary,\n itemPaddingSM,\n itemPaddingLG,\n paddingXS,\n margin,\n colorText,\n colorTextDescription,\n motionDurationSlow,\n lineWidth,\n headerBg,\n footerBg,\n emptyTextPadding,\n metaMarginBottom,\n avatarMarginRight,\n titleMarginBottom,\n descriptionFontSize\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n '*': {\n outline: 'none'\n },\n [`${componentCls}-header`]: {\n background: headerBg\n },\n [`${componentCls}-footer`]: {\n background: footerBg\n },\n [`${componentCls}-header, ${componentCls}-footer`]: {\n paddingBlock: paddingSM\n },\n [`${componentCls}-pagination`]: {\n marginBlockStart: marginLG,\n // https://github.com/ant-design/ant-design/issues/20037\n [`${antCls}-pagination-options`]: {\n textAlign: 'start'\n }\n },\n [`${componentCls}-spin`]: {\n minHeight,\n textAlign: 'center'\n },\n [`${componentCls}-items`]: {\n margin: 0,\n padding: 0,\n listStyle: 'none'\n },\n [`${componentCls}-item`]: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: itemPadding,\n color: colorText,\n [`${componentCls}-item-meta`]: {\n display: 'flex',\n flex: 1,\n alignItems: 'flex-start',\n maxWidth: '100%',\n [`${componentCls}-item-meta-avatar`]: {\n marginInlineEnd: avatarMarginRight\n },\n [`${componentCls}-item-meta-content`]: {\n flex: '1 0',\n width: 0,\n color: colorText\n },\n [`${componentCls}-item-meta-title`]: {\n margin: `0 0 ${(0, _cssinjs.unit)(token.marginXXS)} 0`,\n color: colorText,\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n '> a': {\n color: colorText,\n transition: `all ${motionDurationSlow}`,\n '&:hover': {\n color: colorPrimary\n }\n }\n },\n [`${componentCls}-item-meta-description`]: {\n color: colorTextDescription,\n fontSize: descriptionFontSize,\n lineHeight: token.lineHeight\n }\n },\n [`${componentCls}-item-action`]: {\n flex: '0 0 auto',\n marginInlineStart: token.marginXXL,\n padding: 0,\n fontSize: 0,\n listStyle: 'none',\n '& > li': {\n position: 'relative',\n display: 'inline-block',\n padding: `0 ${(0, _cssinjs.unit)(paddingXS)}`,\n color: colorTextDescription,\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n textAlign: 'center',\n '&:first-child': {\n paddingInlineStart: 0\n }\n },\n [`${componentCls}-item-action-split`]: {\n position: 'absolute',\n insetBlockStart: '50%',\n insetInlineEnd: 0,\n width: lineWidth,\n height: token.calc(token.fontHeight).sub(token.calc(token.marginXXS).mul(2)).equal(),\n transform: 'translateY(-50%)',\n backgroundColor: token.colorSplit\n }\n }\n },\n [`${componentCls}-empty`]: {\n padding: `${(0, _cssinjs.unit)(padding)} 0`,\n color: colorTextDescription,\n fontSize: token.fontSizeSM,\n textAlign: 'center'\n },\n [`${componentCls}-empty-text`]: {\n padding: emptyTextPadding,\n color: token.colorTextDisabled,\n fontSize: token.fontSize,\n textAlign: 'center'\n },\n // ============================ without flex ============================\n [`${componentCls}-item-no-flex`]: {\n display: 'block'\n }\n }),\n [`${componentCls}-grid ${antCls}-col > ${componentCls}-item`]: {\n display: 'block',\n maxWidth: '100%',\n marginBlockEnd: margin,\n paddingBlock: 0,\n borderBlockEnd: 'none'\n },\n [`${componentCls}-vertical ${componentCls}-item`]: {\n alignItems: 'initial',\n [`${componentCls}-item-main`]: {\n display: 'block',\n flex: 1\n },\n [`${componentCls}-item-extra`]: {\n marginInlineStart: marginLG\n },\n [`${componentCls}-item-meta`]: {\n marginBlockEnd: metaMarginBottom,\n [`${componentCls}-item-meta-title`]: {\n marginBlockStart: 0,\n marginBlockEnd: titleMarginBottom,\n color: colorText,\n fontSize: token.fontSizeLG,\n lineHeight: token.lineHeightLG\n }\n },\n [`${componentCls}-item-action`]: {\n marginBlockStart: padding,\n marginInlineStart: 'auto',\n '> li': {\n padding: `0 ${(0, _cssinjs.unit)(padding)}`,\n '&:first-child': {\n paddingInlineStart: 0\n }\n }\n }\n },\n [`${componentCls}-split ${componentCls}-item`]: {\n borderBlockEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n '&:last-child': {\n borderBlockEnd: 'none'\n }\n },\n [`${componentCls}-split ${componentCls}-header`]: {\n borderBlockEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n },\n [`${componentCls}-split${componentCls}-empty ${componentCls}-footer`]: {\n borderTop: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n },\n [`${componentCls}-loading ${componentCls}-spin-nested-loading`]: {\n minHeight: controlHeight\n },\n [`${componentCls}-split${componentCls}-something-after-last-item ${antCls}-spin-container > ${componentCls}-items > ${componentCls}-item:last-child`]: {\n borderBlockEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n },\n [`${componentCls}-lg ${componentCls}-item`]: {\n padding: itemPaddingLG\n },\n [`${componentCls}-sm ${componentCls}-item`]: {\n padding: itemPaddingSM\n },\n // Horizontal\n [`${componentCls}:not(${componentCls}-vertical)`]: {\n [`${componentCls}-item-no-flex`]: {\n [`${componentCls}-item-action`]: {\n float: 'right'\n }\n }\n }\n };\n};\nconst prepareComponentToken = token => ({\n contentWidth: 220,\n itemPadding: `${(0, _cssinjs.unit)(token.paddingContentVertical)} 0`,\n itemPaddingSM: `${(0, _cssinjs.unit)(token.paddingContentVerticalSM)} ${(0, _cssinjs.unit)(token.paddingContentHorizontal)}`,\n itemPaddingLG: `${(0, _cssinjs.unit)(token.paddingContentVerticalLG)} ${(0, _cssinjs.unit)(token.paddingContentHorizontalLG)}`,\n headerBg: 'transparent',\n footerBg: 'transparent',\n emptyTextPadding: token.padding,\n metaMarginBottom: token.padding,\n avatarMarginRight: token.padding,\n titleMarginBottom: token.paddingSM,\n descriptionFontSize: token.fontSize\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('List', token => {\n const listToken = (0, _internal.mergeToken)(token, {\n listBorderedCls: `${token.componentCls}-bordered`,\n minHeight: token.controlHeightLG\n });\n return [genBaseStyle(listToken), genBorderedStyle(listToken), genResponsiveStyle(listToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nconst LocaleContext = /*#__PURE__*/(0, _react.createContext)(undefined);\nvar _default = exports.default = LocaleContext;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _en_US = _interopRequireDefault(require(\"rc-pagination/lib/locale/en_US\"));\nvar _en_US2 = _interopRequireDefault(require(\"../calendar/locale/en_US\"));\nvar _en_US3 = _interopRequireDefault(require(\"../date-picker/locale/en_US\"));\nvar _en_US4 = _interopRequireDefault(require(\"../time-picker/locale/en_US\"));\nconst typeTemplate = '${label} is not a valid ${type}';\nconst localeValues = {\n locale: 'en',\n Pagination: _en_US.default,\n DatePicker: _en_US3.default,\n TimePicker: _en_US4.default,\n Calendar: _en_US2.default,\n global: {\n placeholder: 'Please select'\n },\n Table: {\n filterTitle: 'Filter menu',\n filterConfirm: 'OK',\n filterReset: 'Reset',\n filterEmptyText: 'No filters',\n filterCheckall: 'Select all items',\n filterSearchPlaceholder: 'Search in filters',\n emptyText: 'No data',\n selectAll: 'Select current page',\n selectInvert: 'Invert current page',\n selectNone: 'Clear all data',\n selectionAll: 'Select all data',\n sortTitle: 'Sort',\n expand: 'Expand row',\n collapse: 'Collapse row',\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting'\n },\n Tour: {\n Next: 'Next',\n Previous: 'Previous',\n Finish: 'Finish'\n },\n Modal: {\n okText: 'OK',\n cancelText: 'Cancel',\n justOkText: 'OK'\n },\n Popconfirm: {\n okText: 'OK',\n cancelText: 'Cancel'\n },\n Transfer: {\n titles: ['', ''],\n searchPlaceholder: 'Search here',\n itemUnit: 'item',\n itemsUnit: 'items',\n remove: 'Remove',\n selectCurrent: 'Select current page',\n removeCurrent: 'Remove current page',\n selectAll: 'Select all data',\n deselectAll: 'Deselect all data',\n removeAll: 'Remove all data',\n selectInvert: 'Invert current page'\n },\n Upload: {\n uploading: 'Uploading...',\n removeFile: 'Remove file',\n uploadError: 'Upload error',\n previewFile: 'Preview file',\n downloadFile: 'Download file'\n },\n Empty: {\n description: 'No data'\n },\n Icon: {\n icon: 'icon'\n },\n Text: {\n edit: 'Edit',\n copy: 'Copy',\n copied: 'Copied',\n expand: 'Expand',\n collapse: 'Collapse'\n },\n Form: {\n optional: '(optional)',\n defaultValidateMessages: {\n default: 'Field validation error for ${label}',\n required: 'Please enter ${label}',\n enum: '${label} must be one of [${enum}]',\n whitespace: '${label} cannot be a blank character',\n date: {\n format: '${label} date format is invalid',\n parse: '${label} cannot be converted to a date',\n invalid: '${label} is an invalid date'\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: '${label} must be ${len} characters',\n min: '${label} must be at least ${min} characters',\n max: '${label} must be up to ${max} characters',\n range: '${label} must be between ${min}-${max} characters'\n },\n number: {\n len: '${label} must be equal to ${len}',\n min: '${label} must be minimum ${min}',\n max: '${label} must be maximum ${max}',\n range: '${label} must be between ${min}-${max}'\n },\n array: {\n len: 'Must be ${len} ${label}',\n min: 'At least ${min} ${label}',\n max: 'At most ${max} ${label}',\n range: 'The amount of ${label} must be between ${min}-${max}'\n },\n pattern: {\n mismatch: '${label} does not match the pattern ${pattern}'\n }\n }\n },\n Image: {\n preview: 'Preview'\n },\n QRCode: {\n expired: 'QR code expired',\n refresh: 'Refresh',\n scanned: 'Scanned'\n },\n ColorPicker: {\n presetEmpty: 'Empty',\n transparent: 'Transparent',\n singleColor: 'Single',\n gradientColor: 'Gradient'\n }\n};\nvar _default = exports.default = localeValues;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.ANT_MARK = void 0;\nObject.defineProperty(exports, \"useLocale\", {\n enumerable: true,\n get: function () {\n return _useLocale.default;\n }\n});\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _warning = require(\"../_util/warning\");\nvar _locale = require(\"../modal/locale\");\nvar _context = _interopRequireDefault(require(\"./context\"));\nvar _useLocale = _interopRequireDefault(require(\"./useLocale\"));\nconst ANT_MARK = exports.ANT_MARK = 'internalMark';\nconst LocaleProvider = props => {\n const {\n locale = {},\n children,\n _ANT_MARK__\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('LocaleProvider');\n process.env.NODE_ENV !== \"production\" ? warning(_ANT_MARK__ === ANT_MARK, 'deprecated', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale') : void 0;\n }\n React.useEffect(() => {\n const clearLocale = (0, _locale.changeConfirmLocale)(locale === null || locale === void 0 ? void 0 : locale.Modal);\n return clearLocale;\n }, [locale]);\n const getMemoizedContextValue = React.useMemo(() => Object.assign(Object.assign({}, locale), {\n exist: true\n }), [locale]);\n return /*#__PURE__*/React.createElement(_context.default.Provider, {\n value: getMemoizedContextValue\n }, children);\n};\nif (process.env.NODE_ENV !== 'production') {\n LocaleProvider.displayName = 'LocaleProvider';\n}\nvar _default = exports.default = LocaleProvider;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _context = _interopRequireDefault(require(\"./context\"));\nvar _en_US = _interopRequireDefault(require(\"./en_US\"));\nconst useLocale = (componentName, defaultLocale) => {\n const fullLocale = React.useContext(_context.default);\n const getLocale = React.useMemo(() => {\n var _a;\n const locale = defaultLocale || _en_US.default[componentName];\n const localeFromContext = (_a = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale[componentName]) !== null && _a !== void 0 ? _a : {};\n return Object.assign(Object.assign({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {});\n }, [componentName, defaultLocale, fullLocale]);\n const getLocaleCode = React.useMemo(() => {\n const localeCode = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.locale;\n // Had use LocaleProvide but didn't set locale\n if ((fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.exist) && !localeCode) {\n return _en_US.default.locale;\n }\n return localeCode;\n }, [fullLocale]);\n return [getLocale, getLocaleCode];\n};\nvar _default = exports.default = useLocale;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.Option = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMentions = _interopRequireDefault(require(\"rc-mentions\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _getAllowClear = _interopRequireDefault(require(\"../_util/getAllowClear\"));\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _toList = _interopRequireDefault(require(\"../_util/toList\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _defaultRenderEmpty = _interopRequireDefault(require(\"../config-provider/defaultRenderEmpty\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _context = require(\"../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../form/hooks/useVariants\"));\nvar _spin = _interopRequireDefault(require(\"../spin\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst {\n Option\n} = _rcMentions.default;\nexports.Option = Option;\nfunction loadingFilterOption() {\n return true;\n}\nconst InternalMentions = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n disabled,\n loading,\n filterOption,\n children,\n notFoundContent,\n options,\n status: customStatus,\n allowClear = false,\n popupClassName,\n style,\n variant: customVariant\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"disabled\", \"loading\", \"filterOption\", \"children\", \"notFoundContent\", \"options\", \"status\", \"allowClear\", \"popupClassName\", \"style\", \"variant\"]);\n const [focused, setFocused] = React.useState(false);\n const innerRef = React.useRef(null);\n const mergedRef = (0, _ref.composeRef)(ref, innerRef);\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Mentions');\n warning.deprecated(!children, 'Mentions.Option', 'options');\n }\n const {\n getPrefixCls,\n renderEmpty,\n direction,\n mentions: contextMentions\n } = React.useContext(_configProvider.ConfigContext);\n const {\n status: contextStatus,\n hasFeedback,\n feedbackIcon\n } = React.useContext(_context.FormItemInputContext);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(contextStatus, customStatus);\n const onFocus = function () {\n if (restProps.onFocus) {\n restProps.onFocus.apply(restProps, arguments);\n }\n setFocused(true);\n };\n const onBlur = function () {\n if (restProps.onBlur) {\n restProps.onBlur.apply(restProps, arguments);\n }\n setFocused(false);\n };\n const notFoundContentEle = React.useMemo(() => {\n if (notFoundContent !== undefined) {\n return notFoundContent;\n }\n return (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/React.createElement(_defaultRenderEmpty.default, {\n componentName: \"Select\"\n });\n }, [notFoundContent, renderEmpty]);\n const mentionOptions = React.useMemo(() => {\n if (loading) {\n return /*#__PURE__*/React.createElement(Option, {\n value: \"ANTD_SEARCHING\",\n disabled: true\n }, /*#__PURE__*/React.createElement(_spin.default, {\n size: \"small\"\n }));\n }\n return children;\n }, [loading, children]);\n const mergedOptions = loading ? [{\n value: 'ANTD_SEARCHING',\n disabled: true,\n label: /*#__PURE__*/React.createElement(_spin.default, {\n size: \"small\"\n })\n }] : options;\n const mentionsfilterOption = loading ? loadingFilterOption : filterOption;\n const prefixCls = getPrefixCls('mentions', customizePrefixCls);\n const mergedAllowClear = (0, _getAllowClear.default)(allowClear);\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const [variant, enableVariantCls] = (0, _useVariants.default)('mentions', customVariant);\n /* biome-ignore lint/complexity/noUselessFragments: avoid falsy value */\n const suffixNode = hasFeedback && /*#__PURE__*/React.createElement(React.Fragment, null, feedbackIcon);\n const mergedClassName = (0, _classnames.default)(contextMentions === null || contextMentions === void 0 ? void 0 : contextMentions.className, className, rootClassName, cssVarCls, rootCls);\n const mentions = /*#__PURE__*/React.createElement(_rcMentions.default, Object.assign({\n silent: loading,\n prefixCls: prefixCls,\n notFoundContent: notFoundContentEle,\n className: mergedClassName,\n disabled: disabled,\n allowClear: mergedAllowClear,\n direction: direction,\n style: Object.assign(Object.assign({}, contextMentions === null || contextMentions === void 0 ? void 0 : contextMentions.style), style)\n }, restProps, {\n filterOption: mentionsfilterOption,\n onFocus: onFocus,\n onBlur: onBlur,\n dropdownClassName: (0, _classnames.default)(popupClassName, rootClassName, hashId, cssVarCls, rootCls),\n ref: mergedRef,\n options: mergedOptions,\n suffix: suffixNode,\n classNames: {\n mentions: (0, _classnames.default)({\n [`${prefixCls}-disabled`]: disabled,\n [`${prefixCls}-focused`]: focused,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, hashId),\n variant: (0, _classnames.default)({\n [`${prefixCls}-${variant}`]: enableVariantCls\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus)),\n affixWrapper: hashId\n }\n }), mentionOptions);\n return wrapCSSVar(mentions);\n});\nconst Mentions = InternalMentions;\nif (process.env.NODE_ENV !== 'production') {\n Mentions.displayName = 'Mentions';\n}\nMentions.Option = Option;\n// We don't care debug panel\n/* istanbul ignore next */\nconst PurePanel = (0, _PurePanel.default)(Mentions, 'mentions');\nMentions._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nMentions.getMentions = function () {\n let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const {\n prefix = '@',\n split = ' '\n } = config;\n const prefixList = (0, _toList.default)(prefix);\n return value.split(split).map(function () {\n let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n let hitPrefix = null;\n prefixList.some(prefixStr => {\n const startStr = str.slice(0, prefixStr.length);\n if (startStr === prefixStr) {\n hitPrefix = prefixStr;\n return true;\n }\n return false;\n });\n if (hitPrefix !== null) {\n return {\n prefix: hitPrefix,\n value: str.slice(hitPrefix.length)\n };\n }\n return null;\n }).filter(entity => !!entity && !!entity.value);\n};\nvar _default = exports.default = Mentions;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../input/style\");\nvar _variants = require(\"../../input/style/variants\");\nvar _style2 = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genMentionsStyle = token => {\n const {\n componentCls,\n colorTextDisabled,\n controlItemBgHover,\n controlPaddingHorizontal,\n colorText,\n motionDurationSlow,\n lineHeight,\n controlHeight,\n paddingInline,\n paddingBlock,\n fontSize,\n fontSizeIcon,\n colorTextTertiary,\n colorTextQuaternary,\n colorBgElevated,\n paddingXXS,\n paddingLG,\n borderRadius,\n borderRadiusLG,\n boxShadowSecondary,\n itemPaddingVertical,\n calc\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), (0, _style.genBasicInputStyle)(token)), {\n position: 'relative',\n display: 'inline-block',\n height: 'auto',\n padding: 0,\n overflow: 'hidden',\n lineHeight,\n whiteSpace: 'pre-wrap',\n verticalAlign: 'bottom'\n }), (0, _variants.genOutlinedStyle)(token)), (0, _variants.genFilledStyle)(token)), (0, _variants.genBorderlessStyle)(token)), {\n '&-affix-wrapper': Object.assign(Object.assign({}, (0, _style.genBasicInputStyle)(token)), {\n display: 'inline-flex',\n padding: 0,\n '&::before': {\n display: 'inline-block',\n width: 0,\n visibility: 'hidden',\n content: '\"\\\\a0\"'\n },\n [`${componentCls}-suffix`]: {\n position: 'absolute',\n top: 0,\n insetInlineEnd: paddingInline,\n bottom: 0,\n zIndex: 1,\n display: 'inline-flex',\n alignItems: 'center',\n margin: 'auto'\n },\n [`&:has(${componentCls}-suffix) > ${componentCls} > textarea`]: {\n paddingInlineEnd: paddingLG\n },\n [`${componentCls}-clear-icon`]: {\n position: 'absolute',\n insetInlineEnd: 0,\n insetBlockStart: calc(fontSize).mul(lineHeight).mul(0.5).add(paddingBlock).equal(),\n transform: `translateY(-50%)`,\n margin: 0,\n color: colorTextQuaternary,\n fontSize: fontSizeIcon,\n verticalAlign: -1,\n // https://github.com/ant-design/ant-design/pull/18151\n // https://codesandbox.io/s/wizardly-sun-u10br\n cursor: 'pointer',\n transition: `color ${motionDurationSlow}`,\n '&:hover': {\n color: colorTextTertiary\n },\n '&:active': {\n color: colorText\n },\n '&-hidden': {\n visibility: 'hidden'\n }\n }\n }),\n '&-disabled': {\n '> textarea': Object.assign({}, (0, _variants.genDisabledStyle)(token))\n },\n // ================= Input Area =================\n [`&, &-affix-wrapper > ${componentCls}`]: {\n [`> textarea, ${componentCls}-measure`]: {\n color: colorText,\n boxSizing: 'border-box',\n minHeight: token.calc(controlHeight).sub(2),\n margin: 0,\n padding: `${(0, _cssinjs.unit)(paddingBlock)} ${(0, _cssinjs.unit)(paddingInline)}`,\n overflow: 'inherit',\n overflowX: 'hidden',\n overflowY: 'auto',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n fontFamily: 'inherit',\n fontStyle: 'inherit',\n fontVariant: 'inherit',\n fontSizeAdjust: 'inherit',\n fontStretch: 'inherit',\n lineHeight: 'inherit',\n direction: 'inherit',\n letterSpacing: 'inherit',\n whiteSpace: 'inherit',\n textAlign: 'inherit',\n verticalAlign: 'top',\n wordWrap: 'break-word',\n wordBreak: 'inherit',\n tabSize: 'inherit'\n },\n '> textarea': Object.assign({\n width: '100%',\n border: 'none',\n outline: 'none',\n resize: 'none',\n backgroundColor: 'transparent'\n }, (0, _style.genPlaceholderStyle)(token.colorTextPlaceholder)),\n [`${componentCls}-measure`]: {\n position: 'absolute',\n top: 0,\n insetInlineEnd: 0,\n bottom: 0,\n insetInlineStart: 0,\n zIndex: -1,\n color: 'transparent',\n pointerEvents: 'none',\n '> span': {\n display: 'inline-block',\n minHeight: '1em'\n }\n }\n },\n // ================== Dropdown ==================\n '&-dropdown': Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), {\n position: 'absolute',\n top: -9999,\n insetInlineStart: -9999,\n zIndex: token.zIndexPopup,\n boxSizing: 'border-box',\n fontSize,\n fontVariant: 'initial',\n padding: paddingXXS,\n backgroundColor: colorBgElevated,\n borderRadius: borderRadiusLG,\n outline: 'none',\n boxShadow: boxShadowSecondary,\n '&-hidden': {\n display: 'none'\n },\n [`${componentCls}-dropdown-menu`]: {\n maxHeight: token.dropdownHeight,\n margin: 0,\n paddingInlineStart: 0,\n // Override default ul/ol\n overflow: 'auto',\n listStyle: 'none',\n outline: 'none',\n '&-item': Object.assign(Object.assign({}, _style2.textEllipsis), {\n position: 'relative',\n display: 'block',\n minWidth: token.controlItemWidth,\n padding: `${(0, _cssinjs.unit)(itemPaddingVertical)} ${(0, _cssinjs.unit)(controlPaddingHorizontal)}`,\n color: colorText,\n borderRadius,\n fontWeight: 'normal',\n lineHeight,\n cursor: 'pointer',\n transition: `background ${motionDurationSlow} ease`,\n '&:hover': {\n backgroundColor: controlItemBgHover\n },\n '&-disabled': {\n color: colorTextDisabled,\n cursor: 'not-allowed',\n '&:hover': {\n color: colorTextDisabled,\n backgroundColor: controlItemBgHover,\n cursor: 'not-allowed'\n }\n },\n '&-selected': {\n color: colorText,\n fontWeight: token.fontWeightStrong,\n backgroundColor: controlItemBgHover\n },\n '&-active': {\n backgroundColor: controlItemBgHover\n }\n })\n }\n })\n })\n };\n};\nconst prepareComponentToken = token => Object.assign(Object.assign({}, (0, _style.initComponentToken)(token)), {\n dropdownHeight: 250,\n controlItemWidth: 100,\n zIndexPopup: token.zIndexPopupBase + 50,\n itemPaddingVertical: (token.controlHeight - token.fontHeight) / 2\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Mentions', token => {\n const mentionsToken = (0, _internal.mergeToken)(token, (0, _style.initInputToken)(token));\n return [genMentionsStyle(mentionsToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nconst MenuContext = /*#__PURE__*/(0, _react.createContext)({\n prefixCls: '',\n firstLevel: true,\n inlineCollapsed: false\n});\nvar _default = exports.default = MenuContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMenu = require(\"rc-menu\");\nvar _configProvider = require(\"../config-provider\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst MenuDivider = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n dashed\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"dashed\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('menu', customizePrefixCls);\n const classString = (0, _classnames.default)({\n [`${prefixCls}-item-divider-dashed`]: !!dashed\n }, className);\n return /*#__PURE__*/React.createElement(_rcMenu.Divider, Object.assign({\n className: classString\n }, restProps));\n};\nvar _default = exports.default = MenuDivider;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMenu = require(\"rc-menu\");\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _Sider = require(\"../layout/Sider\");\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\nvar _MenuContext = _interopRequireDefault(require(\"./MenuContext\"));\nconst MenuItem = props => {\n var _a;\n const {\n className,\n children,\n icon,\n title,\n danger\n } = props;\n const {\n prefixCls,\n firstLevel,\n direction,\n disableMenuItemTitleTooltip,\n inlineCollapsed: isInlineCollapsed\n } = React.useContext(_MenuContext.default);\n const renderItemChildren = inlineCollapsed => {\n const label = children === null || children === void 0 ? void 0 : children[0];\n const wrapNode = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-title-content`\n }, children);\n // inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span\n // ref: https://github.com/ant-design/ant-design/pull/23456\n if (!icon || /*#__PURE__*/React.isValidElement(children) && children.type === 'span') {\n if (children && inlineCollapsed && firstLevel && typeof label === 'string') {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-inline-collapsed-noicon`\n }, label.charAt(0));\n }\n }\n return wrapNode;\n };\n const {\n siderCollapsed\n } = React.useContext(_Sider.SiderContext);\n let tooltipTitle = title;\n if (typeof title === 'undefined') {\n tooltipTitle = firstLevel ? children : '';\n } else if (title === false) {\n tooltipTitle = '';\n }\n const tooltipProps = {\n title: tooltipTitle\n };\n if (!siderCollapsed && !isInlineCollapsed) {\n tooltipProps.title = null;\n // Reset `open` to fix control mode tooltip display not correct\n // ref: https://github.com/ant-design/ant-design/issues/16742\n tooltipProps.open = false;\n }\n const childrenLength = (0, _toArray.default)(children).length;\n let returnNode = /*#__PURE__*/React.createElement(_rcMenu.Item, Object.assign({}, (0, _omit.default)(props, ['title', 'icon', 'danger']), {\n className: (0, _classnames.default)({\n [`${prefixCls}-item-danger`]: danger,\n [`${prefixCls}-item-only-child`]: (icon ? childrenLength + 1 : childrenLength) === 1\n }, className),\n title: typeof title === 'string' ? title : undefined\n }), (0, _reactNode.cloneElement)(icon, {\n className: (0, _classnames.default)(/*#__PURE__*/React.isValidElement(icon) ? (_a = icon.props) === null || _a === void 0 ? void 0 : _a.className : '', `${prefixCls}-item-icon`)\n }), renderItemChildren(isInlineCollapsed));\n if (!disableMenuItemTitleTooltip) {\n returnNode = /*#__PURE__*/React.createElement(_tooltip.default, Object.assign({}, tooltipProps, {\n placement: direction === 'rtl' ? 'left' : 'right',\n overlayClassName: `${prefixCls}-inline-collapsed-tooltip`\n }), returnNode);\n }\n return returnNode;\n};\nvar _default = exports.default = MenuItem;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.OverrideProvider = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _ContextIsolator = _interopRequireDefault(require(\"../_util/ContextIsolator\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst OverrideContext = /*#__PURE__*/React.createContext(null);\n/** @internal Only used for Dropdown component. Do not use this in your production. */\nconst OverrideProvider = exports.OverrideProvider = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n children\n } = props,\n restProps = __rest(props, [\"children\"]);\n const override = React.useContext(OverrideContext);\n const context = React.useMemo(() => Object.assign(Object.assign({}, override), restProps), [override, restProps.prefixCls,\n // restProps.expandIcon, Not mark as deps since this is a ReactNode\n restProps.mode, restProps.selectable, restProps.rootClassName\n // restProps.validator, Not mark as deps since this is a function\n ]);\n const canRef = (0, _ref.supportNodeRef)(children);\n const mergedRef = (0, _ref.useComposeRef)(ref, canRef ? children.ref : null);\n return /*#__PURE__*/React.createElement(OverrideContext.Provider, {\n value: context\n }, /*#__PURE__*/React.createElement(_ContextIsolator.default, {\n space: true\n }, canRef ? /*#__PURE__*/React.cloneElement(children, {\n ref: mergedRef\n }) : children));\n});\n/** @internal Only used for Dropdown component. Do not use this in your production. */\nvar _default = exports.default = OverrideContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMenu = require(\"rc-menu\");\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _reactNode = require(\"../_util/reactNode\");\nvar _MenuContext = _interopRequireDefault(require(\"./MenuContext\"));\nconst SubMenu = props => {\n var _a;\n const {\n popupClassName,\n icon,\n title,\n theme: customTheme\n } = props;\n const context = React.useContext(_MenuContext.default);\n const {\n prefixCls,\n inlineCollapsed,\n theme: contextTheme\n } = context;\n const parentPath = (0, _rcMenu.useFullPath)();\n let titleNode;\n if (!icon) {\n titleNode = inlineCollapsed && !parentPath.length && title && typeof title === 'string' ? (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-inline-collapsed-noicon`\n }, title.charAt(0))) : (/*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-title-content`\n }, title));\n } else {\n // inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span\n // ref: https://github.com/ant-design/ant-design/pull/23456\n const titleIsSpan = /*#__PURE__*/React.isValidElement(title) && title.type === 'span';\n titleNode = /*#__PURE__*/React.createElement(React.Fragment, null, (0, _reactNode.cloneElement)(icon, {\n className: (0, _classnames.default)(/*#__PURE__*/React.isValidElement(icon) ? (_a = icon.props) === null || _a === void 0 ? void 0 : _a.className : '', `${prefixCls}-item-icon`)\n }), titleIsSpan ? title : /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-title-content`\n }, title));\n }\n const contextValue = React.useMemo(() => Object.assign(Object.assign({}, context), {\n firstLevel: false\n }), [context]);\n // ============================ zIndex ============================\n const [zIndex] = (0, _useZIndex.useZIndex)('Menu');\n return /*#__PURE__*/React.createElement(_MenuContext.default.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(_rcMenu.SubMenu, Object.assign({}, (0, _omit.default)(props, ['icon']), {\n title: titleNode,\n popupClassName: (0, _classnames.default)(prefixCls, popupClassName, `${prefixCls}-${customTheme || contextTheme}`),\n popupStyle: Object.assign({\n zIndex\n }, props.popupStyle)\n })));\n};\nvar _default = exports.default = SubMenu;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _rcMenu = require(\"rc-menu\");\nvar _Sider = require(\"../layout/Sider\");\nvar _menu = _interopRequireDefault(require(\"./menu\"));\nvar _MenuDivider = _interopRequireDefault(require(\"./MenuDivider\"));\nvar _MenuItem = _interopRequireDefault(require(\"./MenuItem\"));\nvar _SubMenu = _interopRequireDefault(require(\"./SubMenu\"));\nconst Menu = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n const menuRef = (0, _react.useRef)(null);\n const context = React.useContext(_Sider.SiderContext);\n (0, _react.useImperativeHandle)(ref, () => ({\n menu: menuRef.current,\n focus: options => {\n var _a;\n (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.focus(options);\n }\n }));\n return /*#__PURE__*/React.createElement(_menu.default, Object.assign({\n ref: menuRef\n }, props, context));\n});\nMenu.Item = _MenuItem.default;\nMenu.SubMenu = _SubMenu.default;\nMenu.Divider = _MenuDivider.default;\nMenu.ItemGroup = _rcMenu.ItemGroup;\nif (process.env.NODE_ENV !== 'production') {\n Menu.displayName = 'Menu';\n}\nvar _default = exports.default = Menu;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _EllipsisOutlined = _interopRequireDefault(require(\"@ant-design/icons/EllipsisOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMenu = _interopRequireDefault(require(\"rc-menu\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _motion = _interopRequireDefault(require(\"../_util/motion\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _MenuContext = _interopRequireDefault(require(\"./MenuContext\"));\nvar _MenuDivider = _interopRequireDefault(require(\"./MenuDivider\"));\nvar _MenuItem = _interopRequireDefault(require(\"./MenuItem\"));\nvar _OverrideContext = _interopRequireDefault(require(\"./OverrideContext\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _SubMenu = _interopRequireDefault(require(\"./SubMenu\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction isEmptyIcon(icon) {\n return icon === null || icon === false;\n}\nconst MENU_COMPONENTS = {\n item: _MenuItem.default,\n submenu: _SubMenu.default,\n divider: _MenuDivider.default\n};\nconst InternalMenu = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n var _a;\n const override = React.useContext(_OverrideContext.default);\n const overrideObj = override || {};\n const {\n getPrefixCls,\n getPopupContainer,\n direction,\n menu\n } = React.useContext(_configProvider.ConfigContext);\n const rootPrefixCls = getPrefixCls();\n const {\n prefixCls: customizePrefixCls,\n className,\n style,\n theme = 'light',\n expandIcon,\n _internalDisableMenuItemTitleTooltip,\n inlineCollapsed,\n siderCollapsed,\n rootClassName,\n mode,\n selectable,\n onClick,\n overflowedIndicatorPopupClassName\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"style\", \"theme\", \"expandIcon\", \"_internalDisableMenuItemTitleTooltip\", \"inlineCollapsed\", \"siderCollapsed\", \"rootClassName\", \"mode\", \"selectable\", \"onClick\", \"overflowedIndicatorPopupClassName\"]);\n const passedProps = (0, _omit.default)(restProps, ['collapsedWidth']);\n // ======================== Warning ==========================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Menu');\n process.env.NODE_ENV !== \"production\" ? warning(!('inlineCollapsed' in props && mode !== 'inline'), 'usage', '`inlineCollapsed` should only be used when `mode` is inline.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(props.siderCollapsed !== undefined && 'inlineCollapsed' in props), 'usage', '`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.') : void 0;\n warning.deprecated('items' in props && !props.children, 'children', 'items');\n }\n (_a = overrideObj.validator) === null || _a === void 0 ? void 0 : _a.call(overrideObj, {\n mode\n });\n // ========================== Click ==========================\n // Tell dropdown that item clicked\n const onItemClick = (0, _useEvent.default)(function () {\n var _a;\n onClick === null || onClick === void 0 ? void 0 : onClick.apply(void 0, arguments);\n (_a = overrideObj.onClick) === null || _a === void 0 ? void 0 : _a.call(overrideObj);\n });\n // ========================== Mode ===========================\n const mergedMode = overrideObj.mode || mode;\n // ======================= Selectable ========================\n const mergedSelectable = selectable !== null && selectable !== void 0 ? selectable : overrideObj.selectable;\n // ======================== Collapsed ========================\n // Inline Collapsed\n const mergedInlineCollapsed = React.useMemo(() => {\n if (siderCollapsed !== undefined) {\n return siderCollapsed;\n }\n return inlineCollapsed;\n }, [inlineCollapsed, siderCollapsed]);\n const defaultMotions = {\n horizontal: {\n motionName: `${rootPrefixCls}-slide-up`\n },\n inline: (0, _motion.default)(rootPrefixCls),\n other: {\n motionName: `${rootPrefixCls}-zoom-big`\n }\n };\n const prefixCls = getPrefixCls('menu', customizePrefixCls || overrideObj.prefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls, !override);\n const menuClassName = (0, _classnames.default)(`${prefixCls}-${theme}`, menu === null || menu === void 0 ? void 0 : menu.className, className);\n // ====================== ExpandIcon ========================\n const mergedExpandIcon = React.useMemo(() => {\n var _a, _b;\n if (typeof expandIcon === 'function' || isEmptyIcon(expandIcon)) {\n return expandIcon || null;\n }\n if (typeof overrideObj.expandIcon === 'function' || isEmptyIcon(overrideObj.expandIcon)) {\n return overrideObj.expandIcon || null;\n }\n if (typeof (menu === null || menu === void 0 ? void 0 : menu.expandIcon) === 'function' || isEmptyIcon(menu === null || menu === void 0 ? void 0 : menu.expandIcon)) {\n return (menu === null || menu === void 0 ? void 0 : menu.expandIcon) || null;\n }\n const mergedIcon = (_a = expandIcon !== null && expandIcon !== void 0 ? expandIcon : overrideObj === null || overrideObj === void 0 ? void 0 : overrideObj.expandIcon) !== null && _a !== void 0 ? _a : menu === null || menu === void 0 ? void 0 : menu.expandIcon;\n return (0, _reactNode.cloneElement)(mergedIcon, {\n className: (0, _classnames.default)(`${prefixCls}-submenu-expand-icon`, /*#__PURE__*/React.isValidElement(mergedIcon) ? (_b = mergedIcon.props) === null || _b === void 0 ? void 0 : _b.className : undefined)\n });\n }, [expandIcon, overrideObj === null || overrideObj === void 0 ? void 0 : overrideObj.expandIcon, menu === null || menu === void 0 ? void 0 : menu.expandIcon, prefixCls]);\n // ======================== Context ==========================\n const contextValue = React.useMemo(() => ({\n prefixCls,\n inlineCollapsed: mergedInlineCollapsed || false,\n direction,\n firstLevel: true,\n theme,\n mode: mergedMode,\n disableMenuItemTitleTooltip: _internalDisableMenuItemTitleTooltip\n }), [prefixCls, mergedInlineCollapsed, direction, _internalDisableMenuItemTitleTooltip, theme]);\n // ========================= Render ==========================\n return wrapCSSVar(/*#__PURE__*/React.createElement(_OverrideContext.default.Provider, {\n value: null\n }, /*#__PURE__*/React.createElement(_MenuContext.default.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(_rcMenu.default, Object.assign({\n getPopupContainer: getPopupContainer,\n overflowedIndicator: /*#__PURE__*/React.createElement(_EllipsisOutlined.default, null),\n overflowedIndicatorPopupClassName: (0, _classnames.default)(prefixCls, `${prefixCls}-${theme}`, overflowedIndicatorPopupClassName),\n mode: mergedMode,\n selectable: mergedSelectable,\n onClick: onItemClick\n }, passedProps, {\n inlineCollapsed: mergedInlineCollapsed,\n style: Object.assign(Object.assign({}, menu === null || menu === void 0 ? void 0 : menu.style), style),\n className: menuClassName,\n prefixCls: prefixCls,\n direction: direction,\n defaultMotions: defaultMotions,\n expandIcon: mergedExpandIcon,\n ref: ref,\n rootClassName: (0, _classnames.default)(rootClassName, hashId, overrideObj.rootClassName, cssVarCls, rootCls),\n _internalComponents: MENU_COMPONENTS\n })))));\n});\nvar _default = exports.default = InternalMenu;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst getHorizontalStyle = token => {\n const {\n componentCls,\n motionDurationSlow,\n horizontalLineHeight,\n colorSplit,\n lineWidth,\n lineType,\n itemPaddingInline\n } = token;\n return {\n [`${componentCls}-horizontal`]: {\n lineHeight: horizontalLineHeight,\n border: 0,\n borderBottom: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,\n boxShadow: 'none',\n '&::after': {\n display: 'block',\n clear: 'both',\n height: 0,\n content: '\"\\\\20\"'\n },\n // ======================= Item =======================\n [`${componentCls}-item, ${componentCls}-submenu`]: {\n position: 'relative',\n display: 'inline-block',\n verticalAlign: 'bottom',\n paddingInline: itemPaddingInline\n },\n [`> ${componentCls}-item:hover,\n > ${componentCls}-item-active,\n > ${componentCls}-submenu ${componentCls}-submenu-title:hover`]: {\n backgroundColor: 'transparent'\n },\n [`${componentCls}-item, ${componentCls}-submenu-title`]: {\n transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`].join(',')\n },\n // ===================== Sub Menu =====================\n [`${componentCls}-submenu-arrow`]: {\n display: 'none'\n }\n }\n };\n};\nvar _default = exports.default = getHorizontalStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _internal = require(\"../../theme/internal\");\nvar _horizontal = _interopRequireDefault(require(\"./horizontal\"));\nvar _rtl = _interopRequireDefault(require(\"./rtl\"));\nvar _theme = _interopRequireDefault(require(\"./theme\"));\nvar _vertical = _interopRequireDefault(require(\"./vertical\"));\nconst genMenuItemStyle = token => {\n const {\n componentCls,\n motionDurationSlow,\n motionDurationMid,\n motionEaseInOut,\n motionEaseOut,\n iconCls,\n iconSize,\n iconMarginInlineEnd\n } = token;\n return {\n // >>>>> Item\n [`${componentCls}-item, ${componentCls}-submenu-title`]: {\n position: 'relative',\n display: 'block',\n margin: 0,\n whiteSpace: 'nowrap',\n cursor: 'pointer',\n transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding calc(${motionDurationSlow} + 0.1s) ${motionEaseInOut}`].join(','),\n [`${componentCls}-item-icon, ${iconCls}`]: {\n minWidth: iconSize,\n fontSize: iconSize,\n transition: [`font-size ${motionDurationMid} ${motionEaseOut}`, `margin ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow}`].join(','),\n '+ span': {\n marginInlineStart: iconMarginInlineEnd,\n opacity: 1,\n transition: [`opacity ${motionDurationSlow} ${motionEaseInOut}`, `margin ${motionDurationSlow}`, `color ${motionDurationSlow}`].join(',')\n }\n },\n [`${componentCls}-item-icon`]: Object.assign({}, (0, _style.resetIcon)()),\n [`&${componentCls}-item-only-child`]: {\n [`> ${iconCls}, > ${componentCls}-item-icon`]: {\n marginInlineEnd: 0\n }\n }\n },\n // Disabled state sets text to gray and nukes hover/tab effects\n [`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {\n background: 'none !important',\n cursor: 'not-allowed',\n '&::after': {\n borderColor: 'transparent !important'\n },\n a: {\n color: 'inherit !important'\n },\n [`> ${componentCls}-submenu-title`]: {\n color: 'inherit !important',\n cursor: 'not-allowed'\n }\n }\n };\n};\nconst genSubMenuArrowStyle = token => {\n const {\n componentCls,\n motionDurationSlow,\n motionEaseInOut,\n borderRadius,\n menuArrowSize,\n menuArrowOffset\n } = token;\n return {\n [`${componentCls}-submenu`]: {\n '&-expand-icon, &-arrow': {\n position: 'absolute',\n top: '50%',\n insetInlineEnd: token.margin,\n width: menuArrowSize,\n color: 'currentcolor',\n transform: 'translateY(-50%)',\n transition: `transform ${motionDurationSlow} ${motionEaseInOut}, opacity ${motionDurationSlow}`\n },\n '&-arrow': {\n // →\n '&::before, &::after': {\n position: 'absolute',\n width: token.calc(menuArrowSize).mul(0.6).equal(),\n height: token.calc(menuArrowSize).mul(0.15).equal(),\n backgroundColor: 'currentcolor',\n borderRadius,\n transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `transform ${motionDurationSlow} ${motionEaseInOut}`, `top ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow} ${motionEaseInOut}`].join(','),\n content: '\"\"'\n },\n '&::before': {\n transform: `rotate(45deg) translateY(${(0, _cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`\n },\n '&::after': {\n transform: `rotate(-45deg) translateY(${(0, _cssinjs.unit)(menuArrowOffset)})`\n }\n }\n }\n };\n};\n// =============================== Base ===============================\nconst getBaseStyle = token => {\n const {\n antCls,\n componentCls,\n fontSize,\n motionDurationSlow,\n motionDurationMid,\n motionEaseInOut,\n paddingXS,\n padding,\n colorSplit,\n lineWidth,\n zIndexPopup,\n borderRadiusLG,\n subMenuItemBorderRadius,\n menuArrowSize,\n menuArrowOffset,\n lineType,\n groupTitleLineHeight,\n groupTitleFontSize\n } = token;\n return [\n // Misc\n {\n '': {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.clearFix)()), {\n // Hidden\n '&-hidden': {\n display: 'none'\n }\n })\n },\n [`${componentCls}-submenu-hidden`]: {\n display: 'none'\n }\n }, {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), (0, _style.clearFix)()), {\n marginBottom: 0,\n paddingInlineStart: 0,\n // Override default ul/ol\n fontSize,\n lineHeight: 0,\n listStyle: 'none',\n outline: 'none',\n // Magic cubic here but smooth transition\n transition: `width ${motionDurationSlow} cubic-bezier(0.2, 0, 0, 1) 0s`,\n 'ul, ol': {\n margin: 0,\n padding: 0,\n listStyle: 'none'\n },\n // Overflow ellipsis\n '&-overflow': {\n display: 'flex',\n [`${componentCls}-item`]: {\n flex: 'none'\n }\n },\n [`${componentCls}-item, ${componentCls}-submenu, ${componentCls}-submenu-title`]: {\n borderRadius: token.itemBorderRadius\n },\n [`${componentCls}-item-group-title`]: {\n padding: `${(0, _cssinjs.unit)(paddingXS)} ${(0, _cssinjs.unit)(padding)}`,\n fontSize: groupTitleFontSize,\n lineHeight: groupTitleLineHeight,\n transition: `all ${motionDurationSlow}`\n },\n [`&-horizontal ${componentCls}-submenu`]: {\n transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`].join(',')\n },\n [`${componentCls}-submenu, ${componentCls}-submenu-inline`]: {\n transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationMid} ${motionEaseInOut}`].join(',')\n },\n [`${componentCls}-submenu ${componentCls}-sub`]: {\n cursor: 'initial',\n transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationSlow} ${motionEaseInOut}`].join(',')\n },\n [`${componentCls}-title-content`]: {\n display: 'inline-flex',\n alignItems: 'center',\n transition: `color ${motionDurationSlow}`,\n '> a:first-child': {\n flexGrow: 1\n },\n // https://github.com/ant-design/ant-design/issues/41143\n [`> ${antCls}-typography-ellipsis-single-line`]: {\n display: 'inline',\n verticalAlign: 'unset'\n },\n [`${componentCls}-item-extra`]: {\n marginInlineStart: 'auto',\n paddingInlineStart: token.padding,\n fontSize: token.fontSizeSM,\n color: token.colorTextDescription\n }\n },\n [`${componentCls}-item a`]: {\n '&::before': {\n position: 'absolute',\n inset: 0,\n backgroundColor: 'transparent',\n content: '\"\"'\n }\n },\n // Removed a Badge related style seems it's safe\n // https://github.com/ant-design/ant-design/issues/19809\n // >>>>> Divider\n [`${componentCls}-item-divider`]: {\n overflow: 'hidden',\n lineHeight: 0,\n borderColor: colorSplit,\n borderStyle: lineType,\n borderWidth: 0,\n borderTopWidth: lineWidth,\n marginBlock: lineWidth,\n padding: 0,\n '&-dashed': {\n borderStyle: 'dashed'\n }\n }\n }), genMenuItemStyle(token)), {\n [`${componentCls}-item-group`]: {\n [`${componentCls}-item-group-list`]: {\n margin: 0,\n padding: 0,\n [`${componentCls}-item, ${componentCls}-submenu-title`]: {\n paddingInline: `${(0, _cssinjs.unit)(token.calc(fontSize).mul(2).equal())} ${(0, _cssinjs.unit)(padding)}`\n }\n }\n },\n // ======================= Sub Menu =======================\n '&-submenu': {\n '&-popup': {\n position: 'absolute',\n zIndex: zIndexPopup,\n borderRadius: borderRadiusLG,\n boxShadow: 'none',\n transformOrigin: '0 0',\n [`&${componentCls}-submenu`]: {\n background: 'transparent'\n },\n // https://github.com/ant-design/ant-design/issues/13955\n '&::before': {\n position: 'absolute',\n inset: 0,\n zIndex: -1,\n width: '100%',\n height: '100%',\n opacity: 0,\n content: '\"\"'\n },\n [`> ${componentCls}`]: Object.assign(Object.assign(Object.assign({\n borderRadius: borderRadiusLG\n }, genMenuItemStyle(token)), genSubMenuArrowStyle(token)), {\n [`${componentCls}-item, ${componentCls}-submenu > ${componentCls}-submenu-title`]: {\n borderRadius: subMenuItemBorderRadius\n },\n [`${componentCls}-submenu-title::after`]: {\n transition: `transform ${motionDurationSlow} ${motionEaseInOut}`\n }\n })\n },\n [`\n &-placement-leftTop,\n &-placement-bottomRight,\n `]: {\n transformOrigin: '100% 0'\n },\n [`\n &-placement-leftBottom,\n &-placement-topRight,\n `]: {\n transformOrigin: '100% 100%'\n },\n [`\n &-placement-rightBottom,\n &-placement-topLeft,\n `]: {\n transformOrigin: '0 100%'\n },\n [`\n &-placement-bottomLeft,\n &-placement-rightTop,\n `]: {\n transformOrigin: '0 0'\n },\n [`\n &-placement-leftTop,\n &-placement-leftBottom\n `]: {\n paddingInlineEnd: token.paddingXS\n },\n [`\n &-placement-rightTop,\n &-placement-rightBottom\n `]: {\n paddingInlineStart: token.paddingXS\n },\n [`\n &-placement-topRight,\n &-placement-topLeft\n `]: {\n paddingBottom: token.paddingXS\n },\n [`\n &-placement-bottomRight,\n &-placement-bottomLeft\n `]: {\n paddingTop: token.paddingXS\n }\n }\n }), genSubMenuArrowStyle(token)), {\n [`&-inline-collapsed ${componentCls}-submenu-arrow,\n &-inline ${componentCls}-submenu-arrow`]: {\n // ↓\n '&::before': {\n transform: `rotate(-45deg) translateX(${(0, _cssinjs.unit)(menuArrowOffset)})`\n },\n '&::after': {\n transform: `rotate(45deg) translateX(${(0, _cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`\n }\n },\n [`${componentCls}-submenu-open${componentCls}-submenu-inline > ${componentCls}-submenu-title > ${componentCls}-submenu-arrow`]: {\n // ↑\n transform: `translateY(${(0, _cssinjs.unit)(token.calc(menuArrowSize).mul(0.2).mul(-1).equal())})`,\n '&::after': {\n transform: `rotate(-45deg) translateX(${(0, _cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`\n },\n '&::before': {\n transform: `rotate(45deg) translateX(${(0, _cssinjs.unit)(menuArrowOffset)})`\n }\n }\n })\n },\n // Integration with header element so menu items have the same height\n {\n [`${antCls}-layout-header`]: {\n [componentCls]: {\n lineHeight: 'inherit'\n }\n }\n }];\n};\nconst prepareComponentToken = token => {\n var _a, _b, _c;\n const {\n colorPrimary,\n colorError,\n colorTextDisabled,\n colorErrorBg,\n colorText,\n colorTextDescription,\n colorBgContainer,\n colorFillAlter,\n colorFillContent,\n lineWidth,\n lineWidthBold,\n controlItemBgActive,\n colorBgTextHover,\n controlHeightLG,\n lineHeight,\n colorBgElevated,\n marginXXS,\n padding,\n fontSize,\n controlHeightSM,\n fontSizeLG,\n colorTextLightSolid,\n colorErrorHover\n } = token;\n const activeBarWidth = (_a = token.activeBarWidth) !== null && _a !== void 0 ? _a : 0;\n const activeBarBorderWidth = (_b = token.activeBarBorderWidth) !== null && _b !== void 0 ? _b : lineWidth;\n const itemMarginInline = (_c = token.itemMarginInline) !== null && _c !== void 0 ? _c : token.marginXXS;\n const colorTextDark = new _tinycolor.TinyColor(colorTextLightSolid).setAlpha(0.65).toRgbString();\n return {\n dropdownWidth: 160,\n zIndexPopup: token.zIndexPopupBase + 50,\n radiusItem: token.borderRadiusLG,\n itemBorderRadius: token.borderRadiusLG,\n radiusSubMenuItem: token.borderRadiusSM,\n subMenuItemBorderRadius: token.borderRadiusSM,\n colorItemText: colorText,\n itemColor: colorText,\n colorItemTextHover: colorText,\n itemHoverColor: colorText,\n colorItemTextHoverHorizontal: colorPrimary,\n horizontalItemHoverColor: colorPrimary,\n colorGroupTitle: colorTextDescription,\n groupTitleColor: colorTextDescription,\n colorItemTextSelected: colorPrimary,\n itemSelectedColor: colorPrimary,\n colorItemTextSelectedHorizontal: colorPrimary,\n horizontalItemSelectedColor: colorPrimary,\n colorItemBg: colorBgContainer,\n itemBg: colorBgContainer,\n colorItemBgHover: colorBgTextHover,\n itemHoverBg: colorBgTextHover,\n colorItemBgActive: colorFillContent,\n itemActiveBg: controlItemBgActive,\n colorSubItemBg: colorFillAlter,\n subMenuItemBg: colorFillAlter,\n colorItemBgSelected: controlItemBgActive,\n itemSelectedBg: controlItemBgActive,\n colorItemBgSelectedHorizontal: 'transparent',\n horizontalItemSelectedBg: 'transparent',\n colorActiveBarWidth: 0,\n activeBarWidth,\n colorActiveBarHeight: lineWidthBold,\n activeBarHeight: lineWidthBold,\n colorActiveBarBorderSize: lineWidth,\n activeBarBorderWidth,\n // Disabled\n colorItemTextDisabled: colorTextDisabled,\n itemDisabledColor: colorTextDisabled,\n // Danger\n colorDangerItemText: colorError,\n dangerItemColor: colorError,\n colorDangerItemTextHover: colorError,\n dangerItemHoverColor: colorError,\n colorDangerItemTextSelected: colorError,\n dangerItemSelectedColor: colorError,\n colorDangerItemBgActive: colorErrorBg,\n dangerItemActiveBg: colorErrorBg,\n colorDangerItemBgSelected: colorErrorBg,\n dangerItemSelectedBg: colorErrorBg,\n itemMarginInline,\n horizontalItemBorderRadius: 0,\n horizontalItemHoverBg: 'transparent',\n itemHeight: controlHeightLG,\n groupTitleLineHeight: lineHeight,\n collapsedWidth: controlHeightLG * 2,\n popupBg: colorBgElevated,\n itemMarginBlock: marginXXS,\n itemPaddingInline: padding,\n horizontalLineHeight: `${controlHeightLG * 1.15}px`,\n iconSize: fontSize,\n iconMarginInlineEnd: controlHeightSM - fontSize,\n collapsedIconSize: fontSizeLG,\n groupTitleFontSize: fontSize,\n // Disabled\n darkItemDisabledColor: new _tinycolor.TinyColor(colorTextLightSolid).setAlpha(0.25).toRgbString(),\n // Dark\n darkItemColor: colorTextDark,\n darkDangerItemColor: colorError,\n darkItemBg: '#001529',\n darkPopupBg: '#001529',\n darkSubMenuItemBg: '#000c17',\n darkItemSelectedColor: colorTextLightSolid,\n darkItemSelectedBg: colorPrimary,\n darkDangerItemSelectedBg: colorError,\n darkItemHoverBg: 'transparent',\n darkGroupTitleColor: colorTextDark,\n darkItemHoverColor: colorTextLightSolid,\n darkDangerItemHoverColor: colorErrorHover,\n darkDangerItemSelectedColor: colorTextLightSolid,\n darkDangerItemActiveBg: colorError,\n // internal\n itemWidth: activeBarWidth ? `calc(100% + ${activeBarBorderWidth}px)` : `calc(100% - ${itemMarginInline * 2}px)`\n };\n};\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = function _default(prefixCls) {\n let rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls;\n let injectStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n const useStyle = (0, _internal.genStyleHooks)('Menu', token => {\n const {\n colorBgElevated,\n controlHeightLG,\n fontSize,\n darkItemColor,\n darkDangerItemColor,\n darkItemBg,\n darkSubMenuItemBg,\n darkItemSelectedColor,\n darkItemSelectedBg,\n darkDangerItemSelectedBg,\n darkItemHoverBg,\n darkGroupTitleColor,\n darkItemHoverColor,\n darkItemDisabledColor,\n darkDangerItemHoverColor,\n darkDangerItemSelectedColor,\n darkDangerItemActiveBg,\n popupBg,\n darkPopupBg\n } = token;\n const menuArrowSize = token.calc(fontSize).div(7).mul(5).equal();\n // Menu Token\n const menuToken = (0, _internal.mergeToken)(token, {\n menuArrowSize,\n menuHorizontalHeight: token.calc(controlHeightLG).mul(1.15).equal(),\n menuArrowOffset: token.calc(menuArrowSize).mul(0.25).equal(),\n menuSubMenuBg: colorBgElevated,\n calc: token.calc,\n popupBg\n });\n const menuDarkToken = (0, _internal.mergeToken)(menuToken, {\n itemColor: darkItemColor,\n itemHoverColor: darkItemHoverColor,\n groupTitleColor: darkGroupTitleColor,\n itemSelectedColor: darkItemSelectedColor,\n itemBg: darkItemBg,\n popupBg: darkPopupBg,\n subMenuItemBg: darkSubMenuItemBg,\n itemActiveBg: 'transparent',\n itemSelectedBg: darkItemSelectedBg,\n activeBarHeight: 0,\n activeBarBorderWidth: 0,\n itemHoverBg: darkItemHoverBg,\n // Disabled\n itemDisabledColor: darkItemDisabledColor,\n // Danger\n dangerItemColor: darkDangerItemColor,\n dangerItemHoverColor: darkDangerItemHoverColor,\n dangerItemSelectedColor: darkDangerItemSelectedColor,\n dangerItemActiveBg: darkDangerItemActiveBg,\n dangerItemSelectedBg: darkDangerItemSelectedBg,\n menuSubMenuBg: darkSubMenuItemBg,\n // Horizontal\n horizontalItemSelectedColor: darkItemSelectedColor,\n horizontalItemSelectedBg: darkItemSelectedBg\n });\n return [\n // Basic\n getBaseStyle(menuToken),\n // Horizontal\n (0, _horizontal.default)(menuToken),\n // Hard code for some light style\n // Vertical\n (0, _vertical.default)(menuToken),\n // Hard code for some light style\n // Theme\n (0, _theme.default)(menuToken, 'light'), (0, _theme.default)(menuDarkToken, 'dark'),\n // RTL\n (0, _rtl.default)(menuToken),\n // Motion\n (0, _motion.genCollapseMotion)(menuToken), (0, _motion.initSlideMotion)(menuToken, 'slide-up'), (0, _motion.initSlideMotion)(menuToken, 'slide-down'), (0, _motion.initZoomMotion)(menuToken, 'zoom-big')];\n }, prepareComponentToken, {\n deprecatedTokens: [['colorGroupTitle', 'groupTitleColor'], ['radiusItem', 'itemBorderRadius'], ['radiusSubMenuItem', 'subMenuItemBorderRadius'], ['colorItemText', 'itemColor'], ['colorItemTextHover', 'itemHoverColor'], ['colorItemTextHoverHorizontal', 'horizontalItemHoverColor'], ['colorItemTextSelected', 'itemSelectedColor'], ['colorItemTextSelectedHorizontal', 'horizontalItemSelectedColor'], ['colorItemTextDisabled', 'itemDisabledColor'], ['colorDangerItemText', 'dangerItemColor'], ['colorDangerItemTextHover', 'dangerItemHoverColor'], ['colorDangerItemTextSelected', 'dangerItemSelectedColor'], ['colorDangerItemBgActive', 'dangerItemActiveBg'], ['colorDangerItemBgSelected', 'dangerItemSelectedBg'], ['colorItemBg', 'itemBg'], ['colorItemBgHover', 'itemHoverBg'], ['colorSubItemBg', 'subMenuItemBg'], ['colorItemBgActive', 'itemActiveBg'], ['colorItemBgSelectedHorizontal', 'horizontalItemSelectedBg'], ['colorActiveBarWidth', 'activeBarWidth'], ['colorActiveBarHeight', 'activeBarHeight'], ['colorActiveBarBorderSize', 'activeBarBorderWidth'], ['colorItemBgSelected', 'itemSelectedBg']],\n // Dropdown will handle menu style self. We do not need to handle this.\n injectStyle,\n unitless: {\n groupTitleLineHeight: true\n }\n });\n return useStyle(prefixCls, rootCls);\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst getRTLStyle = _ref => {\n let {\n componentCls,\n menuArrowOffset,\n calc\n } = _ref;\n return {\n [`${componentCls}-rtl`]: {\n direction: 'rtl'\n },\n [`${componentCls}-submenu-rtl`]: {\n transformOrigin: '100% 0'\n },\n // Vertical Arrow\n [`${componentCls}-rtl${componentCls}-vertical,\n ${componentCls}-submenu-rtl ${componentCls}-vertical`]: {\n [`${componentCls}-submenu-arrow`]: {\n '&::before': {\n transform: `rotate(-45deg) translateY(${(0, _cssinjs.unit)(calc(menuArrowOffset).mul(-1).equal())})`\n },\n '&::after': {\n transform: `rotate(45deg) translateY(${(0, _cssinjs.unit)(menuArrowOffset)})`\n }\n }\n }\n };\n};\nvar _default = exports.default = getRTLStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nconst accessibilityFocus = token => Object.assign({}, (0, _style.genFocusOutline)(token));\nconst getThemeStyle = (token, themeSuffix) => {\n const {\n componentCls,\n itemColor,\n itemSelectedColor,\n groupTitleColor,\n itemBg,\n subMenuItemBg,\n itemSelectedBg,\n activeBarHeight,\n activeBarWidth,\n activeBarBorderWidth,\n motionDurationSlow,\n motionEaseInOut,\n motionEaseOut,\n itemPaddingInline,\n motionDurationMid,\n itemHoverColor,\n lineType,\n colorSplit,\n // Disabled\n itemDisabledColor,\n // Danger\n dangerItemColor,\n dangerItemHoverColor,\n dangerItemSelectedColor,\n dangerItemActiveBg,\n dangerItemSelectedBg,\n // Bg\n popupBg,\n itemHoverBg,\n itemActiveBg,\n menuSubMenuBg,\n // Horizontal\n horizontalItemSelectedColor,\n horizontalItemSelectedBg,\n horizontalItemBorderRadius,\n horizontalItemHoverBg\n } = token;\n return {\n [`${componentCls}-${themeSuffix}, ${componentCls}-${themeSuffix} > ${componentCls}`]: {\n color: itemColor,\n background: itemBg,\n [`&${componentCls}-root:focus-visible`]: Object.assign({}, accessibilityFocus(token)),\n // ======================== Item ========================\n [`${componentCls}-item-group-title`]: {\n color: groupTitleColor\n },\n [`${componentCls}-submenu-selected`]: {\n [`> ${componentCls}-submenu-title`]: {\n color: itemSelectedColor\n }\n },\n [`${componentCls}-item, ${componentCls}-submenu-title`]: {\n color: itemColor,\n [`&:not(${componentCls}-item-disabled):focus-visible`]: Object.assign({}, accessibilityFocus(token))\n },\n // Disabled\n [`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {\n color: `${itemDisabledColor} !important`\n },\n // Hover\n [`${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {\n [`&:hover, > ${componentCls}-submenu-title:hover`]: {\n color: itemHoverColor\n }\n },\n [`&:not(${componentCls}-horizontal)`]: {\n [`${componentCls}-item:not(${componentCls}-item-selected)`]: {\n '&:hover': {\n backgroundColor: itemHoverBg\n },\n '&:active': {\n backgroundColor: itemActiveBg\n }\n },\n [`${componentCls}-submenu-title`]: {\n '&:hover': {\n backgroundColor: itemHoverBg\n },\n '&:active': {\n backgroundColor: itemActiveBg\n }\n }\n },\n // Danger - only Item has\n [`${componentCls}-item-danger`]: {\n color: dangerItemColor,\n [`&${componentCls}-item:hover`]: {\n [`&:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {\n color: dangerItemHoverColor\n }\n },\n [`&${componentCls}-item:active`]: {\n background: dangerItemActiveBg\n }\n },\n [`${componentCls}-item a`]: {\n '&, &:hover': {\n color: 'inherit'\n }\n },\n [`${componentCls}-item-selected`]: {\n color: itemSelectedColor,\n // Danger\n [`&${componentCls}-item-danger`]: {\n color: dangerItemSelectedColor\n },\n 'a, a:hover': {\n color: 'inherit'\n }\n },\n [`& ${componentCls}-item-selected`]: {\n backgroundColor: itemSelectedBg,\n // Danger\n [`&${componentCls}-item-danger`]: {\n backgroundColor: dangerItemSelectedBg\n }\n },\n [`&${componentCls}-submenu > ${componentCls}`]: {\n backgroundColor: menuSubMenuBg\n },\n // ===== 设置浮层的颜色 =======\n // !dark 模式会被popupBg 会被rest 为 darkPopupBg\n [`&${componentCls}-popup > ${componentCls}`]: {\n backgroundColor: popupBg\n },\n [`&${componentCls}-submenu-popup > ${componentCls}`]: {\n backgroundColor: popupBg\n },\n // ===== 设置浮层的颜色 end =======\n // ====================== Horizontal ======================\n [`&${componentCls}-horizontal`]: Object.assign(Object.assign({}, themeSuffix === 'dark' ? {\n borderBottom: 0\n } : {}), {\n [`> ${componentCls}-item, > ${componentCls}-submenu`]: {\n top: activeBarBorderWidth,\n marginTop: token.calc(activeBarBorderWidth).mul(-1).equal(),\n marginBottom: 0,\n borderRadius: horizontalItemBorderRadius,\n '&::after': {\n position: 'absolute',\n insetInline: itemPaddingInline,\n bottom: 0,\n borderBottom: `${(0, _cssinjs.unit)(activeBarHeight)} solid transparent`,\n transition: `border-color ${motionDurationSlow} ${motionEaseInOut}`,\n content: '\"\"'\n },\n '&:hover, &-active, &-open': {\n background: horizontalItemHoverBg,\n '&::after': {\n borderBottomWidth: activeBarHeight,\n borderBottomColor: horizontalItemSelectedColor\n }\n },\n '&-selected': {\n color: horizontalItemSelectedColor,\n backgroundColor: horizontalItemSelectedBg,\n '&:hover': {\n backgroundColor: horizontalItemSelectedBg\n },\n '&::after': {\n borderBottomWidth: activeBarHeight,\n borderBottomColor: horizontalItemSelectedColor\n }\n }\n }\n }),\n // ================== Inline & Vertical ===================\n //\n [`&${componentCls}-root`]: {\n [`&${componentCls}-inline, &${componentCls}-vertical`]: {\n borderInlineEnd: `${(0, _cssinjs.unit)(activeBarBorderWidth)} ${lineType} ${colorSplit}`\n }\n },\n // ======================== Inline ========================\n [`&${componentCls}-inline`]: {\n // Sub\n [`${componentCls}-sub${componentCls}-inline`]: {\n background: subMenuItemBg\n },\n [`${componentCls}-item`]: {\n position: 'relative',\n '&::after': {\n position: 'absolute',\n insetBlock: 0,\n insetInlineEnd: 0,\n borderInlineEnd: `${(0, _cssinjs.unit)(activeBarWidth)} solid ${itemSelectedColor}`,\n transform: 'scaleY(0.0001)',\n opacity: 0,\n transition: [`transform ${motionDurationMid} ${motionEaseOut}`, `opacity ${motionDurationMid} ${motionEaseOut}`].join(','),\n content: '\"\"'\n },\n // Danger\n [`&${componentCls}-item-danger`]: {\n '&::after': {\n borderInlineEndColor: dangerItemSelectedColor\n }\n }\n },\n [`${componentCls}-selected, ${componentCls}-item-selected`]: {\n '&::after': {\n transform: 'scaleY(1)',\n opacity: 1,\n transition: [`transform ${motionDurationMid} ${motionEaseInOut}`, `opacity ${motionDurationMid} ${motionEaseInOut}`].join(',')\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = getThemeStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nconst getVerticalInlineStyle = token => {\n const {\n componentCls,\n itemHeight,\n itemMarginInline,\n padding,\n menuArrowSize,\n marginXS,\n itemMarginBlock,\n itemWidth,\n itemPaddingInline\n } = token;\n const paddingWithArrow = token.calc(menuArrowSize).add(padding).add(marginXS).equal();\n return {\n [`${componentCls}-item`]: {\n position: 'relative',\n overflow: 'hidden'\n },\n [`${componentCls}-item, ${componentCls}-submenu-title`]: {\n height: itemHeight,\n lineHeight: (0, _cssinjs.unit)(itemHeight),\n paddingInline: itemPaddingInline,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n marginInline: itemMarginInline,\n marginBlock: itemMarginBlock,\n width: itemWidth\n },\n [`> ${componentCls}-item,\n > ${componentCls}-submenu > ${componentCls}-submenu-title`]: {\n height: itemHeight,\n lineHeight: (0, _cssinjs.unit)(itemHeight)\n },\n [`${componentCls}-item-group-list ${componentCls}-submenu-title,\n ${componentCls}-submenu-title`]: {\n paddingInlineEnd: paddingWithArrow\n }\n };\n};\nconst getVerticalStyle = token => {\n const {\n componentCls,\n iconCls,\n itemHeight,\n colorTextLightSolid,\n dropdownWidth,\n controlHeightLG,\n motionEaseOut,\n paddingXL,\n itemMarginInline,\n fontSizeLG,\n motionDurationFast,\n motionDurationSlow,\n paddingXS,\n boxShadowSecondary,\n collapsedWidth,\n collapsedIconSize\n } = token;\n const inlineItemStyle = {\n height: itemHeight,\n lineHeight: (0, _cssinjs.unit)(itemHeight),\n listStylePosition: 'inside',\n listStyleType: 'disc'\n };\n return [{\n [componentCls]: {\n '&-inline, &-vertical': Object.assign({\n [`&${componentCls}-root`]: {\n boxShadow: 'none'\n }\n }, getVerticalInlineStyle(token))\n },\n [`${componentCls}-submenu-popup`]: {\n [`${componentCls}-vertical`]: Object.assign(Object.assign({}, getVerticalInlineStyle(token)), {\n boxShadow: boxShadowSecondary\n })\n }\n },\n // Vertical only\n {\n [`${componentCls}-submenu-popup ${componentCls}-vertical${componentCls}-sub`]: {\n minWidth: dropdownWidth,\n maxHeight: `calc(100vh - ${(0, _cssinjs.unit)(token.calc(controlHeightLG).mul(2.5).equal())})`,\n padding: '0',\n overflow: 'hidden',\n borderInlineEnd: 0,\n // https://github.com/ant-design/ant-design/issues/22244\n // https://github.com/ant-design/ant-design/issues/26812\n \"&:not([class*='-active'])\": {\n overflowX: 'hidden',\n overflowY: 'auto'\n }\n }\n },\n // Inline Only\n {\n [`${componentCls}-inline`]: {\n width: '100%',\n // Motion enhance for first level\n [`&${componentCls}-root`]: {\n [`${componentCls}-item, ${componentCls}-submenu-title`]: {\n display: 'flex',\n alignItems: 'center',\n transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding ${motionDurationFast} ${motionEaseOut}`].join(','),\n [`> ${componentCls}-title-content`]: {\n flex: 'auto',\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n '> *': {\n flex: 'none'\n }\n }\n },\n // >>>>> Sub\n [`${componentCls}-sub${componentCls}-inline`]: {\n padding: 0,\n border: 0,\n borderRadius: 0,\n boxShadow: 'none',\n [`& > ${componentCls}-submenu > ${componentCls}-submenu-title`]: inlineItemStyle,\n [`& ${componentCls}-item-group-title`]: {\n paddingInlineStart: paddingXL\n }\n },\n // >>>>> Item\n [`${componentCls}-item`]: inlineItemStyle\n }\n },\n // Inline Collapse Only\n {\n [`${componentCls}-inline-collapsed`]: {\n width: collapsedWidth,\n [`&${componentCls}-root`]: {\n [`${componentCls}-item, ${componentCls}-submenu ${componentCls}-submenu-title`]: {\n [`> ${componentCls}-inline-collapsed-noicon`]: {\n fontSize: fontSizeLG,\n textAlign: 'center'\n }\n }\n },\n [`> ${componentCls}-item,\n > ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,\n > ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,\n > ${componentCls}-submenu > ${componentCls}-submenu-title`]: {\n insetInlineStart: 0,\n paddingInline: `calc(50% - ${(0, _cssinjs.unit)(token.calc(fontSizeLG).div(2).equal())} - ${(0, _cssinjs.unit)(itemMarginInline)})`,\n textOverflow: 'clip',\n [`\n ${componentCls}-submenu-arrow,\n ${componentCls}-submenu-expand-icon\n `]: {\n opacity: 0\n },\n [`${componentCls}-item-icon, ${iconCls}`]: {\n margin: 0,\n fontSize: collapsedIconSize,\n lineHeight: (0, _cssinjs.unit)(itemHeight),\n '+ span': {\n display: 'inline-block',\n opacity: 0\n }\n }\n },\n [`${componentCls}-item-icon, ${iconCls}`]: {\n display: 'inline-block'\n },\n '&-tooltip': {\n pointerEvents: 'none',\n [`${componentCls}-item-icon, ${iconCls}`]: {\n display: 'none'\n },\n 'a, a:hover': {\n color: colorTextLightSolid\n }\n },\n [`${componentCls}-item-group-title`]: Object.assign(Object.assign({}, _style.textEllipsis), {\n paddingInline: paddingXS\n })\n }\n }];\n};\nvar _default = exports.default = getVerticalStyle;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.TypeIcon = exports.PureContent = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CheckCircleFilled\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nvar _ExclamationCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/ExclamationCircleFilled\"));\nvar _InfoCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/InfoCircleFilled\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcNotification = require(\"rc-notification\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst TypeIcon = exports.TypeIcon = {\n info: /*#__PURE__*/React.createElement(_InfoCircleFilled.default, null),\n success: /*#__PURE__*/React.createElement(_CheckCircleFilled.default, null),\n error: /*#__PURE__*/React.createElement(_CloseCircleFilled.default, null),\n warning: /*#__PURE__*/React.createElement(_ExclamationCircleFilled.default, null),\n loading: /*#__PURE__*/React.createElement(_LoadingOutlined.default, null)\n};\nconst PureContent = _ref => {\n let {\n prefixCls,\n type,\n icon,\n children\n } = _ref;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-custom-content`, `${prefixCls}-${type}`)\n }, icon || TypeIcon[type], /*#__PURE__*/React.createElement(\"span\", null, children));\n};\n/** @private Internal Component. Do not use in your production. */\nexports.PureContent = PureContent;\nconst PurePanel = props => {\n const {\n prefixCls: staticPrefixCls,\n className,\n type,\n icon,\n content\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"type\", \"icon\", \"content\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = staticPrefixCls || getPrefixCls('message');\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcNotification.Notice, Object.assign({}, restProps, {\n prefixCls: prefixCls,\n className: (0, _classnames.default)(className, hashId, `${prefixCls}-notice-pure-panel`, cssVarCls, rootCls),\n eventKey: \"pure\",\n duration: null,\n content: /*#__PURE__*/React.createElement(PureContent, {\n prefixCls: prefixCls,\n type: type,\n icon: icon\n }, content)\n })));\n};\nvar _default = exports.default = PurePanel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.actWrapper = exports.actDestroy = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _render = require(\"rc-util/lib/React/render\");\nvar _context = require(\"../app/context\");\nvar _configProvider = _interopRequireWildcard(require(\"../config-provider\"));\nvar _PurePanel = _interopRequireDefault(require(\"./PurePanel\"));\nvar _useMessage = _interopRequireWildcard(require(\"./useMessage\"));\nvar _util = require(\"./util\");\nlet message = null;\nlet act = callback => callback();\nlet taskQueue = [];\nlet defaultGlobalConfig = {};\nfunction getGlobalContext() {\n const {\n getContainer,\n duration,\n rtl,\n maxCount,\n top\n } = defaultGlobalConfig;\n const mergedContainer = (getContainer === null || getContainer === void 0 ? void 0 : getContainer()) || document.body;\n return {\n getContainer: () => mergedContainer,\n duration,\n rtl,\n maxCount,\n top\n };\n}\nconst GlobalHolder = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n const {\n messageConfig,\n sync\n } = props;\n const {\n getPrefixCls\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = defaultGlobalConfig.prefixCls || getPrefixCls('message');\n const appConfig = (0, _react.useContext)(_context.AppConfigContext);\n const [api, holder] = (0, _useMessage.useInternalMessage)(Object.assign(Object.assign(Object.assign({}, messageConfig), {\n prefixCls\n }), appConfig.message));\n _react.default.useImperativeHandle(ref, () => {\n const instance = Object.assign({}, api);\n Object.keys(instance).forEach(method => {\n instance[method] = function () {\n sync();\n return api[method].apply(api, arguments);\n };\n });\n return {\n instance,\n sync\n };\n });\n return holder;\n});\nconst GlobalHolderWrapper = /*#__PURE__*/_react.default.forwardRef((_, ref) => {\n const [messageConfig, setMessageConfig] = _react.default.useState(getGlobalContext);\n const sync = () => {\n setMessageConfig(getGlobalContext);\n };\n _react.default.useEffect(sync, []);\n const global = (0, _configProvider.globalConfig)();\n const rootPrefixCls = global.getRootPrefixCls();\n const rootIconPrefixCls = global.getIconPrefixCls();\n const theme = global.getTheme();\n const dom = /*#__PURE__*/_react.default.createElement(GlobalHolder, {\n ref: ref,\n sync: sync,\n messageConfig: messageConfig\n });\n return /*#__PURE__*/_react.default.createElement(_configProvider.default, {\n prefixCls: rootPrefixCls,\n iconPrefixCls: rootIconPrefixCls,\n theme: theme\n }, global.holderRender ? global.holderRender(dom) : dom);\n});\nfunction flushNotice() {\n if (!message) {\n const holderFragment = document.createDocumentFragment();\n const newMessage = {\n fragment: holderFragment\n };\n message = newMessage;\n // Delay render to avoid sync issue\n act(() => {\n (0, _render.render)(/*#__PURE__*/_react.default.createElement(GlobalHolderWrapper, {\n ref: node => {\n const {\n instance,\n sync\n } = node || {};\n // React 18 test env will throw if call immediately in ref\n Promise.resolve().then(() => {\n if (!newMessage.instance && instance) {\n newMessage.instance = instance;\n newMessage.sync = sync;\n flushNotice();\n }\n });\n }\n }), holderFragment);\n });\n return;\n }\n // Notification not ready\n if (!message.instance) {\n return;\n }\n // >>> Execute task\n taskQueue.forEach(task => {\n const {\n type,\n skipped\n } = task;\n // Only `skipped` when user call notice but cancel it immediately\n // and instance not ready\n if (!skipped) {\n switch (type) {\n case 'open':\n {\n act(() => {\n const closeFn = message.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));\n closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);\n task.setCloseFn(closeFn);\n });\n break;\n }\n case 'destroy':\n act(() => {\n message === null || message === void 0 ? void 0 : message.instance.destroy(task.key);\n });\n break;\n // Other type open\n default:\n {\n act(() => {\n var _message$instance;\n const closeFn = (_message$instance = message.instance)[type].apply(_message$instance, (0, _toConsumableArray2.default)(task.args));\n closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);\n task.setCloseFn(closeFn);\n });\n }\n }\n }\n });\n // Clean up\n taskQueue = [];\n}\n// ==============================================================================\n// == Export ==\n// ==============================================================================\nfunction setMessageGlobalConfig(config) {\n defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);\n // Trigger sync for it\n act(() => {\n var _a;\n (_a = message === null || message === void 0 ? void 0 : message.sync) === null || _a === void 0 ? void 0 : _a.call(message);\n });\n}\nfunction open(config) {\n const result = (0, _util.wrapPromiseFn)(resolve => {\n let closeFn;\n const task = {\n type: 'open',\n config,\n resolve,\n setCloseFn: fn => {\n closeFn = fn;\n }\n };\n taskQueue.push(task);\n return () => {\n if (closeFn) {\n act(() => {\n closeFn();\n });\n } else {\n task.skipped = true;\n }\n };\n });\n flushNotice();\n return result;\n}\nfunction typeOpen(type, args) {\n const global = (0, _configProvider.globalConfig)();\n if (process.env.NODE_ENV !== 'production' && !global.holderRender) {\n (0, _configProvider.warnContext)('message');\n }\n const result = (0, _util.wrapPromiseFn)(resolve => {\n let closeFn;\n const task = {\n type,\n args,\n resolve,\n setCloseFn: fn => {\n closeFn = fn;\n }\n };\n taskQueue.push(task);\n return () => {\n if (closeFn) {\n act(() => {\n closeFn();\n });\n } else {\n task.skipped = true;\n }\n };\n });\n flushNotice();\n return result;\n}\nconst destroy = key => {\n taskQueue.push({\n type: 'destroy',\n key\n });\n flushNotice();\n};\nconst methods = ['success', 'info', 'warning', 'error', 'loading'];\nconst baseStaticMethods = {\n open,\n destroy,\n config: setMessageGlobalConfig,\n useMessage: _useMessage.default,\n _InternalPanelDoNotUseOrYouWillBeFired: _PurePanel.default\n};\nconst staticMethods = baseStaticMethods;\nmethods.forEach(type => {\n staticMethods[type] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return typeOpen(type, args);\n };\n});\n// ==============================================================================\n// == Test ==\n// ==============================================================================\nconst noop = () => {};\n/** @internal Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nlet actWrapper = exports.actWrapper = noop;\nif (process.env.NODE_ENV === 'test') {\n exports.actWrapper = actWrapper = wrapper => {\n act = wrapper;\n };\n}\n/** @internal Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nlet actDestroy = exports.actDestroy = noop;\nif (process.env.NODE_ENV === 'test') {\n exports.actDestroy = actDestroy = () => {\n message = null;\n };\n}\nvar _default = exports.default = staticMethods;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _useZIndex = require(\"../../_util/hooks/useZIndex\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genMessageStyle = token => {\n const {\n componentCls,\n iconCls,\n boxShadow,\n colorText,\n colorSuccess,\n colorError,\n colorWarning,\n colorInfo,\n fontSizeLG,\n motionEaseInOutCirc,\n motionDurationSlow,\n marginXS,\n paddingXS,\n borderRadiusLG,\n zIndexPopup,\n // Custom token\n contentPadding,\n contentBg\n } = token;\n const noticeCls = `${componentCls}-notice`;\n const messageMoveIn = new _cssinjs.Keyframes('MessageMoveIn', {\n '0%': {\n padding: 0,\n transform: 'translateY(-100%)',\n opacity: 0\n },\n '100%': {\n padding: paddingXS,\n transform: 'translateY(0)',\n opacity: 1\n }\n });\n const messageMoveOut = new _cssinjs.Keyframes('MessageMoveOut', {\n '0%': {\n maxHeight: token.height,\n padding: paddingXS,\n opacity: 1\n },\n '100%': {\n maxHeight: 0,\n padding: 0,\n opacity: 0\n }\n });\n const noticeStyle = {\n padding: paddingXS,\n textAlign: 'center',\n [`${componentCls}-custom-content`]: {\n display: 'flex',\n alignItems: 'center'\n },\n [`${componentCls}-custom-content > ${iconCls}`]: {\n marginInlineEnd: marginXS,\n // affected by ltr or rtl\n fontSize: fontSizeLG\n },\n [`${noticeCls}-content`]: {\n display: 'inline-block',\n padding: contentPadding,\n background: contentBg,\n borderRadius: borderRadiusLG,\n boxShadow,\n pointerEvents: 'all'\n },\n [`${componentCls}-success > ${iconCls}`]: {\n color: colorSuccess\n },\n [`${componentCls}-error > ${iconCls}`]: {\n color: colorError\n },\n [`${componentCls}-warning > ${iconCls}`]: {\n color: colorWarning\n },\n [`${componentCls}-info > ${iconCls},\n ${componentCls}-loading > ${iconCls}`]: {\n color: colorInfo\n }\n };\n return [\n // ============================ Holder ============================\n {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n color: colorText,\n position: 'fixed',\n top: marginXS,\n width: '100%',\n pointerEvents: 'none',\n zIndex: zIndexPopup,\n [`${componentCls}-move-up`]: {\n animationFillMode: 'forwards'\n },\n [`\n ${componentCls}-move-up-appear,\n ${componentCls}-move-up-enter\n `]: {\n animationName: messageMoveIn,\n animationDuration: motionDurationSlow,\n animationPlayState: 'paused',\n animationTimingFunction: motionEaseInOutCirc\n },\n [`\n ${componentCls}-move-up-appear${componentCls}-move-up-appear-active,\n ${componentCls}-move-up-enter${componentCls}-move-up-enter-active\n `]: {\n animationPlayState: 'running'\n },\n [`${componentCls}-move-up-leave`]: {\n animationName: messageMoveOut,\n animationDuration: motionDurationSlow,\n animationPlayState: 'paused',\n animationTimingFunction: motionEaseInOutCirc\n },\n [`${componentCls}-move-up-leave${componentCls}-move-up-leave-active`]: {\n animationPlayState: 'running'\n },\n '&-rtl': {\n direction: 'rtl',\n span: {\n direction: 'rtl'\n }\n }\n })\n },\n // ============================ Notice ============================\n {\n [componentCls]: {\n [`${noticeCls}-wrapper`]: Object.assign({}, noticeStyle)\n }\n },\n // ============================= Pure =============================\n {\n [`${componentCls}-notice-pure-panel`]: Object.assign(Object.assign({}, noticeStyle), {\n padding: 0,\n textAlign: 'start'\n })\n }];\n};\nconst prepareComponentToken = token => ({\n zIndexPopup: token.zIndexPopupBase + _useZIndex.CONTAINER_MAX_OFFSET + 10,\n contentBg: token.colorBgElevated,\n contentPadding: `${(token.controlHeightLG - token.fontSize * token.lineHeight) / 2}px ${token.paddingSM}px`\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Message', token => {\n // Gen-style functions here\n const combinedToken = (0, _internal.mergeToken)(token, {\n height: 150\n });\n return [genMessageStyle(combinedToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useMessage;\nexports.useInternalMessage = useInternalMessage;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcNotification = require(\"rc-notification\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _PurePanel = require(\"./PurePanel\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _util = require(\"./util\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst DEFAULT_OFFSET = 8;\nconst DEFAULT_DURATION = 3;\nconst Wrapper = _ref => {\n let {\n children,\n prefixCls\n } = _ref;\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcNotification.NotificationProvider, {\n classNames: {\n list: (0, _classnames.default)(hashId, cssVarCls, rootCls)\n }\n }, children));\n};\nconst renderNotifications = (node, _ref2) => {\n let {\n prefixCls,\n key\n } = _ref2;\n return /*#__PURE__*/React.createElement(Wrapper, {\n prefixCls: prefixCls,\n key: key\n }, node);\n};\nconst Holder = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n top,\n prefixCls: staticPrefixCls,\n getContainer: staticGetContainer,\n maxCount,\n duration = DEFAULT_DURATION,\n rtl,\n transitionName,\n onAllRemoved\n } = props;\n const {\n getPrefixCls,\n getPopupContainer,\n message,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = staticPrefixCls || getPrefixCls('message');\n // =============================== Style ===============================\n const getStyle = () => ({\n left: '50%',\n transform: 'translateX(-50%)',\n top: top !== null && top !== void 0 ? top : DEFAULT_OFFSET\n });\n const getClassName = () => (0, _classnames.default)({\n [`${prefixCls}-rtl`]: rtl !== null && rtl !== void 0 ? rtl : direction === 'rtl'\n });\n // ============================== Motion ===============================\n const getNotificationMotion = () => (0, _util.getMotion)(prefixCls, transitionName);\n // ============================ Close Icon =============================\n const mergedCloseIcon = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-close-x`\n }, /*#__PURE__*/React.createElement(_CloseOutlined.default, {\n className: `${prefixCls}-close-icon`\n }));\n // ============================== Origin ===============================\n const [api, holder] = (0, _rcNotification.useNotification)({\n prefixCls,\n style: getStyle,\n className: getClassName,\n motion: getNotificationMotion,\n closable: false,\n closeIcon: mergedCloseIcon,\n duration,\n getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,\n maxCount,\n onAllRemoved,\n renderNotifications\n });\n // ================================ Ref ================================\n React.useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {\n prefixCls,\n message\n }));\n return holder;\n});\n// ==============================================================================\n// == Hook ==\n// ==============================================================================\nlet keyIndex = 0;\nfunction useInternalMessage(messageConfig) {\n const holderRef = React.useRef(null);\n const warning = (0, _warning.devUseWarning)('Message');\n // ================================ API ================================\n const wrapAPI = React.useMemo(() => {\n // Wrap with notification content\n // >>> close\n const close = key => {\n var _a;\n (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);\n };\n // >>> Open\n const open = config => {\n if (!holderRef.current) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', 'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.') : void 0;\n const fakeResult = () => {};\n fakeResult.then = () => {};\n return fakeResult;\n }\n const {\n open: originOpen,\n prefixCls,\n message\n } = holderRef.current;\n const noticePrefixCls = `${prefixCls}-notice`;\n const {\n content,\n icon,\n type,\n key,\n className,\n style,\n onClose\n } = config,\n restConfig = __rest(config, [\"content\", \"icon\", \"type\", \"key\", \"className\", \"style\", \"onClose\"]);\n let mergedKey = key;\n if (mergedKey === undefined || mergedKey === null) {\n keyIndex += 1;\n mergedKey = `antd-message-${keyIndex}`;\n }\n return (0, _util.wrapPromiseFn)(resolve => {\n originOpen(Object.assign(Object.assign({}, restConfig), {\n key: mergedKey,\n content: (/*#__PURE__*/React.createElement(_PurePanel.PureContent, {\n prefixCls: prefixCls,\n type: type,\n icon: icon\n }, content)),\n placement: 'top',\n className: (0, _classnames.default)(type && `${noticePrefixCls}-${type}`, className, message === null || message === void 0 ? void 0 : message.className),\n style: Object.assign(Object.assign({}, message === null || message === void 0 ? void 0 : message.style), style),\n onClose: () => {\n onClose === null || onClose === void 0 ? void 0 : onClose();\n resolve();\n }\n }));\n // Return close function\n return () => {\n close(mergedKey);\n };\n });\n };\n // >>> destroy\n const destroy = key => {\n var _a;\n if (key !== undefined) {\n close(key);\n } else {\n (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.destroy();\n }\n };\n const clone = {\n open,\n destroy\n };\n const keys = ['info', 'success', 'warning', 'error', 'loading'];\n keys.forEach(type => {\n const typeOpen = (jointContent, duration, onClose) => {\n let config;\n if (jointContent && typeof jointContent === 'object' && 'content' in jointContent) {\n config = jointContent;\n } else {\n config = {\n content: jointContent\n };\n }\n // Params\n let mergedDuration;\n let mergedOnClose;\n if (typeof duration === 'function') {\n mergedOnClose = duration;\n } else {\n mergedDuration = duration;\n mergedOnClose = onClose;\n }\n const mergedConfig = Object.assign(Object.assign({\n onClose: mergedOnClose,\n duration: mergedDuration\n }, config), {\n type\n });\n return open(mergedConfig);\n };\n clone[type] = typeOpen;\n });\n return clone;\n }, []);\n // ============================== Return ===============================\n return [wrapAPI, /*#__PURE__*/React.createElement(Holder, Object.assign({\n key: \"message-holder\"\n }, messageConfig, {\n ref: holderRef\n }))];\n}\nfunction useMessage(messageConfig) {\n return useInternalMessage(messageConfig);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getMotion = getMotion;\nexports.wrapPromiseFn = wrapPromiseFn;\nfunction getMotion(prefixCls, transitionName) {\n return {\n motionName: transitionName !== null && transitionName !== void 0 ? transitionName : `${prefixCls}-move-up`\n };\n}\n/** Wrap message open with promise like function */\nfunction wrapPromiseFn(openFn) {\n let closeFn;\n const closePromise = new Promise(resolve => {\n closeFn = openFn(() => {\n resolve(true);\n });\n });\n const result = () => {\n closeFn === null || closeFn === void 0 ? void 0 : closeFn();\n };\n result.then = (filled, rejected) => closePromise.then(filled, rejected);\n result.promise = closePromise;\n return result;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ConfirmContent = ConfirmContent;\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CheckCircleFilled\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nvar _ExclamationCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/ExclamationCircleFilled\"));\nvar _InfoCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/InfoCircleFilled\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = _interopRequireDefault(require(\"../config-provider\"));\nvar _locale = require(\"../locale\");\nvar _useToken = _interopRequireDefault(require(\"../theme/useToken\"));\nvar _ConfirmCancelBtn = _interopRequireDefault(require(\"./components/ConfirmCancelBtn\"));\nvar _ConfirmOkBtn = _interopRequireDefault(require(\"./components/ConfirmOkBtn\"));\nvar _context = require(\"./context\");\nvar _Modal = _interopRequireDefault(require(\"./Modal\"));\nvar _confirm = _interopRequireDefault(require(\"./style/confirm\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction ConfirmContent(props) {\n const {\n prefixCls,\n icon,\n okText,\n cancelText,\n confirmPrefixCls,\n type,\n okCancel,\n footer,\n // Legacy for static function usage\n locale: staticLocale\n } = props,\n resetProps = __rest(props, [\"prefixCls\", \"icon\", \"okText\", \"cancelText\", \"confirmPrefixCls\", \"type\", \"okCancel\", \"footer\", \"locale\"]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Modal');\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\\`icon\\` is using ReactNode instead of string naming in v4. Please check \\`${icon}\\` at https://ant.design/components/icon`) : void 0;\n }\n // Icon\n let mergedIcon = icon;\n // 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon\n if (!icon && icon !== null) {\n switch (type) {\n case 'info':\n mergedIcon = /*#__PURE__*/React.createElement(_InfoCircleFilled.default, null);\n break;\n case 'success':\n mergedIcon = /*#__PURE__*/React.createElement(_CheckCircleFilled.default, null);\n break;\n case 'error':\n mergedIcon = /*#__PURE__*/React.createElement(_CloseCircleFilled.default, null);\n break;\n default:\n mergedIcon = /*#__PURE__*/React.createElement(_ExclamationCircleFilled.default, null);\n }\n }\n // 默认为 true,保持向下兼容\n const mergedOkCancel = okCancel !== null && okCancel !== void 0 ? okCancel : type === 'confirm';\n const autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';\n const [locale] = (0, _locale.useLocale)('Modal');\n const mergedLocale = staticLocale || locale;\n // ================== Locale Text ==================\n const okTextLocale = okText || (mergedOkCancel ? mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.okText : mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.justOkText);\n const cancelTextLocale = cancelText || (mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.cancelText);\n // ================= Context Value =================\n const btnCtxValue = Object.assign({\n autoFocusButton,\n cancelTextLocale,\n okTextLocale,\n mergedOkCancel\n }, resetProps);\n const btnCtxValueMemo = React.useMemo(() => btnCtxValue, (0, _toConsumableArray2.default)(Object.values(btnCtxValue)));\n // ====================== Footer Origin Node ======================\n const footerOriginNode = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_ConfirmCancelBtn.default, null), /*#__PURE__*/React.createElement(_ConfirmOkBtn.default, null));\n const hasTitle = props.title !== undefined && props.title !== null;\n const bodyCls = `${confirmPrefixCls}-body`;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${confirmPrefixCls}-body-wrapper`\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(bodyCls, {\n [`${bodyCls}-has-title`]: hasTitle\n })\n }, mergedIcon, /*#__PURE__*/React.createElement(\"div\", {\n className: `${confirmPrefixCls}-paragraph`\n }, hasTitle && /*#__PURE__*/React.createElement(\"span\", {\n className: `${confirmPrefixCls}-title`\n }, props.title), /*#__PURE__*/React.createElement(\"div\", {\n className: `${confirmPrefixCls}-content`\n }, props.content))), footer === undefined || typeof footer === 'function' ? (/*#__PURE__*/React.createElement(_context.ModalContextProvider, {\n value: btnCtxValueMemo\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${confirmPrefixCls}-btns`\n }, typeof footer === 'function' ? footer(footerOriginNode, {\n OkBtn: _ConfirmOkBtn.default,\n CancelBtn: _ConfirmCancelBtn.default\n }) : footerOriginNode))) : footer, /*#__PURE__*/React.createElement(_confirm.default, {\n prefixCls: prefixCls\n }));\n}\nconst ConfirmDialog = props => {\n const {\n close,\n zIndex,\n afterClose,\n open,\n keyboard,\n centered,\n getContainer,\n maskStyle,\n direction,\n prefixCls,\n wrapClassName,\n rootPrefixCls,\n bodyStyle,\n closable = false,\n closeIcon,\n modalRender,\n focusTriggerAfterClose,\n onConfirm,\n styles\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Modal');\n [['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n }\n const confirmPrefixCls = `${prefixCls}-confirm`;\n const width = props.width || 416;\n const style = props.style || {};\n const mask = props.mask === undefined ? true : props.mask;\n // 默认为 false,保持旧版默认行为\n const maskClosable = props.maskClosable === undefined ? false : props.maskClosable;\n const classString = (0, _classnames.default)(confirmPrefixCls, `${confirmPrefixCls}-${props.type}`, {\n [`${confirmPrefixCls}-rtl`]: direction === 'rtl'\n }, props.className);\n // ========================= zIndex =========================\n const [, token] = (0, _useToken.default)();\n const mergedZIndex = React.useMemo(() => {\n if (zIndex !== undefined) {\n return zIndex;\n }\n // Static always use max zIndex\n return token.zIndexPopupBase + _useZIndex.CONTAINER_MAX_OFFSET;\n }, [zIndex, token]);\n // ========================= Render =========================\n return /*#__PURE__*/React.createElement(_Modal.default, {\n prefixCls: prefixCls,\n className: classString,\n wrapClassName: (0, _classnames.default)({\n [`${confirmPrefixCls}-centered`]: !!props.centered\n }, wrapClassName),\n onCancel: () => {\n close === null || close === void 0 ? void 0 : close({\n triggerCancel: true\n });\n onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);\n },\n open: open,\n title: \"\",\n footer: null,\n transitionName: (0, _motion.getTransitionName)(rootPrefixCls || '', 'zoom', props.transitionName),\n maskTransitionName: (0, _motion.getTransitionName)(rootPrefixCls || '', 'fade', props.maskTransitionName),\n mask: mask,\n maskClosable: maskClosable,\n style: style,\n styles: Object.assign({\n body: bodyStyle,\n mask: maskStyle\n }, styles),\n width: width,\n zIndex: mergedZIndex,\n afterClose: afterClose,\n keyboard: keyboard,\n centered: centered,\n getContainer: getContainer,\n closable: closable,\n closeIcon: closeIcon,\n modalRender: modalRender,\n focusTriggerAfterClose: focusTriggerAfterClose\n }, /*#__PURE__*/React.createElement(ConfirmContent, Object.assign({}, props, {\n confirmPrefixCls: confirmPrefixCls\n })));\n};\nconst ConfirmDialogWrapper = props => {\n const {\n rootPrefixCls,\n iconPrefixCls,\n direction,\n theme\n } = props;\n return /*#__PURE__*/React.createElement(_configProvider.default, {\n prefixCls: rootPrefixCls,\n iconPrefixCls: iconPrefixCls,\n direction: direction,\n theme: theme\n }, /*#__PURE__*/React.createElement(ConfirmDialog, Object.assign({}, props)));\n};\nif (process.env.NODE_ENV !== 'production') {\n ConfirmDialog.displayName = 'ConfirmDialog';\n ConfirmDialogWrapper.displayName = 'ConfirmDialogWrapper';\n}\nvar _default = exports.default = ConfirmDialogWrapper;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcDialog = _interopRequireDefault(require(\"rc-dialog\"));\nvar _ContextIsolator = _interopRequireDefault(require(\"../_util/ContextIsolator\"));\nvar _useClosable = _interopRequireWildcard(require(\"../_util/hooks/useClosable\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _styleChecker = require(\"../_util/styleChecker\");\nvar _warning = require(\"../_util/warning\");\nvar _zindexContext = _interopRequireDefault(require(\"../_util/zindexContext\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _skeleton = _interopRequireDefault(require(\"../skeleton\"));\nvar _context = require(\"../watermark/context\");\nvar _shared = require(\"./shared\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nlet mousePosition;\n// ref: https://github.com/ant-design/ant-design/issues/15795\nconst getClickPosition = e => {\n mousePosition = {\n x: e.pageX,\n y: e.pageY\n };\n // 100ms 内发生过点击事件,则从点击位置动画展示\n // 否则直接 zoom 展示\n // 这样可以兼容非点击方式展开\n setTimeout(() => {\n mousePosition = null;\n }, 100);\n};\n// 只有点击事件支持从鼠标位置动画展开\nif ((0, _styleChecker.canUseDocElement)()) {\n document.documentElement.addEventListener('click', getClickPosition, true);\n}\nconst Modal = props => {\n var _a;\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n direction,\n modal: modalContext\n } = React.useContext(_configProvider.ConfigContext);\n const handleCancel = e => {\n const {\n onCancel\n } = props;\n onCancel === null || onCancel === void 0 ? void 0 : onCancel(e);\n };\n const handleOk = e => {\n const {\n onOk\n } = props;\n onOk === null || onOk === void 0 ? void 0 : onOk(e);\n };\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Modal');\n [['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n }\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n open,\n wrapClassName,\n centered,\n getContainer,\n focusTriggerAfterClose = true,\n style,\n // Deprecated\n visible,\n width = 520,\n footer,\n classNames: modalClassNames,\n styles: modalStyles,\n children,\n loading\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"open\", \"wrapClassName\", \"centered\", \"getContainer\", \"focusTriggerAfterClose\", \"style\", \"visible\", \"width\", \"footer\", \"classNames\", \"styles\", \"children\", \"loading\"]);\n const prefixCls = getPrefixCls('modal', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const wrapClassNameExtended = (0, _classnames.default)(wrapClassName, {\n [`${prefixCls}-centered`]: !!centered,\n [`${prefixCls}-wrap-rtl`]: direction === 'rtl'\n });\n const dialogFooter = footer !== null && !loading ? (/*#__PURE__*/React.createElement(_shared.Footer, Object.assign({}, props, {\n onOk: handleOk,\n onCancel: handleCancel\n }))) : null;\n const [mergedClosable, mergedCloseIcon, closeBtnIsDisabled] = (0, _useClosable.default)((0, _useClosable.pickClosable)(props), (0, _useClosable.pickClosable)(modalContext), {\n closable: true,\n closeIcon: /*#__PURE__*/React.createElement(_CloseOutlined.default, {\n className: `${prefixCls}-close-icon`\n }),\n closeIconRender: icon => (0, _shared.renderCloseIcon)(prefixCls, icon)\n });\n // ============================ Refs ============================\n // Select `ant-modal-content` by `panelRef`\n const panelRef = (0, _context.usePanelRef)(`.${prefixCls}-content`);\n // ============================ zIndex ============================\n const [zIndex, contextZIndex] = (0, _useZIndex.useZIndex)('Modal', restProps.zIndex);\n // =========================== Render ===========================\n return wrapCSSVar(/*#__PURE__*/React.createElement(_ContextIsolator.default, {\n form: true,\n space: true\n }, /*#__PURE__*/React.createElement(_zindexContext.default.Provider, {\n value: contextZIndex\n }, /*#__PURE__*/React.createElement(_rcDialog.default, Object.assign({\n width: width\n }, restProps, {\n zIndex: zIndex,\n getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,\n prefixCls: prefixCls,\n rootClassName: (0, _classnames.default)(hashId, rootClassName, cssVarCls, rootCls),\n footer: dialogFooter,\n visible: open !== null && open !== void 0 ? open : visible,\n mousePosition: (_a = restProps.mousePosition) !== null && _a !== void 0 ? _a : mousePosition,\n onClose: handleCancel,\n closable: mergedClosable ? {\n disabled: closeBtnIsDisabled,\n closeIcon: mergedCloseIcon\n } : mergedClosable,\n closeIcon: mergedCloseIcon,\n focusTriggerAfterClose: focusTriggerAfterClose,\n transitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'zoom', props.transitionName),\n maskTransitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'fade', props.maskTransitionName),\n className: (0, _classnames.default)(hashId, className, modalContext === null || modalContext === void 0 ? void 0 : modalContext.className),\n style: Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.style), style),\n classNames: Object.assign(Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.classNames), modalClassNames), {\n wrapper: (0, _classnames.default)(wrapClassNameExtended, modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.wrapper)\n }),\n styles: Object.assign(Object.assign({}, modalContext === null || modalContext === void 0 ? void 0 : modalContext.styles), modalStyles),\n panelRef: panelRef\n }), loading ? (/*#__PURE__*/React.createElement(_skeleton.default, {\n active: true,\n title: false,\n paragraph: {\n rows: 4\n },\n className: `${prefixCls}-body-skeleton`\n })) : children))));\n};\nvar _default = exports.default = Modal;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcDialog = require(\"rc-dialog\");\nvar _PurePanel = require(\"../_util/PurePanel\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _ConfirmDialog = require(\"./ConfirmDialog\");\nvar _shared = require(\"./shared\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst PurePanel = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n closeIcon,\n closable,\n type,\n title,\n children,\n footer\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"closeIcon\", \"closable\", \"type\", \"title\", \"children\", \"footer\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const rootPrefixCls = getPrefixCls();\n const prefixCls = customizePrefixCls || getPrefixCls('modal');\n const rootCls = (0, _useCSSVarCls.default)(rootPrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const confirmPrefixCls = `${prefixCls}-confirm`;\n // Choose target props by confirm mark\n let additionalProps = {};\n if (type) {\n additionalProps = {\n closable: closable !== null && closable !== void 0 ? closable : false,\n title: '',\n footer: '',\n children: (/*#__PURE__*/React.createElement(_ConfirmDialog.ConfirmContent, Object.assign({}, props, {\n prefixCls: prefixCls,\n confirmPrefixCls: confirmPrefixCls,\n rootPrefixCls: rootPrefixCls,\n content: children\n })))\n };\n } else {\n additionalProps = {\n closable: closable !== null && closable !== void 0 ? closable : true,\n title,\n footer: footer !== null && /*#__PURE__*/React.createElement(_shared.Footer, Object.assign({}, props)),\n children\n };\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcDialog.Panel, Object.assign({\n prefixCls: prefixCls,\n className: (0, _classnames.default)(hashId, `${prefixCls}-pure-panel`, type && confirmPrefixCls, type && `${confirmPrefixCls}-${type}`, className, cssVarCls, rootCls)\n }, restProps, {\n closeIcon: (0, _shared.renderCloseIcon)(prefixCls, closeIcon),\n closable: closable\n }, additionalProps)));\n};\nvar _default = exports.default = (0, _PurePanel.withPureRenderTheme)(PurePanel);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _ActionButton = _interopRequireDefault(require(\"../../_util/ActionButton\"));\nvar _context = require(\"../context\");\nconst ConfirmCancelBtn = () => {\n const {\n autoFocusButton,\n cancelButtonProps,\n cancelTextLocale,\n isSilent,\n mergedOkCancel,\n rootPrefixCls,\n close,\n onCancel,\n onConfirm\n } = (0, _react.useContext)(_context.ModalContext);\n return mergedOkCancel ? (/*#__PURE__*/_react.default.createElement(_ActionButton.default, {\n isSilent: isSilent,\n actionFn: onCancel,\n close: function () {\n close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);\n onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);\n },\n autoFocus: autoFocusButton === 'cancel',\n buttonProps: cancelButtonProps,\n prefixCls: `${rootPrefixCls}-btn`\n }, cancelTextLocale)) : null;\n};\nvar _default = exports.default = ConfirmCancelBtn;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _ActionButton = _interopRequireDefault(require(\"../../_util/ActionButton\"));\nvar _context = require(\"../context\");\nconst ConfirmOkBtn = () => {\n const {\n autoFocusButton,\n close,\n isSilent,\n okButtonProps,\n rootPrefixCls,\n okTextLocale,\n okType,\n onConfirm,\n onOk\n } = (0, _react.useContext)(_context.ModalContext);\n return /*#__PURE__*/_react.default.createElement(_ActionButton.default, {\n isSilent: isSilent,\n type: okType || 'primary',\n actionFn: onOk,\n close: function () {\n close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);\n onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(true);\n },\n autoFocus: autoFocusButton === 'ok',\n buttonProps: okButtonProps,\n prefixCls: `${rootPrefixCls}-btn`\n }, okTextLocale);\n};\nvar _default = exports.default = ConfirmOkBtn;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _button = _interopRequireDefault(require(\"../../button\"));\nvar _context = require(\"../context\");\nconst NormalCancelBtn = () => {\n const {\n cancelButtonProps,\n cancelTextLocale,\n onCancel\n } = (0, _react.useContext)(_context.ModalContext);\n return /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({\n onClick: onCancel\n }, cancelButtonProps), cancelTextLocale);\n};\nvar _default = exports.default = NormalCancelBtn;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _button = _interopRequireDefault(require(\"../../button\"));\nvar _buttonHelpers = require(\"../../button/buttonHelpers\");\nvar _context = require(\"../context\");\nconst NormalOkBtn = () => {\n const {\n confirmLoading,\n okButtonProps,\n okType,\n okTextLocale,\n onOk\n } = (0, _react.useContext)(_context.ModalContext);\n return /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({}, (0, _buttonHelpers.convertLegacyProps)(okType), {\n loading: confirmLoading,\n onClick: onOk\n }, okButtonProps), okTextLocale);\n};\nvar _default = exports.default = NormalOkBtn;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = confirm;\nexports.modalGlobalConfig = modalGlobalConfig;\nexports.withConfirm = withConfirm;\nexports.withError = withError;\nexports.withInfo = withInfo;\nexports.withSuccess = withSuccess;\nexports.withWarn = withWarn;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _render = require(\"rc-util/lib/React/render\");\nvar _warning = _interopRequireDefault(require(\"../_util/warning\"));\nvar _configProvider = _interopRequireWildcard(require(\"../config-provider\"));\nvar _ConfirmDialog = _interopRequireDefault(require(\"./ConfirmDialog\"));\nvar _destroyFns = _interopRequireDefault(require(\"./destroyFns\"));\nvar _locale = require(\"./locale\");\nlet defaultRootPrefixCls = '';\nfunction getRootPrefixCls() {\n return defaultRootPrefixCls;\n}\nconst ConfirmDialogWrapper = props => {\n var _a, _b;\n const {\n prefixCls: customizePrefixCls,\n getContainer,\n direction\n } = props;\n const runtimeLocale = (0, _locale.getConfirmLocale)();\n const config = (0, _react.useContext)(_configProvider.ConfigContext);\n const rootPrefixCls = getRootPrefixCls() || config.getPrefixCls();\n // because Modal.config set rootPrefixCls, which is different from other components\n const prefixCls = customizePrefixCls || `${rootPrefixCls}-modal`;\n let mergedGetContainer = getContainer;\n if (mergedGetContainer === false) {\n mergedGetContainer = undefined;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(false, 'Modal', 'Static method not support `getContainer` to be `false` since it do not have context env.') : void 0;\n }\n }\n return /*#__PURE__*/_react.default.createElement(_ConfirmDialog.default, Object.assign({}, props, {\n rootPrefixCls: rootPrefixCls,\n prefixCls: prefixCls,\n iconPrefixCls: config.iconPrefixCls,\n theme: config.theme,\n direction: direction !== null && direction !== void 0 ? direction : config.direction,\n locale: (_b = (_a = config.locale) === null || _a === void 0 ? void 0 : _a.Modal) !== null && _b !== void 0 ? _b : runtimeLocale,\n getContainer: mergedGetContainer\n }));\n};\nfunction confirm(config) {\n const global = (0, _configProvider.globalConfig)();\n if (process.env.NODE_ENV !== 'production' && !global.holderRender) {\n (0, _configProvider.warnContext)('Modal');\n }\n const container = document.createDocumentFragment();\n let currentConfig = Object.assign(Object.assign({}, config), {\n close,\n open: true\n });\n let timeoutId;\n function destroy() {\n var _a;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n const triggerCancel = args.some(param => param === null || param === void 0 ? void 0 : param.triggerCancel);\n if (triggerCancel) {\n var _a2;\n (_a = config.onCancel) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [config, () => {}].concat((0, _toConsumableArray2.default)(args.slice(1))));\n }\n for (let i = 0; i < _destroyFns.default.length; i++) {\n const fn = _destroyFns.default[i];\n if (fn === close) {\n _destroyFns.default.splice(i, 1);\n break;\n }\n }\n (0, _render.unmount)(container);\n }\n function render(props) {\n clearTimeout(timeoutId);\n /**\n * https://github.com/ant-design/ant-design/issues/23623\n *\n * Sync render blocks React event. Let's make this async.\n */\n timeoutId = setTimeout(() => {\n const rootPrefixCls = global.getPrefixCls(undefined, getRootPrefixCls());\n const iconPrefixCls = global.getIconPrefixCls();\n const theme = global.getTheme();\n const dom = /*#__PURE__*/_react.default.createElement(ConfirmDialogWrapper, Object.assign({}, props));\n (0, _render.render)(/*#__PURE__*/_react.default.createElement(_configProvider.default, {\n prefixCls: rootPrefixCls,\n iconPrefixCls: iconPrefixCls,\n theme: theme\n }, global.holderRender ? global.holderRender(dom) : dom), container);\n });\n }\n function close() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n currentConfig = Object.assign(Object.assign({}, currentConfig), {\n open: false,\n afterClose: () => {\n if (typeof config.afterClose === 'function') {\n config.afterClose();\n }\n // @ts-ignore\n destroy.apply(this, args);\n }\n });\n // Legacy support\n if (currentConfig.visible) {\n delete currentConfig.visible;\n }\n render(currentConfig);\n }\n function update(configUpdate) {\n if (typeof configUpdate === 'function') {\n currentConfig = configUpdate(currentConfig);\n } else {\n currentConfig = Object.assign(Object.assign({}, currentConfig), configUpdate);\n }\n render(currentConfig);\n }\n render(currentConfig);\n _destroyFns.default.push(close);\n return {\n destroy: close,\n update\n };\n}\nfunction withWarn(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'warning'\n });\n}\nfunction withInfo(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'info'\n });\n}\nfunction withSuccess(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'success'\n });\n}\nfunction withError(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'error'\n });\n}\nfunction withConfirm(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'confirm'\n });\n}\nfunction modalGlobalConfig(_ref) {\n let {\n rootPrefixCls\n } = _ref;\n process.env.NODE_ENV !== \"production\" ? (0, _warning.default)(false, 'Modal', 'Modal.config is deprecated. Please use ConfigProvider.config instead.') : void 0;\n defaultRootPrefixCls = rootPrefixCls;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ModalContextProvider = exports.ModalContext = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst ModalContext = exports.ModalContext = /*#__PURE__*/_react.default.createContext({});\nconst {\n Provider: ModalContextProvider\n} = ModalContext;\nexports.ModalContextProvider = ModalContextProvider;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst destroyFns = [];\nvar _default = exports.default = destroyFns;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _confirm = _interopRequireWildcard(require(\"./confirm\"));\nvar _destroyFns = _interopRequireDefault(require(\"./destroyFns\"));\nvar _Modal = _interopRequireDefault(require(\"./Modal\"));\nvar _PurePanel = _interopRequireDefault(require(\"./PurePanel\"));\nvar _useModal = _interopRequireDefault(require(\"./useModal\"));\nfunction modalWarn(props) {\n return (0, _confirm.default)((0, _confirm.withWarn)(props));\n}\nconst Modal = _Modal.default;\nModal.useModal = _useModal.default;\nModal.info = function infoFn(props) {\n return (0, _confirm.default)((0, _confirm.withInfo)(props));\n};\nModal.success = function successFn(props) {\n return (0, _confirm.default)((0, _confirm.withSuccess)(props));\n};\nModal.error = function errorFn(props) {\n return (0, _confirm.default)((0, _confirm.withError)(props));\n};\nModal.warning = modalWarn;\nModal.warn = modalWarn;\nModal.confirm = function confirmFn(props) {\n return (0, _confirm.default)((0, _confirm.withConfirm)(props));\n};\nModal.destroyAll = function destroyAllFn() {\n while (_destroyFns.default.length) {\n const close = _destroyFns.default.pop();\n if (close) {\n close();\n }\n }\n};\nModal.config = _confirm.modalGlobalConfig;\nModal._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel.default;\nif (process.env.NODE_ENV !== 'production') {\n Modal.displayName = 'Modal';\n}\nvar _default = exports.default = Modal;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.changeConfirmLocale = changeConfirmLocale;\nexports.getConfirmLocale = getConfirmLocale;\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nlet runtimeLocale = Object.assign({}, _en_US.default.Modal);\nlet localeList = [];\nconst generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), _en_US.default.Modal);\nfunction changeConfirmLocale(newLocale) {\n if (newLocale) {\n const cloneLocale = Object.assign({}, newLocale);\n localeList.push(cloneLocale);\n runtimeLocale = generateLocale();\n return () => {\n localeList = localeList.filter(locale => locale !== cloneLocale);\n runtimeLocale = generateLocale();\n };\n }\n runtimeLocale = Object.assign({}, _en_US.default.Modal);\n}\nfunction getConfirmLocale() {\n return runtimeLocale;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Footer = void 0;\nexports.renderCloseIcon = renderCloseIcon;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _DisabledContext = require(\"../config-provider/DisabledContext\");\nvar _locale = require(\"../locale\");\nvar _NormalCancelBtn = _interopRequireDefault(require(\"./components/NormalCancelBtn\"));\nvar _NormalOkBtn = _interopRequireDefault(require(\"./components/NormalOkBtn\"));\nvar _context = require(\"./context\");\nvar _locale2 = require(\"./locale\");\nfunction renderCloseIcon(prefixCls, closeIcon) {\n return /*#__PURE__*/_react.default.createElement(\"span\", {\n className: `${prefixCls}-close-x`\n }, closeIcon || /*#__PURE__*/_react.default.createElement(_CloseOutlined.default, {\n className: `${prefixCls}-close-icon`\n }));\n}\nconst Footer = props => {\n const {\n okText,\n okType = 'primary',\n cancelText,\n confirmLoading,\n onOk,\n onCancel,\n okButtonProps,\n cancelButtonProps,\n footer\n } = props;\n const [locale] = (0, _locale.useLocale)('Modal', (0, _locale2.getConfirmLocale)());\n // ================== Locale Text ==================\n const okTextLocale = okText || (locale === null || locale === void 0 ? void 0 : locale.okText);\n const cancelTextLocale = cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText);\n // ================= Context Value =================\n const btnCtxValue = {\n confirmLoading,\n okButtonProps,\n cancelButtonProps,\n okTextLocale,\n cancelTextLocale,\n okType,\n onOk,\n onCancel\n };\n const btnCtxValueMemo = _react.default.useMemo(() => btnCtxValue, (0, _toConsumableArray2.default)(Object.values(btnCtxValue)));\n let footerNode;\n if (typeof footer === 'function' || typeof footer === 'undefined') {\n footerNode = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_NormalCancelBtn.default, null), /*#__PURE__*/_react.default.createElement(_NormalOkBtn.default, null));\n if (typeof footer === 'function') {\n footerNode = footer(footerNode, {\n OkBtn: _NormalOkBtn.default,\n CancelBtn: _NormalCancelBtn.default\n });\n }\n footerNode = /*#__PURE__*/_react.default.createElement(_context.ModalContextProvider, {\n value: btnCtxValueMemo\n }, footerNode);\n } else {\n footerNode = footer;\n }\n return /*#__PURE__*/_react.default.createElement(_DisabledContext.DisabledContextProvider, {\n disabled: false\n }, footerNode);\n};\nexports.Footer = Footer;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _ = require(\".\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// Style as confirm component\n\n// ============================= Confirm ==============================\nconst genModalConfirmStyle = token => {\n const {\n componentCls,\n titleFontSize,\n titleLineHeight,\n modalConfirmIconSize,\n fontSize,\n lineHeight,\n modalTitleHeight,\n fontHeight,\n confirmBodyPadding\n } = token;\n const confirmComponentCls = `${componentCls}-confirm`;\n return {\n [confirmComponentCls]: {\n '&-rtl': {\n direction: 'rtl'\n },\n [`${token.antCls}-modal-header`]: {\n display: 'none'\n },\n [`${confirmComponentCls}-body-wrapper`]: Object.assign({}, (0, _style.clearFix)()),\n [`&${componentCls} ${componentCls}-body`]: {\n padding: confirmBodyPadding\n },\n // ====================== Body ======================\n [`${confirmComponentCls}-body`]: {\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'start',\n [`> ${token.iconCls}`]: {\n flex: 'none',\n fontSize: modalConfirmIconSize,\n marginInlineEnd: token.confirmIconMarginInlineEnd,\n marginTop: token.calc(token.calc(fontHeight).sub(modalConfirmIconSize).equal()).div(2).equal()\n },\n [`&-has-title > ${token.iconCls}`]: {\n marginTop: token.calc(token.calc(modalTitleHeight).sub(modalConfirmIconSize).equal()).div(2).equal()\n }\n },\n [`${confirmComponentCls}-paragraph`]: {\n display: 'flex',\n flexDirection: 'column',\n flex: 'auto',\n rowGap: token.marginXS\n },\n // https://github.com/ant-design/ant-design/issues/48159\n [`${token.iconCls} + ${confirmComponentCls}-paragraph`]: {\n maxWidth: `calc(100% - ${(0, _cssinjs.unit)(token.calc(token.modalConfirmIconSize).add(token.marginSM).equal())})`\n },\n [`${confirmComponentCls}-title`]: {\n color: token.colorTextHeading,\n fontWeight: token.fontWeightStrong,\n fontSize: titleFontSize,\n lineHeight: titleLineHeight\n },\n [`${confirmComponentCls}-content`]: {\n color: token.colorText,\n fontSize,\n lineHeight\n },\n // ===================== Footer =====================\n [`${confirmComponentCls}-btns`]: {\n textAlign: 'end',\n marginTop: token.confirmBtnsMarginTop,\n [`${token.antCls}-btn + ${token.antCls}-btn`]: {\n marginBottom: 0,\n marginInlineStart: token.marginXS\n }\n }\n },\n [`${confirmComponentCls}-error ${confirmComponentCls}-body > ${token.iconCls}`]: {\n color: token.colorError\n },\n [`${confirmComponentCls}-warning ${confirmComponentCls}-body > ${token.iconCls},\n ${confirmComponentCls}-confirm ${confirmComponentCls}-body > ${token.iconCls}`]: {\n color: token.colorWarning\n },\n [`${confirmComponentCls}-info ${confirmComponentCls}-body > ${token.iconCls}`]: {\n color: token.colorInfo\n },\n [`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: {\n color: token.colorSuccess\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genSubStyleComponent)(['Modal', 'confirm'], token => {\n const modalToken = (0, _.prepareToken)(token);\n return [genModalConfirmStyle(modalToken)];\n}, _.prepareComponentToken, {\n // confirm is weak than modal since no conflict here\n order: -1000\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareToken = exports.prepareComponentToken = exports.genModalMaskStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _internal = require(\"../../theme/internal\");\nfunction box(position) {\n return {\n position,\n inset: 0\n };\n}\nconst genModalMaskStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n return [{\n [`${componentCls}-root`]: {\n [`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {\n // reset scale avoid mousePosition bug\n transform: 'none',\n opacity: 0,\n animationDuration: token.motionDurationSlow,\n // https://github.com/ant-design/ant-design/issues/11777\n userSelect: 'none'\n },\n // https://github.com/ant-design/ant-design/issues/37329\n // https://github.com/ant-design/ant-design/issues/40272\n [`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {\n pointerEvents: 'none'\n },\n [`${componentCls}-mask`]: Object.assign(Object.assign({}, box('fixed')), {\n zIndex: token.zIndexPopupBase,\n height: '100%',\n backgroundColor: token.colorBgMask,\n pointerEvents: 'none',\n [`${componentCls}-hidden`]: {\n display: 'none'\n }\n }),\n [`${componentCls}-wrap`]: Object.assign(Object.assign({}, box('fixed')), {\n zIndex: token.zIndexPopupBase,\n overflow: 'auto',\n outline: 0,\n WebkitOverflowScrolling: 'touch'\n })\n }\n }, {\n [`${componentCls}-root`]: (0, _motion.initFadeMotion)(token)\n }];\n};\nexports.genModalMaskStyle = genModalMaskStyle;\nconst genModalStyle = token => {\n const {\n componentCls\n } = token;\n return [\n // ======================== Root =========================\n {\n [`${componentCls}-root`]: {\n [`${componentCls}-wrap-rtl`]: {\n direction: 'rtl'\n },\n [`${componentCls}-centered`]: {\n textAlign: 'center',\n '&::before': {\n display: 'inline-block',\n width: 0,\n height: '100%',\n verticalAlign: 'middle',\n content: '\"\"'\n },\n [componentCls]: {\n top: 0,\n display: 'inline-block',\n paddingBottom: 0,\n textAlign: 'start',\n verticalAlign: 'middle'\n }\n },\n [`@media (max-width: ${token.screenSMMax}px)`]: {\n [componentCls]: {\n maxWidth: 'calc(100vw - 16px)',\n margin: `${(0, _cssinjs.unit)(token.marginXS)} auto`\n },\n [`${componentCls}-centered`]: {\n [componentCls]: {\n flex: 1\n }\n }\n }\n }\n },\n // ======================== Modal ========================\n {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n pointerEvents: 'none',\n position: 'relative',\n top: 100,\n width: 'auto',\n maxWidth: `calc(100vw - ${(0, _cssinjs.unit)(token.calc(token.margin).mul(2).equal())})`,\n margin: '0 auto',\n paddingBottom: token.paddingLG,\n [`${componentCls}-title`]: {\n margin: 0,\n color: token.titleColor,\n fontWeight: token.fontWeightStrong,\n fontSize: token.titleFontSize,\n lineHeight: token.titleLineHeight,\n wordWrap: 'break-word'\n },\n [`${componentCls}-content`]: {\n position: 'relative',\n backgroundColor: token.contentBg,\n backgroundClip: 'padding-box',\n border: 0,\n borderRadius: token.borderRadiusLG,\n boxShadow: token.boxShadow,\n pointerEvents: 'auto',\n padding: token.contentPadding\n },\n [`${componentCls}-close`]: Object.assign({\n position: 'absolute',\n top: token.calc(token.modalHeaderHeight).sub(token.modalCloseBtnSize).div(2).equal(),\n insetInlineEnd: token.calc(token.modalHeaderHeight).sub(token.modalCloseBtnSize).div(2).equal(),\n zIndex: token.calc(token.zIndexPopupBase).add(10).equal(),\n padding: 0,\n color: token.modalCloseIconColor,\n fontWeight: token.fontWeightStrong,\n lineHeight: 1,\n textDecoration: 'none',\n background: 'transparent',\n borderRadius: token.borderRadiusSM,\n width: token.modalCloseBtnSize,\n height: token.modalCloseBtnSize,\n border: 0,\n outline: 0,\n cursor: 'pointer',\n transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,\n '&-x': {\n display: 'flex',\n fontSize: token.fontSizeLG,\n fontStyle: 'normal',\n lineHeight: (0, _cssinjs.unit)(token.modalCloseBtnSize),\n justifyContent: 'center',\n textTransform: 'none',\n textRendering: 'auto'\n },\n '&:disabled': {\n pointerEvents: 'none'\n },\n '&:hover': {\n color: token.modalCloseIconHoverColor,\n backgroundColor: token.colorBgTextHover,\n textDecoration: 'none'\n },\n '&:active': {\n backgroundColor: token.colorBgTextActive\n }\n }, (0, _style.genFocusStyle)(token)),\n [`${componentCls}-header`]: {\n color: token.colorText,\n background: token.headerBg,\n borderRadius: `${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)} 0 0`,\n marginBottom: token.headerMarginBottom,\n padding: token.headerPadding,\n borderBottom: token.headerBorderBottom\n },\n [`${componentCls}-body`]: {\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n wordWrap: 'break-word',\n padding: token.bodyPadding,\n [`${componentCls}-body-skeleton`]: {\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n margin: `${(0, _cssinjs.unit)(token.margin)} auto`\n }\n },\n [`${componentCls}-footer`]: {\n textAlign: 'end',\n background: token.footerBg,\n marginTop: token.footerMarginTop,\n padding: token.footerPadding,\n borderTop: token.footerBorderTop,\n borderRadius: token.footerBorderRadius,\n [`> ${token.antCls}-btn + ${token.antCls}-btn`]: {\n marginInlineStart: token.marginXS\n }\n },\n [`${componentCls}-open`]: {\n overflow: 'hidden'\n }\n })\n },\n // ======================== Pure =========================\n {\n [`${componentCls}-pure-panel`]: {\n top: 'auto',\n padding: 0,\n display: 'flex',\n flexDirection: 'column',\n [`${componentCls}-content,\n ${componentCls}-body,\n ${componentCls}-confirm-body-wrapper`]: {\n display: 'flex',\n flexDirection: 'column',\n flex: 'auto'\n },\n [`${componentCls}-confirm-body`]: {\n marginBottom: 'auto'\n }\n }\n }];\n};\nconst genRTLStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-root`]: {\n [`${componentCls}-wrap-rtl`]: {\n direction: 'rtl',\n [`${componentCls}-confirm-body`]: {\n direction: 'rtl'\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nconst prepareToken = token => {\n const headerPaddingVertical = token.padding;\n const headerFontSize = token.fontSizeHeading5;\n const headerLineHeight = token.lineHeightHeading5;\n const modalToken = (0, _internal.mergeToken)(token, {\n modalHeaderHeight: token.calc(token.calc(headerLineHeight).mul(headerFontSize).equal()).add(token.calc(headerPaddingVertical).mul(2).equal()).equal(),\n modalFooterBorderColorSplit: token.colorSplit,\n modalFooterBorderStyle: token.lineType,\n modalFooterBorderWidth: token.lineWidth,\n modalCloseIconColor: token.colorIcon,\n modalCloseIconHoverColor: token.colorIconHover,\n modalCloseBtnSize: token.controlHeight,\n modalConfirmIconSize: token.fontHeight,\n modalTitleHeight: token.calc(token.titleFontSize).mul(token.titleLineHeight).equal()\n });\n return modalToken;\n};\nexports.prepareToken = prepareToken;\nconst prepareComponentToken = token => ({\n footerBg: 'transparent',\n headerBg: token.colorBgElevated,\n titleLineHeight: token.lineHeightHeading5,\n titleFontSize: token.fontSizeHeading5,\n contentBg: token.colorBgElevated,\n titleColor: token.colorTextHeading,\n // internal\n contentPadding: token.wireframe ? 0 : `${(0, _cssinjs.unit)(token.paddingMD)} ${(0, _cssinjs.unit)(token.paddingContentHorizontalLG)}`,\n headerPadding: token.wireframe ? `${(0, _cssinjs.unit)(token.padding)} ${(0, _cssinjs.unit)(token.paddingLG)}` : 0,\n headerBorderBottom: token.wireframe ? `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}` : 'none',\n headerMarginBottom: token.wireframe ? 0 : token.marginXS,\n bodyPadding: token.wireframe ? token.paddingLG : 0,\n footerPadding: token.wireframe ? `${(0, _cssinjs.unit)(token.paddingXS)} ${(0, _cssinjs.unit)(token.padding)}` : 0,\n footerBorderTop: token.wireframe ? `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}` : 'none',\n footerBorderRadius: token.wireframe ? `0 0 ${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)}` : 0,\n footerMarginTop: token.wireframe ? 0 : token.marginSM,\n confirmBodyPadding: token.wireframe ? `${(0, _cssinjs.unit)(token.padding * 2)} ${(0, _cssinjs.unit)(token.padding * 2)} ${(0, _cssinjs.unit)(token.paddingLG)}` : 0,\n confirmIconMarginInlineEnd: token.wireframe ? token.margin : token.marginSM,\n confirmBtnsMarginTop: token.wireframe ? token.marginLG : token.marginSM\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Modal', token => {\n const modalToken = prepareToken(token);\n return [genModalStyle(modalToken), genRTLStyle(modalToken), genModalMaskStyle(modalToken), (0, _motion.initZoomMotion)(modalToken, 'zoom')];\n}, prepareComponentToken, {\n unitless: {\n titleLineHeight: true\n }\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _configProvider = require(\"../../config-provider\");\nvar _en_US = _interopRequireDefault(require(\"../../locale/en_US\"));\nvar _useLocale = _interopRequireDefault(require(\"../../locale/useLocale\"));\nvar _ConfirmDialog = _interopRequireDefault(require(\"../ConfirmDialog\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst HookModal = (_a, ref) => {\n var _b;\n var {\n afterClose: hookAfterClose,\n config\n } = _a,\n restProps = __rest(_a, [\"afterClose\", \"config\"]);\n const [open, setOpen] = React.useState(true);\n const [innerConfig, setInnerConfig] = React.useState(config);\n const {\n direction,\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('modal');\n const rootPrefixCls = getPrefixCls();\n const afterClose = () => {\n var _a;\n hookAfterClose();\n (_a = innerConfig.afterClose) === null || _a === void 0 ? void 0 : _a.call(innerConfig);\n };\n const close = function () {\n var _a;\n setOpen(false);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n const triggerCancel = args.some(param => param === null || param === void 0 ? void 0 : param.triggerCancel);\n if (triggerCancel) {\n var _a2;\n (_a = innerConfig.onCancel) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [innerConfig, () => {}].concat((0, _toConsumableArray2.default)(args.slice(1))));\n }\n };\n React.useImperativeHandle(ref, () => ({\n destroy: close,\n update: newConfig => {\n setInnerConfig(originConfig => Object.assign(Object.assign({}, originConfig), newConfig));\n }\n }));\n const mergedOkCancel = (_b = innerConfig.okCancel) !== null && _b !== void 0 ? _b : innerConfig.type === 'confirm';\n const [contextLocale] = (0, _useLocale.default)('Modal', _en_US.default.Modal);\n return /*#__PURE__*/React.createElement(_ConfirmDialog.default, Object.assign({\n prefixCls: prefixCls,\n rootPrefixCls: rootPrefixCls\n }, innerConfig, {\n close: close,\n open: open,\n afterClose: afterClose,\n okText: innerConfig.okText || (mergedOkCancel ? contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.justOkText),\n direction: innerConfig.direction || direction,\n cancelText: innerConfig.cancelText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText)\n }, restProps));\n};\nvar _default = exports.default = /*#__PURE__*/React.forwardRef(HookModal);","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _usePatchElement = _interopRequireDefault(require(\"../../_util/hooks/usePatchElement\"));\nvar _confirm = require(\"../confirm\");\nvar _destroyFns = _interopRequireDefault(require(\"../destroyFns\"));\nvar _HookModal = _interopRequireDefault(require(\"./HookModal\"));\nlet uuid = 0;\nconst ElementsHolder = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef((_props, ref) => {\n const [elements, patchElement] = (0, _usePatchElement.default)();\n React.useImperativeHandle(ref, () => ({\n patchElement\n }), []);\n return /*#__PURE__*/React.createElement(React.Fragment, null, elements);\n}));\nfunction useModal() {\n const holderRef = React.useRef(null);\n // ========================== Effect ==========================\n const [actionQueue, setActionQueue] = React.useState([]);\n React.useEffect(() => {\n if (actionQueue.length) {\n const cloneQueue = (0, _toConsumableArray2.default)(actionQueue);\n cloneQueue.forEach(action => {\n action();\n });\n setActionQueue([]);\n }\n }, [actionQueue]);\n // =========================== Hook ===========================\n const getConfirmFunc = React.useCallback(withFunc => function hookConfirm(config) {\n var _a;\n uuid += 1;\n const modalRef = /*#__PURE__*/React.createRef();\n // Proxy to promise with `onClose`\n let resolvePromise;\n const promise = new Promise(resolve => {\n resolvePromise = resolve;\n });\n let silent = false;\n let closeFunc;\n const modal = /*#__PURE__*/React.createElement(_HookModal.default, {\n key: `modal-${uuid}`,\n config: withFunc(config),\n ref: modalRef,\n afterClose: () => {\n closeFunc === null || closeFunc === void 0 ? void 0 : closeFunc();\n },\n isSilent: () => silent,\n onConfirm: confirmed => {\n resolvePromise(confirmed);\n }\n });\n closeFunc = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.patchElement(modal);\n if (closeFunc) {\n _destroyFns.default.push(closeFunc);\n }\n const instance = {\n destroy: () => {\n function destroyAction() {\n var _a;\n (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.destroy();\n }\n if (modalRef.current) {\n destroyAction();\n } else {\n setActionQueue(prev => [].concat((0, _toConsumableArray2.default)(prev), [destroyAction]));\n }\n },\n update: newConfig => {\n function updateAction() {\n var _a;\n (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.update(newConfig);\n }\n if (modalRef.current) {\n updateAction();\n } else {\n setActionQueue(prev => [].concat((0, _toConsumableArray2.default)(prev), [updateAction]));\n }\n },\n then: resolve => {\n silent = true;\n return promise.then(resolve);\n }\n };\n return instance;\n }, []);\n const fns = React.useMemo(() => ({\n info: getConfirmFunc(_confirm.withInfo),\n success: getConfirmFunc(_confirm.withSuccess),\n error: getConfirmFunc(_confirm.withError),\n warning: getConfirmFunc(_confirm.withWarn),\n confirm: getConfirmFunc(_confirm.withConfirm)\n }), []);\n return [fns, /*#__PURE__*/React.createElement(ElementsHolder, {\n key: \"modal-holder\",\n ref: holderRef\n })];\n}\nvar _default = exports.default = useModal;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.TypeIcon = exports.PureContent = void 0;\nexports.getCloseIcon = getCloseIcon;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CheckCircleFilled\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _ExclamationCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/ExclamationCircleFilled\"));\nvar _InfoCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/InfoCircleFilled\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcNotification = require(\"rc-notification\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _purePanel = _interopRequireDefault(require(\"./style/pure-panel\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst TypeIcon = exports.TypeIcon = {\n info: /*#__PURE__*/React.createElement(_InfoCircleFilled.default, null),\n success: /*#__PURE__*/React.createElement(_CheckCircleFilled.default, null),\n error: /*#__PURE__*/React.createElement(_CloseCircleFilled.default, null),\n warning: /*#__PURE__*/React.createElement(_ExclamationCircleFilled.default, null),\n loading: /*#__PURE__*/React.createElement(_LoadingOutlined.default, null)\n};\nfunction getCloseIcon(prefixCls, closeIcon) {\n if (closeIcon === null || closeIcon === false) {\n return null;\n }\n return closeIcon || /*#__PURE__*/React.createElement(_CloseOutlined.default, {\n className: `${prefixCls}-close-icon`\n });\n}\nconst typeToIcon = {\n success: _CheckCircleFilled.default,\n info: _InfoCircleFilled.default,\n error: _CloseCircleFilled.default,\n warning: _ExclamationCircleFilled.default\n};\nconst PureContent = props => {\n const {\n prefixCls,\n icon,\n type,\n message,\n description,\n btn,\n role = 'alert'\n } = props;\n let iconNode = null;\n if (icon) {\n iconNode = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-icon`\n }, icon);\n } else if (type) {\n iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {\n className: (0, _classnames.default)(`${prefixCls}-icon`, `${prefixCls}-icon-${type}`)\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)({\n [`${prefixCls}-with-icon`]: iconNode\n }),\n role: role\n }, iconNode, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-message`\n }, message), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description), btn && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-btn`\n }, btn));\n};\n/** @private Internal Component. Do not use in your production. */\nexports.PureContent = PureContent;\nconst PurePanel = props => {\n const {\n prefixCls: staticPrefixCls,\n className,\n icon,\n type,\n message,\n description,\n btn,\n closable = true,\n closeIcon,\n className: notificationClassName\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"icon\", \"type\", \"message\", \"description\", \"btn\", \"closable\", \"closeIcon\", \"className\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = staticPrefixCls || getPrefixCls('notification');\n const noticePrefixCls = `${prefixCls}-notice`;\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${noticePrefixCls}-pure-panel`, hashId, className, cssVarCls, rootCls)\n }, /*#__PURE__*/React.createElement(_purePanel.default, {\n prefixCls: prefixCls\n }), /*#__PURE__*/React.createElement(_rcNotification.Notice, Object.assign({}, restProps, {\n prefixCls: prefixCls,\n eventKey: \"pure\",\n duration: null,\n closable: closable,\n className: (0, _classnames.default)({\n notificationClassName\n }),\n closeIcon: getCloseIcon(prefixCls, closeIcon),\n content: /*#__PURE__*/React.createElement(PureContent, {\n prefixCls: noticePrefixCls,\n icon: icon,\n type: type,\n message: message,\n description: description,\n btn: btn\n })\n }))));\n};\nvar _default = exports.default = PurePanel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.actWrapper = exports.actDestroy = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _render = require(\"rc-util/lib/React/render\");\nvar _context = require(\"../app/context\");\nvar _configProvider = _interopRequireWildcard(require(\"../config-provider\"));\nvar _PurePanel = _interopRequireDefault(require(\"./PurePanel\"));\nvar _useNotification = _interopRequireWildcard(require(\"./useNotification\"));\nlet notification = null;\nlet act = callback => callback();\nlet taskQueue = [];\nlet defaultGlobalConfig = {};\nfunction getGlobalContext() {\n const {\n getContainer,\n rtl,\n maxCount,\n top,\n bottom,\n showProgress,\n pauseOnHover\n } = defaultGlobalConfig;\n const mergedContainer = (getContainer === null || getContainer === void 0 ? void 0 : getContainer()) || document.body;\n return {\n getContainer: () => mergedContainer,\n rtl,\n maxCount,\n top,\n bottom,\n showProgress,\n pauseOnHover\n };\n}\nconst GlobalHolder = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n const {\n notificationConfig,\n sync\n } = props;\n const {\n getPrefixCls\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = defaultGlobalConfig.prefixCls || getPrefixCls('notification');\n const appConfig = (0, _react.useContext)(_context.AppConfigContext);\n const [api, holder] = (0, _useNotification.useInternalNotification)(Object.assign(Object.assign(Object.assign({}, notificationConfig), {\n prefixCls\n }), appConfig.notification));\n _react.default.useEffect(sync, []);\n _react.default.useImperativeHandle(ref, () => {\n const instance = Object.assign({}, api);\n Object.keys(instance).forEach(method => {\n instance[method] = function () {\n sync();\n return api[method].apply(api, arguments);\n };\n });\n return {\n instance,\n sync\n };\n });\n return holder;\n});\nconst GlobalHolderWrapper = /*#__PURE__*/_react.default.forwardRef((_, ref) => {\n const [notificationConfig, setNotificationConfig] = _react.default.useState(getGlobalContext);\n const sync = () => {\n setNotificationConfig(getGlobalContext);\n };\n _react.default.useEffect(sync, []);\n const global = (0, _configProvider.globalConfig)();\n const rootPrefixCls = global.getRootPrefixCls();\n const rootIconPrefixCls = global.getIconPrefixCls();\n const theme = global.getTheme();\n const dom = /*#__PURE__*/_react.default.createElement(GlobalHolder, {\n ref: ref,\n sync: sync,\n notificationConfig: notificationConfig\n });\n return /*#__PURE__*/_react.default.createElement(_configProvider.default, {\n prefixCls: rootPrefixCls,\n iconPrefixCls: rootIconPrefixCls,\n theme: theme\n }, global.holderRender ? global.holderRender(dom) : dom);\n});\nfunction flushNotice() {\n if (!notification) {\n const holderFragment = document.createDocumentFragment();\n const newNotification = {\n fragment: holderFragment\n };\n notification = newNotification;\n // Delay render to avoid sync issue\n act(() => {\n (0, _render.render)(/*#__PURE__*/_react.default.createElement(GlobalHolderWrapper, {\n ref: node => {\n const {\n instance,\n sync\n } = node || {};\n Promise.resolve().then(() => {\n if (!newNotification.instance && instance) {\n newNotification.instance = instance;\n newNotification.sync = sync;\n flushNotice();\n }\n });\n }\n }), holderFragment);\n });\n return;\n }\n // Notification not ready\n if (!notification.instance) {\n return;\n }\n // >>> Execute task\n taskQueue.forEach(task => {\n switch (task.type) {\n case 'open':\n {\n act(() => {\n notification.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));\n });\n break;\n }\n case 'destroy':\n act(() => {\n notification === null || notification === void 0 ? void 0 : notification.instance.destroy(task.key);\n });\n break;\n }\n });\n // Clean up\n taskQueue = [];\n}\n// ==============================================================================\n// == Export ==\n// ==============================================================================\nfunction setNotificationGlobalConfig(config) {\n defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);\n // Trigger sync for it\n act(() => {\n var _a;\n (_a = notification === null || notification === void 0 ? void 0 : notification.sync) === null || _a === void 0 ? void 0 : _a.call(notification);\n });\n}\nfunction open(config) {\n const global = (0, _configProvider.globalConfig)();\n if (process.env.NODE_ENV !== 'production' && !global.holderRender) {\n (0, _configProvider.warnContext)('notification');\n }\n taskQueue.push({\n type: 'open',\n config\n });\n flushNotice();\n}\nconst destroy = key => {\n taskQueue.push({\n type: 'destroy',\n key\n });\n flushNotice();\n};\nconst methods = ['success', 'info', 'warning', 'error'];\nconst baseStaticMethods = {\n open,\n destroy,\n config: setNotificationGlobalConfig,\n useNotification: _useNotification.default,\n _InternalPanelDoNotUseOrYouWillBeFired: _PurePanel.default\n};\nconst staticMethods = baseStaticMethods;\nmethods.forEach(type => {\n staticMethods[type] = config => open(Object.assign(Object.assign({}, config), {\n type\n }));\n});\n// ==============================================================================\n// == Test ==\n// ==============================================================================\nconst noop = () => {};\n/** @internal Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nlet actWrapper = exports.actWrapper = noop;\nif (process.env.NODE_ENV === 'test') {\n exports.actWrapper = actWrapper = wrapper => {\n act = wrapper;\n };\n}\n/** @internal Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nlet actDestroy = exports.actDestroy = noop;\nif (process.env.NODE_ENV === 'test') {\n exports.actDestroy = actDestroy = () => {\n notification = null;\n };\n}\nvar _default = exports.default = staticMethods;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.NotificationPlacements = void 0;\nconst NotificationPlacements = exports.NotificationPlacements = ['top', 'topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareNotificationToken = exports.prepareComponentToken = exports.genNoticeStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _useZIndex = require(\"../../_util/hooks/useZIndex\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nvar _placement = _interopRequireDefault(require(\"./placement\"));\nvar _stack = _interopRequireDefault(require(\"./stack\"));\nconst genNoticeStyle = token => {\n const {\n iconCls,\n componentCls,\n // .ant-notification\n boxShadow,\n fontSizeLG,\n notificationMarginBottom,\n borderRadiusLG,\n colorSuccess,\n colorInfo,\n colorWarning,\n colorError,\n colorTextHeading,\n notificationBg,\n notificationPadding,\n notificationMarginEdge,\n notificationProgressBg,\n notificationProgressHeight,\n fontSize,\n lineHeight,\n width,\n notificationIconSize,\n colorText\n } = token;\n const noticeCls = `${componentCls}-notice`;\n return {\n position: 'relative',\n marginBottom: notificationMarginBottom,\n marginInlineStart: 'auto',\n background: notificationBg,\n borderRadius: borderRadiusLG,\n boxShadow,\n [noticeCls]: {\n padding: notificationPadding,\n width,\n maxWidth: `calc(100vw - ${(0, _cssinjs.unit)(token.calc(notificationMarginEdge).mul(2).equal())})`,\n overflow: 'hidden',\n lineHeight,\n wordWrap: 'break-word'\n },\n [`${noticeCls}-message`]: {\n marginBottom: token.marginXS,\n color: colorTextHeading,\n fontSize: fontSizeLG,\n lineHeight: token.lineHeightLG\n },\n [`${noticeCls}-description`]: {\n fontSize,\n color: colorText\n },\n [`${noticeCls}-closable ${noticeCls}-message`]: {\n paddingInlineEnd: token.paddingLG\n },\n [`${noticeCls}-with-icon ${noticeCls}-message`]: {\n marginBottom: token.marginXS,\n marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),\n fontSize: fontSizeLG\n },\n [`${noticeCls}-with-icon ${noticeCls}-description`]: {\n marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),\n fontSize\n },\n // Icon & color style in different selector level\n // https://github.com/ant-design/ant-design/issues/16503\n // https://github.com/ant-design/ant-design/issues/15512\n [`${noticeCls}-icon`]: {\n position: 'absolute',\n fontSize: notificationIconSize,\n lineHeight: 1,\n // icon-font\n [`&-success${iconCls}`]: {\n color: colorSuccess\n },\n [`&-info${iconCls}`]: {\n color: colorInfo\n },\n [`&-warning${iconCls}`]: {\n color: colorWarning\n },\n [`&-error${iconCls}`]: {\n color: colorError\n }\n },\n [`${noticeCls}-close`]: Object.assign({\n position: 'absolute',\n top: token.notificationPaddingVertical,\n insetInlineEnd: token.notificationPaddingHorizontal,\n color: token.colorIcon,\n outline: 'none',\n width: token.notificationCloseButtonSize,\n height: token.notificationCloseButtonSize,\n borderRadius: token.borderRadiusSM,\n transition: `background-color ${token.motionDurationMid}, color ${token.motionDurationMid}`,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n '&:hover': {\n color: token.colorIconHover,\n backgroundColor: token.colorBgTextHover\n },\n '&:active': {\n backgroundColor: token.colorBgTextActive\n }\n }, (0, _style.genFocusStyle)(token)),\n [`${noticeCls}-progress`]: {\n position: 'absolute',\n display: 'block',\n appearance: 'none',\n WebkitAppearance: 'none',\n inlineSize: `calc(100% - ${(0, _cssinjs.unit)(borderRadiusLG)} * 2)`,\n left: {\n _skip_check_: true,\n value: borderRadiusLG\n },\n right: {\n _skip_check_: true,\n value: borderRadiusLG\n },\n bottom: 0,\n blockSize: notificationProgressHeight,\n border: 0,\n '&, &::-webkit-progress-bar': {\n borderRadius: borderRadiusLG,\n backgroundColor: `rgba(0, 0, 0, 0.04)`\n },\n '&::-moz-progress-bar': {\n background: notificationProgressBg\n },\n '&::-webkit-progress-value': {\n borderRadius: borderRadiusLG,\n background: notificationProgressBg\n }\n },\n [`${noticeCls}-btn`]: {\n float: 'right',\n marginTop: token.marginSM\n }\n };\n};\nexports.genNoticeStyle = genNoticeStyle;\nconst genNotificationStyle = token => {\n const {\n componentCls,\n // .ant-notification\n notificationMarginBottom,\n notificationMarginEdge,\n motionDurationMid,\n motionEaseInOut\n } = token;\n const noticeCls = `${componentCls}-notice`;\n const fadeOut = new _cssinjs.Keyframes('antNotificationFadeOut', {\n '0%': {\n maxHeight: token.animationMaxHeight,\n marginBottom: notificationMarginBottom\n },\n '100%': {\n maxHeight: 0,\n marginBottom: 0,\n paddingTop: 0,\n paddingBottom: 0,\n opacity: 0\n }\n });\n return [\n // ============================ Holder ============================\n {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'fixed',\n zIndex: token.zIndexPopup,\n marginRight: {\n value: notificationMarginEdge,\n _skip_check_: true\n },\n [`${componentCls}-hook-holder`]: {\n position: 'relative'\n },\n // animation\n [`${componentCls}-fade-appear-prepare`]: {\n opacity: '0 !important'\n },\n [`${componentCls}-fade-enter, ${componentCls}-fade-appear`]: {\n animationDuration: token.motionDurationMid,\n animationTimingFunction: motionEaseInOut,\n animationFillMode: 'both',\n opacity: 0,\n animationPlayState: 'paused'\n },\n [`${componentCls}-fade-leave`]: {\n animationTimingFunction: motionEaseInOut,\n animationFillMode: 'both',\n animationDuration: motionDurationMid,\n animationPlayState: 'paused'\n },\n [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {\n animationPlayState: 'running'\n },\n [`${componentCls}-fade-leave${componentCls}-fade-leave-active`]: {\n animationName: fadeOut,\n animationPlayState: 'running'\n },\n // RTL\n '&-rtl': {\n direction: 'rtl',\n [`${noticeCls}-btn`]: {\n float: 'left'\n }\n }\n })\n },\n // ============================ Notice ============================\n {\n [componentCls]: {\n [`${noticeCls}-wrapper`]: Object.assign({}, genNoticeStyle(token))\n }\n }];\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => ({\n zIndexPopup: token.zIndexPopupBase + _useZIndex.CONTAINER_MAX_OFFSET + 50,\n width: 384\n});\nexports.prepareComponentToken = prepareComponentToken;\nconst prepareNotificationToken = token => {\n const notificationPaddingVertical = token.paddingMD;\n const notificationPaddingHorizontal = token.paddingLG;\n const notificationToken = (0, _internal.mergeToken)(token, {\n notificationBg: token.colorBgElevated,\n notificationPaddingVertical,\n notificationPaddingHorizontal,\n notificationIconSize: token.calc(token.fontSizeLG).mul(token.lineHeightLG).equal(),\n notificationCloseButtonSize: token.calc(token.controlHeightLG).mul(0.55).equal(),\n notificationMarginBottom: token.margin,\n notificationPadding: `${(0, _cssinjs.unit)(token.paddingMD)} ${(0, _cssinjs.unit)(token.paddingContentHorizontalLG)}`,\n notificationMarginEdge: token.marginLG,\n animationMaxHeight: 150,\n notificationStackLayer: 3,\n notificationProgressHeight: 2,\n notificationProgressBg: `linear-gradient(90deg, ${token.colorPrimaryBorderHover}, ${token.colorPrimary})`\n });\n return notificationToken;\n};\nexports.prepareNotificationToken = prepareNotificationToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Notification', token => {\n const notificationToken = prepareNotificationToken(token);\n return [genNotificationStyle(notificationToken), (0, _placement.default)(notificationToken), (0, _stack.default)(notificationToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genNotificationPlacementStyle = token => {\n const {\n componentCls,\n notificationMarginEdge,\n animationMaxHeight\n } = token;\n const noticeCls = `${componentCls}-notice`;\n const rightFadeIn = new _cssinjs.Keyframes('antNotificationFadeIn', {\n '0%': {\n transform: `translate3d(100%, 0, 0)`,\n opacity: 0\n },\n '100%': {\n transform: `translate3d(0, 0, 0)`,\n opacity: 1\n }\n });\n const topFadeIn = new _cssinjs.Keyframes('antNotificationTopFadeIn', {\n '0%': {\n top: -animationMaxHeight,\n opacity: 0\n },\n '100%': {\n top: 0,\n opacity: 1\n }\n });\n const bottomFadeIn = new _cssinjs.Keyframes('antNotificationBottomFadeIn', {\n '0%': {\n bottom: token.calc(animationMaxHeight).mul(-1).equal(),\n opacity: 0\n },\n '100%': {\n bottom: 0,\n opacity: 1\n }\n });\n const leftFadeIn = new _cssinjs.Keyframes('antNotificationLeftFadeIn', {\n '0%': {\n transform: `translate3d(-100%, 0, 0)`,\n opacity: 0\n },\n '100%': {\n transform: `translate3d(0, 0, 0)`,\n opacity: 1\n }\n });\n return {\n [componentCls]: {\n [`&${componentCls}-top, &${componentCls}-bottom`]: {\n marginInline: 0,\n [noticeCls]: {\n marginInline: 'auto auto'\n }\n },\n [`&${componentCls}-top`]: {\n [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {\n animationName: topFadeIn\n }\n },\n [`&${componentCls}-bottom`]: {\n [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {\n animationName: bottomFadeIn\n }\n },\n [`&${componentCls}-topRight, &${componentCls}-bottomRight`]: {\n [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {\n animationName: rightFadeIn\n }\n },\n [`&${componentCls}-topLeft, &${componentCls}-bottomLeft`]: {\n marginRight: {\n value: 0,\n _skip_check_: true\n },\n marginLeft: {\n value: notificationMarginEdge,\n _skip_check_: true\n },\n [noticeCls]: {\n marginInlineEnd: 'auto',\n marginInlineStart: 0\n },\n [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {\n animationName: leftFadeIn\n }\n }\n }\n };\n};\nvar _default = exports.default = genNotificationPlacementStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _ = require(\".\");\nvar _internal = require(\"../../theme/internal\");\nvar _default = exports.default = (0, _internal.genSubStyleComponent)(['Notification', 'PurePanel'], token => {\n const noticeCls = `${token.componentCls}-notice`;\n const notificationToken = (0, _.prepareNotificationToken)(token);\n return {\n [`${noticeCls}-pure-panel`]: Object.assign(Object.assign({}, (0, _.genNoticeStyle)(notificationToken)), {\n width: notificationToken.width,\n maxWidth: `calc(100vw - ${(0, _cssinjs.unit)(token.calc(notificationToken.notificationMarginEdge).mul(2).equal())})`,\n margin: 0\n })\n };\n}, _.prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _interface = require(\"../interface\");\nconst placementAlignProperty = {\n topLeft: 'left',\n topRight: 'right',\n bottomLeft: 'left',\n bottomRight: 'right',\n top: 'left',\n bottom: 'left'\n};\nconst genPlacementStackStyle = (token, placement) => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-${placement}`]: {\n [`&${componentCls}-stack > ${componentCls}-notice-wrapper`]: {\n [placement.startsWith('top') ? 'top' : 'bottom']: 0,\n [placementAlignProperty[placement]]: {\n value: 0,\n _skip_check_: true\n }\n }\n }\n };\n};\nconst genStackChildrenStyle = token => {\n const childrenStyle = {};\n for (let i = 1; i < token.notificationStackLayer; i++) {\n childrenStyle[`&:nth-last-child(${i + 1})`] = {\n overflow: 'hidden',\n [`& > ${token.componentCls}-notice`]: {\n opacity: 0,\n transition: `opacity ${token.motionDurationMid}`\n }\n };\n }\n return Object.assign({\n [`&:not(:nth-last-child(-n+${token.notificationStackLayer}))`]: {\n opacity: 0,\n overflow: 'hidden',\n color: 'transparent',\n pointerEvents: 'none'\n }\n }, childrenStyle);\n};\nconst genStackedNoticeStyle = token => {\n const childrenStyle = {};\n for (let i = 1; i < token.notificationStackLayer; i++) {\n childrenStyle[`&:nth-last-child(${i + 1})`] = {\n background: token.colorBgBlur,\n backdropFilter: 'blur(10px)',\n '-webkit-backdrop-filter': 'blur(10px)'\n };\n }\n return Object.assign({}, childrenStyle);\n};\nconst genStackStyle = token => {\n const {\n componentCls\n } = token;\n return Object.assign({\n [`${componentCls}-stack`]: {\n [`& > ${componentCls}-notice-wrapper`]: Object.assign({\n transition: `all ${token.motionDurationSlow}, backdrop-filter 0s`,\n position: 'absolute'\n }, genStackChildrenStyle(token))\n },\n [`${componentCls}-stack:not(${componentCls}-stack-expanded)`]: {\n [`& > ${componentCls}-notice-wrapper`]: Object.assign({}, genStackedNoticeStyle(token))\n },\n [`${componentCls}-stack${componentCls}-stack-expanded`]: {\n [`& > ${componentCls}-notice-wrapper`]: {\n '&:not(:nth-last-child(-n + 1))': {\n opacity: 1,\n overflow: 'unset',\n color: 'inherit',\n pointerEvents: 'auto',\n [`& > ${token.componentCls}-notice`]: {\n opacity: 1\n }\n },\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n height: token.margin,\n width: '100%',\n insetInline: 0,\n bottom: token.calc(token.margin).mul(-1).equal(),\n background: 'transparent',\n pointerEvents: 'auto'\n }\n }\n }\n }, _interface.NotificationPlacements.map(placement => genPlacementStackStyle(token, placement)).reduce((acc, cur) => Object.assign(Object.assign({}, acc), cur), {}));\n};\nvar _default = exports.default = genStackStyle;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useNotification;\nexports.useInternalNotification = useInternalNotification;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcNotification = require(\"rc-notification\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _internal = require(\"../theme/internal\");\nvar _PurePanel = require(\"./PurePanel\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _util = require(\"./util\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst DEFAULT_OFFSET = 24;\nconst DEFAULT_DURATION = 4.5;\nconst DEFAULT_PLACEMENT = 'topRight';\nconst Wrapper = _ref => {\n let {\n children,\n prefixCls\n } = _ref;\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(_rcNotification.NotificationProvider, {\n classNames: {\n list: (0, _classnames.default)(hashId, cssVarCls, rootCls)\n }\n }, children));\n};\nconst renderNotifications = (node, _ref2) => {\n let {\n prefixCls,\n key\n } = _ref2;\n return /*#__PURE__*/_react.default.createElement(Wrapper, {\n prefixCls: prefixCls,\n key: key\n }, node);\n};\nconst Holder = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n const {\n top,\n bottom,\n prefixCls: staticPrefixCls,\n getContainer: staticGetContainer,\n maxCount,\n rtl,\n onAllRemoved,\n stack,\n duration,\n pauseOnHover = true,\n showProgress\n } = props;\n const {\n getPrefixCls,\n getPopupContainer,\n notification,\n direction\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const [, token] = (0, _internal.useToken)();\n const prefixCls = staticPrefixCls || getPrefixCls('notification');\n // =============================== Style ===============================\n const getStyle = placement => (0, _util.getPlacementStyle)(placement, top !== null && top !== void 0 ? top : DEFAULT_OFFSET, bottom !== null && bottom !== void 0 ? bottom : DEFAULT_OFFSET);\n const getClassName = () => (0, _classnames.default)({\n [`${prefixCls}-rtl`]: rtl !== null && rtl !== void 0 ? rtl : direction === 'rtl'\n });\n // ============================== Motion ===============================\n const getNotificationMotion = () => (0, _util.getMotion)(prefixCls);\n // ============================== Origin ===============================\n const [api, holder] = (0, _rcNotification.useNotification)({\n prefixCls,\n style: getStyle,\n className: getClassName,\n motion: getNotificationMotion,\n closable: true,\n closeIcon: (0, _PurePanel.getCloseIcon)(prefixCls),\n duration: duration !== null && duration !== void 0 ? duration : DEFAULT_DURATION,\n getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,\n maxCount,\n pauseOnHover,\n showProgress,\n onAllRemoved,\n renderNotifications,\n stack: stack === false ? false : {\n threshold: typeof stack === 'object' ? stack === null || stack === void 0 ? void 0 : stack.threshold : undefined,\n offset: 8,\n gap: token.margin\n }\n });\n // ================================ Ref ================================\n _react.default.useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {\n prefixCls,\n notification\n }));\n return holder;\n});\n// ==============================================================================\n// == Hook ==\n// ==============================================================================\nfunction useInternalNotification(notificationConfig) {\n const holderRef = _react.default.useRef(null);\n const warning = (0, _warning.devUseWarning)('Notification');\n // ================================ API ================================\n const wrapAPI = _react.default.useMemo(() => {\n // Wrap with notification content\n // >>> Open\n const open = config => {\n var _a;\n if (!holderRef.current) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', 'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.') : void 0;\n return;\n }\n const {\n open: originOpen,\n prefixCls,\n notification\n } = holderRef.current;\n const noticePrefixCls = `${prefixCls}-notice`;\n const {\n message,\n description,\n icon,\n type,\n btn,\n className,\n style,\n role = 'alert',\n closeIcon,\n closable\n } = config,\n restConfig = __rest(config, [\"message\", \"description\", \"icon\", \"type\", \"btn\", \"className\", \"style\", \"role\", \"closeIcon\", \"closable\"]);\n const realCloseIcon = (0, _PurePanel.getCloseIcon)(noticePrefixCls, typeof closeIcon !== 'undefined' ? closeIcon : notification === null || notification === void 0 ? void 0 : notification.closeIcon);\n return originOpen(Object.assign(Object.assign({\n // use placement from props instead of hard-coding \"topRight\"\n placement: (_a = notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.placement) !== null && _a !== void 0 ? _a : DEFAULT_PLACEMENT\n }, restConfig), {\n content: (/*#__PURE__*/_react.default.createElement(_PurePanel.PureContent, {\n prefixCls: noticePrefixCls,\n icon: icon,\n type: type,\n message: message,\n description: description,\n btn: btn,\n role: role\n })),\n className: (0, _classnames.default)(type && `${noticePrefixCls}-${type}`, className, notification === null || notification === void 0 ? void 0 : notification.className),\n style: Object.assign(Object.assign({}, notification === null || notification === void 0 ? void 0 : notification.style), style),\n closeIcon: realCloseIcon,\n closable: closable !== null && closable !== void 0 ? closable : !!realCloseIcon\n }));\n };\n // >>> destroy\n const destroy = key => {\n var _a, _b;\n if (key !== undefined) {\n (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);\n } else {\n (_b = holderRef.current) === null || _b === void 0 ? void 0 : _b.destroy();\n }\n };\n const clone = {\n open,\n destroy\n };\n const keys = ['success', 'info', 'warning', 'error'];\n keys.forEach(type => {\n clone[type] = config => open(Object.assign(Object.assign({}, config), {\n type\n }));\n });\n return clone;\n }, []);\n // ============================== Return ===============================\n return [wrapAPI, /*#__PURE__*/_react.default.createElement(Holder, Object.assign({\n key: \"notification-holder\"\n }, notificationConfig, {\n ref: holderRef\n }))];\n}\nfunction useNotification(notificationConfig) {\n return useInternalNotification(notificationConfig);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getMotion = getMotion;\nexports.getPlacementStyle = getPlacementStyle;\nfunction getPlacementStyle(placement, top, bottom) {\n let style;\n switch (placement) {\n case 'top':\n style = {\n left: '50%',\n transform: 'translateX(-50%)',\n right: 'auto',\n top,\n bottom: 'auto'\n };\n break;\n case 'topLeft':\n style = {\n left: 0,\n top,\n bottom: 'auto'\n };\n break;\n case 'topRight':\n style = {\n right: 0,\n top,\n bottom: 'auto'\n };\n break;\n case 'bottom':\n style = {\n left: '50%',\n transform: 'translateX(-50%)',\n right: 'auto',\n top: 'auto',\n bottom\n };\n break;\n case 'bottomLeft':\n style = {\n left: 0,\n top: 'auto',\n bottom\n };\n break;\n default:\n style = {\n right: 0,\n top: 'auto',\n bottom\n };\n break;\n }\n return style;\n}\nfunction getMotion(prefixCls) {\n return {\n motionName: `${prefixCls}-fade`\n };\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _DoubleLeftOutlined = _interopRequireDefault(require(\"@ant-design/icons/DoubleLeftOutlined\"));\nvar _DoubleRightOutlined = _interopRequireDefault(require(\"@ant-design/icons/DoubleRightOutlined\"));\nvar _LeftOutlined = _interopRequireDefault(require(\"@ant-design/icons/LeftOutlined\"));\nvar _RightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RightOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcPagination = _interopRequireDefault(require(\"rc-pagination\"));\nvar _en_US = _interopRequireDefault(require(\"rc-pagination/lib/locale/en_US\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _useBreakpoint = _interopRequireDefault(require(\"../grid/hooks/useBreakpoint\"));\nvar _locale = require(\"../locale\");\nvar _internal = require(\"../theme/internal\");\nvar _Select = require(\"./Select\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _bordered = _interopRequireDefault(require(\"./style/bordered\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Pagination = props => {\n const {\n align,\n prefixCls: customizePrefixCls,\n selectPrefixCls: customizeSelectPrefixCls,\n className,\n rootClassName,\n style,\n size: customizeSize,\n locale: customLocale,\n selectComponentClass,\n responsive,\n showSizeChanger\n } = props,\n restProps = __rest(props, [\"align\", \"prefixCls\", \"selectPrefixCls\", \"className\", \"rootClassName\", \"style\", \"size\", \"locale\", \"selectComponentClass\", \"responsive\", \"showSizeChanger\"]);\n const {\n xs\n } = (0, _useBreakpoint.default)(responsive);\n const [, token] = (0, _internal.useToken)();\n const {\n getPrefixCls,\n direction,\n pagination = {}\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('pagination', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const mergedShowSizeChanger = showSizeChanger !== null && showSizeChanger !== void 0 ? showSizeChanger : pagination.showSizeChanger;\n const iconsProps = React.useMemo(() => {\n const ellipsis = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-item-ellipsis`\n }, \"\\u2022\\u2022\\u2022\");\n const prevIcon = /*#__PURE__*/React.createElement(\"button\", {\n className: `${prefixCls}-item-link`,\n type: \"button\",\n tabIndex: -1\n }, direction === 'rtl' ? /*#__PURE__*/React.createElement(_RightOutlined.default, null) : /*#__PURE__*/React.createElement(_LeftOutlined.default, null));\n const nextIcon = /*#__PURE__*/React.createElement(\"button\", {\n className: `${prefixCls}-item-link`,\n type: \"button\",\n tabIndex: -1\n }, direction === 'rtl' ? /*#__PURE__*/React.createElement(_LeftOutlined.default, null) : /*#__PURE__*/React.createElement(_RightOutlined.default, null));\n const jumpPrevIcon =\n /*#__PURE__*/\n // biome-ignore lint/a11y/useValidAnchor: it is hard to refactor\n React.createElement(\"a\", {\n className: `${prefixCls}-item-link`\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-item-container`\n }, direction === 'rtl' ? (/*#__PURE__*/React.createElement(_DoubleRightOutlined.default, {\n className: `${prefixCls}-item-link-icon`\n })) : (/*#__PURE__*/React.createElement(_DoubleLeftOutlined.default, {\n className: `${prefixCls}-item-link-icon`\n })), ellipsis));\n const jumpNextIcon =\n /*#__PURE__*/\n // biome-ignore lint/a11y/useValidAnchor: it is hard to refactor\n React.createElement(\"a\", {\n className: `${prefixCls}-item-link`\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-item-container`\n }, direction === 'rtl' ? (/*#__PURE__*/React.createElement(_DoubleLeftOutlined.default, {\n className: `${prefixCls}-item-link-icon`\n })) : (/*#__PURE__*/React.createElement(_DoubleRightOutlined.default, {\n className: `${prefixCls}-item-link-icon`\n })), ellipsis));\n return {\n prevIcon,\n nextIcon,\n jumpPrevIcon,\n jumpNextIcon\n };\n }, [direction, prefixCls]);\n const [contextLocale] = (0, _locale.useLocale)('Pagination', _en_US.default);\n const locale = Object.assign(Object.assign({}, contextLocale), customLocale);\n const mergedSize = (0, _useSize.default)(customizeSize);\n const isSmall = mergedSize === 'small' || !!(xs && !mergedSize && responsive);\n const selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);\n const extendedClassName = (0, _classnames.default)({\n [`${prefixCls}-${align}`]: !!align,\n [`${prefixCls}-mini`]: isSmall,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-bordered`]: token.wireframe\n }, pagination === null || pagination === void 0 ? void 0 : pagination.className, className, rootClassName, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, pagination === null || pagination === void 0 ? void 0 : pagination.style), style);\n return wrapCSSVar(/*#__PURE__*/React.createElement(React.Fragment, null, token.wireframe && /*#__PURE__*/React.createElement(_bordered.default, {\n prefixCls: prefixCls\n }), /*#__PURE__*/React.createElement(_rcPagination.default, Object.assign({}, iconsProps, restProps, {\n style: mergedStyle,\n prefixCls: prefixCls,\n selectPrefixCls: selectPrefixCls,\n className: extendedClassName,\n selectComponentClass: selectComponentClass || (isSmall ? _Select.MiniSelect : _Select.MiddleSelect),\n locale: locale,\n showSizeChanger: mergedShowSizeChanger\n }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Pagination.displayName = 'Pagination';\n}\nvar _default = exports.default = Pagination;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MiniSelect = exports.MiddleSelect = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _select = _interopRequireDefault(require(\"../select\"));\nconst MiniSelect = props => /*#__PURE__*/React.createElement(_select.default, Object.assign({}, props, {\n showSearch: true,\n size: \"small\"\n}));\nexports.MiniSelect = MiniSelect;\nconst MiddleSelect = props => /*#__PURE__*/React.createElement(_select.default, Object.assign({}, props, {\n showSearch: true,\n size: \"middle\"\n}));\nexports.MiddleSelect = MiddleSelect;\nMiniSelect.Option = _select.default.Option;\nMiddleSelect.Option = _select.default.Option;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Pagination = _interopRequireDefault(require(\"./Pagination\"));\nvar _default = exports.default = _Pagination.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _ = require(\".\");\nvar _internal = require(\"../../theme/internal\");\nconst genBorderedStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}${componentCls}-bordered${componentCls}-disabled:not(${componentCls}-mini)`]: {\n '&, &:hover': {\n [`${componentCls}-item-link`]: {\n borderColor: token.colorBorder\n }\n },\n '&:focus-visible': {\n [`${componentCls}-item-link`]: {\n borderColor: token.colorBorder\n }\n },\n [`${componentCls}-item, ${componentCls}-item-link`]: {\n backgroundColor: token.colorBgContainerDisabled,\n borderColor: token.colorBorder,\n [`&:hover:not(${componentCls}-item-active)`]: {\n backgroundColor: token.colorBgContainerDisabled,\n borderColor: token.colorBorder,\n a: {\n color: token.colorTextDisabled\n }\n },\n [`&${componentCls}-item-active`]: {\n backgroundColor: token.itemActiveBgDisabled\n }\n },\n [`${componentCls}-prev, ${componentCls}-next`]: {\n '&:hover button': {\n backgroundColor: token.colorBgContainerDisabled,\n borderColor: token.colorBorder,\n color: token.colorTextDisabled\n },\n [`${componentCls}-item-link`]: {\n backgroundColor: token.colorBgContainerDisabled,\n borderColor: token.colorBorder\n }\n }\n },\n [`${componentCls}${componentCls}-bordered:not(${componentCls}-mini)`]: {\n [`${componentCls}-prev, ${componentCls}-next`]: {\n '&:hover button': {\n borderColor: token.colorPrimaryHover,\n backgroundColor: token.itemBg\n },\n [`${componentCls}-item-link`]: {\n backgroundColor: token.itemLinkBg,\n borderColor: token.colorBorder\n },\n [`&:hover ${componentCls}-item-link`]: {\n borderColor: token.colorPrimary,\n backgroundColor: token.itemBg,\n color: token.colorPrimary\n },\n [`&${componentCls}-disabled`]: {\n [`${componentCls}-item-link`]: {\n borderColor: token.colorBorder,\n color: token.colorTextDisabled\n }\n }\n },\n [`${componentCls}-item`]: {\n backgroundColor: token.itemBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n [`&:hover:not(${componentCls}-item-active)`]: {\n borderColor: token.colorPrimary,\n backgroundColor: token.itemBg,\n a: {\n color: token.colorPrimary\n }\n },\n '&-active': {\n borderColor: token.colorPrimary\n }\n }\n }\n };\n};\nvar _default = exports.default = (0, _internal.genSubStyleComponent)(['Pagination', 'bordered'], token => {\n const paginationToken = (0, _.prepareToken)(token);\n return [genBorderedStyle(paginationToken)];\n}, _.prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareToken = exports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../input/style\");\nvar _variants = require(\"../../input/style/variants\");\nvar _style2 = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genPaginationDisabledStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-disabled`]: {\n '&, &:hover': {\n cursor: 'not-allowed',\n [`${componentCls}-item-link`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n }\n },\n '&:focus-visible': {\n cursor: 'not-allowed',\n [`${componentCls}-item-link`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n }\n }\n },\n [`&${componentCls}-disabled`]: {\n cursor: 'not-allowed',\n [`${componentCls}-item`]: {\n cursor: 'not-allowed',\n '&:hover, &:active': {\n backgroundColor: 'transparent'\n },\n a: {\n color: token.colorTextDisabled,\n backgroundColor: 'transparent',\n border: 'none',\n cursor: 'not-allowed'\n },\n '&-active': {\n borderColor: token.colorBorder,\n backgroundColor: token.itemActiveBgDisabled,\n '&:hover, &:active': {\n backgroundColor: token.itemActiveBgDisabled\n },\n a: {\n color: token.itemActiveColorDisabled\n }\n }\n },\n [`${componentCls}-item-link`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed',\n '&:hover, &:active': {\n backgroundColor: 'transparent'\n },\n [`${componentCls}-simple&`]: {\n backgroundColor: 'transparent',\n '&:hover, &:active': {\n backgroundColor: 'transparent'\n }\n }\n },\n [`${componentCls}-simple-pager`]: {\n color: token.colorTextDisabled\n },\n [`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {\n [`${componentCls}-item-link-icon`]: {\n opacity: 0\n },\n [`${componentCls}-item-ellipsis`]: {\n opacity: 1\n }\n }\n },\n [`&${componentCls}-simple`]: {\n [`${componentCls}-prev, ${componentCls}-next`]: {\n [`&${componentCls}-disabled ${componentCls}-item-link`]: {\n '&:hover, &:active': {\n backgroundColor: 'transparent'\n }\n }\n }\n }\n };\n};\nconst genPaginationMiniStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`&${componentCls}-mini ${componentCls}-total-text, &${componentCls}-mini ${componentCls}-simple-pager`]: {\n height: token.itemSizeSM,\n lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)\n },\n [`&${componentCls}-mini ${componentCls}-item`]: {\n minWidth: token.itemSizeSM,\n height: token.itemSizeSM,\n margin: 0,\n lineHeight: (0, _cssinjs.unit)(token.calc(token.itemSizeSM).sub(2).equal())\n },\n [`&${componentCls}-mini:not(${componentCls}-disabled) ${componentCls}-item:not(${componentCls}-item-active)`]: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n '&:hover': {\n backgroundColor: token.colorBgTextHover\n },\n '&:active': {\n backgroundColor: token.colorBgTextActive\n }\n },\n [`&${componentCls}-mini ${componentCls}-prev, &${componentCls}-mini ${componentCls}-next`]: {\n minWidth: token.itemSizeSM,\n height: token.itemSizeSM,\n margin: 0,\n lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)\n },\n [`&${componentCls}-mini:not(${componentCls}-disabled)`]: {\n [`${componentCls}-prev, ${componentCls}-next`]: {\n [`&:hover ${componentCls}-item-link`]: {\n backgroundColor: token.colorBgTextHover\n },\n [`&:active ${componentCls}-item-link`]: {\n backgroundColor: token.colorBgTextActive\n },\n [`&${componentCls}-disabled:hover ${componentCls}-item-link`]: {\n backgroundColor: 'transparent'\n }\n }\n },\n [`\n &${componentCls}-mini ${componentCls}-prev ${componentCls}-item-link,\n &${componentCls}-mini ${componentCls}-next ${componentCls}-item-link\n `]: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n '&::after': {\n height: token.itemSizeSM,\n lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)\n }\n },\n [`&${componentCls}-mini ${componentCls}-jump-prev, &${componentCls}-mini ${componentCls}-jump-next`]: {\n height: token.itemSizeSM,\n marginInlineEnd: 0,\n lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)\n },\n [`&${componentCls}-mini ${componentCls}-options`]: {\n marginInlineStart: token.paginationMiniOptionsMarginInlineStart,\n '&-size-changer': {\n top: token.miniOptionsSizeChangerTop\n },\n '&-quick-jumper': {\n height: token.itemSizeSM,\n lineHeight: (0, _cssinjs.unit)(token.itemSizeSM),\n input: Object.assign(Object.assign({}, (0, _style.genInputSmallStyle)(token)), {\n width: token.paginationMiniQuickJumperInputWidth,\n height: token.controlHeightSM\n })\n }\n }\n };\n};\nconst genPaginationSimpleStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`\n &${componentCls}-simple ${componentCls}-prev,\n &${componentCls}-simple ${componentCls}-next\n `]: {\n height: token.itemSizeSM,\n lineHeight: (0, _cssinjs.unit)(token.itemSizeSM),\n verticalAlign: 'top',\n [`${componentCls}-item-link`]: {\n height: token.itemSizeSM,\n backgroundColor: 'transparent',\n border: 0,\n '&:hover': {\n backgroundColor: token.colorBgTextHover\n },\n '&:active': {\n backgroundColor: token.colorBgTextActive\n },\n '&::after': {\n height: token.itemSizeSM,\n lineHeight: (0, _cssinjs.unit)(token.itemSizeSM)\n }\n }\n },\n [`&${componentCls}-simple ${componentCls}-simple-pager`]: {\n display: 'inline-block',\n height: token.itemSizeSM,\n marginInlineEnd: token.marginXS,\n input: {\n boxSizing: 'border-box',\n height: '100%',\n padding: `0 ${(0, _cssinjs.unit)(token.paginationItemPaddingInline)}`,\n textAlign: 'center',\n backgroundColor: token.itemInputBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderRadius: token.borderRadius,\n outline: 'none',\n transition: `border-color ${token.motionDurationMid}`,\n color: 'inherit',\n '&:hover': {\n borderColor: token.colorPrimary\n },\n '&:focus': {\n borderColor: token.colorPrimaryHover,\n boxShadow: `${(0, _cssinjs.unit)(token.inputOutlineOffset)} 0 ${(0, _cssinjs.unit)(token.controlOutlineWidth)} ${token.controlOutline}`\n },\n '&[disabled]': {\n color: token.colorTextDisabled,\n backgroundColor: token.colorBgContainerDisabled,\n borderColor: token.colorBorder,\n cursor: 'not-allowed'\n }\n }\n }\n };\n};\nconst genPaginationJumpStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {\n outline: 0,\n [`${componentCls}-item-container`]: {\n position: 'relative',\n [`${componentCls}-item-link-icon`]: {\n color: token.colorPrimary,\n fontSize: token.fontSizeSM,\n opacity: 0,\n transition: `all ${token.motionDurationMid}`,\n '&-svg': {\n top: 0,\n insetInlineEnd: 0,\n bottom: 0,\n insetInlineStart: 0,\n margin: 'auto'\n }\n },\n [`${componentCls}-item-ellipsis`]: {\n position: 'absolute',\n top: 0,\n insetInlineEnd: 0,\n bottom: 0,\n insetInlineStart: 0,\n display: 'block',\n margin: 'auto',\n color: token.colorTextDisabled,\n letterSpacing: token.paginationEllipsisLetterSpacing,\n textAlign: 'center',\n textIndent: token.paginationEllipsisTextIndent,\n opacity: 1,\n transition: `all ${token.motionDurationMid}`\n }\n },\n '&:hover': {\n [`${componentCls}-item-link-icon`]: {\n opacity: 1\n },\n [`${componentCls}-item-ellipsis`]: {\n opacity: 0\n }\n }\n },\n [`\n ${componentCls}-prev,\n ${componentCls}-jump-prev,\n ${componentCls}-jump-next\n `]: {\n marginInlineEnd: token.marginXS\n },\n [`\n ${componentCls}-prev,\n ${componentCls}-next,\n ${componentCls}-jump-prev,\n ${componentCls}-jump-next\n `]: {\n display: 'inline-block',\n minWidth: token.itemSize,\n height: token.itemSize,\n color: token.colorText,\n fontFamily: token.fontFamily,\n lineHeight: (0, _cssinjs.unit)(token.itemSize),\n textAlign: 'center',\n verticalAlign: 'middle',\n listStyle: 'none',\n borderRadius: token.borderRadius,\n cursor: 'pointer',\n transition: `all ${token.motionDurationMid}`\n },\n [`${componentCls}-prev, ${componentCls}-next`]: {\n outline: 0,\n button: {\n color: token.colorText,\n cursor: 'pointer',\n userSelect: 'none'\n },\n [`${componentCls}-item-link`]: {\n display: 'block',\n width: '100%',\n height: '100%',\n padding: 0,\n fontSize: token.fontSizeSM,\n textAlign: 'center',\n backgroundColor: 'transparent',\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,\n borderRadius: token.borderRadius,\n outline: 'none',\n transition: `all ${token.motionDurationMid}`\n },\n [`&:hover ${componentCls}-item-link`]: {\n backgroundColor: token.colorBgTextHover\n },\n [`&:active ${componentCls}-item-link`]: {\n backgroundColor: token.colorBgTextActive\n },\n [`&${componentCls}-disabled:hover`]: {\n [`${componentCls}-item-link`]: {\n backgroundColor: 'transparent'\n }\n }\n },\n [`${componentCls}-slash`]: {\n marginInlineEnd: token.paginationSlashMarginInlineEnd,\n marginInlineStart: token.paginationSlashMarginInlineStart\n },\n [`${componentCls}-options`]: {\n display: 'inline-block',\n marginInlineStart: token.margin,\n verticalAlign: 'middle',\n '&-size-changer': {\n display: 'inline-block',\n width: 'auto'\n },\n '&-quick-jumper': {\n display: 'inline-block',\n height: token.controlHeight,\n marginInlineStart: token.marginXS,\n lineHeight: (0, _cssinjs.unit)(token.controlHeight),\n verticalAlign: 'top',\n input: Object.assign(Object.assign(Object.assign({}, (0, _style.genBasicInputStyle)(token)), (0, _variants.genBaseOutlinedStyle)(token, {\n borderColor: token.colorBorder,\n hoverBorderColor: token.colorPrimaryHover,\n activeBorderColor: token.colorPrimary,\n activeShadow: token.activeShadow\n })), {\n '&[disabled]': Object.assign({}, (0, _variants.genDisabledStyle)(token)),\n width: token.calc(token.controlHeightLG).mul(1.25).equal(),\n height: token.controlHeight,\n boxSizing: 'border-box',\n margin: 0,\n marginInlineStart: token.marginXS,\n marginInlineEnd: token.marginXS\n })\n }\n }\n };\n};\nconst genPaginationItemStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-item`]: {\n display: 'inline-block',\n minWidth: token.itemSize,\n height: token.itemSize,\n marginInlineEnd: token.marginXS,\n fontFamily: token.fontFamily,\n lineHeight: (0, _cssinjs.unit)(token.calc(token.itemSize).sub(2).equal()),\n textAlign: 'center',\n verticalAlign: 'middle',\n listStyle: 'none',\n backgroundColor: token.itemBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,\n borderRadius: token.borderRadius,\n outline: 0,\n cursor: 'pointer',\n userSelect: 'none',\n a: {\n display: 'block',\n padding: `0 ${(0, _cssinjs.unit)(token.paginationItemPaddingInline)}`,\n color: token.colorText,\n '&:hover': {\n textDecoration: 'none'\n }\n },\n [`&:not(${componentCls}-item-active)`]: {\n '&:hover': {\n transition: `all ${token.motionDurationMid}`,\n backgroundColor: token.colorBgTextHover\n },\n '&:active': {\n backgroundColor: token.colorBgTextActive\n }\n },\n '&-active': {\n fontWeight: token.fontWeightStrong,\n backgroundColor: token.itemActiveBg,\n borderColor: token.colorPrimary,\n a: {\n color: token.colorPrimary\n },\n '&:hover': {\n borderColor: token.colorPrimaryHover\n },\n '&:hover a': {\n color: token.colorPrimaryHover\n }\n }\n }\n };\n};\nconst genPaginationStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), {\n display: 'flex',\n '&-start': {\n justifyContent: 'start'\n },\n '&-center': {\n justifyContent: 'center'\n },\n '&-end': {\n justifyContent: 'end'\n },\n 'ul, ol': {\n margin: 0,\n padding: 0,\n listStyle: 'none'\n },\n '&::after': {\n display: 'block',\n clear: 'both',\n height: 0,\n overflow: 'hidden',\n visibility: 'hidden',\n content: '\"\"'\n },\n [`${componentCls}-total-text`]: {\n display: 'inline-block',\n height: token.itemSize,\n marginInlineEnd: token.marginXS,\n lineHeight: (0, _cssinjs.unit)(token.calc(token.itemSize).sub(2).equal()),\n verticalAlign: 'middle'\n }\n }), genPaginationItemStyle(token)), genPaginationJumpStyle(token)), genPaginationSimpleStyle(token)), genPaginationMiniStyle(token)), genPaginationDisabledStyle(token)), {\n // media query style\n [`@media only screen and (max-width: ${token.screenLG}px)`]: {\n [`${componentCls}-item`]: {\n '&-after-jump-prev, &-before-jump-next': {\n display: 'none'\n }\n }\n },\n [`@media only screen and (max-width: ${token.screenSM}px)`]: {\n [`${componentCls}-options`]: {\n display: 'none'\n }\n }\n }),\n // rtl style\n [`&${token.componentCls}-rtl`]: {\n direction: 'rtl'\n }\n };\n};\nconst genPaginationFocusStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}:not(${componentCls}-disabled)`]: {\n [`${componentCls}-item`]: Object.assign({}, (0, _style2.genFocusStyle)(token)),\n [`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {\n '&:focus-visible': Object.assign({\n [`${componentCls}-item-link-icon`]: {\n opacity: 1\n },\n [`${componentCls}-item-ellipsis`]: {\n opacity: 0\n }\n }, (0, _style2.genFocusOutline)(token))\n },\n [`${componentCls}-prev, ${componentCls}-next`]: {\n [`&:focus-visible ${componentCls}-item-link`]: Object.assign({}, (0, _style2.genFocusOutline)(token))\n }\n }\n };\n};\nconst prepareComponentToken = token => Object.assign({\n itemBg: token.colorBgContainer,\n itemSize: token.controlHeight,\n itemSizeSM: token.controlHeightSM,\n itemActiveBg: token.colorBgContainer,\n itemLinkBg: token.colorBgContainer,\n itemActiveColorDisabled: token.colorTextDisabled,\n itemActiveBgDisabled: token.controlItemBgActiveDisabled,\n itemInputBg: token.colorBgContainer,\n miniOptionsSizeChangerTop: 0\n}, (0, _style.initComponentToken)(token));\nexports.prepareComponentToken = prepareComponentToken;\nconst prepareToken = token => (0, _internal.mergeToken)(token, {\n inputOutlineOffset: 0,\n paginationMiniOptionsMarginInlineStart: token.calc(token.marginXXS).div(2).equal(),\n paginationMiniQuickJumperInputWidth: token.calc(token.controlHeightLG).mul(1.1).equal(),\n paginationItemPaddingInline: token.calc(token.marginXXS).mul(1.5).equal(),\n paginationEllipsisLetterSpacing: token.calc(token.marginXXS).div(2).equal(),\n paginationSlashMarginInlineStart: token.marginSM,\n paginationSlashMarginInlineEnd: token.marginSM,\n paginationEllipsisTextIndent: '0.13em' // magic for ui experience\n}, (0, _style.initInputToken)(token));\n// ============================== Export ==============================\nexports.prepareToken = prepareToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Pagination', token => {\n const paginationToken = prepareToken(token);\n return [genPaginationStyle(paginationToken), genPaginationFocusStyle(paginationToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.Overlay = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _ExclamationCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/ExclamationCircleFilled\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _ActionButton = _interopRequireDefault(require(\"../_util/ActionButton\"));\nvar _getRenderPropValue = require(\"../_util/getRenderPropValue\");\nvar _button = _interopRequireDefault(require(\"../button\"));\nvar _buttonHelpers = require(\"../button/buttonHelpers\");\nvar _configProvider = require(\"../config-provider\");\nvar _locale = require(\"../locale\");\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _PurePanel = _interopRequireDefault(require(\"../popover/PurePanel\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Overlay = props => {\n const {\n prefixCls,\n okButtonProps,\n cancelButtonProps,\n title,\n description,\n cancelText,\n okText,\n okType = 'primary',\n icon = /*#__PURE__*/React.createElement(_ExclamationCircleFilled.default, null),\n showCancel = true,\n close,\n onConfirm,\n onCancel,\n onPopupClick\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const [contextLocale] = (0, _locale.useLocale)('Popconfirm', _en_US.default.Popconfirm);\n const titleNode = (0, _getRenderPropValue.getRenderPropValue)(title);\n const descriptionNode = (0, _getRenderPropValue.getRenderPropValue)(description);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-inner-content`,\n onClick: onPopupClick\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-message`\n }, icon && /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-message-icon`\n }, icon), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-message-text`\n }, titleNode && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, titleNode), descriptionNode && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, descriptionNode))), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-buttons`\n }, showCancel && (/*#__PURE__*/React.createElement(_button.default, Object.assign({\n onClick: onCancel,\n size: \"small\"\n }, cancelButtonProps), cancelText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText))), /*#__PURE__*/React.createElement(_ActionButton.default, {\n buttonProps: Object.assign(Object.assign({\n size: 'small'\n }, (0, _buttonHelpers.convertLegacyProps)(okType)), okButtonProps),\n actionFn: onConfirm,\n close: close,\n prefixCls: getPrefixCls('btn'),\n quitOnNullishReturnValue: true,\n emitEvent: true\n }, okText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText))));\n};\nexports.Overlay = Overlay;\nconst PurePanel = props => {\n const {\n prefixCls: customizePrefixCls,\n placement,\n className,\n style\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"placement\", \"className\", \"style\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);\n const [wrapCSSVar] = (0, _style.default)(prefixCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_PurePanel.default, {\n placement: placement,\n className: (0, _classnames.default)(prefixCls, className),\n style: style,\n content: /*#__PURE__*/React.createElement(Overlay, Object.assign({\n prefixCls: prefixCls\n }, restProps))\n }));\n};\nvar _default = exports.default = PurePanel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _ExclamationCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/ExclamationCircleFilled\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _configProvider = require(\"../config-provider\");\nvar _popover = _interopRequireDefault(require(\"../popover\"));\nvar _PurePanel = _interopRequireWildcard(require(\"./PurePanel\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalPopconfirm = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _a, _b;\n const {\n prefixCls: customizePrefixCls,\n placement = 'top',\n trigger = 'click',\n okType = 'primary',\n icon = /*#__PURE__*/React.createElement(_ExclamationCircleFilled.default, null),\n children,\n overlayClassName,\n onOpenChange,\n onVisibleChange\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"placement\", \"trigger\", \"okType\", \"icon\", \"children\", \"overlayClassName\", \"onOpenChange\", \"onVisibleChange\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const [open, setOpen] = (0, _useMergedState.default)(false, {\n value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,\n defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible\n });\n const settingOpen = (value, e) => {\n setOpen(value, true);\n onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(value);\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value, e);\n };\n const close = e => {\n settingOpen(false, e);\n };\n const onConfirm = e => {\n var _a;\n return (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(void 0, e);\n };\n const onCancel = e => {\n var _a;\n settingOpen(false, e);\n (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(void 0, e);\n };\n const onInternalOpenChange = (value, e) => {\n const {\n disabled = false\n } = props;\n if (disabled) {\n return;\n }\n settingOpen(value, e);\n };\n const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);\n const overlayClassNames = (0, _classnames.default)(prefixCls, overlayClassName);\n const [wrapCSSVar] = (0, _style.default)(prefixCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_popover.default, Object.assign({}, (0, _omit.default)(restProps, ['title']), {\n trigger: trigger,\n placement: placement,\n onOpenChange: onInternalOpenChange,\n open: open,\n ref: ref,\n overlayClassName: overlayClassNames,\n content: /*#__PURE__*/React.createElement(_PurePanel.Overlay, Object.assign({\n okType: okType,\n icon: icon\n }, props, {\n prefixCls: prefixCls,\n close: close,\n onConfirm: onConfirm,\n onCancel: onCancel\n })),\n \"data-popover-inject\": true\n }), children));\n});\nconst Popconfirm = InternalPopconfirm;\n// We don't care debug panel\n/* istanbul ignore next */\nPopconfirm._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel.default;\nif (process.env.NODE_ENV !== 'production') {\n Popconfirm.displayName = 'Popconfirm';\n}\nvar _default = exports.default = Popconfirm;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n iconCls,\n antCls,\n zIndexPopup,\n colorText,\n colorWarning,\n marginXXS,\n marginXS,\n fontSize,\n fontWeightStrong,\n colorTextHeading\n } = token;\n return {\n [componentCls]: {\n zIndex: zIndexPopup,\n [`&${antCls}-popover`]: {\n fontSize\n },\n [`${componentCls}-message`]: {\n marginBottom: marginXS,\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'start',\n [`> ${componentCls}-message-icon ${iconCls}`]: {\n color: colorWarning,\n fontSize,\n lineHeight: 1,\n marginInlineEnd: marginXS\n },\n [`${componentCls}-title`]: {\n fontWeight: fontWeightStrong,\n color: colorTextHeading,\n '&:only-child': {\n fontWeight: 'normal'\n }\n },\n [`${componentCls}-description`]: {\n marginTop: marginXXS,\n color: colorText\n }\n },\n [`${componentCls}-buttons`]: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n button: {\n marginInlineStart: marginXS\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => {\n const {\n zIndexPopupBase\n } = token;\n return {\n zIndexPopup: zIndexPopupBase + 60\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Popconfirm', token => genBaseStyle(token), prepareComponentToken, {\n resetStyle: false\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.RawPurePanel = exports.Overlay = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTooltip = require(\"rc-tooltip\");\nvar _getRenderPropValue = require(\"../_util/getRenderPropValue\");\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Overlay = _ref => {\n let {\n title,\n content,\n prefixCls\n } = _ref;\n if (!title && !content) {\n return null;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title), content && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-inner-content`\n }, content));\n};\nexports.Overlay = Overlay;\nconst RawPurePanel = props => {\n const {\n hashId,\n prefixCls,\n className,\n style,\n placement = 'top',\n title,\n content,\n children\n } = props;\n const titleNode = (0, _getRenderPropValue.getRenderPropValue)(title);\n const contentNode = (0, _getRenderPropValue.getRenderPropValue)(content);\n const cls = (0, _classnames.default)(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: cls,\n style: style\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-arrow`\n }), /*#__PURE__*/React.createElement(_rcTooltip.Popup, Object.assign({}, props, {\n className: hashId,\n prefixCls: prefixCls\n }), children || /*#__PURE__*/React.createElement(Overlay, {\n prefixCls: prefixCls,\n title: titleNode,\n content: contentNode\n })));\n};\nexports.RawPurePanel = RawPurePanel;\nconst PurePanel = props => {\n const {\n prefixCls: customizePrefixCls,\n className\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('popover', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(RawPurePanel, Object.assign({}, restProps, {\n prefixCls: prefixCls,\n hashId: hashId,\n className: (0, _classnames.default)(className, cssVarCls)\n })));\n};\nvar _default = exports.default = PurePanel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _KeyCode = _interopRequireDefault(require(\"rc-util/lib/KeyCode\"));\nvar _getRenderPropValue = require(\"../_util/getRenderPropValue\");\nvar _motion = require(\"../_util/motion\");\nvar _reactNode = require(\"../_util/reactNode\");\nvar _configProvider = require(\"../config-provider\");\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\nvar _PurePanel = _interopRequireWildcard(require(\"./PurePanel\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n// CSSINJS\n\nconst InternalPopover = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _a, _b;\n const {\n prefixCls: customizePrefixCls,\n title,\n content,\n overlayClassName,\n placement = 'top',\n trigger = 'hover',\n children,\n mouseEnterDelay = 0.1,\n mouseLeaveDelay = 0.1,\n onOpenChange,\n overlayStyle = {}\n } = props,\n otherProps = __rest(props, [\"prefixCls\", \"title\", \"content\", \"overlayClassName\", \"placement\", \"trigger\", \"children\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"onOpenChange\", \"overlayStyle\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('popover', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const rootPrefixCls = getPrefixCls();\n const overlayCls = (0, _classnames.default)(overlayClassName, hashId, cssVarCls);\n const [open, setOpen] = (0, _useMergedState.default)(false, {\n value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,\n defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible\n });\n const settingOpen = (value, e) => {\n setOpen(value, true);\n onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value, e);\n };\n const onKeyDown = e => {\n if (e.keyCode === _KeyCode.default.ESC) {\n settingOpen(false, e);\n }\n };\n const onInternalOpenChange = value => {\n settingOpen(value);\n };\n const titleNode = (0, _getRenderPropValue.getRenderPropValue)(title);\n const contentNode = (0, _getRenderPropValue.getRenderPropValue)(content);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_tooltip.default, Object.assign({\n placement: placement,\n trigger: trigger,\n mouseEnterDelay: mouseEnterDelay,\n mouseLeaveDelay: mouseLeaveDelay,\n overlayStyle: overlayStyle\n }, otherProps, {\n prefixCls: prefixCls,\n overlayClassName: overlayCls,\n ref: ref,\n open: open,\n onOpenChange: onInternalOpenChange,\n overlay: titleNode || contentNode ? (/*#__PURE__*/React.createElement(_PurePanel.Overlay, {\n prefixCls: prefixCls,\n title: titleNode,\n content: contentNode\n })) : null,\n transitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'zoom-big', otherProps.transitionName),\n \"data-popover-inject\": true\n }), (0, _reactNode.cloneElement)(children, {\n onKeyDown: e => {\n var _a, _b;\n if (/*#__PURE__*/React.isValidElement(children)) {\n (_b = children === null || children === void 0 ? void 0 : (_a = children.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }\n onKeyDown(e);\n }\n })));\n});\nconst Popover = InternalPopover;\nPopover._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel.default;\nif (process.env.NODE_ENV !== 'production') {\n Popover.displayName = 'Popover';\n}\nvar _default = exports.default = Popover;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _placementArrow = _interopRequireWildcard(require(\"../../style/placementArrow\"));\nvar _roundedArrow = require(\"../../style/roundedArrow\");\nvar _internal = require(\"../../theme/internal\");\nconst genBaseStyle = token => {\n const {\n componentCls,\n popoverColor,\n titleMinWidth,\n fontWeightStrong,\n innerPadding,\n boxShadowSecondary,\n colorTextHeading,\n borderRadiusLG,\n zIndexPopup,\n titleMarginBottom,\n colorBgElevated,\n popoverBg,\n titleBorderBottom,\n innerContentPadding,\n titlePadding\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'absolute',\n top: 0,\n // use `left` to fix https://github.com/ant-design/ant-design/issues/39195\n left: {\n _skip_check_: true,\n value: 0\n },\n zIndex: zIndexPopup,\n fontWeight: 'normal',\n whiteSpace: 'normal',\n textAlign: 'start',\n cursor: 'auto',\n userSelect: 'text',\n // When use `autoArrow`, origin will follow the arrow position\n '--valid-offset-x': 'var(--arrow-offset-horizontal, var(--arrow-x))',\n transformOrigin: [`var(--valid-offset-x, 50%)`, `var(--arrow-y, 50%)`].join(' '),\n '--antd-arrow-background-color': colorBgElevated,\n width: 'max-content',\n maxWidth: '100vw',\n '&-rtl': {\n direction: 'rtl'\n },\n '&-hidden': {\n display: 'none'\n },\n [`${componentCls}-content`]: {\n position: 'relative'\n },\n [`${componentCls}-inner`]: {\n backgroundColor: popoverBg,\n backgroundClip: 'padding-box',\n borderRadius: borderRadiusLG,\n boxShadow: boxShadowSecondary,\n padding: innerPadding\n },\n [`${componentCls}-title`]: {\n minWidth: titleMinWidth,\n marginBottom: titleMarginBottom,\n color: colorTextHeading,\n fontWeight: fontWeightStrong,\n borderBottom: titleBorderBottom,\n padding: titlePadding\n },\n [`${componentCls}-inner-content`]: {\n color: popoverColor,\n padding: innerContentPadding\n }\n })\n },\n // Arrow Style\n (0, _placementArrow.default)(token, 'var(--antd-arrow-background-color)'),\n // Pure Render\n {\n [`${componentCls}-pure`]: {\n position: 'relative',\n maxWidth: 'none',\n margin: token.sizePopupArrow,\n display: 'inline-block',\n [`${componentCls}-content`]: {\n display: 'inline-block'\n }\n }\n }];\n};\nconst genColorStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: _internal.PresetColors.map(colorKey => {\n const lightColor = token[`${colorKey}6`];\n return {\n [`&${componentCls}-${colorKey}`]: {\n '--antd-arrow-background-color': lightColor,\n [`${componentCls}-inner`]: {\n backgroundColor: lightColor\n },\n [`${componentCls}-arrow`]: {\n background: 'transparent'\n }\n }\n };\n })\n };\n};\nconst prepareComponentToken = token => {\n const {\n lineWidth,\n controlHeight,\n fontHeight,\n padding,\n wireframe,\n zIndexPopupBase,\n borderRadiusLG,\n marginXS,\n lineType,\n colorSplit,\n paddingSM\n } = token;\n const titlePaddingBlockDist = controlHeight - fontHeight;\n const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;\n const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;\n const popoverPaddingHorizontal = padding;\n return Object.assign(Object.assign(Object.assign({\n titleMinWidth: 177,\n zIndexPopup: zIndexPopupBase + 30\n }, (0, _roundedArrow.getArrowToken)(token)), (0, _placementArrow.getArrowOffsetToken)({\n contentRadius: borderRadiusLG,\n limitVerticalRadius: true\n })), {\n // internal\n innerPadding: wireframe ? 0 : 12,\n titleMarginBottom: wireframe ? 0 : marginXS,\n titlePadding: wireframe ? `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px` : 0,\n titleBorderBottom: wireframe ? `${lineWidth}px ${lineType} ${colorSplit}` : 'none',\n innerContentPadding: wireframe ? `${paddingSM}px ${popoverPaddingHorizontal}px` : 0\n });\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Popover', token => {\n const {\n colorBgElevated,\n colorText\n } = token;\n const popoverToken = (0, _internal.mergeToken)(token, {\n popoverBg: colorBgElevated,\n popoverColor: colorText\n });\n return [genBaseStyle(popoverToken), genColorStyle(popoverToken), (0, _motion.initZoomMotion)(popoverToken, 'zoom-big')];\n}, prepareComponentToken, {\n resetStyle: false,\n deprecatedTokens: [['width', 'titleMinWidth'], ['minWidth', 'titleMinWidth']]\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcProgress = require(\"rc-progress\");\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\nvar _utils = require(\"./utils\");\nconst CIRCLE_MIN_STROKE_WIDTH = 3;\nconst getMinPercent = width => CIRCLE_MIN_STROKE_WIDTH / width * 100;\nconst Circle = props => {\n const {\n prefixCls,\n trailColor = null,\n strokeLinecap = 'round',\n gapPosition,\n gapDegree,\n width: originWidth = 120,\n type,\n children,\n success,\n size = originWidth,\n steps\n } = props;\n const [width, height] = (0, _utils.getSize)(size, 'circle');\n let {\n strokeWidth\n } = props;\n if (strokeWidth === undefined) {\n strokeWidth = Math.max(getMinPercent(width), 6);\n }\n const circleStyle = {\n width,\n height,\n fontSize: width * 0.15 + 6\n };\n const realGapDegree = React.useMemo(() => {\n // Support gapDeg = 0 when type = 'dashboard'\n if (gapDegree || gapDegree === 0) {\n return gapDegree;\n }\n if (type === 'dashboard') {\n return 75;\n }\n return undefined;\n }, [gapDegree, type]);\n const percentArray = (0, _utils.getPercentage)(props);\n const gapPos = gapPosition || type === 'dashboard' && 'bottom' || undefined;\n // using className to style stroke color\n const isGradient = Object.prototype.toString.call(props.strokeColor) === '[object Object]';\n const strokeColor = (0, _utils.getStrokeColor)({\n success,\n strokeColor: props.strokeColor\n });\n const wrapperClassName = (0, _classnames.default)(`${prefixCls}-inner`, {\n [`${prefixCls}-circle-gradient`]: isGradient\n });\n const circleContent = /*#__PURE__*/React.createElement(_rcProgress.Circle, {\n steps: steps,\n percent: steps ? percentArray[1] : percentArray,\n strokeWidth: strokeWidth,\n trailWidth: strokeWidth,\n strokeColor: steps ? strokeColor[1] : strokeColor,\n strokeLinecap: strokeLinecap,\n trailColor: trailColor,\n prefixCls: prefixCls,\n gapDegree: realGapDegree,\n gapPosition: gapPos\n });\n const smallCircle = width <= 20;\n const node = /*#__PURE__*/React.createElement(\"div\", {\n className: wrapperClassName,\n style: circleStyle\n }, circleContent, !smallCircle && children);\n if (smallCircle) {\n return /*#__PURE__*/React.createElement(_tooltip.default, {\n title: children\n }, node);\n }\n return node;\n};\nvar _default = exports.default = Circle;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sortGradient = exports.handleGradient = exports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _colors = require(\"@ant-design/colors\");\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _style = require(\"./style\");\nvar _utils = require(\"./utils\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/**\n * @example\n * {\n * \"0%\": \"#afc163\",\n * \"75%\": \"#009900\",\n * \"50%\": \"green\", // ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%'\n * \"25%\": \"#66FF00\",\n * \"100%\": \"#ffffff\"\n * }\n */\nconst sortGradient = gradients => {\n let tempArr = [];\n Object.keys(gradients).forEach(key => {\n const formattedKey = parseFloat(key.replace(/%/g, ''));\n if (!isNaN(formattedKey)) {\n tempArr.push({\n key: formattedKey,\n value: gradients[key]\n });\n }\n });\n tempArr = tempArr.sort((a, b) => a.key - b.key);\n return tempArr.map(_ref => {\n let {\n key,\n value\n } = _ref;\n return `${value} ${key}%`;\n }).join(', ');\n};\n/**\n * Then this man came to realize the truth: Besides six pence, there is the moon. Besides bread and\n * butter, there is the bug. And... Besides women, there is the code.\n *\n * @example\n * {\n * \"0%\": \"#afc163\",\n * \"25%\": \"#66FF00\",\n * \"50%\": \"#00CC00\", // ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,\n * \"75%\": \"#009900\", // #00CC00 50%, #009900 75%, #ffffff 100%)\n * \"100%\": \"#ffffff\"\n * }\n */\nexports.sortGradient = sortGradient;\nconst handleGradient = (strokeColor, directionConfig) => {\n const {\n from = _colors.presetPrimaryColors.blue,\n to = _colors.presetPrimaryColors.blue,\n direction = directionConfig === 'rtl' ? 'to left' : 'to right'\n } = strokeColor,\n rest = __rest(strokeColor, [\"from\", \"to\", \"direction\"]);\n if (Object.keys(rest).length !== 0) {\n const sortedGradients = sortGradient(rest);\n const background = `linear-gradient(${direction}, ${sortedGradients})`;\n return {\n background,\n [_style.LineStrokeColorVar]: background\n };\n }\n const background = `linear-gradient(${direction}, ${from}, ${to})`;\n return {\n background,\n [_style.LineStrokeColorVar]: background\n };\n};\nexports.handleGradient = handleGradient;\nconst Line = props => {\n const {\n prefixCls,\n direction: directionConfig,\n percent,\n size,\n strokeWidth,\n strokeColor,\n strokeLinecap = 'round',\n children,\n trailColor = null,\n percentPosition,\n success\n } = props;\n const {\n align: infoAlign,\n type: infoPosition\n } = percentPosition;\n const backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor, directionConfig) : {\n [_style.LineStrokeColorVar]: strokeColor,\n background: strokeColor\n };\n const borderRadius = strokeLinecap === 'square' || strokeLinecap === 'butt' ? 0 : undefined;\n const mergedSize = size !== null && size !== void 0 ? size : [-1, strokeWidth || (size === 'small' ? 6 : 8)];\n const [width, height] = (0, _utils.getSize)(mergedSize, 'line', {\n strokeWidth\n });\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Progress');\n warning.deprecated(!('strokeWidth' in props), 'strokeWidth', 'size');\n }\n const trailStyle = {\n backgroundColor: trailColor || undefined,\n borderRadius\n };\n const percentStyle = Object.assign(Object.assign({\n width: `${(0, _utils.validProgress)(percent)}%`,\n height,\n borderRadius\n }, backgroundProps), {\n [_style.Percent]: (0, _utils.validProgress)(percent) / 100\n });\n const successPercent = (0, _utils.getSuccessPercent)(props);\n const successPercentStyle = {\n width: `${(0, _utils.validProgress)(successPercent)}%`,\n height,\n borderRadius,\n backgroundColor: success === null || success === void 0 ? void 0 : success.strokeColor\n };\n const outerStyle = {\n width: width < 0 ? '100%' : width\n };\n const lineInner = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-inner`,\n style: trailStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-bg`, `${prefixCls}-bg-${infoPosition}`),\n style: percentStyle\n }, infoPosition === 'inner' && children), successPercent !== undefined && (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-success-bg`,\n style: successPercentStyle\n })));\n const isOuterStart = infoPosition === 'outer' && infoAlign === 'start';\n const isOuterEnd = infoPosition === 'outer' && infoAlign === 'end';\n return infoPosition === 'outer' && infoAlign === 'center' ? (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-layout-bottom`\n }, lineInner, children)) : (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-outer`,\n style: outerStyle\n }, isOuterStart && children, lineInner, isOuterEnd && children));\n};\nvar _default = exports.default = Line;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _utils = require(\"./utils\");\nconst Steps = props => {\n const {\n size,\n steps,\n percent = 0,\n strokeWidth = 8,\n strokeColor,\n trailColor = null,\n prefixCls,\n children\n } = props;\n const current = Math.round(steps * (percent / 100));\n const stepWidth = size === 'small' ? 2 : 14;\n const mergedSize = size !== null && size !== void 0 ? size : [stepWidth, strokeWidth];\n const [width, height] = (0, _utils.getSize)(mergedSize, 'step', {\n steps,\n strokeWidth\n });\n const unitWidth = width / steps;\n const styledSteps = new Array(steps);\n for (let i = 0; i < steps; i++) {\n const color = Array.isArray(strokeColor) ? strokeColor[i] : strokeColor;\n styledSteps[i] = /*#__PURE__*/React.createElement(\"div\", {\n key: i,\n className: (0, _classnames.default)(`${prefixCls}-steps-item`, {\n [`${prefixCls}-steps-item-active`]: i <= current - 1\n }),\n style: {\n backgroundColor: i <= current - 1 ? color : trailColor,\n width: unitWidth,\n height\n }\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-steps-outer`\n }, styledSteps, children);\n};\nvar _default = exports.default = Steps;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _progress = _interopRequireDefault(require(\"./progress\"));\nvar _default = exports.default = _progress.default;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.ProgressTypes = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CheckCircleFilled\"));\nvar _CheckOutlined = _interopRequireDefault(require(\"@ant-design/icons/CheckOutlined\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _Circle = _interopRequireDefault(require(\"./Circle\"));\nvar _Line = _interopRequireDefault(require(\"./Line\"));\nvar _Steps = _interopRequireDefault(require(\"./Steps\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _utils = require(\"./utils\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst ProgressTypes = exports.ProgressTypes = ['line', 'circle', 'dashboard'];\nconst ProgressStatuses = ['normal', 'exception', 'active', 'success'];\nconst Progress = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n steps,\n strokeColor,\n percent = 0,\n size = 'default',\n showInfo = true,\n type = 'line',\n status,\n format,\n style,\n percentPosition = {}\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"steps\", \"strokeColor\", \"percent\", \"size\", \"showInfo\", \"type\", \"status\", \"format\", \"style\", \"percentPosition\"]);\n const {\n align: infoAlign = 'end',\n type: infoPosition = 'outer'\n } = percentPosition;\n const strokeColorNotArray = Array.isArray(strokeColor) ? strokeColor[0] : strokeColor;\n const strokeColorNotGradient = typeof strokeColor === 'string' || Array.isArray(strokeColor) ? strokeColor : undefined;\n const strokeColorIsBright = React.useMemo(() => {\n if (strokeColorNotArray) {\n const color = typeof strokeColorNotArray === 'string' ? strokeColorNotArray : Object.values(strokeColorNotArray)[0];\n return new _tinycolor.TinyColor(color).isLight();\n }\n return false;\n }, [strokeColor]);\n const percentNumber = React.useMemo(() => {\n var _a, _b;\n const successPercent = (0, _utils.getSuccessPercent)(props);\n return parseInt(successPercent !== undefined ? (_a = successPercent !== null && successPercent !== void 0 ? successPercent : 0) === null || _a === void 0 ? void 0 : _a.toString() : (_b = percent !== null && percent !== void 0 ? percent : 0) === null || _b === void 0 ? void 0 : _b.toString(), 10);\n }, [percent, props.success, props.successPercent]);\n const progressStatus = React.useMemo(() => {\n if (!ProgressStatuses.includes(status) && percentNumber >= 100) {\n return 'success';\n }\n return status || 'normal';\n }, [status, percentNumber]);\n const {\n getPrefixCls,\n direction,\n progress: progressStyle\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('progress', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const isLineType = type === 'line';\n const isPureLineType = isLineType && !steps;\n const progressInfo = React.useMemo(() => {\n if (!showInfo) {\n return null;\n }\n const successPercent = (0, _utils.getSuccessPercent)(props);\n let text;\n const textFormatter = format || (number => `${number}%`);\n const isBrightInnerColor = isLineType && strokeColorIsBright && infoPosition === 'inner';\n if (infoPosition === 'inner' || format || progressStatus !== 'exception' && progressStatus !== 'success') {\n text = textFormatter((0, _utils.validProgress)(percent), (0, _utils.validProgress)(successPercent));\n } else if (progressStatus === 'exception') {\n text = isLineType ? /*#__PURE__*/React.createElement(_CloseCircleFilled.default, null) : /*#__PURE__*/React.createElement(_CloseOutlined.default, null);\n } else if (progressStatus === 'success') {\n text = isLineType ? /*#__PURE__*/React.createElement(_CheckCircleFilled.default, null) : /*#__PURE__*/React.createElement(_CheckOutlined.default, null);\n }\n return /*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(`${prefixCls}-text`, {\n [`${prefixCls}-text-bright`]: isBrightInnerColor,\n [`${prefixCls}-text-${infoAlign}`]: isPureLineType,\n [`${prefixCls}-text-${infoPosition}`]: isPureLineType\n }),\n title: typeof text === 'string' ? text : undefined\n }, text);\n }, [showInfo, percent, percentNumber, progressStatus, type, prefixCls, format]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Progress');\n warning.deprecated(!('successPercent' in props), 'successPercent', 'success.percent');\n warning.deprecated(!('width' in props), 'width', 'size');\n if (type === 'circle' || type === 'dashboard') {\n if (Array.isArray(size)) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', 'Type \"circle\" and \"dashboard\" do not accept array as `size`, please use number or preset size instead.') : void 0;\n } else if (typeof size === 'object') {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', 'Type \"circle\" and \"dashboard\" do not accept object as `size`, please use number or preset size instead.') : void 0;\n }\n }\n if (props.success && 'progress' in props.success) {\n warning.deprecated(false, 'success.progress', 'success.percent');\n }\n }\n let progress;\n // Render progress shape\n if (type === 'line') {\n progress = steps ? (/*#__PURE__*/React.createElement(_Steps.default, Object.assign({}, props, {\n strokeColor: strokeColorNotGradient,\n prefixCls: prefixCls,\n steps: typeof steps === 'object' ? steps.count : steps\n }), progressInfo)) : (/*#__PURE__*/React.createElement(_Line.default, Object.assign({}, props, {\n strokeColor: strokeColorNotArray,\n prefixCls: prefixCls,\n direction: direction,\n percentPosition: {\n align: infoAlign,\n type: infoPosition\n }\n }), progressInfo));\n } else if (type === 'circle' || type === 'dashboard') {\n progress = /*#__PURE__*/React.createElement(_Circle.default, Object.assign({}, props, {\n strokeColor: strokeColorNotArray,\n prefixCls: prefixCls,\n progressStatus: progressStatus\n }), progressInfo);\n }\n const classString = (0, _classnames.default)(prefixCls, `${prefixCls}-status-${progressStatus}`, {\n [`${prefixCls}-${type === 'dashboard' && 'circle' || type}`]: type !== 'line',\n [`${prefixCls}-inline-circle`]: type === 'circle' && (0, _utils.getSize)(size, 'circle')[0] <= 20,\n [`${prefixCls}-line`]: isPureLineType,\n [`${prefixCls}-line-align-${infoAlign}`]: isPureLineType,\n [`${prefixCls}-line-position-${infoPosition}`]: isPureLineType,\n [`${prefixCls}-steps`]: steps,\n [`${prefixCls}-show-info`]: showInfo,\n [`${prefixCls}-${size}`]: typeof size === 'string',\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.className, className, rootClassName, hashId, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({\n ref: ref,\n style: Object.assign(Object.assign({}, progressStyle === null || progressStyle === void 0 ? void 0 : progressStyle.style), style),\n className: classString,\n role: \"progressbar\",\n \"aria-valuenow\": percentNumber,\n \"aria-valuemin\": 0,\n \"aria-valuemax\": 100\n }, (0, _omit.default)(restProps, ['trailColor', 'strokeWidth', 'width', 'gapDegree', 'gapPosition', 'strokeLinecap', 'success', 'successPercent'])), progress));\n});\nif (process.env.NODE_ENV !== 'production') {\n Progress.displayName = 'Progress';\n}\nvar _default = exports.default = Progress;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = exports.Percent = exports.LineStrokeColorVar = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst LineStrokeColorVar = exports.LineStrokeColorVar = '--progress-line-stroke-color';\nconst Percent = exports.Percent = '--progress-percent';\nconst genAntProgressActive = isRtl => {\n const direction = isRtl ? '100%' : '-100%';\n return new _cssinjs.Keyframes(`antProgress${isRtl ? 'RTL' : 'LTR'}Active`, {\n '0%': {\n transform: `translateX(${direction}) scaleX(0)`,\n opacity: 0.1\n },\n '20%': {\n transform: `translateX(${direction}) scaleX(0)`,\n opacity: 0.5\n },\n to: {\n transform: 'translateX(0) scaleX(1)',\n opacity: 0\n }\n });\n};\nconst genBaseStyle = token => {\n const {\n componentCls: progressCls,\n iconCls: iconPrefixCls\n } = token;\n return {\n [progressCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'inline-block',\n '&-rtl': {\n direction: 'rtl'\n },\n '&-line': {\n position: 'relative',\n width: '100%',\n fontSize: token.fontSize\n },\n [`${progressCls}-outer`]: {\n display: 'inline-flex',\n alignItems: 'center',\n width: '100%'\n },\n [`${progressCls}-inner`]: {\n position: 'relative',\n display: 'inline-block',\n width: '100%',\n flex: 1,\n overflow: 'hidden',\n verticalAlign: 'middle',\n backgroundColor: token.remainingColor,\n borderRadius: token.lineBorderRadius\n },\n [`${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {\n [`${progressCls}-circle-path`]: {\n stroke: token.defaultColor\n }\n },\n [`${progressCls}-success-bg, ${progressCls}-bg`]: {\n position: 'relative',\n background: token.defaultColor,\n borderRadius: token.lineBorderRadius,\n transition: `all ${token.motionDurationSlow} ${token.motionEaseInOutCirc}`\n },\n [`${progressCls}-layout-bottom`]: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n [`${progressCls}-text`]: {\n width: 'max-content',\n marginInlineStart: 0,\n marginTop: token.marginXXS\n }\n },\n [`${progressCls}-bg`]: {\n overflow: 'hidden',\n '&::after': {\n content: '\"\"',\n background: {\n _multi_value_: true,\n value: ['inherit', `var(${LineStrokeColorVar})`]\n },\n height: '100%',\n width: `calc(1 / var(${Percent}) * 100%)`,\n display: 'block'\n },\n [`&${progressCls}-bg-inner`]: {\n minWidth: 'max-content',\n '&::after': {\n content: 'none'\n },\n [`${progressCls}-text-inner`]: {\n color: token.colorWhite,\n [`&${progressCls}-text-bright`]: {\n color: 'rgba(0, 0, 0, 0.45)'\n }\n }\n }\n },\n [`${progressCls}-success-bg`]: {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n backgroundColor: token.colorSuccess\n },\n [`${progressCls}-text`]: {\n display: 'inline-block',\n marginInlineStart: token.marginXS,\n color: token.colorText,\n lineHeight: 1,\n width: '2em',\n whiteSpace: 'nowrap',\n textAlign: 'start',\n verticalAlign: 'middle',\n wordBreak: 'normal',\n [iconPrefixCls]: {\n fontSize: token.fontSize\n },\n [`&${progressCls}-text-outer`]: {\n width: 'max-content'\n },\n [`&${progressCls}-text-outer${progressCls}-text-start`]: {\n width: 'max-content',\n marginInlineStart: 0,\n marginInlineEnd: token.marginXS\n }\n },\n [`${progressCls}-text-inner`]: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n marginInlineStart: 0,\n padding: `0 ${(0, _cssinjs.unit)(token.paddingXXS)}`,\n [`&${progressCls}-text-start`]: {\n justifyContent: 'start'\n },\n [`&${progressCls}-text-end`]: {\n justifyContent: 'end'\n }\n },\n [`&${progressCls}-status-active`]: {\n [`${progressCls}-bg::before`]: {\n position: 'absolute',\n inset: 0,\n backgroundColor: token.colorBgContainer,\n borderRadius: token.lineBorderRadius,\n opacity: 0,\n animationName: genAntProgressActive(),\n animationDuration: token.progressActiveMotionDuration,\n animationTimingFunction: token.motionEaseOutQuint,\n animationIterationCount: 'infinite',\n content: '\"\"'\n }\n },\n [`&${progressCls}-rtl${progressCls}-status-active`]: {\n [`${progressCls}-bg::before`]: {\n animationName: genAntProgressActive(true)\n }\n },\n [`&${progressCls}-status-exception`]: {\n [`${progressCls}-bg`]: {\n backgroundColor: token.colorError\n },\n [`${progressCls}-text`]: {\n color: token.colorError\n }\n },\n [`&${progressCls}-status-exception ${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {\n [`${progressCls}-circle-path`]: {\n stroke: token.colorError\n }\n },\n [`&${progressCls}-status-success`]: {\n [`${progressCls}-bg`]: {\n backgroundColor: token.colorSuccess\n },\n [`${progressCls}-text`]: {\n color: token.colorSuccess\n }\n },\n [`&${progressCls}-status-success ${progressCls}-inner:not(${progressCls}-circle-gradient)`]: {\n [`${progressCls}-circle-path`]: {\n stroke: token.colorSuccess\n }\n }\n })\n };\n};\nconst genCircleStyle = token => {\n const {\n componentCls: progressCls,\n iconCls: iconPrefixCls\n } = token;\n return {\n [progressCls]: {\n [`${progressCls}-circle-trail`]: {\n stroke: token.remainingColor\n },\n [`&${progressCls}-circle ${progressCls}-inner`]: {\n position: 'relative',\n lineHeight: 1,\n backgroundColor: 'transparent'\n },\n [`&${progressCls}-circle ${progressCls}-text`]: {\n position: 'absolute',\n insetBlockStart: '50%',\n insetInlineStart: 0,\n width: '100%',\n margin: 0,\n padding: 0,\n color: token.circleTextColor,\n fontSize: token.circleTextFontSize,\n lineHeight: 1,\n whiteSpace: 'normal',\n textAlign: 'center',\n transform: 'translateY(-50%)',\n [iconPrefixCls]: {\n fontSize: token.circleIconFontSize\n }\n },\n [`${progressCls}-circle&-status-exception`]: {\n [`${progressCls}-text`]: {\n color: token.colorError\n }\n },\n [`${progressCls}-circle&-status-success`]: {\n [`${progressCls}-text`]: {\n color: token.colorSuccess\n }\n }\n },\n [`${progressCls}-inline-circle`]: {\n lineHeight: 1,\n [`${progressCls}-inner`]: {\n verticalAlign: 'bottom'\n }\n }\n };\n};\nconst genStepStyle = token => {\n const {\n componentCls: progressCls\n } = token;\n return {\n [progressCls]: {\n [`${progressCls}-steps`]: {\n display: 'inline-block',\n '&-outer': {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center'\n },\n '&-item': {\n flexShrink: 0,\n minWidth: token.progressStepMinWidth,\n marginInlineEnd: token.progressStepMarginInlineEnd,\n backgroundColor: token.remainingColor,\n transition: `all ${token.motionDurationSlow}`,\n '&-active': {\n backgroundColor: token.defaultColor\n }\n }\n }\n }\n };\n};\nconst genSmallLine = token => {\n const {\n componentCls: progressCls,\n iconCls: iconPrefixCls\n } = token;\n return {\n [progressCls]: {\n [`${progressCls}-small&-line, ${progressCls}-small&-line ${progressCls}-text ${iconPrefixCls}`]: {\n fontSize: token.fontSizeSM\n }\n }\n };\n};\nconst prepareComponentToken = token => ({\n circleTextColor: token.colorText,\n defaultColor: token.colorInfo,\n remainingColor: token.colorFillSecondary,\n lineBorderRadius: 100,\n // magic for capsule shape, should be a very large number\n circleTextFontSize: '1em',\n circleIconFontSize: `${token.fontSize / token.fontSizeSM}em`\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Progress', token => {\n const progressStepMarginInlineEnd = token.calc(token.marginXXS).div(2).equal();\n const progressToken = (0, _internal.mergeToken)(token, {\n progressStepMarginInlineEnd,\n progressStepMinWidth: progressStepMarginInlineEnd,\n progressActiveMotionDuration: '2.4s'\n });\n return [genBaseStyle(progressToken), genCircleStyle(progressToken), genStepStyle(progressToken), genSmallLine(progressToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getStrokeColor = exports.getSize = exports.getPercentage = void 0;\nexports.getSuccessPercent = getSuccessPercent;\nexports.validProgress = validProgress;\nvar _colors = require(\"@ant-design/colors\");\nfunction validProgress(progress) {\n if (!progress || progress < 0) {\n return 0;\n }\n if (progress > 100) {\n return 100;\n }\n return progress;\n}\nfunction getSuccessPercent(_ref) {\n let {\n success,\n successPercent\n } = _ref;\n let percent = successPercent;\n /** @deprecated Use `percent` instead */\n if (success && 'progress' in success) {\n percent = success.progress;\n }\n if (success && 'percent' in success) {\n percent = success.percent;\n }\n return percent;\n}\nconst getPercentage = _ref2 => {\n let {\n percent,\n success,\n successPercent\n } = _ref2;\n const realSuccessPercent = validProgress(getSuccessPercent({\n success,\n successPercent\n }));\n return [realSuccessPercent, validProgress(validProgress(percent) - realSuccessPercent)];\n};\nexports.getPercentage = getPercentage;\nconst getStrokeColor = _ref3 => {\n let {\n success = {},\n strokeColor\n } = _ref3;\n const {\n strokeColor: successColor\n } = success;\n return [successColor || _colors.presetPrimaryColors.green, strokeColor || null];\n};\nexports.getStrokeColor = getStrokeColor;\nconst getSize = (size, type, extra) => {\n var _a, _b, _c, _d;\n let width = -1;\n let height = -1;\n if (type === 'step') {\n const steps = extra.steps;\n const strokeWidth = extra.strokeWidth;\n if (typeof size === 'string' || typeof size === 'undefined') {\n width = size === 'small' ? 2 : 14;\n height = strokeWidth !== null && strokeWidth !== void 0 ? strokeWidth : 8;\n } else if (typeof size === 'number') {\n [width, height] = [size, size];\n } else {\n [width = 14, height = 8] = Array.isArray(size) ? size : [size.width, size.height];\n }\n width *= steps;\n } else if (type === 'line') {\n const strokeWidth = extra === null || extra === void 0 ? void 0 : extra.strokeWidth;\n if (typeof size === 'string' || typeof size === 'undefined') {\n height = strokeWidth || (size === 'small' ? 6 : 8);\n } else if (typeof size === 'number') {\n [width, height] = [size, size];\n } else {\n [width = -1, height = 8] = Array.isArray(size) ? size : [size.width, size.height];\n }\n } else if (type === 'circle' || type === 'dashboard') {\n if (typeof size === 'string' || typeof size === 'undefined') {\n [width, height] = size === 'small' ? [60, 60] : [120, 120];\n } else if (typeof size === 'number') {\n [width, height] = [size, size];\n } else if (Array.isArray(size)) {\n width = (_b = (_a = size[0]) !== null && _a !== void 0 ? _a : size[1]) !== null && _b !== void 0 ? _b : 120;\n height = (_d = (_c = size[0]) !== null && _c !== void 0 ? _c : size[1]) !== null && _d !== void 0 ? _d : 120;\n }\n }\n return [width, height];\n};\nexports.getSize = getSize;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = QRcodeStatus;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _icons = require(\"@ant-design/icons\");\nvar _button = _interopRequireDefault(require(\"../button\"));\nvar _spin = _interopRequireDefault(require(\"../spin\"));\nconst defaultSpin = /*#__PURE__*/_react.default.createElement(_spin.default, null);\nfunction QRcodeStatus(_ref) {\n let {\n prefixCls,\n locale,\n onRefresh,\n statusRender,\n status\n } = _ref;\n const defaultExpiredNode = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(\"p\", {\n className: `${prefixCls}-expired`\n }, locale === null || locale === void 0 ? void 0 : locale.expired), onRefresh && (/*#__PURE__*/_react.default.createElement(_button.default, {\n type: \"link\",\n icon: /*#__PURE__*/_react.default.createElement(_icons.ReloadOutlined, null),\n onClick: onRefresh\n }, locale === null || locale === void 0 ? void 0 : locale.refresh)));\n const defaultScannedNode = /*#__PURE__*/_react.default.createElement(\"p\", {\n className: `${prefixCls}-scanned`\n }, locale === null || locale === void 0 ? void 0 : locale.scanned);\n const defaultNodes = {\n expired: defaultExpiredNode,\n loading: defaultSpin,\n scanned: defaultScannedNode\n };\n const defaultStatusRender = info => defaultNodes[info.status];\n const mergedStatusRender = statusRender !== null && statusRender !== void 0 ? statusRender : defaultStatusRender;\n return mergedStatusRender({\n status,\n locale,\n onRefresh\n });\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _qrcode = require(\"@rc-component/qrcode\");\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _locale = require(\"../locale\");\nvar _internal = require(\"../theme/internal\");\nvar _index = _interopRequireDefault(require(\"./style/index\"));\nvar _QrcodeStatus = _interopRequireDefault(require(\"./QrcodeStatus\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst QRCode = props => {\n var _a, _b, _c, _d;\n const [, token] = (0, _internal.useToken)();\n const {\n value,\n type = 'canvas',\n icon = '',\n size = 160,\n iconSize,\n color = token.colorText,\n errorLevel = 'M',\n status = 'active',\n bordered = true,\n onRefresh,\n style,\n className,\n rootClassName,\n prefixCls: customizePrefixCls,\n bgColor = 'transparent',\n statusRender\n } = props,\n rest = __rest(props, [\"value\", \"type\", \"icon\", \"size\", \"iconSize\", \"color\", \"errorLevel\", \"status\", \"bordered\", \"onRefresh\", \"style\", \"className\", \"rootClassName\", \"prefixCls\", \"bgColor\", \"statusRender\"]);\n const {\n getPrefixCls\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('qrcode', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _index.default)(prefixCls);\n const imageSettings = {\n src: icon,\n x: undefined,\n y: undefined,\n height: typeof iconSize === 'number' ? iconSize : (_a = iconSize === null || iconSize === void 0 ? void 0 : iconSize.height) !== null && _a !== void 0 ? _a : 40,\n width: typeof iconSize === 'number' ? iconSize : (_b = iconSize === null || iconSize === void 0 ? void 0 : iconSize.width) !== null && _b !== void 0 ? _b : 40,\n excavate: true,\n crossOrigin: 'anonymous'\n };\n const qrCodeProps = {\n value,\n size,\n level: errorLevel,\n bgColor,\n fgColor: color,\n style: {\n width: style === null || style === void 0 ? void 0 : style.width,\n height: style === null || style === void 0 ? void 0 : style.height\n },\n imageSettings: icon ? imageSettings : undefined\n };\n const [locale] = (0, _locale.useLocale)('QRCode');\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('QRCode');\n process.env.NODE_ENV !== \"production\" ? warning(!!value, 'usage', 'need to receive `value` props') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(icon && errorLevel === 'L'), 'usage', 'ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.') : void 0;\n }\n if (!value) {\n return null;\n }\n const mergedCls = (0, _classnames.default)(prefixCls, className, rootClassName, hashId, cssVarCls, {\n [`${prefixCls}-borderless`]: !bordered\n });\n const mergedStyle = Object.assign(Object.assign({\n backgroundColor: bgColor\n }, style), {\n width: (_c = style === null || style === void 0 ? void 0 : style.width) !== null && _c !== void 0 ? _c : size,\n height: (_d = style === null || style === void 0 ? void 0 : style.height) !== null && _d !== void 0 ? _d : size\n });\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(\"div\", Object.assign({}, rest, {\n className: mergedCls,\n style: mergedStyle\n }), status !== 'active' && (/*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-mask`\n }, /*#__PURE__*/_react.default.createElement(_QrcodeStatus.default, {\n prefixCls: prefixCls,\n locale: locale,\n status: status,\n onRefresh: onRefresh,\n statusRender: statusRender\n }))), type === 'canvas' ? /*#__PURE__*/_react.default.createElement(_qrcode.QRCodeCanvas, Object.assign({}, qrCodeProps)) : /*#__PURE__*/_react.default.createElement(_qrcode.QRCodeSVG, Object.assign({}, qrCodeProps))));\n};\nif (process.env.NODE_ENV !== 'production') {\n QRCode.displayName = 'QRCode';\n}\nvar _default = exports.default = QRCode;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genQRCodeStyle = token => {\n const {\n componentCls,\n lineWidth,\n lineType,\n colorSplit\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: token.paddingSM,\n backgroundColor: token.colorWhite,\n borderRadius: token.borderRadiusLG,\n border: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,\n position: 'relative',\n overflow: 'hidden',\n [`& > ${componentCls}-mask`]: {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n zIndex: 10,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n color: token.colorText,\n lineHeight: token.lineHeight,\n background: token.QRCodeMaskBackgroundColor,\n textAlign: 'center',\n [`& > ${componentCls}-expired, & > ${componentCls}-scanned`]: {\n color: token.QRCodeTextColor\n }\n },\n '> canvas': {\n alignSelf: 'stretch',\n flex: 'auto',\n minWidth: 0\n },\n '&-icon': {\n marginBlockEnd: token.marginXS,\n fontSize: token.controlHeight\n }\n }),\n [`${componentCls}-borderless`]: {\n borderColor: 'transparent',\n padding: 0,\n borderRadius: 0\n }\n };\n};\nconst prepareComponentToken = token => ({\n QRCodeMaskBackgroundColor: new _tinycolor.TinyColor(token.colorBgContainer).setAlpha(0.96).toRgbString()\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('QRCode', token => {\n const mergedToken = (0, _internal.mergeToken)(token, {\n QRCodeTextColor: token.colorText\n });\n return genQRCodeStyle(mergedToken);\n}, prepareComponentToken);","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.RadioOptionTypeContextProvider = exports.RadioOptionTypeContext = exports.RadioGroupContextProvider = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst RadioGroupContext = /*#__PURE__*/React.createContext(null);\nconst RadioGroupContextProvider = exports.RadioGroupContextProvider = RadioGroupContext.Provider;\nvar _default = exports.default = RadioGroupContext;\nconst RadioOptionTypeContext = exports.RadioOptionTypeContext = /*#__PURE__*/React.createContext(null);\nconst RadioOptionTypeContextProvider = exports.RadioOptionTypeContextProvider = RadioOptionTypeContext.Provider;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _pickAttrs = _interopRequireDefault(require(\"rc-util/lib/pickAttrs\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _context = require(\"./context\");\nvar _radio = _interopRequireDefault(require(\"./radio\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst RadioGroup = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n options,\n buttonStyle = 'outline',\n disabled,\n children,\n size: customizeSize,\n style,\n id,\n optionType,\n name,\n defaultValue,\n value: customizedValue,\n block = false,\n onChange,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur\n } = props;\n const [value, setValue] = (0, _useMergedState.default)(defaultValue, {\n value: customizedValue\n });\n const onRadioChange = React.useCallback(event => {\n const lastValue = value;\n const val = event.target.value;\n if (!('value' in props)) {\n setValue(val);\n }\n if (val !== lastValue) {\n onChange === null || onChange === void 0 ? void 0 : onChange(event);\n }\n }, [value, setValue, onChange]);\n const prefixCls = getPrefixCls('radio', customizePrefixCls);\n const groupPrefixCls = `${prefixCls}-group`;\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n let childrenToRender = children;\n // 如果存在 options, 优先使用\n if (options && options.length > 0) {\n childrenToRender = options.map(option => {\n if (typeof option === 'string' || typeof option === 'number') {\n // 此处类型自动推导为 string\n return /*#__PURE__*/React.createElement(_radio.default, {\n key: option.toString(),\n prefixCls: prefixCls,\n disabled: disabled,\n value: option,\n checked: value === option\n }, option);\n }\n // 此处类型自动推导为 { label: string value: string }\n return /*#__PURE__*/React.createElement(_radio.default, {\n key: `radio-group-value-options-${option.value}`,\n prefixCls: prefixCls,\n disabled: option.disabled || disabled,\n value: option.value,\n checked: value === option.value,\n title: option.title,\n style: option.style,\n id: option.id,\n required: option.required\n }, option.label);\n });\n }\n const mergedSize = (0, _useSize.default)(customizeSize);\n const classString = (0, _classnames.default)(groupPrefixCls, `${groupPrefixCls}-${buttonStyle}`, {\n [`${groupPrefixCls}-${mergedSize}`]: mergedSize,\n [`${groupPrefixCls}-rtl`]: direction === 'rtl',\n [`${groupPrefixCls}-block`]: block\n }, className, rootClassName, hashId, cssVarCls, rootCls);\n const memoizedValue = React.useMemo(() => ({\n onChange: onRadioChange,\n value,\n disabled,\n name,\n optionType,\n block\n }), [onRadioChange, value, disabled, name, optionType, block]);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({}, (0, _pickAttrs.default)(props, {\n aria: true,\n data: true\n }), {\n className: classString,\n style: style,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onFocus: onFocus,\n onBlur: onBlur,\n id: id,\n ref: ref\n }), /*#__PURE__*/React.createElement(_context.RadioGroupContextProvider, {\n value: memoizedValue\n }, childrenToRender)));\n});\nvar _default = exports.default = /*#__PURE__*/React.memo(RadioGroup);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Button\", {\n enumerable: true,\n get: function () {\n return _radioButton.default;\n }\n});\nObject.defineProperty(exports, \"Group\", {\n enumerable: true,\n get: function () {\n return _group.default;\n }\n});\nexports.default = void 0;\nvar _group = _interopRequireDefault(require(\"./group\"));\nvar _radio = _interopRequireDefault(require(\"./radio\"));\nvar _radioButton = _interopRequireDefault(require(\"./radioButton\"));\nconst Radio = _radio.default;\nRadio.Button = _radioButton.default;\nRadio.Group = _group.default;\nRadio.__ANT_RADIO = true;\nvar _default = exports.default = Radio;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcCheckbox = _interopRequireDefault(require(\"rc-checkbox\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _warning = require(\"../_util/warning\");\nvar _wave = _interopRequireDefault(require(\"../_util/wave\"));\nvar _interface = require(\"../_util/wave/interface\");\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _context = require(\"../form/context\");\nvar _context2 = _interopRequireWildcard(require(\"./context\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalRadio = (props, ref) => {\n var _a, _b;\n const groupContext = React.useContext(_context2.default);\n const radioOptionTypeContext = React.useContext(_context2.RadioOptionTypeContext);\n const {\n getPrefixCls,\n direction,\n radio\n } = React.useContext(_configProvider.ConfigContext);\n const innerRef = React.useRef(null);\n const mergedRef = (0, _ref.composeRef)(ref, innerRef);\n const {\n isFormItemInput\n } = React.useContext(_context.FormItemInputContext);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Radio');\n process.env.NODE_ENV !== \"production\" ? warning(!('optionType' in props), 'usage', '`optionType` is only support in Radio.Group.') : void 0;\n }\n const onChange = e => {\n var _a, _b;\n (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, e);\n (_b = groupContext === null || groupContext === void 0 ? void 0 : groupContext.onChange) === null || _b === void 0 ? void 0 : _b.call(groupContext, e);\n };\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children,\n style,\n title\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"children\", \"style\", \"title\"]);\n const radioPrefixCls = getPrefixCls('radio', customizePrefixCls);\n const isButtonType = ((groupContext === null || groupContext === void 0 ? void 0 : groupContext.optionType) || radioOptionTypeContext) === 'button';\n const prefixCls = isButtonType ? `${radioPrefixCls}-button` : radioPrefixCls;\n // Style\n const rootCls = (0, _useCSSVarCls.default)(radioPrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(radioPrefixCls, rootCls);\n const radioProps = Object.assign({}, restProps);\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n if (groupContext) {\n radioProps.name = groupContext.name;\n radioProps.onChange = onChange;\n radioProps.checked = props.value === groupContext.value;\n radioProps.disabled = (_a = radioProps.disabled) !== null && _a !== void 0 ? _a : groupContext.disabled;\n }\n radioProps.disabled = (_b = radioProps.disabled) !== null && _b !== void 0 ? _b : disabled;\n const wrapperClassString = (0, _classnames.default)(`${prefixCls}-wrapper`, {\n [`${prefixCls}-wrapper-checked`]: radioProps.checked,\n [`${prefixCls}-wrapper-disabled`]: radioProps.disabled,\n [`${prefixCls}-wrapper-rtl`]: direction === 'rtl',\n [`${prefixCls}-wrapper-in-form-item`]: isFormItemInput,\n [`${prefixCls}-wrapper-block`]: !!(groupContext === null || groupContext === void 0 ? void 0 : groupContext.block)\n }, radio === null || radio === void 0 ? void 0 : radio.className, className, rootClassName, hashId, cssVarCls, rootCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_wave.default, {\n component: \"Radio\",\n disabled: radioProps.disabled\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: wrapperClassString,\n style: Object.assign(Object.assign({}, radio === null || radio === void 0 ? void 0 : radio.style), style),\n onMouseEnter: props.onMouseEnter,\n onMouseLeave: props.onMouseLeave,\n title: title\n }, /*#__PURE__*/React.createElement(_rcCheckbox.default, Object.assign({}, radioProps, {\n className: (0, _classnames.default)(radioProps.className, {\n [_interface.TARGET_CLS]: !isButtonType\n }),\n type: \"radio\",\n prefixCls: prefixCls,\n ref: mergedRef\n })), children !== undefined ? /*#__PURE__*/React.createElement(\"span\", null, children) : null)));\n};\nconst Radio = /*#__PURE__*/React.forwardRef(InternalRadio);\nif (process.env.NODE_ENV !== 'production') {\n Radio.displayName = 'Radio';\n}\nvar _default = exports.default = Radio;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _configProvider = require(\"../config-provider\");\nvar _context = require(\"./context\");\nvar _radio = _interopRequireDefault(require(\"./radio\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst RadioButton = (props, ref) => {\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls\n } = props,\n radioProps = __rest(props, [\"prefixCls\"]);\n const prefixCls = getPrefixCls('radio', customizePrefixCls);\n return /*#__PURE__*/React.createElement(_context.RadioOptionTypeContextProvider, {\n value: \"button\"\n }, /*#__PURE__*/React.createElement(_radio.default, Object.assign({\n prefixCls: prefixCls\n }, radioProps, {\n type: \"radio\",\n ref: ref\n })));\n};\nvar _default = exports.default = /*#__PURE__*/React.forwardRef(RadioButton);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Styles ==============================\n// styles from RadioGroup only\nconst getGroupRadioStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n const groupPrefixCls = `${componentCls}-group`;\n return {\n [groupPrefixCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'inline-block',\n fontSize: 0,\n // RTL\n [`&${groupPrefixCls}-rtl`]: {\n direction: 'rtl'\n },\n [`&${groupPrefixCls}-block`]: {\n display: 'flex'\n },\n [`${antCls}-badge ${antCls}-badge-count`]: {\n zIndex: 1\n },\n [`> ${antCls}-badge:not(:first-child) > ${antCls}-button-wrapper`]: {\n borderInlineStart: 'none'\n }\n })\n };\n};\n// Styles from radio-wrapper\nconst getRadioBasicStyle = token => {\n const {\n componentCls,\n wrapperMarginInlineEnd,\n colorPrimary,\n radioSize,\n motionDurationSlow,\n motionDurationMid,\n motionEaseInOutCirc,\n colorBgContainer,\n colorBorder,\n lineWidth,\n colorBgContainerDisabled,\n colorTextDisabled,\n paddingXS,\n dotColorDisabled,\n lineType,\n radioColor,\n radioBgColor,\n calc\n } = token;\n const radioInnerPrefixCls = `${componentCls}-inner`;\n const dotPadding = 4;\n const radioDotDisabledSize = calc(radioSize).sub(calc(dotPadding).mul(2));\n const radioSizeCalc = calc(1).mul(radioSize).equal({\n unit: true\n });\n return {\n [`${componentCls}-wrapper`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'inline-flex',\n alignItems: 'baseline',\n marginInlineStart: 0,\n marginInlineEnd: wrapperMarginInlineEnd,\n cursor: 'pointer',\n // RTL\n [`&${componentCls}-wrapper-rtl`]: {\n direction: 'rtl'\n },\n '&-disabled': {\n cursor: 'not-allowed',\n color: token.colorTextDisabled\n },\n '&::after': {\n display: 'inline-block',\n width: 0,\n overflow: 'hidden',\n content: '\"\\\\a0\"'\n },\n '&-block': {\n flex: 1,\n justifyContent: 'center'\n },\n // hashId 在 wrapper 上,只能铺平\n [`${componentCls}-checked::after`]: {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n width: '100%',\n height: '100%',\n border: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorPrimary}`,\n borderRadius: '50%',\n visibility: 'hidden',\n opacity: 0,\n content: '\"\"'\n },\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n display: 'inline-block',\n outline: 'none',\n cursor: 'pointer',\n alignSelf: 'center',\n borderRadius: '50%'\n }),\n [`${componentCls}-wrapper:hover &,\n &:hover ${radioInnerPrefixCls}`]: {\n borderColor: colorPrimary\n },\n [`${componentCls}-input:focus-visible + ${radioInnerPrefixCls}`]: Object.assign({}, (0, _style.genFocusOutline)(token)),\n [`${componentCls}:hover::after, ${componentCls}-wrapper:hover &::after`]: {\n visibility: 'visible'\n },\n [`${componentCls}-inner`]: {\n '&::after': {\n boxSizing: 'border-box',\n position: 'absolute',\n insetBlockStart: '50%',\n insetInlineStart: '50%',\n display: 'block',\n width: radioSizeCalc,\n height: radioSizeCalc,\n marginBlockStart: calc(1).mul(radioSize).div(-2).equal({\n unit: true\n }),\n marginInlineStart: calc(1).mul(radioSize).div(-2).equal({\n unit: true\n }),\n backgroundColor: radioColor,\n borderBlockStart: 0,\n borderInlineStart: 0,\n borderRadius: radioSizeCalc,\n transform: 'scale(0)',\n opacity: 0,\n transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`,\n content: '\"\"'\n },\n boxSizing: 'border-box',\n position: 'relative',\n insetBlockStart: 0,\n insetInlineStart: 0,\n display: 'block',\n width: radioSizeCalc,\n height: radioSizeCalc,\n backgroundColor: colorBgContainer,\n borderColor: colorBorder,\n borderStyle: 'solid',\n borderWidth: lineWidth,\n borderRadius: '50%',\n transition: `all ${motionDurationMid}`\n },\n [`${componentCls}-input`]: {\n position: 'absolute',\n inset: 0,\n zIndex: 1,\n cursor: 'pointer',\n opacity: 0\n },\n // 选中状态\n [`${componentCls}-checked`]: {\n [radioInnerPrefixCls]: {\n borderColor: colorPrimary,\n backgroundColor: radioBgColor,\n '&::after': {\n transform: `scale(${token.calc(token.dotSize).div(radioSize).equal()})`,\n opacity: 1,\n transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`\n }\n }\n },\n [`${componentCls}-disabled`]: {\n cursor: 'not-allowed',\n [radioInnerPrefixCls]: {\n backgroundColor: colorBgContainerDisabled,\n borderColor: colorBorder,\n cursor: 'not-allowed',\n '&::after': {\n backgroundColor: dotColorDisabled\n }\n },\n [`${componentCls}-input`]: {\n cursor: 'not-allowed'\n },\n [`${componentCls}-disabled + span`]: {\n color: colorTextDisabled,\n cursor: 'not-allowed'\n },\n [`&${componentCls}-checked`]: {\n [radioInnerPrefixCls]: {\n '&::after': {\n transform: `scale(${calc(radioDotDisabledSize).div(radioSize).equal()})`\n }\n }\n }\n },\n [`span${componentCls} + *`]: {\n paddingInlineStart: paddingXS,\n paddingInlineEnd: paddingXS\n }\n })\n };\n};\n// Styles from radio-button\nconst getRadioButtonStyle = token => {\n const {\n buttonColor,\n controlHeight,\n componentCls,\n lineWidth,\n lineType,\n colorBorder,\n motionDurationSlow,\n motionDurationMid,\n buttonPaddingInline,\n fontSize,\n buttonBg,\n fontSizeLG,\n controlHeightLG,\n controlHeightSM,\n paddingXS,\n borderRadius,\n borderRadiusSM,\n borderRadiusLG,\n buttonCheckedBg,\n buttonSolidCheckedColor,\n colorTextDisabled,\n colorBgContainerDisabled,\n buttonCheckedBgDisabled,\n buttonCheckedColorDisabled,\n colorPrimary,\n colorPrimaryHover,\n colorPrimaryActive,\n buttonSolidCheckedBg,\n buttonSolidCheckedHoverBg,\n buttonSolidCheckedActiveBg,\n calc\n } = token;\n return {\n [`${componentCls}-button-wrapper`]: {\n position: 'relative',\n display: 'inline-block',\n height: controlHeight,\n margin: 0,\n paddingInline: buttonPaddingInline,\n paddingBlock: 0,\n color: buttonColor,\n fontSize,\n lineHeight: (0, _cssinjs.unit)(calc(controlHeight).sub(calc(lineWidth).mul(2)).equal()),\n background: buttonBg,\n border: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorBorder}`,\n // strange align fix for chrome but works\n // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif\n borderBlockStartWidth: calc(lineWidth).add(0.02).equal(),\n borderInlineStartWidth: 0,\n borderInlineEndWidth: lineWidth,\n cursor: 'pointer',\n transition: [`color ${motionDurationMid}`, `background ${motionDurationMid}`, `box-shadow ${motionDurationMid}`].join(','),\n a: {\n color: buttonColor\n },\n [`> ${componentCls}-button`]: {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n zIndex: -1,\n width: '100%',\n height: '100%'\n },\n '&:not(:first-child)': {\n '&::before': {\n position: 'absolute',\n insetBlockStart: calc(lineWidth).mul(-1).equal(),\n insetInlineStart: calc(lineWidth).mul(-1).equal(),\n display: 'block',\n boxSizing: 'content-box',\n width: 1,\n height: '100%',\n paddingBlock: lineWidth,\n paddingInline: 0,\n backgroundColor: colorBorder,\n transition: `background-color ${motionDurationSlow}`,\n content: '\"\"'\n }\n },\n '&:first-child': {\n borderInlineStart: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorBorder}`,\n borderStartStartRadius: borderRadius,\n borderEndStartRadius: borderRadius\n },\n '&:last-child': {\n borderStartEndRadius: borderRadius,\n borderEndEndRadius: borderRadius\n },\n '&:first-child:last-child': {\n borderRadius\n },\n [`${componentCls}-group-large &`]: {\n height: controlHeightLG,\n fontSize: fontSizeLG,\n lineHeight: (0, _cssinjs.unit)(calc(controlHeightLG).sub(calc(lineWidth).mul(2)).equal()),\n '&:first-child': {\n borderStartStartRadius: borderRadiusLG,\n borderEndStartRadius: borderRadiusLG\n },\n '&:last-child': {\n borderStartEndRadius: borderRadiusLG,\n borderEndEndRadius: borderRadiusLG\n }\n },\n [`${componentCls}-group-small &`]: {\n height: controlHeightSM,\n paddingInline: calc(paddingXS).sub(lineWidth).equal(),\n paddingBlock: 0,\n lineHeight: (0, _cssinjs.unit)(calc(controlHeightSM).sub(calc(lineWidth).mul(2)).equal()),\n '&:first-child': {\n borderStartStartRadius: borderRadiusSM,\n borderEndStartRadius: borderRadiusSM\n },\n '&:last-child': {\n borderStartEndRadius: borderRadiusSM,\n borderEndEndRadius: borderRadiusSM\n }\n },\n '&:hover': {\n position: 'relative',\n color: colorPrimary\n },\n '&:has(:focus-visible)': Object.assign({}, (0, _style.genFocusOutline)(token)),\n [`${componentCls}-inner, input[type='checkbox'], input[type='radio']`]: {\n width: 0,\n height: 0,\n opacity: 0,\n pointerEvents: 'none'\n },\n [`&-checked:not(${componentCls}-button-wrapper-disabled)`]: {\n zIndex: 1,\n color: colorPrimary,\n background: buttonCheckedBg,\n borderColor: colorPrimary,\n '&::before': {\n backgroundColor: colorPrimary\n },\n '&:first-child': {\n borderColor: colorPrimary\n },\n '&:hover': {\n color: colorPrimaryHover,\n borderColor: colorPrimaryHover,\n '&::before': {\n backgroundColor: colorPrimaryHover\n }\n },\n '&:active': {\n color: colorPrimaryActive,\n borderColor: colorPrimaryActive,\n '&::before': {\n backgroundColor: colorPrimaryActive\n }\n }\n },\n [`${componentCls}-group-solid &-checked:not(${componentCls}-button-wrapper-disabled)`]: {\n color: buttonSolidCheckedColor,\n background: buttonSolidCheckedBg,\n borderColor: buttonSolidCheckedBg,\n '&:hover': {\n color: buttonSolidCheckedColor,\n background: buttonSolidCheckedHoverBg,\n borderColor: buttonSolidCheckedHoverBg\n },\n '&:active': {\n color: buttonSolidCheckedColor,\n background: buttonSolidCheckedActiveBg,\n borderColor: buttonSolidCheckedActiveBg\n }\n },\n '&-disabled': {\n color: colorTextDisabled,\n backgroundColor: colorBgContainerDisabled,\n borderColor: colorBorder,\n cursor: 'not-allowed',\n '&:first-child, &:hover': {\n color: colorTextDisabled,\n backgroundColor: colorBgContainerDisabled,\n borderColor: colorBorder\n }\n },\n [`&-disabled${componentCls}-button-wrapper-checked`]: {\n color: buttonCheckedColorDisabled,\n backgroundColor: buttonCheckedBgDisabled,\n borderColor: colorBorder,\n boxShadow: 'none'\n },\n '&-block': {\n flex: 1,\n textAlign: 'center'\n }\n }\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => {\n const {\n wireframe,\n padding,\n marginXS,\n lineWidth,\n fontSizeLG,\n colorText,\n colorBgContainer,\n colorTextDisabled,\n controlItemBgActiveDisabled,\n colorTextLightSolid,\n colorPrimary,\n colorPrimaryHover,\n colorPrimaryActive,\n colorWhite\n } = token;\n const dotPadding = 4; // Fixed value\n const radioSize = fontSizeLG;\n const radioDotSize = wireframe ? radioSize - dotPadding * 2 : radioSize - (dotPadding + lineWidth) * 2;\n return {\n // Radio\n radioSize,\n dotSize: radioDotSize,\n dotColorDisabled: colorTextDisabled,\n // Radio buttons\n buttonSolidCheckedColor: colorTextLightSolid,\n buttonSolidCheckedBg: colorPrimary,\n buttonSolidCheckedHoverBg: colorPrimaryHover,\n buttonSolidCheckedActiveBg: colorPrimaryActive,\n buttonBg: colorBgContainer,\n buttonCheckedBg: colorBgContainer,\n buttonColor: colorText,\n buttonCheckedBgDisabled: controlItemBgActiveDisabled,\n buttonCheckedColorDisabled: colorTextDisabled,\n buttonPaddingInline: padding - lineWidth,\n wrapperMarginInlineEnd: marginXS,\n // internal\n radioColor: wireframe ? colorPrimary : colorWhite,\n radioBgColor: wireframe ? colorBgContainer : colorPrimary\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Radio', token => {\n const {\n controlOutline,\n controlOutlineWidth\n } = token;\n const radioFocusShadow = `0 0 0 ${(0, _cssinjs.unit)(controlOutlineWidth)} ${controlOutline}`;\n const radioButtonFocusShadow = radioFocusShadow;\n const radioToken = (0, _internal.mergeToken)(token, {\n radioFocusShadow,\n radioButtonFocusShadow\n });\n return [getGroupRadioStyle(radioToken), getRadioBasicStyle(radioToken), getRadioButtonStyle(radioToken)];\n}, prepareComponentToken, {\n unitless: {\n radioSize: true,\n dotSize: true\n }\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _StarFilled = _interopRequireDefault(require(\"@ant-design/icons/StarFilled\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcRate = _interopRequireDefault(require(\"rc-rate\"));\nvar _configProvider = require(\"../config-provider\");\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Rate = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls,\n className,\n rootClassName,\n style,\n tooltips,\n character = /*#__PURE__*/React.createElement(_StarFilled.default, null),\n disabled: customDisabled\n } = props,\n rest = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"tooltips\", \"character\", \"disabled\"]);\n const characterRender = (node, _ref) => {\n let {\n index\n } = _ref;\n if (!tooltips) {\n return node;\n }\n return /*#__PURE__*/React.createElement(_tooltip.default, {\n title: tooltips[index]\n }, node);\n };\n const {\n getPrefixCls,\n direction,\n rate\n } = React.useContext(_configProvider.ConfigContext);\n const ratePrefixCls = getPrefixCls('rate', prefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(ratePrefixCls);\n const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcRate.default, Object.assign({\n ref: ref,\n character: character,\n characterRender: characterRender,\n disabled: mergedDisabled\n }, rest, {\n className: (0, _classnames.default)(className, rootClassName, hashId, cssVarCls, rate === null || rate === void 0 ? void 0 : rate.className),\n style: mergedStyle,\n prefixCls: ratePrefixCls,\n direction: direction\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Rate.displayName = 'Rate';\n}\nvar _default = exports.default = Rate;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genRateStarStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-star`]: {\n position: 'relative',\n display: 'inline-block',\n color: 'inherit',\n cursor: 'pointer',\n '&:not(:last-child)': {\n marginInlineEnd: token.marginXS\n },\n '> div': {\n transition: `all ${token.motionDurationMid}, outline 0s`,\n '&:hover': {\n transform: token.starHoverScale\n },\n '&:focus': {\n outline: 0\n },\n '&:focus-visible': {\n outline: `${(0, _cssinjs.unit)(token.lineWidth)} dashed ${token.starColor}`,\n transform: token.starHoverScale\n }\n },\n '&-first, &-second': {\n color: token.starBg,\n transition: `all ${token.motionDurationMid}`,\n userSelect: 'none'\n },\n '&-first': {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n width: '50%',\n height: '100%',\n overflow: 'hidden',\n opacity: 0\n },\n [`&-half ${componentCls}-star-first, &-half ${componentCls}-star-second`]: {\n opacity: 1\n },\n [`&-half ${componentCls}-star-first, &-full ${componentCls}-star-second`]: {\n color: 'inherit'\n }\n }\n };\n};\nconst genRateRtlStyle = token => ({\n [`&-rtl${token.componentCls}`]: {\n direction: 'rtl'\n }\n});\nconst genRateStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'inline-block',\n margin: 0,\n padding: 0,\n color: token.starColor,\n fontSize: token.starSize,\n lineHeight: 1,\n listStyle: 'none',\n outline: 'none',\n // disable styles\n [`&-disabled${componentCls} ${componentCls}-star`]: {\n cursor: 'default',\n '> div:hover': {\n transform: 'scale(1)'\n }\n }\n }), genRateStarStyle(token)), genRateRtlStyle(token))\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => ({\n starColor: token.yellow6,\n starSize: token.controlHeightLG * 0.5,\n starHoverScale: 'scale(1.1)',\n starBg: token.colorFillContent\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Rate', token => {\n const rateToken = (0, _internal.mergeToken)(token, {});\n return [genRateStyle(rateToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.IconMap = exports.ExceptionMap = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CheckCircleFilled\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nvar _ExclamationCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/ExclamationCircleFilled\"));\nvar _WarningFilled = _interopRequireDefault(require(\"@ant-design/icons/WarningFilled\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _noFound = _interopRequireDefault(require(\"./noFound\"));\nvar _serverError = _interopRequireDefault(require(\"./serverError\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _unauthorized = _interopRequireDefault(require(\"./unauthorized\"));\nconst IconMap = exports.IconMap = {\n success: _CheckCircleFilled.default,\n error: _CloseCircleFilled.default,\n info: _ExclamationCircleFilled.default,\n warning: _WarningFilled.default\n};\nconst ExceptionMap = exports.ExceptionMap = {\n '404': _noFound.default,\n '500': _serverError.default,\n '403': _unauthorized.default\n};\n// ExceptionImageMap keys\nconst ExceptionStatus = Object.keys(ExceptionMap);\nconst Icon = _ref => {\n let {\n prefixCls,\n icon,\n status\n } = _ref;\n const className = (0, _classnames.default)(`${prefixCls}-icon`);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Result');\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\\`icon\\` is using ReactNode instead of string naming in v4. Please check \\`${icon}\\` at https://ant.design/components/icon`) : void 0;\n }\n if (ExceptionStatus.includes(`${status}`)) {\n const SVGComponent = ExceptionMap[status];\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${className} ${prefixCls}-image`\n }, /*#__PURE__*/React.createElement(SVGComponent, null));\n }\n const iconNode = /*#__PURE__*/React.createElement(IconMap[status]);\n if (icon === null || icon === false) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className\n }, icon || iconNode);\n};\nconst Extra = _ref2 => {\n let {\n prefixCls,\n extra\n } = _ref2;\n if (!extra) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-extra`\n }, extra);\n};\nconst Result = _ref3 => {\n let {\n prefixCls: customizePrefixCls,\n className: customizeClassName,\n rootClassName,\n subTitle,\n title,\n style,\n children,\n status = 'info',\n icon,\n extra\n } = _ref3;\n const {\n getPrefixCls,\n direction,\n result\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('result', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const className = (0, _classnames.default)(prefixCls, `${prefixCls}-${status}`, customizeClassName, result === null || result === void 0 ? void 0 : result.className, rootClassName, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.style), style);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: className,\n style: mergedStyle\n }, /*#__PURE__*/React.createElement(Icon, {\n prefixCls: prefixCls,\n status: status,\n icon: icon\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title), subTitle && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-subtitle`\n }, subTitle), /*#__PURE__*/React.createElement(Extra, {\n prefixCls: prefixCls,\n extra: extra\n }), children && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-content`\n }, children)));\n};\nResult.PRESENTED_IMAGE_403 = ExceptionMap['403'];\nResult.PRESENTED_IMAGE_404 = ExceptionMap['404'];\nResult.PRESENTED_IMAGE_500 = ExceptionMap['500'];\nif (process.env.NODE_ENV !== 'production') {\n Result.displayName = 'Result';\n}\nvar _default = exports.default = Result;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst NoFound = () => (/*#__PURE__*/React.createElement(\"svg\", {\n width: \"252\",\n height: \"294\"\n}, /*#__PURE__*/React.createElement(\"title\", null, \"No Found\"), /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 .387h251.772v251.772H0z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .012)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n fill: \"#fff\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321\",\n fill: \"#E4EBF7\",\n mask: \"url(#b)\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788\",\n stroke: \"#FFF\",\n strokeWidth: \"2\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011\",\n stroke: \"#FFF\",\n strokeWidth: \"2\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z\",\n stroke: \"#FFF\",\n strokeWidth: \"2\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#FFF\",\n strokeWidth: \"2\",\n d: \"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48\",\n fill: \"#1677ff\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88\",\n fill: \"#FFB594\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573\",\n fill: \"#CBD1D1\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z\",\n fill: \"#2B0849\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558\",\n fill: \"#A4AABA\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z\",\n fill: \"#CBD1D1\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062\",\n fill: \"#2B0849\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15\",\n fill: \"#A4AABA\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165\",\n fill: \"#7BB2F9\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M107.275 222.1s2.773-1.11 6.102-3.884\",\n stroke: \"#648BD8\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038\",\n fill: \"#192064\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642\",\n fill: \"#192064\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z\",\n fill: \"#520038\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254\",\n fill: \"#552950\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#DB836E\",\n strokeWidth: \"1.118\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M110.13 74.84l-.896 1.61-.298 4.357h-2.228\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M110.846 74.481s1.79-.716 2.506.537\",\n stroke: \"#5C2552\",\n strokeWidth: \"1.118\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.118\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M103.287 72.93s1.83 1.113 4.137.954\",\n stroke: \"#5C2552\",\n strokeWidth: \"1.118\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.118\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.101\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M129.405 122.865s-5.272 7.403-9.422 10.768\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M119.306 107.329s.452 4.366-2.127 32.062\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.101\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01\",\n fill: \"#F2D7AD\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92\",\n fill: \"#F4D19D\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z\",\n fill: \"#F2D7AD\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#CC9B6E\",\n d: \"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83\",\n fill: \"#F4D19D\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#CC9B6E\",\n d: \"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#CC9B6E\",\n d: \"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647\",\n fill: \"#5BA02E\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647\",\n fill: \"#92C110\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187\",\n fill: \"#F2D7AD\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M88.979 89.48s7.776 5.384 16.6 2.842\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.101\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}))));\nvar _default = exports.default = NoFound;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst ServerError = () => (/*#__PURE__*/React.createElement(\"svg\", {\n width: \"254\",\n height: \"294\"\n}, /*#__PURE__*/React.createElement(\"title\", null, \"Server Error\"), /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 .335h253.49v253.49H0z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 293.665h253.49V.401H0z\"\n})), /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0 .067)\"\n}, /*#__PURE__*/React.createElement(\"mask\", {\n fill: \"#fff\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134\",\n fill: \"#E4EBF7\",\n mask: \"url(#b)\"\n})), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861\",\n stroke: \"#FFF\",\n strokeWidth: \"2\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68\",\n fill: \"#FF603B\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487\",\n fill: \"#FFB594\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246\",\n fill: \"#FFB594\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z\",\n fill: \"#520038\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26\",\n fill: \"#552950\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#DB836E\",\n strokeWidth: \"1.063\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M99.206 73.644l-.9 1.62-.3 4.38h-2.24\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M99.926 73.284s1.8-.72 2.52.54\",\n stroke: \"#5C2552\",\n strokeWidth: \"1.117\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.117\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M92.326 71.724s1.84 1.12 4.16.96\",\n stroke: \"#5C2552\",\n strokeWidth: \"1.117\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.063\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.136\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.085\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47\",\n fill: \"#CBD1D1\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z\",\n fill: \"#2B0849\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671\",\n fill: \"#A4AABA\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z\",\n fill: \"#CBD1D1\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162\",\n fill: \"#2B0849\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156\",\n fill: \"#A4AABA\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69\",\n fill: \"#7BB2F9\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.085\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M96.973 219.373s2.882-1.153 6.34-4.034\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.032\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.085\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62\",\n fill: \"#192064\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668\",\n fill: \"#192064\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.085\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.085\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593\",\n stroke: \"#DB836E\",\n strokeWidth: \".774\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762\",\n stroke: \"#E59788\",\n strokeWidth: \".774\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12\",\n stroke: \"#E59788\",\n strokeWidth: \".774\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M109.278 112.533s3.38-3.613 7.575-4.662\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.085\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M107.375 123.006s9.697-2.745 11.445-.88\",\n stroke: \"#E59788\",\n strokeWidth: \".774\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955\",\n stroke: \"#BFCDDD\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01\",\n fill: \"#A3B4C6\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813\",\n fill: \"#A3B4C6\"\n}), /*#__PURE__*/React.createElement(\"mask\", {\n fill: \"#fff\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#A3B4C6\",\n mask: \"url(#d)\",\n d: \"M154.098 190.096h70.513v-84.617h-70.513z\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208\",\n fill: \"#BFCDDD\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802\",\n fill: \"#FFF\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209\",\n fill: \"#BFCDDD\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751\",\n stroke: \"#7C90A5\",\n strokeWidth: \"1.124\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802\",\n fill: \"#FFF\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407\",\n fill: \"#BFCDDD\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M177.259 207.217v11.52M201.05 207.217v11.52\",\n stroke: \"#A3B4C6\",\n strokeWidth: \"1.124\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422\",\n fill: \"#5BA02E\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423\",\n fill: \"#92C110\",\n mask: \"url(#d)\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209\",\n fill: \"#F2D7AD\",\n mask: \"url(#d)\"\n}))));\nvar _default = exports.default = ServerError;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Styles ==============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n lineHeightHeading3,\n iconCls,\n padding,\n paddingXL,\n paddingXS,\n paddingLG,\n marginXS,\n lineHeight\n } = token;\n return {\n // Result\n [componentCls]: {\n padding: `${(0, _cssinjs.unit)(token.calc(paddingLG).mul(2).equal())} ${(0, _cssinjs.unit)(paddingXL)}`,\n // RTL\n '&-rtl': {\n direction: 'rtl'\n }\n },\n // Exception Status image\n [`${componentCls} ${componentCls}-image`]: {\n width: token.imageWidth,\n height: token.imageHeight,\n margin: 'auto'\n },\n [`${componentCls} ${componentCls}-icon`]: {\n marginBottom: paddingLG,\n textAlign: 'center',\n [`& > ${iconCls}`]: {\n fontSize: token.iconFontSize\n }\n },\n [`${componentCls} ${componentCls}-title`]: {\n color: token.colorTextHeading,\n fontSize: token.titleFontSize,\n lineHeight: lineHeightHeading3,\n marginBlock: marginXS,\n textAlign: 'center'\n },\n [`${componentCls} ${componentCls}-subtitle`]: {\n color: token.colorTextDescription,\n fontSize: token.subtitleFontSize,\n lineHeight,\n textAlign: 'center'\n },\n [`${componentCls} ${componentCls}-content`]: {\n marginTop: paddingLG,\n padding: `${(0, _cssinjs.unit)(paddingLG)} ${(0, _cssinjs.unit)(token.calc(padding).mul(2.5).equal())}`,\n backgroundColor: token.colorFillAlter\n },\n [`${componentCls} ${componentCls}-extra`]: {\n margin: token.extraMargin,\n textAlign: 'center',\n '& > *': {\n marginInlineEnd: paddingXS,\n '&:last-child': {\n marginInlineEnd: 0\n }\n }\n }\n };\n};\nconst genStatusIconStyle = token => {\n const {\n componentCls,\n iconCls\n } = token;\n return {\n [`${componentCls}-success ${componentCls}-icon > ${iconCls}`]: {\n color: token.resultSuccessIconColor\n },\n [`${componentCls}-error ${componentCls}-icon > ${iconCls}`]: {\n color: token.resultErrorIconColor\n },\n [`${componentCls}-info ${componentCls}-icon > ${iconCls}`]: {\n color: token.resultInfoIconColor\n },\n [`${componentCls}-warning ${componentCls}-icon > ${iconCls}`]: {\n color: token.resultWarningIconColor\n }\n };\n};\nconst genResultStyle = token => [genBaseStyle(token), genStatusIconStyle(token)];\nconst getStyle = token => genResultStyle(token);\n// ============================== Export ==============================\nconst prepareComponentToken = token => ({\n titleFontSize: token.fontSizeHeading3,\n subtitleFontSize: token.fontSize,\n iconFontSize: token.fontSizeHeading3 * 3,\n extraMargin: `${token.paddingLG}px 0 0 0`\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Result', token => {\n const resultInfoIconColor = token.colorInfo;\n const resultErrorIconColor = token.colorError;\n const resultSuccessIconColor = token.colorSuccess;\n const resultWarningIconColor = token.colorWarning;\n const resultToken = (0, _internal.mergeToken)(token, {\n resultInfoIconColor,\n resultErrorIconColor,\n resultSuccessIconColor,\n resultWarningIconColor,\n imageWidth: 250,\n imageHeight: 295\n });\n return [getStyle(resultToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst Unauthorized = () => (/*#__PURE__*/React.createElement(\"svg\", {\n width: \"251\",\n height: \"294\"\n}, /*#__PURE__*/React.createElement(\"title\", null, \"Unauthorized\"), /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023\",\n fill: \"#E4EBF7\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73\",\n stroke: \"#FFF\",\n strokeWidth: \"2\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36\",\n stroke: \"#FFF\",\n strokeWidth: \"2\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z\",\n stroke: \"#FFF\",\n strokeWidth: \"2\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#FFF\",\n strokeWidth: \"2\",\n d: \"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321\",\n fill: \"#A26EF4\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61\",\n fill: \"#5BA02E\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611\",\n fill: \"#92C110\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17\",\n fill: \"#F2D7AD\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367\",\n fill: \"#FFB594\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M78.18 94.656s.911 7.41-4.914 13.078\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437\",\n stroke: \"#E4EBF7\",\n strokeWidth: \".932\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91\",\n fill: \"#FFB594\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103\",\n fill: \"#5C2552\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"#DB836E\",\n strokeWidth: \"1.145\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32\",\n fill: \"#552950\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M91.132 86.786s5.269 4.957 12.679 2.327\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.145\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25\",\n fill: \"#DB836E\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073\",\n stroke: \"#5C2552\",\n strokeWidth: \"1.526\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254\",\n stroke: \"#DB836E\",\n strokeWidth: \"1.145\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M66.508 86.763s-1.598 8.83-6.697 14.078\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.114\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M128.31 87.934s3.013 4.121 4.06 11.785\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M64.09 84.816s-6.03 9.912-13.607 9.903\",\n stroke: \"#DB836E\",\n strokeWidth: \".795\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73\",\n fill: \"#FFC6A0\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M130.532 85.488s4.588 5.757 11.619 6.214\",\n stroke: \"#DB836E\",\n strokeWidth: \".75\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M121.708 105.73s-.393 8.564-1.34 13.612\",\n stroke: \"#E4EBF7\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M115.784 161.512s-3.57-1.488-2.678-7.14\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68\",\n fill: \"#CBD1D1\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z\",\n fill: \"#2B0849\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62\",\n fill: \"#A4AABA\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z\",\n fill: \"#CBD1D1\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078\",\n fill: \"#2B0849\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15\",\n fill: \"#A4AABA\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954\",\n fill: \"#7BB2F9\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M108.459 220.905s2.759-1.104 6.07-3.863\",\n stroke: \"#648BD8\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017\",\n fill: \"#192064\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806\",\n fill: \"#FFF\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64\",\n fill: \"#192064\"\n}), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956\",\n stroke: \"#648BD8\",\n strokeWidth: \"1.051\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}))));\nvar _default = exports.default = Unauthorized;","\"use strict\";\n\"use client\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _grid = require(\"../grid\");\nvar _default = exports.default = _grid.Row;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcSegmented = _interopRequireDefault(require(\"rc-segmented\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction isSegmentedLabeledOptionWithIcon(option) {\n return typeof option === 'object' && !!(option === null || option === void 0 ? void 0 : option.icon);\n}\nconst InternalSegmented = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n block,\n options = [],\n size: customSize = 'middle',\n style,\n vertical\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"block\", \"options\", \"size\", \"style\", \"vertical\"]);\n const {\n getPrefixCls,\n direction,\n segmented\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('segmented', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n // ===================== Size =====================\n const mergedSize = (0, _useSize.default)(customSize);\n // syntactic sugar to support `icon` for Segmented Item\n const extendedOptions = React.useMemo(() => options.map(option => {\n if (isSegmentedLabeledOptionWithIcon(option)) {\n const {\n icon,\n label\n } = option,\n restOption = __rest(option, [\"icon\", \"label\"]);\n return Object.assign(Object.assign({}, restOption), {\n label: (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-item-icon`\n }, icon), label && /*#__PURE__*/React.createElement(\"span\", null, label)))\n });\n }\n return option;\n }), [options, prefixCls]);\n const cls = (0, _classnames.default)(className, rootClassName, segmented === null || segmented === void 0 ? void 0 : segmented.className, {\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-lg`]: mergedSize === 'large',\n [`${prefixCls}-vertical`]: vertical\n }, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, segmented === null || segmented === void 0 ? void 0 : segmented.style), style);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcSegmented.default, Object.assign({}, restProps, {\n className: cls,\n style: mergedStyle,\n options: extendedOptions,\n ref: ref,\n prefixCls: prefixCls,\n direction: direction,\n vertical: vertical\n })));\n});\nconst Segmented = InternalSegmented;\nif (process.env.NODE_ENV !== 'production') {\n Segmented.displayName = 'Segmented';\n}\nvar _default = exports.default = Segmented;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Mixins ==============================\nfunction getItemDisabledStyle(cls, token) {\n return {\n [`${cls}, ${cls}:hover, ${cls}:focus`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n }\n };\n}\nfunction getItemSelectedStyle(token) {\n return {\n backgroundColor: token.itemSelectedBg,\n boxShadow: token.boxShadowTertiary\n };\n}\nconst segmentedTextEllipsisCss = Object.assign({\n overflow: 'hidden'\n}, _style.textEllipsis);\n// ============================== Styles ==============================\nconst genSegmentedStyle = token => {\n const {\n componentCls\n } = token;\n const labelHeight = token.calc(token.controlHeight).sub(token.calc(token.trackPadding).mul(2)).equal();\n const labelHeightLG = token.calc(token.controlHeightLG).sub(token.calc(token.trackPadding).mul(2)).equal();\n const labelHeightSM = token.calc(token.controlHeightSM).sub(token.calc(token.trackPadding).mul(2)).equal();\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'inline-block',\n padding: token.trackPadding,\n color: token.itemColor,\n background: token.trackBg,\n borderRadius: token.borderRadius,\n transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,\n [`${componentCls}-group`]: {\n position: 'relative',\n display: 'flex',\n alignItems: 'stretch',\n justifyItems: 'flex-start',\n flexDirection: 'row',\n width: '100%'\n },\n // RTL styles\n [`&${componentCls}-rtl`]: {\n direction: 'rtl'\n },\n [`&${componentCls}-vertical`]: {\n [`${componentCls}-group`]: {\n flexDirection: 'column'\n },\n [`${componentCls}-thumb`]: {\n width: '100%',\n height: 0,\n padding: `0 ${(0, _cssinjs.unit)(token.paddingXXS)}`\n }\n },\n // block styles\n [`&${componentCls}-block`]: {\n display: 'flex'\n },\n [`&${componentCls}-block ${componentCls}-item`]: {\n flex: 1,\n minWidth: 0\n },\n // item styles\n [`${componentCls}-item`]: {\n position: 'relative',\n textAlign: 'center',\n cursor: 'pointer',\n transition: `color ${token.motionDurationMid} ${token.motionEaseInOut}`,\n borderRadius: token.borderRadiusSM,\n // Fix Safari render bug\n // https://github.com/ant-design/ant-design/issues/45250\n transform: 'translateZ(0)',\n '&-selected': Object.assign(Object.assign({}, getItemSelectedStyle(token)), {\n color: token.itemSelectedColor\n }),\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n zIndex: -1,\n width: '100%',\n height: '100%',\n top: 0,\n insetInlineStart: 0,\n borderRadius: 'inherit',\n transition: `background-color ${token.motionDurationMid}`,\n // This is mandatory to make it not clickable or hoverable\n // Ref: https://github.com/ant-design/ant-design/issues/40888\n pointerEvents: 'none'\n },\n [`&:hover:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {\n color: token.itemHoverColor,\n '&::after': {\n backgroundColor: token.itemHoverBg\n }\n },\n [`&:active:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {\n color: token.itemHoverColor,\n '&::after': {\n backgroundColor: token.itemActiveBg\n }\n },\n '&-label': Object.assign({\n minHeight: labelHeight,\n lineHeight: (0, _cssinjs.unit)(labelHeight),\n padding: `0 ${(0, _cssinjs.unit)(token.segmentedPaddingHorizontal)}`\n }, segmentedTextEllipsisCss),\n // syntactic sugar to add `icon` for Segmented Item\n '&-icon + *': {\n marginInlineStart: token.calc(token.marginSM).div(2).equal()\n },\n '&-input': {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n width: 0,\n height: 0,\n opacity: 0,\n pointerEvents: 'none'\n }\n },\n // thumb styles\n [`${componentCls}-thumb`]: Object.assign(Object.assign({}, getItemSelectedStyle(token)), {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n width: 0,\n height: '100%',\n padding: `${(0, _cssinjs.unit)(token.paddingXXS)} 0`,\n borderRadius: token.borderRadiusSM,\n transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOut}, height ${token.motionDurationSlow} ${token.motionEaseInOut}`,\n [`& ~ ${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)::after`]: {\n backgroundColor: 'transparent'\n }\n }),\n // size styles\n [`&${componentCls}-lg`]: {\n borderRadius: token.borderRadiusLG,\n [`${componentCls}-item-label`]: {\n minHeight: labelHeightLG,\n lineHeight: (0, _cssinjs.unit)(labelHeightLG),\n padding: `0 ${(0, _cssinjs.unit)(token.segmentedPaddingHorizontal)}`,\n fontSize: token.fontSizeLG\n },\n [`${componentCls}-item, ${componentCls}-thumb`]: {\n borderRadius: token.borderRadius\n }\n },\n [`&${componentCls}-sm`]: {\n borderRadius: token.borderRadiusSM,\n [`${componentCls}-item-label`]: {\n minHeight: labelHeightSM,\n lineHeight: (0, _cssinjs.unit)(labelHeightSM),\n padding: `0 ${(0, _cssinjs.unit)(token.segmentedPaddingHorizontalSM)}`\n },\n [`${componentCls}-item, ${componentCls}-thumb`]: {\n borderRadius: token.borderRadiusXS\n }\n }\n }), getItemDisabledStyle(`&-disabled ${componentCls}-item`, token)), getItemDisabledStyle(`${componentCls}-item-disabled`, token)), {\n // transition effect when `appear-active`\n [`${componentCls}-thumb-motion-appear-active`]: {\n transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOut}, width ${token.motionDurationSlow} ${token.motionEaseInOut}`,\n willChange: 'transform, width'\n }\n })\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => {\n const {\n colorTextLabel,\n colorText,\n colorFillSecondary,\n colorBgElevated,\n colorFill,\n lineWidthBold,\n colorBgLayout\n } = token;\n return {\n trackPadding: lineWidthBold,\n trackBg: colorBgLayout,\n itemColor: colorTextLabel,\n itemHoverColor: colorText,\n itemHoverBg: colorFillSecondary,\n itemSelectedBg: colorBgElevated,\n itemActiveBg: colorFill,\n itemSelectedColor: colorText\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Segmented', token => {\n const {\n lineWidth,\n calc\n } = token;\n const segmentedToken = (0, _internal.mergeToken)(token, {\n segmentedPaddingHorizontal: calc(token.controlPaddingHorizontal).sub(lineWidth).equal(),\n segmentedPaddingHorizontalSM: calc(token.controlPaddingHorizontalSM).sub(lineWidth).equal()\n });\n return [genSegmentedStyle(segmentedToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcSelect = _interopRequireWildcard(require(\"rc-select\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _defaultRenderEmpty = _interopRequireDefault(require(\"../config-provider/defaultRenderEmpty\"));\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _context = require(\"../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../form/hooks/useVariants\"));\nvar _Compact = require(\"../space/Compact\");\nvar _internal = require(\"../theme/internal\");\nvar _mergedBuiltinPlacements = _interopRequireDefault(require(\"./mergedBuiltinPlacements\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _useIcons = _interopRequireDefault(require(\"./useIcons\"));\nvar _useShowArrow = _interopRequireDefault(require(\"./useShowArrow\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n// TODO: 4.0 - codemod should help to change `filterOption` to support node props.\n\nconst SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\nconst InternalSelect = (props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n bordered,\n className,\n rootClassName,\n getPopupContainer,\n popupClassName,\n dropdownClassName,\n listHeight = 256,\n placement,\n listItemHeight: customListItemHeight,\n size: customizeSize,\n disabled: customDisabled,\n notFoundContent,\n status: customStatus,\n builtinPlacements,\n dropdownMatchSelectWidth,\n popupMatchSelectWidth,\n direction: propDirection,\n style,\n allowClear,\n variant: customizeVariant,\n dropdownStyle,\n transitionName,\n tagRender,\n maxCount\n } = props,\n rest = __rest(props, [\"prefixCls\", \"bordered\", \"className\", \"rootClassName\", \"getPopupContainer\", \"popupClassName\", \"dropdownClassName\", \"listHeight\", \"placement\", \"listItemHeight\", \"size\", \"disabled\", \"notFoundContent\", \"status\", \"builtinPlacements\", \"dropdownMatchSelectWidth\", \"popupMatchSelectWidth\", \"direction\", \"style\", \"allowClear\", \"variant\", \"dropdownStyle\", \"transitionName\", \"tagRender\", \"maxCount\"]);\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n renderEmpty,\n direction: contextDirection,\n virtual,\n popupMatchSelectWidth: contextPopupMatchSelectWidth,\n popupOverflow,\n select\n } = React.useContext(_configProvider.ConfigContext);\n const [, token] = (0, _internal.useToken)();\n const listItemHeight = customListItemHeight !== null && customListItemHeight !== void 0 ? customListItemHeight : token === null || token === void 0 ? void 0 : token.controlHeight;\n const prefixCls = getPrefixCls('select', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const direction = propDirection !== null && propDirection !== void 0 ? propDirection : contextDirection;\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n const [variant, enableVariantCls] = (0, _useVariants.default)('select', customizeVariant, bordered);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const mode = React.useMemo(() => {\n const {\n mode: m\n } = props;\n if (m === 'combobox') {\n return undefined;\n }\n if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {\n return 'combobox';\n }\n return m;\n }, [props.mode]);\n const isMultiple = mode === 'multiple' || mode === 'tags';\n const showSuffixIcon = (0, _useShowArrow.default)(props.suffixIcon, props.showArrow);\n const mergedPopupMatchSelectWidth = (_a = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _a !== void 0 ? _a : contextPopupMatchSelectWidth;\n // ===================== Form Status =====================\n const {\n status: contextStatus,\n hasFeedback,\n isFormItemInput,\n feedbackIcon\n } = React.useContext(_context.FormItemInputContext);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(contextStatus, customStatus);\n // ===================== Empty =====================\n let mergedNotFound;\n if (notFoundContent !== undefined) {\n mergedNotFound = notFoundContent;\n } else if (mode === 'combobox') {\n mergedNotFound = null;\n } else {\n mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/React.createElement(_defaultRenderEmpty.default, {\n componentName: \"Select\"\n });\n }\n // ===================== Icons =====================\n const {\n suffixIcon,\n itemIcon,\n removeIcon,\n clearIcon\n } = (0, _useIcons.default)(Object.assign(Object.assign({}, rest), {\n multiple: isMultiple,\n hasFeedback,\n feedbackIcon,\n showSuffixIcon,\n prefixCls,\n componentName: 'Select'\n }));\n const mergedAllowClear = allowClear === true ? {\n clearIcon\n } : allowClear;\n const selectProps = (0, _omit.default)(rest, ['suffixIcon', 'itemIcon']);\n const mergedPopupClassName = (0, _classnames.default)(popupClassName || dropdownClassName, {\n [`${prefixCls}-dropdown-${direction}`]: direction === 'rtl'\n }, rootClassName, cssVarCls, rootCls, hashId);\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const mergedClassName = (0, _classnames.default)({\n [`${prefixCls}-lg`]: mergedSize === 'large',\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-${variant}`]: enableVariantCls,\n [`${prefixCls}-in-form-item`]: isFormItemInput\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, select === null || select === void 0 ? void 0 : select.className, className, rootClassName, cssVarCls, rootCls, hashId);\n // ===================== Placement =====================\n const memoPlacement = React.useMemo(() => {\n if (placement !== undefined) {\n return placement;\n }\n return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';\n }, [placement, direction]);\n // ====================== Warning ======================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Select');\n warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');\n warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');\n process.env.NODE_ENV !== \"production\" ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : void 0;\n warning.deprecated(!('bordered' in props), 'bordered', 'variant');\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof maxCount !== 'undefined' && !isMultiple), 'usage', '`maxCount` only works with mode `multiple` or `tags`') : void 0;\n }\n // ====================== zIndex =========================\n const [zIndex] = (0, _useZIndex.useZIndex)('SelectLike', dropdownStyle === null || dropdownStyle === void 0 ? void 0 : dropdownStyle.zIndex);\n // ====================== Render =======================\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcSelect.default, Object.assign({\n ref: ref,\n virtual: virtual,\n showSearch: select === null || select === void 0 ? void 0 : select.showSearch\n }, selectProps, {\n style: Object.assign(Object.assign({}, select === null || select === void 0 ? void 0 : select.style), style),\n dropdownMatchSelectWidth: mergedPopupMatchSelectWidth,\n transitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),\n builtinPlacements: (0, _mergedBuiltinPlacements.default)(builtinPlacements, popupOverflow),\n listHeight: listHeight,\n listItemHeight: listItemHeight,\n mode: mode,\n prefixCls: prefixCls,\n placement: memoPlacement,\n direction: direction,\n suffixIcon: suffixIcon,\n menuItemSelectedIcon: itemIcon,\n removeIcon: removeIcon,\n allowClear: mergedAllowClear,\n notFoundContent: mergedNotFound,\n className: mergedClassName,\n getPopupContainer: getPopupContainer || getContextPopupContainer,\n dropdownClassName: mergedPopupClassName,\n disabled: mergedDisabled,\n dropdownStyle: Object.assign(Object.assign({}, dropdownStyle), {\n zIndex\n }),\n maxCount: isMultiple ? maxCount : undefined,\n tagRender: isMultiple ? tagRender : undefined\n })));\n};\nif (process.env.NODE_ENV !== 'production') {\n InternalSelect.displayName = 'Select';\n}\nconst Select = /*#__PURE__*/React.forwardRef(InternalSelect);\n// We don't care debug panel\n/* istanbul ignore next */\nconst PurePanel = (0, _PurePanel.default)(Select);\nSelect.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;\nSelect.Option = _rcSelect.Option;\nSelect.OptGroup = _rcSelect.OptGroup;\nSelect._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nif (process.env.NODE_ENV !== 'production') {\n Select.displayName = 'Select';\n}\nvar _default = exports.default = Select;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst getBuiltInPlacements = popupOverflow => {\n const htmlRegion = popupOverflow === 'scroll' ? 'scroll' : 'visible';\n const sharedConfig = {\n overflow: {\n adjustX: true,\n adjustY: true,\n shiftY: true\n },\n htmlRegion,\n dynamicInset: true\n };\n return {\n bottomLeft: Object.assign(Object.assign({}, sharedConfig), {\n points: ['tl', 'bl'],\n offset: [0, 4]\n }),\n bottomRight: Object.assign(Object.assign({}, sharedConfig), {\n points: ['tr', 'br'],\n offset: [0, 4]\n }),\n topLeft: Object.assign(Object.assign({}, sharedConfig), {\n points: ['bl', 'tl'],\n offset: [0, -4]\n }),\n topRight: Object.assign(Object.assign({}, sharedConfig), {\n points: ['br', 'tr'],\n offset: [0, -4]\n })\n };\n};\nfunction mergedBuiltinPlacements(buildInPlacements, popupOverflow) {\n return buildInPlacements || getBuiltInPlacements(popupOverflow);\n}\nvar _default = exports.default = mergedBuiltinPlacements;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nconst genItemStyle = token => {\n const {\n optionHeight,\n optionFontSize,\n optionLineHeight,\n optionPadding\n } = token;\n return {\n position: 'relative',\n display: 'block',\n minHeight: optionHeight,\n padding: optionPadding,\n color: token.colorText,\n fontWeight: 'normal',\n fontSize: optionFontSize,\n lineHeight: optionLineHeight,\n boxSizing: 'border-box'\n };\n};\nconst genSingleStyle = token => {\n const {\n antCls,\n componentCls\n } = token;\n const selectItemCls = `${componentCls}-item`;\n const slideUpEnterActive = `&${antCls}-slide-up-enter${antCls}-slide-up-enter-active`;\n const slideUpAppearActive = `&${antCls}-slide-up-appear${antCls}-slide-up-appear-active`;\n const slideUpLeaveActive = `&${antCls}-slide-up-leave${antCls}-slide-up-leave-active`;\n const dropdownPlacementCls = `${componentCls}-dropdown-placement-`;\n return [{\n [`${componentCls}-dropdown`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'absolute',\n top: -9999,\n zIndex: token.zIndexPopup,\n boxSizing: 'border-box',\n padding: token.paddingXXS,\n overflow: 'hidden',\n fontSize: token.fontSize,\n // Fix select render lag of long text in chrome\n // https://github.com/ant-design/ant-design/issues/11456\n // https://github.com/ant-design/ant-design/issues/11843\n fontVariant: 'initial',\n backgroundColor: token.colorBgElevated,\n borderRadius: token.borderRadiusLG,\n outline: 'none',\n boxShadow: token.boxShadowSecondary,\n [`\n ${slideUpEnterActive}${dropdownPlacementCls}bottomLeft,\n ${slideUpAppearActive}${dropdownPlacementCls}bottomLeft\n `]: {\n animationName: _motion.slideUpIn\n },\n [`\n ${slideUpEnterActive}${dropdownPlacementCls}topLeft,\n ${slideUpAppearActive}${dropdownPlacementCls}topLeft,\n ${slideUpEnterActive}${dropdownPlacementCls}topRight,\n ${slideUpAppearActive}${dropdownPlacementCls}topRight\n `]: {\n animationName: _motion.slideDownIn\n },\n [`${slideUpLeaveActive}${dropdownPlacementCls}bottomLeft`]: {\n animationName: _motion.slideUpOut\n },\n [`\n ${slideUpLeaveActive}${dropdownPlacementCls}topLeft,\n ${slideUpLeaveActive}${dropdownPlacementCls}topRight\n `]: {\n animationName: _motion.slideDownOut\n },\n '&-hidden': {\n display: 'none'\n },\n [selectItemCls]: Object.assign(Object.assign({}, genItemStyle(token)), {\n cursor: 'pointer',\n transition: `background ${token.motionDurationSlow} ease`,\n borderRadius: token.borderRadiusSM,\n // =========== Group ============\n '&-group': {\n color: token.colorTextDescription,\n fontSize: token.fontSizeSM,\n cursor: 'default'\n },\n // =========== Option ===========\n '&-option': {\n display: 'flex',\n '&-content': Object.assign({\n flex: 'auto'\n }, _style.textEllipsis),\n '&-state': {\n flex: 'none',\n display: 'flex',\n alignItems: 'center'\n },\n [`&-active:not(${selectItemCls}-option-disabled)`]: {\n backgroundColor: token.optionActiveBg\n },\n [`&-selected:not(${selectItemCls}-option-disabled)`]: {\n color: token.optionSelectedColor,\n fontWeight: token.optionSelectedFontWeight,\n backgroundColor: token.optionSelectedBg,\n [`${selectItemCls}-option-state`]: {\n color: token.colorPrimary\n },\n [`&:has(+ ${selectItemCls}-option-selected:not(${selectItemCls}-option-disabled))`]: {\n borderEndStartRadius: 0,\n borderEndEndRadius: 0,\n [`& + ${selectItemCls}-option-selected:not(${selectItemCls}-option-disabled)`]: {\n borderStartStartRadius: 0,\n borderStartEndRadius: 0\n }\n }\n },\n '&-disabled': {\n [`&${selectItemCls}-option-selected`]: {\n backgroundColor: token.colorBgContainerDisabled\n },\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n },\n '&-grouped': {\n paddingInlineStart: token.calc(token.controlPaddingHorizontal).mul(2).equal()\n }\n },\n '&-empty': Object.assign(Object.assign({}, genItemStyle(token)), {\n color: token.colorTextDisabled\n })\n }),\n // =========================== RTL ===========================\n '&-rtl': {\n direction: 'rtl'\n }\n })\n },\n // Follow code may reuse in other components\n (0, _motion.initSlideMotion)(token, 'slide-up'), (0, _motion.initSlideMotion)(token, 'slide-down'), (0, _motion.initMoveMotion)(token, 'move-up'), (0, _motion.initMoveMotion)(token, 'move-down')];\n};\nvar _default = exports.default = genSingleStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _style = require(\"../../style\");\nvar _compactItem = require(\"../../style/compact-item\");\nvar _internal = require(\"../../theme/internal\");\nvar _dropdown = _interopRequireDefault(require(\"./dropdown\"));\nvar _multiple = _interopRequireDefault(require(\"./multiple\"));\nvar _single = _interopRequireDefault(require(\"./single\"));\nvar _token = require(\"./token\");\nvar _variants = _interopRequireDefault(require(\"./variants\"));\n// ============================= Selector =============================\nconst genSelectorStyle = token => {\n const {\n componentCls\n } = token;\n return {\n position: 'relative',\n transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,\n input: {\n cursor: 'pointer'\n },\n [`${componentCls}-show-search&`]: {\n cursor: 'text',\n input: {\n cursor: 'auto',\n color: 'inherit',\n height: '100%'\n }\n },\n [`${componentCls}-disabled&`]: {\n cursor: 'not-allowed',\n input: {\n cursor: 'not-allowed'\n }\n }\n };\n};\n// ============================== Styles ==============================\n// /* Reset search input style */\nconst getSearchInputWithoutBorderStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-selection-search-input`]: {\n margin: 0,\n padding: 0,\n background: 'transparent',\n border: 'none',\n outline: 'none',\n appearance: 'none',\n fontFamily: 'inherit',\n '&::-webkit-search-cancel-button': {\n display: 'none',\n '-webkit-appearance': 'none'\n }\n }\n };\n};\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n antCls,\n componentCls,\n inputPaddingHorizontalBase,\n iconCls\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n display: 'inline-block',\n cursor: 'pointer',\n [`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: Object.assign(Object.assign({}, genSelectorStyle(token)), getSearchInputWithoutBorderStyle(token)),\n // ======================== Selection ========================\n [`${componentCls}-selection-item`]: Object.assign(Object.assign({\n flex: 1,\n fontWeight: 'normal',\n position: 'relative',\n userSelect: 'none'\n }, _style.textEllipsis), {\n // https://github.com/ant-design/ant-design/issues/40421\n [`> ${antCls}-typography`]: {\n display: 'inline'\n }\n }),\n // ======================= Placeholder =======================\n [`${componentCls}-selection-placeholder`]: Object.assign(Object.assign({}, _style.textEllipsis), {\n flex: 1,\n color: token.colorTextPlaceholder,\n pointerEvents: 'none'\n }),\n // ========================== Arrow ==========================\n [`${componentCls}-arrow`]: Object.assign(Object.assign({}, (0, _style.resetIcon)()), {\n position: 'absolute',\n top: '50%',\n insetInlineStart: 'auto',\n insetInlineEnd: inputPaddingHorizontalBase,\n height: token.fontSizeIcon,\n marginTop: token.calc(token.fontSizeIcon).mul(-1).div(2).equal(),\n color: token.colorTextQuaternary,\n fontSize: token.fontSizeIcon,\n lineHeight: 1,\n textAlign: 'center',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n transition: `opacity ${token.motionDurationSlow} ease`,\n [iconCls]: {\n verticalAlign: 'top',\n transition: `transform ${token.motionDurationSlow}`,\n '> svg': {\n verticalAlign: 'top'\n },\n [`&:not(${componentCls}-suffix)`]: {\n pointerEvents: 'auto'\n }\n },\n [`${componentCls}-disabled &`]: {\n cursor: 'not-allowed'\n },\n '> *:not(:last-child)': {\n marginInlineEnd: 8 // FIXME: magic\n }\n }),\n // ========================== Clear ==========================\n [`${componentCls}-clear`]: {\n position: 'absolute',\n top: '50%',\n insetInlineStart: 'auto',\n insetInlineEnd: inputPaddingHorizontalBase,\n zIndex: 1,\n display: 'inline-block',\n width: token.fontSizeIcon,\n height: token.fontSizeIcon,\n marginTop: token.calc(token.fontSizeIcon).mul(-1).div(2).equal(),\n color: token.colorTextQuaternary,\n fontSize: token.fontSizeIcon,\n fontStyle: 'normal',\n lineHeight: 1,\n textAlign: 'center',\n textTransform: 'none',\n cursor: 'pointer',\n opacity: 0,\n transition: `color ${token.motionDurationMid} ease, opacity ${token.motionDurationSlow} ease`,\n textRendering: 'auto',\n '&:before': {\n display: 'block'\n },\n '&:hover': {\n color: token.colorTextTertiary\n }\n },\n [`&:hover ${componentCls}-clear`]: {\n opacity: 1,\n background: token.colorBgBase,\n borderRadius: '50%'\n }\n }),\n // ========================= Feedback ==========================\n [`${componentCls}-has-feedback`]: {\n [`${componentCls}-clear`]: {\n insetInlineEnd: token.calc(inputPaddingHorizontalBase).add(token.fontSize).add(token.paddingXS).equal()\n }\n }\n };\n};\n// ============================== Styles ==============================\nconst genSelectStyle = token => {\n const {\n componentCls\n } = token;\n return [{\n [componentCls]: {\n // ==================== In Form ====================\n [`&${componentCls}-in-form-item`]: {\n width: '100%'\n }\n }\n },\n // =====================================================\n // == LTR ==\n // =====================================================\n // Base\n genBaseStyle(token),\n // Single\n (0, _single.default)(token),\n // Multiple\n (0, _multiple.default)(token),\n // Dropdown\n (0, _dropdown.default)(token),\n // =====================================================\n // == RTL ==\n // =====================================================\n {\n [`${componentCls}-rtl`]: {\n direction: 'rtl'\n }\n },\n // =====================================================\n // == Space Compact ==\n // =====================================================\n (0, _compactItem.genCompactItemStyle)(token, {\n borderElCls: `${componentCls}-selector`,\n focusElCls: `${componentCls}-focused`\n })];\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genStyleHooks)('Select', (token, _ref) => {\n let {\n rootPrefixCls\n } = _ref;\n const selectToken = (0, _internal.mergeToken)(token, {\n rootPrefixCls,\n inputPaddingHorizontalBase: token.calc(token.paddingSM).sub(1).equal(),\n multipleSelectItemHeight: token.multipleItemHeight,\n selectHeight: token.controlHeight\n });\n return [genSelectStyle(selectToken), (0, _variants.default)(selectToken)];\n}, _token.prepareComponentToken, {\n unitless: {\n optionLineHeight: true,\n optionSelectedFontWeight: true\n }\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getMultipleSelectorUnit = exports.genOverflowStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n/**\n * Get multiple selector needed style. The calculation:\n *\n * ContainerPadding = BasePadding - ItemMargin\n *\n * Border: ╔═══════════════════════════╗ ┬\n * ContainerPadding: ║ ║ │\n * ╟───────────────────────────╢ ┬ │\n * Item Margin: ║ ║ │ │\n * ║ ┌──────────┐ ║ │ │\n * Item(multipleItemHeight): ║ BasePadding │ Item │ ║ Overflow Container(ControlHeight)\n * ║ └──────────┘ ║ │ │\n * Item Margin: ║ ║ │ │\n * ╟───────────────────────────╢ ┴ │\n * ContainerPadding: ║ ║ │\n * Border: ╚═══════════════════════════╝ ┴\n */\nconst getMultipleSelectorUnit = token => {\n const {\n multipleSelectItemHeight,\n paddingXXS,\n lineWidth,\n INTERNAL_FIXED_ITEM_MARGIN\n } = token;\n const basePadding = token.max(token.calc(paddingXXS).sub(lineWidth).equal(), 0);\n const containerPadding = token.max(token.calc(basePadding).sub(INTERNAL_FIXED_ITEM_MARGIN).equal(), 0);\n return {\n basePadding,\n containerPadding,\n itemHeight: (0, _cssinjs.unit)(multipleSelectItemHeight),\n itemLineHeight: (0, _cssinjs.unit)(token.calc(multipleSelectItemHeight).sub(token.calc(token.lineWidth).mul(2)).equal())\n };\n};\nexports.getMultipleSelectorUnit = getMultipleSelectorUnit;\nconst getSelectItemStyle = token => {\n const {\n multipleSelectItemHeight,\n selectHeight,\n lineWidth\n } = token;\n const selectItemDist = token.calc(selectHeight).sub(multipleSelectItemHeight).div(2).sub(lineWidth).equal();\n return selectItemDist;\n};\n/**\n * Get the `rc-overflow` needed style.\n * It's a share style which means not affected by `size`.\n */\nconst genOverflowStyle = token => {\n const {\n componentCls,\n iconCls,\n borderRadiusSM,\n motionDurationSlow,\n paddingXS,\n multipleItemColorDisabled,\n multipleItemBorderColorDisabled,\n colorIcon,\n colorIconHover,\n INTERNAL_FIXED_ITEM_MARGIN\n } = token;\n const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;\n return {\n /**\n * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome\n * may update to redesign with its align logic.\n */\n // =========================== Overflow ===========================\n [selectOverflowPrefixCls]: {\n position: 'relative',\n display: 'flex',\n flex: 'auto',\n flexWrap: 'wrap',\n maxWidth: '100%',\n '&-item': {\n flex: 'none',\n alignSelf: 'center',\n maxWidth: '100%',\n display: 'inline-flex'\n },\n // ======================== Selections ==========================\n [`${componentCls}-selection-item`]: {\n display: 'flex',\n alignSelf: 'center',\n flex: 'none',\n boxSizing: 'border-box',\n maxWidth: '100%',\n marginBlock: INTERNAL_FIXED_ITEM_MARGIN,\n borderRadius: borderRadiusSM,\n cursor: 'default',\n transition: `font-size ${motionDurationSlow}, line-height ${motionDurationSlow}, height ${motionDurationSlow}`,\n marginInlineEnd: token.calc(INTERNAL_FIXED_ITEM_MARGIN).mul(2).equal(),\n paddingInlineStart: paddingXS,\n paddingInlineEnd: token.calc(paddingXS).div(2).equal(),\n [`${componentCls}-disabled&`]: {\n color: multipleItemColorDisabled,\n borderColor: multipleItemBorderColorDisabled,\n cursor: 'not-allowed'\n },\n // It's ok not to do this, but 24px makes bottom narrow in view should adjust\n '&-content': {\n display: 'inline-block',\n marginInlineEnd: token.calc(paddingXS).div(2).equal(),\n overflow: 'hidden',\n whiteSpace: 'pre',\n // fix whitespace wrapping. custom tags display all whitespace within.\n textOverflow: 'ellipsis'\n },\n '&-remove': Object.assign(Object.assign({}, (0, _style.resetIcon)()), {\n display: 'inline-flex',\n alignItems: 'center',\n color: colorIcon,\n fontWeight: 'bold',\n fontSize: 10,\n lineHeight: 'inherit',\n cursor: 'pointer',\n [`> ${iconCls}`]: {\n verticalAlign: '-0.2em'\n },\n '&:hover': {\n color: colorIconHover\n }\n })\n }\n }\n };\n};\nexports.genOverflowStyle = genOverflowStyle;\nconst genSelectionStyle = (token, suffix) => {\n const {\n componentCls,\n INTERNAL_FIXED_ITEM_MARGIN\n } = token;\n const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;\n const selectItemHeight = token.multipleSelectItemHeight;\n const selectItemDist = getSelectItemStyle(token);\n const suffixCls = suffix ? `${componentCls}-${suffix}` : '';\n const multipleSelectorUnit = getMultipleSelectorUnit(token);\n return {\n [`${componentCls}-multiple${suffixCls}`]: Object.assign(Object.assign({}, genOverflowStyle(token)), {\n // ========================= Selector =========================\n [`${componentCls}-selector`]: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n height: '100%',\n // Multiple is little different that horizontal is follow the vertical\n paddingInline: multipleSelectorUnit.basePadding,\n paddingBlock: multipleSelectorUnit.containerPadding,\n borderRadius: token.borderRadius,\n [`${componentCls}-disabled&`]: {\n background: token.multipleSelectorBgDisabled,\n cursor: 'not-allowed'\n },\n '&:after': {\n display: 'inline-block',\n width: 0,\n margin: `${(0, _cssinjs.unit)(INTERNAL_FIXED_ITEM_MARGIN)} 0`,\n lineHeight: (0, _cssinjs.unit)(selectItemHeight),\n visibility: 'hidden',\n content: '\"\\\\a0\"'\n }\n },\n // ======================== Selections ========================\n [`${componentCls}-selection-item`]: {\n height: multipleSelectorUnit.itemHeight,\n lineHeight: (0, _cssinjs.unit)(multipleSelectorUnit.itemLineHeight)\n },\n // ========================== Input ==========================\n [`${selectOverflowPrefixCls}-item + ${selectOverflowPrefixCls}-item`]: {\n [`${componentCls}-selection-search`]: {\n marginInlineStart: 0\n }\n },\n // https://github.com/ant-design/ant-design/issues/44754\n [`${selectOverflowPrefixCls}-item-suffix`]: {\n height: '100%'\n },\n [`${componentCls}-selection-search`]: {\n display: 'inline-flex',\n position: 'relative',\n maxWidth: '100%',\n marginInlineStart: token.calc(token.inputPaddingHorizontalBase).sub(selectItemDist).equal(),\n [`\n &-input,\n &-mirror\n `]: {\n height: selectItemHeight,\n fontFamily: token.fontFamily,\n lineHeight: (0, _cssinjs.unit)(selectItemHeight),\n transition: `all ${token.motionDurationSlow}`\n },\n '&-input': {\n width: '100%',\n minWidth: 4.1 // fix search cursor missing\n },\n '&-mirror': {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n insetInlineEnd: 'auto',\n zIndex: 999,\n whiteSpace: 'pre',\n // fix whitespace wrapping caused width calculation bug\n visibility: 'hidden'\n }\n },\n // ======================= Placeholder =======================\n [`${componentCls}-selection-placeholder`]: {\n position: 'absolute',\n top: '50%',\n insetInlineStart: token.inputPaddingHorizontalBase,\n insetInlineEnd: token.inputPaddingHorizontalBase,\n transform: 'translateY(-50%)',\n transition: `all ${token.motionDurationSlow}`\n }\n })\n };\n};\nfunction genSizeStyle(token, suffix) {\n const {\n componentCls\n } = token;\n const suffixCls = suffix ? `${componentCls}-${suffix}` : '';\n const rawStyle = {\n [`${componentCls}-multiple${suffixCls}`]: {\n fontSize: token.fontSize,\n // ========================= Selector =========================\n [`${componentCls}-selector`]: {\n [`${componentCls}-show-search&`]: {\n cursor: 'text'\n }\n },\n [`\n &${componentCls}-show-arrow ${componentCls}-selector,\n &${componentCls}-allow-clear ${componentCls}-selector\n `]: {\n paddingInlineEnd: token.calc(token.fontSizeIcon).add(token.controlPaddingHorizontal).equal()\n }\n }\n };\n return [genSelectionStyle(token, suffix), rawStyle];\n}\nconst genMultipleStyle = token => {\n const {\n componentCls\n } = token;\n const smallToken = (0, _internal.mergeToken)(token, {\n selectHeight: token.controlHeightSM,\n multipleSelectItemHeight: token.multipleItemHeightSM,\n borderRadius: token.borderRadiusSM,\n borderRadiusSM: token.borderRadiusXS\n });\n const largeToken = (0, _internal.mergeToken)(token, {\n fontSize: token.fontSizeLG,\n selectHeight: token.controlHeightLG,\n multipleSelectItemHeight: token.multipleItemHeightLG,\n borderRadius: token.borderRadiusLG,\n borderRadiusSM: token.borderRadius\n });\n return [genSizeStyle(token),\n // ======================== Small ========================\n genSizeStyle(smallToken, 'sm'),\n // Padding\n {\n [`${componentCls}-multiple${componentCls}-sm`]: {\n [`${componentCls}-selection-placeholder`]: {\n insetInline: token.calc(token.controlPaddingHorizontalSM).sub(token.lineWidth).equal()\n },\n // https://github.com/ant-design/ant-design/issues/29559\n [`${componentCls}-selection-search`]: {\n marginInlineStart: 2 // Magic Number\n }\n }\n },\n // ======================== Large ========================\n genSizeStyle(largeToken, 'lg')];\n};\nvar _default = exports.default = genMultipleStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = genSingleStyle;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nfunction genSizeStyle(token, suffix) {\n const {\n componentCls,\n inputPaddingHorizontalBase,\n borderRadius,\n fontSizeIcon\n } = token;\n const selectHeightWithoutBorder = token.calc(token.controlHeight).sub(token.calc(token.lineWidth).mul(2)).equal();\n const singleInputPaddingHorizontal = token.calc(inputPaddingHorizontalBase).add(fontSizeIcon).equal();\n const suffixCls = suffix ? `${componentCls}-${suffix}` : '';\n return {\n [`${componentCls}-single${suffixCls}`]: {\n fontSize: token.fontSize,\n height: token.controlHeight,\n // ========================= Selector =========================\n [`${componentCls}-selector`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token, true)), {\n display: 'flex',\n borderRadius,\n [`${componentCls}-selection-search`]: {\n position: 'absolute',\n top: 0,\n insetInlineStart: inputPaddingHorizontalBase,\n insetInlineEnd: (0, _cssinjs.unit)(singleInputPaddingHorizontal),\n bottom: 0,\n '&-input': {\n width: '100%',\n WebkitAppearance: 'textfield'\n }\n },\n [`\n ${componentCls}-selection-item,\n ${componentCls}-selection-placeholder\n `]: {\n padding: 0,\n lineHeight: (0, _cssinjs.unit)(selectHeightWithoutBorder),\n transition: `all ${token.motionDurationSlow}, visibility 0s`,\n alignSelf: 'center'\n },\n [`${componentCls}-selection-placeholder`]: {\n transition: 'none',\n pointerEvents: 'none'\n },\n // For common baseline align\n [['&:after', /* For '' value baseline align */\n `${componentCls}-selection-item:empty:after`, /* For undefined value baseline align */\n `${componentCls}-selection-placeholder:empty:after`].join(',')]: {\n display: 'inline-block',\n width: 0,\n visibility: 'hidden',\n content: '\"\\\\a0\"'\n }\n }),\n [`\n &${componentCls}-show-arrow ${componentCls}-selection-item,\n &${componentCls}-show-arrow ${componentCls}-selection-placeholder\n `]: {\n paddingInlineEnd: token.showArrowPaddingInlineEnd\n },\n // Opacity selection if open\n [`&${componentCls}-open ${componentCls}-selection-item`]: {\n color: token.colorTextPlaceholder\n },\n // ========================== Input ==========================\n // We only change the style of non-customize input which is only support by `combobox` mode.\n // Not customize\n [`&:not(${componentCls}-customize-input)`]: {\n [`${componentCls}-selector`]: {\n width: '100%',\n height: '100%',\n padding: `0 ${(0, _cssinjs.unit)(inputPaddingHorizontalBase)}`,\n [`${componentCls}-selection-search-input`]: {\n height: selectHeightWithoutBorder\n },\n '&:after': {\n lineHeight: (0, _cssinjs.unit)(selectHeightWithoutBorder)\n }\n }\n },\n [`&${componentCls}-customize-input`]: {\n [`${componentCls}-selector`]: {\n '&:after': {\n display: 'none'\n },\n [`${componentCls}-selection-search`]: {\n position: 'static',\n width: '100%'\n },\n [`${componentCls}-selection-placeholder`]: {\n position: 'absolute',\n insetInlineStart: 0,\n insetInlineEnd: 0,\n padding: `0 ${(0, _cssinjs.unit)(inputPaddingHorizontalBase)}`,\n '&:after': {\n display: 'none'\n }\n }\n }\n }\n }\n };\n}\nfunction genSingleStyle(token) {\n const {\n componentCls\n } = token;\n const inputPaddingHorizontalSM = token.calc(token.controlPaddingHorizontalSM).sub(token.lineWidth).equal();\n return [genSizeStyle(token),\n // ======================== Small ========================\n // Shared\n genSizeStyle((0, _internal.mergeToken)(token, {\n controlHeight: token.controlHeightSM,\n borderRadius: token.borderRadiusSM\n }), 'sm'),\n // padding\n {\n [`${componentCls}-single${componentCls}-sm`]: {\n [`&:not(${componentCls}-customize-input)`]: {\n [`${componentCls}-selection-search`]: {\n insetInlineStart: inputPaddingHorizontalSM,\n insetInlineEnd: inputPaddingHorizontalSM\n },\n [`${componentCls}-selector`]: {\n padding: `0 ${(0, _cssinjs.unit)(inputPaddingHorizontalSM)}`\n },\n // With arrow should provides `padding-right` to show the arrow\n [`&${componentCls}-show-arrow ${componentCls}-selection-search`]: {\n insetInlineEnd: token.calc(inputPaddingHorizontalSM).add(token.calc(token.fontSize).mul(1.5)).equal()\n },\n [`\n &${componentCls}-show-arrow ${componentCls}-selection-item,\n &${componentCls}-show-arrow ${componentCls}-selection-placeholder\n `]: {\n paddingInlineEnd: token.calc(token.fontSize).mul(1.5).equal()\n }\n }\n }\n },\n // ======================== Large ========================\n // Shared\n genSizeStyle((0, _internal.mergeToken)(token, {\n controlHeight: token.singleItemHeightLG,\n fontSize: token.fontSizeLG,\n borderRadius: token.borderRadiusLG\n }), 'lg')];\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = void 0;\nconst prepareComponentToken = token => {\n const {\n fontSize,\n lineHeight,\n lineWidth,\n controlHeight,\n controlHeightSM,\n controlHeightLG,\n paddingXXS,\n controlPaddingHorizontal,\n zIndexPopupBase,\n colorText,\n fontWeightStrong,\n controlItemBgActive,\n controlItemBgHover,\n colorBgContainer,\n colorFillSecondary,\n colorBgContainerDisabled,\n colorTextDisabled,\n colorPrimaryHover,\n colorPrimary,\n controlOutline\n } = token;\n // Item height default use `controlHeight - 2 * paddingXXS`,\n // but some case `paddingXXS=0`.\n // Let's fallback it.\n const dblPaddingXXS = paddingXXS * 2;\n const dblLineWidth = lineWidth * 2;\n const multipleItemHeight = Math.min(controlHeight - dblPaddingXXS, controlHeight - dblLineWidth);\n const multipleItemHeightSM = Math.min(controlHeightSM - dblPaddingXXS, controlHeightSM - dblLineWidth);\n const multipleItemHeightLG = Math.min(controlHeightLG - dblPaddingXXS, controlHeightLG - dblLineWidth);\n // FIXED_ITEM_MARGIN is a hardcode calculation since calc not support rounding\n const INTERNAL_FIXED_ITEM_MARGIN = Math.floor(paddingXXS / 2);\n return {\n INTERNAL_FIXED_ITEM_MARGIN,\n zIndexPopup: zIndexPopupBase + 50,\n optionSelectedColor: colorText,\n optionSelectedFontWeight: fontWeightStrong,\n optionSelectedBg: controlItemBgActive,\n optionActiveBg: controlItemBgHover,\n optionPadding: `${(controlHeight - fontSize * lineHeight) / 2}px ${controlPaddingHorizontal}px`,\n optionFontSize: fontSize,\n optionLineHeight: lineHeight,\n optionHeight: controlHeight,\n selectorBg: colorBgContainer,\n clearBg: colorBgContainer,\n singleItemHeightLG: controlHeightLG,\n multipleItemBg: colorFillSecondary,\n multipleItemBorderColor: 'transparent',\n multipleItemHeight,\n multipleItemHeightSM,\n multipleItemHeightLG,\n multipleSelectorBgDisabled: colorBgContainerDisabled,\n multipleItemColorDisabled: colorTextDisabled,\n multipleItemBorderColorDisabled: 'transparent',\n showArrowPaddingInlineEnd: Math.ceil(token.fontSize * 1.25),\n hoverBorderColor: colorPrimaryHover,\n activeBorderColor: colorPrimary,\n activeOutlineColor: controlOutline\n };\n};\nexports.prepareComponentToken = prepareComponentToken;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\n// =====================================================\n// == Outlined ==\n// =====================================================\nconst genBaseOutlinedStyle = (token, options) => {\n const {\n componentCls,\n antCls,\n controlOutlineWidth\n } = token;\n return {\n [`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${options.borderColor}`,\n background: token.selectorBg\n },\n [`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {\n [`&:hover ${componentCls}-selector`]: {\n borderColor: options.hoverBorderHover\n },\n [`${componentCls}-focused& ${componentCls}-selector`]: {\n borderColor: options.activeBorderColor,\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(controlOutlineWidth)} ${options.activeOutlineColor}`,\n outline: 0\n }\n }\n };\n};\nconst genOutlinedStatusStyle = (token, options) => ({\n [`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseOutlinedStyle(token, options))\n});\nconst genOutlinedStyle = token => ({\n '&-outlined': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseOutlinedStyle(token, {\n borderColor: token.colorBorder,\n hoverBorderHover: token.hoverBorderColor,\n activeBorderColor: token.activeBorderColor,\n activeOutlineColor: token.activeOutlineColor\n })), genOutlinedStatusStyle(token, {\n status: 'error',\n borderColor: token.colorError,\n hoverBorderHover: token.colorErrorHover,\n activeBorderColor: token.colorError,\n activeOutlineColor: token.colorErrorOutline\n })), genOutlinedStatusStyle(token, {\n status: 'warning',\n borderColor: token.colorWarning,\n hoverBorderHover: token.colorWarningHover,\n activeBorderColor: token.colorWarning,\n activeOutlineColor: token.colorWarningOutline\n })), {\n [`&${token.componentCls}-disabled`]: {\n [`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {\n background: token.colorBgContainerDisabled,\n color: token.colorTextDisabled\n }\n },\n [`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {\n background: token.multipleItemBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`\n }\n })\n});\n// =====================================================\n// == Filled ==\n// =====================================================\nconst genBaseFilledStyle = (token, options) => {\n const {\n componentCls,\n antCls\n } = token;\n return {\n [`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: {\n background: options.bg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,\n color: options.color\n },\n [`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: {\n [`&:hover ${componentCls}-selector`]: {\n background: options.hoverBg\n },\n [`${componentCls}-focused& ${componentCls}-selector`]: {\n background: token.selectorBg,\n borderColor: options.activeBorderColor,\n outline: 0\n }\n }\n };\n};\nconst genFilledStatusStyle = (token, options) => ({\n [`&${token.componentCls}-status-${options.status}`]: Object.assign({}, genBaseFilledStyle(token, options))\n});\nconst genFilledStyle = token => ({\n '&-filled': Object.assign(Object.assign(Object.assign(Object.assign({}, genBaseFilledStyle(token, {\n bg: token.colorFillTertiary,\n hoverBg: token.colorFillSecondary,\n activeBorderColor: token.activeBorderColor,\n color: token.colorText\n })), genFilledStatusStyle(token, {\n status: 'error',\n bg: token.colorErrorBg,\n hoverBg: token.colorErrorBgHover,\n activeBorderColor: token.colorError,\n color: token.colorError\n })), genFilledStatusStyle(token, {\n status: 'warning',\n bg: token.colorWarningBg,\n hoverBg: token.colorWarningBgHover,\n activeBorderColor: token.colorWarning,\n color: token.colorWarning\n })), {\n [`&${token.componentCls}-disabled`]: {\n [`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {\n borderColor: token.colorBorder,\n background: token.colorBgContainerDisabled,\n color: token.colorTextDisabled\n }\n },\n [`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {\n background: token.colorBgContainer,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorSplit}`\n }\n })\n});\n// =====================================================\n// == Borderless ==\n// =====================================================\nconst genBorderlessStyle = token => ({\n '&-borderless': {\n [`${token.componentCls}-selector`]: {\n background: 'transparent',\n borderColor: 'transparent'\n },\n [`&${token.componentCls}-disabled`]: {\n [`&:not(${token.componentCls}-customize-input) ${token.componentCls}-selector`]: {\n color: token.colorTextDisabled\n }\n },\n [`&${token.componentCls}-multiple ${token.componentCls}-selection-item`]: {\n background: token.multipleItemBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`\n },\n // Status\n [`&${token.componentCls}-status-error`]: {\n [`${token.componentCls}-selection-item`]: {\n color: token.colorError\n }\n },\n [`&${token.componentCls}-status-warning`]: {\n [`${token.componentCls}-selection-item`]: {\n color: token.colorWarning\n }\n }\n }\n});\nconst genVariantsStyle = token => ({\n [token.componentCls]: Object.assign(Object.assign(Object.assign({}, genOutlinedStyle(token)), genFilledStyle(token)), genBorderlessStyle(token))\n});\nvar _default = exports.default = genVariantsStyle;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useIcons;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckOutlined = _interopRequireDefault(require(\"@ant-design/icons/CheckOutlined\"));\nvar _CloseCircleFilled = _interopRequireDefault(require(\"@ant-design/icons/CloseCircleFilled\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _DownOutlined = _interopRequireDefault(require(\"@ant-design/icons/DownOutlined\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _SearchOutlined = _interopRequireDefault(require(\"@ant-design/icons/SearchOutlined\"));\nvar _warning = require(\"../_util/warning\");\nfunction useIcons(_ref) {\n let {\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n hasFeedback,\n prefixCls,\n showSuffixIcon,\n feedbackIcon,\n showArrow,\n componentName\n } = _ref;\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)(componentName);\n warning.deprecated(!clearIcon, 'clearIcon', 'allowClear={{ clearIcon: React.ReactNode }}');\n }\n // Clear Icon\n const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /*#__PURE__*/React.createElement(_CloseCircleFilled.default, null);\n // Validation Feedback Icon\n const getSuffixIconNode = arrowIcon => {\n if (suffixIcon === null && !hasFeedback && !showArrow) {\n return null;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, showSuffixIcon !== false && arrowIcon, hasFeedback && feedbackIcon);\n };\n // Arrow item icon\n let mergedSuffixIcon = null;\n if (suffixIcon !== undefined) {\n mergedSuffixIcon = getSuffixIconNode(suffixIcon);\n } else if (loading) {\n mergedSuffixIcon = getSuffixIconNode(/*#__PURE__*/React.createElement(_LoadingOutlined.default, {\n spin: true\n }));\n } else {\n const iconCls = `${prefixCls}-suffix`;\n mergedSuffixIcon = _ref2 => {\n let {\n open,\n showSearch\n } = _ref2;\n if (open && showSearch) {\n return getSuffixIconNode(/*#__PURE__*/React.createElement(_SearchOutlined.default, {\n className: iconCls\n }));\n }\n return getSuffixIconNode(/*#__PURE__*/React.createElement(_DownOutlined.default, {\n className: iconCls\n }));\n };\n }\n // Checked item icon\n let mergedItemIcon = null;\n if (menuItemSelectedIcon !== undefined) {\n mergedItemIcon = menuItemSelectedIcon;\n } else if (multiple) {\n mergedItemIcon = /*#__PURE__*/React.createElement(_CheckOutlined.default, null);\n } else {\n mergedItemIcon = null;\n }\n let mergedRemoveIcon = null;\n if (removeIcon !== undefined) {\n mergedRemoveIcon = removeIcon;\n } else {\n mergedRemoveIcon = /*#__PURE__*/React.createElement(_CloseOutlined.default, null);\n }\n return {\n clearIcon: mergedClearIcon,\n suffixIcon: mergedSuffixIcon,\n itemIcon: mergedItemIcon,\n removeIcon: mergedRemoveIcon\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useShowArrow;\n/**\n * Since Select, TreeSelect, Cascader is same Select like component.\n * We just use same hook to handle this logic.\n *\n * If `suffixIcon` is not equal to `null`, always show it.\n */\nfunction useShowArrow(suffixIcon, showArrow) {\n return showArrow !== undefined ? showArrow : suffixIcon !== null;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _configProvider = require(\"../config-provider\");\nvar _Element = _interopRequireDefault(require(\"./Element\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst SkeletonAvatar = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n active,\n shape = 'circle',\n size = 'default'\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('skeleton', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const otherProps = (0, _omit.default)(props, ['prefixCls', 'className']);\n const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-element`, {\n [`${prefixCls}-active`]: active\n }, className, rootClassName, hashId, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: cls\n }, /*#__PURE__*/React.createElement(_Element.default, Object.assign({\n prefixCls: `${prefixCls}-avatar`,\n shape: shape,\n size: size\n }, otherProps))));\n};\nvar _default = exports.default = SkeletonAvatar;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _configProvider = require(\"../config-provider\");\nvar _Element = _interopRequireDefault(require(\"./Element\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst SkeletonButton = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n active,\n block = false,\n size = 'default'\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('skeleton', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const otherProps = (0, _omit.default)(props, ['prefixCls']);\n const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-element`, {\n [`${prefixCls}-active`]: active,\n [`${prefixCls}-block`]: block\n }, className, rootClassName, hashId, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: cls\n }, /*#__PURE__*/React.createElement(_Element.default, Object.assign({\n prefixCls: `${prefixCls}-button`,\n size: size\n }, otherProps))));\n};\nvar _default = exports.default = SkeletonButton;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst Element = props => {\n const {\n prefixCls,\n className,\n style,\n size,\n shape\n } = props;\n const sizeCls = (0, _classnames.default)({\n [`${prefixCls}-lg`]: size === 'large',\n [`${prefixCls}-sm`]: size === 'small'\n });\n const shapeCls = (0, _classnames.default)({\n [`${prefixCls}-circle`]: shape === 'circle',\n [`${prefixCls}-square`]: shape === 'square',\n [`${prefixCls}-round`]: shape === 'round'\n });\n const sizeStyle = React.useMemo(() => typeof size === 'number' ? {\n width: size,\n height: size,\n lineHeight: `${size}px`\n } : {}, [size]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(prefixCls, sizeCls, shapeCls, className),\n style: Object.assign(Object.assign({}, sizeStyle), style)\n });\n};\nvar _default = exports.default = Element;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst path = 'M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z';\nconst SkeletonImage = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n active\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('skeleton', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-element`, {\n [`${prefixCls}-active`]: active\n }, className, rootClassName, hashId, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: cls\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-image`, className),\n style: style\n }, /*#__PURE__*/React.createElement(\"svg\", {\n viewBox: \"0 0 1098 1024\",\n xmlns: \"http://www.w3.org/2000/svg\",\n className: `${prefixCls}-image-svg`\n }, /*#__PURE__*/React.createElement(\"title\", null, \"Image placeholder\"), /*#__PURE__*/React.createElement(\"path\", {\n d: path,\n className: `${prefixCls}-image-path`\n })))));\n};\nvar _default = exports.default = SkeletonImage;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _configProvider = require(\"../config-provider\");\nvar _Element = _interopRequireDefault(require(\"./Element\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst SkeletonInput = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n active,\n block,\n size = 'default'\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('skeleton', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const otherProps = (0, _omit.default)(props, ['prefixCls']);\n const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-element`, {\n [`${prefixCls}-active`]: active,\n [`${prefixCls}-block`]: block\n }, className, rootClassName, hashId, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: cls\n }, /*#__PURE__*/React.createElement(_Element.default, Object.assign({\n prefixCls: `${prefixCls}-input`,\n size: size\n }, otherProps))));\n};\nvar _default = exports.default = SkeletonInput;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst SkeletonNode = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n active,\n children\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('skeleton', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-element`, {\n [`${prefixCls}-active`]: active\n }, hashId, className, rootClassName, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: cls\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-image`, className),\n style: style\n }, children)));\n};\nvar _default = exports.default = SkeletonNode;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst getWidth = (index, props) => {\n const {\n width,\n rows = 2\n } = props;\n if (Array.isArray(width)) {\n return width[index];\n }\n // last paragraph\n if (rows - 1 === index) {\n return width;\n }\n return undefined;\n};\nconst Paragraph = props => {\n const {\n prefixCls,\n className,\n style,\n rows\n } = props;\n const rowList = (0, _toConsumableArray2.default)(new Array(rows)).map((_, index) => (\n /*#__PURE__*/\n // eslint-disable-next-line react/no-array-index-key\n React.createElement(\"li\", {\n key: index,\n style: {\n width: getWidth(index, props)\n }\n })));\n return /*#__PURE__*/React.createElement(\"ul\", {\n className: (0, _classnames.default)(prefixCls, className),\n style: style\n }, rowList);\n};\nvar _default = exports.default = Paragraph;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar _Avatar = _interopRequireDefault(require(\"./Avatar\"));\nvar _Button = _interopRequireDefault(require(\"./Button\"));\nvar _Element = _interopRequireDefault(require(\"./Element\"));\nvar _Image = _interopRequireDefault(require(\"./Image\"));\nvar _Input = _interopRequireDefault(require(\"./Input\"));\nvar _Node = _interopRequireDefault(require(\"./Node\"));\nvar _Paragraph = _interopRequireDefault(require(\"./Paragraph\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _Title = _interopRequireDefault(require(\"./Title\"));\nfunction getComponentProps(prop) {\n if (prop && typeof prop === 'object') {\n return prop;\n }\n return {};\n}\nfunction getAvatarBasicProps(hasTitle, hasParagraph) {\n if (hasTitle && !hasParagraph) {\n // Square avatar\n return {\n size: 'large',\n shape: 'square'\n };\n }\n return {\n size: 'large',\n shape: 'circle'\n };\n}\nfunction getTitleBasicProps(hasAvatar, hasParagraph) {\n if (!hasAvatar && hasParagraph) {\n return {\n width: '38%'\n };\n }\n if (hasAvatar && hasParagraph) {\n return {\n width: '50%'\n };\n }\n return {};\n}\nfunction getParagraphBasicProps(hasAvatar, hasTitle) {\n const basicProps = {};\n // Width\n if (!hasAvatar || !hasTitle) {\n basicProps.width = '61%';\n }\n // Rows\n if (!hasAvatar && hasTitle) {\n basicProps.rows = 3;\n } else {\n basicProps.rows = 2;\n }\n return basicProps;\n}\nconst Skeleton = props => {\n const {\n prefixCls: customizePrefixCls,\n loading,\n className,\n rootClassName,\n style,\n children,\n avatar = false,\n title = true,\n paragraph = true,\n active,\n round\n } = props;\n const {\n getPrefixCls,\n direction,\n skeleton\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('skeleton', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n if (loading || !('loading' in props)) {\n const hasAvatar = !!avatar;\n const hasTitle = !!title;\n const hasParagraph = !!paragraph;\n // Avatar\n let avatarNode;\n if (hasAvatar) {\n const avatarProps = Object.assign(Object.assign({\n prefixCls: `${prefixCls}-avatar`\n }, getAvatarBasicProps(hasTitle, hasParagraph)), getComponentProps(avatar));\n // We direct use SkeletonElement as avatar in skeleton internal.\n avatarNode = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-header`\n }, /*#__PURE__*/React.createElement(_Element.default, Object.assign({}, avatarProps)));\n }\n let contentNode;\n if (hasTitle || hasParagraph) {\n // Title\n let $title;\n if (hasTitle) {\n const titleProps = Object.assign(Object.assign({\n prefixCls: `${prefixCls}-title`\n }, getTitleBasicProps(hasAvatar, hasParagraph)), getComponentProps(title));\n $title = /*#__PURE__*/React.createElement(_Title.default, Object.assign({}, titleProps));\n }\n // Paragraph\n let paragraphNode;\n if (hasParagraph) {\n const paragraphProps = Object.assign(Object.assign({\n prefixCls: `${prefixCls}-paragraph`\n }, getParagraphBasicProps(hasAvatar, hasTitle)), getComponentProps(paragraph));\n paragraphNode = /*#__PURE__*/React.createElement(_Paragraph.default, Object.assign({}, paragraphProps));\n }\n contentNode = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-content`\n }, $title, paragraphNode);\n }\n const cls = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-with-avatar`]: hasAvatar,\n [`${prefixCls}-active`]: active,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-round`]: round\n }, skeleton === null || skeleton === void 0 ? void 0 : skeleton.className, className, rootClassName, hashId, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: cls,\n style: Object.assign(Object.assign({}, skeleton === null || skeleton === void 0 ? void 0 : skeleton.style), style)\n }, avatarNode, contentNode));\n }\n return children !== null && children !== void 0 ? children : null;\n};\nSkeleton.Button = _Button.default;\nSkeleton.Avatar = _Avatar.default;\nSkeleton.Input = _Input.default;\nSkeleton.Image = _Image.default;\nSkeleton.Node = _Node.default;\nif (process.env.NODE_ENV !== 'production') {\n Skeleton.displayName = 'Skeleton';\n}\nvar _default = exports.default = Skeleton;","\"use strict\";\n\"use client\";\n\n/* eslint-disable jsx-a11y/heading-has-content */\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst Title = _ref => {\n let {\n prefixCls,\n className,\n width,\n style\n } = _ref;\n return (\n /*#__PURE__*/\n // biome-ignore lint/a11y/useHeadingContent: HOC here\n React.createElement(\"h3\", {\n className: (0, _classnames.default)(prefixCls, className),\n style: Object.assign({\n width\n }, style)\n })\n );\n};\nvar _default = exports.default = Title;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Skeleton = _interopRequireDefault(require(\"./Skeleton\"));\nvar _default = exports.default = _Skeleton.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _internal = require(\"../../theme/internal\");\nconst skeletonClsLoading = new _cssinjs.Keyframes(`ant-skeleton-loading`, {\n '0%': {\n backgroundPosition: '100% 50%'\n },\n '100%': {\n backgroundPosition: '0 50%'\n }\n});\nconst genSkeletonElementCommonSize = size => ({\n height: size,\n lineHeight: (0, _cssinjs.unit)(size)\n});\nconst genSkeletonElementAvatarSize = size => Object.assign({\n width: size\n}, genSkeletonElementCommonSize(size));\nconst genSkeletonColor = token => ({\n background: token.skeletonLoadingBackground,\n backgroundSize: '400% 100%',\n animationName: skeletonClsLoading,\n animationDuration: token.skeletonLoadingMotionDuration,\n animationTimingFunction: 'ease',\n animationIterationCount: 'infinite'\n});\nconst genSkeletonElementInputSize = (size, calc) => Object.assign({\n width: calc(size).mul(5).equal(),\n minWidth: calc(size).mul(5).equal()\n}, genSkeletonElementCommonSize(size));\nconst genSkeletonElementAvatar = token => {\n const {\n skeletonAvatarCls,\n gradientFromColor,\n controlHeight,\n controlHeightLG,\n controlHeightSM\n } = token;\n return {\n [skeletonAvatarCls]: Object.assign({\n display: 'inline-block',\n verticalAlign: 'top',\n background: gradientFromColor\n }, genSkeletonElementAvatarSize(controlHeight)),\n [`${skeletonAvatarCls}${skeletonAvatarCls}-circle`]: {\n borderRadius: '50%'\n },\n [`${skeletonAvatarCls}${skeletonAvatarCls}-lg`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightLG)),\n [`${skeletonAvatarCls}${skeletonAvatarCls}-sm`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightSM))\n };\n};\nconst genSkeletonElementInput = token => {\n const {\n controlHeight,\n borderRadiusSM,\n skeletonInputCls,\n controlHeightLG,\n controlHeightSM,\n gradientFromColor,\n calc\n } = token;\n return {\n [skeletonInputCls]: Object.assign({\n display: 'inline-block',\n verticalAlign: 'top',\n background: gradientFromColor,\n borderRadius: borderRadiusSM\n }, genSkeletonElementInputSize(controlHeight, calc)),\n [`${skeletonInputCls}-lg`]: Object.assign({}, genSkeletonElementInputSize(controlHeightLG, calc)),\n [`${skeletonInputCls}-sm`]: Object.assign({}, genSkeletonElementInputSize(controlHeightSM, calc))\n };\n};\nconst genSkeletonElementImageSize = size => Object.assign({\n width: size\n}, genSkeletonElementCommonSize(size));\nconst genSkeletonElementImage = token => {\n const {\n skeletonImageCls,\n imageSizeBase,\n gradientFromColor,\n borderRadiusSM,\n calc\n } = token;\n return {\n [skeletonImageCls]: Object.assign(Object.assign({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'middle',\n background: gradientFromColor,\n borderRadius: borderRadiusSM\n }, genSkeletonElementImageSize(calc(imageSizeBase).mul(2).equal())), {\n [`${skeletonImageCls}-path`]: {\n fill: '#bfbfbf'\n },\n [`${skeletonImageCls}-svg`]: Object.assign(Object.assign({}, genSkeletonElementImageSize(imageSizeBase)), {\n maxWidth: calc(imageSizeBase).mul(4).equal(),\n maxHeight: calc(imageSizeBase).mul(4).equal()\n }),\n [`${skeletonImageCls}-svg${skeletonImageCls}-svg-circle`]: {\n borderRadius: '50%'\n }\n }),\n [`${skeletonImageCls}${skeletonImageCls}-circle`]: {\n borderRadius: '50%'\n }\n };\n};\nconst genSkeletonElementButtonShape = (token, size, buttonCls) => {\n const {\n skeletonButtonCls\n } = token;\n return {\n [`${buttonCls}${skeletonButtonCls}-circle`]: {\n width: size,\n minWidth: size,\n borderRadius: '50%'\n },\n [`${buttonCls}${skeletonButtonCls}-round`]: {\n borderRadius: size\n }\n };\n};\nconst genSkeletonElementButtonSize = (size, calc) => Object.assign({\n width: calc(size).mul(2).equal(),\n minWidth: calc(size).mul(2).equal()\n}, genSkeletonElementCommonSize(size));\nconst genSkeletonElementButton = token => {\n const {\n borderRadiusSM,\n skeletonButtonCls,\n controlHeight,\n controlHeightLG,\n controlHeightSM,\n gradientFromColor,\n calc\n } = token;\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({\n [skeletonButtonCls]: Object.assign({\n display: 'inline-block',\n verticalAlign: 'top',\n background: gradientFromColor,\n borderRadius: borderRadiusSM,\n width: calc(controlHeight).mul(2).equal(),\n minWidth: calc(controlHeight).mul(2).equal()\n }, genSkeletonElementButtonSize(controlHeight, calc))\n }, genSkeletonElementButtonShape(token, controlHeight, skeletonButtonCls)), {\n [`${skeletonButtonCls}-lg`]: Object.assign({}, genSkeletonElementButtonSize(controlHeightLG, calc))\n }), genSkeletonElementButtonShape(token, controlHeightLG, `${skeletonButtonCls}-lg`)), {\n [`${skeletonButtonCls}-sm`]: Object.assign({}, genSkeletonElementButtonSize(controlHeightSM, calc))\n }), genSkeletonElementButtonShape(token, controlHeightSM, `${skeletonButtonCls}-sm`));\n};\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n skeletonAvatarCls,\n skeletonTitleCls,\n skeletonParagraphCls,\n skeletonButtonCls,\n skeletonInputCls,\n skeletonImageCls,\n controlHeight,\n controlHeightLG,\n controlHeightSM,\n gradientFromColor,\n padding,\n marginSM,\n borderRadius,\n titleHeight,\n blockRadius,\n paragraphLiHeight,\n controlHeightXS,\n paragraphMarginTop\n } = token;\n return {\n [componentCls]: {\n display: 'table',\n width: '100%',\n [`${componentCls}-header`]: {\n display: 'table-cell',\n paddingInlineEnd: padding,\n verticalAlign: 'top',\n // Avatar\n [skeletonAvatarCls]: Object.assign({\n display: 'inline-block',\n verticalAlign: 'top',\n background: gradientFromColor\n }, genSkeletonElementAvatarSize(controlHeight)),\n [`${skeletonAvatarCls}-circle`]: {\n borderRadius: '50%'\n },\n [`${skeletonAvatarCls}-lg`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightLG)),\n [`${skeletonAvatarCls}-sm`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightSM))\n },\n [`${componentCls}-content`]: {\n display: 'table-cell',\n width: '100%',\n verticalAlign: 'top',\n // Title\n [skeletonTitleCls]: {\n width: '100%',\n height: titleHeight,\n background: gradientFromColor,\n borderRadius: blockRadius,\n [`+ ${skeletonParagraphCls}`]: {\n marginBlockStart: controlHeightSM\n }\n },\n // paragraph\n [skeletonParagraphCls]: {\n padding: 0,\n '> li': {\n width: '100%',\n height: paragraphLiHeight,\n listStyle: 'none',\n background: gradientFromColor,\n borderRadius: blockRadius,\n '+ li': {\n marginBlockStart: controlHeightXS\n }\n }\n },\n [`${skeletonParagraphCls}> li:last-child:not(:first-child):not(:nth-child(2))`]: {\n width: '61%'\n }\n },\n [`&-round ${componentCls}-content`]: {\n [`${skeletonTitleCls}, ${skeletonParagraphCls} > li`]: {\n borderRadius\n }\n }\n },\n [`${componentCls}-with-avatar ${componentCls}-content`]: {\n // Title\n [skeletonTitleCls]: {\n marginBlockStart: marginSM,\n [`+ ${skeletonParagraphCls}`]: {\n marginBlockStart: paragraphMarginTop\n }\n }\n },\n // Skeleton element\n [`${componentCls}${componentCls}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({\n display: 'inline-block',\n width: 'auto'\n }, genSkeletonElementButton(token)), genSkeletonElementAvatar(token)), genSkeletonElementInput(token)), genSkeletonElementImage(token)),\n // Skeleton Block Button, Input\n [`${componentCls}${componentCls}-block`]: {\n width: '100%',\n [skeletonButtonCls]: {\n width: '100%'\n },\n [skeletonInputCls]: {\n width: '100%'\n }\n },\n // With active animation\n [`${componentCls}${componentCls}-active`]: {\n [`\n ${skeletonTitleCls},\n ${skeletonParagraphCls} > li,\n ${skeletonAvatarCls},\n ${skeletonButtonCls},\n ${skeletonInputCls},\n ${skeletonImageCls}\n `]: Object.assign({}, genSkeletonColor(token))\n }\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => {\n const {\n colorFillContent,\n colorFill\n } = token;\n const gradientFromColor = colorFillContent;\n const gradientToColor = colorFill;\n return {\n color: gradientFromColor,\n colorGradientEnd: gradientToColor,\n gradientFromColor,\n gradientToColor,\n titleHeight: token.controlHeight / 2,\n blockRadius: token.borderRadiusSM,\n paragraphMarginTop: token.marginLG + token.marginXXS,\n paragraphLiHeight: token.controlHeight / 2\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Skeleton', token => {\n const {\n componentCls,\n calc\n } = token;\n const skeletonToken = (0, _internal.mergeToken)(token, {\n skeletonAvatarCls: `${componentCls}-avatar`,\n skeletonTitleCls: `${componentCls}-title`,\n skeletonParagraphCls: `${componentCls}-paragraph`,\n skeletonButtonCls: `${componentCls}-button`,\n skeletonInputCls: `${componentCls}-input`,\n skeletonImageCls: `${componentCls}-image`,\n imageSizeBase: calc(token.controlHeight).mul(1.5).equal(),\n borderRadius: 100,\n // Large number to make capsule shape\n skeletonLoadingBackground: `linear-gradient(90deg, ${token.gradientFromColor} 25%, ${token.gradientToColor} 37%, ${token.gradientFromColor} 63%)`,\n skeletonLoadingMotionDuration: '1.4s'\n });\n return [genBaseStyle(skeletonToken)];\n}, prepareComponentToken, {\n deprecatedTokens: [['color', 'gradientFromColor'], ['colorGradientEnd', 'gradientToColor']]\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\n/** @private Internal context. Do not use in your production. */\nconst SliderInternalContext = /*#__PURE__*/(0, _react.createContext)({});\nvar _default = exports.default = SliderInternalContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\nconst SliderTooltip = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n open,\n draggingDelete\n } = props;\n const innerRef = (0, _react.useRef)(null);\n const mergedOpen = open && !draggingDelete;\n const rafRef = (0, _react.useRef)(null);\n function cancelKeepAlign() {\n _raf.default.cancel(rafRef.current);\n rafRef.current = null;\n }\n function keepAlign() {\n rafRef.current = (0, _raf.default)(() => {\n var _a;\n (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.forceAlign();\n rafRef.current = null;\n });\n }\n React.useEffect(() => {\n if (mergedOpen) {\n keepAlign();\n } else {\n cancelKeepAlign();\n }\n return cancelKeepAlign;\n }, [mergedOpen, props.title]);\n return /*#__PURE__*/React.createElement(_tooltip.default, Object.assign({\n ref: (0, _ref.composeRef)(innerRef, ref)\n }, props, {\n open: mergedOpen\n }));\n});\nif (process.env.NODE_ENV !== 'production') {\n SliderTooltip.displayName = 'SliderTooltip';\n}\nvar _default = exports.default = SliderTooltip;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcSlider = _interopRequireDefault(require(\"rc-slider\"));\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _SliderTooltip = _interopRequireDefault(require(\"./SliderTooltip\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _Context = _interopRequireDefault(require(\"./Context\"));\nvar _useRafLock = _interopRequireDefault(require(\"./useRafLock\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction getTipFormatter(tipFormatter, legacyTipFormatter) {\n if (tipFormatter || tipFormatter === null) {\n return tipFormatter;\n }\n if (legacyTipFormatter || legacyTipFormatter === null) {\n return legacyTipFormatter;\n }\n return val => typeof val === 'number' ? val.toString() : '';\n}\nconst Slider = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n range,\n className,\n rootClassName,\n style,\n disabled,\n // Deprecated Props\n tooltipPrefixCls: legacyTooltipPrefixCls,\n tipFormatter: legacyTipFormatter,\n tooltipVisible: legacyTooltipVisible,\n getTooltipPopupContainer: legacyGetTooltipPopupContainer,\n tooltipPlacement: legacyTooltipPlacement,\n tooltip = {},\n onChangeComplete\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"range\", \"className\", \"rootClassName\", \"style\", \"disabled\", \"tooltipPrefixCls\", \"tipFormatter\", \"tooltipVisible\", \"getTooltipPopupContainer\", \"tooltipPlacement\", \"tooltip\", \"onChangeComplete\"]);\n const {\n vertical\n } = props;\n const {\n direction: contextDirection,\n slider,\n getPrefixCls,\n getPopupContainer\n } = _react.default.useContext(_configProvider.ConfigContext);\n const contextDisabled = _react.default.useContext(_DisabledContext.default);\n const mergedDisabled = disabled !== null && disabled !== void 0 ? disabled : contextDisabled;\n // ============================= Context ==============================\n const {\n handleRender: contextHandleRender,\n direction: internalContextDirection\n } = _react.default.useContext(_Context.default);\n const mergedDirection = internalContextDirection || contextDirection;\n const isRTL = mergedDirection === 'rtl';\n // =============================== Open ===============================\n const [hoverOpen, setHoverOpen] = (0, _useRafLock.default)();\n const [focusOpen, setFocusOpen] = (0, _useRafLock.default)();\n const tooltipProps = Object.assign({}, tooltip);\n const {\n open: tooltipOpen,\n placement: tooltipPlacement,\n getPopupContainer: getTooltipPopupContainer,\n prefixCls: customizeTooltipPrefixCls,\n formatter: tipFormatter\n } = tooltipProps;\n const lockOpen = tooltipOpen !== null && tooltipOpen !== void 0 ? tooltipOpen : legacyTooltipVisible;\n const activeOpen = (hoverOpen || focusOpen) && lockOpen !== false;\n const mergedTipFormatter = getTipFormatter(tipFormatter, legacyTipFormatter);\n // ============================= Change ==============================\n const [dragging, setDragging] = (0, _useRafLock.default)();\n const onInternalChangeComplete = nextValues => {\n onChangeComplete === null || onChangeComplete === void 0 ? void 0 : onChangeComplete(nextValues);\n setDragging(false);\n };\n // ============================ Placement ============================\n const getTooltipPlacement = (placement, vert) => {\n if (placement) {\n return placement;\n }\n if (!vert) {\n return 'top';\n }\n return isRTL ? 'left' : 'right';\n };\n // ============================== Style ===============================\n const prefixCls = getPrefixCls('slider', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const cls = (0, _classnames.default)(className, slider === null || slider === void 0 ? void 0 : slider.className, rootClassName, {\n [`${prefixCls}-rtl`]: isRTL,\n [`${prefixCls}-lock`]: dragging\n }, hashId, cssVarCls);\n // make reverse default on rtl direction\n if (isRTL && !restProps.vertical) {\n restProps.reverse = !restProps.reverse;\n }\n // ============================= Warning ==============================\n // Warning for deprecated usage\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Slider');\n [['tooltipPrefixCls', 'prefixCls'], ['getTooltipPopupContainer', 'getPopupContainer'], ['tipFormatter', 'formatter'], ['tooltipPlacement', 'placement'], ['tooltipVisible', 'open']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, `tooltip.${newName}`);\n });\n }\n // ============================== Handle ==============================\n _react.default.useEffect(() => {\n const onMouseUp = () => {\n // Delay for 1 frame to make the click to enable hide tooltip\n // even when the handle is focused\n (0, _raf.default)(() => {\n setFocusOpen(false);\n }, 1);\n };\n document.addEventListener('mouseup', onMouseUp);\n return () => {\n document.removeEventListener('mouseup', onMouseUp);\n };\n }, []);\n const useActiveTooltipHandle = range && !lockOpen;\n const handleRender = contextHandleRender || ((node, info) => {\n const {\n index\n } = info;\n const nodeProps = node.props;\n function proxyEvent(eventName, event, triggerRestPropsEvent) {\n var _a, _b, _c, _d;\n if (triggerRestPropsEvent) {\n (_b = (_a = restProps)[eventName]) === null || _b === void 0 ? void 0 : _b.call(_a, event);\n }\n (_d = (_c = nodeProps)[eventName]) === null || _d === void 0 ? void 0 : _d.call(_c, event);\n }\n const passedProps = Object.assign(Object.assign({}, nodeProps), {\n onMouseEnter: e => {\n setHoverOpen(true);\n proxyEvent('onMouseEnter', e);\n },\n onMouseLeave: e => {\n setHoverOpen(false);\n proxyEvent('onMouseLeave', e);\n },\n onMouseDown: e => {\n setFocusOpen(true);\n setDragging(true);\n proxyEvent('onMouseDown', e);\n },\n onFocus: e => {\n var _a;\n setFocusOpen(true);\n (_a = restProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(restProps, e);\n proxyEvent('onFocus', e, true);\n },\n onBlur: e => {\n var _a;\n setFocusOpen(false);\n (_a = restProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(restProps, e);\n proxyEvent('onBlur', e, true);\n }\n });\n const cloneNode = /*#__PURE__*/_react.default.cloneElement(node, passedProps);\n const open = (!!lockOpen || activeOpen) && mergedTipFormatter !== null;\n // Wrap on handle with Tooltip when is single mode or multiple with all show tooltip\n if (!useActiveTooltipHandle) {\n return /*#__PURE__*/_react.default.createElement(_SliderTooltip.default, Object.assign({}, tooltipProps, {\n prefixCls: getPrefixCls('tooltip', customizeTooltipPrefixCls !== null && customizeTooltipPrefixCls !== void 0 ? customizeTooltipPrefixCls : legacyTooltipPrefixCls),\n title: mergedTipFormatter ? mergedTipFormatter(info.value) : '',\n open: open,\n placement: getTooltipPlacement(tooltipPlacement !== null && tooltipPlacement !== void 0 ? tooltipPlacement : legacyTooltipPlacement, vertical),\n key: index,\n overlayClassName: `${prefixCls}-tooltip`,\n getPopupContainer: getTooltipPopupContainer || legacyGetTooltipPopupContainer || getPopupContainer\n }), cloneNode);\n }\n return cloneNode;\n });\n // ========================== Active Handle ===========================\n const activeHandleRender = useActiveTooltipHandle ? (handle, info) => {\n const cloneNode = /*#__PURE__*/_react.default.cloneElement(handle, {\n style: Object.assign(Object.assign({}, handle.props.style), {\n visibility: 'hidden'\n })\n });\n return /*#__PURE__*/_react.default.createElement(_SliderTooltip.default, Object.assign({}, tooltipProps, {\n prefixCls: getPrefixCls('tooltip', customizeTooltipPrefixCls !== null && customizeTooltipPrefixCls !== void 0 ? customizeTooltipPrefixCls : legacyTooltipPrefixCls),\n title: mergedTipFormatter ? mergedTipFormatter(info.value) : '',\n open: mergedTipFormatter !== null && activeOpen,\n placement: getTooltipPlacement(tooltipPlacement !== null && tooltipPlacement !== void 0 ? tooltipPlacement : legacyTooltipPlacement, vertical),\n key: \"tooltip\",\n overlayClassName: `${prefixCls}-tooltip`,\n getPopupContainer: getTooltipPopupContainer || legacyGetTooltipPopupContainer || getPopupContainer,\n draggingDelete: info.draggingDelete\n }), cloneNode);\n } : undefined;\n // ============================== Render ==============================\n const mergedStyle = Object.assign(Object.assign({}, slider === null || slider === void 0 ? void 0 : slider.style), style);\n return wrapCSSVar(\n /*#__PURE__*/\n // @ts-ignore\n _react.default.createElement(_rcSlider.default, Object.assign({}, restProps, {\n step: restProps.step,\n range: range,\n className: cls,\n style: mergedStyle,\n disabled: mergedDisabled,\n ref: ref,\n prefixCls: prefixCls,\n handleRender: handleRender,\n activeHandleRender: activeHandleRender,\n onChangeComplete: onInternalChangeComplete\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Slider.displayName = 'Slider';\n}\nvar _default = exports.default = Slider;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n antCls,\n controlSize,\n dotSize,\n marginFull,\n marginPart,\n colorFillContentHover,\n handleColorDisabled,\n calc,\n handleSize,\n handleSizeHover,\n handleActiveColor,\n handleActiveOutlineColor,\n handleLineWidth,\n handleLineWidthHover,\n motionDurationMid\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n height: controlSize,\n margin: `${(0, _cssinjs.unit)(marginPart)} ${(0, _cssinjs.unit)(marginFull)}`,\n padding: 0,\n cursor: 'pointer',\n touchAction: 'none',\n '&-vertical': {\n margin: `${(0, _cssinjs.unit)(marginFull)} ${(0, _cssinjs.unit)(marginPart)}`\n },\n [`${componentCls}-rail`]: {\n position: 'absolute',\n backgroundColor: token.railBg,\n borderRadius: token.borderRadiusXS,\n transition: `background-color ${motionDurationMid}`\n },\n [`${componentCls}-track,${componentCls}-tracks`]: {\n position: 'absolute',\n transition: `background-color ${motionDurationMid}`\n },\n [`${componentCls}-track`]: {\n backgroundColor: token.trackBg,\n borderRadius: token.borderRadiusXS\n },\n [`${componentCls}-track-draggable`]: {\n boxSizing: 'content-box',\n backgroundClip: 'content-box',\n border: 'solid rgba(0,0,0,0)'\n },\n '&:hover': {\n [`${componentCls}-rail`]: {\n backgroundColor: token.railHoverBg\n },\n [`${componentCls}-track`]: {\n backgroundColor: token.trackHoverBg\n },\n [`${componentCls}-dot`]: {\n borderColor: colorFillContentHover\n },\n [`${componentCls}-handle::after`]: {\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(handleLineWidth)} ${token.colorPrimaryBorderHover}`\n },\n [`${componentCls}-dot-active`]: {\n borderColor: token.dotActiveBorderColor\n }\n },\n [`${componentCls}-handle`]: {\n position: 'absolute',\n width: handleSize,\n height: handleSize,\n outline: 'none',\n userSelect: 'none',\n // Dragging status\n '&-dragging-delete': {\n opacity: 0\n },\n // 扩大选区\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n insetInlineStart: calc(handleLineWidth).mul(-1).equal(),\n insetBlockStart: calc(handleLineWidth).mul(-1).equal(),\n width: calc(handleSize).add(calc(handleLineWidth).mul(2)).equal(),\n height: calc(handleSize).add(calc(handleLineWidth).mul(2)).equal(),\n backgroundColor: 'transparent'\n },\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n width: handleSize,\n height: handleSize,\n backgroundColor: token.colorBgElevated,\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(handleLineWidth)} ${token.handleColor}`,\n outline: `0px solid transparent`,\n borderRadius: '50%',\n cursor: 'pointer',\n transition: `\n inset-inline-start ${motionDurationMid},\n inset-block-start ${motionDurationMid},\n width ${motionDurationMid},\n height ${motionDurationMid},\n box-shadow ${motionDurationMid},\n outline ${motionDurationMid}\n `\n },\n '&:hover, &:active, &:focus': {\n '&::before': {\n insetInlineStart: calc(handleSizeHover).sub(handleSize).div(2).add(handleLineWidthHover).mul(-1).equal(),\n insetBlockStart: calc(handleSizeHover).sub(handleSize).div(2).add(handleLineWidthHover).mul(-1).equal(),\n width: calc(handleSizeHover).add(calc(handleLineWidthHover).mul(2)).equal(),\n height: calc(handleSizeHover).add(calc(handleLineWidthHover).mul(2)).equal()\n },\n '&::after': {\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(handleLineWidthHover)} ${handleActiveColor}`,\n outline: `6px solid ${handleActiveOutlineColor}`,\n width: handleSizeHover,\n height: handleSizeHover,\n insetInlineStart: token.calc(handleSize).sub(handleSizeHover).div(2).equal(),\n insetBlockStart: token.calc(handleSize).sub(handleSizeHover).div(2).equal()\n }\n }\n },\n [`&-lock ${componentCls}-handle`]: {\n '&::before, &::after': {\n transition: 'none'\n }\n },\n [`${componentCls}-mark`]: {\n position: 'absolute',\n fontSize: token.fontSize\n },\n [`${componentCls}-mark-text`]: {\n position: 'absolute',\n display: 'inline-block',\n color: token.colorTextDescription,\n textAlign: 'center',\n wordBreak: 'keep-all',\n cursor: 'pointer',\n userSelect: 'none',\n '&-active': {\n color: token.colorText\n }\n },\n [`${componentCls}-step`]: {\n position: 'absolute',\n background: 'transparent',\n pointerEvents: 'none'\n },\n [`${componentCls}-dot`]: {\n position: 'absolute',\n width: dotSize,\n height: dotSize,\n backgroundColor: token.colorBgElevated,\n border: `${(0, _cssinjs.unit)(handleLineWidth)} solid ${token.dotBorderColor}`,\n borderRadius: '50%',\n cursor: 'pointer',\n transition: `border-color ${token.motionDurationSlow}`,\n pointerEvents: 'auto',\n '&-active': {\n borderColor: token.dotActiveBorderColor\n }\n },\n [`&${componentCls}-disabled`]: {\n cursor: 'not-allowed',\n [`${componentCls}-rail`]: {\n backgroundColor: `${token.railBg} !important`\n },\n [`${componentCls}-track`]: {\n backgroundColor: `${token.trackBgDisabled} !important`\n },\n [`\n ${componentCls}-dot\n `]: {\n backgroundColor: token.colorBgElevated,\n borderColor: token.trackBgDisabled,\n boxShadow: 'none',\n cursor: 'not-allowed'\n },\n [`${componentCls}-handle::after`]: {\n backgroundColor: token.colorBgElevated,\n cursor: 'not-allowed',\n width: handleSize,\n height: handleSize,\n boxShadow: `0 0 0 ${(0, _cssinjs.unit)(handleLineWidth)} ${handleColorDisabled}`,\n insetInlineStart: 0,\n insetBlockStart: 0\n },\n [`\n ${componentCls}-mark-text,\n ${componentCls}-dot\n `]: {\n cursor: `not-allowed !important`\n }\n },\n [`&-tooltip ${antCls}-tooltip-inner`]: {\n minWidth: 'unset'\n }\n })\n };\n};\n// ============================ Horizontal ============================\nconst genDirectionStyle = (token, horizontal) => {\n const {\n componentCls,\n railSize,\n handleSize,\n dotSize,\n marginFull,\n calc\n } = token;\n const railPadding = horizontal ? 'paddingBlock' : 'paddingInline';\n const full = horizontal ? 'width' : 'height';\n const part = horizontal ? 'height' : 'width';\n const handlePos = horizontal ? 'insetBlockStart' : 'insetInlineStart';\n const markInset = horizontal ? 'top' : 'insetInlineStart';\n const handlePosSize = calc(railSize).mul(3).sub(handleSize).div(2).equal();\n const draggableBorderSize = calc(handleSize).sub(railSize).div(2).equal();\n const draggableBorder = horizontal ? {\n borderWidth: `${(0, _cssinjs.unit)(draggableBorderSize)} 0`,\n transform: `translateY(${(0, _cssinjs.unit)(calc(draggableBorderSize).mul(-1).equal())})`\n } : {\n borderWidth: `0 ${(0, _cssinjs.unit)(draggableBorderSize)}`,\n transform: `translateX(${(0, _cssinjs.unit)(token.calc(draggableBorderSize).mul(-1).equal())})`\n };\n return {\n [railPadding]: railSize,\n [part]: calc(railSize).mul(3).equal(),\n [`${componentCls}-rail`]: {\n [full]: '100%',\n [part]: railSize\n },\n [`${componentCls}-track,${componentCls}-tracks`]: {\n [part]: railSize\n },\n [`${componentCls}-track-draggable`]: Object.assign({}, draggableBorder),\n [`${componentCls}-handle`]: {\n [handlePos]: handlePosSize\n },\n [`${componentCls}-mark`]: {\n // Reset all\n insetInlineStart: 0,\n top: 0,\n // https://github.com/ant-design/ant-design/issues/43731\n [markInset]: calc(railSize).mul(3).add(horizontal ? 0 : marginFull).equal(),\n [full]: '100%'\n },\n [`${componentCls}-step`]: {\n // Reset all\n insetInlineStart: 0,\n top: 0,\n [markInset]: railSize,\n [full]: '100%',\n [part]: railSize\n },\n [`${componentCls}-dot`]: {\n position: 'absolute',\n [handlePos]: calc(railSize).sub(dotSize).div(2).equal()\n }\n };\n};\n// ============================ Horizontal ============================\nconst genHorizontalStyle = token => {\n const {\n componentCls,\n marginPartWithMark\n } = token;\n return {\n [`${componentCls}-horizontal`]: Object.assign(Object.assign({}, genDirectionStyle(token, true)), {\n [`&${componentCls}-with-marks`]: {\n marginBottom: marginPartWithMark\n }\n })\n };\n};\n// ============================= Vertical =============================\nconst genVerticalStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-vertical`]: Object.assign(Object.assign({}, genDirectionStyle(token, false)), {\n height: '100%'\n })\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => {\n // Handle line width is always width-er 1px\n const increaseHandleWidth = 1;\n const controlSize = token.controlHeightLG / 4;\n const controlSizeHover = token.controlHeightSM / 2;\n const handleLineWidth = token.lineWidth + increaseHandleWidth;\n const handleLineWidthHover = token.lineWidth + increaseHandleWidth * 1.5;\n const handleActiveColor = token.colorPrimary;\n const handleActiveOutlineColor = new _tinycolor.TinyColor(handleActiveColor).setAlpha(0.2).toRgbString();\n return {\n controlSize,\n railSize: 4,\n handleSize: controlSize,\n handleSizeHover: controlSizeHover,\n dotSize: 8,\n handleLineWidth,\n handleLineWidthHover,\n railBg: token.colorFillTertiary,\n railHoverBg: token.colorFillSecondary,\n trackBg: token.colorPrimaryBorder,\n trackHoverBg: token.colorPrimaryBorderHover,\n handleColor: token.colorPrimaryBorder,\n handleActiveColor,\n handleActiveOutlineColor,\n handleColorDisabled: new _tinycolor.TinyColor(token.colorTextDisabled).onBackground(token.colorBgContainer).toHexShortString(),\n dotBorderColor: token.colorBorderSecondary,\n dotActiveBorderColor: token.colorPrimaryBorder,\n trackBgDisabled: token.colorBgContainerDisabled\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Slider', token => {\n const sliderToken = (0, _internal.mergeToken)(token, {\n marginPart: token.calc(token.controlHeight).sub(token.controlSize).div(2).equal(),\n marginFull: token.calc(token.controlSize).div(2).equal(),\n marginPartWithMark: token.calc(token.controlHeightLG).sub(token.controlSize).equal()\n });\n return [genBaseStyle(sliderToken), genHorizontalStyle(sliderToken), genVerticalStyle(sliderToken)];\n}, prepareComponentToken);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useRafLock;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\nfunction useRafLock() {\n const [state, setState] = React.useState(false);\n const rafRef = React.useRef();\n const cleanup = () => {\n _raf.default.cancel(rafRef.current);\n };\n const setDelayState = nextState => {\n cleanup();\n if (nextState) {\n setState(nextState);\n } else {\n rafRef.current = (0, _raf.default)(() => {\n setState(nextState);\n });\n }\n };\n React.useEffect(() => cleanup, []);\n return [state, setDelayState];\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useCompactItemContext = exports.default = exports.SpaceCompactItemContext = exports.NoCompactStyle = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst SpaceCompactItemContext = exports.SpaceCompactItemContext = /*#__PURE__*/React.createContext(null);\nconst useCompactItemContext = (prefixCls, direction) => {\n const compactItemContext = React.useContext(SpaceCompactItemContext);\n const compactItemClassnames = React.useMemo(() => {\n if (!compactItemContext) {\n return '';\n }\n const {\n compactDirection,\n isFirstItem,\n isLastItem\n } = compactItemContext;\n const separator = compactDirection === 'vertical' ? '-vertical-' : '-';\n return (0, _classnames.default)(`${prefixCls}-compact${separator}item`, {\n [`${prefixCls}-compact${separator}first-item`]: isFirstItem,\n [`${prefixCls}-compact${separator}last-item`]: isLastItem,\n [`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl'\n });\n }, [prefixCls, direction, compactItemContext]);\n return {\n compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,\n compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,\n compactItemClassnames\n };\n};\nexports.useCompactItemContext = useCompactItemContext;\nconst NoCompactStyle = _ref => {\n let {\n children\n } = _ref;\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: null\n }, children);\n};\nexports.NoCompactStyle = NoCompactStyle;\nconst CompactItem = _a => {\n var {\n children\n } = _a,\n otherProps = __rest(_a, [\"children\"]);\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: otherProps\n }, children);\n};\nconst Compact = props => {\n const {\n getPrefixCls,\n direction: directionConfig\n } = React.useContext(_configProvider.ConfigContext);\n const {\n size,\n direction,\n block,\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children\n } = props,\n restProps = __rest(props, [\"size\", \"direction\", \"block\", \"prefixCls\", \"className\", \"rootClassName\", \"children\"]);\n const mergedSize = (0, _useSize.default)(ctx => size !== null && size !== void 0 ? size : ctx);\n const prefixCls = getPrefixCls('space-compact', customizePrefixCls);\n const [wrapCSSVar, hashId] = (0, _style.default)(prefixCls);\n const clx = (0, _classnames.default)(prefixCls, hashId, {\n [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-vertical`]: direction === 'vertical'\n }, className, rootClassName);\n const compactItemContext = React.useContext(SpaceCompactItemContext);\n const childNodes = (0, _toArray.default)(children);\n const nodes = React.useMemo(() => childNodes.map((child, i) => {\n const key = (child === null || child === void 0 ? void 0 : child.key) || `${prefixCls}-item-${i}`;\n return /*#__PURE__*/React.createElement(CompactItem, {\n key: key,\n compactSize: mergedSize,\n compactDirection: direction,\n isFirstItem: i === 0 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),\n isLastItem: i === childNodes.length - 1 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))\n }, child);\n }), [size, childNodes, compactItemContext]);\n // =========================== Render ===========================\n if (childNodes.length === 0) {\n return null;\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: clx\n }, restProps), nodes));\n};\nvar _default = exports.default = Compact;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _context = require(\"./context\");\nconst Item = _ref => {\n let {\n className,\n index,\n children,\n split,\n style\n } = _ref;\n const {\n latestIndex\n } = React.useContext(_context.SpaceContext);\n if (children === null || children === undefined) {\n return null;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n style: style\n }, children), index < latestIndex && split && /*#__PURE__*/React.createElement(\"span\", {\n className: `${className}-split`\n }, split));\n};\nvar _default = exports.default = Item;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SpaceContextProvider = exports.SpaceContext = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst SpaceContext = exports.SpaceContext = /*#__PURE__*/_react.default.createContext({\n latestIndex: 0\n});\nconst SpaceContextProvider = exports.SpaceContextProvider = SpaceContext.Provider;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"SpaceContext\", {\n enumerable: true,\n get: function () {\n return _context.SpaceContext;\n }\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _gapSize = require(\"../_util/gapSize\");\nvar _configProvider = require(\"../config-provider\");\nvar _Compact = _interopRequireDefault(require(\"./Compact\"));\nvar _context = require(\"./context\");\nvar _Item = _interopRequireDefault(require(\"./Item\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalSpace = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _a, _b, _c;\n const {\n getPrefixCls,\n space,\n direction: directionConfig\n } = React.useContext(_configProvider.ConfigContext);\n const {\n size = (_a = space === null || space === void 0 ? void 0 : space.size) !== null && _a !== void 0 ? _a : 'small',\n align,\n className,\n rootClassName,\n children,\n direction = 'horizontal',\n prefixCls: customizePrefixCls,\n split,\n style,\n wrap = false,\n classNames: customClassNames,\n styles\n } = props,\n otherProps = __rest(props, [\"size\", \"align\", \"className\", \"rootClassName\", \"children\", \"direction\", \"prefixCls\", \"split\", \"style\", \"wrap\", \"classNames\", \"styles\"]);\n const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size];\n const isPresetVerticalSize = (0, _gapSize.isPresetSize)(verticalSize);\n const isPresetHorizontalSize = (0, _gapSize.isPresetSize)(horizontalSize);\n const isValidVerticalSize = (0, _gapSize.isValidGapNumber)(verticalSize);\n const isValidHorizontalSize = (0, _gapSize.isValidGapNumber)(horizontalSize);\n const childNodes = (0, _toArray.default)(children, {\n keepEmpty: true\n });\n const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align;\n const prefixCls = getPrefixCls('space', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const cls = (0, _classnames.default)(prefixCls, space === null || space === void 0 ? void 0 : space.className, hashId, `${prefixCls}-${direction}`, {\n [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n [`${prefixCls}-align-${mergedAlign}`]: mergedAlign,\n [`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize,\n [`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize\n }, className, rootClassName, cssVarCls);\n const itemClassName = (0, _classnames.default)(`${prefixCls}-item`, (_b = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _b !== void 0 ? _b : (_c = space === null || space === void 0 ? void 0 : space.classNames) === null || _c === void 0 ? void 0 : _c.item);\n // Calculate latest one\n let latestIndex = 0;\n const nodes = childNodes.map((child, i) => {\n var _a, _b;\n if (child !== null && child !== undefined) {\n latestIndex = i;\n }\n const key = (child === null || child === void 0 ? void 0 : child.key) || `${itemClassName}-${i}`;\n return /*#__PURE__*/React.createElement(_Item.default, {\n className: itemClassName,\n key: key,\n index: i,\n split: split,\n style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.styles) === null || _b === void 0 ? void 0 : _b.item\n }, child);\n });\n const spaceContext = React.useMemo(() => ({\n latestIndex\n }), [latestIndex]);\n // =========================== Render ===========================\n if (childNodes.length === 0) {\n return null;\n }\n const gapStyle = {};\n if (wrap) {\n gapStyle.flexWrap = 'wrap';\n }\n if (!isPresetHorizontalSize && isValidHorizontalSize) {\n gapStyle.columnGap = horizontalSize;\n }\n if (!isPresetVerticalSize && isValidVerticalSize) {\n gapStyle.rowGap = verticalSize;\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({\n ref: ref,\n className: cls,\n style: Object.assign(Object.assign(Object.assign({}, gapStyle), space === null || space === void 0 ? void 0 : space.style), style)\n }, otherProps), /*#__PURE__*/React.createElement(_context.SpaceContextProvider, {\n value: spaceContext\n }, nodes)));\n});\nconst Space = InternalSpace;\nSpace.Compact = _Compact.default;\nif (process.env.NODE_ENV !== 'production') {\n Space.displayName = 'Space';\n}\nvar _default = exports.default = Space;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genSpaceCompactStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: {\n '&-block': {\n display: 'flex',\n width: '100%'\n },\n '&-vertical': {\n flexDirection: 'column'\n }\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = genSpaceCompactStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _internal = require(\"../../theme/internal\");\nvar _compact = _interopRequireDefault(require(\"./compact\"));\nconst genSpaceStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n return {\n [componentCls]: {\n display: 'inline-flex',\n '&-rtl': {\n direction: 'rtl'\n },\n '&-vertical': {\n flexDirection: 'column'\n },\n '&-align': {\n flexDirection: 'column',\n '&-center': {\n alignItems: 'center'\n },\n '&-start': {\n alignItems: 'flex-start'\n },\n '&-end': {\n alignItems: 'flex-end'\n },\n '&-baseline': {\n alignItems: 'baseline'\n }\n },\n [`${componentCls}-item:empty`]: {\n display: 'none'\n },\n // https://github.com/ant-design/ant-design/issues/47875\n [`${componentCls}-item > ${antCls}-badge-not-a-wrapper:only-child`]: {\n display: 'block'\n }\n }\n };\n};\nconst genSpaceGapStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: {\n '&-gap-row-small': {\n rowGap: token.spaceGapSmallSize\n },\n '&-gap-row-middle': {\n rowGap: token.spaceGapMiddleSize\n },\n '&-gap-row-large': {\n rowGap: token.spaceGapLargeSize\n },\n '&-gap-col-small': {\n columnGap: token.spaceGapSmallSize\n },\n '&-gap-col-middle': {\n columnGap: token.spaceGapMiddleSize\n },\n '&-gap-col-large': {\n columnGap: token.spaceGapLargeSize\n }\n }\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = () => ({});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Space', token => {\n const spaceToken = (0, _internal.mergeToken)(token, {\n spaceGapSmallSize: token.paddingXS,\n spaceGapMiddleSize: token.padding,\n spaceGapLargeSize: token.paddingLG\n });\n return [genSpaceStyle(spaceToken), genSpaceGapStyle(spaceToken), (0, _compact.default)(spaceToken)];\n}, () => ({}), {\n // Space component don't apply extra font style\n // https://github.com/ant-design/ant-design/issues/40315\n resetStyle: false\n});","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = Looper;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _Progress = _interopRequireDefault(require(\"./Progress\"));\nfunction Looper(props) {\n const {\n prefixCls,\n percent = 0\n } = props;\n const dotClassName = `${prefixCls}-dot`;\n const holderClassName = `${dotClassName}-holder`;\n const hideClassName = `${holderClassName}-hidden`;\n // ===================== Render =====================\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(holderClassName, percent > 0 && hideClassName)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(dotClassName, `${prefixCls}-dot-spin`)\n }, [1, 2, 3, 4].map(i => (/*#__PURE__*/React.createElement(\"i\", {\n className: `${prefixCls}-dot-item`,\n key: i\n }))))), /*#__PURE__*/React.createElement(_Progress.default, {\n prefixCls: prefixCls,\n percent: percent\n }));\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useLayoutEffect = _interopRequireDefault(require(\"rc-util/lib/hooks/useLayoutEffect\"));\nconst viewSize = 100;\nconst borderWidth = viewSize / 5;\nconst radius = viewSize / 2 - borderWidth / 2;\nconst circumference = radius * 2 * Math.PI;\nconst position = 50;\nconst CustomCircle = props => {\n const {\n dotClassName,\n style,\n hasCircleCls\n } = props;\n return /*#__PURE__*/React.createElement(\"circle\", {\n className: (0, _classnames.default)(`${dotClassName}-circle`, {\n [`${dotClassName}-circle-bg`]: hasCircleCls\n }),\n r: radius,\n cx: position,\n cy: position,\n strokeWidth: borderWidth,\n style: style\n });\n};\nconst Progress = _ref => {\n let {\n percent,\n prefixCls\n } = _ref;\n const dotClassName = `${prefixCls}-dot`;\n const holderClassName = `${dotClassName}-holder`;\n const hideClassName = `${holderClassName}-hidden`;\n const [render, setRender] = React.useState(false);\n // ==================== Visible =====================\n (0, _useLayoutEffect.default)(() => {\n if (percent !== 0) {\n setRender(true);\n }\n }, [percent !== 0]);\n // ==================== Progress ====================\n const safePtg = Math.max(Math.min(percent, 100), 0);\n // ===================== Render =====================\n if (!render) {\n return null;\n }\n const circleStyle = {\n strokeDashoffset: `${circumference / 4}`,\n strokeDasharray: `${circumference * safePtg / 100} ${circumference * (100 - safePtg) / 100}`\n };\n return /*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(holderClassName, `${dotClassName}-progress`, safePtg <= 0 && hideClassName)\n }, /*#__PURE__*/React.createElement(\"svg\", {\n viewBox: `0 0 ${viewSize} ${viewSize}`,\n // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: progressbar could be readonly\n role: \"progressbar\",\n \"aria-valuemin\": 0,\n \"aria-valuemax\": 100,\n \"aria-valuenow\": safePtg\n }, /*#__PURE__*/React.createElement(CustomCircle, {\n dotClassName: dotClassName,\n hasCircleCls: true\n }), /*#__PURE__*/React.createElement(CustomCircle, {\n dotClassName: dotClassName,\n style: circleStyle\n })));\n};\nvar _default = exports.default = Progress;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = Indicator;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _reactNode = require(\"../../_util/reactNode\");\nvar _Looper = _interopRequireDefault(require(\"./Looper\"));\nfunction Indicator(props) {\n const {\n prefixCls,\n indicator,\n percent\n } = props;\n const dotClassName = `${prefixCls}-dot`;\n if (indicator && /*#__PURE__*/React.isValidElement(indicator)) {\n return (0, _reactNode.cloneElement)(indicator, {\n className: (0, _classnames.default)(indicator.props.className, dotClassName),\n percent\n });\n }\n return /*#__PURE__*/React.createElement(_Looper.default, {\n prefixCls: prefixCls,\n percent: percent\n });\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _throttleDebounce = require(\"throttle-debounce\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _Indicator = _interopRequireDefault(require(\"./Indicator\"));\nvar _index = _interopRequireDefault(require(\"./style/index\"));\nvar _usePercent = _interopRequireDefault(require(\"./usePercent\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst _SpinSizes = ['small', 'default', 'large'];\n// Render indicator\nlet defaultIndicator;\nfunction shouldDelay(spinning, delay) {\n return !!spinning && !!delay && !isNaN(Number(delay));\n}\nconst Spin = props => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n spinning: customSpinning = true,\n delay = 0,\n className,\n rootClassName,\n size = 'default',\n tip,\n wrapperClassName,\n style,\n children,\n fullscreen = false,\n indicator,\n percent\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"spinning\", \"delay\", \"className\", \"rootClassName\", \"size\", \"tip\", \"wrapperClassName\", \"style\", \"children\", \"fullscreen\", \"indicator\", \"percent\"]);\n const {\n getPrefixCls,\n direction,\n spin\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('spin', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _index.default)(prefixCls);\n const [spinning, setSpinning] = React.useState(() => customSpinning && !shouldDelay(customSpinning, delay));\n const mergedPercent = (0, _usePercent.default)(spinning, percent);\n React.useEffect(() => {\n if (customSpinning) {\n const showSpinning = (0, _throttleDebounce.debounce)(delay, () => {\n setSpinning(true);\n });\n showSpinning();\n return () => {\n var _a;\n (_a = showSpinning === null || showSpinning === void 0 ? void 0 : showSpinning.cancel) === null || _a === void 0 ? void 0 : _a.call(showSpinning);\n };\n }\n setSpinning(false);\n }, [delay, customSpinning]);\n const isNestedPattern = React.useMemo(() => typeof children !== 'undefined' && !fullscreen, [children, fullscreen]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Spin');\n process.env.NODE_ENV !== \"production\" ? warning(!tip || isNestedPattern || fullscreen, 'usage', '`tip` only work in nest or fullscreen pattern.') : void 0;\n }\n const spinClassName = (0, _classnames.default)(prefixCls, spin === null || spin === void 0 ? void 0 : spin.className, {\n [`${prefixCls}-sm`]: size === 'small',\n [`${prefixCls}-lg`]: size === 'large',\n [`${prefixCls}-spinning`]: spinning,\n [`${prefixCls}-show-text`]: !!tip,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, !fullscreen && rootClassName, hashId, cssVarCls);\n const containerClassName = (0, _classnames.default)(`${prefixCls}-container`, {\n [`${prefixCls}-blur`]: spinning\n });\n const mergedIndicator = (_a = indicator !== null && indicator !== void 0 ? indicator : spin === null || spin === void 0 ? void 0 : spin.indicator) !== null && _a !== void 0 ? _a : defaultIndicator;\n const mergedStyle = Object.assign(Object.assign({}, spin === null || spin === void 0 ? void 0 : spin.style), style);\n const spinElement = /*#__PURE__*/React.createElement(\"div\", Object.assign({}, restProps, {\n style: mergedStyle,\n className: spinClassName,\n \"aria-live\": \"polite\",\n \"aria-busy\": spinning\n }), /*#__PURE__*/React.createElement(_Indicator.default, {\n prefixCls: prefixCls,\n indicator: mergedIndicator,\n percent: mergedPercent\n }), tip && (isNestedPattern || fullscreen) ? (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-text`\n }, tip)) : null);\n if (isNestedPattern) {\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({}, restProps, {\n className: (0, _classnames.default)(`${prefixCls}-nested-loading`, wrapperClassName, hashId, cssVarCls)\n }), spinning && /*#__PURE__*/React.createElement(\"div\", {\n key: \"loading\"\n }, spinElement), /*#__PURE__*/React.createElement(\"div\", {\n className: containerClassName,\n key: \"container\"\n }, children)));\n }\n if (fullscreen) {\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-fullscreen`, {\n [`${prefixCls}-fullscreen-show`]: spinning\n }, rootClassName, hashId, cssVarCls)\n }, spinElement));\n }\n return wrapCSSVar(spinElement);\n};\nSpin.setDefaultIndicator = indicator => {\n defaultIndicator = indicator;\n};\nif (process.env.NODE_ENV !== 'production') {\n Spin.displayName = 'Spin';\n}\nvar _default = exports.default = Spin;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst antSpinMove = new _cssinjs.Keyframes('antSpinMove', {\n to: {\n opacity: 1\n }\n});\nconst antRotate = new _cssinjs.Keyframes('antRotate', {\n to: {\n transform: 'rotate(405deg)'\n }\n});\nconst genSpinStyle = token => {\n const {\n componentCls,\n calc\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'absolute',\n display: 'none',\n color: token.colorPrimary,\n fontSize: 0,\n textAlign: 'center',\n verticalAlign: 'middle',\n opacity: 0,\n transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOutCirc}`,\n '&-spinning': {\n position: 'relative',\n display: 'inline-block',\n opacity: 1\n },\n [`${componentCls}-text`]: {\n fontSize: token.fontSize,\n paddingTop: calc(calc(token.dotSize).sub(token.fontSize)).div(2).add(2).equal()\n },\n '&-fullscreen': {\n position: 'fixed',\n width: '100vw',\n height: '100vh',\n backgroundColor: token.colorBgMask,\n zIndex: token.zIndexPopupBase,\n inset: 0,\n display: 'flex',\n alignItems: 'center',\n flexDirection: 'column',\n justifyContent: 'center',\n opacity: 0,\n visibility: 'hidden',\n transition: `all ${token.motionDurationMid}`,\n '&-show': {\n opacity: 1,\n visibility: 'visible'\n },\n [componentCls]: {\n [`${componentCls}-dot-holder`]: {\n color: token.colorWhite\n },\n [`${componentCls}-text`]: {\n color: token.colorTextLightSolid\n }\n }\n },\n '&-nested-loading': {\n position: 'relative',\n [`> div > ${componentCls}`]: {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n zIndex: 4,\n display: 'block',\n width: '100%',\n height: '100%',\n maxHeight: token.contentHeight,\n [`${componentCls}-dot`]: {\n position: 'absolute',\n top: '50%',\n insetInlineStart: '50%',\n margin: calc(token.dotSize).mul(-1).div(2).equal()\n },\n [`${componentCls}-text`]: {\n position: 'absolute',\n top: '50%',\n width: '100%',\n textShadow: `0 1px 2px ${token.colorBgContainer}` // FIXME: shadow\n },\n [`&${componentCls}-show-text ${componentCls}-dot`]: {\n marginTop: calc(token.dotSize).div(2).mul(-1).sub(10).equal()\n },\n '&-sm': {\n [`${componentCls}-dot`]: {\n margin: calc(token.dotSizeSM).mul(-1).div(2).equal()\n },\n [`${componentCls}-text`]: {\n paddingTop: calc(calc(token.dotSizeSM).sub(token.fontSize)).div(2).add(2).equal()\n },\n [`&${componentCls}-show-text ${componentCls}-dot`]: {\n marginTop: calc(token.dotSizeSM).div(2).mul(-1).sub(10).equal()\n }\n },\n '&-lg': {\n [`${componentCls}-dot`]: {\n margin: calc(token.dotSizeLG).mul(-1).div(2).equal()\n },\n [`${componentCls}-text`]: {\n paddingTop: calc(calc(token.dotSizeLG).sub(token.fontSize)).div(2).add(2).equal()\n },\n [`&${componentCls}-show-text ${componentCls}-dot`]: {\n marginTop: calc(token.dotSizeLG).div(2).mul(-1).sub(10).equal()\n }\n }\n },\n [`${componentCls}-container`]: {\n position: 'relative',\n transition: `opacity ${token.motionDurationSlow}`,\n '&::after': {\n position: 'absolute',\n top: 0,\n insetInlineEnd: 0,\n bottom: 0,\n insetInlineStart: 0,\n zIndex: 10,\n width: '100%',\n height: '100%',\n background: token.colorBgContainer,\n opacity: 0,\n transition: `all ${token.motionDurationSlow}`,\n content: '\"\"',\n pointerEvents: 'none'\n }\n },\n [`${componentCls}-blur`]: {\n clear: 'both',\n opacity: 0.5,\n userSelect: 'none',\n pointerEvents: 'none',\n '&::after': {\n opacity: 0.4,\n pointerEvents: 'auto'\n }\n }\n },\n // tip\n // ------------------------------\n '&-tip': {\n color: token.spinDotDefault\n },\n // holder\n // ------------------------------\n [`${componentCls}-dot-holder`]: {\n width: '1em',\n height: '1em',\n fontSize: token.dotSize,\n display: 'inline-block',\n transition: `transform ${token.motionDurationSlow} ease, opacity ${token.motionDurationSlow} ease`,\n transformOrigin: '50% 50%',\n lineHeight: 1,\n color: token.colorPrimary,\n '&-hidden': {\n transform: 'scale(0.3)',\n opacity: 0\n }\n },\n // progress\n // ------------------------------\n [`${componentCls}-dot-progress`]: {\n position: 'absolute',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n insetInlineStart: '50%'\n },\n // dots\n // ------------------------------\n [`${componentCls}-dot`]: {\n position: 'relative',\n display: 'inline-block',\n fontSize: token.dotSize,\n width: '1em',\n height: '1em',\n '&-item': {\n position: 'absolute',\n display: 'block',\n width: calc(token.dotSize).sub(calc(token.marginXXS).div(2)).div(2).equal(),\n height: calc(token.dotSize).sub(calc(token.marginXXS).div(2)).div(2).equal(),\n background: 'currentColor',\n borderRadius: '100%',\n transform: 'scale(0.75)',\n transformOrigin: '50% 50%',\n opacity: 0.3,\n animationName: antSpinMove,\n animationDuration: '1s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear',\n animationDirection: 'alternate',\n '&:nth-child(1)': {\n top: 0,\n insetInlineStart: 0,\n animationDelay: '0s'\n },\n '&:nth-child(2)': {\n top: 0,\n insetInlineEnd: 0,\n animationDelay: '0.4s'\n },\n '&:nth-child(3)': {\n insetInlineEnd: 0,\n bottom: 0,\n animationDelay: '0.8s'\n },\n '&:nth-child(4)': {\n bottom: 0,\n insetInlineStart: 0,\n animationDelay: '1.2s'\n }\n },\n '&-spin': {\n transform: 'rotate(45deg)',\n animationName: antRotate,\n animationDuration: '1.2s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'linear'\n },\n '&-circle': {\n strokeLinecap: 'round',\n transition: ['stroke-dashoffset', 'stroke-dasharray', 'stroke', 'stroke-width', 'opacity'].map(item => `${item} ${token.motionDurationSlow} ease`).join(','),\n fillOpacity: 0,\n stroke: 'currentcolor'\n },\n '&-circle-bg': {\n stroke: token.colorFillSecondary\n }\n },\n // small\n [`&-sm ${componentCls}-dot`]: {\n '&, &-holder': {\n fontSize: token.dotSizeSM\n }\n },\n [`&-sm ${componentCls}-dot-holder`]: {\n i: {\n width: calc(calc(token.dotSizeSM).sub(calc(token.marginXXS).div(2))).div(2).equal(),\n height: calc(calc(token.dotSizeSM).sub(calc(token.marginXXS).div(2))).div(2).equal()\n }\n },\n // large\n [`&-lg ${componentCls}-dot`]: {\n '&, &-holder': {\n fontSize: token.dotSizeLG\n }\n },\n [`&-lg ${componentCls}-dot-holder`]: {\n i: {\n width: calc(calc(token.dotSizeLG).sub(token.marginXXS)).div(2).equal(),\n height: calc(calc(token.dotSizeLG).sub(token.marginXXS)).div(2).equal()\n }\n },\n [`&${componentCls}-show-text ${componentCls}-text`]: {\n display: 'block'\n }\n })\n };\n};\nconst prepareComponentToken = token => {\n const {\n controlHeightLG,\n controlHeight\n } = token;\n return {\n contentHeight: 400,\n dotSize: controlHeightLG / 2,\n dotSizeSM: controlHeightLG * 0.35,\n dotSizeLG: controlHeight\n };\n};\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Spin', token => {\n const spinToken = (0, _internal.mergeToken)(token, {\n spinDotDefault: token.colorTextDescription\n });\n return [genSpinStyle(spinToken)];\n}, prepareComponentToken);","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = usePercent;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst AUTO_INTERVAL = 200;\nconst STEP_BUCKETS = [[30, 0.05], [70, 0.03], [96, 0.01]];\nfunction usePercent(spinning, percent) {\n const [mockPercent, setMockPercent] = React.useState(0);\n const mockIntervalRef = React.useRef();\n const isAuto = percent === 'auto';\n React.useEffect(() => {\n if (isAuto && spinning) {\n setMockPercent(0);\n mockIntervalRef.current = setInterval(() => {\n setMockPercent(prev => {\n const restPTG = 100 - prev;\n for (let i = 0; i < STEP_BUCKETS.length; i += 1) {\n const [limit, stepPtg] = STEP_BUCKETS[i];\n if (prev <= limit) {\n return prev + restPTG * stepPtg;\n }\n }\n return prev;\n });\n }, AUTO_INTERVAL);\n }\n return () => {\n clearInterval(mockIntervalRef.current);\n };\n }, [isAuto, spinning]);\n return isAuto ? mockPercent : percent;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.InternalPanel = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nconst InternalPanel = exports.InternalPanel = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {\n const {\n prefixCls,\n className,\n children,\n size,\n style = {}\n } = props;\n const panelClassName = (0, _classnames.default)(`${prefixCls}-panel`, {\n [`${prefixCls}-panel-hidden`]: size === 0\n }, className);\n const hasSize = size !== undefined;\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n ref: ref,\n className: panelClassName,\n style: Object.assign(Object.assign({}, style), {\n // Use auto when start from ssr\n flexBasis: hasSize ? size : 'auto',\n flexGrow: hasSize ? 0 : 1\n })\n }, children);\n});\nif (process.env.NODE_ENV !== 'production') {\n InternalPanel.displayName = 'Panel';\n}\nconst Panel = () => null;\nvar _default = exports.default = Panel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _DownOutlined = _interopRequireDefault(require(\"@ant-design/icons/DownOutlined\"));\nvar _LeftOutlined = _interopRequireDefault(require(\"@ant-design/icons/LeftOutlined\"));\nvar _RightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RightOutlined\"));\nvar _UpOutlined = _interopRequireDefault(require(\"@ant-design/icons/UpOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nfunction getValidNumber(num) {\n return typeof num === 'number' && !Number.isNaN(num) ? Math.round(num) : 0;\n}\nconst SplitBar = props => {\n const {\n prefixCls,\n vertical,\n index,\n active,\n ariaNow,\n ariaMin,\n ariaMax,\n resizable,\n startCollapsible,\n endCollapsible,\n onOffsetStart,\n onOffsetUpdate,\n onOffsetEnd,\n onCollapse\n } = props;\n const splitBarPrefixCls = `${prefixCls}-bar`;\n // ======================== Resize ========================\n const [startPos, setStartPos] = (0, _react.useState)(null);\n const onMouseDown = e => {\n if (resizable && e.currentTarget) {\n setStartPos([e.pageX, e.pageY]);\n onOffsetStart(index);\n }\n };\n const onTouchStart = e => {\n if (resizable && e.touches.length === 1) {\n const touch = e.touches[0];\n setStartPos([touch.pageX, touch.pageY]);\n onOffsetStart(index);\n }\n };\n _react.default.useEffect(() => {\n if (startPos) {\n const onMouseMove = e => {\n const {\n pageX,\n pageY\n } = e;\n const offsetX = pageX - startPos[0];\n const offsetY = pageY - startPos[1];\n onOffsetUpdate(index, offsetX, offsetY);\n };\n const onMouseUp = () => {\n setStartPos(null);\n onOffsetEnd();\n };\n const handleTouchMove = e => {\n if (e.touches.length === 1) {\n const touch = e.touches[0];\n const offsetX = touch.pageX - startPos[0];\n const offsetY = touch.pageY - startPos[1];\n onOffsetUpdate(index, offsetX, offsetY);\n }\n };\n const handleTouchEnd = () => {\n setStartPos(null);\n onOffsetEnd();\n };\n window.addEventListener('touchmove', handleTouchMove);\n window.addEventListener('touchend', handleTouchEnd);\n window.addEventListener('mousemove', onMouseMove);\n window.addEventListener('mouseup', onMouseUp);\n return () => {\n window.removeEventListener('mousemove', onMouseMove);\n window.removeEventListener('mouseup', onMouseUp);\n window.removeEventListener('touchmove', handleTouchMove);\n window.removeEventListener('touchend', handleTouchEnd);\n };\n }\n }, [startPos]);\n // ======================== Render ========================\n const StartIcon = vertical ? _UpOutlined.default : _LeftOutlined.default;\n const EndIcon = vertical ? _DownOutlined.default : _RightOutlined.default;\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: splitBarPrefixCls,\n role: \"separator\",\n \"aria-valuenow\": getValidNumber(ariaNow),\n \"aria-valuemin\": getValidNumber(ariaMin),\n \"aria-valuemax\": getValidNumber(ariaMax)\n }, /*#__PURE__*/_react.default.createElement(\"div\", {\n className: (0, _classnames.default)(`${splitBarPrefixCls}-dragger`, {\n [`${splitBarPrefixCls}-dragger-disabled`]: !resizable,\n [`${splitBarPrefixCls}-dragger-active`]: active\n }),\n onMouseDown: onMouseDown,\n onTouchStart: onTouchStart\n }), startCollapsible && (/*#__PURE__*/_react.default.createElement(\"div\", {\n className: (0, _classnames.default)(`${splitBarPrefixCls}-collapse-bar`, `${splitBarPrefixCls}-collapse-bar-start`),\n onClick: () => onCollapse(index, 'start')\n }, /*#__PURE__*/_react.default.createElement(StartIcon, {\n className: (0, _classnames.default)(`${splitBarPrefixCls}-collapse-icon`, `${splitBarPrefixCls}-collapse-start`)\n }))), endCollapsible && (/*#__PURE__*/_react.default.createElement(\"div\", {\n className: (0, _classnames.default)(`${splitBarPrefixCls}-collapse-bar`, `${splitBarPrefixCls}-collapse-bar-end`),\n onClick: () => onCollapse(index, 'end')\n }, /*#__PURE__*/_react.default.createElement(EndIcon, {\n className: (0, _classnames.default)(`${splitBarPrefixCls}-collapse-icon`, `${splitBarPrefixCls}-collapse-end`)\n }))));\n};\nvar _default = exports.default = SplitBar;","\"use strict\";\n\"use client\";\n\n/* eslint-disable react/no-array-index-key */\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcResizeObserver = _interopRequireDefault(require(\"rc-resize-observer\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useItems = _interopRequireDefault(require(\"./hooks/useItems\"));\nvar _useResizable = _interopRequireDefault(require(\"./hooks/useResizable\"));\nvar _useResize = _interopRequireDefault(require(\"./hooks/useResize\"));\nvar _useSizes = _interopRequireDefault(require(\"./hooks/useSizes\"));\nvar _Panel = require(\"./Panel\");\nvar _SplitBar = _interopRequireDefault(require(\"./SplitBar\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst Splitter = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n style,\n layout = 'horizontal',\n children,\n rootClassName,\n onResizeStart,\n onResize,\n onResizeEnd\n } = props;\n const {\n getPrefixCls,\n direction,\n splitter\n } = _react.default.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('splitter', customizePrefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n // ======================== Direct ========================\n const isVertical = layout === 'vertical';\n const isRTL = direction === 'rtl';\n const reverse = !isVertical && isRTL;\n // ====================== Items Data ======================\n const items = (0, _useItems.default)(children);\n // >>> Warning for uncontrolled\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Splitter');\n let existSize = false;\n let existUndefinedSize = false;\n items.forEach(item => {\n if (item.size !== undefined) {\n existSize = true;\n } else {\n existUndefinedSize = true;\n }\n });\n if (existSize && existUndefinedSize && !onResize) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', 'When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`.') : void 0;\n }\n }\n // ====================== Container =======================\n const [containerSize, setContainerSize] = (0, _react.useState)();\n const onContainerResize = size => {\n const {\n offsetWidth,\n offsetHeight\n } = size;\n const containerSize = isVertical ? offsetHeight : offsetWidth;\n // Skip when container has no size, Such as nested in a hidden tab panel\n // to fix: https://github.com/ant-design/ant-design/issues/51106\n if (containerSize === 0) {\n return;\n }\n setContainerSize(containerSize);\n };\n // ========================= Size =========================\n const [panelSizes, itemPxSizes, itemPtgSizes, itemPtgMinSizes, itemPtgMaxSizes, updateSizes] = (0, _useSizes.default)(items, containerSize);\n // ====================== Resizable =======================\n const resizableInfos = (0, _useResizable.default)(items, itemPxSizes);\n const [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex] = (0, _useResize.default)(items, resizableInfos, itemPtgSizes, containerSize, updateSizes);\n // ======================== Events ========================\n const onInternalResizeStart = (0, _useEvent.default)(index => {\n onOffsetStart(index);\n onResizeStart === null || onResizeStart === void 0 ? void 0 : onResizeStart(itemPxSizes);\n });\n const onInternalResizeUpdate = (0, _useEvent.default)((index, offset) => {\n const nextSizes = onOffsetUpdate(index, offset);\n onResize === null || onResize === void 0 ? void 0 : onResize(nextSizes);\n });\n const onInternalResizeEnd = (0, _useEvent.default)(() => {\n onOffsetEnd();\n onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd(itemPxSizes);\n });\n const onInternalCollapse = (0, _useEvent.default)((index, type) => {\n const nextSizes = onCollapse(index, type);\n onResize === null || onResize === void 0 ? void 0 : onResize(nextSizes);\n onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd(nextSizes);\n });\n // ======================== Styles ========================\n const containerClassName = (0, _classnames.default)(prefixCls, className, `${prefixCls}-${layout}`, {\n [`${prefixCls}-rtl`]: isRTL\n }, rootClassName, splitter === null || splitter === void 0 ? void 0 : splitter.className, cssVarCls, rootCls, hashId);\n // ======================== Render ========================\n const maskCls = `${prefixCls}-mask`;\n const stackSizes = _react.default.useMemo(() => {\n const mergedSizes = [];\n let stack = 0;\n for (let i = 0; i < items.length; i += 1) {\n stack += itemPtgSizes[i];\n mergedSizes.push(stack);\n }\n return mergedSizes;\n }, [itemPtgSizes]);\n const mergedStyle = Object.assign(Object.assign({}, splitter === null || splitter === void 0 ? void 0 : splitter.style), style);\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(_rcResizeObserver.default, {\n onResize: onContainerResize\n }, /*#__PURE__*/_react.default.createElement(\"div\", {\n style: mergedStyle,\n className: containerClassName\n }, items.map((item, idx) => {\n // Panel\n const panel = /*#__PURE__*/_react.default.createElement(_Panel.InternalPanel, Object.assign({}, item, {\n prefixCls: prefixCls,\n size: panelSizes[idx]\n }));\n // Split Bar\n let splitBar = null;\n const resizableInfo = resizableInfos[idx];\n if (resizableInfo) {\n const ariaMinStart = (stackSizes[idx - 1] || 0) + itemPtgMinSizes[idx];\n const ariaMinEnd = (stackSizes[idx + 1] || 100) - itemPtgMaxSizes[idx + 1];\n const ariaMaxStart = (stackSizes[idx - 1] || 0) + itemPtgMaxSizes[idx];\n const ariaMaxEnd = (stackSizes[idx + 1] || 100) - itemPtgMinSizes[idx + 1];\n splitBar = /*#__PURE__*/_react.default.createElement(_SplitBar.default, {\n index: idx,\n active: movingIndex === idx,\n prefixCls: prefixCls,\n vertical: isVertical,\n resizable: resizableInfo.resizable,\n ariaNow: stackSizes[idx] * 100,\n ariaMin: Math.max(ariaMinStart, ariaMinEnd) * 100,\n ariaMax: Math.min(ariaMaxStart, ariaMaxEnd) * 100,\n startCollapsible: resizableInfo.startCollapsible,\n endCollapsible: resizableInfo.endCollapsible,\n onOffsetStart: onInternalResizeStart,\n onOffsetUpdate: (index, offsetX, offsetY) => {\n let offset = isVertical ? offsetY : offsetX;\n if (reverse) {\n offset = -offset;\n }\n onInternalResizeUpdate(index, offset);\n },\n onOffsetEnd: onInternalResizeEnd,\n onCollapse: onInternalCollapse\n });\n }\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {\n key: `split-panel-${idx}`\n }, panel, splitBar);\n }), typeof movingIndex === 'number' && (/*#__PURE__*/_react.default.createElement(\"div\", {\n \"aria-hidden\": true,\n className: (0, _classnames.default)(maskCls, `${maskCls}-${layout}`)\n })))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Splitter.displayName = 'Splitter';\n}\nvar _default = exports.default = Splitter;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useItems;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction getCollapsible(collapsible) {\n if (collapsible && typeof collapsible === 'object') {\n return collapsible;\n }\n const mergedCollapsible = !!collapsible;\n return {\n start: mergedCollapsible,\n end: mergedCollapsible\n };\n}\n/**\n * Convert `children` into `items`.\n */\nfunction useItems(children) {\n const items = React.useMemo(() => (0, _toArray.default)(children).filter(React.isValidElement).map(node => {\n const {\n props\n } = node;\n const {\n collapsible\n } = props,\n restProps = __rest(props, [\"collapsible\"]);\n return Object.assign(Object.assign({}, restProps), {\n collapsible: getCollapsible(collapsible)\n });\n }), [children]);\n return items;\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useResizable;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction useResizable(items, pxSizes) {\n return React.useMemo(() => {\n const resizeInfos = [];\n for (let i = 0; i < items.length - 1; i += 1) {\n const prevItem = items[i];\n const nextItem = items[i + 1];\n const prevSize = pxSizes[i];\n const nextSize = pxSizes[i + 1];\n const {\n resizable: prevResizable = true,\n min: prevMin,\n collapsible: prevCollapsible\n } = prevItem;\n const {\n resizable: nextResizable = true,\n min: nextMin,\n collapsible: nextCollapsible\n } = nextItem;\n const mergedResizable =\n // Both need to be resizable\n prevResizable && nextResizable && (\n // Prev is not collapsed and limit min size\n prevSize !== 0 || !prevMin) && (\n // Next is not collapsed and limit min size\n nextSize !== 0 || !nextMin);\n const startCollapsible =\n // Self is collapsible\n prevCollapsible.end && prevSize > 0 ||\n // Collapsed and can be collapsed\n nextCollapsible.start && nextSize === 0 && prevSize > 0;\n const endCollapsible =\n // Self is collapsible\n nextCollapsible.start && nextSize > 0 ||\n // Collapsed and can be collapsed\n prevCollapsible.end && prevSize === 0 && nextSize > 0;\n resizeInfos[i] = {\n resizable: mergedResizable,\n startCollapsible: !!startCollapsible,\n endCollapsible: !!endCollapsible\n };\n }\n return resizeInfos;\n }, [pxSizes, items]);\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useResize;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useSizes = require(\"./useSizes\");\n/**\n * Handle user drag resize logic.\n */\nfunction useResize(items, resizableInfos, percentSizes, containerSize, updateSizes) {\n const limitSizes = items.map(item => [item.min, item.max]);\n const mergedContainerSize = containerSize || 0;\n const ptg2px = ptg => ptg * mergedContainerSize;\n // ======================== Resize ========================\n function getLimitSize(str, defaultLimit) {\n if (typeof str === 'string') {\n return ptg2px((0, _useSizes.getPtg)(str));\n }\n return str !== null && str !== void 0 ? str : defaultLimit;\n }\n // Real px sizes\n const [cacheSizes, setCacheSizes] = React.useState([]);\n /**\n * When start drag, check the direct is `start` or `end`.\n * This will handle when 2 splitter bar are in the same position.\n */\n const [movingIndex, setMovingIndex] = React.useState(null);\n const getPxSizes = () => percentSizes.map(ptg2px);\n const onOffsetStart = index => {\n setCacheSizes(getPxSizes());\n setMovingIndex({\n index,\n confirmed: false\n });\n };\n const onOffsetUpdate = (index, offset) => {\n var _a;\n // First time trigger move index update is not sync in the state\n let confirmedIndex = null;\n // We need to know what the real index is.\n if ((!movingIndex || !movingIndex.confirmed) && offset !== 0) {\n // Search for the real index\n if (offset > 0) {\n confirmedIndex = index;\n setMovingIndex({\n index,\n confirmed: true\n });\n } else {\n for (let i = index; i >= 0; i -= 1) {\n if (cacheSizes[i] > 0 && resizableInfos[i].resizable) {\n confirmedIndex = i;\n setMovingIndex({\n index: i,\n confirmed: true\n });\n break;\n }\n }\n }\n }\n const mergedIndex = (_a = confirmedIndex !== null && confirmedIndex !== void 0 ? confirmedIndex : movingIndex === null || movingIndex === void 0 ? void 0 : movingIndex.index) !== null && _a !== void 0 ? _a : index;\n const numSizes = (0, _toConsumableArray2.default)(cacheSizes);\n const nextIndex = mergedIndex + 1;\n // Get boundary\n const startMinSize = getLimitSize(limitSizes[mergedIndex][0], 0);\n const endMinSize = getLimitSize(limitSizes[nextIndex][0], 0);\n const startMaxSize = getLimitSize(limitSizes[mergedIndex][1], mergedContainerSize);\n const endMaxSize = getLimitSize(limitSizes[nextIndex][1], mergedContainerSize);\n let mergedOffset = offset;\n // Align with the boundary\n if (numSizes[mergedIndex] + mergedOffset < startMinSize) {\n mergedOffset = startMinSize - numSizes[mergedIndex];\n }\n if (numSizes[nextIndex] - mergedOffset < endMinSize) {\n mergedOffset = numSizes[nextIndex] - endMinSize;\n }\n if (numSizes[mergedIndex] + mergedOffset > startMaxSize) {\n mergedOffset = startMaxSize - numSizes[mergedIndex];\n }\n if (numSizes[nextIndex] - mergedOffset > endMaxSize) {\n mergedOffset = numSizes[nextIndex] - endMaxSize;\n }\n // Do offset\n numSizes[mergedIndex] += mergedOffset;\n numSizes[nextIndex] -= mergedOffset;\n updateSizes(numSizes);\n return numSizes;\n };\n const onOffsetEnd = () => {\n setMovingIndex(null);\n };\n // ======================= Collapse =======================\n const onCollapse = (index, type) => {\n const currentSizes = getPxSizes();\n const currentIndex = type === 'start' ? index : index + 1;\n const targetIndex = type === 'start' ? index + 1 : index;\n const currentSize = currentSizes[currentIndex];\n const targetSize = currentSizes[targetIndex];\n if (currentSize !== 0 && targetSize !== 0) {\n // Collapse directly\n currentSizes[currentIndex] = 0;\n currentSizes[targetIndex] += currentSize;\n } else {\n const totalSize = currentSize + targetSize;\n const currentSizeMin = getLimitSize(limitSizes[currentIndex][0], 0);\n const currentSizeMax = getLimitSize(limitSizes[currentIndex][1], mergedContainerSize);\n const targetSizeMin = getLimitSize(limitSizes[targetIndex][0], 0);\n const targetSizeMax = getLimitSize(limitSizes[targetIndex][1], mergedContainerSize);\n const limitStart = Math.max(currentSizeMin, totalSize - targetSizeMax);\n const limitEnd = Math.min(currentSizeMax, totalSize - targetSizeMin);\n const halfOffset = (limitEnd - limitStart) / 2;\n currentSizes[currentIndex] -= halfOffset;\n currentSizes[targetIndex] += halfOffset;\n }\n updateSizes(currentSizes);\n return currentSizes;\n };\n return [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex === null || movingIndex === void 0 ? void 0 : movingIndex.index];\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useSizes;\nexports.getPtg = getPtg;\nvar _react = _interopRequireDefault(require(\"react\"));\nfunction getPtg(str) {\n return Number(str.slice(0, -1)) / 100;\n}\nfunction isPtg(itemSize) {\n return typeof itemSize === 'string' && itemSize.endsWith('%');\n}\n/**\n * Save the size state.\n * Align the size into flex percentage base.\n */\nfunction useSizes(items, containerSize) {\n const propSizes = items.map(item => item.size);\n const itemsCount = items.length;\n const mergedContainerSize = containerSize || 0;\n const ptg2px = ptg => ptg * mergedContainerSize;\n // We do not need care the size state match the `items` length in `useState`.\n // It will calculate later.\n const [innerSizes, setInnerSizes] = _react.default.useState(() => items.map(item => item.defaultSize));\n const sizes = _react.default.useMemo(() => {\n var _a;\n const mergedSizes = [];\n for (let i = 0; i < itemsCount; i += 1) {\n mergedSizes[i] = (_a = propSizes[i]) !== null && _a !== void 0 ? _a : innerSizes[i];\n }\n return mergedSizes;\n }, [itemsCount, innerSizes, propSizes]);\n // Post handle the size. Will do:\n // 1. Convert all the px into percentage if not empty.\n // 2. Get rest percentage for exist percentage.\n // 3. Fill the rest percentage into empty item.\n const postPercentSizes = _react.default.useMemo(() => {\n let ptgList = [];\n let emptyCount = 0;\n // Fill default percentage\n for (let i = 0; i < itemsCount; i += 1) {\n const itemSize = sizes[i];\n if (isPtg(itemSize)) {\n ptgList[i] = getPtg(itemSize);\n } else if (itemSize || itemSize === 0) {\n const num = Number(itemSize);\n if (!Number.isNaN(num)) {\n ptgList[i] = num / mergedContainerSize;\n }\n } else {\n emptyCount += 1;\n ptgList[i] = undefined;\n }\n }\n const totalPtg = ptgList.reduce((acc, ptg) => acc + (ptg || 0), 0);\n if (totalPtg > 1 || !emptyCount) {\n // If total percentage is larger than 1, we will scale it down.\n const scale = 1 / totalPtg;\n ptgList = ptgList.map(ptg => ptg === undefined ? 0 : ptg * scale);\n } else {\n // If total percentage is smaller than 1, we will fill the rest.\n const avgRest = (1 - totalPtg) / emptyCount;\n ptgList = ptgList.map(ptg => ptg === undefined ? avgRest : ptg);\n }\n return ptgList;\n }, [sizes, mergedContainerSize]);\n const postPxSizes = _react.default.useMemo(() => postPercentSizes.map(ptg2px), [postPercentSizes, mergedContainerSize]);\n const postPercentMinSizes = _react.default.useMemo(() => items.map(item => {\n if (isPtg(item.min)) {\n return getPtg(item.min);\n }\n return (item.min || 0) / mergedContainerSize;\n }), [items, mergedContainerSize]);\n const postPercentMaxSizes = _react.default.useMemo(() => items.map(item => {\n if (isPtg(item.max)) {\n return getPtg(item.max);\n }\n return (item.max || mergedContainerSize) / mergedContainerSize;\n }), [items, mergedContainerSize]);\n // If ssr, we will use the size from developer config first.\n const panelSizes = _react.default.useMemo(() => containerSize ? postPxSizes : sizes, [postPxSizes, containerSize]);\n return [panelSizes, postPxSizes, postPercentSizes, postPercentMinSizes, postPercentMaxSizes, setInnerSizes];\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Panel = _interopRequireDefault(require(\"./Panel\"));\nvar _Splitter = _interopRequireDefault(require(\"./Splitter\"));\nconst Splitter = _Splitter.default;\nSplitter.Panel = _Panel.default;\nvar _default = exports.default = Splitter;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genRtlStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`&-rtl${componentCls}-horizontal`]: {\n [`> ${componentCls}-bar`]: {\n [`${componentCls}-bar-collapse-previous`]: {\n insetInlineEnd: 0,\n insetInlineStart: 'unset'\n },\n [`${componentCls}-bar-collapse-next`]: {\n insetInlineEnd: 'unset',\n insetInlineStart: 0\n }\n }\n },\n [`&-rtl${componentCls}-vertical`]: {\n [`> ${componentCls}-bar`]: {\n [`${componentCls}-bar-collapse-previous`]: {\n insetInlineEnd: '50%',\n insetInlineStart: 'unset'\n },\n [`${componentCls}-bar-collapse-next`]: {\n insetInlineEnd: '50%',\n insetInlineStart: 'unset'\n }\n }\n }\n };\n};\nconst centerStyle = {\n position: 'absolute',\n top: '50%',\n left: {\n _skip_check_: true,\n value: '50%'\n },\n transform: 'translate(-50%, -50%)'\n};\nconst genSplitterStyle = token => {\n const {\n componentCls,\n colorFill,\n splitBarDraggableSize,\n splitBarSize,\n splitTriggerSize,\n controlItemBgHover,\n controlItemBgActive,\n controlItemBgActiveHover\n } = token;\n const splitBarCls = `${componentCls}-bar`;\n const splitMaskCls = `${componentCls}-mask`;\n const splitPanelCls = `${componentCls}-panel`;\n const halfTriggerSize = token.calc(splitTriggerSize).div(2).equal();\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'flex',\n width: '100%',\n height: '100%',\n alignItems: 'stretch',\n // ======================== SplitBar ========================\n // Use `>` to avoid conflict with mix layout\n [`> ${splitBarCls}`]: {\n flex: 'none',\n position: 'relative',\n userSelect: 'none',\n // ======================= Dragger =======================\n [`${splitBarCls}-dragger`]: Object.assign(Object.assign({}, centerStyle), {\n zIndex: 1,\n // Hover background\n '&:before': Object.assign({\n content: '\"\"',\n background: controlItemBgHover\n }, centerStyle),\n // Spinner\n '&:after': Object.assign({\n content: '\"\"',\n background: colorFill\n }, centerStyle),\n // Hover\n [`&:hover:not(${splitBarCls}-dragger-active)`]: {\n '&:before': {\n background: controlItemBgActive\n }\n },\n // Active\n '&-active': {\n zIndex: 2,\n '&:before': {\n background: controlItemBgActiveHover\n }\n },\n // Disabled, not use `pointer-events: none` since still need trigger collapse\n [`&-disabled${splitBarCls}-dragger`]: {\n zIndex: 0,\n '&, &:hover, &-active': {\n cursor: 'default',\n '&:before': {\n background: controlItemBgHover\n }\n },\n '&:after': {\n display: 'none'\n }\n }\n }),\n // ======================= Collapse =======================\n [`${splitBarCls}-collapse-bar`]: Object.assign(Object.assign({}, centerStyle), {\n zIndex: 1,\n background: controlItemBgHover,\n fontSize: token.fontSizeSM,\n borderRadius: token.borderRadiusXS,\n color: token.colorText,\n cursor: 'pointer',\n opacity: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n // Hover\n '&:hover': {\n background: controlItemBgActive\n },\n // Active\n '&:active': {\n background: controlItemBgActiveHover\n }\n }),\n // ======================== Status ========================\n // Hover\n '&:hover, &:active': {\n [`${splitBarCls}-collapse-bar`]: {\n opacity: 1\n }\n }\n },\n // =========================== Mask =========================\n // Util dom for handle cursor\n [splitMaskCls]: {\n position: 'fixed',\n zIndex: token.zIndexPopupBase,\n inset: 0,\n '&-horizontal': {\n cursor: 'col-resize'\n },\n '&-vertical': {\n cursor: 'row-resize'\n }\n },\n // ==========================================================\n // == Layout ==\n // ==========================================================\n '&-horizontal': {\n flexDirection: 'row',\n [`> ${splitBarCls}`]: {\n width: 0,\n // ======================= Dragger =======================\n [`${splitBarCls}-dragger`]: {\n cursor: 'col-resize',\n height: '100%',\n width: splitTriggerSize,\n '&:before': {\n height: '100%',\n width: splitBarSize\n },\n '&:after': {\n height: splitBarDraggableSize,\n width: splitBarSize\n }\n },\n // ======================= Collapse =======================\n [`${splitBarCls}-collapse-bar`]: {\n width: token.fontSizeSM,\n height: token.controlHeightSM,\n '&-start': {\n left: {\n _skip_check_: true,\n value: 'auto'\n },\n right: {\n _skip_check_: true,\n value: halfTriggerSize\n },\n transform: 'translateY(-50%)'\n },\n '&-end': {\n left: {\n _skip_check_: true,\n value: halfTriggerSize\n },\n right: {\n _skip_check_: true,\n value: 'auto'\n },\n transform: 'translateY(-50%)'\n }\n }\n }\n },\n '&-vertical': {\n flexDirection: 'column',\n [`> ${splitBarCls}`]: {\n height: 0,\n // ======================= Dragger =======================\n [`${splitBarCls}-dragger`]: {\n cursor: 'row-resize',\n width: '100%',\n height: splitTriggerSize,\n '&:before': {\n width: '100%',\n height: splitBarSize\n },\n '&:after': {\n width: splitBarDraggableSize,\n height: splitBarSize\n }\n },\n // ======================= Collapse =======================\n [`${splitBarCls}-collapse-bar`]: {\n height: token.fontSizeSM,\n width: token.controlHeightSM,\n '&-start': {\n top: 'auto',\n bottom: halfTriggerSize,\n transform: 'translateX(-50%)'\n },\n '&-end': {\n top: halfTriggerSize,\n bottom: 'auto',\n transform: 'translateX(-50%)'\n }\n }\n }\n },\n // ========================= Panels =========================\n [splitPanelCls]: {\n overflow: 'auto',\n padding: '0 1px',\n scrollbarWidth: 'thin',\n boxSizing: 'border-box',\n '&-hidden': {\n padding: 0,\n overflow: 'hidden'\n },\n [`&:has(${componentCls}:only-child)`]: {\n overflow: 'hidden'\n }\n }\n }), genRtlStyle(token))\n };\n};\nconst prepareComponentToken = token => {\n var _a;\n const splitBarSize = token.splitBarSize || 2;\n const splitTriggerSize = token.splitTriggerSize || 6;\n // https://github.com/ant-design/ant-design/pull/51223\n const resizeSpinnerSize = token.resizeSpinnerSize || 20;\n const splitBarDraggableSize = (_a = token.splitBarDraggableSize) !== null && _a !== void 0 ? _a : resizeSpinnerSize;\n return {\n splitBarSize,\n splitTriggerSize,\n splitBarDraggableSize,\n resizeSpinnerSize\n };\n};\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Splitter', token => [genSplitterStyle(token)], prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useForceUpdate = _interopRequireDefault(require(\"../_util/hooks/useForceUpdate\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _Statistic = _interopRequireDefault(require(\"./Statistic\"));\nvar _utils = require(\"./utils\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst REFRESH_INTERVAL = 1000 / 30;\nfunction getTime(value) {\n return new Date(value).getTime();\n}\nconst Countdown = props => {\n const {\n value,\n format = 'HH:mm:ss',\n onChange,\n onFinish\n } = props,\n rest = __rest(props, [\"value\", \"format\", \"onChange\", \"onFinish\"]);\n const forceUpdate = (0, _useForceUpdate.default)();\n const countdown = React.useRef(null);\n const stopTimer = () => {\n onFinish === null || onFinish === void 0 ? void 0 : onFinish();\n if (countdown.current) {\n clearInterval(countdown.current);\n countdown.current = null;\n }\n };\n const syncTimer = () => {\n const timestamp = getTime(value);\n if (timestamp >= Date.now()) {\n countdown.current = setInterval(() => {\n forceUpdate();\n onChange === null || onChange === void 0 ? void 0 : onChange(timestamp - Date.now());\n if (timestamp < Date.now()) {\n stopTimer();\n }\n }, REFRESH_INTERVAL);\n }\n };\n React.useEffect(() => {\n syncTimer();\n return () => {\n if (countdown.current) {\n clearInterval(countdown.current);\n countdown.current = null;\n }\n };\n }, [value]);\n const formatter = (formatValue, config) => (0, _utils.formatCountdown)(formatValue, Object.assign(Object.assign({}, config), {\n format\n }));\n const valueRender = node => (0, _reactNode.cloneElement)(node, {\n title: undefined\n });\n return /*#__PURE__*/React.createElement(_Statistic.default, Object.assign({}, rest, {\n value: value,\n valueRender: valueRender,\n formatter: formatter\n }));\n};\nvar _default = exports.default = /*#__PURE__*/React.memo(Countdown);","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst StatisticNumber = props => {\n const {\n value,\n formatter,\n precision,\n decimalSeparator,\n groupSeparator = '',\n prefixCls\n } = props;\n let valueNode;\n if (typeof formatter === 'function') {\n // Customize formatter\n valueNode = formatter(value);\n } else {\n // Internal formatter\n const val = String(value);\n const cells = val.match(/^(-?)(\\d*)(\\.(\\d+))?$/);\n // Process if illegal number\n if (!cells || val === '-') {\n valueNode = val;\n } else {\n const negative = cells[1];\n let int = cells[2] || '0';\n let decimal = cells[4] || '';\n int = int.replace(/\\B(?=(\\d{3})+(?!\\d))/g, groupSeparator);\n if (typeof precision === 'number') {\n decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);\n }\n if (decimal) {\n decimal = `${decimalSeparator}${decimal}`;\n }\n valueNode = [/*#__PURE__*/React.createElement(\"span\", {\n key: \"int\",\n className: `${prefixCls}-content-value-int`\n }, negative, int), decimal && (/*#__PURE__*/React.createElement(\"span\", {\n key: \"decimal\",\n className: `${prefixCls}-content-value-decimal`\n }, decimal))];\n }\n }\n return /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-content-value`\n }, valueNode);\n};\nvar _default = exports.default = StatisticNumber;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _pickAttrs = _interopRequireDefault(require(\"rc-util/lib/pickAttrs\"));\nvar _configProvider = require(\"../config-provider\");\nvar _skeleton = _interopRequireDefault(require(\"../skeleton\"));\nvar _Number = _interopRequireDefault(require(\"./Number\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Statistic = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n valueStyle,\n value = 0,\n title,\n valueRender,\n prefix,\n suffix,\n loading = false,\n /* --- FormatConfig starts --- */\n formatter,\n precision,\n decimalSeparator = '.',\n groupSeparator = ',',\n /* --- FormatConfig starts --- */\n onMouseEnter,\n onMouseLeave\n } = props,\n rest = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"valueStyle\", \"value\", \"title\", \"valueRender\", \"prefix\", \"suffix\", \"loading\", \"formatter\", \"precision\", \"decimalSeparator\", \"groupSeparator\", \"onMouseEnter\", \"onMouseLeave\"]);\n const {\n getPrefixCls,\n direction,\n statistic\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('statistic', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const valueNode = /*#__PURE__*/React.createElement(_Number.default, {\n decimalSeparator: decimalSeparator,\n groupSeparator: groupSeparator,\n prefixCls: prefixCls,\n formatter: formatter,\n precision: precision,\n value: value\n });\n const cls = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, statistic === null || statistic === void 0 ? void 0 : statistic.className, className, rootClassName, hashId, cssVarCls);\n const restProps = (0, _pickAttrs.default)(rest, {\n aria: true,\n data: true\n });\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({}, restProps, {\n className: cls,\n style: Object.assign(Object.assign({}, statistic === null || statistic === void 0 ? void 0 : statistic.style), style),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n }), title && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title), /*#__PURE__*/React.createElement(_skeleton.default, {\n paragraph: false,\n loading: loading,\n className: `${prefixCls}-skeleton`\n }, /*#__PURE__*/React.createElement(\"div\", {\n style: valueStyle,\n className: `${prefixCls}-content`\n }, prefix && /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-content-prefix`\n }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-content-suffix`\n }, suffix)))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Statistic.displayName = 'Statistic';\n}\nvar _default = exports.default = Statistic;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Countdown = _interopRequireDefault(require(\"./Countdown\"));\nvar _Statistic = _interopRequireDefault(require(\"./Statistic\"));\n_Statistic.default.Countdown = _Countdown.default;\nvar _default = exports.default = _Statistic.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genStatisticStyle = token => {\n const {\n componentCls,\n marginXXS,\n padding,\n colorTextDescription,\n titleFontSize,\n colorTextHeading,\n contentFontSize,\n fontFamily\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n [`${componentCls}-title`]: {\n marginBottom: marginXXS,\n color: colorTextDescription,\n fontSize: titleFontSize\n },\n [`${componentCls}-skeleton`]: {\n paddingTop: padding\n },\n [`${componentCls}-content`]: {\n color: colorTextHeading,\n fontSize: contentFontSize,\n fontFamily,\n [`${componentCls}-content-value`]: {\n display: 'inline-block',\n direction: 'ltr'\n },\n [`${componentCls}-content-prefix, ${componentCls}-content-suffix`]: {\n display: 'inline-block'\n },\n [`${componentCls}-content-prefix`]: {\n marginInlineEnd: marginXXS\n },\n [`${componentCls}-content-suffix`]: {\n marginInlineStart: marginXXS\n }\n }\n })\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => {\n const {\n fontSizeHeading3,\n fontSize\n } = token;\n return {\n titleFontSize: fontSize,\n contentFontSize: fontSizeHeading3\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Statistic', token => {\n const statisticToken = (0, _internal.mergeToken)(token, {});\n return [genStatisticStyle(statisticToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.formatCountdown = formatCountdown;\nexports.formatTimeStr = formatTimeStr;\n// Countdown\nconst timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365],\n// years\n['M', 1000 * 60 * 60 * 24 * 30],\n// months\n['D', 1000 * 60 * 60 * 24],\n// days\n['H', 1000 * 60 * 60],\n// hours\n['m', 1000 * 60],\n// minutes\n['s', 1000],\n// seconds\n['S', 1] // million seconds\n];\nfunction formatTimeStr(duration, format) {\n let leftDuration = duration;\n const escapeRegex = /\\[[^\\]]*]/g;\n const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1));\n const templateText = format.replace(escapeRegex, '[]');\n const replacedText = timeUnits.reduce((current, _ref) => {\n let [name, unit] = _ref;\n if (current.includes(name)) {\n const value = Math.floor(leftDuration / unit);\n leftDuration -= value * unit;\n return current.replace(new RegExp(`${name}+`, 'g'), match => {\n const len = match.length;\n return value.toString().padStart(len, '0');\n });\n }\n return current;\n }, templateText);\n let index = 0;\n return replacedText.replace(escapeRegex, () => {\n const match = keepList[index];\n index += 1;\n return match;\n });\n}\nfunction formatCountdown(value, config) {\n const {\n format = ''\n } = config;\n const target = new Date(value).getTime();\n const current = Date.now();\n const diff = Math.max(target - current, 0);\n return formatTimeStr(diff, format);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckOutlined = _interopRequireDefault(require(\"@ant-design/icons/CheckOutlined\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcSteps = _interopRequireDefault(require(\"rc-steps\"));\nvar _configProvider = require(\"../config-provider\");\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _useBreakpoint = _interopRequireDefault(require(\"../grid/hooks/useBreakpoint\"));\nvar _progress = _interopRequireDefault(require(\"../progress\"));\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _useLegacyItems = _interopRequireDefault(require(\"./useLegacyItems\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Steps = props => {\n const {\n percent,\n size: customizeSize,\n className,\n rootClassName,\n direction,\n items,\n responsive = true,\n current = 0,\n children,\n style\n } = props,\n restProps = __rest(props, [\"percent\", \"size\", \"className\", \"rootClassName\", \"direction\", \"items\", \"responsive\", \"current\", \"children\", \"style\"]);\n const {\n xs\n } = (0, _useBreakpoint.default)(responsive);\n const {\n getPrefixCls,\n direction: rtlDirection,\n steps\n } = React.useContext(_configProvider.ConfigContext);\n const realDirectionValue = React.useMemo(() => responsive && xs ? 'vertical' : direction, [xs, direction]);\n const size = (0, _useSize.default)(customizeSize);\n const prefixCls = getPrefixCls('steps', props.prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const isInline = props.type === 'inline';\n const iconPrefix = getPrefixCls('', props.iconPrefix);\n const mergedItems = (0, _useLegacyItems.default)(items, children);\n const mergedPercent = isInline ? undefined : percent;\n const mergedStyle = Object.assign(Object.assign({}, steps === null || steps === void 0 ? void 0 : steps.style), style);\n const stepsClassName = (0, _classnames.default)(steps === null || steps === void 0 ? void 0 : steps.className, {\n [`${prefixCls}-rtl`]: rtlDirection === 'rtl',\n [`${prefixCls}-with-progress`]: mergedPercent !== undefined\n }, className, rootClassName, hashId, cssVarCls);\n const icons = {\n finish: /*#__PURE__*/React.createElement(_CheckOutlined.default, {\n className: `${prefixCls}-finish-icon`\n }),\n error: /*#__PURE__*/React.createElement(_CloseOutlined.default, {\n className: `${prefixCls}-error-icon`\n })\n };\n const stepIconRender = _ref => {\n let {\n node,\n status\n } = _ref;\n if (status === 'process' && mergedPercent !== undefined) {\n // currently it's hard-coded, since we can't easily read the actually width of icon\n const progressWidth = size === 'small' ? 32 : 40;\n // iconWithProgress\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-progress-icon`\n }, /*#__PURE__*/React.createElement(_progress.default, {\n type: \"circle\",\n percent: mergedPercent,\n size: progressWidth,\n strokeWidth: 4,\n format: () => null\n }), node);\n }\n return node;\n };\n const itemRender = (item, stepItem) => item.description ? /*#__PURE__*/React.createElement(_tooltip.default, {\n title: item.description\n }, stepItem) : stepItem;\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcSteps.default, Object.assign({\n icons: icons\n }, restProps, {\n style: mergedStyle,\n current: current,\n size: size,\n items: mergedItems,\n itemRender: isInline ? itemRender : undefined,\n stepIcon: stepIconRender,\n direction: realDirectionValue,\n prefixCls: prefixCls,\n iconPrefix: iconPrefix,\n className: stepsClassName\n })));\n};\nSteps.Step = _rcSteps.default.Step;\nif (process.env.NODE_ENV !== 'production') {\n Steps.displayName = 'Steps';\n}\nvar _default = exports.default = Steps;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genStepsCustomIconStyle = token => {\n const {\n componentCls,\n customIconTop,\n customIconSize,\n customIconFontSize\n } = token;\n return {\n [`${componentCls}-item-custom`]: {\n [`> ${componentCls}-item-container > ${componentCls}-item-icon`]: {\n height: 'auto',\n background: 'none',\n border: 0,\n [`> ${componentCls}-icon`]: {\n top: customIconTop,\n width: customIconSize,\n height: customIconSize,\n fontSize: customIconFontSize,\n lineHeight: (0, _cssinjs.unit)(customIconSize)\n }\n }\n },\n // Only adjust horizontal customize icon width\n [`&:not(${componentCls}-vertical)`]: {\n [`${componentCls}-item-custom`]: {\n [`${componentCls}-item-icon`]: {\n width: 'auto',\n background: 'none'\n }\n }\n }\n };\n};\nvar _default = exports.default = genStepsCustomIconStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genHorizontalStyle = token => {\n const {\n componentCls\n } = token;\n const stepsItemCls = `${componentCls}-item`; // .ant-steps-item\n return {\n [`${componentCls}-horizontal`]: {\n [`${stepsItemCls}-tail`]: {\n transform: 'translateY(-50%)'\n }\n }\n };\n};\nvar _default = exports.default = genHorizontalStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nvar _customIcon = _interopRequireDefault(require(\"./custom-icon\"));\nvar _horizontal = _interopRequireDefault(require(\"./horizontal\"));\nvar _inline = _interopRequireDefault(require(\"./inline\"));\nvar _labelPlacement = _interopRequireDefault(require(\"./label-placement\"));\nvar _nav = _interopRequireDefault(require(\"./nav\"));\nvar _progress = _interopRequireDefault(require(\"./progress\"));\nvar _progressDot = _interopRequireDefault(require(\"./progress-dot\"));\nvar _rtl = _interopRequireDefault(require(\"./rtl\"));\nvar _small = _interopRequireDefault(require(\"./small\"));\nvar _vertical = _interopRequireDefault(require(\"./vertical\"));\nconst STEP_ITEM_STATUS_WAIT = 'wait';\nconst STEP_ITEM_STATUS_PROCESS = 'process';\nconst STEP_ITEM_STATUS_FINISH = 'finish';\nconst STEP_ITEM_STATUS_ERROR = 'error';\nconst genStepsItemStatusStyle = (status, token) => {\n const prefix = `${token.componentCls}-item`;\n const iconColorKey = `${status}IconColor`;\n const titleColorKey = `${status}TitleColor`;\n const descriptionColorKey = `${status}DescriptionColor`;\n const tailColorKey = `${status}TailColor`;\n const iconBgColorKey = `${status}IconBgColor`;\n const iconBorderColorKey = `${status}IconBorderColor`;\n const dotColorKey = `${status}DotColor`;\n return {\n [`${prefix}-${status} ${prefix}-icon`]: {\n backgroundColor: token[iconBgColorKey],\n borderColor: token[iconBorderColorKey],\n [`> ${token.componentCls}-icon`]: {\n color: token[iconColorKey],\n [`${token.componentCls}-icon-dot`]: {\n background: token[dotColorKey]\n }\n }\n },\n [`${prefix}-${status}${prefix}-custom ${prefix}-icon`]: {\n [`> ${token.componentCls}-icon`]: {\n color: token[dotColorKey]\n }\n },\n [`${prefix}-${status} > ${prefix}-container > ${prefix}-content > ${prefix}-title`]: {\n color: token[titleColorKey],\n '&::after': {\n backgroundColor: token[tailColorKey]\n }\n },\n [`${prefix}-${status} > ${prefix}-container > ${prefix}-content > ${prefix}-description`]: {\n color: token[descriptionColorKey]\n },\n [`${prefix}-${status} > ${prefix}-container > ${prefix}-tail::after`]: {\n backgroundColor: token[tailColorKey]\n }\n };\n};\nconst genStepsItemStyle = token => {\n const {\n componentCls,\n motionDurationSlow\n } = token;\n const stepsItemCls = `${componentCls}-item`; // .ant-steps-item\n const stepItemIconCls = `${stepsItemCls}-icon`;\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({\n [stepsItemCls]: {\n position: 'relative',\n display: 'inline-block',\n flex: 1,\n overflow: 'hidden',\n verticalAlign: 'top',\n '&:last-child': {\n flex: 'none',\n [`> ${stepsItemCls}-container > ${stepsItemCls}-tail, > ${stepsItemCls}-container > ${stepsItemCls}-content > ${stepsItemCls}-title::after`]: {\n display: 'none'\n }\n }\n },\n [`${stepsItemCls}-container`]: {\n outline: 'none',\n '&:focus-visible': {\n [stepItemIconCls]: Object.assign({}, (0, _style.genFocusOutline)(token))\n }\n },\n [`${stepItemIconCls}, ${stepsItemCls}-content`]: {\n display: 'inline-block',\n verticalAlign: 'top'\n },\n [stepItemIconCls]: {\n width: token.iconSize,\n height: token.iconSize,\n marginTop: 0,\n marginBottom: 0,\n marginInlineStart: 0,\n marginInlineEnd: token.marginXS,\n fontSize: token.iconFontSize,\n fontFamily: token.fontFamily,\n lineHeight: (0, _cssinjs.unit)(token.iconSize),\n textAlign: 'center',\n borderRadius: token.iconSize,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} transparent`,\n transition: `background-color ${motionDurationSlow}, border-color ${motionDurationSlow}`,\n [`${componentCls}-icon`]: {\n position: 'relative',\n top: token.iconTop,\n color: token.colorPrimary,\n lineHeight: 1\n }\n },\n [`${stepsItemCls}-tail`]: {\n position: 'absolute',\n top: token.calc(token.iconSize).div(2).equal(),\n insetInlineStart: 0,\n width: '100%',\n '&::after': {\n display: 'inline-block',\n width: '100%',\n height: token.lineWidth,\n background: token.colorSplit,\n borderRadius: token.lineWidth,\n transition: `background ${motionDurationSlow}`,\n content: '\"\"'\n }\n },\n [`${stepsItemCls}-title`]: {\n position: 'relative',\n display: 'inline-block',\n paddingInlineEnd: token.padding,\n color: token.colorText,\n fontSize: token.fontSizeLG,\n lineHeight: (0, _cssinjs.unit)(token.titleLineHeight),\n '&::after': {\n position: 'absolute',\n top: token.calc(token.titleLineHeight).div(2).equal(),\n insetInlineStart: '100%',\n display: 'block',\n width: 9999,\n height: token.lineWidth,\n background: token.processTailColor,\n content: '\"\"'\n }\n },\n [`${stepsItemCls}-subtitle`]: {\n display: 'inline',\n marginInlineStart: token.marginXS,\n color: token.colorTextDescription,\n fontWeight: 'normal',\n fontSize: token.fontSize\n },\n [`${stepsItemCls}-description`]: {\n color: token.colorTextDescription,\n fontSize: token.fontSize\n }\n }, genStepsItemStatusStyle(STEP_ITEM_STATUS_WAIT, token)), genStepsItemStatusStyle(STEP_ITEM_STATUS_PROCESS, token)), {\n [`${stepsItemCls}-process > ${stepsItemCls}-container > ${stepsItemCls}-title`]: {\n fontWeight: token.fontWeightStrong\n }\n }), genStepsItemStatusStyle(STEP_ITEM_STATUS_FINISH, token)), genStepsItemStatusStyle(STEP_ITEM_STATUS_ERROR, token)), {\n [`${stepsItemCls}${componentCls}-next-error > ${componentCls}-item-title::after`]: {\n background: token.colorError\n },\n [`${stepsItemCls}-disabled`]: {\n cursor: 'not-allowed'\n }\n });\n};\n// ============================= Clickable ===========================\nconst genStepsClickableStyle = token => {\n const {\n componentCls,\n motionDurationSlow\n } = token;\n return {\n [`& ${componentCls}-item`]: {\n [`&:not(${componentCls}-item-active)`]: {\n [`& > ${componentCls}-item-container[role='button']`]: {\n cursor: 'pointer',\n [`${componentCls}-item`]: {\n [`&-title, &-subtitle, &-description, &-icon ${componentCls}-icon`]: {\n transition: `color ${motionDurationSlow}`\n }\n },\n '&:hover': {\n [`${componentCls}-item`]: {\n '&-title, &-subtitle, &-description': {\n color: token.colorPrimary\n }\n }\n }\n },\n [`&:not(${componentCls}-item-process)`]: {\n [`& > ${componentCls}-item-container[role='button']:hover`]: {\n [`${componentCls}-item`]: {\n '&-icon': {\n borderColor: token.colorPrimary,\n [`${componentCls}-icon`]: {\n color: token.colorPrimary\n }\n }\n }\n }\n }\n }\n },\n [`&${componentCls}-horizontal:not(${componentCls}-label-vertical)`]: {\n [`${componentCls}-item`]: {\n paddingInlineStart: token.padding,\n whiteSpace: 'nowrap',\n '&:first-child': {\n paddingInlineStart: 0\n },\n [`&:last-child ${componentCls}-item-title`]: {\n paddingInlineEnd: 0\n },\n '&-tail': {\n display: 'none'\n },\n '&-description': {\n maxWidth: token.descriptionMaxWidth,\n whiteSpace: 'normal'\n }\n }\n }\n };\n};\nconst genStepsStyle = token => {\n const {\n componentCls\n } = token; // .ant-steps\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'flex',\n width: '100%',\n fontSize: 0,\n textAlign: 'initial'\n }), genStepsItemStyle(token)), genStepsClickableStyle(token)), (0, _customIcon.default)(token)), (0, _small.default)(token)), (0, _vertical.default)(token)), (0, _horizontal.default)(token)), (0, _labelPlacement.default)(token)), (0, _progressDot.default)(token)), (0, _nav.default)(token)), (0, _rtl.default)(token)), (0, _progress.default)(token)), (0, _inline.default)(token))\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => ({\n titleLineHeight: token.controlHeight,\n customIconSize: token.controlHeight,\n customIconTop: 0,\n customIconFontSize: token.controlHeightSM,\n iconSize: token.controlHeight,\n iconTop: -0.5,\n // magic for ui experience\n iconFontSize: token.fontSize,\n iconSizeSM: token.fontSizeHeading3,\n dotSize: token.controlHeight / 4,\n dotCurrentSize: token.controlHeightLG / 4,\n navArrowColor: token.colorTextDisabled,\n navContentMaxWidth: 'auto',\n descriptionMaxWidth: 140,\n waitIconColor: token.wireframe ? token.colorTextDisabled : token.colorTextLabel,\n waitIconBgColor: token.wireframe ? token.colorBgContainer : token.colorFillContent,\n waitIconBorderColor: token.wireframe ? token.colorTextDisabled : 'transparent',\n finishIconBgColor: token.wireframe ? token.colorBgContainer : token.controlItemBgActive,\n finishIconBorderColor: token.wireframe ? token.colorPrimary : token.controlItemBgActive\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Steps', token => {\n const {\n colorTextDisabled,\n controlHeightLG,\n colorTextLightSolid,\n colorText,\n colorPrimary,\n colorTextDescription,\n colorTextQuaternary,\n colorError,\n colorBorderSecondary,\n colorSplit\n } = token;\n const stepsToken = (0, _internal.mergeToken)(token, {\n // Steps component less variable\n processIconColor: colorTextLightSolid,\n processTitleColor: colorText,\n processDescriptionColor: colorText,\n processIconBgColor: colorPrimary,\n processIconBorderColor: colorPrimary,\n processDotColor: colorPrimary,\n processTailColor: colorSplit,\n waitTitleColor: colorTextDescription,\n waitDescriptionColor: colorTextDescription,\n waitTailColor: colorSplit,\n waitDotColor: colorTextDisabled,\n finishIconColor: colorPrimary,\n finishTitleColor: colorText,\n finishDescriptionColor: colorTextDescription,\n finishTailColor: colorPrimary,\n finishDotColor: colorPrimary,\n errorIconColor: colorTextLightSolid,\n errorTitleColor: colorError,\n errorDescriptionColor: colorError,\n errorTailColor: colorSplit,\n errorIconBgColor: colorError,\n errorIconBorderColor: colorError,\n errorDotColor: colorError,\n stepsNavActiveColor: colorPrimary,\n stepsProgressSize: controlHeightLG,\n // Steps inline variable\n inlineDotSize: 6,\n inlineTitleColor: colorTextQuaternary,\n inlineTailColor: colorBorderSecondary\n });\n return [genStepsStyle(stepsToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genStepsInlineStyle = token => {\n const {\n componentCls,\n inlineDotSize,\n inlineTitleColor,\n inlineTailColor\n } = token;\n const containerPaddingTop = token.calc(token.paddingXS).add(token.lineWidth).equal();\n const titleStyle = {\n [`${componentCls}-item-container ${componentCls}-item-content ${componentCls}-item-title`]: {\n color: inlineTitleColor\n }\n };\n return {\n [`&${componentCls}-inline`]: {\n width: 'auto',\n display: 'inline-flex',\n [`${componentCls}-item`]: {\n flex: 'none',\n '&-container': {\n padding: `${(0, _cssinjs.unit)(containerPaddingTop)} ${(0, _cssinjs.unit)(token.paddingXXS)} 0`,\n margin: `0 ${(0, _cssinjs.unit)(token.calc(token.marginXXS).div(2).equal())}`,\n borderRadius: token.borderRadiusSM,\n cursor: 'pointer',\n transition: `background-color ${token.motionDurationMid}`,\n '&:hover': {\n background: token.controlItemBgHover\n },\n \"&[role='button']:hover\": {\n opacity: 1\n }\n },\n '&-icon': {\n width: inlineDotSize,\n height: inlineDotSize,\n marginInlineStart: `calc(50% - ${(0, _cssinjs.unit)(token.calc(inlineDotSize).div(2).equal())})`,\n [`> ${componentCls}-icon`]: {\n top: 0\n },\n [`${componentCls}-icon-dot`]: {\n borderRadius: token.calc(token.fontSizeSM).div(4).equal(),\n '&::after': {\n display: 'none'\n }\n }\n },\n '&-content': {\n width: 'auto',\n marginTop: token.calc(token.marginXS).sub(token.lineWidth).equal()\n },\n '&-title': {\n color: inlineTitleColor,\n fontSize: token.fontSizeSM,\n lineHeight: token.lineHeightSM,\n fontWeight: 'normal',\n marginBottom: token.calc(token.marginXXS).div(2).equal()\n },\n '&-description': {\n display: 'none'\n },\n '&-tail': {\n marginInlineStart: 0,\n top: token.calc(inlineDotSize).div(2).add(containerPaddingTop).equal(),\n transform: `translateY(-50%)`,\n '&:after': {\n width: '100%',\n height: token.lineWidth,\n borderRadius: 0,\n marginInlineStart: 0,\n background: inlineTailColor\n }\n },\n [`&:first-child ${componentCls}-item-tail`]: {\n width: '50%',\n marginInlineStart: '50%'\n },\n [`&:last-child ${componentCls}-item-tail`]: {\n display: 'block',\n width: '50%'\n },\n '&-wait': Object.assign({\n [`${componentCls}-item-icon ${componentCls}-icon ${componentCls}-icon-dot`]: {\n backgroundColor: token.colorBorderBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${inlineTailColor}`\n }\n }, titleStyle),\n '&-finish': Object.assign({\n [`${componentCls}-item-tail::after`]: {\n backgroundColor: inlineTailColor\n },\n [`${componentCls}-item-icon ${componentCls}-icon ${componentCls}-icon-dot`]: {\n backgroundColor: inlineTailColor,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${inlineTailColor}`\n }\n }, titleStyle),\n '&-error': titleStyle,\n '&-active, &-process': Object.assign({\n [`${componentCls}-item-icon`]: {\n width: inlineDotSize,\n height: inlineDotSize,\n marginInlineStart: `calc(50% - ${(0, _cssinjs.unit)(token.calc(inlineDotSize).div(2).equal())})`,\n top: 0\n }\n }, titleStyle),\n [`&:not(${componentCls}-item-active) > ${componentCls}-item-container[role='button']:hover`]: {\n [`${componentCls}-item-title`]: {\n color: inlineTitleColor\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = genStepsInlineStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genStepsLabelPlacementStyle = token => {\n const {\n componentCls,\n iconSize,\n lineHeight,\n iconSizeSM\n } = token;\n return {\n [`&${componentCls}-label-vertical`]: {\n [`${componentCls}-item`]: {\n overflow: 'visible',\n '&-tail': {\n marginInlineStart: token.calc(iconSize).div(2).add(token.controlHeightLG).equal(),\n padding: `0 ${(0, _cssinjs.unit)(token.paddingLG)}`\n },\n '&-content': {\n display: 'block',\n width: token.calc(iconSize).div(2).add(token.controlHeightLG).mul(2).equal(),\n marginTop: token.marginSM,\n textAlign: 'center'\n },\n '&-icon': {\n display: 'inline-block',\n marginInlineStart: token.controlHeightLG\n },\n '&-title': {\n paddingInlineEnd: 0,\n paddingInlineStart: 0,\n '&::after': {\n display: 'none'\n }\n },\n '&-subtitle': {\n display: 'block',\n marginBottom: token.marginXXS,\n marginInlineStart: 0,\n lineHeight\n }\n },\n [`&${componentCls}-small:not(${componentCls}-dot)`]: {\n [`${componentCls}-item`]: {\n '&-icon': {\n marginInlineStart: token.calc(iconSize).sub(iconSizeSM).div(2).add(token.controlHeightLG).equal()\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = genStepsLabelPlacementStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nconst genStepsNavStyle = token => {\n const {\n componentCls,\n navContentMaxWidth,\n navArrowColor,\n stepsNavActiveColor,\n motionDurationSlow\n } = token;\n return {\n [`&${componentCls}-navigation`]: {\n paddingTop: token.paddingSM,\n [`&${componentCls}-small`]: {\n [`${componentCls}-item`]: {\n '&-container': {\n marginInlineStart: token.calc(token.marginSM).mul(-1).equal()\n }\n }\n },\n [`${componentCls}-item`]: {\n overflow: 'visible',\n textAlign: 'center',\n '&-container': {\n display: 'inline-block',\n height: '100%',\n marginInlineStart: token.calc(token.margin).mul(-1).equal(),\n paddingBottom: token.paddingSM,\n textAlign: 'start',\n transition: `opacity ${motionDurationSlow}`,\n [`${componentCls}-item-content`]: {\n maxWidth: navContentMaxWidth\n },\n [`${componentCls}-item-title`]: Object.assign(Object.assign({\n maxWidth: '100%',\n paddingInlineEnd: 0\n }, _style.textEllipsis), {\n '&::after': {\n display: 'none'\n }\n })\n },\n [`&:not(${componentCls}-item-active)`]: {\n [`${componentCls}-item-container[role='button']`]: {\n cursor: 'pointer',\n '&:hover': {\n opacity: 0.85\n }\n }\n },\n '&:last-child': {\n flex: 1,\n '&::after': {\n display: 'none'\n }\n },\n '&::after': {\n position: 'absolute',\n top: `calc(50% - ${(0, _cssinjs.unit)(token.calc(token.paddingSM).div(2).equal())})`,\n insetInlineStart: '100%',\n display: 'inline-block',\n width: token.fontSizeIcon,\n height: token.fontSizeIcon,\n borderTop: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${navArrowColor}`,\n borderBottom: 'none',\n borderInlineStart: 'none',\n borderInlineEnd: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${navArrowColor}`,\n transform: 'translateY(-50%) translateX(-50%) rotate(45deg)',\n content: '\"\"'\n },\n '&::before': {\n position: 'absolute',\n bottom: 0,\n insetInlineStart: '50%',\n display: 'inline-block',\n width: 0,\n height: token.lineWidthBold,\n backgroundColor: stepsNavActiveColor,\n transition: `width ${motionDurationSlow}, inset-inline-start ${motionDurationSlow}`,\n transitionTimingFunction: 'ease-out',\n content: '\"\"'\n }\n },\n [`${componentCls}-item${componentCls}-item-active::before`]: {\n insetInlineStart: 0,\n width: '100%'\n }\n },\n [`&${componentCls}-navigation${componentCls}-vertical`]: {\n [`> ${componentCls}-item`]: {\n marginInlineEnd: 0,\n '&::before': {\n display: 'none'\n },\n [`&${componentCls}-item-active::before`]: {\n top: 0,\n insetInlineEnd: 0,\n insetInlineStart: 'unset',\n display: 'block',\n width: token.calc(token.lineWidth).mul(3).equal(),\n height: `calc(100% - ${(0, _cssinjs.unit)(token.marginLG)})`\n },\n '&::after': {\n position: 'relative',\n insetInlineStart: '50%',\n display: 'block',\n width: token.calc(token.controlHeight).mul(0.25).equal(),\n height: token.calc(token.controlHeight).mul(0.25).equal(),\n marginBottom: token.marginXS,\n textAlign: 'center',\n transform: 'translateY(-50%) translateX(-50%) rotate(135deg)'\n },\n '&:last-child': {\n '&::after': {\n display: 'none'\n }\n },\n [`> ${componentCls}-item-container > ${componentCls}-item-tail`]: {\n visibility: 'hidden'\n }\n }\n },\n [`&${componentCls}-navigation${componentCls}-horizontal`]: {\n [`> ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {\n visibility: 'hidden'\n }\n }\n };\n};\nvar _default = exports.default = genStepsNavStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genStepsProgressDotStyle = token => {\n const {\n componentCls,\n descriptionMaxWidth,\n lineHeight,\n dotCurrentSize,\n dotSize,\n motionDurationSlow\n } = token;\n return {\n [`&${componentCls}-dot, &${componentCls}-dot${componentCls}-small`]: {\n [`${componentCls}-item`]: {\n '&-title': {\n lineHeight\n },\n '&-tail': {\n // Math.floor((token.size - token.lineWidth * 3) / 2)\n top: token.calc(token.dotSize).sub(token.calc(token.lineWidth).mul(3).equal()).div(2).equal(),\n width: '100%',\n marginTop: 0,\n marginBottom: 0,\n marginInline: `${(0, _cssinjs.unit)(token.calc(descriptionMaxWidth).div(2).equal())} 0`,\n padding: 0,\n '&::after': {\n width: `calc(100% - ${(0, _cssinjs.unit)(token.calc(token.marginSM).mul(2).equal())})`,\n height: token.calc(token.lineWidth).mul(3).equal(),\n marginInlineStart: token.marginSM\n }\n },\n '&-icon': {\n width: dotSize,\n height: dotSize,\n marginInlineStart: token.calc(token.descriptionMaxWidth).sub(dotSize).div(2).equal(),\n paddingInlineEnd: 0,\n lineHeight: (0, _cssinjs.unit)(dotSize),\n background: 'transparent',\n border: 0,\n [`${componentCls}-icon-dot`]: {\n position: 'relative',\n float: 'left',\n width: '100%',\n height: '100%',\n borderRadius: 100,\n // very large number\n transition: `all ${motionDurationSlow}`,\n /* expand hover area */\n '&::after': {\n position: 'absolute',\n top: token.calc(token.marginSM).mul(-1).equal(),\n insetInlineStart: token.calc(dotSize).sub(token.calc(token.controlHeightLG).mul(1.5).equal()).div(2).equal(),\n width: token.calc(token.controlHeightLG).mul(1.5).equal(),\n height: token.controlHeight,\n background: 'transparent',\n content: '\"\"'\n }\n }\n },\n '&-content': {\n width: descriptionMaxWidth\n },\n [`&-process ${componentCls}-item-icon`]: {\n position: 'relative',\n top: token.calc(dotSize).sub(dotCurrentSize).div(2).equal(),\n width: dotCurrentSize,\n height: dotCurrentSize,\n lineHeight: (0, _cssinjs.unit)(dotCurrentSize),\n background: 'none',\n marginInlineStart: token.calc(token.descriptionMaxWidth).sub(dotCurrentSize).div(2).equal()\n },\n [`&-process ${componentCls}-icon`]: {\n [`&:first-child ${componentCls}-icon-dot`]: {\n insetInlineStart: 0\n }\n }\n }\n },\n [`&${componentCls}-vertical${componentCls}-dot`]: {\n [`${componentCls}-item-icon`]: {\n marginTop: token.calc(token.controlHeight).sub(dotSize).div(2).equal(),\n marginInlineStart: 0,\n background: 'none'\n },\n [`${componentCls}-item-process ${componentCls}-item-icon`]: {\n marginTop: token.calc(token.controlHeight).sub(dotCurrentSize).div(2).equal(),\n top: 0,\n insetInlineStart: token.calc(dotSize).sub(dotCurrentSize).div(2).equal(),\n marginInlineStart: 0\n },\n // https://github.com/ant-design/ant-design/issues/18354\n [`${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {\n top: token.calc(token.controlHeight).sub(dotSize).div(2).equal(),\n insetInlineStart: 0,\n margin: 0,\n padding: `${(0, _cssinjs.unit)(token.calc(dotSize).add(token.paddingXS).equal())} 0 ${(0, _cssinjs.unit)(token.paddingXS)}`,\n '&::after': {\n marginInlineStart: token.calc(dotSize).sub(token.lineWidth).div(2).equal()\n }\n },\n [`&${componentCls}-small`]: {\n [`${componentCls}-item-icon`]: {\n marginTop: token.calc(token.controlHeightSM).sub(dotSize).div(2).equal()\n },\n [`${componentCls}-item-process ${componentCls}-item-icon`]: {\n marginTop: token.calc(token.controlHeightSM).sub(dotCurrentSize).div(2).equal()\n },\n [`${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {\n top: token.calc(token.controlHeightSM).sub(dotSize).div(2).equal()\n }\n },\n [`${componentCls}-item:first-child ${componentCls}-icon-dot`]: {\n insetInlineStart: 0\n },\n [`${componentCls}-item-content`]: {\n width: 'inherit'\n }\n }\n };\n};\nvar _default = exports.default = genStepsProgressDotStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genStepsProgressStyle = token => {\n const {\n antCls,\n componentCls,\n iconSize,\n iconSizeSM,\n processIconColor,\n marginXXS,\n lineWidthBold,\n lineWidth,\n paddingXXS\n } = token;\n const progressSize = token.calc(iconSize).add(token.calc(lineWidthBold).mul(4).equal()).equal();\n const progressSizeSM = token.calc(iconSizeSM).add(token.calc(token.lineWidth).mul(4).equal()).equal();\n return {\n [`&${componentCls}-with-progress`]: {\n [`${componentCls}-item`]: {\n paddingTop: paddingXXS,\n [`&-process ${componentCls}-item-container ${componentCls}-item-icon ${componentCls}-icon`]: {\n color: processIconColor\n }\n },\n [`&${componentCls}-vertical > ${componentCls}-item `]: {\n paddingInlineStart: paddingXXS,\n [`> ${componentCls}-item-container > ${componentCls}-item-tail`]: {\n top: marginXXS,\n insetInlineStart: token.calc(iconSize).div(2).sub(lineWidth).add(paddingXXS).equal()\n }\n },\n [`&, &${componentCls}-small`]: {\n [`&${componentCls}-horizontal ${componentCls}-item:first-child`]: {\n paddingBottom: paddingXXS,\n paddingInlineStart: paddingXXS\n }\n },\n [`&${componentCls}-small${componentCls}-vertical > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {\n insetInlineStart: token.calc(iconSizeSM).div(2).sub(lineWidth).add(paddingXXS).equal()\n },\n [`&${componentCls}-label-vertical ${componentCls}-item ${componentCls}-item-tail`]: {\n top: token.calc(iconSize).div(2).add(paddingXXS).equal()\n },\n [`${componentCls}-item-icon`]: {\n position: 'relative',\n [`${antCls}-progress`]: {\n position: 'absolute',\n insetInlineStart: '50%',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n '&-inner': {\n width: `${(0, _cssinjs.unit)(progressSize)} !important`,\n height: `${(0, _cssinjs.unit)(progressSize)} !important`\n }\n }\n },\n // ============================== Small size ==============================\n [`&${componentCls}-small`]: {\n [`&${componentCls}-label-vertical ${componentCls}-item ${componentCls}-item-tail`]: {\n top: token.calc(iconSizeSM).div(2).add(paddingXXS).equal()\n },\n [`${componentCls}-item-icon ${antCls}-progress-inner`]: {\n width: `${(0, _cssinjs.unit)(progressSizeSM)} !important`,\n height: `${(0, _cssinjs.unit)(progressSizeSM)} !important`\n }\n }\n }\n };\n};\nvar _default = exports.default = genStepsProgressStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genStepsRTLStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`&${componentCls}-rtl`]: {\n direction: 'rtl',\n [`${componentCls}-item`]: {\n '&-subtitle': {\n float: 'left'\n }\n },\n // nav\n [`&${componentCls}-navigation`]: {\n [`${componentCls}-item::after`]: {\n transform: 'rotate(-45deg)'\n }\n },\n // vertical\n [`&${componentCls}-vertical`]: {\n [`> ${componentCls}-item`]: {\n '&::after': {\n transform: 'rotate(225deg)'\n },\n [`${componentCls}-item-icon`]: {\n float: 'right'\n }\n }\n },\n // progress-dot\n [`&${componentCls}-dot`]: {\n [`${componentCls}-item-icon ${componentCls}-icon-dot, &${componentCls}-small ${componentCls}-item-icon ${componentCls}-icon-dot`]: {\n float: 'right'\n }\n }\n }\n };\n};\nvar _default = exports.default = genStepsRTLStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genStepsSmallStyle = token => {\n const {\n componentCls,\n iconSizeSM,\n // stepsSmallIconMargin,\n fontSizeSM,\n fontSize,\n colorTextDescription\n } = token;\n return {\n [`&${componentCls}-small`]: {\n [`&${componentCls}-horizontal:not(${componentCls}-label-vertical) ${componentCls}-item`]: {\n paddingInlineStart: token.paddingSM,\n '&:first-child': {\n paddingInlineStart: 0\n }\n },\n [`${componentCls}-item-icon`]: {\n width: iconSizeSM,\n height: iconSizeSM,\n // margin: stepsSmallIconMargin,\n marginTop: 0,\n marginBottom: 0,\n marginInline: `0 ${(0, _cssinjs.unit)(token.marginXS)}`,\n fontSize: fontSizeSM,\n lineHeight: (0, _cssinjs.unit)(iconSizeSM),\n textAlign: 'center',\n borderRadius: iconSizeSM\n },\n [`${componentCls}-item-title`]: {\n paddingInlineEnd: token.paddingSM,\n fontSize,\n lineHeight: (0, _cssinjs.unit)(iconSizeSM),\n '&::after': {\n top: token.calc(iconSizeSM).div(2).equal()\n }\n },\n [`${componentCls}-item-description`]: {\n color: colorTextDescription,\n fontSize\n },\n [`${componentCls}-item-tail`]: {\n top: token.calc(iconSizeSM).div(2).sub(token.paddingXXS).equal()\n },\n [`${componentCls}-item-custom ${componentCls}-item-icon`]: {\n width: 'inherit',\n height: 'inherit',\n lineHeight: 'inherit',\n background: 'none',\n border: 0,\n borderRadius: 0,\n [`> ${componentCls}-icon`]: {\n fontSize: iconSizeSM,\n lineHeight: (0, _cssinjs.unit)(iconSizeSM),\n transform: 'none'\n }\n }\n }\n };\n};\nvar _default = exports.default = genStepsSmallStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genStepsVerticalStyle = token => {\n const {\n componentCls,\n iconSizeSM,\n iconSize\n } = token;\n return {\n [`&${componentCls}-vertical`]: {\n display: 'flex',\n flexDirection: 'column',\n [`> ${componentCls}-item`]: {\n display: 'block',\n flex: '1 0 auto',\n paddingInlineStart: 0,\n overflow: 'visible',\n [`${componentCls}-item-icon`]: {\n float: 'left',\n marginInlineEnd: token.margin\n },\n [`${componentCls}-item-content`]: {\n display: 'block',\n minHeight: token.calc(token.controlHeight).mul(1.5).equal(),\n overflow: 'hidden'\n },\n [`${componentCls}-item-title`]: {\n lineHeight: (0, _cssinjs.unit)(iconSize)\n },\n [`${componentCls}-item-description`]: {\n paddingBottom: token.paddingSM\n }\n },\n [`> ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-tail`]: {\n position: 'absolute',\n top: 0,\n insetInlineStart: token.calc(iconSize).div(2).sub(token.lineWidth).equal(),\n width: token.lineWidth,\n height: '100%',\n padding: `${(0, _cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).add(iconSize).equal())} 0 ${(0, _cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).equal())}`,\n '&::after': {\n width: token.lineWidth,\n height: '100%'\n }\n },\n [`> ${componentCls}-item:not(:last-child) > ${componentCls}-item-container > ${componentCls}-item-tail`]: {\n display: 'block'\n },\n [` > ${componentCls}-item > ${componentCls}-item-container > ${componentCls}-item-content > ${componentCls}-item-title`]: {\n '&::after': {\n display: 'none'\n }\n },\n [`&${componentCls}-small ${componentCls}-item-container`]: {\n [`${componentCls}-item-tail`]: {\n position: 'absolute',\n top: 0,\n insetInlineStart: token.calc(iconSizeSM).div(2).sub(token.lineWidth).equal(),\n padding: `${(0, _cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).add(iconSizeSM).equal())} 0 ${(0, _cssinjs.unit)(token.calc(token.marginXXS).mul(1.5).equal())}`\n },\n [`${componentCls}-item-title`]: {\n lineHeight: (0, _cssinjs.unit)(iconSizeSM)\n }\n }\n }\n };\n};\nvar _default = exports.default = genStepsVerticalStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useLegacyItems;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _warning = require(\"../_util/warning\");\nfunction filter(items) {\n return items.filter(item => item);\n}\nfunction useLegacyItems(items, children) {\n if (process.env.NODE_ENV === 'test') {\n const warning = (0, _warning.devUseWarning)('Menu');\n warning.deprecated(!children, 'Step', 'items');\n }\n if (items) {\n return items;\n }\n const childrenItems = (0, _toArray.default)(children).map(node => {\n if (/*#__PURE__*/React.isValidElement(node)) {\n const {\n props\n } = node;\n const item = Object.assign({}, props);\n return item;\n }\n return null;\n });\n return filter(childrenItems);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genCompactItemVerticalStyle = genCompactItemVerticalStyle;\nfunction compactItemVerticalBorder(token, parentCls) {\n return {\n // border collapse\n [`&-item:not(${parentCls}-last-item)`]: {\n marginBottom: token.calc(token.lineWidth).mul(-1).equal()\n },\n '&-item': {\n '&:hover,&:focus,&:active': {\n zIndex: 2\n },\n '&[disabled]': {\n zIndex: 0\n }\n }\n };\n}\nfunction compactItemBorderVerticalRadius(prefixCls, parentCls) {\n return {\n [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item)`]: {\n borderRadius: 0\n },\n [`&-item${parentCls}-first-item:not(${parentCls}-last-item)`]: {\n [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {\n borderEndEndRadius: 0,\n borderEndStartRadius: 0\n }\n },\n [`&-item${parentCls}-last-item:not(${parentCls}-first-item)`]: {\n [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {\n borderStartStartRadius: 0,\n borderStartEndRadius: 0\n }\n }\n };\n}\nfunction genCompactItemVerticalStyle(token) {\n const compactCls = `${token.componentCls}-compact-vertical`;\n return {\n [compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls))\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genCompactItemStyle = genCompactItemStyle;\n// handle border collapse\nfunction compactItemBorder(token, parentCls, options) {\n const {\n focusElCls,\n focus,\n borderElCls\n } = options;\n const childCombinator = borderElCls ? '> *' : '';\n const hoverEffects = ['hover', focus ? 'focus' : null, 'active'].filter(Boolean).map(n => `&:${n} ${childCombinator}`).join(',');\n return {\n [`&-item:not(${parentCls}-last-item)`]: {\n marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal()\n },\n '&-item': Object.assign(Object.assign({\n [hoverEffects]: {\n zIndex: 2\n }\n }, focusElCls ? {\n [`&${focusElCls}`]: {\n zIndex: 2\n }\n } : {}), {\n [`&[disabled] ${childCombinator}`]: {\n zIndex: 0\n }\n })\n };\n}\n// handle border-radius\nfunction compactItemBorderRadius(prefixCls, parentCls, options) {\n const {\n borderElCls\n } = options;\n const childCombinator = borderElCls ? `> ${borderElCls}` : '';\n return {\n [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: {\n borderRadius: 0\n },\n [`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: {\n [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n [`&-item:not(${parentCls}-first-item)${parentCls}-last-item`]: {\n [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n }\n };\n}\nfunction genCompactItemStyle(token) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n focus: true\n };\n const {\n componentCls\n } = token;\n const compactCls = `${componentCls}-compact`;\n return {\n [compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options)), compactItemBorderRadius(componentCls, compactCls, options))\n };\n}","\"use strict\";\n\"use client\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.textEllipsis = exports.resetIcon = exports.resetComponent = exports.operationUnit = exports.genLinkStyle = exports.genFocusStyle = exports.genFocusOutline = exports.genCommonStyle = exports.clearFix = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst textEllipsis = exports.textEllipsis = {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n};\nconst resetComponent = function (token) {\n let needInheritFontFamily = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return {\n boxSizing: 'border-box',\n margin: 0,\n padding: 0,\n color: token.colorText,\n fontSize: token.fontSize,\n // font-variant: @font-variant-base;\n lineHeight: token.lineHeight,\n listStyle: 'none',\n // font-feature-settings: @font-feature-settings-base;\n fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily\n };\n};\nexports.resetComponent = resetComponent;\nconst resetIcon = () => ({\n display: 'inline-flex',\n alignItems: 'center',\n color: 'inherit',\n fontStyle: 'normal',\n lineHeight: 0,\n textAlign: 'center',\n textTransform: 'none',\n // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4\n verticalAlign: '-0.125em',\n textRendering: 'optimizeLegibility',\n '-webkit-font-smoothing': 'antialiased',\n '-moz-osx-font-smoothing': 'grayscale',\n '> *': {\n lineHeight: 1\n },\n svg: {\n display: 'inline-block'\n }\n});\nexports.resetIcon = resetIcon;\nconst clearFix = () => ({\n // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229\n '&::before': {\n display: 'table',\n content: '\"\"'\n },\n '&::after': {\n // https://github.com/ant-design/ant-design/issues/21864\n display: 'table',\n clear: 'both',\n content: '\"\"'\n }\n});\nexports.clearFix = clearFix;\nconst genLinkStyle = token => ({\n a: {\n color: token.colorLink,\n textDecoration: token.linkDecoration,\n backgroundColor: 'transparent',\n // remove the gray background on active links in IE 10.\n outline: 'none',\n cursor: 'pointer',\n transition: `color ${token.motionDurationSlow}`,\n '-webkit-text-decoration-skip': 'objects',\n // remove gaps in links underline in iOS 8+ and Safari 8+.\n '&:hover': {\n color: token.colorLinkHover\n },\n '&:active': {\n color: token.colorLinkActive\n },\n '&:active, &:hover': {\n textDecoration: token.linkHoverDecoration,\n outline: 0\n },\n // https://github.com/ant-design/ant-design/issues/22503\n '&:focus': {\n textDecoration: token.linkFocusDecoration,\n outline: 0\n },\n '&[disabled]': {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n }\n }\n});\nexports.genLinkStyle = genLinkStyle;\nconst genCommonStyle = (token, componentPrefixCls, rootCls, resetFont) => {\n const prefixSelector = `[class^=\"${componentPrefixCls}\"], [class*=\" ${componentPrefixCls}\"]`;\n const rootPrefixSelector = rootCls ? `.${rootCls}` : prefixSelector;\n const resetStyle = {\n boxSizing: 'border-box',\n '&::before, &::after': {\n boxSizing: 'border-box'\n }\n };\n let resetFontStyle = {};\n if (resetFont !== false) {\n resetFontStyle = {\n fontFamily: token.fontFamily,\n fontSize: token.fontSize\n };\n }\n return {\n [rootPrefixSelector]: Object.assign(Object.assign(Object.assign({}, resetFontStyle), resetStyle), {\n [prefixSelector]: resetStyle\n })\n };\n};\nexports.genCommonStyle = genCommonStyle;\nconst genFocusOutline = token => ({\n outline: `${(0, _cssinjs.unit)(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,\n outlineOffset: 1,\n transition: 'outline-offset 0s, outline 0s'\n});\nexports.genFocusOutline = genFocusOutline;\nconst genFocusStyle = token => ({\n '&:focus-visible': Object.assign({}, genFocusOutline(token))\n});\nexports.genFocusStyle = genFocusStyle;\nconst operationUnit = token => Object.assign(Object.assign({\n // FIXME: This use link but is a operation unit. Seems should be a colorPrimary.\n // And Typography use this to generate link style which should not do this.\n color: token.colorLink,\n textDecoration: token.linkDecoration,\n outline: 'none',\n cursor: 'pointer',\n transition: `all ${token.motionDurationSlow}`,\n border: 0,\n padding: 0,\n background: 'none',\n userSelect: 'none'\n}, genFocusStyle(token)), {\n '&:focus, &:hover': {\n color: token.colorLinkHover\n },\n '&:active': {\n color: token.colorLinkActive\n }\n});\nexports.operationUnit = operationUnit;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genCollapseMotion = token => ({\n [token.componentCls]: {\n // For common/openAnimation\n [`${token.antCls}-motion-collapse-legacy`]: {\n overflow: 'hidden',\n '&-active': {\n transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},\n opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`\n }\n },\n [`${token.antCls}-motion-collapse`]: {\n overflow: 'hidden',\n transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},\n opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`\n }\n }\n});\nvar _default = exports.default = genCollapseMotion;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.initFadeMotion = exports.fadeOut = exports.fadeIn = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _motion = require(\"./motion\");\nconst fadeIn = exports.fadeIn = new _cssinjs.Keyframes('antFadeIn', {\n '0%': {\n opacity: 0\n },\n '100%': {\n opacity: 1\n }\n});\nconst fadeOut = exports.fadeOut = new _cssinjs.Keyframes('antFadeOut', {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n});\nconst initFadeMotion = function (token) {\n let sameLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const {\n antCls\n } = token;\n const motionCls = `${antCls}-fade`;\n const sameLevelPrefix = sameLevel ? '&' : '';\n return [(0, _motion.initMotion)(motionCls, fadeIn, fadeOut, token.motionDurationMid, sameLevel), {\n [`\n ${sameLevelPrefix}${motionCls}-enter,\n ${sameLevelPrefix}${motionCls}-appear\n `]: {\n opacity: 0,\n animationTimingFunction: 'linear'\n },\n [`${sameLevelPrefix}${motionCls}-leave`]: {\n animationTimingFunction: 'linear'\n }\n }];\n};\nexports.initFadeMotion = initFadeMotion;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"fadeIn\", {\n enumerable: true,\n get: function () {\n return _fade.fadeIn;\n }\n});\nObject.defineProperty(exports, \"fadeOut\", {\n enumerable: true,\n get: function () {\n return _fade.fadeOut;\n }\n});\nObject.defineProperty(exports, \"genCollapseMotion\", {\n enumerable: true,\n get: function () {\n return _collapse.default;\n }\n});\nObject.defineProperty(exports, \"initFadeMotion\", {\n enumerable: true,\n get: function () {\n return _fade.initFadeMotion;\n }\n});\nObject.defineProperty(exports, \"initMoveMotion\", {\n enumerable: true,\n get: function () {\n return _move.initMoveMotion;\n }\n});\nObject.defineProperty(exports, \"initSlideMotion\", {\n enumerable: true,\n get: function () {\n return _slide.initSlideMotion;\n }\n});\nObject.defineProperty(exports, \"initZoomMotion\", {\n enumerable: true,\n get: function () {\n return _zoom.initZoomMotion;\n }\n});\nObject.defineProperty(exports, \"moveDownIn\", {\n enumerable: true,\n get: function () {\n return _move.moveDownIn;\n }\n});\nObject.defineProperty(exports, \"moveDownOut\", {\n enumerable: true,\n get: function () {\n return _move.moveDownOut;\n }\n});\nObject.defineProperty(exports, \"moveLeftIn\", {\n enumerable: true,\n get: function () {\n return _move.moveLeftIn;\n }\n});\nObject.defineProperty(exports, \"moveLeftOut\", {\n enumerable: true,\n get: function () {\n return _move.moveLeftOut;\n }\n});\nObject.defineProperty(exports, \"moveRightIn\", {\n enumerable: true,\n get: function () {\n return _move.moveRightIn;\n }\n});\nObject.defineProperty(exports, \"moveRightOut\", {\n enumerable: true,\n get: function () {\n return _move.moveRightOut;\n }\n});\nObject.defineProperty(exports, \"moveUpIn\", {\n enumerable: true,\n get: function () {\n return _move.moveUpIn;\n }\n});\nObject.defineProperty(exports, \"moveUpOut\", {\n enumerable: true,\n get: function () {\n return _move.moveUpOut;\n }\n});\nObject.defineProperty(exports, \"slideDownIn\", {\n enumerable: true,\n get: function () {\n return _slide.slideDownIn;\n }\n});\nObject.defineProperty(exports, \"slideDownOut\", {\n enumerable: true,\n get: function () {\n return _slide.slideDownOut;\n }\n});\nObject.defineProperty(exports, \"slideLeftIn\", {\n enumerable: true,\n get: function () {\n return _slide.slideLeftIn;\n }\n});\nObject.defineProperty(exports, \"slideLeftOut\", {\n enumerable: true,\n get: function () {\n return _slide.slideLeftOut;\n }\n});\nObject.defineProperty(exports, \"slideRightIn\", {\n enumerable: true,\n get: function () {\n return _slide.slideRightIn;\n }\n});\nObject.defineProperty(exports, \"slideRightOut\", {\n enumerable: true,\n get: function () {\n return _slide.slideRightOut;\n }\n});\nObject.defineProperty(exports, \"slideUpIn\", {\n enumerable: true,\n get: function () {\n return _slide.slideUpIn;\n }\n});\nObject.defineProperty(exports, \"slideUpOut\", {\n enumerable: true,\n get: function () {\n return _slide.slideUpOut;\n }\n});\nObject.defineProperty(exports, \"zoomBigIn\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomBigIn;\n }\n});\nObject.defineProperty(exports, \"zoomBigOut\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomBigOut;\n }\n});\nObject.defineProperty(exports, \"zoomDownIn\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomDownIn;\n }\n});\nObject.defineProperty(exports, \"zoomDownOut\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomDownOut;\n }\n});\nObject.defineProperty(exports, \"zoomIn\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomIn;\n }\n});\nObject.defineProperty(exports, \"zoomLeftIn\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomLeftIn;\n }\n});\nObject.defineProperty(exports, \"zoomLeftOut\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomLeftOut;\n }\n});\nObject.defineProperty(exports, \"zoomOut\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomOut;\n }\n});\nObject.defineProperty(exports, \"zoomRightIn\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomRightIn;\n }\n});\nObject.defineProperty(exports, \"zoomRightOut\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomRightOut;\n }\n});\nObject.defineProperty(exports, \"zoomUpIn\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomUpIn;\n }\n});\nObject.defineProperty(exports, \"zoomUpOut\", {\n enumerable: true,\n get: function () {\n return _zoom.zoomUpOut;\n }\n});\nvar _collapse = _interopRequireDefault(require(\"./collapse\"));\nvar _fade = require(\"./fade\");\nvar _move = require(\"./move\");\nvar _slide = require(\"./slide\");\nvar _zoom = require(\"./zoom\");","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.initMotion = void 0;\nconst initMotionCommon = duration => ({\n animationDuration: duration,\n animationFillMode: 'both'\n});\n// FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove\nconst initMotionCommonLeave = duration => ({\n animationDuration: duration,\n animationFillMode: 'both'\n});\nconst initMotion = function (motionCls, inKeyframes, outKeyframes, duration) {\n let sameLevel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n const sameLevelPrefix = sameLevel ? '&' : '';\n return {\n [`\n ${sameLevelPrefix}${motionCls}-enter,\n ${sameLevelPrefix}${motionCls}-appear\n `]: Object.assign(Object.assign({}, initMotionCommon(duration)), {\n animationPlayState: 'paused'\n }),\n [`${sameLevelPrefix}${motionCls}-leave`]: Object.assign(Object.assign({}, initMotionCommonLeave(duration)), {\n animationPlayState: 'paused'\n }),\n [`\n ${sameLevelPrefix}${motionCls}-enter${motionCls}-enter-active,\n ${sameLevelPrefix}${motionCls}-appear${motionCls}-appear-active\n `]: {\n animationName: inKeyframes,\n animationPlayState: 'running'\n },\n [`${sameLevelPrefix}${motionCls}-leave${motionCls}-leave-active`]: {\n animationName: outKeyframes,\n animationPlayState: 'running',\n pointerEvents: 'none'\n }\n };\n};\nexports.initMotion = initMotion;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.moveUpOut = exports.moveUpIn = exports.moveRightOut = exports.moveRightIn = exports.moveLeftOut = exports.moveLeftIn = exports.moveDownOut = exports.moveDownIn = exports.initMoveMotion = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _motion = require(\"./motion\");\nconst moveDownIn = exports.moveDownIn = new _cssinjs.Keyframes('antMoveDownIn', {\n '0%': {\n transform: 'translate3d(0, 100%, 0)',\n transformOrigin: '0 0',\n opacity: 0\n },\n '100%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n }\n});\nconst moveDownOut = exports.moveDownOut = new _cssinjs.Keyframes('antMoveDownOut', {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n },\n '100%': {\n transform: 'translate3d(0, 100%, 0)',\n transformOrigin: '0 0',\n opacity: 0\n }\n});\nconst moveLeftIn = exports.moveLeftIn = new _cssinjs.Keyframes('antMoveLeftIn', {\n '0%': {\n transform: 'translate3d(-100%, 0, 0)',\n transformOrigin: '0 0',\n opacity: 0\n },\n '100%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n }\n});\nconst moveLeftOut = exports.moveLeftOut = new _cssinjs.Keyframes('antMoveLeftOut', {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n },\n '100%': {\n transform: 'translate3d(-100%, 0, 0)',\n transformOrigin: '0 0',\n opacity: 0\n }\n});\nconst moveRightIn = exports.moveRightIn = new _cssinjs.Keyframes('antMoveRightIn', {\n '0%': {\n transform: 'translate3d(100%, 0, 0)',\n transformOrigin: '0 0',\n opacity: 0\n },\n '100%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n }\n});\nconst moveRightOut = exports.moveRightOut = new _cssinjs.Keyframes('antMoveRightOut', {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n },\n '100%': {\n transform: 'translate3d(100%, 0, 0)',\n transformOrigin: '0 0',\n opacity: 0\n }\n});\nconst moveUpIn = exports.moveUpIn = new _cssinjs.Keyframes('antMoveUpIn', {\n '0%': {\n transform: 'translate3d(0, -100%, 0)',\n transformOrigin: '0 0',\n opacity: 0\n },\n '100%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n }\n});\nconst moveUpOut = exports.moveUpOut = new _cssinjs.Keyframes('antMoveUpOut', {\n '0%': {\n transform: 'translate3d(0, 0, 0)',\n transformOrigin: '0 0',\n opacity: 1\n },\n '100%': {\n transform: 'translate3d(0, -100%, 0)',\n transformOrigin: '0 0',\n opacity: 0\n }\n});\nconst moveMotion = {\n 'move-up': {\n inKeyframes: moveUpIn,\n outKeyframes: moveUpOut\n },\n 'move-down': {\n inKeyframes: moveDownIn,\n outKeyframes: moveDownOut\n },\n 'move-left': {\n inKeyframes: moveLeftIn,\n outKeyframes: moveLeftOut\n },\n 'move-right': {\n inKeyframes: moveRightIn,\n outKeyframes: moveRightOut\n }\n};\nconst initMoveMotion = (token, motionName) => {\n const {\n antCls\n } = token;\n const motionCls = `${antCls}-${motionName}`;\n const {\n inKeyframes,\n outKeyframes\n } = moveMotion[motionName];\n return [(0, _motion.initMotion)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), {\n [`\n ${motionCls}-enter,\n ${motionCls}-appear\n `]: {\n opacity: 0,\n animationTimingFunction: token.motionEaseOutCirc\n },\n [`${motionCls}-leave`]: {\n animationTimingFunction: token.motionEaseInOutCirc\n }\n }];\n};\nexports.initMoveMotion = initMoveMotion;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.slideUpOut = exports.slideUpIn = exports.slideRightOut = exports.slideRightIn = exports.slideLeftOut = exports.slideLeftIn = exports.slideDownOut = exports.slideDownIn = exports.initSlideMotion = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _motion = require(\"./motion\");\nconst slideUpIn = exports.slideUpIn = new _cssinjs.Keyframes('antSlideUpIn', {\n '0%': {\n transform: 'scaleY(0.8)',\n transformOrigin: '0% 0%',\n opacity: 0\n },\n '100%': {\n transform: 'scaleY(1)',\n transformOrigin: '0% 0%',\n opacity: 1\n }\n});\nconst slideUpOut = exports.slideUpOut = new _cssinjs.Keyframes('antSlideUpOut', {\n '0%': {\n transform: 'scaleY(1)',\n transformOrigin: '0% 0%',\n opacity: 1\n },\n '100%': {\n transform: 'scaleY(0.8)',\n transformOrigin: '0% 0%',\n opacity: 0\n }\n});\nconst slideDownIn = exports.slideDownIn = new _cssinjs.Keyframes('antSlideDownIn', {\n '0%': {\n transform: 'scaleY(0.8)',\n transformOrigin: '100% 100%',\n opacity: 0\n },\n '100%': {\n transform: 'scaleY(1)',\n transformOrigin: '100% 100%',\n opacity: 1\n }\n});\nconst slideDownOut = exports.slideDownOut = new _cssinjs.Keyframes('antSlideDownOut', {\n '0%': {\n transform: 'scaleY(1)',\n transformOrigin: '100% 100%',\n opacity: 1\n },\n '100%': {\n transform: 'scaleY(0.8)',\n transformOrigin: '100% 100%',\n opacity: 0\n }\n});\nconst slideLeftIn = exports.slideLeftIn = new _cssinjs.Keyframes('antSlideLeftIn', {\n '0%': {\n transform: 'scaleX(0.8)',\n transformOrigin: '0% 0%',\n opacity: 0\n },\n '100%': {\n transform: 'scaleX(1)',\n transformOrigin: '0% 0%',\n opacity: 1\n }\n});\nconst slideLeftOut = exports.slideLeftOut = new _cssinjs.Keyframes('antSlideLeftOut', {\n '0%': {\n transform: 'scaleX(1)',\n transformOrigin: '0% 0%',\n opacity: 1\n },\n '100%': {\n transform: 'scaleX(0.8)',\n transformOrigin: '0% 0%',\n opacity: 0\n }\n});\nconst slideRightIn = exports.slideRightIn = new _cssinjs.Keyframes('antSlideRightIn', {\n '0%': {\n transform: 'scaleX(0.8)',\n transformOrigin: '100% 0%',\n opacity: 0\n },\n '100%': {\n transform: 'scaleX(1)',\n transformOrigin: '100% 0%',\n opacity: 1\n }\n});\nconst slideRightOut = exports.slideRightOut = new _cssinjs.Keyframes('antSlideRightOut', {\n '0%': {\n transform: 'scaleX(1)',\n transformOrigin: '100% 0%',\n opacity: 1\n },\n '100%': {\n transform: 'scaleX(0.8)',\n transformOrigin: '100% 0%',\n opacity: 0\n }\n});\nconst slideMotion = {\n 'slide-up': {\n inKeyframes: slideUpIn,\n outKeyframes: slideUpOut\n },\n 'slide-down': {\n inKeyframes: slideDownIn,\n outKeyframes: slideDownOut\n },\n 'slide-left': {\n inKeyframes: slideLeftIn,\n outKeyframes: slideLeftOut\n },\n 'slide-right': {\n inKeyframes: slideRightIn,\n outKeyframes: slideRightOut\n }\n};\nconst initSlideMotion = (token, motionName) => {\n const {\n antCls\n } = token;\n const motionCls = `${antCls}-${motionName}`;\n const {\n inKeyframes,\n outKeyframes\n } = slideMotion[motionName];\n return [(0, _motion.initMotion)(motionCls, inKeyframes, outKeyframes, token.motionDurationMid), {\n [`\n ${motionCls}-enter,\n ${motionCls}-appear\n `]: {\n transform: 'scale(0)',\n transformOrigin: '0% 0%',\n opacity: 0,\n animationTimingFunction: token.motionEaseOutQuint,\n '&-prepare': {\n transform: 'scale(1)'\n }\n },\n [`${motionCls}-leave`]: {\n animationTimingFunction: token.motionEaseInQuint\n }\n }];\n};\nexports.initSlideMotion = initSlideMotion;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.zoomUpOut = exports.zoomUpIn = exports.zoomRightOut = exports.zoomRightIn = exports.zoomOut = exports.zoomLeftOut = exports.zoomLeftIn = exports.zoomIn = exports.zoomDownOut = exports.zoomDownIn = exports.zoomBigOut = exports.zoomBigIn = exports.initZoomMotion = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _motion = require(\"./motion\");\nconst zoomIn = exports.zoomIn = new _cssinjs.Keyframes('antZoomIn', {\n '0%': {\n transform: 'scale(0.2)',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 1\n }\n});\nconst zoomOut = exports.zoomOut = new _cssinjs.Keyframes('antZoomOut', {\n '0%': {\n transform: 'scale(1)'\n },\n '100%': {\n transform: 'scale(0.2)',\n opacity: 0\n }\n});\nconst zoomBigIn = exports.zoomBigIn = new _cssinjs.Keyframes('antZoomBigIn', {\n '0%': {\n transform: 'scale(0.8)',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 1\n }\n});\nconst zoomBigOut = exports.zoomBigOut = new _cssinjs.Keyframes('antZoomBigOut', {\n '0%': {\n transform: 'scale(1)'\n },\n '100%': {\n transform: 'scale(0.8)',\n opacity: 0\n }\n});\nconst zoomUpIn = exports.zoomUpIn = new _cssinjs.Keyframes('antZoomUpIn', {\n '0%': {\n transform: 'scale(0.8)',\n transformOrigin: '50% 0%',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n transformOrigin: '50% 0%'\n }\n});\nconst zoomUpOut = exports.zoomUpOut = new _cssinjs.Keyframes('antZoomUpOut', {\n '0%': {\n transform: 'scale(1)',\n transformOrigin: '50% 0%'\n },\n '100%': {\n transform: 'scale(0.8)',\n transformOrigin: '50% 0%',\n opacity: 0\n }\n});\nconst zoomLeftIn = exports.zoomLeftIn = new _cssinjs.Keyframes('antZoomLeftIn', {\n '0%': {\n transform: 'scale(0.8)',\n transformOrigin: '0% 50%',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n transformOrigin: '0% 50%'\n }\n});\nconst zoomLeftOut = exports.zoomLeftOut = new _cssinjs.Keyframes('antZoomLeftOut', {\n '0%': {\n transform: 'scale(1)',\n transformOrigin: '0% 50%'\n },\n '100%': {\n transform: 'scale(0.8)',\n transformOrigin: '0% 50%',\n opacity: 0\n }\n});\nconst zoomRightIn = exports.zoomRightIn = new _cssinjs.Keyframes('antZoomRightIn', {\n '0%': {\n transform: 'scale(0.8)',\n transformOrigin: '100% 50%',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n transformOrigin: '100% 50%'\n }\n});\nconst zoomRightOut = exports.zoomRightOut = new _cssinjs.Keyframes('antZoomRightOut', {\n '0%': {\n transform: 'scale(1)',\n transformOrigin: '100% 50%'\n },\n '100%': {\n transform: 'scale(0.8)',\n transformOrigin: '100% 50%',\n opacity: 0\n }\n});\nconst zoomDownIn = exports.zoomDownIn = new _cssinjs.Keyframes('antZoomDownIn', {\n '0%': {\n transform: 'scale(0.8)',\n transformOrigin: '50% 100%',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n transformOrigin: '50% 100%'\n }\n});\nconst zoomDownOut = exports.zoomDownOut = new _cssinjs.Keyframes('antZoomDownOut', {\n '0%': {\n transform: 'scale(1)',\n transformOrigin: '50% 100%'\n },\n '100%': {\n transform: 'scale(0.8)',\n transformOrigin: '50% 100%',\n opacity: 0\n }\n});\nconst zoomMotion = {\n zoom: {\n inKeyframes: zoomIn,\n outKeyframes: zoomOut\n },\n 'zoom-big': {\n inKeyframes: zoomBigIn,\n outKeyframes: zoomBigOut\n },\n 'zoom-big-fast': {\n inKeyframes: zoomBigIn,\n outKeyframes: zoomBigOut\n },\n 'zoom-left': {\n inKeyframes: zoomLeftIn,\n outKeyframes: zoomLeftOut\n },\n 'zoom-right': {\n inKeyframes: zoomRightIn,\n outKeyframes: zoomRightOut\n },\n 'zoom-up': {\n inKeyframes: zoomUpIn,\n outKeyframes: zoomUpOut\n },\n 'zoom-down': {\n inKeyframes: zoomDownIn,\n outKeyframes: zoomDownOut\n }\n};\nconst initZoomMotion = (token, motionName) => {\n const {\n antCls\n } = token;\n const motionCls = `${antCls}-${motionName}`;\n const {\n inKeyframes,\n outKeyframes\n } = zoomMotion[motionName];\n return [(0, _motion.initMotion)(motionCls, inKeyframes, outKeyframes, motionName === 'zoom-big-fast' ? token.motionDurationFast : token.motionDurationMid), {\n [`\n ${motionCls}-enter,\n ${motionCls}-appear\n `]: {\n transform: 'scale(0)',\n opacity: 0,\n animationTimingFunction: token.motionEaseOutCirc,\n '&-prepare': {\n transform: 'none'\n }\n },\n [`${motionCls}-leave`]: {\n animationTimingFunction: token.motionEaseInOutCirc\n }\n }];\n};\nexports.initZoomMotion = initZoomMotion;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MAX_VERTICAL_CONTENT_RADIUS = void 0;\nexports.default = getArrowStyle;\nexports.getArrowOffsetToken = getArrowOffsetToken;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _roundedArrow = require(\"./roundedArrow\");\nconst MAX_VERTICAL_CONTENT_RADIUS = exports.MAX_VERTICAL_CONTENT_RADIUS = 8;\nfunction getArrowOffsetToken(options) {\n const {\n contentRadius,\n limitVerticalRadius\n } = options;\n const arrowOffset = contentRadius > 12 ? contentRadius + 2 : 12;\n const arrowOffsetVertical = limitVerticalRadius ? MAX_VERTICAL_CONTENT_RADIUS : arrowOffset;\n return {\n arrowOffsetHorizontal: arrowOffset,\n arrowOffsetVertical\n };\n}\nfunction isInject(valid, code) {\n if (!valid) {\n return {};\n }\n return code;\n}\nfunction getArrowStyle(token, colorBg, options) {\n const {\n componentCls,\n boxShadowPopoverArrow,\n arrowOffsetVertical,\n arrowOffsetHorizontal\n } = token;\n const {\n arrowDistance = 0,\n arrowPlacement = {\n left: true,\n right: true,\n top: true,\n bottom: true\n }\n } = options || {};\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({\n // ============================ Basic ============================\n [`${componentCls}-arrow`]: [Object.assign(Object.assign({\n position: 'absolute',\n zIndex: 1,\n display: 'block'\n }, (0, _roundedArrow.genRoundedArrow)(token, colorBg, boxShadowPopoverArrow)), {\n '&:before': {\n background: colorBg\n }\n })]\n }, isInject(!!arrowPlacement.top, {\n [[`&-placement-top > ${componentCls}-arrow`, `&-placement-topLeft > ${componentCls}-arrow`, `&-placement-topRight > ${componentCls}-arrow`].join(',')]: {\n bottom: arrowDistance,\n transform: 'translateY(100%) rotate(180deg)'\n },\n [`&-placement-top > ${componentCls}-arrow`]: {\n left: {\n _skip_check_: true,\n value: '50%'\n },\n transform: 'translateX(-50%) translateY(100%) rotate(180deg)'\n },\n '&-placement-topLeft': {\n '--arrow-offset-horizontal': arrowOffsetHorizontal,\n [`> ${componentCls}-arrow`]: {\n left: {\n _skip_check_: true,\n value: arrowOffsetHorizontal\n }\n }\n },\n '&-placement-topRight': {\n '--arrow-offset-horizontal': `calc(100% - ${(0, _cssinjs.unit)(arrowOffsetHorizontal)})`,\n [`> ${componentCls}-arrow`]: {\n right: {\n _skip_check_: true,\n value: arrowOffsetHorizontal\n }\n }\n }\n })), isInject(!!arrowPlacement.bottom, {\n [[`&-placement-bottom > ${componentCls}-arrow`, `&-placement-bottomLeft > ${componentCls}-arrow`, `&-placement-bottomRight > ${componentCls}-arrow`].join(',')]: {\n top: arrowDistance,\n transform: `translateY(-100%)`\n },\n [`&-placement-bottom > ${componentCls}-arrow`]: {\n left: {\n _skip_check_: true,\n value: '50%'\n },\n transform: `translateX(-50%) translateY(-100%)`\n },\n '&-placement-bottomLeft': {\n '--arrow-offset-horizontal': arrowOffsetHorizontal,\n [`> ${componentCls}-arrow`]: {\n left: {\n _skip_check_: true,\n value: arrowOffsetHorizontal\n }\n }\n },\n '&-placement-bottomRight': {\n '--arrow-offset-horizontal': `calc(100% - ${(0, _cssinjs.unit)(arrowOffsetHorizontal)})`,\n [`> ${componentCls}-arrow`]: {\n right: {\n _skip_check_: true,\n value: arrowOffsetHorizontal\n }\n }\n }\n })), isInject(!!arrowPlacement.left, {\n [[`&-placement-left > ${componentCls}-arrow`, `&-placement-leftTop > ${componentCls}-arrow`, `&-placement-leftBottom > ${componentCls}-arrow`].join(',')]: {\n right: {\n _skip_check_: true,\n value: arrowDistance\n },\n transform: 'translateX(100%) rotate(90deg)'\n },\n [`&-placement-left > ${componentCls}-arrow`]: {\n top: {\n _skip_check_: true,\n value: '50%'\n },\n transform: 'translateY(-50%) translateX(100%) rotate(90deg)'\n },\n [`&-placement-leftTop > ${componentCls}-arrow`]: {\n top: arrowOffsetVertical\n },\n [`&-placement-leftBottom > ${componentCls}-arrow`]: {\n bottom: arrowOffsetVertical\n }\n })), isInject(!!arrowPlacement.right, {\n [[`&-placement-right > ${componentCls}-arrow`, `&-placement-rightTop > ${componentCls}-arrow`, `&-placement-rightBottom > ${componentCls}-arrow`].join(',')]: {\n left: {\n _skip_check_: true,\n value: arrowDistance\n },\n transform: 'translateX(-100%) rotate(-90deg)'\n },\n [`&-placement-right > ${componentCls}-arrow`]: {\n top: {\n _skip_check_: true,\n value: '50%'\n },\n transform: 'translateY(-50%) translateX(-100%) rotate(-90deg)'\n },\n [`&-placement-rightTop > ${componentCls}-arrow`]: {\n top: arrowOffsetVertical\n },\n [`&-placement-rightBottom > ${componentCls}-arrow`]: {\n bottom: arrowOffsetVertical\n }\n }))\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genRoundedArrow = void 0;\nexports.getArrowToken = getArrowToken;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nfunction getArrowToken(token) {\n const {\n sizePopupArrow,\n borderRadiusXS,\n borderRadiusOuter\n } = token;\n const unitWidth = sizePopupArrow / 2;\n const ax = 0;\n const ay = unitWidth;\n const bx = borderRadiusOuter * 1 / Math.sqrt(2);\n const by = unitWidth - borderRadiusOuter * (1 - 1 / Math.sqrt(2));\n const cx = unitWidth - borderRadiusXS * (1 / Math.sqrt(2));\n const cy = borderRadiusOuter * (Math.sqrt(2) - 1) + borderRadiusXS * (1 / Math.sqrt(2));\n const dx = 2 * unitWidth - cx;\n const dy = cy;\n const ex = 2 * unitWidth - bx;\n const ey = by;\n const fx = 2 * unitWidth - ax;\n const fy = ay;\n const shadowWidth = unitWidth * Math.sqrt(2) + borderRadiusOuter * (Math.sqrt(2) - 2);\n const polygonOffset = borderRadiusOuter * (Math.sqrt(2) - 1);\n const arrowPolygon = `polygon(${polygonOffset}px 100%, 50% ${polygonOffset}px, ${2 * unitWidth - polygonOffset}px 100%, ${polygonOffset}px 100%)`;\n const arrowPath = `path('M ${ax} ${ay} A ${borderRadiusOuter} ${borderRadiusOuter} 0 0 0 ${bx} ${by} L ${cx} ${cy} A ${borderRadiusXS} ${borderRadiusXS} 0 0 1 ${dx} ${dy} L ${ex} ${ey} A ${borderRadiusOuter} ${borderRadiusOuter} 0 0 0 ${fx} ${fy} Z')`;\n return {\n arrowShadowWidth: shadowWidth,\n arrowPath,\n arrowPolygon\n };\n}\nconst genRoundedArrow = (token, bgColor, boxShadow) => {\n const {\n sizePopupArrow,\n arrowPolygon,\n arrowPath,\n arrowShadowWidth,\n borderRadiusXS,\n calc\n } = token;\n return {\n pointerEvents: 'none',\n width: sizePopupArrow,\n height: sizePopupArrow,\n overflow: 'hidden',\n '&::before': {\n position: 'absolute',\n bottom: 0,\n insetInlineStart: 0,\n width: sizePopupArrow,\n height: calc(sizePopupArrow).div(2).equal(),\n background: bgColor,\n clipPath: {\n _multi_value_: true,\n value: [arrowPolygon, arrowPath]\n },\n content: '\"\"'\n },\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n width: arrowShadowWidth,\n height: arrowShadowWidth,\n bottom: 0,\n insetInline: 0,\n margin: 'auto',\n borderRadius: {\n _skip_check_: true,\n value: `0 0 ${(0, _cssinjs.unit)(borderRadiusXS)} 0`\n },\n transform: 'translateY(50%) rotate(-135deg)',\n boxShadow,\n zIndex: 0,\n background: 'transparent'\n }\n };\n};\nexports.genRoundedArrow = genRoundedArrow;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcSwitch = _interopRequireDefault(require(\"rc-switch\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _wave = _interopRequireDefault(require(\"../_util/wave\"));\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalSwitch = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n size: customizeSize,\n disabled: customDisabled,\n loading,\n className,\n rootClassName,\n style,\n checked: checkedProp,\n value,\n defaultChecked: defaultCheckedProp,\n defaultValue,\n onChange\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"size\", \"disabled\", \"loading\", \"className\", \"rootClassName\", \"style\", \"checked\", \"value\", \"defaultChecked\", \"defaultValue\", \"onChange\"]);\n const [checked, setChecked] = (0, _useMergedState.default)(false, {\n value: checkedProp !== null && checkedProp !== void 0 ? checkedProp : value,\n defaultValue: defaultCheckedProp !== null && defaultCheckedProp !== void 0 ? defaultCheckedProp : defaultValue\n });\n const {\n getPrefixCls,\n direction,\n switch: SWITCH\n } = React.useContext(_configProvider.ConfigContext);\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;\n const prefixCls = getPrefixCls('switch', customizePrefixCls);\n const loadingIcon = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-handle`\n }, loading && /*#__PURE__*/React.createElement(_LoadingOutlined.default, {\n className: `${prefixCls}-loading-icon`\n }));\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const mergedSize = (0, _useSize.default)(customizeSize);\n const classes = (0, _classnames.default)(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {\n [`${prefixCls}-small`]: mergedSize === 'small',\n [`${prefixCls}-loading`]: loading,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);\n const changeHandler = function () {\n setChecked(arguments.length <= 0 ? undefined : arguments[0]);\n onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, arguments);\n };\n return wrapCSSVar(/*#__PURE__*/React.createElement(_wave.default, {\n component: \"Switch\"\n }, /*#__PURE__*/React.createElement(_rcSwitch.default, Object.assign({}, restProps, {\n checked: checked,\n onChange: changeHandler,\n prefixCls: prefixCls,\n className: classes,\n style: mergedStyle,\n disabled: mergedDisabled,\n ref: ref,\n loadingIcon: loadingIcon\n }))));\n});\nconst Switch = InternalSwitch;\nSwitch.__ANT_SWITCH = true;\nif (process.env.NODE_ENV !== 'production') {\n Switch.displayName = 'Switch';\n}\nvar _default = exports.default = Switch;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genSwitchSmallStyle = token => {\n const {\n componentCls,\n trackHeightSM,\n trackPadding,\n trackMinWidthSM,\n innerMinMarginSM,\n innerMaxMarginSM,\n handleSizeSM,\n calc\n } = token;\n const switchInnerCls = `${componentCls}-inner`;\n const trackPaddingCalc = (0, _cssinjs.unit)(calc(handleSizeSM).add(calc(trackPadding).mul(2)).equal());\n const innerMaxMarginCalc = (0, _cssinjs.unit)(calc(innerMaxMarginSM).mul(2).equal());\n return {\n [componentCls]: {\n [`&${componentCls}-small`]: {\n minWidth: trackMinWidthSM,\n height: trackHeightSM,\n lineHeight: (0, _cssinjs.unit)(trackHeightSM),\n [`${componentCls}-inner`]: {\n paddingInlineStart: innerMaxMarginSM,\n paddingInlineEnd: innerMinMarginSM,\n [`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {\n minHeight: trackHeightSM\n },\n [`${switchInnerCls}-checked`]: {\n marginInlineStart: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`,\n marginInlineEnd: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`\n },\n [`${switchInnerCls}-unchecked`]: {\n marginTop: calc(trackHeightSM).mul(-1).equal(),\n marginInlineStart: 0,\n marginInlineEnd: 0\n }\n },\n [`${componentCls}-handle`]: {\n width: handleSizeSM,\n height: handleSizeSM\n },\n [`${componentCls}-loading-icon`]: {\n top: calc(calc(handleSizeSM).sub(token.switchLoadingIconSize)).div(2).equal(),\n fontSize: token.switchLoadingIconSize\n },\n [`&${componentCls}-checked`]: {\n [`${componentCls}-inner`]: {\n paddingInlineStart: innerMinMarginSM,\n paddingInlineEnd: innerMaxMarginSM,\n [`${switchInnerCls}-checked`]: {\n marginInlineStart: 0,\n marginInlineEnd: 0\n },\n [`${switchInnerCls}-unchecked`]: {\n marginInlineStart: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`,\n marginInlineEnd: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`\n }\n },\n [`${componentCls}-handle`]: {\n insetInlineStart: `calc(100% - ${(0, _cssinjs.unit)(calc(handleSizeSM).add(trackPadding).equal())})`\n }\n },\n [`&:not(${componentCls}-disabled):active`]: {\n [`&:not(${componentCls}-checked) ${switchInnerCls}`]: {\n [`${switchInnerCls}-unchecked`]: {\n marginInlineStart: calc(token.marginXXS).div(2).equal(),\n marginInlineEnd: calc(token.marginXXS).mul(-1).div(2).equal()\n }\n },\n [`&${componentCls}-checked ${switchInnerCls}`]: {\n [`${switchInnerCls}-checked`]: {\n marginInlineStart: calc(token.marginXXS).mul(-1).div(2).equal(),\n marginInlineEnd: calc(token.marginXXS).div(2).equal()\n }\n }\n }\n }\n }\n };\n};\nconst genSwitchLoadingStyle = token => {\n const {\n componentCls,\n handleSize,\n calc\n } = token;\n return {\n [componentCls]: {\n [`${componentCls}-loading-icon${token.iconCls}`]: {\n position: 'relative',\n top: calc(calc(handleSize).sub(token.fontSize)).div(2).equal(),\n color: token.switchLoadingIconColor,\n verticalAlign: 'top'\n },\n [`&${componentCls}-checked ${componentCls}-loading-icon`]: {\n color: token.switchColor\n }\n }\n };\n};\nconst genSwitchHandleStyle = token => {\n const {\n componentCls,\n trackPadding,\n handleBg,\n handleShadow,\n handleSize,\n calc\n } = token;\n const switchHandleCls = `${componentCls}-handle`;\n return {\n [componentCls]: {\n [switchHandleCls]: {\n position: 'absolute',\n top: trackPadding,\n insetInlineStart: trackPadding,\n width: handleSize,\n height: handleSize,\n transition: `all ${token.switchDuration} ease-in-out`,\n '&::before': {\n position: 'absolute',\n top: 0,\n insetInlineEnd: 0,\n bottom: 0,\n insetInlineStart: 0,\n backgroundColor: handleBg,\n borderRadius: calc(handleSize).div(2).equal(),\n boxShadow: handleShadow,\n transition: `all ${token.switchDuration} ease-in-out`,\n content: '\"\"'\n }\n },\n [`&${componentCls}-checked ${switchHandleCls}`]: {\n insetInlineStart: `calc(100% - ${(0, _cssinjs.unit)(calc(handleSize).add(trackPadding).equal())})`\n },\n [`&:not(${componentCls}-disabled):active`]: {\n [`${switchHandleCls}::before`]: {\n insetInlineEnd: token.switchHandleActiveInset,\n insetInlineStart: 0\n },\n [`&${componentCls}-checked ${switchHandleCls}::before`]: {\n insetInlineEnd: 0,\n insetInlineStart: token.switchHandleActiveInset\n }\n }\n }\n };\n};\nconst genSwitchInnerStyle = token => {\n const {\n componentCls,\n trackHeight,\n trackPadding,\n innerMinMargin,\n innerMaxMargin,\n handleSize,\n calc\n } = token;\n const switchInnerCls = `${componentCls}-inner`;\n const trackPaddingCalc = (0, _cssinjs.unit)(calc(handleSize).add(calc(trackPadding).mul(2)).equal());\n const innerMaxMarginCalc = (0, _cssinjs.unit)(calc(innerMaxMargin).mul(2).equal());\n return {\n [componentCls]: {\n [switchInnerCls]: {\n display: 'block',\n overflow: 'hidden',\n borderRadius: 100,\n height: '100%',\n paddingInlineStart: innerMaxMargin,\n paddingInlineEnd: innerMinMargin,\n transition: `padding-inline-start ${token.switchDuration} ease-in-out, padding-inline-end ${token.switchDuration} ease-in-out`,\n [`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {\n display: 'block',\n color: token.colorTextLightSolid,\n fontSize: token.fontSizeSM,\n transition: `margin-inline-start ${token.switchDuration} ease-in-out, margin-inline-end ${token.switchDuration} ease-in-out`,\n pointerEvents: 'none',\n minHeight: trackHeight\n },\n [`${switchInnerCls}-checked`]: {\n marginInlineStart: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`,\n marginInlineEnd: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`\n },\n [`${switchInnerCls}-unchecked`]: {\n marginTop: calc(trackHeight).mul(-1).equal(),\n marginInlineStart: 0,\n marginInlineEnd: 0\n }\n },\n [`&${componentCls}-checked ${switchInnerCls}`]: {\n paddingInlineStart: innerMinMargin,\n paddingInlineEnd: innerMaxMargin,\n [`${switchInnerCls}-checked`]: {\n marginInlineStart: 0,\n marginInlineEnd: 0\n },\n [`${switchInnerCls}-unchecked`]: {\n marginInlineStart: `calc(100% - ${trackPaddingCalc} + ${innerMaxMarginCalc})`,\n marginInlineEnd: `calc(-100% + ${trackPaddingCalc} - ${innerMaxMarginCalc})`\n }\n },\n [`&:not(${componentCls}-disabled):active`]: {\n [`&:not(${componentCls}-checked) ${switchInnerCls}`]: {\n [`${switchInnerCls}-unchecked`]: {\n marginInlineStart: calc(trackPadding).mul(2).equal(),\n marginInlineEnd: calc(trackPadding).mul(-1).mul(2).equal()\n }\n },\n [`&${componentCls}-checked ${switchInnerCls}`]: {\n [`${switchInnerCls}-checked`]: {\n marginInlineStart: calc(trackPadding).mul(-1).mul(2).equal(),\n marginInlineEnd: calc(trackPadding).mul(2).equal()\n }\n }\n }\n }\n };\n};\nconst genSwitchStyle = token => {\n const {\n componentCls,\n trackHeight,\n trackMinWidth\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n display: 'inline-block',\n boxSizing: 'border-box',\n minWidth: trackMinWidth,\n height: trackHeight,\n lineHeight: (0, _cssinjs.unit)(trackHeight),\n verticalAlign: 'middle',\n background: token.colorTextQuaternary,\n border: '0',\n borderRadius: 100,\n cursor: 'pointer',\n transition: `all ${token.motionDurationMid}`,\n userSelect: 'none',\n [`&:hover:not(${componentCls}-disabled)`]: {\n background: token.colorTextTertiary\n }\n }), (0, _style.genFocusStyle)(token)), {\n [`&${componentCls}-checked`]: {\n background: token.switchColor,\n [`&:hover:not(${componentCls}-disabled)`]: {\n background: token.colorPrimaryHover\n }\n },\n [`&${componentCls}-loading, &${componentCls}-disabled`]: {\n cursor: 'not-allowed',\n opacity: token.switchDisabledOpacity,\n '*': {\n boxShadow: 'none',\n cursor: 'not-allowed'\n }\n },\n // rtl style\n [`&${componentCls}-rtl`]: {\n direction: 'rtl'\n }\n })\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => {\n const {\n fontSize,\n lineHeight,\n controlHeight,\n colorWhite\n } = token;\n const height = fontSize * lineHeight;\n const heightSM = controlHeight / 2;\n const padding = 2; // Fixed value\n const handleSize = height - padding * 2;\n const handleSizeSM = heightSM - padding * 2;\n return {\n trackHeight: height,\n trackHeightSM: heightSM,\n trackMinWidth: handleSize * 2 + padding * 4,\n trackMinWidthSM: handleSizeSM * 2 + padding * 2,\n trackPadding: padding,\n // Fixed value\n handleBg: colorWhite,\n handleSize,\n handleSizeSM,\n handleShadow: `0 2px 4px 0 ${new _tinycolor.TinyColor('#00230b').setAlpha(0.2).toRgbString()}`,\n innerMinMargin: handleSize / 2,\n innerMaxMargin: handleSize + padding + padding * 2,\n innerMinMarginSM: handleSizeSM / 2,\n innerMaxMarginSM: handleSizeSM + padding + padding * 2\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Switch', token => {\n const switchToken = (0, _internal.mergeToken)(token, {\n switchDuration: token.motionDurationMid,\n switchColor: token.colorPrimary,\n switchDisabledOpacity: token.opacityLoading,\n switchLoadingIconSize: token.calc(token.fontSizeIcon).mul(0.75).equal(),\n switchLoadingIconColor: `rgba(0, 0, 0, ${token.opacityLoading})`,\n switchHandleActiveInset: '-30%'\n });\n return [genSwitchStyle(switchToken),\n // inner style\n genSwitchInnerStyle(switchToken),\n // handle style\n genSwitchHandleStyle(switchToken),\n // loading style\n genSwitchLoadingStyle(switchToken),\n // small style\n genSwitchSmallStyle(switchToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/* istanbul ignore next */\n/** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */\nconst Column = _ => null;\nvar _default = exports.default = Column;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/* istanbul ignore next */\n/** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */\nconst ColumnGroup = _ => null;\nvar _default = exports.default = ColumnGroup;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nfunction renderExpandIcon(locale) {\n return props => {\n const {\n prefixCls,\n onExpand,\n record,\n expanded,\n expandable\n } = props;\n const iconPrefix = `${prefixCls}-row-expand-icon`;\n return /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: e => {\n onExpand(record, e);\n e.stopPropagation();\n },\n className: (0, _classnames.default)(iconPrefix, {\n [`${iconPrefix}-spaced`]: !expandable,\n [`${iconPrefix}-expanded`]: expandable && expanded,\n [`${iconPrefix}-collapsed`]: expandable && !expanded\n }),\n \"aria-label\": expanded ? locale.collapse : locale.expand,\n \"aria-expanded\": expanded\n });\n };\n}\nvar _default = exports.default = renderExpandIcon;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTable = require(\"rc-table\");\nvar _useColumns = require(\"rc-table/lib/hooks/useColumns\");\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useProxyImperativeHandle = _interopRequireDefault(require(\"../_util/hooks/useProxyImperativeHandle\"));\nvar _scrollTo = _interopRequireDefault(require(\"../_util/scrollTo\"));\nvar _warning = require(\"../_util/warning\");\nvar _context = require(\"../config-provider/context\");\nvar _defaultRenderEmpty = _interopRequireDefault(require(\"../config-provider/defaultRenderEmpty\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _useBreakpoint = _interopRequireDefault(require(\"../grid/hooks/useBreakpoint\"));\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _pagination = _interopRequireDefault(require(\"../pagination\"));\nvar _spin = _interopRequireDefault(require(\"../spin\"));\nvar _internal = require(\"../theme/internal\");\nvar _ExpandIcon = _interopRequireDefault(require(\"./ExpandIcon\"));\nvar _useContainerWidth = _interopRequireDefault(require(\"./hooks/useContainerWidth\"));\nvar _useFilter = _interopRequireWildcard(require(\"./hooks/useFilter\"));\nvar _useLazyKVMap = _interopRequireDefault(require(\"./hooks/useLazyKVMap\"));\nvar _usePagination = _interopRequireWildcard(require(\"./hooks/usePagination\"));\nvar _useSelection = _interopRequireDefault(require(\"./hooks/useSelection\"));\nvar _useSorter = _interopRequireWildcard(require(\"./hooks/useSorter\"));\nvar _useTitleColumns = _interopRequireDefault(require(\"./hooks/useTitleColumns\"));\nvar _RcTable = _interopRequireDefault(require(\"./RcTable\"));\nvar _VirtualTable = _interopRequireDefault(require(\"./RcTable/VirtualTable\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst EMPTY_LIST = [];\nconst InternalTable = (props, ref) => {\n var _a, _b;\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n size: customizeSize,\n bordered,\n dropdownPrefixCls: customizeDropdownPrefixCls,\n dataSource,\n pagination,\n rowSelection,\n rowKey = 'key',\n rowClassName,\n columns,\n children,\n childrenColumnName: legacyChildrenColumnName,\n onChange,\n getPopupContainer,\n loading,\n expandIcon,\n expandable,\n expandedRowRender,\n expandIconColumnIndex,\n indentSize,\n scroll,\n sortDirections,\n locale,\n showSorterTooltip = {\n target: 'full-header'\n },\n virtual\n } = props;\n const warning = (0, _warning.devUseWarning)('Table');\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof rowKey === 'function' && rowKey.length > 1), 'usage', '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.') : void 0;\n }\n const baseColumns = React.useMemo(() => columns || (0, _useColumns.convertChildrenToColumns)(children), [columns, children]);\n const needResponsive = React.useMemo(() => baseColumns.some(col => col.responsive), [baseColumns]);\n const screens = (0, _useBreakpoint.default)(needResponsive);\n const mergedColumns = React.useMemo(() => {\n const matched = new Set(Object.keys(screens).filter(m => screens[m]));\n return baseColumns.filter(c => !c.responsive || c.responsive.some(r => matched.has(r)));\n }, [baseColumns, screens]);\n const tableProps = (0, _omit.default)(props, ['className', 'style', 'columns']);\n const {\n locale: contextLocale = _en_US.default,\n direction,\n table,\n renderEmpty,\n getPrefixCls,\n getPopupContainer: getContextPopupContainer\n } = React.useContext(_context.ConfigContext);\n const mergedSize = (0, _useSize.default)(customizeSize);\n const tableLocale = Object.assign(Object.assign({}, contextLocale.Table), locale);\n const rawData = dataSource || EMPTY_LIST;\n const prefixCls = getPrefixCls('table', customizePrefixCls);\n const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);\n const [, token] = (0, _internal.useToken)();\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const mergedExpandable = Object.assign(Object.assign({\n childrenColumnName: legacyChildrenColumnName,\n expandIconColumnIndex\n }, expandable), {\n expandIcon: (_a = expandable === null || expandable === void 0 ? void 0 : expandable.expandIcon) !== null && _a !== void 0 ? _a : (_b = table === null || table === void 0 ? void 0 : table.expandable) === null || _b === void 0 ? void 0 : _b.expandIcon\n });\n const {\n childrenColumnName = 'children'\n } = mergedExpandable;\n const expandType = React.useMemo(() => {\n if (rawData.some(item => item === null || item === void 0 ? void 0 : item[childrenColumnName])) {\n return 'nest';\n }\n if (expandedRowRender || (expandable === null || expandable === void 0 ? void 0 : expandable.expandedRowRender)) {\n return 'row';\n }\n return null;\n }, [rawData]);\n const internalRefs = {\n body: React.useRef()\n };\n // ============================ Width =============================\n const getContainerWidth = (0, _useContainerWidth.default)(prefixCls);\n // ============================= Refs =============================\n const rootRef = React.useRef(null);\n const tblRef = React.useRef(null);\n (0, _useProxyImperativeHandle.default)(ref, () => Object.assign(Object.assign({}, tblRef.current), {\n nativeElement: rootRef.current\n }));\n // ============================ RowKey ============================\n const getRowKey = React.useMemo(() => {\n if (typeof rowKey === 'function') {\n return rowKey;\n }\n return record => record === null || record === void 0 ? void 0 : record[rowKey];\n }, [rowKey]);\n const [getRecordByKey] = (0, _useLazyKVMap.default)(rawData, childrenColumnName, getRowKey);\n // ============================ Events =============================\n const changeEventInfo = {};\n const triggerOnChange = function (info, action) {\n let reset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var _a, _b, _c, _d;\n const changeInfo = Object.assign(Object.assign({}, changeEventInfo), info);\n if (reset) {\n (_a = changeEventInfo.resetPagination) === null || _a === void 0 ? void 0 : _a.call(changeEventInfo);\n // Reset event param\n if ((_b = changeInfo.pagination) === null || _b === void 0 ? void 0 : _b.current) {\n changeInfo.pagination.current = 1;\n }\n // Trigger pagination events\n if (pagination) {\n (_c = pagination.onChange) === null || _c === void 0 ? void 0 : _c.call(pagination, 1, (_d = changeInfo.pagination) === null || _d === void 0 ? void 0 : _d.pageSize);\n }\n }\n if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRefs.body.current) {\n (0, _scrollTo.default)(0, {\n getContainer: () => internalRefs.body.current\n });\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, {\n currentDataSource: (0, _useFilter.getFilterData)((0, _useSorter.getSortData)(rawData, changeInfo.sorterStates, childrenColumnName), changeInfo.filterStates, childrenColumnName),\n action\n });\n };\n /**\n * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to read\n * state out and then put it back to title render. Move these code into `hooks` but still too\n * complex. We should provides Table props like `sorter` & `filter` to handle control in next big\n * version.\n */\n // ============================ Sorter =============================\n const onSorterChange = (sorter, sorterStates) => {\n triggerOnChange({\n sorter,\n sorterStates\n }, 'sort', false);\n };\n const [transformSorterColumns, sortStates, sorterTitleProps, getSorters] = (0, _useSorter.default)({\n prefixCls,\n mergedColumns,\n onSorterChange,\n sortDirections: sortDirections || ['ascend', 'descend'],\n tableLocale,\n showSorterTooltip\n });\n const sortedData = React.useMemo(() => (0, _useSorter.getSortData)(rawData, sortStates, childrenColumnName), [rawData, sortStates]);\n changeEventInfo.sorter = getSorters();\n changeEventInfo.sorterStates = sortStates;\n // ============================ Filter ============================\n const onFilterChange = (filters, filterStates) => {\n triggerOnChange({\n filters,\n filterStates\n }, 'filter', true);\n };\n const [transformFilterColumns, filterStates, filters] = (0, _useFilter.default)({\n prefixCls,\n locale: tableLocale,\n dropdownPrefixCls,\n mergedColumns,\n onFilterChange,\n getPopupContainer: getPopupContainer || getContextPopupContainer,\n rootClassName: (0, _classnames.default)(rootClassName, rootCls)\n });\n const mergedData = (0, _useFilter.getFilterData)(sortedData, filterStates, childrenColumnName);\n changeEventInfo.filters = filters;\n changeEventInfo.filterStates = filterStates;\n // ============================ Column ============================\n const columnTitleProps = React.useMemo(() => {\n const mergedFilters = {};\n Object.keys(filters).forEach(filterKey => {\n if (filters[filterKey] !== null) {\n mergedFilters[filterKey] = filters[filterKey];\n }\n });\n return Object.assign(Object.assign({}, sorterTitleProps), {\n filters: mergedFilters\n });\n }, [sorterTitleProps, filters]);\n const [transformTitleColumns] = (0, _useTitleColumns.default)(columnTitleProps);\n // ========================== Pagination ==========================\n const onPaginationChange = (current, pageSize) => {\n triggerOnChange({\n pagination: Object.assign(Object.assign({}, changeEventInfo.pagination), {\n current,\n pageSize\n })\n }, 'paginate');\n };\n const [mergedPagination, resetPagination] = (0, _usePagination.default)(mergedData.length, onPaginationChange, pagination);\n changeEventInfo.pagination = pagination === false ? {} : (0, _usePagination.getPaginationParam)(mergedPagination, pagination);\n changeEventInfo.resetPagination = resetPagination;\n // ============================= Data =============================\n const pageData = React.useMemo(() => {\n if (pagination === false || !mergedPagination.pageSize) {\n return mergedData;\n }\n const {\n current = 1,\n total,\n pageSize = _usePagination.DEFAULT_PAGE_SIZE\n } = mergedPagination;\n process.env.NODE_ENV !== \"production\" ? warning(current > 0, 'usage', '`current` should be positive number.') : void 0;\n // Dynamic table data\n if (mergedData.length < total) {\n if (mergedData.length > pageSize) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', '`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.') : void 0;\n return mergedData.slice((current - 1) * pageSize, current * pageSize);\n }\n return mergedData;\n }\n return mergedData.slice((current - 1) * pageSize, current * pageSize);\n }, [!!pagination, mergedData, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.current, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total]);\n // ========================== Selections ==========================\n const [transformSelectionColumns, selectedKeySet] = (0, _useSelection.default)({\n prefixCls,\n data: mergedData,\n pageData,\n getRowKey,\n getRecordByKey,\n expandType,\n childrenColumnName,\n locale: tableLocale,\n getPopupContainer: getPopupContainer || getContextPopupContainer\n }, rowSelection);\n const internalRowClassName = (record, index, indent) => {\n let mergedRowClassName;\n if (typeof rowClassName === 'function') {\n mergedRowClassName = (0, _classnames.default)(rowClassName(record, index, indent));\n } else {\n mergedRowClassName = (0, _classnames.default)(rowClassName);\n }\n return (0, _classnames.default)({\n [`${prefixCls}-row-selected`]: selectedKeySet.has(getRowKey(record, index))\n }, mergedRowClassName);\n };\n // ========================== Expandable ==========================\n // Pass origin render status into `rc-table`, this can be removed when refactor with `rc-table`\n mergedExpandable.__PARENT_RENDER_ICON__ = mergedExpandable.expandIcon;\n // Customize expandable icon\n mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || (0, _ExpandIcon.default)(tableLocale);\n // Adjust expand icon index, no overwrite expandIconColumnIndex if set.\n if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) {\n mergedExpandable.expandIconColumnIndex = rowSelection ? 1 : 0;\n } else if (mergedExpandable.expandIconColumnIndex > 0 && rowSelection) {\n mergedExpandable.expandIconColumnIndex -= 1;\n }\n // Indent size\n if (typeof mergedExpandable.indentSize !== 'number') {\n mergedExpandable.indentSize = typeof indentSize === 'number' ? indentSize : 15;\n }\n // ============================ Render ============================\n const transformColumns = React.useCallback(innerColumns => transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))), [transformSorterColumns, transformFilterColumns, transformSelectionColumns]);\n let topPaginationNode;\n let bottomPaginationNode;\n if (pagination !== false && (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total)) {\n let paginationSize;\n if (mergedPagination.size) {\n paginationSize = mergedPagination.size;\n } else {\n paginationSize = mergedSize === 'small' || mergedSize === 'middle' ? 'small' : undefined;\n }\n const renderPagination = position => (/*#__PURE__*/React.createElement(_pagination.default, Object.assign({}, mergedPagination, {\n className: (0, _classnames.default)(`${prefixCls}-pagination ${prefixCls}-pagination-${position}`, mergedPagination.className),\n size: paginationSize\n })));\n const defaultPosition = direction === 'rtl' ? 'left' : 'right';\n const {\n position\n } = mergedPagination;\n if (position !== null && Array.isArray(position)) {\n const topPos = position.find(p => p.includes('top'));\n const bottomPos = position.find(p => p.includes('bottom'));\n const isDisable = position.every(p => `${p}` === 'none');\n if (!topPos && !bottomPos && !isDisable) {\n bottomPaginationNode = renderPagination(defaultPosition);\n }\n if (topPos) {\n topPaginationNode = renderPagination(topPos.toLowerCase().replace('top', ''));\n }\n if (bottomPos) {\n bottomPaginationNode = renderPagination(bottomPos.toLowerCase().replace('bottom', ''));\n }\n } else {\n bottomPaginationNode = renderPagination(defaultPosition);\n }\n }\n // >>>>>>>>> Spinning\n let spinProps;\n if (typeof loading === 'boolean') {\n spinProps = {\n spinning: loading\n };\n } else if (typeof loading === 'object') {\n spinProps = Object.assign({\n spinning: true\n }, loading);\n }\n const wrapperClassNames = (0, _classnames.default)(cssVarCls, rootCls, `${prefixCls}-wrapper`, table === null || table === void 0 ? void 0 : table.className, {\n [`${prefixCls}-wrapper-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId);\n const mergedStyle = Object.assign(Object.assign({}, table === null || table === void 0 ? void 0 : table.style), style);\n const emptyText = typeof (locale === null || locale === void 0 ? void 0 : locale.emptyText) !== 'undefined' ? locale.emptyText : (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table')) || /*#__PURE__*/React.createElement(_defaultRenderEmpty.default, {\n componentName: \"Table\"\n });\n // ========================== Render ==========================\n const TableComponent = virtual ? _VirtualTable.default : _RcTable.default;\n // >>> Virtual Table props. We set height here since it will affect height collection\n const virtualProps = {};\n const listItemHeight = React.useMemo(() => {\n const {\n fontSize,\n lineHeight,\n padding,\n paddingXS,\n paddingSM\n } = token;\n const fontHeight = Math.floor(fontSize * lineHeight);\n switch (mergedSize) {\n case 'large':\n return padding * 2 + fontHeight;\n case 'small':\n return paddingXS * 2 + fontHeight;\n default:\n return paddingSM * 2 + fontHeight;\n }\n }, [token, mergedSize]);\n if (virtual) {\n virtualProps.listItemHeight = listItemHeight;\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n ref: rootRef,\n className: wrapperClassNames,\n style: mergedStyle\n }, /*#__PURE__*/React.createElement(_spin.default, Object.assign({\n spinning: false\n }, spinProps), topPaginationNode, /*#__PURE__*/React.createElement(TableComponent, Object.assign({}, virtualProps, tableProps, {\n ref: tblRef,\n columns: mergedColumns,\n direction: direction,\n expandable: mergedExpandable,\n prefixCls: prefixCls,\n className: (0, _classnames.default)({\n [`${prefixCls}-middle`]: mergedSize === 'middle',\n [`${prefixCls}-small`]: mergedSize === 'small',\n [`${prefixCls}-bordered`]: bordered,\n [`${prefixCls}-empty`]: rawData.length === 0\n }, cssVarCls, rootCls, hashId),\n data: pageData,\n rowKey: getRowKey,\n rowClassName: internalRowClassName,\n emptyText: emptyText,\n // Internal\n internalHooks: _rcTable.INTERNAL_HOOKS,\n internalRefs: internalRefs,\n transformColumns: transformColumns,\n getContainerWidth: getContainerWidth\n })), bottomPaginationNode)));\n};\nvar _default = exports.default = /*#__PURE__*/React.forwardRef(InternalTable);","\"use strict\";\n\"use client\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _rcTable = require(\"rc-table\");\n/**\n * Same as `rc-table` but we modify trigger children update logic instead.\n */\nconst RcVirtualTable = (0, _rcTable.genVirtualTable)((prev, next) => {\n const {\n _renderTimes: prevRenderTimes\n } = prev;\n const {\n _renderTimes: nextRenderTimes\n } = next;\n return prevRenderTimes !== nextRenderTimes;\n});\nvar _default = exports.default = RcVirtualTable;","\"use strict\";\n\"use client\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _rcTable = require(\"rc-table\");\n/**\n * Same as `rc-table` but we modify trigger children update logic instead.\n */\nconst RcTable = (0, _rcTable.genTable)((prev, next) => {\n const {\n _renderTimes: prevRenderTimes\n } = prev;\n const {\n _renderTimes: nextRenderTimes\n } = next;\n return prevRenderTimes !== nextRenderTimes;\n});\nvar _default = exports.default = RcTable;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _rcTable = require(\"rc-table\");\nvar _Column = _interopRequireDefault(require(\"./Column\"));\nvar _ColumnGroup = _interopRequireDefault(require(\"./ColumnGroup\"));\nvar _useSelection = require(\"./hooks/useSelection\");\nvar _InternalTable = _interopRequireDefault(require(\"./InternalTable\"));\nconst Table = (props, ref) => {\n const renderTimesRef = React.useRef(0);\n renderTimesRef.current += 1;\n return /*#__PURE__*/React.createElement(_InternalTable.default, Object.assign({}, props, {\n ref: ref,\n _renderTimes: renderTimesRef.current\n }));\n};\nconst ForwardTable = /*#__PURE__*/React.forwardRef(Table);\nForwardTable.SELECTION_COLUMN = _useSelection.SELECTION_COLUMN;\nForwardTable.EXPAND_COLUMN = _rcTable.EXPAND_COLUMN;\nForwardTable.SELECTION_ALL = _useSelection.SELECTION_ALL;\nForwardTable.SELECTION_INVERT = _useSelection.SELECTION_INVERT;\nForwardTable.SELECTION_NONE = _useSelection.SELECTION_NONE;\nForwardTable.Column = _Column.default;\nForwardTable.ColumnGroup = _ColumnGroup.default;\nForwardTable.Summary = _rcTable.Summary;\nif (process.env.NODE_ENV !== 'production') {\n ForwardTable.displayName = 'Table';\n}\nvar _default = exports.default = ForwardTable;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useContainerWidth;\nfunction useContainerWidth(prefixCls) {\n const getContainerWidth = (ele, width) => {\n const container = ele.querySelector(`.${prefixCls}-container`);\n let returnWidth = width;\n if (container) {\n const style = getComputedStyle(container);\n const borderLeft = parseInt(style.borderLeftWidth, 10);\n const borderRight = parseInt(style.borderRightWidth, 10);\n returnWidth = width - borderLeft - borderRight;\n }\n return returnWidth;\n };\n return getContainerWidth;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.flattenKeys = flattenKeys;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _FilterFilled = _interopRequireDefault(require(\"@ant-design/icons/FilterFilled\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _isEqual = _interopRequireDefault(require(\"rc-util/lib/isEqual\"));\nvar _useSyncState = _interopRequireDefault(require(\"../../../_util/hooks/useSyncState\"));\nvar _warning = require(\"../../../_util/warning\");\nvar _button = _interopRequireDefault(require(\"../../../button\"));\nvar _checkbox = _interopRequireDefault(require(\"../../../checkbox\"));\nvar _context = require(\"../../../config-provider/context\");\nvar _dropdown = _interopRequireDefault(require(\"../../../dropdown\"));\nvar _empty = _interopRequireDefault(require(\"../../../empty\"));\nvar _menu = _interopRequireDefault(require(\"../../../menu\"));\nvar _OverrideContext = require(\"../../../menu/OverrideContext\");\nvar _radio = _interopRequireDefault(require(\"../../../radio\"));\nvar _tree = _interopRequireDefault(require(\"../../../tree\"));\nvar _FilterSearch = _interopRequireDefault(require(\"./FilterSearch\"));\nvar _FilterWrapper = _interopRequireDefault(require(\"./FilterWrapper\"));\nfunction flattenKeys(filters) {\n let keys = [];\n (filters || []).forEach(_ref => {\n let {\n value,\n children\n } = _ref;\n keys.push(value);\n if (children) {\n keys = [].concat((0, _toConsumableArray2.default)(keys), (0, _toConsumableArray2.default)(flattenKeys(children)));\n }\n });\n return keys;\n}\nfunction hasSubMenu(filters) {\n return filters.some(_ref2 => {\n let {\n children\n } = _ref2;\n return children;\n });\n}\nfunction searchValueMatched(searchValue, text) {\n if (typeof text === 'string' || typeof text === 'number') {\n return text === null || text === void 0 ? void 0 : text.toString().toLowerCase().includes(searchValue.trim().toLowerCase());\n }\n return false;\n}\nfunction renderFilterItems(_ref3) {\n let {\n filters,\n prefixCls,\n filteredKeys,\n filterMultiple,\n searchValue,\n filterSearch\n } = _ref3;\n return filters.map((filter, index) => {\n const key = String(filter.value);\n if (filter.children) {\n return {\n key: key || index,\n label: filter.text,\n popupClassName: `${prefixCls}-dropdown-submenu`,\n children: renderFilterItems({\n filters: filter.children,\n prefixCls,\n filteredKeys,\n filterMultiple,\n searchValue,\n filterSearch\n })\n };\n }\n const Component = filterMultiple ? _checkbox.default : _radio.default;\n const item = {\n key: filter.value !== undefined ? key : index,\n label: (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Component, {\n checked: filteredKeys.includes(key)\n }), /*#__PURE__*/React.createElement(\"span\", null, filter.text)))\n };\n if (searchValue.trim()) {\n if (typeof filterSearch === 'function') {\n return filterSearch(searchValue, filter) ? item : null;\n }\n return searchValueMatched(searchValue, filter.text) ? item : null;\n }\n return item;\n });\n}\nfunction wrapStringListType(keys) {\n return keys || [];\n}\nconst FilterDropdown = props => {\n var _a, _b;\n const {\n tablePrefixCls,\n prefixCls,\n column,\n dropdownPrefixCls,\n columnKey,\n filterOnClose,\n filterMultiple,\n filterMode = 'menu',\n filterSearch = false,\n filterState,\n triggerFilter,\n locale,\n children,\n getPopupContainer,\n rootClassName\n } = props;\n const {\n filterDropdownOpen,\n onFilterDropdownOpenChange,\n filterResetToDefaultFilteredValue,\n defaultFilteredValue,\n // Deprecated\n filterDropdownVisible,\n onFilterDropdownVisibleChange\n } = column;\n const [visible, setVisible] = React.useState(false);\n const filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered));\n const triggerVisible = newVisible => {\n setVisible(newVisible);\n onFilterDropdownOpenChange === null || onFilterDropdownOpenChange === void 0 ? void 0 : onFilterDropdownOpenChange(newVisible);\n onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible);\n };\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Table');\n [['filterDropdownVisible', 'filterDropdownOpen', filterDropdownVisible], ['onFilterDropdownVisibleChange', 'onFilterDropdownOpenChange', onFilterDropdownVisibleChange]].forEach(_ref4 => {\n let [deprecatedName, newName, prop] = _ref4;\n warning.deprecated(prop === undefined || prop === null, deprecatedName, newName);\n });\n }\n const mergedVisible = (_b = filterDropdownOpen !== null && filterDropdownOpen !== void 0 ? filterDropdownOpen : filterDropdownVisible) !== null && _b !== void 0 ? _b : visible;\n // ===================== Select Keys =====================\n const propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys;\n const [getFilteredKeysSync, setFilteredKeysSync] = (0, _useSyncState.default)(wrapStringListType(propFilteredKeys));\n const onSelectKeys = _ref5 => {\n let {\n selectedKeys\n } = _ref5;\n setFilteredKeysSync(selectedKeys);\n };\n const onCheck = (keys, _ref6) => {\n let {\n node,\n checked\n } = _ref6;\n if (!filterMultiple) {\n onSelectKeys({\n selectedKeys: checked && node.key ? [node.key] : []\n });\n } else {\n onSelectKeys({\n selectedKeys: keys\n });\n }\n };\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n onSelectKeys({\n selectedKeys: wrapStringListType(propFilteredKeys)\n });\n }, [propFilteredKeys]);\n // ====================== Open Keys ======================\n const [openKeys, setOpenKeys] = React.useState([]);\n const onOpenChange = keys => {\n setOpenKeys(keys);\n };\n // search in tree mode column filter\n const [searchValue, setSearchValue] = React.useState('');\n const onSearch = e => {\n const {\n value\n } = e.target;\n setSearchValue(value);\n };\n // clear search value after close filter dropdown\n React.useEffect(() => {\n if (!visible) {\n setSearchValue('');\n }\n }, [visible]);\n // ======================= Submit ========================\n const internalTriggerFilter = keys => {\n const mergedKeys = (keys === null || keys === void 0 ? void 0 : keys.length) ? keys : null;\n if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) {\n return null;\n }\n if ((0, _isEqual.default)(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys, true)) {\n return null;\n }\n triggerFilter({\n column,\n key: columnKey,\n filteredKeys: mergedKeys\n });\n };\n const onConfirm = () => {\n triggerVisible(false);\n internalTriggerFilter(getFilteredKeysSync());\n };\n const onReset = function () {\n let {\n confirm,\n closeDropdown\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n confirm: false,\n closeDropdown: false\n };\n if (confirm) {\n internalTriggerFilter([]);\n }\n if (closeDropdown) {\n triggerVisible(false);\n }\n setSearchValue('');\n if (filterResetToDefaultFilteredValue) {\n setFilteredKeysSync((defaultFilteredValue || []).map(key => String(key)));\n } else {\n setFilteredKeysSync([]);\n }\n };\n const doFilter = function () {\n let {\n closeDropdown\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n closeDropdown: true\n };\n if (closeDropdown) {\n triggerVisible(false);\n }\n internalTriggerFilter(getFilteredKeysSync());\n };\n const onVisibleChange = (newVisible, info) => {\n if (info.source === 'trigger') {\n if (newVisible && propFilteredKeys !== undefined) {\n // Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefined)\n setFilteredKeysSync(wrapStringListType(propFilteredKeys));\n }\n triggerVisible(newVisible);\n if (!newVisible && !column.filterDropdown && filterOnClose) {\n onConfirm();\n }\n }\n };\n // ======================== Style ========================\n const dropdownMenuClass = (0, _classnames.default)({\n [`${dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column.filters || [])\n });\n const onCheckAll = e => {\n if (e.target.checked) {\n const allFilterKeys = flattenKeys(column === null || column === void 0 ? void 0 : column.filters).map(key => String(key));\n setFilteredKeysSync(allFilterKeys);\n } else {\n setFilteredKeysSync([]);\n }\n };\n const getTreeData = _ref7 => {\n let {\n filters\n } = _ref7;\n return (filters || []).map((filter, index) => {\n const key = String(filter.value);\n const item = {\n title: filter.text,\n key: filter.value !== undefined ? key : String(index)\n };\n if (filter.children) {\n item.children = getTreeData({\n filters: filter.children\n });\n }\n return item;\n });\n };\n const getFilterData = node => {\n var _a;\n return Object.assign(Object.assign({}, node), {\n text: node.title,\n value: node.key,\n children: ((_a = node.children) === null || _a === void 0 ? void 0 : _a.map(item => getFilterData(item))) || []\n });\n };\n let dropdownContent;\n const {\n direction,\n renderEmpty\n } = React.useContext(_context.ConfigContext);\n if (typeof column.filterDropdown === 'function') {\n dropdownContent = column.filterDropdown({\n prefixCls: `${dropdownPrefixCls}-custom`,\n setSelectedKeys: selectedKeys => onSelectKeys({\n selectedKeys: selectedKeys\n }),\n selectedKeys: getFilteredKeysSync(),\n confirm: doFilter,\n clearFilters: onReset,\n filters: column.filters,\n visible: mergedVisible,\n close: () => {\n triggerVisible(false);\n }\n });\n } else if (column.filterDropdown) {\n dropdownContent = column.filterDropdown;\n } else {\n const selectedKeys = getFilteredKeysSync() || [];\n const getFilterComponent = () => {\n var _a;\n const empty = (_a = renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table.filter')) !== null && _a !== void 0 ? _a : (/*#__PURE__*/React.createElement(_empty.default, {\n image: _empty.default.PRESENTED_IMAGE_SIMPLE,\n description: locale.filterEmptyText,\n imageStyle: {\n height: 24\n },\n style: {\n margin: 0,\n padding: '16px 0'\n }\n }));\n if ((column.filters || []).length === 0) {\n return empty;\n }\n if (filterMode === 'tree') {\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_FilterSearch.default, {\n filterSearch: filterSearch,\n value: searchValue,\n onChange: onSearch,\n tablePrefixCls: tablePrefixCls,\n locale: locale\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: `${tablePrefixCls}-filter-dropdown-tree`\n }, filterMultiple ? (/*#__PURE__*/React.createElement(_checkbox.default, {\n checked: selectedKeys.length === flattenKeys(column.filters).length,\n indeterminate: selectedKeys.length > 0 && selectedKeys.length < flattenKeys(column.filters).length,\n className: `${tablePrefixCls}-filter-dropdown-checkall`,\n onChange: onCheckAll\n }, locale.filterCheckall)) : null, /*#__PURE__*/React.createElement(_tree.default, {\n checkable: true,\n selectable: false,\n blockNode: true,\n multiple: filterMultiple,\n checkStrictly: !filterMultiple,\n className: `${dropdownPrefixCls}-menu`,\n onCheck: onCheck,\n checkedKeys: selectedKeys,\n selectedKeys: selectedKeys,\n showIcon: false,\n treeData: getTreeData({\n filters: column.filters\n }),\n autoExpandParent: true,\n defaultExpandAll: true,\n filterTreeNode: searchValue.trim() ? node => {\n if (typeof filterSearch === 'function') {\n return filterSearch(searchValue, getFilterData(node));\n }\n return searchValueMatched(searchValue, node.title);\n } : undefined\n })));\n }\n const items = renderFilterItems({\n filters: column.filters || [],\n filterSearch,\n prefixCls,\n filteredKeys: getFilteredKeysSync(),\n filterMultiple,\n searchValue\n });\n const isEmpty = items.every(item => item === null);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_FilterSearch.default, {\n filterSearch: filterSearch,\n value: searchValue,\n onChange: onSearch,\n tablePrefixCls: tablePrefixCls,\n locale: locale\n }), isEmpty ? empty : (/*#__PURE__*/React.createElement(_menu.default, {\n selectable: true,\n multiple: filterMultiple,\n prefixCls: `${dropdownPrefixCls}-menu`,\n className: dropdownMenuClass,\n onSelect: onSelectKeys,\n onDeselect: onSelectKeys,\n selectedKeys: selectedKeys,\n getPopupContainer: getPopupContainer,\n openKeys: openKeys,\n onOpenChange: onOpenChange,\n items: items\n })));\n };\n const getResetDisabled = () => {\n if (filterResetToDefaultFilteredValue) {\n return (0, _isEqual.default)((defaultFilteredValue || []).map(key => String(key)), selectedKeys, true);\n }\n return selectedKeys.length === 0;\n };\n dropdownContent = /*#__PURE__*/React.createElement(React.Fragment, null, getFilterComponent(), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-dropdown-btns`\n }, /*#__PURE__*/React.createElement(_button.default, {\n type: \"link\",\n size: \"small\",\n disabled: getResetDisabled(),\n onClick: () => onReset()\n }, locale.filterReset), /*#__PURE__*/React.createElement(_button.default, {\n type: \"primary\",\n size: \"small\",\n onClick: onConfirm\n }, locale.filterConfirm)));\n }\n // We should not block customize Menu with additional props\n if (column.filterDropdown) {\n dropdownContent = /*#__PURE__*/React.createElement(_OverrideContext.OverrideProvider, {\n selectable: undefined\n }, dropdownContent);\n }\n const menu = () => (/*#__PURE__*/React.createElement(_FilterWrapper.default, {\n className: `${prefixCls}-dropdown`\n }, dropdownContent));\n let filterIcon;\n if (typeof column.filterIcon === 'function') {\n filterIcon = column.filterIcon(filtered);\n } else if (column.filterIcon) {\n filterIcon = column.filterIcon;\n } else {\n filterIcon = /*#__PURE__*/React.createElement(_FilterFilled.default, null);\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-column`\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: `${tablePrefixCls}-column-title`\n }, children), /*#__PURE__*/React.createElement(_dropdown.default, {\n dropdownRender: menu,\n trigger: ['click'],\n open: mergedVisible,\n onOpenChange: onVisibleChange,\n getPopupContainer: getPopupContainer,\n placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight',\n rootClassName: rootClassName\n }, /*#__PURE__*/React.createElement(\"span\", {\n role: \"button\",\n tabIndex: -1,\n className: (0, _classnames.default)(`${prefixCls}-trigger`, {\n active: filtered\n }),\n onClick: e => {\n e.stopPropagation();\n }\n }, filterIcon)));\n};\nvar _default = exports.default = FilterDropdown;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _SearchOutlined = _interopRequireDefault(require(\"@ant-design/icons/SearchOutlined\"));\nvar _input = _interopRequireDefault(require(\"../../../input\"));\nconst FilterSearch = props => {\n const {\n value,\n filterSearch,\n tablePrefixCls,\n locale,\n onChange\n } = props;\n if (!filterSearch) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${tablePrefixCls}-filter-dropdown-search`\n }, /*#__PURE__*/React.createElement(_input.default, {\n prefix: /*#__PURE__*/React.createElement(_SearchOutlined.default, null),\n placeholder: locale.filterSearchPlaceholder,\n onChange: onChange,\n value: value,\n // for skip min-width of input\n htmlSize: 1,\n className: `${tablePrefixCls}-filter-dropdown-search-input`\n }));\n};\nvar _default = exports.default = FilterSearch;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _KeyCode = _interopRequireDefault(require(\"rc-util/lib/KeyCode\"));\nconst onKeyDown = event => {\n const {\n keyCode\n } = event;\n if (keyCode === _KeyCode.default.ENTER) {\n event.stopPropagation();\n }\n};\nconst FilterDropdownMenuWrapper = /*#__PURE__*/React.forwardRef((props, ref) => (/*#__PURE__*/React.createElement(\"div\", {\n className: props.className,\n onClick: e => e.stopPropagation(),\n onKeyDown: onKeyDown,\n ref: ref\n}, props.children)));\nif (process.env.NODE_ENV !== 'production') {\n FilterDropdownMenuWrapper.displayName = 'FilterDropdownMenuWrapper';\n}\nvar _default = exports.default = FilterDropdownMenuWrapper;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nObject.defineProperty(exports, \"flattenKeys\", {\n enumerable: true,\n get: function () {\n return _FilterDropdown.flattenKeys;\n }\n});\nexports.getFilterData = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _warning = require(\"../../../_util/warning\");\nvar _util = require(\"../../util\");\nvar _FilterDropdown = _interopRequireWildcard(require(\"./FilterDropdown\"));\nconst collectFilterStates = (columns, init, pos) => {\n let filterStates = [];\n (columns || []).forEach((column, index) => {\n var _a;\n const columnPos = (0, _util.getColumnPos)(index, pos);\n if (column.filters || 'filterDropdown' in column || 'onFilter' in column) {\n if ('filteredValue' in column) {\n // Controlled\n let filteredValues = column.filteredValue;\n if (!('filterDropdown' in column)) {\n filteredValues = (_a = filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.map(String)) !== null && _a !== void 0 ? _a : filteredValues;\n }\n filterStates.push({\n column,\n key: (0, _util.getColumnKey)(column, columnPos),\n filteredKeys: filteredValues,\n forceFiltered: column.filtered\n });\n } else {\n // Uncontrolled\n filterStates.push({\n column,\n key: (0, _util.getColumnKey)(column, columnPos),\n filteredKeys: init && column.defaultFilteredValue ? column.defaultFilteredValue : undefined,\n forceFiltered: column.filtered\n });\n }\n }\n if ('children' in column) {\n filterStates = [].concat((0, _toConsumableArray2.default)(filterStates), (0, _toConsumableArray2.default)(collectFilterStates(column.children, init, columnPos)));\n }\n });\n return filterStates;\n};\nfunction injectFilter(prefixCls, dropdownPrefixCls, columns, filterStates, locale, triggerFilter, getPopupContainer, pos, rootClassName) {\n return columns.map((column, index) => {\n const columnPos = (0, _util.getColumnPos)(index, pos);\n const {\n filterOnClose = true,\n filterMultiple = true,\n filterMode,\n filterSearch\n } = column;\n let newColumn = column;\n if (newColumn.filters || newColumn.filterDropdown) {\n const columnKey = (0, _util.getColumnKey)(newColumn, columnPos);\n const filterState = filterStates.find(_ref => {\n let {\n key\n } = _ref;\n return columnKey === key;\n });\n newColumn = Object.assign(Object.assign({}, newColumn), {\n title: renderProps => (/*#__PURE__*/React.createElement(_FilterDropdown.default, {\n tablePrefixCls: prefixCls,\n prefixCls: `${prefixCls}-filter`,\n dropdownPrefixCls: dropdownPrefixCls,\n column: newColumn,\n columnKey: columnKey,\n filterState: filterState,\n filterOnClose: filterOnClose,\n filterMultiple: filterMultiple,\n filterMode: filterMode,\n filterSearch: filterSearch,\n triggerFilter: triggerFilter,\n locale: locale,\n getPopupContainer: getPopupContainer,\n rootClassName: rootClassName\n }, (0, _util.renderColumnTitle)(column.title, renderProps)))\n });\n }\n if ('children' in newColumn) {\n newColumn = Object.assign(Object.assign({}, newColumn), {\n children: injectFilter(prefixCls, dropdownPrefixCls, newColumn.children, filterStates, locale, triggerFilter, getPopupContainer, columnPos, rootClassName)\n });\n }\n return newColumn;\n });\n}\nconst generateFilterInfo = filterStates => {\n const currentFilters = {};\n filterStates.forEach(_ref2 => {\n let {\n key,\n filteredKeys,\n column\n } = _ref2;\n const keyAsString = key;\n const {\n filters,\n filterDropdown\n } = column;\n if (filterDropdown) {\n currentFilters[keyAsString] = filteredKeys || null;\n } else if (Array.isArray(filteredKeys)) {\n const keys = (0, _FilterDropdown.flattenKeys)(filters);\n currentFilters[keyAsString] = keys.filter(originKey => filteredKeys.includes(String(originKey)));\n } else {\n currentFilters[keyAsString] = null;\n }\n });\n return currentFilters;\n};\nconst getFilterData = (data, filterStates, childrenColumnName) => {\n const filterDatas = filterStates.reduce((currentData, filterState) => {\n const {\n column: {\n onFilter,\n filters\n },\n filteredKeys\n } = filterState;\n if (onFilter && filteredKeys && filteredKeys.length) {\n return currentData\n // shallow copy\n .map(record => Object.assign({}, record)).filter(record => filteredKeys.some(key => {\n const keys = (0, _FilterDropdown.flattenKeys)(filters);\n const keyIndex = keys.findIndex(k => String(k) === String(key));\n const realKey = keyIndex !== -1 ? keys[keyIndex] : key;\n // filter children\n if (record[childrenColumnName]) {\n record[childrenColumnName] = getFilterData(record[childrenColumnName], filterStates, childrenColumnName);\n }\n return onFilter(realKey, record);\n }));\n }\n return currentData;\n }, data);\n return filterDatas;\n};\nexports.getFilterData = getFilterData;\nconst getMergedColumns = rawMergedColumns => rawMergedColumns.flatMap(column => {\n if ('children' in column) {\n return [column].concat((0, _toConsumableArray2.default)(getMergedColumns(column.children || [])));\n }\n return [column];\n});\nconst useFilter = props => {\n const {\n prefixCls,\n dropdownPrefixCls,\n mergedColumns: rawMergedColumns,\n onFilterChange,\n getPopupContainer,\n locale: tableLocale,\n rootClassName\n } = props;\n const warning = (0, _warning.devUseWarning)('Table');\n const mergedColumns = React.useMemo(() => getMergedColumns(rawMergedColumns || []), [rawMergedColumns]);\n const [filterStates, setFilterStates] = React.useState(() => collectFilterStates(mergedColumns, true));\n const mergedFilterStates = React.useMemo(() => {\n const collectedStates = collectFilterStates(mergedColumns, false);\n if (collectedStates.length === 0) {\n return collectedStates;\n }\n let filteredKeysIsAllNotControlled = true;\n let filteredKeysIsAllControlled = true;\n collectedStates.forEach(_ref3 => {\n let {\n filteredKeys\n } = _ref3;\n if (filteredKeys !== undefined) {\n filteredKeysIsAllNotControlled = false;\n } else {\n filteredKeysIsAllControlled = false;\n }\n });\n // Return if not controlled\n if (filteredKeysIsAllNotControlled) {\n // Filter column may have been removed\n const keyList = (mergedColumns || []).map((column, index) => (0, _util.getColumnKey)(column, (0, _util.getColumnPos)(index)));\n return filterStates.filter(_ref4 => {\n let {\n key\n } = _ref4;\n return keyList.includes(key);\n }).map(item => {\n const col = mergedColumns[keyList.findIndex(key => key === item.key)];\n return Object.assign(Object.assign({}, item), {\n column: Object.assign(Object.assign({}, item.column), col),\n forceFiltered: col.filtered\n });\n });\n }\n process.env.NODE_ENV !== \"production\" ? warning(filteredKeysIsAllControlled, 'usage', 'Columns should all contain `filteredValue` or not contain `filteredValue`.') : void 0;\n return collectedStates;\n }, [mergedColumns, filterStates]);\n const filters = React.useMemo(() => generateFilterInfo(mergedFilterStates), [mergedFilterStates]);\n const triggerFilter = filterState => {\n const newFilterStates = mergedFilterStates.filter(_ref5 => {\n let {\n key\n } = _ref5;\n return key !== filterState.key;\n });\n newFilterStates.push(filterState);\n setFilterStates(newFilterStates);\n onFilterChange(generateFilterInfo(newFilterStates), newFilterStates);\n };\n const transformColumns = innerColumns => injectFilter(prefixCls, dropdownPrefixCls, innerColumns, mergedFilterStates, tableLocale, triggerFilter, getPopupContainer, undefined, rootClassName);\n return [transformColumns, mergedFilterStates, filters];\n};\nvar _default = exports.default = useFilter;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst useLazyKVMap = (data, childrenColumnName, getRowKey) => {\n const mapCacheRef = React.useRef({});\n function getRecordByKey(key) {\n var _a;\n if (!mapCacheRef.current || mapCacheRef.current.data !== data || mapCacheRef.current.childrenColumnName !== childrenColumnName || mapCacheRef.current.getRowKey !== getRowKey) {\n const kvMap = new Map();\n function dig(records) {\n records.forEach((record, index) => {\n const rowKey = getRowKey(record, index);\n kvMap.set(rowKey, record);\n if (record && typeof record === 'object' && childrenColumnName in record) {\n dig(record[childrenColumnName] || []);\n }\n });\n }\n dig(data);\n mapCacheRef.current = {\n data,\n childrenColumnName,\n kvMap,\n getRowKey\n };\n }\n return (_a = mapCacheRef.current.kvMap) === null || _a === void 0 ? void 0 : _a.get(key);\n }\n return [getRecordByKey];\n};\nvar _default = exports.default = useLazyKVMap;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.DEFAULT_PAGE_SIZE = void 0;\nexports.getPaginationParam = getPaginationParam;\nvar _react = require(\"react\");\nvar _extendsObject = _interopRequireDefault(require(\"../../_util/extendsObject\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst DEFAULT_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = 10;\nfunction getPaginationParam(mergedPagination, pagination) {\n const param = {\n current: mergedPagination.current,\n pageSize: mergedPagination.pageSize\n };\n const paginationObj = pagination && typeof pagination === 'object' ? pagination : {};\n Object.keys(paginationObj).forEach(pageProp => {\n const value = mergedPagination[pageProp];\n if (typeof value !== 'function') {\n param[pageProp] = value;\n }\n });\n return param;\n}\nfunction usePagination(total, onChange, pagination) {\n const _a = pagination && typeof pagination === 'object' ? pagination : {},\n {\n total: paginationTotal = 0\n } = _a,\n paginationObj = __rest(_a, [\"total\"]);\n const [innerPagination, setInnerPagination] = (0, _react.useState)(() => ({\n current: 'defaultCurrent' in paginationObj ? paginationObj.defaultCurrent : 1,\n pageSize: 'defaultPageSize' in paginationObj ? paginationObj.defaultPageSize : DEFAULT_PAGE_SIZE\n }));\n // ============ Basic Pagination Config ============\n const mergedPagination = (0, _extendsObject.default)(innerPagination, paginationObj, {\n total: paginationTotal > 0 ? paginationTotal : total\n });\n // Reset `current` if data length or pageSize changed\n const maxPage = Math.ceil((paginationTotal || total) / mergedPagination.pageSize);\n if (mergedPagination.current > maxPage) {\n // Prevent a maximum page count of 0\n mergedPagination.current = maxPage || 1;\n }\n const refreshPagination = (current, pageSize) => {\n setInnerPagination({\n current: current !== null && current !== void 0 ? current : 1,\n pageSize: pageSize || mergedPagination.pageSize\n });\n };\n const onInternalChange = (current, pageSize) => {\n var _a;\n if (pagination) {\n (_a = pagination.onChange) === null || _a === void 0 ? void 0 : _a.call(pagination, current, pageSize);\n }\n refreshPagination(current, pageSize);\n onChange(current, pageSize || (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize));\n };\n if (pagination === false) {\n return [{}, () => {}];\n }\n return [Object.assign(Object.assign({}, mergedPagination), {\n onChange: onInternalChange\n }), refreshPagination];\n}\nvar _default = exports.default = usePagination;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.SELECTION_NONE = exports.SELECTION_INVERT = exports.SELECTION_COLUMN = exports.SELECTION_ALL = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar React = _react;\nvar _DownOutlined = _interopRequireDefault(require(\"@ant-design/icons/DownOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTable = require(\"rc-table\");\nvar _util = require(\"rc-tree/lib/util\");\nvar _conductUtil = require(\"rc-tree/lib/utils/conductUtil\");\nvar _treeUtil = require(\"rc-tree/lib/utils/treeUtil\");\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _useMultipleSelect = _interopRequireDefault(require(\"../../_util/hooks/useMultipleSelect\"));\nvar _warning = require(\"../../_util/warning\");\nvar _checkbox = _interopRequireDefault(require(\"../../checkbox\"));\nvar _dropdown = _interopRequireDefault(require(\"../../dropdown\"));\nvar _radio = _interopRequireDefault(require(\"../../radio\"));\n// TODO: warning if use ajax!!!\nconst SELECTION_COLUMN = exports.SELECTION_COLUMN = {};\nconst SELECTION_ALL = exports.SELECTION_ALL = 'SELECT_ALL';\nconst SELECTION_INVERT = exports.SELECTION_INVERT = 'SELECT_INVERT';\nconst SELECTION_NONE = exports.SELECTION_NONE = 'SELECT_NONE';\nconst EMPTY_LIST = [];\nconst flattenData = (childrenColumnName, data) => {\n let list = [];\n (data || []).forEach(record => {\n list.push(record);\n if (record && typeof record === 'object' && childrenColumnName in record) {\n list = [].concat((0, _toConsumableArray2.default)(list), (0, _toConsumableArray2.default)(flattenData(childrenColumnName, record[childrenColumnName])));\n }\n });\n return list;\n};\nconst useSelection = (config, rowSelection) => {\n const {\n preserveSelectedRowKeys,\n selectedRowKeys,\n defaultSelectedRowKeys,\n getCheckboxProps,\n onChange: onSelectionChange,\n onSelect,\n onSelectAll,\n onSelectInvert,\n onSelectNone,\n onSelectMultiple,\n columnWidth: selectionColWidth,\n type: selectionType,\n selections,\n fixed,\n renderCell: customizeRenderCell,\n hideSelectAll,\n checkStrictly = true\n } = rowSelection || {};\n const {\n prefixCls,\n data,\n pageData,\n getRecordByKey,\n getRowKey,\n expandType,\n childrenColumnName,\n locale: tableLocale,\n getPopupContainer\n } = config;\n const warning = (0, _warning.devUseWarning)('Table');\n // ========================= MultipleSelect =========================\n const [multipleSelect, updatePrevSelectedIndex] = (0, _useMultipleSelect.default)(item => item);\n // ========================= Keys =========================\n const [mergedSelectedKeys, setMergedSelectedKeys] = (0, _useMergedState.default)(selectedRowKeys || defaultSelectedRowKeys || EMPTY_LIST, {\n value: selectedRowKeys\n });\n // ======================== Caches ========================\n const preserveRecordsRef = React.useRef(new Map());\n const updatePreserveRecordsCache = (0, _react.useCallback)(keys => {\n if (preserveSelectedRowKeys) {\n const newCache = new Map();\n // Keep key if mark as preserveSelectedRowKeys\n keys.forEach(key => {\n let record = getRecordByKey(key);\n if (!record && preserveRecordsRef.current.has(key)) {\n record = preserveRecordsRef.current.get(key);\n }\n newCache.set(key, record);\n });\n // Refresh to new cache\n preserveRecordsRef.current = newCache;\n }\n }, [getRecordByKey, preserveSelectedRowKeys]);\n // Update cache with selectedKeys\n React.useEffect(() => {\n updatePreserveRecordsCache(mergedSelectedKeys);\n }, [mergedSelectedKeys]);\n // Get flatten data\n const flattedData = (0, _react.useMemo)(() => flattenData(childrenColumnName, pageData), [childrenColumnName, pageData]);\n const {\n keyEntities\n } = (0, _react.useMemo)(() => {\n if (checkStrictly) {\n return {\n keyEntities: null\n };\n }\n let convertData = data;\n if (preserveSelectedRowKeys) {\n // use flattedData keys\n const keysSet = new Set(flattedData.map((record, index) => getRowKey(record, index)));\n // remove preserveRecords that duplicate data\n const preserveRecords = Array.from(preserveRecordsRef.current).reduce((total, _ref) => {\n let [key, value] = _ref;\n return keysSet.has(key) ? total : total.concat(value);\n }, []);\n convertData = [].concat((0, _toConsumableArray2.default)(convertData), (0, _toConsumableArray2.default)(preserveRecords));\n }\n return (0, _treeUtil.convertDataToEntities)(convertData, {\n externalGetKey: getRowKey,\n childrenPropName: childrenColumnName\n });\n }, [data, getRowKey, checkStrictly, childrenColumnName, preserveSelectedRowKeys, flattedData]);\n // Get all checkbox props\n const checkboxPropsMap = (0, _react.useMemo)(() => {\n const map = new Map();\n flattedData.forEach((record, index) => {\n const key = getRowKey(record, index);\n const checkboxProps = (getCheckboxProps ? getCheckboxProps(record) : null) || {};\n map.set(key, checkboxProps);\n process.env.NODE_ENV !== \"production\" ? warning(!('checked' in checkboxProps || 'defaultChecked' in checkboxProps), 'usage', 'Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.') : void 0;\n });\n return map;\n }, [flattedData, getRowKey, getCheckboxProps]);\n const isCheckboxDisabled = (0, _react.useCallback)(r => {\n var _a;\n return !!((_a = checkboxPropsMap.get(getRowKey(r))) === null || _a === void 0 ? void 0 : _a.disabled);\n }, [checkboxPropsMap, getRowKey]);\n const [derivedSelectedKeys, derivedHalfSelectedKeys] = (0, _react.useMemo)(() => {\n if (checkStrictly) {\n return [mergedSelectedKeys || [], []];\n }\n const {\n checkedKeys,\n halfCheckedKeys\n } = (0, _conductUtil.conductCheck)(mergedSelectedKeys, true, keyEntities, isCheckboxDisabled);\n return [checkedKeys || [], halfCheckedKeys];\n }, [mergedSelectedKeys, checkStrictly, keyEntities, isCheckboxDisabled]);\n const derivedSelectedKeySet = (0, _react.useMemo)(() => {\n const keys = selectionType === 'radio' ? derivedSelectedKeys.slice(0, 1) : derivedSelectedKeys;\n return new Set(keys);\n }, [derivedSelectedKeys, selectionType]);\n const derivedHalfSelectedKeySet = (0, _react.useMemo)(() => selectionType === 'radio' ? new Set() : new Set(derivedHalfSelectedKeys), [derivedHalfSelectedKeys, selectionType]);\n // Reset if rowSelection reset\n React.useEffect(() => {\n if (!rowSelection) {\n setMergedSelectedKeys(EMPTY_LIST);\n }\n }, [!!rowSelection]);\n const setSelectedKeys = (0, _react.useCallback)((keys, method) => {\n let availableKeys;\n let records;\n updatePreserveRecordsCache(keys);\n if (preserveSelectedRowKeys) {\n availableKeys = keys;\n records = keys.map(key => preserveRecordsRef.current.get(key));\n } else {\n // Filter key which not exist in the `dataSource`\n availableKeys = [];\n records = [];\n keys.forEach(key => {\n const record = getRecordByKey(key);\n if (record !== undefined) {\n availableKeys.push(key);\n records.push(record);\n }\n });\n }\n setMergedSelectedKeys(availableKeys);\n onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(availableKeys, records, {\n type: method\n });\n }, [setMergedSelectedKeys, getRecordByKey, onSelectionChange, preserveSelectedRowKeys]);\n // ====================== Selections ======================\n // Trigger single `onSelect` event\n const triggerSingleSelection = (0, _react.useCallback)((key, selected, keys, event) => {\n if (onSelect) {\n const rows = keys.map(k => getRecordByKey(k));\n onSelect(getRecordByKey(key), selected, rows, event);\n }\n setSelectedKeys(keys, 'single');\n }, [onSelect, getRecordByKey, setSelectedKeys]);\n const mergedSelections = (0, _react.useMemo)(() => {\n if (!selections || hideSelectAll) {\n return null;\n }\n const selectionList = selections === true ? [SELECTION_ALL, SELECTION_INVERT, SELECTION_NONE] : selections;\n return selectionList.map(selection => {\n if (selection === SELECTION_ALL) {\n return {\n key: 'all',\n text: tableLocale.selectionAll,\n onSelect() {\n setSelectedKeys(data.map((record, index) => getRowKey(record, index)).filter(key => {\n const checkProps = checkboxPropsMap.get(key);\n return !(checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled) || derivedSelectedKeySet.has(key);\n }), 'all');\n }\n };\n }\n if (selection === SELECTION_INVERT) {\n return {\n key: 'invert',\n text: tableLocale.selectInvert,\n onSelect() {\n const keySet = new Set(derivedSelectedKeySet);\n pageData.forEach((record, index) => {\n const key = getRowKey(record, index);\n const checkProps = checkboxPropsMap.get(key);\n if (!(checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled)) {\n if (keySet.has(key)) {\n keySet.delete(key);\n } else {\n keySet.add(key);\n }\n }\n });\n const keys = Array.from(keySet);\n if (onSelectInvert) {\n warning.deprecated(false, 'onSelectInvert', 'onChange');\n onSelectInvert(keys);\n }\n setSelectedKeys(keys, 'invert');\n }\n };\n }\n if (selection === SELECTION_NONE) {\n return {\n key: 'none',\n text: tableLocale.selectNone,\n onSelect() {\n onSelectNone === null || onSelectNone === void 0 ? void 0 : onSelectNone();\n setSelectedKeys(Array.from(derivedSelectedKeySet).filter(key => {\n const checkProps = checkboxPropsMap.get(key);\n return checkProps === null || checkProps === void 0 ? void 0 : checkProps.disabled;\n }), 'none');\n }\n };\n }\n return selection;\n }).map(selection => Object.assign(Object.assign({}, selection), {\n onSelect: function () {\n var _a2;\n var _a;\n for (var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++) {\n rest[_key] = arguments[_key];\n }\n (_a = selection.onSelect) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [selection].concat(rest));\n updatePrevSelectedIndex(null);\n }\n }));\n }, [selections, derivedSelectedKeySet, pageData, getRowKey, onSelectInvert, setSelectedKeys]);\n // ======================= Columns ========================\n const transformColumns = (0, _react.useCallback)(columns => {\n var _a;\n // >>>>>>>>>>> Skip if not exists `rowSelection`\n if (!rowSelection) {\n process.env.NODE_ENV !== \"production\" ? warning(!columns.includes(SELECTION_COLUMN), 'usage', '`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`.') : void 0;\n return columns.filter(col => col !== SELECTION_COLUMN);\n }\n // >>>>>>>>>>> Support selection\n let cloneColumns = (0, _toConsumableArray2.default)(columns);\n const keySet = new Set(derivedSelectedKeySet);\n // Record key only need check with enabled\n const recordKeys = flattedData.map(getRowKey).filter(key => !checkboxPropsMap.get(key).disabled);\n const checkedCurrentAll = recordKeys.every(key => keySet.has(key));\n const checkedCurrentSome = recordKeys.some(key => keySet.has(key));\n const onSelectAllChange = () => {\n const changeKeys = [];\n if (checkedCurrentAll) {\n recordKeys.forEach(key => {\n keySet.delete(key);\n changeKeys.push(key);\n });\n } else {\n recordKeys.forEach(key => {\n if (!keySet.has(key)) {\n keySet.add(key);\n changeKeys.push(key);\n }\n });\n }\n const keys = Array.from(keySet);\n onSelectAll === null || onSelectAll === void 0 ? void 0 : onSelectAll(!checkedCurrentAll, keys.map(k => getRecordByKey(k)), changeKeys.map(k => getRecordByKey(k)));\n setSelectedKeys(keys, 'all');\n updatePrevSelectedIndex(null);\n };\n // ===================== Render =====================\n // Title Cell\n let title;\n let columnTitleCheckbox;\n if (selectionType !== 'radio') {\n let customizeSelections;\n if (mergedSelections) {\n const menu = {\n getPopupContainer,\n items: mergedSelections.map((selection, index) => {\n const {\n key,\n text,\n onSelect: onSelectionClick\n } = selection;\n return {\n key: key !== null && key !== void 0 ? key : index,\n onClick: () => {\n onSelectionClick === null || onSelectionClick === void 0 ? void 0 : onSelectionClick(recordKeys);\n },\n label: text\n };\n })\n };\n customizeSelections = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-selection-extra`\n }, /*#__PURE__*/React.createElement(_dropdown.default, {\n menu: menu,\n getPopupContainer: getPopupContainer\n }, /*#__PURE__*/React.createElement(\"span\", null, /*#__PURE__*/React.createElement(_DownOutlined.default, null))));\n }\n const allDisabledData = flattedData.map((record, index) => {\n const key = getRowKey(record, index);\n const checkboxProps = checkboxPropsMap.get(key) || {};\n return Object.assign({\n checked: keySet.has(key)\n }, checkboxProps);\n }).filter(_ref2 => {\n let {\n disabled\n } = _ref2;\n return disabled;\n });\n const allDisabled = !!allDisabledData.length && allDisabledData.length === flattedData.length;\n const allDisabledAndChecked = allDisabled && allDisabledData.every(_ref3 => {\n let {\n checked\n } = _ref3;\n return checked;\n });\n const allDisabledSomeChecked = allDisabled && allDisabledData.some(_ref4 => {\n let {\n checked\n } = _ref4;\n return checked;\n });\n columnTitleCheckbox = /*#__PURE__*/React.createElement(_checkbox.default, {\n checked: !allDisabled ? !!flattedData.length && checkedCurrentAll : allDisabledAndChecked,\n indeterminate: !allDisabled ? !checkedCurrentAll && checkedCurrentSome : !allDisabledAndChecked && allDisabledSomeChecked,\n onChange: onSelectAllChange,\n disabled: flattedData.length === 0 || allDisabled,\n \"aria-label\": customizeSelections ? 'Custom selection' : 'Select all',\n skipGroup: true\n });\n title = !hideSelectAll && (/*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-selection`\n }, columnTitleCheckbox, customizeSelections));\n }\n // Body Cell\n let renderCell;\n if (selectionType === 'radio') {\n renderCell = (_, record, index) => {\n const key = getRowKey(record, index);\n const checked = keySet.has(key);\n return {\n node: (/*#__PURE__*/React.createElement(_radio.default, Object.assign({}, checkboxPropsMap.get(key), {\n checked: checked,\n onClick: e => e.stopPropagation(),\n onChange: event => {\n if (!keySet.has(key)) {\n triggerSingleSelection(key, true, [key], event.nativeEvent);\n }\n }\n }))),\n checked\n };\n };\n } else {\n renderCell = (_, record, index) => {\n var _a;\n const key = getRowKey(record, index);\n const checked = keySet.has(key);\n const indeterminate = derivedHalfSelectedKeySet.has(key);\n const checkboxProps = checkboxPropsMap.get(key);\n let mergedIndeterminate;\n if (expandType === 'nest') {\n mergedIndeterminate = indeterminate;\n process.env.NODE_ENV !== \"production\" ? warning(typeof (checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== 'boolean', 'usage', 'set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.') : void 0;\n } else {\n mergedIndeterminate = (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.indeterminate) !== null && _a !== void 0 ? _a : indeterminate;\n }\n // Record checked\n return {\n node: (/*#__PURE__*/React.createElement(_checkbox.default, Object.assign({}, checkboxProps, {\n indeterminate: mergedIndeterminate,\n checked: checked,\n skipGroup: true,\n onClick: e => e.stopPropagation(),\n onChange: _ref5 => {\n let {\n nativeEvent\n } = _ref5;\n const {\n shiftKey\n } = nativeEvent;\n const currentSelectedIndex = recordKeys.findIndex(item => item === key);\n const isMultiple = derivedSelectedKeys.some(item => recordKeys.includes(item));\n if (shiftKey && checkStrictly && isMultiple) {\n const changedKeys = multipleSelect(currentSelectedIndex, recordKeys, keySet);\n const keys = Array.from(keySet);\n onSelectMultiple === null || onSelectMultiple === void 0 ? void 0 : onSelectMultiple(!checked, keys.map(recordKey => getRecordByKey(recordKey)), changedKeys.map(recordKey => getRecordByKey(recordKey)));\n setSelectedKeys(keys, 'multiple');\n } else {\n // Single record selected\n const originCheckedKeys = derivedSelectedKeys;\n if (checkStrictly) {\n const checkedKeys = checked ? (0, _util.arrDel)(originCheckedKeys, key) : (0, _util.arrAdd)(originCheckedKeys, key);\n triggerSingleSelection(key, !checked, checkedKeys, nativeEvent);\n } else {\n // Always fill first\n const result = (0, _conductUtil.conductCheck)([].concat((0, _toConsumableArray2.default)(originCheckedKeys), [key]), true, keyEntities, isCheckboxDisabled);\n const {\n checkedKeys,\n halfCheckedKeys\n } = result;\n let nextCheckedKeys = checkedKeys;\n // If remove, we do it again to correction\n if (checked) {\n const tempKeySet = new Set(checkedKeys);\n tempKeySet.delete(key);\n nextCheckedKeys = (0, _conductUtil.conductCheck)(Array.from(tempKeySet), {\n checked: false,\n halfCheckedKeys\n }, keyEntities, isCheckboxDisabled).checkedKeys;\n }\n triggerSingleSelection(key, !checked, nextCheckedKeys, nativeEvent);\n }\n }\n if (checked) {\n updatePrevSelectedIndex(null);\n } else {\n updatePrevSelectedIndex(currentSelectedIndex);\n }\n }\n }))),\n checked\n };\n };\n }\n const renderSelectionCell = (_, record, index) => {\n const {\n node,\n checked\n } = renderCell(_, record, index);\n if (customizeRenderCell) {\n return customizeRenderCell(checked, record, index, node);\n }\n return node;\n };\n // Insert selection column if not exist\n if (!cloneColumns.includes(SELECTION_COLUMN)) {\n // Always after expand icon\n if (cloneColumns.findIndex(col => {\n var _a;\n return ((_a = col[_rcTable.INTERNAL_COL_DEFINE]) === null || _a === void 0 ? void 0 : _a.columnType) === 'EXPAND_COLUMN';\n }) === 0) {\n const [expandColumn, ...restColumns] = cloneColumns;\n cloneColumns = [expandColumn, SELECTION_COLUMN].concat((0, _toConsumableArray2.default)(restColumns));\n } else {\n // Normal insert at first column\n cloneColumns = [SELECTION_COLUMN].concat((0, _toConsumableArray2.default)(cloneColumns));\n }\n }\n // Deduplicate selection column\n const selectionColumnIndex = cloneColumns.indexOf(SELECTION_COLUMN);\n process.env.NODE_ENV !== \"production\" ? warning(cloneColumns.filter(col => col === SELECTION_COLUMN).length <= 1, 'usage', 'Multiple `SELECTION_COLUMN` exist in `columns`.') : void 0;\n cloneColumns = cloneColumns.filter((column, index) => column !== SELECTION_COLUMN || index === selectionColumnIndex);\n // Fixed column logic\n const prevCol = cloneColumns[selectionColumnIndex - 1];\n const nextCol = cloneColumns[selectionColumnIndex + 1];\n let mergedFixed = fixed;\n if (mergedFixed === undefined) {\n if ((nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed) !== undefined) {\n mergedFixed = nextCol.fixed;\n } else if ((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) !== undefined) {\n mergedFixed = prevCol.fixed;\n }\n }\n if (mergedFixed && prevCol && ((_a = prevCol[_rcTable.INTERNAL_COL_DEFINE]) === null || _a === void 0 ? void 0 : _a.columnType) === 'EXPAND_COLUMN' && prevCol.fixed === undefined) {\n prevCol.fixed = mergedFixed;\n }\n const columnCls = (0, _classnames.default)(`${prefixCls}-selection-col`, {\n [`${prefixCls}-selection-col-with-dropdown`]: selections && selectionType === 'checkbox'\n });\n const renderColumnTitle = () => {\n if (!(rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.columnTitle)) {\n return title;\n }\n if (typeof rowSelection.columnTitle === 'function') {\n return rowSelection.columnTitle(columnTitleCheckbox);\n }\n return rowSelection.columnTitle;\n };\n // Replace with real selection column\n const selectionColumn = {\n fixed: mergedFixed,\n width: selectionColWidth,\n className: `${prefixCls}-selection-column`,\n title: renderColumnTitle(),\n render: renderSelectionCell,\n onCell: rowSelection.onCell,\n [_rcTable.INTERNAL_COL_DEFINE]: {\n className: columnCls\n }\n };\n return cloneColumns.map(col => col === SELECTION_COLUMN ? selectionColumn : col);\n }, [getRowKey, flattedData, rowSelection, derivedSelectedKeys, derivedSelectedKeySet, derivedHalfSelectedKeySet, selectionColWidth, mergedSelections, expandType, checkboxPropsMap, onSelectMultiple, triggerSingleSelection, isCheckboxDisabled]);\n return [transformColumns, derivedSelectedKeySet];\n};\nvar _default = exports.default = useSelection;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getSortData = exports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CaretDownOutlined = _interopRequireDefault(require(\"@ant-design/icons/CaretDownOutlined\"));\nvar _CaretUpOutlined = _interopRequireDefault(require(\"@ant-design/icons/CaretUpOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _KeyCode = _interopRequireDefault(require(\"rc-util/lib/KeyCode\"));\nvar _tooltip = _interopRequireDefault(require(\"../../tooltip\"));\nvar _util = require(\"../util\");\nconst ASCEND = 'ascend';\nconst DESCEND = 'descend';\nconst getMultiplePriority = column => {\n if (typeof column.sorter === 'object' && typeof column.sorter.multiple === 'number') {\n return column.sorter.multiple;\n }\n return false;\n};\nconst getSortFunction = sorter => {\n if (typeof sorter === 'function') {\n return sorter;\n }\n if (sorter && typeof sorter === 'object' && sorter.compare) {\n return sorter.compare;\n }\n return false;\n};\nconst nextSortDirection = (sortDirections, current) => {\n if (!current) {\n return sortDirections[0];\n }\n return sortDirections[sortDirections.indexOf(current) + 1];\n};\nconst collectSortStates = (columns, init, pos) => {\n let sortStates = [];\n const pushState = (column, columnPos) => {\n sortStates.push({\n column,\n key: (0, _util.getColumnKey)(column, columnPos),\n multiplePriority: getMultiplePriority(column),\n sortOrder: column.sortOrder\n });\n };\n (columns || []).forEach((column, index) => {\n const columnPos = (0, _util.getColumnPos)(index, pos);\n if (column.children) {\n if ('sortOrder' in column) {\n // Controlled\n pushState(column, columnPos);\n }\n sortStates = [].concat((0, _toConsumableArray2.default)(sortStates), (0, _toConsumableArray2.default)(collectSortStates(column.children, init, columnPos)));\n } else if (column.sorter) {\n if ('sortOrder' in column) {\n // Controlled\n pushState(column, columnPos);\n } else if (init && column.defaultSortOrder) {\n // Default sorter\n sortStates.push({\n column,\n key: (0, _util.getColumnKey)(column, columnPos),\n multiplePriority: getMultiplePriority(column),\n sortOrder: column.defaultSortOrder\n });\n }\n }\n });\n return sortStates;\n};\nconst injectSorter = (prefixCls, columns, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, pos) => {\n const finalColumns = (columns || []).map((column, index) => {\n const columnPos = (0, _util.getColumnPos)(index, pos);\n let newColumn = column;\n if (newColumn.sorter) {\n const sortDirections = newColumn.sortDirections || defaultSortDirections;\n const showSorterTooltip = newColumn.showSorterTooltip === undefined ? tableShowSorterTooltip : newColumn.showSorterTooltip;\n const columnKey = (0, _util.getColumnKey)(newColumn, columnPos);\n const sorterState = sorterStates.find(_ref => {\n let {\n key\n } = _ref;\n return key === columnKey;\n });\n const sortOrder = sorterState ? sorterState.sortOrder : null;\n const nextSortOrder = nextSortDirection(sortDirections, sortOrder);\n let sorter;\n if (column.sortIcon) {\n sorter = column.sortIcon({\n sortOrder\n });\n } else {\n const upNode = sortDirections.includes(ASCEND) && (/*#__PURE__*/React.createElement(_CaretUpOutlined.default, {\n className: (0, _classnames.default)(`${prefixCls}-column-sorter-up`, {\n active: sortOrder === ASCEND\n })\n }));\n const downNode = sortDirections.includes(DESCEND) && (/*#__PURE__*/React.createElement(_CaretDownOutlined.default, {\n className: (0, _classnames.default)(`${prefixCls}-column-sorter-down`, {\n active: sortOrder === DESCEND\n })\n }));\n sorter = /*#__PURE__*/React.createElement(\"span\", {\n className: (0, _classnames.default)(`${prefixCls}-column-sorter`, {\n [`${prefixCls}-column-sorter-full`]: !!(upNode && downNode)\n })\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-column-sorter-inner`,\n \"aria-hidden\": \"true\"\n }, upNode, downNode));\n }\n const {\n cancelSort,\n triggerAsc,\n triggerDesc\n } = tableLocale || {};\n let sortTip = cancelSort;\n if (nextSortOrder === DESCEND) {\n sortTip = triggerDesc;\n } else if (nextSortOrder === ASCEND) {\n sortTip = triggerAsc;\n }\n const tooltipProps = typeof showSorterTooltip === 'object' ? Object.assign({\n title: sortTip\n }, showSorterTooltip) : {\n title: sortTip\n };\n newColumn = Object.assign(Object.assign({}, newColumn), {\n className: (0, _classnames.default)(newColumn.className, {\n [`${prefixCls}-column-sort`]: sortOrder\n }),\n title: renderProps => {\n const columnSortersClass = `${prefixCls}-column-sorters`;\n const renderColumnTitleWrapper = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-column-title`\n }, (0, _util.renderColumnTitle)(column.title, renderProps));\n const renderSortTitle = /*#__PURE__*/React.createElement(\"div\", {\n className: columnSortersClass\n }, renderColumnTitleWrapper, sorter);\n if (showSorterTooltip) {\n if (typeof showSorterTooltip !== 'boolean' && (showSorterTooltip === null || showSorterTooltip === void 0 ? void 0 : showSorterTooltip.target) === 'sorter-icon') {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${columnSortersClass} ${prefixCls}-column-sorters-tooltip-target-sorter`\n }, renderColumnTitleWrapper, /*#__PURE__*/React.createElement(_tooltip.default, Object.assign({}, tooltipProps), sorter));\n }\n return /*#__PURE__*/React.createElement(_tooltip.default, Object.assign({}, tooltipProps), renderSortTitle);\n }\n return renderSortTitle;\n },\n onHeaderCell: col => {\n var _a;\n const cell = ((_a = column.onHeaderCell) === null || _a === void 0 ? void 0 : _a.call(column, col)) || {};\n const originOnClick = cell.onClick;\n const originOKeyDown = cell.onKeyDown;\n cell.onClick = event => {\n triggerSorter({\n column,\n key: columnKey,\n sortOrder: nextSortOrder,\n multiplePriority: getMultiplePriority(column)\n });\n originOnClick === null || originOnClick === void 0 ? void 0 : originOnClick(event);\n };\n cell.onKeyDown = event => {\n if (event.keyCode === _KeyCode.default.ENTER) {\n triggerSorter({\n column,\n key: columnKey,\n sortOrder: nextSortOrder,\n multiplePriority: getMultiplePriority(column)\n });\n originOKeyDown === null || originOKeyDown === void 0 ? void 0 : originOKeyDown(event);\n }\n };\n const renderTitle = (0, _util.safeColumnTitle)(column.title, {});\n const displayTitle = renderTitle === null || renderTitle === void 0 ? void 0 : renderTitle.toString();\n // Inform the screen-reader so it can tell the visually impaired user which column is sorted\n if (sortOrder) {\n cell['aria-sort'] = sortOrder === 'ascend' ? 'ascending' : 'descending';\n } else {\n cell['aria-label'] = displayTitle || '';\n }\n cell.className = (0, _classnames.default)(cell.className, `${prefixCls}-column-has-sorters`);\n cell.tabIndex = 0;\n if (column.ellipsis) {\n cell.title = (renderTitle !== null && renderTitle !== void 0 ? renderTitle : '').toString();\n }\n return cell;\n }\n });\n }\n if ('children' in newColumn) {\n newColumn = Object.assign(Object.assign({}, newColumn), {\n children: injectSorter(prefixCls, newColumn.children, sorterStates, triggerSorter, defaultSortDirections, tableLocale, tableShowSorterTooltip, columnPos)\n });\n }\n return newColumn;\n });\n return finalColumns;\n};\nconst stateToInfo = sorterState => {\n const {\n column,\n sortOrder\n } = sorterState;\n return {\n column,\n order: sortOrder,\n field: column.dataIndex,\n columnKey: column.key\n };\n};\nconst generateSorterInfo = sorterStates => {\n const activeSorters = sorterStates.filter(_ref2 => {\n let {\n sortOrder\n } = _ref2;\n return sortOrder;\n }).map(stateToInfo);\n // =========== Legacy compatible support ===========\n // https://github.com/ant-design/ant-design/pull/19226\n if (activeSorters.length === 0 && sorterStates.length) {\n const lastIndex = sorterStates.length - 1;\n return Object.assign(Object.assign({}, stateToInfo(sorterStates[lastIndex])), {\n column: undefined,\n order: undefined,\n field: undefined,\n columnKey: undefined\n });\n }\n if (activeSorters.length <= 1) {\n return activeSorters[0] || {};\n }\n return activeSorters;\n};\nconst getSortData = (data, sortStates, childrenColumnName) => {\n const innerSorterStates = sortStates.slice().sort((a, b) => b.multiplePriority - a.multiplePriority);\n const cloneData = data.slice();\n const runningSorters = innerSorterStates.filter(_ref3 => {\n let {\n column: {\n sorter\n },\n sortOrder\n } = _ref3;\n return getSortFunction(sorter) && sortOrder;\n });\n // Skip if no sorter needed\n if (!runningSorters.length) {\n return cloneData;\n }\n return cloneData.sort((record1, record2) => {\n for (let i = 0; i < runningSorters.length; i += 1) {\n const sorterState = runningSorters[i];\n const {\n column: {\n sorter\n },\n sortOrder\n } = sorterState;\n const compareFn = getSortFunction(sorter);\n if (compareFn && sortOrder) {\n const compareResult = compareFn(record1, record2, sortOrder);\n if (compareResult !== 0) {\n return sortOrder === ASCEND ? compareResult : -compareResult;\n }\n }\n }\n return 0;\n }).map(record => {\n const subRecords = record[childrenColumnName];\n if (subRecords) {\n return Object.assign(Object.assign({}, record), {\n [childrenColumnName]: getSortData(subRecords, sortStates, childrenColumnName)\n });\n }\n return record;\n });\n};\nexports.getSortData = getSortData;\nconst useFilterSorter = props => {\n const {\n prefixCls,\n mergedColumns,\n sortDirections,\n tableLocale,\n showSorterTooltip,\n onSorterChange\n } = props;\n const [sortStates, setSortStates] = React.useState(collectSortStates(mergedColumns, true));\n const getColumnKeys = (columns, pos) => {\n const newKeys = [];\n columns.forEach((item, index) => {\n const columnPos = (0, _util.getColumnPos)(index, pos);\n newKeys.push((0, _util.getColumnKey)(item, columnPos));\n if (Array.isArray(item.children)) {\n const childKeys = getColumnKeys(item.children, columnPos);\n newKeys.push.apply(newKeys, (0, _toConsumableArray2.default)(childKeys));\n }\n });\n return newKeys;\n };\n const mergedSorterStates = React.useMemo(() => {\n let validate = true;\n const collectedStates = collectSortStates(mergedColumns, false);\n // Return if not controlled\n if (!collectedStates.length) {\n const mergedColumnsKeys = getColumnKeys(mergedColumns);\n return sortStates.filter(_ref4 => {\n let {\n key\n } = _ref4;\n return mergedColumnsKeys.includes(key);\n });\n }\n const validateStates = [];\n function patchStates(state) {\n if (validate) {\n validateStates.push(state);\n } else {\n validateStates.push(Object.assign(Object.assign({}, state), {\n sortOrder: null\n }));\n }\n }\n let multipleMode = null;\n collectedStates.forEach(state => {\n if (multipleMode === null) {\n patchStates(state);\n if (state.sortOrder) {\n if (state.multiplePriority === false) {\n validate = false;\n } else {\n multipleMode = true;\n }\n }\n } else if (multipleMode && state.multiplePriority !== false) {\n patchStates(state);\n } else {\n validate = false;\n patchStates(state);\n }\n });\n return validateStates;\n }, [mergedColumns, sortStates]);\n // Get render columns title required props\n const columnTitleSorterProps = React.useMemo(() => {\n var _a, _b;\n const sortColumns = mergedSorterStates.map(_ref5 => {\n let {\n column,\n sortOrder\n } = _ref5;\n return {\n column,\n order: sortOrder\n };\n });\n return {\n sortColumns,\n // Legacy\n sortColumn: (_a = sortColumns[0]) === null || _a === void 0 ? void 0 : _a.column,\n sortOrder: (_b = sortColumns[0]) === null || _b === void 0 ? void 0 : _b.order\n };\n }, [mergedSorterStates]);\n const triggerSorter = sortState => {\n let newSorterStates;\n if (sortState.multiplePriority === false || !mergedSorterStates.length || mergedSorterStates[0].multiplePriority === false) {\n newSorterStates = [sortState];\n } else {\n newSorterStates = [].concat((0, _toConsumableArray2.default)(mergedSorterStates.filter(_ref6 => {\n let {\n key\n } = _ref6;\n return key !== sortState.key;\n })), [sortState]);\n }\n setSortStates(newSorterStates);\n onSorterChange(generateSorterInfo(newSorterStates), newSorterStates);\n };\n const transformColumns = innerColumns => injectSorter(prefixCls, innerColumns, mergedSorterStates, triggerSorter, sortDirections, tableLocale, showSorterTooltip);\n const getSorters = () => generateSorterInfo(mergedSorterStates);\n return [transformColumns, mergedSorterStates, columnTitleSorterProps, getSorters];\n};\nvar _default = exports.default = useFilterSorter;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _util = require(\"../util\");\nconst fillTitle = (columns, columnTitleProps) => {\n const finalColumns = columns.map(column => {\n const cloneColumn = Object.assign({}, column);\n cloneColumn.title = (0, _util.renderColumnTitle)(column.title, columnTitleProps);\n if ('children' in cloneColumn) {\n cloneColumn.children = fillTitle(cloneColumn.children, columnTitleProps);\n }\n return cloneColumn;\n });\n return finalColumns;\n};\nconst useTitleColumns = columnTitleProps => {\n const filledColumns = React.useCallback(columns => fillTitle(columns, columnTitleProps), [columnTitleProps]);\n return [filledColumns];\n};\nvar _default = exports.default = useTitleColumns;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Table = _interopRequireDefault(require(\"./Table\"));\nvar _default = exports.default = _Table.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genBorderedStyle = token => {\n const {\n componentCls,\n lineWidth,\n lineType,\n tableBorderColor,\n tableHeaderBg,\n tablePaddingVertical,\n tablePaddingHorizontal,\n calc\n } = token;\n const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;\n const getSizeBorderStyle = (size, paddingVertical, paddingHorizontal) => ({\n [`&${componentCls}-${size}`]: {\n [`> ${componentCls}-container`]: {\n [`> ${componentCls}-content, > ${componentCls}-body`]: {\n [`\n > table > tbody > tr > th,\n > table > tbody > tr > td\n `]: {\n [`> ${componentCls}-expanded-row-fixed`]: {\n margin: `${(0, _cssinjs.unit)(calc(paddingVertical).mul(-1).equal())}\n ${(0, _cssinjs.unit)(calc(calc(paddingHorizontal).add(lineWidth)).mul(-1).equal())}`\n }\n }\n }\n }\n }\n });\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}${componentCls}-bordered`]: Object.assign(Object.assign(Object.assign({\n // ============================ Title =============================\n [`> ${componentCls}-title`]: {\n border: tableBorder,\n borderBottom: 0\n },\n // ============================ Content ============================\n [`> ${componentCls}-container`]: {\n borderInlineStart: tableBorder,\n borderTop: tableBorder,\n [`\n > ${componentCls}-content,\n > ${componentCls}-header,\n > ${componentCls}-body,\n > ${componentCls}-summary\n `]: {\n '> table': {\n // ============================= Cell =============================\n [`\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n `]: {\n borderInlineEnd: tableBorder\n },\n // ============================ Header ============================\n '> thead': {\n '> tr:not(:last-child) > th': {\n borderBottom: tableBorder\n },\n '> tr > th::before': {\n backgroundColor: 'transparent !important'\n }\n },\n // Fixed right should provides additional border\n [`\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n `]: {\n [`> ${componentCls}-cell-fix-right-first::after`]: {\n borderInlineEnd: tableBorder\n }\n },\n // ========================== Expandable ==========================\n [`\n > tbody > tr > th,\n > tbody > tr > td\n `]: {\n [`> ${componentCls}-expanded-row-fixed`]: {\n margin: `${(0, _cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal())} ${(0, _cssinjs.unit)(calc(calc(tablePaddingHorizontal).add(lineWidth)).mul(-1).equal())}`,\n '&::after': {\n position: 'absolute',\n top: 0,\n insetInlineEnd: lineWidth,\n bottom: 0,\n borderInlineEnd: tableBorder,\n content: '\"\"'\n }\n }\n }\n }\n }\n },\n // ============================ Scroll ============================\n [`&${componentCls}-scroll-horizontal`]: {\n [`> ${componentCls}-container > ${componentCls}-body`]: {\n '> table > tbody': {\n [`\n > tr${componentCls}-expanded-row,\n > tr${componentCls}-placeholder\n `]: {\n '> th, > td': {\n borderInlineEnd: 0\n }\n }\n }\n }\n }\n }, getSizeBorderStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle)), getSizeBorderStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall)), {\n // ============================ Footer ============================\n [`> ${componentCls}-footer`]: {\n border: tableBorder,\n borderTop: 0\n }\n }),\n // ============================ Nested ============================\n [`${componentCls}-cell`]: {\n [`${componentCls}-container:first-child`]: {\n // :first-child to avoid the case when bordered and title is set\n borderTop: 0\n },\n // https://github.com/ant-design/ant-design/issues/35577\n '&-scrollbar:not([rowspan])': {\n boxShadow: `0 ${(0, _cssinjs.unit)(lineWidth)} 0 ${(0, _cssinjs.unit)(lineWidth)} ${tableHeaderBg}`\n }\n },\n [`${componentCls}-bordered ${componentCls}-cell-scrollbar`]: {\n borderInlineEnd: tableBorder\n }\n }\n };\n};\nvar _default = exports.default = genBorderedStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _style = require(\"../../style\");\nconst genEllipsisStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-cell-ellipsis`]: Object.assign(Object.assign({}, _style.textEllipsis), {\n wordBreak: 'keep-all',\n // Fixed first or last should special process\n [`\n &${componentCls}-cell-fix-left-last,\n &${componentCls}-cell-fix-right-first\n `]: {\n overflow: 'visible',\n [`${componentCls}-cell-content`]: {\n display: 'block',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n }\n },\n [`${componentCls}-column-title`]: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n wordBreak: 'keep-all'\n }\n })\n }\n };\n};\nvar _default = exports.default = genEllipsisStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// ========================= Placeholder ==========================\nconst genEmptyStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-tbody > tr${componentCls}-placeholder`]: {\n textAlign: 'center',\n color: token.colorTextDisabled,\n [`\n &:hover > th,\n &:hover > td,\n `]: {\n background: token.colorBgContainer\n }\n }\n }\n };\n};\nvar _default = exports.default = genEmptyStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nconst genExpandStyle = token => {\n const {\n componentCls,\n antCls,\n motionDurationSlow,\n lineWidth,\n paddingXS,\n lineType,\n tableBorderColor,\n tableExpandIconBg,\n tableExpandColumnWidth,\n borderRadius,\n tablePaddingVertical,\n tablePaddingHorizontal,\n tableExpandedRowBg,\n paddingXXS,\n expandIconMarginTop,\n expandIconSize,\n expandIconHalfInner,\n expandIconScale,\n calc\n } = token;\n const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;\n const expandIconLineOffset = calc(paddingXXS).sub(lineWidth).equal();\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-expand-icon-col`]: {\n width: tableExpandColumnWidth\n },\n [`${componentCls}-row-expand-icon-cell`]: {\n textAlign: 'center',\n [`${componentCls}-row-expand-icon`]: {\n display: 'inline-flex',\n float: 'none',\n verticalAlign: 'sub'\n }\n },\n [`${componentCls}-row-indent`]: {\n height: 1,\n float: 'left'\n },\n [`${componentCls}-row-expand-icon`]: Object.assign(Object.assign({}, (0, _style.operationUnit)(token)), {\n position: 'relative',\n float: 'left',\n width: expandIconSize,\n height: expandIconSize,\n color: 'inherit',\n lineHeight: (0, _cssinjs.unit)(expandIconSize),\n background: tableExpandIconBg,\n border: tableBorder,\n borderRadius,\n transform: `scale(${expandIconScale})`,\n '&:focus, &:hover, &:active': {\n borderColor: 'currentcolor'\n },\n '&::before, &::after': {\n position: 'absolute',\n background: 'currentcolor',\n transition: `transform ${motionDurationSlow} ease-out`,\n content: '\"\"'\n },\n '&::before': {\n top: expandIconHalfInner,\n insetInlineEnd: expandIconLineOffset,\n insetInlineStart: expandIconLineOffset,\n height: lineWidth\n },\n '&::after': {\n top: expandIconLineOffset,\n bottom: expandIconLineOffset,\n insetInlineStart: expandIconHalfInner,\n width: lineWidth,\n transform: 'rotate(90deg)'\n },\n // Motion effect\n '&-collapsed::before': {\n transform: 'rotate(-180deg)'\n },\n '&-collapsed::after': {\n transform: 'rotate(0deg)'\n },\n '&-spaced': {\n '&::before, &::after': {\n display: 'none',\n content: 'none'\n },\n background: 'transparent',\n border: 0,\n visibility: 'hidden'\n }\n }),\n [`${componentCls}-row-indent + ${componentCls}-row-expand-icon`]: {\n marginTop: expandIconMarginTop,\n marginInlineEnd: paddingXS\n },\n [`tr${componentCls}-expanded-row`]: {\n '&, &:hover': {\n '> th, > td': {\n background: tableExpandedRowBg\n }\n },\n // https://github.com/ant-design/ant-design/issues/25573\n [`${antCls}-descriptions-view`]: {\n display: 'flex',\n table: {\n flex: 'auto',\n width: '100%'\n }\n }\n },\n // With fixed\n [`${componentCls}-expanded-row-fixed`]: {\n position: 'relative',\n margin: `${(0, _cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal())} ${(0, _cssinjs.unit)(calc(tablePaddingHorizontal).mul(-1).equal())}`,\n padding: `${(0, _cssinjs.unit)(tablePaddingVertical)} ${(0, _cssinjs.unit)(tablePaddingHorizontal)}`\n }\n }\n };\n};\nvar _default = exports.default = genExpandStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nconst genFilterStyle = token => {\n const {\n componentCls,\n antCls,\n iconCls,\n tableFilterDropdownWidth,\n tableFilterDropdownSearchWidth,\n paddingXXS,\n paddingXS,\n colorText,\n lineWidth,\n lineType,\n tableBorderColor,\n headerIconColor,\n fontSizeSM,\n tablePaddingHorizontal,\n borderRadius,\n motionDurationSlow,\n colorTextDescription,\n colorPrimary,\n tableHeaderFilterActiveBg,\n colorTextDisabled,\n tableFilterDropdownBg,\n tableFilterDropdownHeight,\n controlItemBgHover,\n controlItemBgActive,\n boxShadowSecondary,\n filterDropdownMenuBg,\n calc\n } = token;\n const dropdownPrefixCls = `${antCls}-dropdown`;\n const tableFilterDropdownPrefixCls = `${componentCls}-filter-dropdown`;\n const treePrefixCls = `${antCls}-tree`;\n const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;\n return [{\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-filter-column`]: {\n display: 'flex',\n justifyContent: 'space-between'\n },\n [`${componentCls}-filter-trigger`]: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n marginBlock: calc(paddingXXS).mul(-1).equal(),\n marginInline: `${(0, _cssinjs.unit)(paddingXXS)} ${(0, _cssinjs.unit)(calc(tablePaddingHorizontal).div(2).mul(-1).equal())}`,\n padding: `0 ${(0, _cssinjs.unit)(paddingXXS)}`,\n color: headerIconColor,\n fontSize: fontSizeSM,\n borderRadius,\n cursor: 'pointer',\n transition: `all ${motionDurationSlow}`,\n '&:hover': {\n color: colorTextDescription,\n background: tableHeaderFilterActiveBg\n },\n '&.active': {\n color: colorPrimary\n }\n }\n }\n }, {\n // Dropdown\n [`${antCls}-dropdown`]: {\n [tableFilterDropdownPrefixCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n minWidth: tableFilterDropdownWidth,\n backgroundColor: tableFilterDropdownBg,\n borderRadius,\n boxShadow: boxShadowSecondary,\n overflow: 'hidden',\n // Reset menu\n [`${dropdownPrefixCls}-menu`]: {\n // https://github.com/ant-design/ant-design/issues/4916\n // https://github.com/ant-design/ant-design/issues/19542\n maxHeight: tableFilterDropdownHeight,\n overflowX: 'hidden',\n border: 0,\n boxShadow: 'none',\n borderRadius: 'unset',\n backgroundColor: filterDropdownMenuBg,\n '&:empty::after': {\n display: 'block',\n padding: `${(0, _cssinjs.unit)(paddingXS)} 0`,\n color: colorTextDisabled,\n fontSize: fontSizeSM,\n textAlign: 'center',\n content: '\"Not Found\"'\n }\n },\n [`${tableFilterDropdownPrefixCls}-tree`]: {\n paddingBlock: `${(0, _cssinjs.unit)(paddingXS)} 0`,\n paddingInline: paddingXS,\n [treePrefixCls]: {\n padding: 0\n },\n [`${treePrefixCls}-treenode ${treePrefixCls}-node-content-wrapper:hover`]: {\n backgroundColor: controlItemBgHover\n },\n [`${treePrefixCls}-treenode-checkbox-checked ${treePrefixCls}-node-content-wrapper`]: {\n '&, &:hover': {\n backgroundColor: controlItemBgActive\n }\n }\n },\n [`${tableFilterDropdownPrefixCls}-search`]: {\n padding: paddingXS,\n borderBottom: tableBorder,\n '&-input': {\n input: {\n minWidth: tableFilterDropdownSearchWidth\n },\n [iconCls]: {\n color: colorTextDisabled\n }\n }\n },\n [`${tableFilterDropdownPrefixCls}-checkall`]: {\n width: '100%',\n marginBottom: paddingXXS,\n marginInlineStart: paddingXXS\n },\n // Operation\n [`${tableFilterDropdownPrefixCls}-btns`]: {\n display: 'flex',\n justifyContent: 'space-between',\n padding: `${(0, _cssinjs.unit)(calc(paddingXS).sub(lineWidth).equal())} ${(0, _cssinjs.unit)(paddingXS)}`,\n overflow: 'hidden',\n borderTop: tableBorder\n }\n })\n }\n },\n // Dropdown Menu & SubMenu\n {\n // submenu of table filter dropdown\n [`${antCls}-dropdown ${tableFilterDropdownPrefixCls}, ${tableFilterDropdownPrefixCls}-submenu`]: {\n // Checkbox\n [`${antCls}-checkbox-wrapper + span`]: {\n paddingInlineStart: paddingXS,\n color: colorText\n },\n '> ul': {\n maxHeight: 'calc(100vh - 130px)',\n overflowX: 'hidden',\n overflowY: 'auto'\n }\n }\n }];\n};\nvar _default = exports.default = genFilterStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genFixedStyle = token => {\n const {\n componentCls,\n lineWidth,\n colorSplit,\n motionDurationSlow,\n zIndexTableFixed,\n tableBg,\n zIndexTableSticky,\n calc\n } = token;\n const shadowColor = colorSplit;\n // Follow style is magic of shadow which should not follow token:\n return {\n [`${componentCls}-wrapper`]: {\n [`\n ${componentCls}-cell-fix-left,\n ${componentCls}-cell-fix-right\n `]: {\n position: 'sticky !important',\n zIndex: zIndexTableFixed,\n background: tableBg\n },\n [`\n ${componentCls}-cell-fix-left-first::after,\n ${componentCls}-cell-fix-left-last::after\n `]: {\n position: 'absolute',\n top: 0,\n right: {\n _skip_check_: true,\n value: 0\n },\n bottom: calc(lineWidth).mul(-1).equal(),\n width: 30,\n transform: 'translateX(100%)',\n transition: `box-shadow ${motionDurationSlow}`,\n content: '\"\"',\n pointerEvents: 'none'\n },\n [`${componentCls}-cell-fix-left-all::after`]: {\n display: 'none'\n },\n [`\n ${componentCls}-cell-fix-right-first::after,\n ${componentCls}-cell-fix-right-last::after\n `]: {\n position: 'absolute',\n top: 0,\n bottom: calc(lineWidth).mul(-1).equal(),\n left: {\n _skip_check_: true,\n value: 0\n },\n width: 30,\n transform: 'translateX(-100%)',\n transition: `box-shadow ${motionDurationSlow}`,\n content: '\"\"',\n pointerEvents: 'none'\n },\n [`${componentCls}-container`]: {\n position: 'relative',\n '&::before, &::after': {\n position: 'absolute',\n top: 0,\n bottom: 0,\n zIndex: calc(zIndexTableSticky).add(1).equal({\n unit: false\n }),\n width: 30,\n transition: `box-shadow ${motionDurationSlow}`,\n content: '\"\"',\n pointerEvents: 'none'\n },\n '&::before': {\n insetInlineStart: 0\n },\n '&::after': {\n insetInlineEnd: 0\n }\n },\n [`${componentCls}-ping-left`]: {\n [`&:not(${componentCls}-has-fix-left) ${componentCls}-container::before`]: {\n boxShadow: `inset 10px 0 8px -8px ${shadowColor}`\n },\n [`\n ${componentCls}-cell-fix-left-first::after,\n ${componentCls}-cell-fix-left-last::after\n `]: {\n boxShadow: `inset 10px 0 8px -8px ${shadowColor}`\n },\n [`${componentCls}-cell-fix-left-last::before`]: {\n backgroundColor: 'transparent !important'\n }\n },\n [`${componentCls}-ping-right`]: {\n [`&:not(${componentCls}-has-fix-right) ${componentCls}-container::after`]: {\n boxShadow: `inset -10px 0 8px -8px ${shadowColor}`\n },\n [`\n ${componentCls}-cell-fix-right-first::after,\n ${componentCls}-cell-fix-right-last::after\n `]: {\n boxShadow: `inset -10px 0 8px -8px ${shadowColor}`\n }\n },\n // Gapped fixed Columns do not show the shadow\n [`${componentCls}-fixed-column-gapped`]: {\n [`\n ${componentCls}-cell-fix-left-first::after,\n ${componentCls}-cell-fix-left-last::after,\n ${componentCls}-cell-fix-right-first::after,\n ${componentCls}-cell-fix-right-last::after\n `]: {\n boxShadow: 'none'\n }\n }\n }\n };\n};\nvar _default = exports.default = genFixedStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nvar _bordered = _interopRequireDefault(require(\"./bordered\"));\nvar _ellipsis = _interopRequireDefault(require(\"./ellipsis\"));\nvar _empty = _interopRequireDefault(require(\"./empty\"));\nvar _expand = _interopRequireDefault(require(\"./expand\"));\nvar _filter = _interopRequireDefault(require(\"./filter\"));\nvar _fixed = _interopRequireDefault(require(\"./fixed\"));\nvar _pagination = _interopRequireDefault(require(\"./pagination\"));\nvar _radius = _interopRequireDefault(require(\"./radius\"));\nvar _rtl = _interopRequireDefault(require(\"./rtl\"));\nvar _selection = _interopRequireDefault(require(\"./selection\"));\nvar _size = _interopRequireDefault(require(\"./size\"));\nvar _sorter = _interopRequireDefault(require(\"./sorter\"));\nvar _sticky = _interopRequireDefault(require(\"./sticky\"));\nvar _summary = _interopRequireDefault(require(\"./summary\"));\nvar _virtual = _interopRequireDefault(require(\"./virtual\"));\nconst genTableStyle = token => {\n const {\n componentCls,\n fontWeightStrong,\n tablePaddingVertical,\n tablePaddingHorizontal,\n tableExpandColumnWidth,\n lineWidth,\n lineType,\n tableBorderColor,\n tableFontSize,\n tableBg,\n tableRadius,\n tableHeaderTextColor,\n motionDurationMid,\n tableHeaderBg,\n tableHeaderCellSplitColor,\n tableFooterTextColor,\n tableFooterBg,\n calc\n } = token;\n const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;\n return {\n [`${componentCls}-wrapper`]: Object.assign(Object.assign({\n clear: 'both',\n maxWidth: '100%'\n }, (0, _style.clearFix)()), {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n fontSize: tableFontSize,\n background: tableBg,\n borderRadius: `${(0, _cssinjs.unit)(tableRadius)} ${(0, _cssinjs.unit)(tableRadius)} 0 0`,\n // https://github.com/ant-design/ant-design/issues/47486\n scrollbarColor: `${token.tableScrollThumbBg} ${token.tableScrollBg}`\n }),\n // https://github.com/ant-design/ant-design/issues/17611\n table: {\n width: '100%',\n textAlign: 'start',\n borderRadius: `${(0, _cssinjs.unit)(tableRadius)} ${(0, _cssinjs.unit)(tableRadius)} 0 0`,\n borderCollapse: 'separate',\n borderSpacing: 0\n },\n // ============================= Cell ==============================\n [`\n ${componentCls}-cell,\n ${componentCls}-thead > tr > th,\n ${componentCls}-tbody > tr > th,\n ${componentCls}-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n `]: {\n position: 'relative',\n padding: `${(0, _cssinjs.unit)(tablePaddingVertical)} ${(0, _cssinjs.unit)(tablePaddingHorizontal)}`,\n overflowWrap: 'break-word'\n },\n // ============================ Title =============================\n [`${componentCls}-title`]: {\n padding: `${(0, _cssinjs.unit)(tablePaddingVertical)} ${(0, _cssinjs.unit)(tablePaddingHorizontal)}`\n },\n // ============================ Header ============================\n [`${componentCls}-thead`]: {\n [`\n > tr > th,\n > tr > td\n `]: {\n position: 'relative',\n color: tableHeaderTextColor,\n fontWeight: fontWeightStrong,\n textAlign: 'start',\n background: tableHeaderBg,\n borderBottom: tableBorder,\n transition: `background ${motionDurationMid} ease`,\n \"&[colspan]:not([colspan='1'])\": {\n textAlign: 'center'\n },\n [`&:not(:last-child):not(${componentCls}-selection-column):not(${componentCls}-row-expand-icon-cell):not([colspan])::before`]: {\n position: 'absolute',\n top: '50%',\n insetInlineEnd: 0,\n width: 1,\n height: '1.6em',\n backgroundColor: tableHeaderCellSplitColor,\n transform: 'translateY(-50%)',\n transition: `background-color ${motionDurationMid}`,\n content: '\"\"'\n }\n },\n '> tr:not(:last-child) > th[colspan]': {\n borderBottom: 0\n }\n },\n // ============================ Body ============================\n [`${componentCls}-tbody`]: {\n '> tr': {\n '> th, > td': {\n transition: `background ${motionDurationMid}, border-color ${motionDurationMid}`,\n borderBottom: tableBorder,\n // ========================= Nest Table ===========================\n [`\n > ${componentCls}-wrapper:only-child,\n > ${componentCls}-expanded-row-fixed > ${componentCls}-wrapper:only-child\n `]: {\n [componentCls]: {\n marginBlock: (0, _cssinjs.unit)(calc(tablePaddingVertical).mul(-1).equal()),\n marginInline: `${(0, _cssinjs.unit)(calc(tableExpandColumnWidth).sub(tablePaddingHorizontal).equal())}\n ${(0, _cssinjs.unit)(calc(tablePaddingHorizontal).mul(-1).equal())}`,\n [`${componentCls}-tbody > tr:last-child > td`]: {\n borderBottom: 0,\n '&:first-child, &:last-child': {\n borderRadius: 0\n }\n }\n }\n }\n },\n '> th': {\n position: 'relative',\n color: tableHeaderTextColor,\n fontWeight: fontWeightStrong,\n textAlign: 'start',\n background: tableHeaderBg,\n borderBottom: tableBorder,\n transition: `background ${motionDurationMid} ease`\n }\n }\n },\n // ============================ Footer ============================\n [`${componentCls}-footer`]: {\n padding: `${(0, _cssinjs.unit)(tablePaddingVertical)} ${(0, _cssinjs.unit)(tablePaddingHorizontal)}`,\n color: tableFooterTextColor,\n background: tableFooterBg\n }\n })\n };\n};\nconst prepareComponentToken = token => {\n const {\n colorFillAlter,\n colorBgContainer,\n colorTextHeading,\n colorFillSecondary,\n colorFillContent,\n controlItemBgActive,\n controlItemBgActiveHover,\n padding,\n paddingSM,\n paddingXS,\n colorBorderSecondary,\n borderRadiusLG,\n controlHeight,\n colorTextPlaceholder,\n fontSize,\n fontSizeSM,\n lineHeight,\n lineWidth,\n colorIcon,\n colorIconHover,\n opacityLoading,\n controlInteractiveSize\n } = token;\n const colorFillSecondarySolid = new _tinycolor.TinyColor(colorFillSecondary).onBackground(colorBgContainer).toHexShortString();\n const colorFillContentSolid = new _tinycolor.TinyColor(colorFillContent).onBackground(colorBgContainer).toHexShortString();\n const colorFillAlterSolid = new _tinycolor.TinyColor(colorFillAlter).onBackground(colorBgContainer).toHexShortString();\n const baseColorAction = new _tinycolor.TinyColor(colorIcon);\n const baseColorActionHover = new _tinycolor.TinyColor(colorIconHover);\n const expandIconHalfInner = controlInteractiveSize / 2 - lineWidth;\n const expandIconSize = expandIconHalfInner * 2 + lineWidth * 3;\n return {\n headerBg: colorFillAlterSolid,\n headerColor: colorTextHeading,\n headerSortActiveBg: colorFillSecondarySolid,\n headerSortHoverBg: colorFillContentSolid,\n bodySortBg: colorFillAlterSolid,\n rowHoverBg: colorFillAlterSolid,\n rowSelectedBg: controlItemBgActive,\n rowSelectedHoverBg: controlItemBgActiveHover,\n rowExpandedBg: colorFillAlter,\n cellPaddingBlock: padding,\n cellPaddingInline: padding,\n cellPaddingBlockMD: paddingSM,\n cellPaddingInlineMD: paddingXS,\n cellPaddingBlockSM: paddingXS,\n cellPaddingInlineSM: paddingXS,\n borderColor: colorBorderSecondary,\n headerBorderRadius: borderRadiusLG,\n footerBg: colorFillAlterSolid,\n footerColor: colorTextHeading,\n cellFontSize: fontSize,\n cellFontSizeMD: fontSize,\n cellFontSizeSM: fontSize,\n headerSplitColor: colorBorderSecondary,\n fixedHeaderSortActiveBg: colorFillSecondarySolid,\n headerFilterHoverBg: colorFillContent,\n filterDropdownMenuBg: colorBgContainer,\n filterDropdownBg: colorBgContainer,\n expandIconBg: colorBgContainer,\n selectionColumnWidth: controlHeight,\n stickyScrollBarBg: colorTextPlaceholder,\n stickyScrollBarBorderRadius: 100,\n expandIconMarginTop: (fontSize * lineHeight - lineWidth * 3) / 2 - Math.ceil((fontSizeSM * 1.4 - lineWidth * 3) / 2),\n headerIconColor: baseColorAction.clone().setAlpha(baseColorAction.getAlpha() * opacityLoading).toRgbString(),\n headerIconHoverColor: baseColorActionHover.clone().setAlpha(baseColorActionHover.getAlpha() * opacityLoading).toRgbString(),\n expandIconHalfInner,\n expandIconSize,\n expandIconScale: controlInteractiveSize / expandIconSize\n };\n};\nexports.prepareComponentToken = prepareComponentToken;\nconst zIndexTableFixed = 2;\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genStyleHooks)('Table', token => {\n const {\n colorTextHeading,\n colorSplit,\n colorBgContainer,\n controlInteractiveSize: checkboxSize,\n headerBg,\n headerColor,\n headerSortActiveBg,\n headerSortHoverBg,\n bodySortBg,\n rowHoverBg,\n rowSelectedBg,\n rowSelectedHoverBg,\n rowExpandedBg,\n cellPaddingBlock,\n cellPaddingInline,\n cellPaddingBlockMD,\n cellPaddingInlineMD,\n cellPaddingBlockSM,\n cellPaddingInlineSM,\n borderColor,\n footerBg,\n footerColor,\n headerBorderRadius,\n cellFontSize,\n cellFontSizeMD,\n cellFontSizeSM,\n headerSplitColor,\n fixedHeaderSortActiveBg,\n headerFilterHoverBg,\n filterDropdownBg,\n expandIconBg,\n selectionColumnWidth,\n stickyScrollBarBg,\n calc\n } = token;\n const tableToken = (0, _internal.mergeToken)(token, {\n tableFontSize: cellFontSize,\n tableBg: colorBgContainer,\n tableRadius: headerBorderRadius,\n tablePaddingVertical: cellPaddingBlock,\n tablePaddingHorizontal: cellPaddingInline,\n tablePaddingVerticalMiddle: cellPaddingBlockMD,\n tablePaddingHorizontalMiddle: cellPaddingInlineMD,\n tablePaddingVerticalSmall: cellPaddingBlockSM,\n tablePaddingHorizontalSmall: cellPaddingInlineSM,\n tableBorderColor: borderColor,\n tableHeaderTextColor: headerColor,\n tableHeaderBg: headerBg,\n tableFooterTextColor: footerColor,\n tableFooterBg: footerBg,\n tableHeaderCellSplitColor: headerSplitColor,\n tableHeaderSortBg: headerSortActiveBg,\n tableHeaderSortHoverBg: headerSortHoverBg,\n tableBodySortBg: bodySortBg,\n tableFixedHeaderSortActiveBg: fixedHeaderSortActiveBg,\n tableHeaderFilterActiveBg: headerFilterHoverBg,\n tableFilterDropdownBg: filterDropdownBg,\n tableRowHoverBg: rowHoverBg,\n tableSelectedRowBg: rowSelectedBg,\n tableSelectedRowHoverBg: rowSelectedHoverBg,\n zIndexTableFixed,\n zIndexTableSticky: calc(zIndexTableFixed).add(1).equal({\n unit: false\n }),\n tableFontSizeMiddle: cellFontSizeMD,\n tableFontSizeSmall: cellFontSizeSM,\n tableSelectionColumnWidth: selectionColumnWidth,\n tableExpandIconBg: expandIconBg,\n tableExpandColumnWidth: calc(checkboxSize).add(calc(token.padding).mul(2)).equal(),\n tableExpandedRowBg: rowExpandedBg,\n // Dropdown\n tableFilterDropdownWidth: 120,\n tableFilterDropdownHeight: 264,\n tableFilterDropdownSearchWidth: 140,\n // Virtual Scroll Bar\n tableScrollThumbSize: 8,\n // Mac scroll bar size\n tableScrollThumbBg: stickyScrollBarBg,\n tableScrollThumbBgHover: colorTextHeading,\n tableScrollBg: colorSplit\n });\n return [genTableStyle(tableToken), (0, _pagination.default)(tableToken), (0, _summary.default)(tableToken), (0, _sorter.default)(tableToken), (0, _filter.default)(tableToken), (0, _bordered.default)(tableToken), (0, _radius.default)(tableToken), (0, _expand.default)(tableToken), (0, _summary.default)(tableToken), (0, _empty.default)(tableToken), (0, _selection.default)(tableToken), (0, _fixed.default)(tableToken), (0, _sticky.default)(tableToken), (0, _ellipsis.default)(tableToken), (0, _size.default)(tableToken), (0, _rtl.default)(tableToken), (0, _virtual.default)(tableToken)];\n}, prepareComponentToken, {\n unitless: {\n expandIconScale: true\n }\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genPaginationStyle = token => {\n const {\n componentCls,\n antCls,\n margin\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n // ========================== Pagination ==========================\n [`${componentCls}-pagination${antCls}-pagination`]: {\n margin: `${(0, _cssinjs.unit)(margin)} 0`\n },\n [`${componentCls}-pagination`]: {\n display: 'flex',\n flexWrap: 'wrap',\n rowGap: token.paddingXS,\n '> *': {\n flex: 'none'\n },\n '&-left': {\n justifyContent: 'flex-start'\n },\n '&-center': {\n justifyContent: 'center'\n },\n '&-right': {\n justifyContent: 'flex-end'\n }\n }\n }\n };\n};\nvar _default = exports.default = genPaginationStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genRadiusStyle = token => {\n const {\n componentCls,\n tableRadius\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n [componentCls]: {\n // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574\n [`${componentCls}-title, ${componentCls}-header`]: {\n borderRadius: `${(0, _cssinjs.unit)(tableRadius)} ${(0, _cssinjs.unit)(tableRadius)} 0 0`\n },\n [`${componentCls}-title + ${componentCls}-container`]: {\n borderStartStartRadius: 0,\n borderStartEndRadius: 0,\n // https://github.com/ant-design/ant-design/issues/41975\n [`${componentCls}-header, table`]: {\n borderRadius: 0\n },\n 'table > thead > tr:first-child': {\n 'th:first-child, th:last-child, td:first-child, td:last-child': {\n borderRadius: 0\n }\n }\n },\n '&-container': {\n borderStartStartRadius: tableRadius,\n borderStartEndRadius: tableRadius,\n 'table > thead > tr:first-child': {\n '> *:first-child': {\n borderStartStartRadius: tableRadius\n },\n '> *:last-child': {\n borderStartEndRadius: tableRadius\n }\n }\n },\n '&-footer': {\n borderRadius: `0 0 ${(0, _cssinjs.unit)(tableRadius)} ${(0, _cssinjs.unit)(tableRadius)}`\n }\n }\n }\n };\n};\nvar _default = exports.default = genRadiusStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-wrapper-rtl`]: {\n direction: 'rtl',\n table: {\n direction: 'rtl'\n },\n [`${componentCls}-pagination-left`]: {\n justifyContent: 'flex-end'\n },\n [`${componentCls}-pagination-right`]: {\n justifyContent: 'flex-start'\n },\n [`${componentCls}-row-expand-icon`]: {\n float: 'right',\n '&::after': {\n transform: 'rotate(-90deg)'\n },\n '&-collapsed::before': {\n transform: 'rotate(180deg)'\n },\n '&-collapsed::after': {\n transform: 'rotate(0deg)'\n }\n },\n [`${componentCls}-container`]: {\n '&::before': {\n insetInlineStart: 'unset',\n insetInlineEnd: 0\n },\n '&::after': {\n insetInlineStart: 0,\n insetInlineEnd: 'unset'\n },\n [`${componentCls}-row-indent`]: {\n float: 'right'\n }\n }\n }\n };\n};\nvar _default = exports.default = genStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genSelectionStyle = token => {\n const {\n componentCls,\n antCls,\n iconCls,\n fontSizeIcon,\n padding,\n paddingXS,\n headerIconColor,\n headerIconHoverColor,\n tableSelectionColumnWidth,\n tableSelectedRowBg,\n tableSelectedRowHoverBg,\n tableRowHoverBg,\n tablePaddingHorizontal,\n calc\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n // ========================== Selections ==========================\n [`${componentCls}-selection-col`]: {\n width: tableSelectionColumnWidth,\n [`&${componentCls}-selection-col-with-dropdown`]: {\n width: calc(tableSelectionColumnWidth).add(fontSizeIcon).add(calc(padding).div(4)).equal()\n }\n },\n [`${componentCls}-bordered ${componentCls}-selection-col`]: {\n width: calc(tableSelectionColumnWidth).add(calc(paddingXS).mul(2)).equal(),\n [`&${componentCls}-selection-col-with-dropdown`]: {\n width: calc(tableSelectionColumnWidth).add(fontSizeIcon).add(calc(padding).div(4)).add(calc(paddingXS).mul(2)).equal()\n }\n },\n [`\n table tr th${componentCls}-selection-column,\n table tr td${componentCls}-selection-column,\n ${componentCls}-selection-column\n `]: {\n paddingInlineEnd: token.paddingXS,\n paddingInlineStart: token.paddingXS,\n textAlign: 'center',\n [`${antCls}-radio-wrapper`]: {\n marginInlineEnd: 0\n }\n },\n [`table tr th${componentCls}-selection-column${componentCls}-cell-fix-left`]: {\n zIndex: calc(token.zIndexTableFixed).add(1).equal({\n unit: false\n })\n },\n [`table tr th${componentCls}-selection-column::after`]: {\n backgroundColor: 'transparent !important'\n },\n [`${componentCls}-selection`]: {\n position: 'relative',\n display: 'inline-flex',\n flexDirection: 'column'\n },\n [`${componentCls}-selection-extra`]: {\n position: 'absolute',\n top: 0,\n zIndex: 1,\n cursor: 'pointer',\n transition: `all ${token.motionDurationSlow}`,\n marginInlineStart: '100%',\n paddingInlineStart: (0, _cssinjs.unit)(calc(tablePaddingHorizontal).div(4).equal()),\n [iconCls]: {\n color: headerIconColor,\n fontSize: fontSizeIcon,\n verticalAlign: 'baseline',\n '&:hover': {\n color: headerIconHoverColor\n }\n }\n },\n // ============================= Rows =============================\n [`${componentCls}-tbody`]: {\n [`${componentCls}-row`]: {\n [`&${componentCls}-row-selected`]: {\n [`> ${componentCls}-cell`]: {\n background: tableSelectedRowBg,\n '&-row-hover': {\n background: tableSelectedRowHoverBg\n }\n }\n },\n [`> ${componentCls}-cell-row-hover`]: {\n background: tableRowHoverBg\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = genSelectionStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genSizeStyle = token => {\n const {\n componentCls,\n tableExpandColumnWidth,\n calc\n } = token;\n const getSizeStyle = (size, paddingVertical, paddingHorizontal, fontSize) => ({\n [`${componentCls}${componentCls}-${size}`]: {\n fontSize,\n [`\n ${componentCls}-title,\n ${componentCls}-footer,\n ${componentCls}-cell,\n ${componentCls}-thead > tr > th,\n ${componentCls}-tbody > tr > th,\n ${componentCls}-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n `]: {\n padding: `${(0, _cssinjs.unit)(paddingVertical)} ${(0, _cssinjs.unit)(paddingHorizontal)}`\n },\n [`${componentCls}-filter-trigger`]: {\n marginInlineEnd: (0, _cssinjs.unit)(calc(paddingHorizontal).div(2).mul(-1).equal())\n },\n [`${componentCls}-expanded-row-fixed`]: {\n margin: `${(0, _cssinjs.unit)(calc(paddingVertical).mul(-1).equal())} ${(0, _cssinjs.unit)(calc(paddingHorizontal).mul(-1).equal())}`\n },\n [`${componentCls}-tbody`]: {\n // ========================= Nest Table ===========================\n [`${componentCls}-wrapper:only-child ${componentCls}`]: {\n marginBlock: (0, _cssinjs.unit)(calc(paddingVertical).mul(-1).equal()),\n marginInline: `${(0, _cssinjs.unit)(calc(tableExpandColumnWidth).sub(paddingHorizontal).equal())} ${(0, _cssinjs.unit)(calc(paddingHorizontal).mul(-1).equal())}`\n }\n },\n // https://github.com/ant-design/ant-design/issues/35167\n [`${componentCls}-selection-extra`]: {\n paddingInlineStart: (0, _cssinjs.unit)(calc(paddingHorizontal).div(4).equal())\n }\n }\n });\n return {\n [`${componentCls}-wrapper`]: Object.assign(Object.assign({}, getSizeStyle('middle', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle, token.tableFontSizeMiddle)), getSizeStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall, token.tableFontSizeSmall))\n };\n};\nvar _default = exports.default = genSizeStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genSorterStyle = token => {\n const {\n componentCls,\n marginXXS,\n fontSizeIcon,\n headerIconColor,\n headerIconHoverColor\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-thead th${componentCls}-column-has-sorters`]: {\n outline: 'none',\n cursor: 'pointer',\n // why left 0s? Avoid column header move with transition when left is changed\n // https://github.com/ant-design/ant-design/issues/50588\n transition: `all ${token.motionDurationSlow}, left 0s`,\n '&:hover': {\n background: token.tableHeaderSortHoverBg,\n '&::before': {\n backgroundColor: 'transparent !important'\n }\n },\n '&:focus-visible': {\n color: token.colorPrimary\n },\n // https://github.com/ant-design/ant-design/issues/30969\n [`\n &${componentCls}-cell-fix-left:hover,\n &${componentCls}-cell-fix-right:hover\n `]: {\n background: token.tableFixedHeaderSortActiveBg\n }\n },\n [`${componentCls}-thead th${componentCls}-column-sort`]: {\n background: token.tableHeaderSortBg,\n '&::before': {\n backgroundColor: 'transparent !important'\n }\n },\n [`td${componentCls}-column-sort`]: {\n background: token.tableBodySortBg\n },\n [`${componentCls}-column-title`]: {\n position: 'relative',\n zIndex: 1,\n flex: 1\n },\n [`${componentCls}-column-sorters`]: {\n display: 'flex',\n flex: 'auto',\n alignItems: 'center',\n justifyContent: 'space-between',\n '&::after': {\n position: 'absolute',\n inset: 0,\n width: '100%',\n height: '100%',\n content: '\"\"'\n }\n },\n [`${componentCls}-column-sorters-tooltip-target-sorter`]: {\n '&::after': {\n content: 'none'\n }\n },\n [`${componentCls}-column-sorter`]: {\n marginInlineStart: marginXXS,\n color: headerIconColor,\n fontSize: 0,\n transition: `color ${token.motionDurationSlow}`,\n '&-inner': {\n display: 'inline-flex',\n flexDirection: 'column',\n alignItems: 'center'\n },\n '&-up, &-down': {\n fontSize: fontSizeIcon,\n '&.active': {\n color: token.colorPrimary\n }\n },\n [`${componentCls}-column-sorter-up + ${componentCls}-column-sorter-down`]: {\n marginTop: '-0.3em'\n }\n },\n [`${componentCls}-column-sorters:hover ${componentCls}-column-sorter`]: {\n color: headerIconHoverColor\n }\n }\n };\n};\nvar _default = exports.default = genSorterStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genStickyStyle = token => {\n const {\n componentCls,\n opacityLoading,\n tableScrollThumbBg,\n tableScrollThumbBgHover,\n tableScrollThumbSize,\n tableScrollBg,\n zIndexTableSticky,\n stickyScrollBarBorderRadius,\n lineWidth,\n lineType,\n tableBorderColor\n } = token;\n const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-sticky`]: {\n '&-holder': {\n position: 'sticky',\n zIndex: zIndexTableSticky,\n background: token.colorBgContainer\n },\n '&-scroll': {\n position: 'sticky',\n bottom: 0,\n height: `${(0, _cssinjs.unit)(tableScrollThumbSize)} !important`,\n zIndex: zIndexTableSticky,\n display: 'flex',\n alignItems: 'center',\n background: tableScrollBg,\n borderTop: tableBorder,\n opacity: opacityLoading,\n '&:hover': {\n transformOrigin: 'center bottom'\n },\n // fake scrollbar style of sticky\n '&-bar': {\n height: tableScrollThumbSize,\n backgroundColor: tableScrollThumbBg,\n borderRadius: stickyScrollBarBorderRadius,\n transition: `all ${token.motionDurationSlow}, transform none`,\n position: 'absolute',\n bottom: 0,\n '&:hover, &-active': {\n backgroundColor: tableScrollThumbBgHover\n }\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = genStickyStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genSummaryStyle = token => {\n const {\n componentCls,\n lineWidth,\n tableBorderColor,\n calc\n } = token;\n const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${token.lineType} ${tableBorderColor}`;\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-summary`]: {\n position: 'relative',\n zIndex: token.zIndexTableFixed,\n background: token.tableBg,\n '> tr': {\n '> th, > td': {\n borderBottom: tableBorder\n }\n }\n },\n [`div${componentCls}-summary`]: {\n boxShadow: `0 ${(0, _cssinjs.unit)(calc(lineWidth).mul(-1).equal())} 0 ${tableBorderColor}`\n }\n }\n };\n};\nvar _default = exports.default = genSummaryStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genVirtualStyle = token => {\n const {\n componentCls,\n motionDurationMid,\n lineWidth,\n lineType,\n tableBorderColor,\n calc\n } = token;\n const tableBorder = `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${tableBorderColor}`;\n const rowCellCls = `${componentCls}-expanded-row-cell`;\n return {\n [`${componentCls}-wrapper`]: {\n // ========================== Row ==========================\n [`${componentCls}-tbody-virtual`]: {\n [`${componentCls}-tbody-virtual-holder-inner`]: {\n [`\n & > ${componentCls}-row, \n & > div:not(${componentCls}-row) > ${componentCls}-row\n `]: {\n display: 'flex',\n boxSizing: 'border-box',\n width: '100%'\n }\n },\n [`${componentCls}-cell`]: {\n borderBottom: tableBorder,\n transition: `background ${motionDurationMid}`\n },\n [`${componentCls}-expanded-row`]: {\n [`${rowCellCls}${rowCellCls}-fixed`]: {\n position: 'sticky',\n insetInlineStart: 0,\n overflow: 'hidden',\n width: `calc(var(--virtual-width) - ${(0, _cssinjs.unit)(lineWidth)})`,\n borderInlineEnd: 'none'\n }\n }\n },\n // ======================== Border =========================\n [`${componentCls}-bordered`]: {\n [`${componentCls}-tbody-virtual`]: {\n '&:after': {\n content: '\"\"',\n insetInline: 0,\n bottom: 0,\n borderBottom: tableBorder,\n position: 'absolute'\n },\n [`${componentCls}-cell`]: {\n borderInlineEnd: tableBorder,\n [`&${componentCls}-cell-fix-right-first:before`]: {\n content: '\"\"',\n position: 'absolute',\n insetBlock: 0,\n insetInlineStart: calc(lineWidth).mul(-1).equal(),\n borderInlineStart: tableBorder\n }\n }\n },\n // Empty placeholder\n [`&${componentCls}-virtual`]: {\n [`${componentCls}-placeholder ${componentCls}-cell`]: {\n borderInlineEnd: tableBorder,\n borderBottom: tableBorder\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = genVirtualStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getColumnKey = void 0;\nexports.getColumnPos = getColumnPos;\nexports.safeColumnTitle = exports.renderColumnTitle = void 0;\nconst getColumnKey = (column, defaultKey) => {\n if ('key' in column && column.key !== undefined && column.key !== null) {\n return column.key;\n }\n if (column.dataIndex) {\n return Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : column.dataIndex;\n }\n return defaultKey;\n};\nexports.getColumnKey = getColumnKey;\nfunction getColumnPos(index, pos) {\n return pos ? `${pos}-${index}` : `${index}`;\n}\nconst renderColumnTitle = (title, props) => {\n if (typeof title === 'function') {\n return title(props);\n }\n return title;\n};\n/**\n * Safe get column title\n *\n * Should filter [object Object]\n *\n * @param title\n */\nexports.renderColumnTitle = renderColumnTitle;\nconst safeColumnTitle = (title, props) => {\n const res = renderColumnTitle(title, props);\n if (Object.prototype.toString.call(res) === '[object Object]') {\n return '';\n }\n return res;\n};\nexports.safeColumnTitle = safeColumnTitle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst TabPane = () => null;\nif (process.env.NODE_ENV !== 'production') {\n TabPane.displayName = 'DeprecatedTabPane';\n}\nvar _default = exports.default = TabPane;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useAnimateConfig;\nvar _motion = require(\"../../_util/motion\");\nconst motion = {\n motionAppear: false,\n motionEnter: true,\n motionLeave: true\n};\nfunction useAnimateConfig(prefixCls) {\n let animated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n inkBar: true,\n tabPane: false\n };\n let mergedAnimated;\n if (animated === false) {\n mergedAnimated = {\n inkBar: false,\n tabPane: false\n };\n } else if (animated === true) {\n mergedAnimated = {\n inkBar: true,\n tabPane: true\n };\n } else {\n mergedAnimated = Object.assign({\n inkBar: true\n }, typeof animated === 'object' ? animated : {});\n }\n if (mergedAnimated.tabPane) {\n mergedAnimated.tabPaneMotion = Object.assign(Object.assign({}, motion), {\n motionName: (0, _motion.getTransitionName)(prefixCls, 'switch')\n });\n }\n return mergedAnimated;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useLegacyItems;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _warning = require(\"../../_util/warning\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction filter(items) {\n return items.filter(item => item);\n}\nfunction useLegacyItems(items, children) {\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Tabs');\n warning.deprecated(!children, 'Tabs.TabPane', 'items');\n }\n if (items) {\n return items;\n }\n const childrenItems = (0, _toArray.default)(children).map(node => {\n if (/*#__PURE__*/React.isValidElement(node)) {\n const {\n key,\n props\n } = node;\n const _a = props || {},\n {\n tab\n } = _a,\n restProps = __rest(_a, [\"tab\"]);\n const item = Object.assign(Object.assign({\n key: String(key)\n }, restProps), {\n label: tab\n });\n return item;\n }\n return null;\n });\n return filter(childrenItems);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _EllipsisOutlined = _interopRequireDefault(require(\"@ant-design/icons/EllipsisOutlined\"));\nvar _PlusOutlined = _interopRequireDefault(require(\"@ant-design/icons/PlusOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTabs = _interopRequireDefault(require(\"rc-tabs\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _useAnimateConfig = _interopRequireDefault(require(\"./hooks/useAnimateConfig\"));\nvar _useLegacyItems = _interopRequireDefault(require(\"./hooks/useLegacyItems\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _TabPane = _interopRequireDefault(require(\"./TabPane\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Tabs = props => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n const {\n type,\n className,\n rootClassName,\n size: customSize,\n onEdit,\n hideAdd,\n centered,\n addIcon,\n removeIcon,\n moreIcon,\n more,\n popupClassName,\n children,\n items,\n animated,\n style,\n indicatorSize,\n indicator\n } = props,\n otherProps = __rest(props, [\"type\", \"className\", \"rootClassName\", \"size\", \"onEdit\", \"hideAdd\", \"centered\", \"addIcon\", \"removeIcon\", \"moreIcon\", \"more\", \"popupClassName\", \"children\", \"items\", \"animated\", \"style\", \"indicatorSize\", \"indicator\"]);\n const {\n prefixCls: customizePrefixCls\n } = otherProps;\n const {\n direction,\n tabs,\n getPrefixCls,\n getPopupContainer\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('tabs', customizePrefixCls);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n let editable;\n if (type === 'editable-card') {\n editable = {\n onEdit: (editType, _ref) => {\n let {\n key,\n event\n } = _ref;\n onEdit === null || onEdit === void 0 ? void 0 : onEdit(editType === 'add' ? event : key, editType);\n },\n removeIcon: (_a = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a !== void 0 ? _a : /*#__PURE__*/React.createElement(_CloseOutlined.default, null),\n addIcon: (addIcon !== null && addIcon !== void 0 ? addIcon : tabs === null || tabs === void 0 ? void 0 : tabs.addIcon) || /*#__PURE__*/React.createElement(_PlusOutlined.default, null),\n showAdd: hideAdd !== true\n };\n }\n const rootPrefixCls = getPrefixCls();\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Tabs');\n process.env.NODE_ENV !== \"production\" ? warning(!('onPrevClick' in props) && !('onNextClick' in props), 'breaking', '`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(indicatorSize || (tabs === null || tabs === void 0 ? void 0 : tabs.indicatorSize)), 'deprecated', '`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead.') : void 0;\n }\n const size = (0, _useSize.default)(customSize);\n const mergedItems = (0, _useLegacyItems.default)(items, children);\n const mergedAnimated = (0, _useAnimateConfig.default)(prefixCls, animated);\n const mergedStyle = Object.assign(Object.assign({}, tabs === null || tabs === void 0 ? void 0 : tabs.style), style);\n const mergedIndicator = {\n align: (_b = indicator === null || indicator === void 0 ? void 0 : indicator.align) !== null && _b !== void 0 ? _b : (_c = tabs === null || tabs === void 0 ? void 0 : tabs.indicator) === null || _c === void 0 ? void 0 : _c.align,\n size: (_g = (_e = (_d = indicator === null || indicator === void 0 ? void 0 : indicator.size) !== null && _d !== void 0 ? _d : indicatorSize) !== null && _e !== void 0 ? _e : (_f = tabs === null || tabs === void 0 ? void 0 : tabs.indicator) === null || _f === void 0 ? void 0 : _f.size) !== null && _g !== void 0 ? _g : tabs === null || tabs === void 0 ? void 0 : tabs.indicatorSize\n };\n return wrapCSSVar(/*#__PURE__*/React.createElement(_rcTabs.default, Object.assign({\n direction: direction,\n getPopupContainer: getPopupContainer\n }, otherProps, {\n items: mergedItems,\n className: (0, _classnames.default)({\n [`${prefixCls}-${size}`]: size,\n [`${prefixCls}-card`]: ['card', 'editable-card'].includes(type),\n [`${prefixCls}-editable-card`]: type === 'editable-card',\n [`${prefixCls}-centered`]: centered\n }, tabs === null || tabs === void 0 ? void 0 : tabs.className, className, rootClassName, hashId, cssVarCls, rootCls),\n popupClassName: (0, _classnames.default)(popupClassName, hashId, cssVarCls, rootCls),\n style: mergedStyle,\n editable: editable,\n more: Object.assign({\n icon: (_l = (_k = (_j = (_h = tabs === null || tabs === void 0 ? void 0 : tabs.more) === null || _h === void 0 ? void 0 : _h.icon) !== null && _j !== void 0 ? _j : tabs === null || tabs === void 0 ? void 0 : tabs.moreIcon) !== null && _k !== void 0 ? _k : moreIcon) !== null && _l !== void 0 ? _l : /*#__PURE__*/React.createElement(_EllipsisOutlined.default, null),\n transitionName: `${rootPrefixCls}-slide-up`\n }, more),\n prefixCls: prefixCls,\n animated: mergedAnimated,\n indicator: mergedIndicator\n })));\n};\nTabs.TabPane = _TabPane.default;\nif (process.env.NODE_ENV !== 'production') {\n Tabs.displayName = 'Tabs';\n}\nvar _default = exports.default = Tabs;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nvar _motion = _interopRequireDefault(require(\"./motion\"));\nconst genCardStyle = token => {\n const {\n componentCls,\n tabsCardPadding,\n cardBg,\n cardGutter,\n colorBorderSecondary,\n itemSelectedColor\n } = token;\n return {\n [`${componentCls}-card`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n margin: 0,\n padding: tabsCardPadding,\n background: cardBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,\n transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`\n },\n [`${componentCls}-tab-active`]: {\n color: itemSelectedColor,\n background: token.colorBgContainer\n },\n [`${componentCls}-ink-bar`]: {\n visibility: 'hidden'\n }\n },\n // ========================== Top & Bottom ==========================\n [`&${componentCls}-top, &${componentCls}-bottom`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab + ${componentCls}-tab`]: {\n marginLeft: {\n _skip_check_: true,\n value: (0, _cssinjs.unit)(cardGutter)\n }\n }\n }\n },\n [`&${componentCls}-top`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n borderRadius: `${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)} 0 0`\n },\n [`${componentCls}-tab-active`]: {\n borderBottomColor: token.colorBgContainer\n }\n }\n },\n [`&${componentCls}-bottom`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n borderRadius: `0 0 ${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)}`\n },\n [`${componentCls}-tab-active`]: {\n borderTopColor: token.colorBgContainer\n }\n }\n },\n // ========================== Left & Right ==========================\n [`&${componentCls}-left, &${componentCls}-right`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab + ${componentCls}-tab`]: {\n marginTop: (0, _cssinjs.unit)(cardGutter)\n }\n }\n },\n [`&${componentCls}-left`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n borderRadius: {\n _skip_check_: true,\n value: `${(0, _cssinjs.unit)(token.borderRadiusLG)} 0 0 ${(0, _cssinjs.unit)(token.borderRadiusLG)}`\n }\n },\n [`${componentCls}-tab-active`]: {\n borderRightColor: {\n _skip_check_: true,\n value: token.colorBgContainer\n }\n }\n }\n },\n [`&${componentCls}-right`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n borderRadius: {\n _skip_check_: true,\n value: `0 ${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)} 0`\n }\n },\n [`${componentCls}-tab-active`]: {\n borderLeftColor: {\n _skip_check_: true,\n value: token.colorBgContainer\n }\n }\n }\n }\n }\n };\n};\nconst genDropdownStyle = token => {\n const {\n componentCls,\n itemHoverColor,\n dropdownEdgeChildVerticalPadding\n } = token;\n return {\n [`${componentCls}-dropdown`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'absolute',\n top: -9999,\n left: {\n _skip_check_: true,\n value: -9999\n },\n zIndex: token.zIndexPopup,\n display: 'block',\n '&-hidden': {\n display: 'none'\n },\n [`${componentCls}-dropdown-menu`]: {\n maxHeight: token.tabsDropdownHeight,\n margin: 0,\n padding: `${(0, _cssinjs.unit)(dropdownEdgeChildVerticalPadding)} 0`,\n overflowX: 'hidden',\n overflowY: 'auto',\n textAlign: {\n _skip_check_: true,\n value: 'left'\n },\n listStyleType: 'none',\n backgroundColor: token.colorBgContainer,\n backgroundClip: 'padding-box',\n borderRadius: token.borderRadiusLG,\n outline: 'none',\n boxShadow: token.boxShadowSecondary,\n '&-item': Object.assign(Object.assign({}, _style.textEllipsis), {\n display: 'flex',\n alignItems: 'center',\n minWidth: token.tabsDropdownWidth,\n margin: 0,\n padding: `${(0, _cssinjs.unit)(token.paddingXXS)} ${(0, _cssinjs.unit)(token.paddingSM)}`,\n color: token.colorText,\n fontWeight: 'normal',\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n cursor: 'pointer',\n transition: `all ${token.motionDurationSlow}`,\n '> span': {\n flex: 1,\n whiteSpace: 'nowrap'\n },\n '&-remove': {\n flex: 'none',\n marginLeft: {\n _skip_check_: true,\n value: token.marginSM\n },\n color: token.colorTextDescription,\n fontSize: token.fontSizeSM,\n background: 'transparent',\n border: 0,\n cursor: 'pointer',\n '&:hover': {\n color: itemHoverColor\n }\n },\n '&:hover': {\n background: token.controlItemBgHover\n },\n '&-disabled': {\n '&, &:hover': {\n color: token.colorTextDisabled,\n background: 'transparent',\n cursor: 'not-allowed'\n }\n }\n })\n }\n })\n };\n};\nconst genPositionStyle = token => {\n const {\n componentCls,\n margin,\n colorBorderSecondary,\n horizontalMargin,\n verticalItemPadding,\n verticalItemMargin,\n calc\n } = token;\n return {\n // ========================== Top & Bottom ==========================\n [`${componentCls}-top, ${componentCls}-bottom`]: {\n flexDirection: 'column',\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n margin: horizontalMargin,\n '&::before': {\n position: 'absolute',\n right: {\n _skip_check_: true,\n value: 0\n },\n left: {\n _skip_check_: true,\n value: 0\n },\n borderBottom: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,\n content: \"''\"\n },\n [`${componentCls}-ink-bar`]: {\n height: token.lineWidthBold,\n '&-animated': {\n transition: `width ${token.motionDurationSlow}, left ${token.motionDurationSlow},\n right ${token.motionDurationSlow}`\n }\n },\n [`${componentCls}-nav-wrap`]: {\n '&::before, &::after': {\n top: 0,\n bottom: 0,\n width: token.controlHeight\n },\n '&::before': {\n left: {\n _skip_check_: true,\n value: 0\n },\n boxShadow: token.boxShadowTabsOverflowLeft\n },\n '&::after': {\n right: {\n _skip_check_: true,\n value: 0\n },\n boxShadow: token.boxShadowTabsOverflowRight\n },\n [`&${componentCls}-nav-wrap-ping-left::before`]: {\n opacity: 1\n },\n [`&${componentCls}-nav-wrap-ping-right::after`]: {\n opacity: 1\n }\n }\n }\n },\n [`${componentCls}-top`]: {\n [`> ${componentCls}-nav,\n > div > ${componentCls}-nav`]: {\n '&::before': {\n bottom: 0\n },\n [`${componentCls}-ink-bar`]: {\n bottom: 0\n }\n }\n },\n [`${componentCls}-bottom`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n order: 1,\n marginTop: margin,\n marginBottom: 0,\n '&::before': {\n top: 0\n },\n [`${componentCls}-ink-bar`]: {\n top: 0\n }\n },\n [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {\n order: 0\n }\n },\n // ========================== Left & Right ==========================\n [`${componentCls}-left, ${componentCls}-right`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n flexDirection: 'column',\n minWidth: calc(token.controlHeight).mul(1.25).equal(),\n // >>>>>>>>>>> Tab\n [`${componentCls}-tab`]: {\n padding: verticalItemPadding,\n textAlign: 'center'\n },\n [`${componentCls}-tab + ${componentCls}-tab`]: {\n margin: verticalItemMargin\n },\n // >>>>>>>>>>> Nav\n [`${componentCls}-nav-wrap`]: {\n flexDirection: 'column',\n '&::before, &::after': {\n right: {\n _skip_check_: true,\n value: 0\n },\n left: {\n _skip_check_: true,\n value: 0\n },\n height: token.controlHeight\n },\n '&::before': {\n top: 0,\n boxShadow: token.boxShadowTabsOverflowTop\n },\n '&::after': {\n bottom: 0,\n boxShadow: token.boxShadowTabsOverflowBottom\n },\n [`&${componentCls}-nav-wrap-ping-top::before`]: {\n opacity: 1\n },\n [`&${componentCls}-nav-wrap-ping-bottom::after`]: {\n opacity: 1\n }\n },\n // >>>>>>>>>>> Ink Bar\n [`${componentCls}-ink-bar`]: {\n width: token.lineWidthBold,\n '&-animated': {\n transition: `height ${token.motionDurationSlow}, top ${token.motionDurationSlow}`\n }\n },\n [`${componentCls}-nav-list, ${componentCls}-nav-operations`]: {\n flex: '1 0 auto',\n // fix safari scroll problem\n flexDirection: 'column'\n }\n }\n },\n [`${componentCls}-left`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-ink-bar`]: {\n right: {\n _skip_check_: true,\n value: 0\n }\n }\n },\n [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {\n marginLeft: {\n _skip_check_: true,\n value: (0, _cssinjs.unit)(calc(token.lineWidth).mul(-1).equal())\n },\n borderLeft: {\n _skip_check_: true,\n value: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`\n },\n [`> ${componentCls}-content > ${componentCls}-tabpane`]: {\n paddingLeft: {\n _skip_check_: true,\n value: token.paddingLG\n }\n }\n }\n },\n [`${componentCls}-right`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n order: 1,\n [`${componentCls}-ink-bar`]: {\n left: {\n _skip_check_: true,\n value: 0\n }\n }\n },\n [`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {\n order: 0,\n marginRight: {\n _skip_check_: true,\n value: calc(token.lineWidth).mul(-1).equal()\n },\n borderRight: {\n _skip_check_: true,\n value: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`\n },\n [`> ${componentCls}-content > ${componentCls}-tabpane`]: {\n paddingRight: {\n _skip_check_: true,\n value: token.paddingLG\n }\n }\n }\n }\n };\n};\nconst genSizeStyle = token => {\n const {\n componentCls,\n cardPaddingSM,\n cardPaddingLG,\n horizontalItemPaddingSM,\n horizontalItemPaddingLG\n } = token;\n return {\n [componentCls]: {\n '&-small': {\n [`> ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n padding: horizontalItemPaddingSM,\n fontSize: token.titleFontSizeSM\n }\n }\n },\n '&-large': {\n [`> ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n padding: horizontalItemPaddingLG,\n fontSize: token.titleFontSizeLG\n }\n }\n }\n },\n [`${componentCls}-card`]: {\n [`&${componentCls}-small`]: {\n [`> ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n padding: cardPaddingSM\n }\n },\n [`&${componentCls}-bottom`]: {\n [`> ${componentCls}-nav ${componentCls}-tab`]: {\n borderRadius: `0 0 ${(0, _cssinjs.unit)(token.borderRadius)} ${(0, _cssinjs.unit)(token.borderRadius)}`\n }\n },\n [`&${componentCls}-top`]: {\n [`> ${componentCls}-nav ${componentCls}-tab`]: {\n borderRadius: `${(0, _cssinjs.unit)(token.borderRadius)} ${(0, _cssinjs.unit)(token.borderRadius)} 0 0`\n }\n },\n [`&${componentCls}-right`]: {\n [`> ${componentCls}-nav ${componentCls}-tab`]: {\n borderRadius: {\n _skip_check_: true,\n value: `0 ${(0, _cssinjs.unit)(token.borderRadius)} ${(0, _cssinjs.unit)(token.borderRadius)} 0`\n }\n }\n },\n [`&${componentCls}-left`]: {\n [`> ${componentCls}-nav ${componentCls}-tab`]: {\n borderRadius: {\n _skip_check_: true,\n value: `${(0, _cssinjs.unit)(token.borderRadius)} 0 0 ${(0, _cssinjs.unit)(token.borderRadius)}`\n }\n }\n }\n },\n [`&${componentCls}-large`]: {\n [`> ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n padding: cardPaddingLG\n }\n }\n }\n }\n };\n};\nconst genTabStyle = token => {\n const {\n componentCls,\n itemActiveColor,\n itemHoverColor,\n iconCls,\n tabsHorizontalItemMargin,\n horizontalItemPadding,\n itemSelectedColor,\n itemColor\n } = token;\n const tabCls = `${componentCls}-tab`;\n return {\n [tabCls]: {\n position: 'relative',\n WebkitTouchCallout: 'none',\n WebkitTapHighlightColor: 'transparent',\n display: 'inline-flex',\n alignItems: 'center',\n padding: horizontalItemPadding,\n fontSize: token.titleFontSize,\n background: 'transparent',\n border: 0,\n outline: 'none',\n cursor: 'pointer',\n color: itemColor,\n '&-btn, &-remove': Object.assign({\n '&:focus:not(:focus-visible), &:active': {\n color: itemActiveColor\n }\n }, (0, _style.genFocusStyle)(token)),\n '&-btn': {\n outline: 'none',\n transition: `all ${token.motionDurationSlow}`,\n [`${tabCls}-icon:not(:last-child)`]: {\n marginInlineEnd: token.marginSM\n }\n },\n '&-remove': {\n flex: 'none',\n marginRight: {\n _skip_check_: true,\n value: token.calc(token.marginXXS).mul(-1).equal()\n },\n marginLeft: {\n _skip_check_: true,\n value: token.marginXS\n },\n color: token.colorTextDescription,\n fontSize: token.fontSizeSM,\n background: 'transparent',\n border: 'none',\n outline: 'none',\n cursor: 'pointer',\n transition: `all ${token.motionDurationSlow}`,\n '&:hover': {\n color: token.colorTextHeading\n }\n },\n '&:hover': {\n color: itemHoverColor\n },\n [`&${tabCls}-active ${tabCls}-btn`]: {\n color: itemSelectedColor,\n textShadow: token.tabsActiveTextShadow\n },\n [`&${tabCls}-disabled`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n },\n [`&${tabCls}-disabled ${tabCls}-btn, &${tabCls}-disabled ${componentCls}-remove`]: {\n '&:focus, &:active': {\n color: token.colorTextDisabled\n }\n },\n [`& ${tabCls}-remove ${iconCls}`]: {\n margin: 0\n },\n [`${iconCls}:not(:last-child)`]: {\n marginRight: {\n _skip_check_: true,\n value: token.marginSM\n }\n }\n },\n [`${tabCls} + ${tabCls}`]: {\n margin: {\n _skip_check_: true,\n value: tabsHorizontalItemMargin\n }\n }\n };\n};\nconst genRtlStyle = token => {\n const {\n componentCls,\n tabsHorizontalItemMarginRTL,\n iconCls,\n cardGutter,\n calc\n } = token;\n const rtlCls = `${componentCls}-rtl`;\n return {\n [rtlCls]: {\n direction: 'rtl',\n [`${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n margin: {\n _skip_check_: true,\n value: tabsHorizontalItemMarginRTL\n },\n [`${componentCls}-tab:last-of-type`]: {\n marginLeft: {\n _skip_check_: true,\n value: 0\n }\n },\n [iconCls]: {\n marginRight: {\n _skip_check_: true,\n value: 0\n },\n marginLeft: {\n _skip_check_: true,\n value: (0, _cssinjs.unit)(token.marginSM)\n }\n },\n [`${componentCls}-tab-remove`]: {\n marginRight: {\n _skip_check_: true,\n value: (0, _cssinjs.unit)(token.marginXS)\n },\n marginLeft: {\n _skip_check_: true,\n value: (0, _cssinjs.unit)(calc(token.marginXXS).mul(-1).equal())\n },\n [iconCls]: {\n margin: 0\n }\n }\n }\n },\n [`&${componentCls}-left`]: {\n [`> ${componentCls}-nav`]: {\n order: 1\n },\n [`> ${componentCls}-content-holder`]: {\n order: 0\n }\n },\n [`&${componentCls}-right`]: {\n [`> ${componentCls}-nav`]: {\n order: 0\n },\n [`> ${componentCls}-content-holder`]: {\n order: 1\n }\n },\n // ====================== Card ======================\n [`&${componentCls}-card${componentCls}-top, &${componentCls}-card${componentCls}-bottom`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab + ${componentCls}-tab`]: {\n marginRight: {\n _skip_check_: true,\n value: cardGutter\n },\n marginLeft: {\n _skip_check_: true,\n value: 0\n }\n }\n }\n }\n },\n [`${componentCls}-dropdown-rtl`]: {\n direction: 'rtl'\n },\n [`${componentCls}-menu-item`]: {\n [`${componentCls}-dropdown-rtl`]: {\n textAlign: {\n _skip_check_: true,\n value: 'right'\n }\n }\n }\n };\n};\nconst genTabsStyle = token => {\n const {\n componentCls,\n tabsCardPadding,\n cardHeight,\n cardGutter,\n itemHoverColor,\n itemActiveColor,\n colorBorderSecondary\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'flex',\n // ========================== Navigation ==========================\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n position: 'relative',\n display: 'flex',\n flex: 'none',\n alignItems: 'center',\n [`${componentCls}-nav-wrap`]: {\n position: 'relative',\n display: 'flex',\n flex: 'auto',\n alignSelf: 'stretch',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n transform: 'translate(0)',\n // Fix chrome render bug\n // >>>>> Ping shadow\n '&::before, &::after': {\n position: 'absolute',\n zIndex: 1,\n opacity: 0,\n transition: `opacity ${token.motionDurationSlow}`,\n content: \"''\",\n pointerEvents: 'none'\n }\n },\n [`${componentCls}-nav-list`]: {\n position: 'relative',\n display: 'flex',\n transition: `opacity ${token.motionDurationSlow}`\n },\n // >>>>>>>> Operations\n [`${componentCls}-nav-operations`]: {\n display: 'flex',\n alignSelf: 'stretch'\n },\n [`${componentCls}-nav-operations-hidden`]: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none'\n },\n [`${componentCls}-nav-more`]: {\n position: 'relative',\n padding: tabsCardPadding,\n background: 'transparent',\n border: 0,\n color: token.colorText,\n '&::after': {\n position: 'absolute',\n right: {\n _skip_check_: true,\n value: 0\n },\n bottom: 0,\n left: {\n _skip_check_: true,\n value: 0\n },\n height: token.calc(token.controlHeightLG).div(8).equal(),\n transform: 'translateY(100%)',\n content: \"''\"\n }\n },\n [`${componentCls}-nav-add`]: Object.assign({\n minWidth: cardHeight,\n minHeight: cardHeight,\n marginLeft: {\n _skip_check_: true,\n value: cardGutter\n },\n padding: `0 ${(0, _cssinjs.unit)(token.paddingXS)}`,\n background: 'transparent',\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,\n borderRadius: `${(0, _cssinjs.unit)(token.borderRadiusLG)} ${(0, _cssinjs.unit)(token.borderRadiusLG)} 0 0`,\n outline: 'none',\n cursor: 'pointer',\n color: token.colorText,\n transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,\n '&:hover': {\n color: itemHoverColor\n },\n '&:active, &:focus:not(:focus-visible)': {\n color: itemActiveColor\n }\n }, (0, _style.genFocusStyle)(token))\n },\n [`${componentCls}-extra-content`]: {\n flex: 'none'\n },\n // ============================ InkBar ============================\n [`${componentCls}-ink-bar`]: {\n position: 'absolute',\n background: token.inkBarColor,\n pointerEvents: 'none'\n }\n }), genTabStyle(token)), {\n // =========================== TabPanes ===========================\n [`${componentCls}-content`]: {\n position: 'relative',\n width: '100%'\n },\n [`${componentCls}-content-holder`]: {\n flex: 'auto',\n minWidth: 0,\n minHeight: 0\n },\n [`${componentCls}-tabpane`]: {\n outline: 'none',\n '&-hidden': {\n display: 'none'\n }\n }\n }),\n [`${componentCls}-centered`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-nav-wrap`]: {\n [`&:not([class*='${componentCls}-nav-wrap-ping'])`]: {\n justifyContent: 'center'\n }\n }\n }\n }\n };\n};\nconst prepareComponentToken = token => {\n const cardHeight = token.controlHeightLG;\n return {\n zIndexPopup: token.zIndexPopupBase + 50,\n cardBg: token.colorFillAlter,\n cardHeight,\n // Initialize with empty string, because cardPadding will be calculated with cardHeight by default.\n cardPadding: `${(cardHeight - Math.round(token.fontSize * token.lineHeight)) / 2 - token.lineWidth}px ${token.padding}px`,\n cardPaddingSM: `${token.paddingXXS * 1.5}px ${token.padding}px`,\n cardPaddingLG: `${token.paddingXS}px ${token.padding}px ${token.paddingXXS * 1.5}px`,\n titleFontSize: token.fontSize,\n titleFontSizeLG: token.fontSizeLG,\n titleFontSizeSM: token.fontSize,\n inkBarColor: token.colorPrimary,\n horizontalMargin: `0 0 ${token.margin}px 0`,\n horizontalItemGutter: 32,\n // Fixed Value\n // Initialize with empty string, because horizontalItemMargin will be calculated with horizontalItemGutter by default.\n horizontalItemMargin: ``,\n horizontalItemMarginRTL: ``,\n horizontalItemPadding: `${token.paddingSM}px 0`,\n horizontalItemPaddingSM: `${token.paddingXS}px 0`,\n horizontalItemPaddingLG: `${token.padding}px 0`,\n verticalItemPadding: `${token.paddingXS}px ${token.paddingLG}px`,\n verticalItemMargin: `${token.margin}px 0 0 0`,\n itemColor: token.colorText,\n itemSelectedColor: token.colorPrimary,\n itemHoverColor: token.colorPrimaryHover,\n itemActiveColor: token.colorPrimaryActive,\n cardGutter: token.marginXXS / 2\n };\n};\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Tabs', token => {\n const tabsToken = (0, _internal.mergeToken)(token, {\n // `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight`\n tabsCardPadding: token.cardPadding,\n dropdownEdgeChildVerticalPadding: token.paddingXXS,\n tabsActiveTextShadow: '0 0 0.25px currentcolor',\n tabsDropdownHeight: 200,\n tabsDropdownWidth: 120,\n tabsHorizontalItemMargin: `0 0 0 ${(0, _cssinjs.unit)(token.horizontalItemGutter)}`,\n tabsHorizontalItemMarginRTL: `0 0 0 ${(0, _cssinjs.unit)(token.horizontalItemGutter)}`\n });\n return [genSizeStyle(tabsToken), genRtlStyle(tabsToken), genPositionStyle(tabsToken), genDropdownStyle(tabsToken), genCardStyle(tabsToken), genTabsStyle(tabsToken), (0, _motion.default)(tabsToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _motion = require(\"../../style/motion\");\nconst genMotionStyle = token => {\n const {\n componentCls,\n motionDurationSlow\n } = token;\n return [{\n [componentCls]: {\n [`${componentCls}-switch`]: {\n '&-appear, &-enter': {\n transition: 'none',\n '&-start': {\n opacity: 0\n },\n '&-active': {\n opacity: 1,\n transition: `opacity ${motionDurationSlow}`\n }\n },\n '&-leave': {\n position: 'absolute',\n transition: 'none',\n inset: 0,\n '&-start': {\n opacity: 1\n },\n '&-active': {\n opacity: 0,\n transition: `opacity ${motionDurationSlow}`\n }\n }\n }\n }\n },\n // Follow code may reuse in other components\n [(0, _motion.initSlideMotion)(token, 'slide-up'), (0, _motion.initSlideMotion)(token, 'slide-down')]];\n};\nvar _default = exports.default = genMotionStyle;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst CheckableTag = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n style,\n className,\n checked,\n onChange,\n onClick\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"style\", \"className\", \"checked\", \"onChange\", \"onClick\"]);\n const {\n getPrefixCls,\n tag\n } = React.useContext(_configProvider.ConfigContext);\n const handleClick = e => {\n onChange === null || onChange === void 0 ? void 0 : onChange(!checked);\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n };\n const prefixCls = getPrefixCls('tag', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-checkable`, {\n [`${prefixCls}-checkable-checked`]: checked\n }, tag === null || tag === void 0 ? void 0 : tag.className, className, hashId, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"span\", Object.assign({}, restProps, {\n ref: ref,\n style: Object.assign(Object.assign({}, style), tag === null || tag === void 0 ? void 0 : tag.style),\n className: cls,\n onClick: handleClick\n })));\n});\nvar _default = exports.default = CheckableTag;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _colors = require(\"../_util/colors\");\nvar _useClosable = _interopRequireWildcard(require(\"../_util/hooks/useClosable\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _warning = require(\"../_util/warning\");\nvar _wave = _interopRequireDefault(require(\"../_util/wave\"));\nvar _configProvider = require(\"../config-provider\");\nvar _CheckableTag = _interopRequireDefault(require(\"./CheckableTag\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _presetCmp = _interopRequireDefault(require(\"./style/presetCmp\"));\nvar _statusCmp = _interopRequireDefault(require(\"./style/statusCmp\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalTag = /*#__PURE__*/React.forwardRef((tagProps, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n children,\n icon,\n color,\n onClose,\n bordered = true,\n visible: deprecatedVisible\n } = tagProps,\n props = __rest(tagProps, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"children\", \"icon\", \"color\", \"onClose\", \"bordered\", \"visible\"]);\n const {\n getPrefixCls,\n direction,\n tag: tagContext\n } = React.useContext(_configProvider.ConfigContext);\n const [visible, setVisible] = React.useState(true);\n const domProps = (0, _omit.default)(props, ['closeIcon', 'closable']);\n // Warning for deprecated usage\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Tag');\n warning.deprecated(!('visible' in tagProps), 'visible', 'visible && ');\n }\n React.useEffect(() => {\n if (deprecatedVisible !== undefined) {\n setVisible(deprecatedVisible);\n }\n }, [deprecatedVisible]);\n const isPreset = (0, _colors.isPresetColor)(color);\n const isStatus = (0, _colors.isPresetStatusColor)(color);\n const isInternalColor = isPreset || isStatus;\n const tagStyle = Object.assign(Object.assign({\n backgroundColor: color && !isInternalColor ? color : undefined\n }, tagContext === null || tagContext === void 0 ? void 0 : tagContext.style), style);\n const prefixCls = getPrefixCls('tag', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n // Style\n const tagClassName = (0, _classnames.default)(prefixCls, tagContext === null || tagContext === void 0 ? void 0 : tagContext.className, {\n [`${prefixCls}-${color}`]: isInternalColor,\n [`${prefixCls}-has-color`]: color && !isInternalColor,\n [`${prefixCls}-hidden`]: !visible,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-borderless`]: !bordered\n }, className, rootClassName, hashId, cssVarCls);\n const handleCloseClick = e => {\n e.stopPropagation();\n onClose === null || onClose === void 0 ? void 0 : onClose(e);\n if (e.defaultPrevented) {\n return;\n }\n setVisible(false);\n };\n const [, mergedCloseIcon] = (0, _useClosable.default)((0, _useClosable.pickClosable)(tagProps), (0, _useClosable.pickClosable)(tagContext), {\n closable: false,\n closeIconRender: iconNode => {\n const replacement = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-close-icon`,\n onClick: handleCloseClick\n }, iconNode);\n return (0, _reactNode.replaceElement)(iconNode, replacement, originProps => ({\n onClick: e => {\n var _a;\n (_a = originProps === null || originProps === void 0 ? void 0 : originProps.onClick) === null || _a === void 0 ? void 0 : _a.call(originProps, e);\n handleCloseClick(e);\n },\n className: (0, _classnames.default)(originProps === null || originProps === void 0 ? void 0 : originProps.className, `${prefixCls}-close-icon`)\n }));\n }\n });\n const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a';\n const iconNode = icon || null;\n const kids = iconNode ? (/*#__PURE__*/React.createElement(React.Fragment, null, iconNode, children && /*#__PURE__*/React.createElement(\"span\", null, children))) : children;\n const tagNode = /*#__PURE__*/React.createElement(\"span\", Object.assign({}, domProps, {\n ref: ref,\n className: tagClassName,\n style: tagStyle\n }), kids, mergedCloseIcon, isPreset && /*#__PURE__*/React.createElement(_presetCmp.default, {\n key: \"preset\",\n prefixCls: prefixCls\n }), isStatus && /*#__PURE__*/React.createElement(_statusCmp.default, {\n key: \"status\",\n prefixCls: prefixCls\n }));\n return wrapCSSVar(isNeedWave ? /*#__PURE__*/React.createElement(_wave.default, {\n component: \"Tag\"\n }, tagNode) : tagNode);\n});\nconst Tag = InternalTag;\nif (process.env.NODE_ENV !== 'production') {\n Tag.displayName = 'Tag';\n}\nTag.CheckableTag = _CheckableTag.default;\nvar _default = exports.default = Tag;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareToken = exports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\n// ============================== Styles ==============================\nconst genBaseStyle = token => {\n const {\n paddingXXS,\n lineWidth,\n tagPaddingHorizontal,\n componentCls,\n calc\n } = token;\n const paddingInline = calc(tagPaddingHorizontal).sub(lineWidth).equal();\n const iconMarginInline = calc(paddingXXS).sub(lineWidth).equal();\n return {\n // Result\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n display: 'inline-block',\n height: 'auto',\n // https://github.com/ant-design/ant-design/pull/47504\n marginInlineEnd: token.marginXS,\n paddingInline,\n fontSize: token.tagFontSize,\n lineHeight: token.tagLineHeight,\n whiteSpace: 'nowrap',\n background: token.defaultBg,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderRadius: token.borderRadiusSM,\n opacity: 1,\n transition: `all ${token.motionDurationMid}`,\n textAlign: 'start',\n position: 'relative',\n // RTL\n [`&${componentCls}-rtl`]: {\n direction: 'rtl'\n },\n '&, a, a:hover': {\n color: token.defaultColor\n },\n [`${componentCls}-close-icon`]: {\n marginInlineStart: iconMarginInline,\n fontSize: token.tagIconSize,\n color: token.colorTextDescription,\n cursor: 'pointer',\n transition: `all ${token.motionDurationMid}`,\n '&:hover': {\n color: token.colorTextHeading\n }\n },\n [`&${componentCls}-has-color`]: {\n borderColor: 'transparent',\n [`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: {\n color: token.colorTextLightSolid\n }\n },\n '&-checkable': {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n cursor: 'pointer',\n [`&:not(${componentCls}-checkable-checked):hover`]: {\n color: token.colorPrimary,\n backgroundColor: token.colorFillSecondary\n },\n '&:active, &-checked': {\n color: token.colorTextLightSolid\n },\n '&-checked': {\n backgroundColor: token.colorPrimary,\n '&:hover': {\n backgroundColor: token.colorPrimaryHover\n }\n },\n '&:active': {\n backgroundColor: token.colorPrimaryActive\n }\n },\n '&-hidden': {\n display: 'none'\n },\n // To ensure that a space will be placed between character and `Icon`.\n [`> ${token.iconCls} + span, > span + ${token.iconCls}`]: {\n marginInlineStart: paddingInline\n }\n }),\n [`${componentCls}-borderless`]: {\n borderColor: 'transparent',\n background: token.tagBorderlessBg\n }\n };\n};\n// ============================== Export ==============================\nconst prepareToken = token => {\n const {\n lineWidth,\n fontSizeIcon,\n calc\n } = token;\n const tagFontSize = token.fontSizeSM;\n const tagToken = (0, _internal.mergeToken)(token, {\n tagFontSize,\n tagLineHeight: (0, _cssinjs.unit)(calc(token.lineHeightSM).mul(tagFontSize).equal()),\n tagIconSize: calc(fontSizeIcon).sub(calc(lineWidth).mul(2)).equal(),\n // Tag icon is much smaller\n tagPaddingHorizontal: 8,\n // Fixed padding.\n tagBorderlessBg: token.defaultBg\n });\n return tagToken;\n};\nexports.prepareToken = prepareToken;\nconst prepareComponentToken = token => ({\n defaultBg: new _tinycolor.TinyColor(token.colorFillQuaternary).onBackground(token.colorBgContainer).toHexString(),\n defaultColor: token.colorText\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Tag', token => {\n const tagToken = prepareToken(token);\n return genBaseStyle(tagToken);\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ = require(\".\");\nvar _internal = require(\"../../theme/internal\");\n// Style as status component\n\n// ============================== Preset ==============================\nconst genPresetStyle = token => (0, _internal.genPresetColor)(token, (colorKey, _ref) => {\n let {\n textColor,\n lightBorderColor,\n lightColor,\n darkColor\n } = _ref;\n return {\n [`${token.componentCls}${token.componentCls}-${colorKey}`]: {\n color: textColor,\n background: lightColor,\n borderColor: lightBorderColor,\n // Inverse color\n '&-inverse': {\n color: token.colorTextLightSolid,\n background: darkColor,\n borderColor: darkColor\n },\n [`&${token.componentCls}-borderless`]: {\n borderColor: 'transparent'\n }\n }\n };\n});\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genSubStyleComponent)(['Tag', 'preset'], token => {\n const tagToken = (0, _.prepareToken)(token);\n return genPresetStyle(tagToken);\n}, _.prepareComponentToken);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ = require(\".\");\nvar _capitalize = _interopRequireDefault(require(\"../../_util/capitalize\"));\nvar _internal = require(\"../../theme/internal\");\nconst genTagStatusStyle = (token, status, cssVariableType) => {\n const capitalizedCssVariableType = (0, _capitalize.default)(cssVariableType);\n return {\n [`${token.componentCls}${token.componentCls}-${status}`]: {\n color: token[`color${cssVariableType}`],\n background: token[`color${capitalizedCssVariableType}Bg`],\n borderColor: token[`color${capitalizedCssVariableType}Border`],\n [`&${token.componentCls}-borderless`]: {\n borderColor: 'transparent'\n }\n }\n };\n};\n// ============================== Export ==============================\nvar _default = exports.default = (0, _internal.genSubStyleComponent)(['Tag', 'status'], token => {\n const tagToken = (0, _.prepareToken)(token);\n return [genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];\n}, _.prepareComponentToken);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultTheme = exports.defaultConfig = exports.DesignTokenContext = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _default = _interopRequireDefault(require(\"./themes/default\"));\nvar _seed = _interopRequireDefault(require(\"./themes/seed\"));\nconst defaultTheme = exports.defaultTheme = (0, _cssinjs.createTheme)(_default.default);\n// ================================ Context =================================\n// To ensure snapshot stable. We disable hashed in test env.\nconst defaultConfig = exports.defaultConfig = {\n token: _seed.default,\n override: {\n override: _seed.default\n },\n hashed: true\n};\nconst DesignTokenContext = exports.DesignTokenContext = /*#__PURE__*/_react.default.createContext(defaultConfig);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _default2 = _interopRequireDefault(require(\"./themes/default\"));\nvar _seed = _interopRequireDefault(require(\"./themes/seed\"));\nvar _alias = _interopRequireDefault(require(\"./util/alias\"));\nconst getDesignToken = config => {\n const theme = (config === null || config === void 0 ? void 0 : config.algorithm) ? (0, _cssinjs.createTheme)(config.algorithm) : (0, _cssinjs.createTheme)(_default2.default);\n const mergedToken = Object.assign(Object.assign({}, _seed.default), config === null || config === void 0 ? void 0 : config.token);\n return (0, _cssinjs.getComputedToken)(mergedToken, {\n override: config === null || config === void 0 ? void 0 : config.token\n }, theme, _alias.default);\n};\nvar _default = exports.default = getDesignToken;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _getDesignToken = _interopRequireDefault(require(\"./getDesignToken\"));\nvar _internal = require(\"./internal\");\nvar _compact = _interopRequireDefault(require(\"./themes/compact\"));\nvar _dark = _interopRequireDefault(require(\"./themes/dark\"));\nvar _default2 = _interopRequireDefault(require(\"./themes/default\"));\n// ZombieJ: We export as object to user but array in internal.\n// This is used to minimize the bundle size for antd package but safe to refactor as object also.\n// Please do not export internal `useToken` directly to avoid something export unexpected.\n/** Get current context Design Token. Will be different if you are using nest theme config. */\nfunction useToken() {\n const [theme, token, hashId] = (0, _internal.useToken)();\n return {\n theme,\n token,\n hashId\n };\n}\nvar _default = exports.default = {\n /** Default seedToken */\n defaultSeed: _internal.defaultConfig.token,\n useToken,\n defaultAlgorithm: _default2.default,\n darkAlgorithm: _dark.default,\n compactAlgorithm: _compact.default,\n getDesignToken: _getDesignToken.default,\n /**\n * @private Private variable\n * @warring 🔥 Do not use in production. 🔥\n */\n defaultConfig: _internal.defaultConfig,\n /**\n * @private Private variable\n * @warring 🔥 Do not use in production. 🔥\n */\n _internalContext: _internal.DesignTokenContext\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"PresetColors\", {\n enumerable: true,\n get: function () {\n return _presetColors.PresetColors;\n }\n});\nvar _presetColors = require(\"./presetColors\");","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PresetColors = void 0;\nconst PresetColors = exports.PresetColors = ['blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold'];","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"DesignTokenContext\", {\n enumerable: true,\n get: function () {\n return _context.DesignTokenContext;\n }\n});\nObject.defineProperty(exports, \"PresetColors\", {\n enumerable: true,\n get: function () {\n return _interface.PresetColors;\n }\n});\nObject.defineProperty(exports, \"calc\", {\n enumerable: true,\n get: function () {\n return _cssinjsUtils.genCalc;\n }\n});\nObject.defineProperty(exports, \"defaultConfig\", {\n enumerable: true,\n get: function () {\n return _context.defaultConfig;\n }\n});\nObject.defineProperty(exports, \"genComponentStyleHook\", {\n enumerable: true,\n get: function () {\n return _genStyleUtils.genComponentStyleHook;\n }\n});\nObject.defineProperty(exports, \"genPresetColor\", {\n enumerable: true,\n get: function () {\n return _genPresetColor.default;\n }\n});\nObject.defineProperty(exports, \"genStyleHooks\", {\n enumerable: true,\n get: function () {\n return _genStyleUtils.genStyleHooks;\n }\n});\nObject.defineProperty(exports, \"genSubStyleComponent\", {\n enumerable: true,\n get: function () {\n return _genStyleUtils.genSubStyleComponent;\n }\n});\nObject.defineProperty(exports, \"getLineHeight\", {\n enumerable: true,\n get: function () {\n return _genFontSizes.getLineHeight;\n }\n});\nObject.defineProperty(exports, \"mergeToken\", {\n enumerable: true,\n get: function () {\n return _cssinjsUtils.mergeToken;\n }\n});\nObject.defineProperty(exports, \"statistic\", {\n enumerable: true,\n get: function () {\n return _cssinjsUtils.statistic;\n }\n});\nObject.defineProperty(exports, \"statisticToken\", {\n enumerable: true,\n get: function () {\n return _cssinjsUtils.statisticToken;\n }\n});\nObject.defineProperty(exports, \"useResetIconStyle\", {\n enumerable: true,\n get: function () {\n return _useResetIconStyle.default;\n }\n});\nObject.defineProperty(exports, \"useStyleRegister\", {\n enumerable: true,\n get: function () {\n return _cssinjs.useStyleRegister;\n }\n});\nObject.defineProperty(exports, \"useToken\", {\n enumerable: true,\n get: function () {\n return _useToken.default;\n }\n});\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _cssinjsUtils = require(\"@ant-design/cssinjs-utils\");\nvar _interface = require(\"./interface\");\nvar _genFontSizes = require(\"./themes/shared/genFontSizes\");\nvar _useToken = _interopRequireDefault(require(\"./useToken\"));\nvar _genStyleUtils = require(\"./util/genStyleUtils\");\nvar _genPresetColor = _interopRequireDefault(require(\"./util/genPresetColor\"));\nvar _useResetIconStyle = _interopRequireDefault(require(\"./util/useResetIconStyle\"));\nvar _context = require(\"./context\");","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = genSizeMapToken;\nfunction genSizeMapToken(token) {\n const {\n sizeUnit,\n sizeStep\n } = token;\n const compactSizeStep = sizeStep - 2;\n return {\n sizeXXL: sizeUnit * (compactSizeStep + 10),\n sizeXL: sizeUnit * (compactSizeStep + 6),\n sizeLG: sizeUnit * (compactSizeStep + 2),\n sizeMD: sizeUnit * (compactSizeStep + 2),\n sizeMS: sizeUnit * (compactSizeStep + 1),\n size: sizeUnit * compactSizeStep,\n sizeSM: sizeUnit * compactSizeStep,\n sizeXS: sizeUnit * (compactSizeStep - 1),\n sizeXXS: sizeUnit * (compactSizeStep - 1)\n };\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default2 = _interopRequireDefault(require(\"../default\"));\nvar _genControlHeight = _interopRequireDefault(require(\"../shared/genControlHeight\"));\nvar _genFontMapToken = _interopRequireDefault(require(\"../shared/genFontMapToken\"));\nvar _genCompactSizeMapToken = _interopRequireDefault(require(\"./genCompactSizeMapToken\"));\nconst derivative = (token, mapToken) => {\n const mergedMapToken = mapToken !== null && mapToken !== void 0 ? mapToken : (0, _default2.default)(token);\n const fontSize = mergedMapToken.fontSizeSM; // Smaller size font-size as base\n const controlHeight = mergedMapToken.controlHeight - 4;\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, mergedMapToken), (0, _genCompactSizeMapToken.default)(mapToken !== null && mapToken !== void 0 ? mapToken : token)), (0, _genFontMapToken.default)(fontSize)), {\n // controlHeight\n controlHeight\n }), (0, _genControlHeight.default)(Object.assign(Object.assign({}, mergedMapToken), {\n controlHeight\n })));\n};\nvar _default = exports.default = derivative;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getSolidColor = exports.getAlphaColor = void 0;\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nconst getAlphaColor = (baseColor, alpha) => new _tinycolor.TinyColor(baseColor).setAlpha(alpha).toRgbString();\nexports.getAlphaColor = getAlphaColor;\nconst getSolidColor = (baseColor, brightness) => {\n const instance = new _tinycolor.TinyColor(baseColor);\n return instance.lighten(brightness).toHexString();\n};\nexports.getSolidColor = getSolidColor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generateNeutralColorPalettes = exports.generateColorPalettes = void 0;\nvar _colors = require(\"@ant-design/colors\");\nvar _colorAlgorithm = require(\"./colorAlgorithm\");\nconst generateColorPalettes = baseColor => {\n const colors = (0, _colors.generate)(baseColor, {\n theme: 'dark'\n });\n return {\n 1: colors[0],\n 2: colors[1],\n 3: colors[2],\n 4: colors[3],\n 5: colors[6],\n 6: colors[5],\n 7: colors[4],\n 8: colors[6],\n 9: colors[5],\n 10: colors[4]\n // 8: colors[9],\n // 9: colors[8],\n // 10: colors[7],\n };\n};\nexports.generateColorPalettes = generateColorPalettes;\nconst generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {\n const colorBgBase = bgBaseColor || '#000';\n const colorTextBase = textBaseColor || '#fff';\n return {\n colorBgBase,\n colorTextBase,\n colorText: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.85),\n colorTextSecondary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.65),\n colorTextTertiary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.45),\n colorTextQuaternary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.25),\n colorFill: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.18),\n colorFillSecondary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.12),\n colorFillTertiary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.08),\n colorFillQuaternary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.04),\n colorBgSolid: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.95),\n colorBgSolidHover: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 1),\n colorBgSolidActive: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.9),\n colorBgElevated: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 12),\n colorBgContainer: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 8),\n colorBgLayout: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 0),\n colorBgSpotlight: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 26),\n colorBgBlur: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.04),\n colorBorder: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 26),\n colorBorderSecondary: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 19)\n };\n};\nexports.generateNeutralColorPalettes = generateNeutralColorPalettes;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _colors = require(\"@ant-design/colors\");\nvar _default2 = _interopRequireDefault(require(\"../default\"));\nvar _seed = require(\"../seed\");\nvar _genColorMapToken = _interopRequireDefault(require(\"../shared/genColorMapToken\"));\nvar _colors2 = require(\"./colors\");\nconst derivative = (token, mapToken) => {\n const colorPalettes = Object.keys(_seed.defaultPresetColors).map(colorKey => {\n const colors = (0, _colors.generate)(token[colorKey], {\n theme: 'dark'\n });\n return new Array(10).fill(1).reduce((prev, _, i) => {\n prev[`${colorKey}-${i + 1}`] = colors[i];\n prev[`${colorKey}${i + 1}`] = colors[i];\n return prev;\n }, {});\n }).reduce((prev, cur) => {\n // biome-ignore lint/style/noParameterAssign: it is a reduce\n prev = Object.assign(Object.assign({}, prev), cur);\n return prev;\n }, {});\n const mergedMapToken = mapToken !== null && mapToken !== void 0 ? mapToken : (0, _default2.default)(token);\n return Object.assign(Object.assign(Object.assign({}, mergedMapToken), colorPalettes), (0, _genColorMapToken.default)(token, {\n generateColorPalettes: _colors2.generateColorPalettes,\n generateNeutralColorPalettes: _colors2.generateNeutralColorPalettes\n }));\n};\nvar _default = exports.default = derivative;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getSolidColor = exports.getAlphaColor = void 0;\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nconst getAlphaColor = (baseColor, alpha) => new _tinycolor.TinyColor(baseColor).setAlpha(alpha).toRgbString();\nexports.getAlphaColor = getAlphaColor;\nconst getSolidColor = (baseColor, brightness) => {\n const instance = new _tinycolor.TinyColor(baseColor);\n return instance.darken(brightness).toHexString();\n};\nexports.getSolidColor = getSolidColor;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generateNeutralColorPalettes = exports.generateColorPalettes = void 0;\nvar _colors = require(\"@ant-design/colors\");\nvar _colorAlgorithm = require(\"./colorAlgorithm\");\nconst generateColorPalettes = baseColor => {\n const colors = (0, _colors.generate)(baseColor);\n return {\n 1: colors[0],\n 2: colors[1],\n 3: colors[2],\n 4: colors[3],\n 5: colors[4],\n 6: colors[5],\n 7: colors[6],\n 8: colors[4],\n 9: colors[5],\n 10: colors[6]\n // 8: colors[7],\n // 9: colors[8],\n // 10: colors[9],\n };\n};\nexports.generateColorPalettes = generateColorPalettes;\nconst generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {\n const colorBgBase = bgBaseColor || '#fff';\n const colorTextBase = textBaseColor || '#000';\n return {\n colorBgBase,\n colorTextBase,\n colorText: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.88),\n colorTextSecondary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.65),\n colorTextTertiary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.45),\n colorTextQuaternary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.25),\n colorFill: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.15),\n colorFillSecondary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.06),\n colorFillTertiary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.04),\n colorFillQuaternary: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.02),\n colorBgSolid: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 1),\n colorBgSolidHover: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.75),\n colorBgSolidActive: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.95),\n colorBgLayout: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 4),\n colorBgContainer: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 0),\n colorBgElevated: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 0),\n colorBgSpotlight: (0, _colorAlgorithm.getAlphaColor)(colorTextBase, 0.85),\n colorBgBlur: 'transparent',\n colorBorder: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 15),\n colorBorderSecondary: (0, _colorAlgorithm.getSolidColor)(colorBgBase, 6)\n };\n};\nexports.generateNeutralColorPalettes = generateNeutralColorPalettes;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = derivative;\nvar _colors = require(\"@ant-design/colors\");\nvar _seed = require(\"../seed\");\nvar _genColorMapToken = _interopRequireDefault(require(\"../shared/genColorMapToken\"));\nvar _genCommonMapToken = _interopRequireDefault(require(\"../shared/genCommonMapToken\"));\nvar _genControlHeight = _interopRequireDefault(require(\"../shared/genControlHeight\"));\nvar _genFontMapToken = _interopRequireDefault(require(\"../shared/genFontMapToken\"));\nvar _genSizeMapToken = _interopRequireDefault(require(\"../shared/genSizeMapToken\"));\nvar _colors2 = require(\"./colors\");\nfunction derivative(token) {\n // pink is deprecated name of magenta, keep this for backwards compatibility\n _colors.presetPrimaryColors.pink = _colors.presetPrimaryColors.magenta;\n _colors.presetPalettes.pink = _colors.presetPalettes.magenta;\n const colorPalettes = Object.keys(_seed.defaultPresetColors).map(colorKey => {\n const colors = token[colorKey] === _colors.presetPrimaryColors[colorKey] ? _colors.presetPalettes[colorKey] : (0, _colors.generate)(token[colorKey]);\n return new Array(10).fill(1).reduce((prev, _, i) => {\n prev[`${colorKey}-${i + 1}`] = colors[i];\n prev[`${colorKey}${i + 1}`] = colors[i];\n return prev;\n }, {});\n }).reduce((prev, cur) => {\n // biome-ignore lint/style/noParameterAssign: it is a reduce\n prev = Object.assign(Object.assign({}, prev), cur);\n return prev;\n }, {});\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, token), colorPalettes), (0, _genColorMapToken.default)(token, {\n generateColorPalettes: _colors2.generateColorPalettes,\n generateNeutralColorPalettes: _colors2.generateNeutralColorPalettes\n })), (0, _genFontMapToken.default)(token.fontSize)), (0, _genSizeMapToken.default)(token)), (0, _genControlHeight.default)(token)), (0, _genCommonMapToken.default)(token));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultPresetColors = exports.default = void 0;\nconst defaultPresetColors = exports.defaultPresetColors = {\n blue: '#1677FF',\n purple: '#722ED1',\n cyan: '#13C2C2',\n green: '#52C41A',\n magenta: '#EB2F96',\n /**\n * @deprecated Use magenta instead\n */\n pink: '#EB2F96',\n red: '#F5222D',\n orange: '#FA8C16',\n yellow: '#FADB14',\n volcano: '#FA541C',\n geekblue: '#2F54EB',\n gold: '#FAAD14',\n lime: '#A0D911'\n};\nconst seedToken = Object.assign(Object.assign({}, defaultPresetColors), {\n // Color\n colorPrimary: '#1677ff',\n colorSuccess: '#52c41a',\n colorWarning: '#faad14',\n colorError: '#ff4d4f',\n colorInfo: '#1677ff',\n colorLink: '',\n colorTextBase: '',\n colorBgBase: '',\n // Font\n fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'`,\n fontFamilyCode: `'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,\n fontSize: 14,\n // Line\n lineWidth: 1,\n lineType: 'solid',\n // Motion\n motionUnit: 0.1,\n motionBase: 0,\n motionEaseOutCirc: 'cubic-bezier(0.08, 0.82, 0.17, 1)',\n motionEaseInOutCirc: 'cubic-bezier(0.78, 0.14, 0.15, 0.86)',\n motionEaseOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n motionEaseInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',\n motionEaseOutBack: 'cubic-bezier(0.12, 0.4, 0.29, 1.46)',\n motionEaseInBack: 'cubic-bezier(0.71, -0.46, 0.88, 0.6)',\n motionEaseInQuint: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',\n motionEaseOutQuint: 'cubic-bezier(0.23, 1, 0.32, 1)',\n // Radius\n borderRadius: 6,\n // Size\n sizeUnit: 4,\n sizeStep: 4,\n sizePopupArrow: 16,\n // Control Base\n controlHeight: 32,\n // zIndex\n zIndexBase: 0,\n zIndexPopupBase: 1000,\n // Image\n opacityImage: 1,\n // Wireframe\n wireframe: false,\n // Motion\n motion: true\n});\nvar _default = exports.default = seedToken;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = genColorMapToken;\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nfunction genColorMapToken(seed, _ref) {\n let {\n generateColorPalettes,\n generateNeutralColorPalettes\n } = _ref;\n const {\n colorSuccess: colorSuccessBase,\n colorWarning: colorWarningBase,\n colorError: colorErrorBase,\n colorInfo: colorInfoBase,\n colorPrimary: colorPrimaryBase,\n colorBgBase,\n colorTextBase\n } = seed;\n const primaryColors = generateColorPalettes(colorPrimaryBase);\n const successColors = generateColorPalettes(colorSuccessBase);\n const warningColors = generateColorPalettes(colorWarningBase);\n const errorColors = generateColorPalettes(colorErrorBase);\n const infoColors = generateColorPalettes(colorInfoBase);\n const neutralColors = generateNeutralColorPalettes(colorBgBase, colorTextBase);\n // Color Link\n const colorLink = seed.colorLink || seed.colorInfo;\n const linkColors = generateColorPalettes(colorLink);\n const colorErrorBgFilledHover = new _tinycolor.TinyColor(errorColors[1]).mix(new _tinycolor.TinyColor(errorColors[3]), 50).toHexString();\n return Object.assign(Object.assign({}, neutralColors), {\n colorPrimaryBg: primaryColors[1],\n colorPrimaryBgHover: primaryColors[2],\n colorPrimaryBorder: primaryColors[3],\n colorPrimaryBorderHover: primaryColors[4],\n colorPrimaryHover: primaryColors[5],\n colorPrimary: primaryColors[6],\n colorPrimaryActive: primaryColors[7],\n colorPrimaryTextHover: primaryColors[8],\n colorPrimaryText: primaryColors[9],\n colorPrimaryTextActive: primaryColors[10],\n colorSuccessBg: successColors[1],\n colorSuccessBgHover: successColors[2],\n colorSuccessBorder: successColors[3],\n colorSuccessBorderHover: successColors[4],\n colorSuccessHover: successColors[4],\n colorSuccess: successColors[6],\n colorSuccessActive: successColors[7],\n colorSuccessTextHover: successColors[8],\n colorSuccessText: successColors[9],\n colorSuccessTextActive: successColors[10],\n colorErrorBg: errorColors[1],\n colorErrorBgHover: errorColors[2],\n colorErrorBgFilledHover,\n colorErrorBgActive: errorColors[3],\n colorErrorBorder: errorColors[3],\n colorErrorBorderHover: errorColors[4],\n colorErrorHover: errorColors[5],\n colorError: errorColors[6],\n colorErrorActive: errorColors[7],\n colorErrorTextHover: errorColors[8],\n colorErrorText: errorColors[9],\n colorErrorTextActive: errorColors[10],\n colorWarningBg: warningColors[1],\n colorWarningBgHover: warningColors[2],\n colorWarningBorder: warningColors[3],\n colorWarningBorderHover: warningColors[4],\n colorWarningHover: warningColors[4],\n colorWarning: warningColors[6],\n colorWarningActive: warningColors[7],\n colorWarningTextHover: warningColors[8],\n colorWarningText: warningColors[9],\n colorWarningTextActive: warningColors[10],\n colorInfoBg: infoColors[1],\n colorInfoBgHover: infoColors[2],\n colorInfoBorder: infoColors[3],\n colorInfoBorderHover: infoColors[4],\n colorInfoHover: infoColors[4],\n colorInfo: infoColors[6],\n colorInfoActive: infoColors[7],\n colorInfoTextHover: infoColors[8],\n colorInfoText: infoColors[9],\n colorInfoTextActive: infoColors[10],\n colorLinkHover: linkColors[4],\n colorLink: linkColors[6],\n colorLinkActive: linkColors[7],\n colorBgMask: new _tinycolor.TinyColor('#000').setAlpha(0.45).toRgbString(),\n colorWhite: '#fff'\n });\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = genCommonMapToken;\nvar _genRadius = _interopRequireDefault(require(\"./genRadius\"));\nfunction genCommonMapToken(token) {\n const {\n motionUnit,\n motionBase,\n borderRadius,\n lineWidth\n } = token;\n return Object.assign({\n // motion\n motionDurationFast: `${(motionBase + motionUnit).toFixed(1)}s`,\n motionDurationMid: `${(motionBase + motionUnit * 2).toFixed(1)}s`,\n motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,\n // line\n lineWidthBold: lineWidth + 1\n }, (0, _genRadius.default)(borderRadius));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genControlHeight = token => {\n const {\n controlHeight\n } = token;\n return {\n controlHeightSM: controlHeight * 0.75,\n controlHeightXS: controlHeight * 0.5,\n controlHeightLG: controlHeight * 1.25\n };\n};\nvar _default = exports.default = genControlHeight;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _genFontSizes = _interopRequireDefault(require(\"./genFontSizes\"));\nconst genFontMapToken = fontSize => {\n const fontSizePairs = (0, _genFontSizes.default)(fontSize);\n const fontSizes = fontSizePairs.map(pair => pair.size);\n const lineHeights = fontSizePairs.map(pair => pair.lineHeight);\n const fontSizeMD = fontSizes[1];\n const fontSizeSM = fontSizes[0];\n const fontSizeLG = fontSizes[2];\n const lineHeight = lineHeights[1];\n const lineHeightSM = lineHeights[0];\n const lineHeightLG = lineHeights[2];\n return {\n fontSizeSM,\n fontSize: fontSizeMD,\n fontSizeLG,\n fontSizeXL: fontSizes[3],\n fontSizeHeading1: fontSizes[6],\n fontSizeHeading2: fontSizes[5],\n fontSizeHeading3: fontSizes[4],\n fontSizeHeading4: fontSizes[3],\n fontSizeHeading5: fontSizes[2],\n lineHeight,\n lineHeightLG,\n lineHeightSM,\n fontHeight: Math.round(lineHeight * fontSizeMD),\n fontHeightLG: Math.round(lineHeightLG * fontSizeLG),\n fontHeightSM: Math.round(lineHeightSM * fontSizeSM),\n lineHeightHeading1: lineHeights[6],\n lineHeightHeading2: lineHeights[5],\n lineHeightHeading3: lineHeights[4],\n lineHeightHeading4: lineHeights[3],\n lineHeightHeading5: lineHeights[2]\n };\n};\nvar _default = exports.default = genFontMapToken;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getFontSizes;\nexports.getLineHeight = getLineHeight;\nfunction getLineHeight(fontSize) {\n return (fontSize + 8) / fontSize;\n}\n// https://zhuanlan.zhihu.com/p/32746810\nfunction getFontSizes(base) {\n const fontSizes = new Array(10).fill(null).map((_, index) => {\n const i = index - 1;\n const baseSize = base * Math.pow(Math.E, i / 5);\n const intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);\n // Convert to even\n return Math.floor(intSize / 2) * 2;\n });\n fontSizes[1] = base;\n return fontSizes.map(size => ({\n size,\n lineHeight: getLineHeight(size)\n }));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst genRadius = radiusBase => {\n let radiusLG = radiusBase;\n let radiusSM = radiusBase;\n let radiusXS = radiusBase;\n let radiusOuter = radiusBase;\n // radiusLG\n if (radiusBase < 6 && radiusBase >= 5) {\n radiusLG = radiusBase + 1;\n } else if (radiusBase < 16 && radiusBase >= 6) {\n radiusLG = radiusBase + 2;\n } else if (radiusBase >= 16) {\n radiusLG = 16;\n }\n // radiusSM\n if (radiusBase < 7 && radiusBase >= 5) {\n radiusSM = 4;\n } else if (radiusBase < 8 && radiusBase >= 7) {\n radiusSM = 5;\n } else if (radiusBase < 14 && radiusBase >= 8) {\n radiusSM = 6;\n } else if (radiusBase < 16 && radiusBase >= 14) {\n radiusSM = 7;\n } else if (radiusBase >= 16) {\n radiusSM = 8;\n }\n // radiusXS\n if (radiusBase < 6 && radiusBase >= 2) {\n radiusXS = 1;\n } else if (radiusBase >= 6) {\n radiusXS = 2;\n }\n // radiusOuter\n if (radiusBase > 4 && radiusBase < 8) {\n radiusOuter = 4;\n } else if (radiusBase >= 8) {\n radiusOuter = 6;\n }\n return {\n borderRadius: radiusBase,\n borderRadiusXS: radiusXS,\n borderRadiusSM: radiusSM,\n borderRadiusLG: radiusLG,\n borderRadiusOuter: radiusOuter\n };\n};\nvar _default = exports.default = genRadius;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = genSizeMapToken;\nfunction genSizeMapToken(token) {\n const {\n sizeUnit,\n sizeStep\n } = token;\n return {\n sizeXXL: sizeUnit * (sizeStep + 8),\n // 48\n sizeXL: sizeUnit * (sizeStep + 4),\n // 32\n sizeLG: sizeUnit * (sizeStep + 2),\n // 24\n sizeMD: sizeUnit * (sizeStep + 1),\n // 20\n sizeMS: sizeUnit * sizeStep,\n // 16\n size: sizeUnit * sizeStep,\n // 16\n sizeSM: sizeUnit * (sizeStep - 1),\n // 12\n sizeXS: sizeUnit * (sizeStep - 2),\n // 8\n sizeXXS: sizeUnit * (sizeStep - 3) // 4\n };\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useToken;\nexports.unitless = exports.ignore = exports.getComputedToken = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _version = _interopRequireDefault(require(\"../version\"));\nvar _context = require(\"./context\");\nvar _seed = _interopRequireDefault(require(\"./themes/seed\"));\nvar _alias = _interopRequireDefault(require(\"./util/alias\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst unitless = exports.unitless = {\n lineHeight: true,\n lineHeightSM: true,\n lineHeightLG: true,\n lineHeightHeading1: true,\n lineHeightHeading2: true,\n lineHeightHeading3: true,\n lineHeightHeading4: true,\n lineHeightHeading5: true,\n opacityLoading: true,\n fontWeightStrong: true,\n zIndexPopupBase: true,\n zIndexBase: true,\n opacityImage: true\n};\nconst ignore = exports.ignore = {\n size: true,\n sizeSM: true,\n sizeLG: true,\n sizeMD: true,\n sizeXS: true,\n sizeXXS: true,\n sizeMS: true,\n sizeXL: true,\n sizeXXL: true,\n sizeUnit: true,\n sizeStep: true,\n motionBase: true,\n motionUnit: true\n};\nconst preserve = {\n screenXS: true,\n screenXSMin: true,\n screenXSMax: true,\n screenSM: true,\n screenSMMin: true,\n screenSMMax: true,\n screenMD: true,\n screenMDMin: true,\n screenMDMax: true,\n screenLG: true,\n screenLGMin: true,\n screenLGMax: true,\n screenXL: true,\n screenXLMin: true,\n screenXLMax: true,\n screenXXL: true,\n screenXXLMin: true\n};\nconst getComputedToken = (originToken, overrideToken, theme) => {\n const derivativeToken = theme.getDerivativeToken(originToken);\n const {\n override\n } = overrideToken,\n components = __rest(overrideToken, [\"override\"]);\n // Merge with override\n let mergedDerivativeToken = Object.assign(Object.assign({}, derivativeToken), {\n override\n });\n // Format if needed\n mergedDerivativeToken = (0, _alias.default)(mergedDerivativeToken);\n if (components) {\n Object.entries(components).forEach(_ref => {\n let [key, value] = _ref;\n const {\n theme: componentTheme\n } = value,\n componentTokens = __rest(value, [\"theme\"]);\n let mergedComponentToken = componentTokens;\n if (componentTheme) {\n mergedComponentToken = getComputedToken(Object.assign(Object.assign({}, mergedDerivativeToken), componentTokens), {\n override: componentTokens\n }, componentTheme);\n }\n mergedDerivativeToken[key] = mergedComponentToken;\n });\n }\n return mergedDerivativeToken;\n};\n// ================================== Hook ==================================\nexports.getComputedToken = getComputedToken;\nfunction useToken() {\n const {\n token: rootDesignToken,\n hashed,\n theme,\n override,\n cssVar\n } = _react.default.useContext(_context.DesignTokenContext);\n const salt = `${_version.default}-${hashed || ''}`;\n const mergedTheme = theme || _context.defaultTheme;\n const [token, hashId, realToken] = (0, _cssinjs.useCacheToken)(mergedTheme, [_seed.default, rootDesignToken], {\n salt,\n override,\n getComputedToken,\n // formatToken will not be consumed after 1.15.0 with getComputedToken.\n // But token will break if @ant-design/cssinjs is under 1.15.0 without it\n formatToken: _alias.default,\n cssVar: cssVar && {\n prefix: cssVar.prefix,\n key: cssVar.key,\n unitless,\n ignore,\n preserve\n }\n });\n return [mergedTheme, realToken, hashed ? hashId : '', token, cssVar];\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = formatToken;\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _seed = _interopRequireDefault(require(\"../themes/seed\"));\nvar _getAlphaColor = _interopRequireDefault(require(\"./getAlphaColor\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/**\n * Seed (designer) > Derivative (designer) > Alias (developer).\n *\n * Merge seed & derivative & override token and generate alias token for developer.\n */\nfunction formatToken(derivativeToken) {\n const {\n override\n } = derivativeToken,\n restToken = __rest(derivativeToken, [\"override\"]);\n const overrideTokens = Object.assign({}, override);\n Object.keys(_seed.default).forEach(token => {\n delete overrideTokens[token];\n });\n const mergedToken = Object.assign(Object.assign({}, restToken), overrideTokens);\n const screenXS = 480;\n const screenSM = 576;\n const screenMD = 768;\n const screenLG = 992;\n const screenXL = 1200;\n const screenXXL = 1600;\n // Motion\n if (mergedToken.motion === false) {\n const fastDuration = '0s';\n mergedToken.motionDurationFast = fastDuration;\n mergedToken.motionDurationMid = fastDuration;\n mergedToken.motionDurationSlow = fastDuration;\n }\n // Generate alias token\n const aliasToken = Object.assign(Object.assign(Object.assign({}, mergedToken), {\n // ============== Background ============== //\n colorFillContent: mergedToken.colorFillSecondary,\n colorFillContentHover: mergedToken.colorFill,\n colorFillAlter: mergedToken.colorFillQuaternary,\n colorBgContainerDisabled: mergedToken.colorFillTertiary,\n // ============== Split ============== //\n colorBorderBg: mergedToken.colorBgContainer,\n colorSplit: (0, _getAlphaColor.default)(mergedToken.colorBorderSecondary, mergedToken.colorBgContainer),\n // ============== Text ============== //\n colorTextPlaceholder: mergedToken.colorTextQuaternary,\n colorTextDisabled: mergedToken.colorTextQuaternary,\n colorTextHeading: mergedToken.colorText,\n colorTextLabel: mergedToken.colorTextSecondary,\n colorTextDescription: mergedToken.colorTextTertiary,\n colorTextLightSolid: mergedToken.colorWhite,\n colorHighlight: mergedToken.colorError,\n colorBgTextHover: mergedToken.colorFillSecondary,\n colorBgTextActive: mergedToken.colorFill,\n colorIcon: mergedToken.colorTextTertiary,\n colorIconHover: mergedToken.colorText,\n colorErrorOutline: (0, _getAlphaColor.default)(mergedToken.colorErrorBg, mergedToken.colorBgContainer),\n colorWarningOutline: (0, _getAlphaColor.default)(mergedToken.colorWarningBg, mergedToken.colorBgContainer),\n // Font\n fontSizeIcon: mergedToken.fontSizeSM,\n // Line\n lineWidthFocus: mergedToken.lineWidth * 3,\n // Control\n lineWidth: mergedToken.lineWidth,\n controlOutlineWidth: mergedToken.lineWidth * 2,\n // Checkbox size and expand icon size\n controlInteractiveSize: mergedToken.controlHeight / 2,\n controlItemBgHover: mergedToken.colorFillTertiary,\n controlItemBgActive: mergedToken.colorPrimaryBg,\n controlItemBgActiveHover: mergedToken.colorPrimaryBgHover,\n controlItemBgActiveDisabled: mergedToken.colorFill,\n controlTmpOutline: mergedToken.colorFillQuaternary,\n controlOutline: (0, _getAlphaColor.default)(mergedToken.colorPrimaryBg, mergedToken.colorBgContainer),\n lineType: mergedToken.lineType,\n borderRadius: mergedToken.borderRadius,\n borderRadiusXS: mergedToken.borderRadiusXS,\n borderRadiusSM: mergedToken.borderRadiusSM,\n borderRadiusLG: mergedToken.borderRadiusLG,\n fontWeightStrong: 600,\n opacityLoading: 0.65,\n linkDecoration: 'none',\n linkHoverDecoration: 'none',\n linkFocusDecoration: 'none',\n controlPaddingHorizontal: 12,\n controlPaddingHorizontalSM: 8,\n paddingXXS: mergedToken.sizeXXS,\n paddingXS: mergedToken.sizeXS,\n paddingSM: mergedToken.sizeSM,\n padding: mergedToken.size,\n paddingMD: mergedToken.sizeMD,\n paddingLG: mergedToken.sizeLG,\n paddingXL: mergedToken.sizeXL,\n paddingContentHorizontalLG: mergedToken.sizeLG,\n paddingContentVerticalLG: mergedToken.sizeMS,\n paddingContentHorizontal: mergedToken.sizeMS,\n paddingContentVertical: mergedToken.sizeSM,\n paddingContentHorizontalSM: mergedToken.size,\n paddingContentVerticalSM: mergedToken.sizeXS,\n marginXXS: mergedToken.sizeXXS,\n marginXS: mergedToken.sizeXS,\n marginSM: mergedToken.sizeSM,\n margin: mergedToken.size,\n marginMD: mergedToken.sizeMD,\n marginLG: mergedToken.sizeLG,\n marginXL: mergedToken.sizeXL,\n marginXXL: mergedToken.sizeXXL,\n boxShadow: `\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowSecondary: `\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowTertiary: `\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n `,\n screenXS,\n screenXSMin: screenXS,\n screenXSMax: screenSM - 1,\n screenSM,\n screenSMMin: screenSM,\n screenSMMax: screenMD - 1,\n screenMD,\n screenMDMin: screenMD,\n screenMDMax: screenLG - 1,\n screenLG,\n screenLGMin: screenLG,\n screenLGMax: screenXL - 1,\n screenXL,\n screenXLMin: screenXL,\n screenXLMax: screenXXL - 1,\n screenXXL,\n screenXXLMin: screenXXL,\n boxShadowPopoverArrow: '2px 2px 5px rgba(0, 0, 0, 0.05)',\n boxShadowCard: `\n 0 1px 2px -2px ${new _tinycolor.TinyColor('rgba(0, 0, 0, 0.16)').toRgbString()},\n 0 3px 6px 0 ${new _tinycolor.TinyColor('rgba(0, 0, 0, 0.12)').toRgbString()},\n 0 5px 12px 4px ${new _tinycolor.TinyColor('rgba(0, 0, 0, 0.09)').toRgbString()}\n `,\n boxShadowDrawerRight: `\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowDrawerLeft: `\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowDrawerUp: `\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowDrawerDown: `\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowTabsOverflowLeft: 'inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)',\n boxShadowTabsOverflowRight: 'inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)',\n boxShadowTabsOverflowTop: 'inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)',\n boxShadowTabsOverflowBottom: 'inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)'\n }), overrideTokens);\n return aliasToken;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = genPresetColor;\nvar _interface = require(\"../interface\");\nfunction genPresetColor(token, genCss) {\n return _interface.PresetColors.reduce((prev, colorKey) => {\n const lightColor = token[`${colorKey}1`];\n const lightBorderColor = token[`${colorKey}3`];\n const darkColor = token[`${colorKey}6`];\n const textColor = token[`${colorKey}7`];\n return Object.assign(Object.assign({}, prev), genCss(colorKey, {\n lightColor,\n lightBorderColor,\n darkColor,\n textColor\n }));\n }, {});\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genSubStyleComponent = exports.genStyleHooks = exports.genComponentStyleHook = void 0;\nvar _react = require(\"react\");\nvar _cssinjsUtils = require(\"@ant-design/cssinjs-utils\");\nvar _context = require(\"../../config-provider/context\");\nvar _style = require(\"../../style\");\nvar _useToken = _interopRequireWildcard(require(\"../useToken\"));\nvar _useResetIconStyle = _interopRequireDefault(require(\"./useResetIconStyle\"));\nconst {\n genStyleHooks,\n genComponentStyleHook,\n genSubStyleComponent\n} = (0, _cssinjsUtils.genStyleUtils)({\n usePrefix: () => {\n const {\n getPrefixCls,\n iconPrefixCls\n } = (0, _react.useContext)(_context.ConfigContext);\n const rootPrefixCls = getPrefixCls();\n return {\n rootPrefixCls,\n iconPrefixCls\n };\n },\n useToken: () => {\n const [theme, realToken, hashId, token, cssVar] = (0, _useToken.default)();\n return {\n theme,\n realToken,\n hashId,\n token,\n cssVar\n };\n },\n useCSP: () => {\n const {\n csp,\n iconPrefixCls\n } = (0, _react.useContext)(_context.ConfigContext);\n // Generate style for icons\n (0, _useResetIconStyle.default)(iconPrefixCls, csp);\n return csp !== null && csp !== void 0 ? csp : {};\n },\n getResetStyles: token => [{\n '&': (0, _style.genLinkStyle)(token)\n }],\n getCommonStyle: _style.genCommonStyle,\n getCompUnitless: () => _useToken.unitless\n});\nexports.genSubStyleComponent = genSubStyleComponent;\nexports.genComponentStyleHook = genComponentStyleHook;\nexports.genStyleHooks = genStyleHooks;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nfunction isStableColor(color) {\n return color >= 0 && color <= 255;\n}\nfunction getAlphaColor(frontColor, backgroundColor) {\n const {\n r: fR,\n g: fG,\n b: fB,\n a: originAlpha\n } = new _tinycolor.TinyColor(frontColor).toRgb();\n if (originAlpha < 1) {\n return frontColor;\n }\n const {\n r: bR,\n g: bG,\n b: bB\n } = new _tinycolor.TinyColor(backgroundColor).toRgb();\n for (let fA = 0.01; fA <= 1; fA += 0.01) {\n const r = Math.round((fR - bR * (1 - fA)) / fA);\n const g = Math.round((fG - bG * (1 - fA)) / fA);\n const b = Math.round((fB - bB * (1 - fA)) / fA);\n if (isStableColor(r) && isStableColor(g) && isStableColor(b)) {\n return new _tinycolor.TinyColor({\n r,\n g,\n b,\n a: Math.round(fA * 100) / 100\n }).toRgbString();\n }\n }\n // fallback\n /* istanbul ignore next */\n return new _tinycolor.TinyColor({\n r: fR,\n g: fG,\n b: fB,\n a: 1\n }).toRgbString();\n}\nvar _default = exports.default = getAlphaColor;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _useToken = _interopRequireDefault(require(\"../useToken\"));\nconst useResetIconStyle = (iconPrefixCls, csp) => {\n const [theme, token] = (0, _useToken.default)();\n // Generate style for icons\n return (0, _cssinjs.useStyleRegister)({\n theme,\n token,\n hashId: '',\n path: ['ant-design-icons', iconPrefixCls],\n nonce: () => csp === null || csp === void 0 ? void 0 : csp.nonce,\n layer: {\n name: 'antd'\n }\n }, () => [{\n [`.${iconPrefixCls}`]: Object.assign(Object.assign({}, (0, _style.resetIcon)()), {\n [`.${iconPrefixCls} .${iconPrefixCls}-icon`]: {\n display: 'block'\n }\n })\n }]);\n};\nvar _default = exports.default = useResetIconStyle;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _warning = require(\"../_util/warning\");\nvar _datePicker = _interopRequireDefault(require(\"../date-picker\"));\nvar _useVariants = _interopRequireDefault(require(\"../form/hooks/useVariants\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst {\n TimePicker: InternalTimePicker,\n RangePicker: InternalRangePicker\n} = _datePicker.default;\nconst RangePicker = /*#__PURE__*/React.forwardRef((props, ref) => (/*#__PURE__*/React.createElement(InternalRangePicker, Object.assign({}, props, {\n picker: \"time\",\n mode: undefined,\n ref: ref\n}))));\nconst TimePicker = /*#__PURE__*/React.forwardRef((_a, ref) => {\n var {\n addon,\n renderExtraFooter,\n variant,\n bordered\n } = _a,\n restProps = __rest(_a, [\"addon\", \"renderExtraFooter\", \"variant\", \"bordered\"]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('TimePicker');\n warning.deprecated(!addon, 'addon', 'renderExtraFooter');\n }\n const [mergedVariant] = (0, _useVariants.default)('timePicker', variant, bordered);\n const internalRenderExtraFooter = React.useMemo(() => {\n if (renderExtraFooter) {\n return renderExtraFooter;\n }\n if (addon) {\n return addon;\n }\n return undefined;\n }, [addon, renderExtraFooter]);\n return /*#__PURE__*/React.createElement(InternalTimePicker, Object.assign({}, restProps, {\n mode: undefined,\n ref: ref,\n renderExtraFooter: internalRenderExtraFooter,\n variant: mergedVariant\n }));\n});\nif (process.env.NODE_ENV !== 'production') {\n TimePicker.displayName = 'TimePicker';\n}\n// We don't care debug panel\n/* istanbul ignore next */\nconst PurePanel = (0, _PurePanel.default)(TimePicker, 'picker');\nTimePicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nTimePicker.RangePicker = RangePicker;\nTimePicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nvar _default = exports.default = TimePicker;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst locale = {\n placeholder: 'Select time',\n rangePlaceholder: ['Start time', 'End time']\n};\nvar _default = exports.default = locale;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _TimelineItem = _interopRequireDefault(require(\"./TimelineItem\"));\nvar _TimelineItemList = _interopRequireDefault(require(\"./TimelineItemList\"));\nvar _useItems = _interopRequireDefault(require(\"./useItems\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n// CSSINJS\n\nconst Timeline = props => {\n const {\n getPrefixCls,\n direction,\n timeline\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n children,\n items,\n className,\n style\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"children\", \"items\", \"className\", \"style\"]);\n const prefixCls = getPrefixCls('timeline', customizePrefixCls);\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Timeline');\n warning.deprecated(!children, 'Timeline.Item', 'items');\n }\n // Style\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const mergedItems = (0, _useItems.default)(items, children);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_TimelineItemList.default, Object.assign({}, restProps, {\n className: (0, _classnames.default)(timeline === null || timeline === void 0 ? void 0 : timeline.className, className, cssVarCls, rootCls),\n style: Object.assign(Object.assign({}, timeline === null || timeline === void 0 ? void 0 : timeline.style), style),\n prefixCls: prefixCls,\n direction: direction,\n items: mergedItems,\n hashId: hashId\n })));\n};\nTimeline.Item = _TimelineItem.default;\nif (process.env.NODE_ENV !== 'production') {\n Timeline.displayName = 'Timeline';\n}\nvar _default = exports.default = Timeline;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _configProvider = require(\"../config-provider\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst TimelineItem = _a => {\n var {\n prefixCls: customizePrefixCls,\n className,\n color = 'blue',\n dot,\n pending = false,\n position /** Dead, but do not pass in {\n var {\n prefixCls,\n className,\n pending = false,\n children,\n items,\n rootClassName,\n reverse = false,\n direction,\n hashId,\n pendingDot,\n mode = ''\n } = _a,\n restProps = __rest(_a, [\"prefixCls\", \"className\", \"pending\", \"children\", \"items\", \"rootClassName\", \"reverse\", \"direction\", \"hashId\", \"pendingDot\", \"mode\"]);\n const getPositionCls = (position, idx) => {\n if (mode === 'alternate') {\n if (position === 'right') return `${prefixCls}-item-right`;\n if (position === 'left') return `${prefixCls}-item-left`;\n return idx % 2 === 0 ? `${prefixCls}-item-left` : `${prefixCls}-item-right`;\n }\n if (mode === 'left') return `${prefixCls}-item-left`;\n if (mode === 'right') return `${prefixCls}-item-right`;\n if (position === 'right') return `${prefixCls}-item-right`;\n return '';\n };\n const mergedItems = (0, _toConsumableArray2.default)(items || []);\n const pendingNode = typeof pending === 'boolean' ? null : pending;\n if (pending) {\n mergedItems.push({\n pending: !!pending,\n dot: pendingDot || /*#__PURE__*/React.createElement(_LoadingOutlined.default, null),\n children: pendingNode\n });\n }\n if (reverse) {\n mergedItems.reverse();\n }\n const itemsCount = mergedItems.length;\n const lastCls = `${prefixCls}-item-last`;\n const itemsList = mergedItems.filter(item => !!item).map((item, idx) => {\n var _a;\n const pendingClass = idx === itemsCount - 2 ? lastCls : '';\n const readyClass = idx === itemsCount - 1 ? lastCls : '';\n const {\n className: itemClassName\n } = item,\n itemProps = __rest(item, [\"className\"]);\n return /*#__PURE__*/React.createElement(_TimelineItem.default, Object.assign({}, itemProps, {\n className: (0, _classnames.default)([itemClassName, !reverse && !!pending ? pendingClass : readyClass, getPositionCls((_a = item === null || item === void 0 ? void 0 : item.position) !== null && _a !== void 0 ? _a : '', idx)]),\n key: (item === null || item === void 0 ? void 0 : item.key) || idx\n }));\n });\n const hasLabelItem = mergedItems.some(item => !!(item === null || item === void 0 ? void 0 : item.label));\n const classString = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-pending`]: !!pending,\n [`${prefixCls}-reverse`]: !!reverse,\n [`${prefixCls}-${mode}`]: !!mode && !hasLabelItem,\n [`${prefixCls}-label`]: hasLabelItem,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId);\n return /*#__PURE__*/React.createElement(\"ul\", Object.assign({}, restProps, {\n className: classString\n }), itemsList);\n};\nvar _default = exports.default = TimelineItemList;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Timeline = _interopRequireDefault(require(\"./Timeline\"));\nvar _default = exports.default = _Timeline.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genTimelineStyle = token => {\n const {\n componentCls,\n calc\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n margin: 0,\n padding: 0,\n listStyle: 'none',\n [`${componentCls}-item`]: {\n position: 'relative',\n margin: 0,\n paddingBottom: token.itemPaddingBottom,\n fontSize: token.fontSize,\n listStyle: 'none',\n '&-tail': {\n position: 'absolute',\n insetBlockStart: token.itemHeadSize,\n insetInlineStart: calc(calc(token.itemHeadSize).sub(token.tailWidth)).div(2).equal(),\n height: `calc(100% - ${(0, _cssinjs.unit)(token.itemHeadSize)})`,\n borderInlineStart: `${(0, _cssinjs.unit)(token.tailWidth)} ${token.lineType} ${token.tailColor}`\n },\n '&-pending': {\n [`${componentCls}-item-head`]: {\n fontSize: token.fontSizeSM,\n backgroundColor: 'transparent'\n },\n [`${componentCls}-item-tail`]: {\n display: 'none'\n }\n },\n '&-head': {\n position: 'absolute',\n width: token.itemHeadSize,\n height: token.itemHeadSize,\n backgroundColor: token.dotBg,\n border: `${(0, _cssinjs.unit)(token.dotBorderWidth)} ${token.lineType} transparent`,\n borderRadius: '50%',\n '&-blue': {\n color: token.colorPrimary,\n borderColor: token.colorPrimary\n },\n '&-red': {\n color: token.colorError,\n borderColor: token.colorError\n },\n '&-green': {\n color: token.colorSuccess,\n borderColor: token.colorSuccess\n },\n '&-gray': {\n color: token.colorTextDisabled,\n borderColor: token.colorTextDisabled\n }\n },\n '&-head-custom': {\n position: 'absolute',\n insetBlockStart: calc(token.itemHeadSize).div(2).equal(),\n insetInlineStart: calc(token.itemHeadSize).div(2).equal(),\n width: 'auto',\n height: 'auto',\n marginBlockStart: 0,\n paddingBlock: token.customHeadPaddingVertical,\n lineHeight: 1,\n textAlign: 'center',\n border: 0,\n borderRadius: 0,\n transform: 'translate(-50%, -50%)'\n },\n '&-content': {\n position: 'relative',\n insetBlockStart: calc(calc(token.fontSize).mul(token.lineHeight).sub(token.fontSize)).mul(-1).add(token.lineWidth).equal(),\n marginInlineStart: calc(token.margin).add(token.itemHeadSize).equal(),\n marginInlineEnd: 0,\n marginBlockStart: 0,\n marginBlockEnd: 0,\n wordBreak: 'break-word'\n },\n '&-last': {\n [`> ${componentCls}-item-tail`]: {\n display: 'none'\n },\n [`> ${componentCls}-item-content`]: {\n minHeight: calc(token.controlHeightLG).mul(1.2).equal()\n }\n }\n },\n [`&${componentCls}-alternate,\n &${componentCls}-right,\n &${componentCls}-label`]: {\n [`${componentCls}-item`]: {\n '&-tail, &-head, &-head-custom': {\n insetInlineStart: '50%'\n },\n '&-head': {\n marginInlineStart: calc(token.marginXXS).mul(-1).equal(),\n '&-custom': {\n marginInlineStart: calc(token.tailWidth).div(2).equal()\n }\n },\n '&-left': {\n [`${componentCls}-item-content`]: {\n insetInlineStart: `calc(50% - ${(0, _cssinjs.unit)(token.marginXXS)})`,\n width: `calc(50% - ${(0, _cssinjs.unit)(token.marginSM)})`,\n textAlign: 'start'\n }\n },\n '&-right': {\n [`${componentCls}-item-content`]: {\n width: `calc(50% - ${(0, _cssinjs.unit)(token.marginSM)})`,\n margin: 0,\n textAlign: 'end'\n }\n }\n }\n },\n [`&${componentCls}-right`]: {\n [`${componentCls}-item-right`]: {\n [`${componentCls}-item-tail,\n ${componentCls}-item-head,\n ${componentCls}-item-head-custom`]: {\n insetInlineStart: `calc(100% - ${(0, _cssinjs.unit)(calc(calc(token.itemHeadSize).add(token.tailWidth)).div(2).equal())})`\n },\n [`${componentCls}-item-content`]: {\n width: `calc(100% - ${(0, _cssinjs.unit)(calc(token.itemHeadSize).add(token.marginXS).equal())})`\n }\n }\n },\n [`&${componentCls}-pending\n ${componentCls}-item-last\n ${componentCls}-item-tail`]: {\n display: 'block',\n height: `calc(100% - ${(0, _cssinjs.unit)(token.margin)})`,\n borderInlineStart: `${(0, _cssinjs.unit)(token.tailWidth)} dotted ${token.tailColor}`\n },\n [`&${componentCls}-reverse\n ${componentCls}-item-last\n ${componentCls}-item-tail`]: {\n display: 'none'\n },\n [`&${componentCls}-reverse ${componentCls}-item-pending`]: {\n [`${componentCls}-item-tail`]: {\n insetBlockStart: token.margin,\n display: 'block',\n height: `calc(100% - ${(0, _cssinjs.unit)(token.margin)})`,\n borderInlineStart: `${(0, _cssinjs.unit)(token.tailWidth)} dotted ${token.tailColor}`\n },\n [`${componentCls}-item-content`]: {\n minHeight: calc(token.controlHeightLG).mul(1.2).equal()\n }\n },\n [`&${componentCls}-label`]: {\n [`${componentCls}-item-label`]: {\n position: 'absolute',\n insetBlockStart: calc(calc(token.fontSize).mul(token.lineHeight).sub(token.fontSize)).mul(-1).add(token.tailWidth).equal(),\n width: `calc(50% - ${(0, _cssinjs.unit)(token.marginSM)})`,\n textAlign: 'end'\n },\n [`${componentCls}-item-right`]: {\n [`${componentCls}-item-label`]: {\n insetInlineStart: `calc(50% + ${(0, _cssinjs.unit)(token.marginSM)})`,\n width: `calc(50% - ${(0, _cssinjs.unit)(token.marginSM)})`,\n textAlign: 'start'\n }\n }\n },\n // ====================== RTL =======================\n '&-rtl': {\n direction: 'rtl',\n [`${componentCls}-item-head-custom`]: {\n transform: `translate(50%, -50%)`\n }\n }\n })\n };\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => ({\n tailColor: token.colorSplit,\n tailWidth: token.lineWidthBold,\n dotBorderWidth: token.wireframe ? token.lineWidthBold : token.lineWidth * 3,\n dotBg: token.colorBgContainer,\n itemPaddingBottom: token.padding * 1.25\n});\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Timeline', token => {\n const timeLineToken = (0, _internal.mergeToken)(token, {\n itemHeadSize: 10,\n customHeadPaddingVertical: token.paddingXXS,\n paddingInlineEnd: 2\n });\n return [genTimelineStyle(timeLineToken)];\n}, prepareComponentToken);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nfunction useItems(items, children) {\n if (items && Array.isArray(items)) {\n return items;\n }\n return (0, _toArray.default)(children).map(ele => {\n var _a, _b;\n return Object.assign({\n children: (_b = (_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : ''\n }, ele.props);\n });\n}\nvar _default = exports.default = useItems;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTooltip = require(\"rc-tooltip\");\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _util = require(\"./util\");\n/** @private Internal Component. Do not use in your production. */\nconst PurePanel = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n placement = 'top',\n title,\n color,\n overlayInnerStyle\n } = props;\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('tooltip', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n // Color\n const colorInfo = (0, _util.parseColor)(prefixCls, color);\n const arrowContentStyle = colorInfo.arrowStyle;\n const formattedOverlayInnerStyle = Object.assign(Object.assign({}, overlayInnerStyle), colorInfo.overlayStyle);\n const cls = (0, _classnames.default)(hashId, cssVarCls, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className, colorInfo.className);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: cls,\n style: arrowContentStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-arrow`\n }), /*#__PURE__*/React.createElement(_rcTooltip.Popup, Object.assign({}, props, {\n className: hashId,\n prefixCls: prefixCls,\n overlayInnerStyle: formattedOverlayInnerStyle\n }), title)));\n};\nvar _default = exports.default = PurePanel;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTooltip = _interopRequireDefault(require(\"rc-tooltip\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _ContextIsolator = _interopRequireDefault(require(\"../_util/ContextIsolator\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _placements = _interopRequireDefault(require(\"../_util/placements\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _warning = require(\"../_util/warning\");\nvar _zindexContext = _interopRequireDefault(require(\"../_util/zindexContext\"));\nvar _configProvider = require(\"../config-provider\");\nvar _internal = require(\"../theme/internal\");\nvar _PurePanel = _interopRequireDefault(require(\"./PurePanel\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _util = require(\"./util\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalTooltip = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _a, _b;\n const {\n prefixCls: customizePrefixCls,\n openClassName,\n getTooltipContainer,\n overlayClassName,\n color,\n overlayInnerStyle,\n children,\n afterOpenChange,\n afterVisibleChange,\n destroyTooltipOnHide,\n arrow = true,\n title,\n overlay,\n builtinPlacements,\n arrowPointAtCenter = false,\n autoAdjustOverflow = true\n } = props;\n const mergedShowArrow = !!arrow;\n const [, token] = (0, _internal.useToken)();\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n // ============================== Ref ===============================\n const warning = (0, _warning.devUseWarning)('Tooltip');\n const tooltipRef = React.useRef(null);\n const forceAlign = () => {\n var _a;\n (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.forceAlign();\n };\n React.useImperativeHandle(ref, () => {\n var _a;\n return {\n forceAlign,\n forcePopupAlign: () => {\n warning.deprecated(false, 'forcePopupAlign', 'forceAlign');\n forceAlign();\n },\n nativeElement: (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement\n };\n });\n // ============================== Warn ==============================\n if (process.env.NODE_ENV !== 'production') {\n [['visible', 'open'], ['defaultVisible', 'defaultOpen'], ['onVisibleChange', 'onOpenChange'], ['afterVisibleChange', 'afterOpenChange'], ['arrowPointAtCenter', 'arrow={{ pointAtCenter: true }}']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n process.env.NODE_ENV !== \"production\" ? warning(!destroyTooltipOnHide || typeof destroyTooltipOnHide === 'boolean', 'usage', '`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!arrow || typeof arrow === 'boolean' || !('arrowPointAtCenter' in arrow), 'deprecated', '`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead.') : void 0;\n }\n // ============================== Open ==============================\n const [open, setOpen] = (0, _useMergedState.default)(false, {\n value: (_a = props.open) !== null && _a !== void 0 ? _a : props.visible,\n defaultValue: (_b = props.defaultOpen) !== null && _b !== void 0 ? _b : props.defaultVisible\n });\n const noTitle = !title && !overlay && title !== 0; // overlay for old version compatibility\n const onOpenChange = vis => {\n var _a, _b;\n setOpen(noTitle ? false : vis);\n if (!noTitle) {\n (_a = props.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(props, vis);\n (_b = props.onVisibleChange) === null || _b === void 0 ? void 0 : _b.call(props, vis);\n }\n };\n const tooltipPlacements = React.useMemo(() => {\n var _a, _b;\n let mergedArrowPointAtCenter = arrowPointAtCenter;\n if (typeof arrow === 'object') {\n mergedArrowPointAtCenter = (_b = (_a = arrow.pointAtCenter) !== null && _a !== void 0 ? _a : arrow.arrowPointAtCenter) !== null && _b !== void 0 ? _b : arrowPointAtCenter;\n }\n return builtinPlacements || (0, _placements.default)({\n arrowPointAtCenter: mergedArrowPointAtCenter,\n autoAdjustOverflow,\n arrowWidth: mergedShowArrow ? token.sizePopupArrow : 0,\n borderRadius: token.borderRadius,\n offset: token.marginXXS,\n visibleFirst: true\n });\n }, [arrowPointAtCenter, arrow, builtinPlacements, token]);\n const memoOverlay = React.useMemo(() => {\n if (title === 0) {\n return title;\n }\n return overlay || title || '';\n }, [overlay, title]);\n const memoOverlayWrapper = /*#__PURE__*/React.createElement(_ContextIsolator.default, {\n space: true\n }, typeof memoOverlay === 'function' ? memoOverlay() : memoOverlay);\n const {\n getPopupContainer,\n placement = 'top',\n mouseEnterDelay = 0.1,\n mouseLeaveDelay = 0.1,\n overlayStyle,\n rootClassName\n } = props,\n otherProps = __rest(props, [\"getPopupContainer\", \"placement\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"overlayStyle\", \"rootClassName\"]);\n const prefixCls = getPrefixCls('tooltip', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const injectFromPopover = props['data-popover-inject'];\n let tempOpen = open;\n // Hide tooltip when there is no title\n if (!('open' in props) && !('visible' in props) && noTitle) {\n tempOpen = false;\n }\n // ============================= Render =============================\n const child = /*#__PURE__*/React.isValidElement(children) && !(0, _reactNode.isFragment)(children) ? children : /*#__PURE__*/React.createElement(\"span\", null, children);\n const childProps = child.props;\n const childCls = !childProps.className || typeof childProps.className === 'string' ? (0, _classnames.default)(childProps.className, openClassName || `${prefixCls}-open`) : childProps.className;\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, !injectFromPopover);\n // Color\n const colorInfo = (0, _util.parseColor)(prefixCls, color);\n const arrowContentStyle = colorInfo.arrowStyle;\n const formattedOverlayInnerStyle = Object.assign(Object.assign({}, overlayInnerStyle), colorInfo.overlayStyle);\n const customOverlayClassName = (0, _classnames.default)(overlayClassName, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, colorInfo.className, rootClassName, hashId, cssVarCls);\n // ============================ zIndex ============================\n const [zIndex, contextZIndex] = (0, _useZIndex.useZIndex)('Tooltip', otherProps.zIndex);\n const content = /*#__PURE__*/React.createElement(_rcTooltip.default, Object.assign({}, otherProps, {\n zIndex: zIndex,\n showArrow: mergedShowArrow,\n placement: placement,\n mouseEnterDelay: mouseEnterDelay,\n mouseLeaveDelay: mouseLeaveDelay,\n prefixCls: prefixCls,\n overlayClassName: customOverlayClassName,\n overlayStyle: Object.assign(Object.assign({}, arrowContentStyle), overlayStyle),\n getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer,\n ref: tooltipRef,\n builtinPlacements: tooltipPlacements,\n overlay: memoOverlayWrapper,\n visible: tempOpen,\n onVisibleChange: onOpenChange,\n afterVisibleChange: afterOpenChange !== null && afterOpenChange !== void 0 ? afterOpenChange : afterVisibleChange,\n overlayInnerStyle: formattedOverlayInnerStyle,\n arrowContent: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-arrow-content`\n }),\n motion: {\n motionName: (0, _motion.getTransitionName)(rootPrefixCls, 'zoom-big-fast', props.transitionName),\n motionDeadline: 1000\n },\n destroyTooltipOnHide: !!destroyTooltipOnHide\n }), tempOpen ? (0, _reactNode.cloneElement)(child, {\n className: childCls\n }) : child);\n return wrapCSSVar(/*#__PURE__*/React.createElement(_zindexContext.default.Provider, {\n value: contextZIndex\n }, content));\n});\nconst Tooltip = InternalTooltip;\nif (process.env.NODE_ENV !== 'production') {\n Tooltip.displayName = 'Tooltip';\n}\nTooltip._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel.default;\nvar _default = exports.default = Tooltip;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _placementArrow = _interopRequireWildcard(require(\"../../style/placementArrow\"));\nvar _roundedArrow = require(\"../../style/roundedArrow\");\nvar _internal = require(\"../../theme/internal\");\nconst genTooltipStyle = token => {\n const {\n componentCls,\n // ant-tooltip\n tooltipMaxWidth,\n tooltipColor,\n tooltipBg,\n tooltipBorderRadius,\n zIndexPopup,\n controlHeight,\n boxShadowSecondary,\n paddingSM,\n paddingXS\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'absolute',\n zIndex: zIndexPopup,\n display: 'block',\n width: 'max-content',\n maxWidth: tooltipMaxWidth,\n visibility: 'visible',\n // When use `autoArrow`, origin will follow the arrow position\n '--valid-offset-x': 'var(--arrow-offset-horizontal, var(--arrow-x))',\n transformOrigin: [`var(--valid-offset-x, 50%)`, `var(--arrow-y, 50%)`].join(' '),\n '&-hidden': {\n display: 'none'\n },\n '--antd-arrow-background-color': tooltipBg,\n // Wrapper for the tooltip content\n [`${componentCls}-inner`]: {\n minWidth: '1em',\n minHeight: controlHeight,\n padding: `${(0, _cssinjs.unit)(token.calc(paddingSM).div(2).equal())} ${(0, _cssinjs.unit)(paddingXS)}`,\n color: tooltipColor,\n textAlign: 'start',\n textDecoration: 'none',\n wordWrap: 'break-word',\n backgroundColor: tooltipBg,\n borderRadius: tooltipBorderRadius,\n boxShadow: boxShadowSecondary,\n boxSizing: 'border-box'\n },\n // Limit left and right placement radius\n [[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(',')]: {\n [`${componentCls}-inner`]: {\n borderRadius: token.min(tooltipBorderRadius, _placementArrow.MAX_VERTICAL_CONTENT_RADIUS)\n }\n },\n [`${componentCls}-content`]: {\n position: 'relative'\n }\n }), (0, _internal.genPresetColor)(token, (colorKey, _ref) => {\n let {\n darkColor\n } = _ref;\n return {\n [`&${componentCls}-${colorKey}`]: {\n [`${componentCls}-inner`]: {\n backgroundColor: darkColor\n },\n [`${componentCls}-arrow`]: {\n '--antd-arrow-background-color': darkColor\n }\n }\n };\n })), {\n // RTL\n '&-rtl': {\n direction: 'rtl'\n }\n })\n },\n // Arrow Style\n (0, _placementArrow.default)(token, 'var(--antd-arrow-background-color)'),\n // Pure Render\n {\n [`${componentCls}-pure`]: {\n position: 'relative',\n maxWidth: 'none',\n margin: token.sizePopupArrow\n }\n }];\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => Object.assign(Object.assign({\n zIndexPopup: token.zIndexPopupBase + 70\n}, (0, _placementArrow.getArrowOffsetToken)({\n contentRadius: token.borderRadius,\n limitVerticalRadius: true\n})), (0, _roundedArrow.getArrowToken)((0, _internal.mergeToken)(token, {\n borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)\n})));\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = function _default(prefixCls) {\n let injectStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n const useStyle = (0, _internal.genStyleHooks)('Tooltip', token => {\n const {\n borderRadius,\n colorTextLightSolid,\n colorBgSpotlight\n } = token;\n const TooltipToken = (0, _internal.mergeToken)(token, {\n // default variables\n tooltipMaxWidth: 250,\n tooltipColor: colorTextLightSolid,\n tooltipBorderRadius: borderRadius,\n tooltipBg: colorBgSpotlight\n });\n return [genTooltipStyle(TooltipToken), (0, _motion.initZoomMotion)(token, 'zoom-big-fast')];\n }, prepareComponentToken, {\n resetStyle: false,\n // Popover use Tooltip as internal component. We do not need to handle this.\n injectStyle\n });\n return useStyle(prefixCls);\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.parseColor = parseColor;\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _colors = require(\"../_util/colors\");\nfunction parseColor(prefixCls, color) {\n const isInternalColor = (0, _colors.isPresetColor)(color);\n const className = (0, _classnames.default)({\n [`${prefixCls}-${color}`]: color && isInternalColor\n });\n const overlayStyle = {};\n const arrowStyle = {};\n if (color && !isInternalColor) {\n overlayStyle.background = color;\n // @ts-ignore\n arrowStyle['--antd-arrow-background-color'] = color;\n }\n return {\n className,\n overlayStyle,\n arrowStyle\n };\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useClosable = _interopRequireDefault(require(\"../_util/hooks/useClosable\"));\nvar _PurePanel = require(\"../_util/PurePanel\");\nvar _reactNode = require(\"../_util/reactNode\");\nvar _configProvider = require(\"../config-provider\");\nvar _PurePanel2 = require(\"../popover/PurePanel\");\nvar _panelRender = _interopRequireDefault(require(\"./panelRender\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst PurePanel = props => {\n const {\n prefixCls: customizePrefixCls,\n current = 0,\n total = 6,\n className,\n style,\n type,\n closable,\n closeIcon\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"current\", \"total\", \"className\", \"style\", \"type\", \"closable\", \"closeIcon\"]);\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('tour', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const [mergedClosable, mergedCloseIcon] = (0, _useClosable.default)({\n closable,\n closeIcon\n }, null, {\n closable: true,\n closeIconRender: icon => /*#__PURE__*/React.isValidElement(icon) ? (0, _reactNode.cloneElement)(icon, {\n className: (0, _classnames.default)(icon.props.className, `${prefixCls}-close-icon`)\n }) : icon\n });\n return wrapCSSVar(/*#__PURE__*/React.createElement(_PurePanel2.RawPurePanel, {\n prefixCls: prefixCls,\n hashId: hashId,\n className: (0, _classnames.default)(className, `${prefixCls}-pure`, type && `${prefixCls}-${type}`, cssVarCls),\n style: style\n }, /*#__PURE__*/React.createElement(_panelRender.default, {\n stepProps: Object.assign(Object.assign({}, restProps), {\n prefixCls,\n total,\n closable: mergedClosable ? {\n closeIcon: mergedCloseIcon\n } : undefined\n }),\n current: current,\n type: type\n })));\n};\nvar _default = exports.default = (0, _PurePanel.withPureRenderTheme)(PurePanel);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _tour = _interopRequireDefault(require(\"@rc-component/tour\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _placements = _interopRequireDefault(require(\"../_util/placements\"));\nvar _zindexContext = _interopRequireDefault(require(\"../_util/zindexContext\"));\nvar _configProvider = require(\"../config-provider\");\nvar _internal = require(\"../theme/internal\");\nvar _panelRender = _interopRequireDefault(require(\"./panelRender\"));\nvar _PurePanel = _interopRequireDefault(require(\"./PurePanel\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Tour = props => {\n const {\n prefixCls: customizePrefixCls,\n type,\n rootClassName,\n indicatorsRender,\n steps,\n closeIcon\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"type\", \"rootClassName\", \"indicatorsRender\", \"steps\", \"closeIcon\"]);\n const {\n getPrefixCls,\n direction,\n tour\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('tour', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const [, token] = (0, _internal.useToken)();\n const mergedSteps = _react.default.useMemo(() => steps === null || steps === void 0 ? void 0 : steps.map(step => {\n var _a;\n return Object.assign(Object.assign({}, step), {\n className: (0, _classnames.default)(step.className, {\n [`${prefixCls}-primary`]: ((_a = step.type) !== null && _a !== void 0 ? _a : type) === 'primary'\n })\n });\n }), [steps, type]);\n const builtinPlacements = config => {\n var _a;\n return (0, _placements.default)({\n arrowPointAtCenter: (_a = config === null || config === void 0 ? void 0 : config.arrowPointAtCenter) !== null && _a !== void 0 ? _a : true,\n autoAdjustOverflow: true,\n offset: token.marginXXS,\n arrowWidth: token.sizePopupArrow,\n borderRadius: token.borderRadius\n });\n };\n const customClassName = (0, _classnames.default)({\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, hashId, cssVarCls, rootClassName);\n const mergedRenderPanel = (stepProps, stepCurrent) => (/*#__PURE__*/_react.default.createElement(_panelRender.default, {\n type: type,\n stepProps: stepProps,\n current: stepCurrent,\n indicatorsRender: indicatorsRender\n }));\n // ============================ zIndex ============================\n const [zIndex, contextZIndex] = (0, _useZIndex.useZIndex)('Tour', restProps.zIndex);\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(_zindexContext.default.Provider, {\n value: contextZIndex\n }, /*#__PURE__*/_react.default.createElement(_tour.default, Object.assign({}, restProps, {\n closeIcon: closeIcon !== null && closeIcon !== void 0 ? closeIcon : tour === null || tour === void 0 ? void 0 : tour.closeIcon,\n zIndex: zIndex,\n rootClassName: customClassName,\n prefixCls: prefixCls,\n animated: true,\n renderPanel: mergedRenderPanel,\n builtinPlacements: builtinPlacements,\n steps: mergedSteps\n }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Tour.displayName = 'Tour';\n}\nTour._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel.default;\nvar _default = exports.default = Tour;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _CloseOutlined = _interopRequireDefault(require(\"@ant-design/icons/CloseOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _button = _interopRequireDefault(require(\"../button\"));\nvar _locale = require(\"../locale\");\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nfunction isValidNode(node) {\n return node !== undefined && node !== null;\n}\n// Due to the independent design of Panel, it will be too coupled to put in rc-tour,\n// so a set of Panel logic is implemented separately in antd.\nconst TourPanel = props => {\n var _a, _b;\n const {\n stepProps,\n current,\n type,\n indicatorsRender\n } = props;\n const {\n prefixCls,\n total = 1,\n title,\n onClose,\n onPrev,\n onNext,\n onFinish,\n cover,\n description,\n nextButtonProps,\n prevButtonProps,\n type: stepType,\n closable\n } = stepProps;\n const mergedType = stepType !== null && stepType !== void 0 ? stepType : type;\n const mergedCloseIcon = /*#__PURE__*/_react.default.createElement(\"button\", {\n type: \"button\",\n onClick: onClose,\n className: `${prefixCls}-close`\n }, (closable === null || closable === void 0 ? void 0 : closable.closeIcon) || /*#__PURE__*/_react.default.createElement(_CloseOutlined.default, {\n className: `${prefixCls}-close-icon`\n }));\n const isLastStep = current === total - 1;\n const prevBtnClick = () => {\n var _a;\n onPrev === null || onPrev === void 0 ? void 0 : onPrev();\n (_a = prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(prevButtonProps);\n };\n const nextBtnClick = () => {\n var _a;\n if (isLastStep) {\n onFinish === null || onFinish === void 0 ? void 0 : onFinish();\n } else {\n onNext === null || onNext === void 0 ? void 0 : onNext();\n }\n (_a = nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(nextButtonProps);\n };\n const headerNode = isValidNode(title) ? (/*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-header`\n }, /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title))) : null;\n const descriptionNode = isValidNode(description) ? (/*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description)) : null;\n const coverNode = isValidNode(cover) ? /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-cover`\n }, cover) : null;\n let mergedIndicatorNode;\n if (indicatorsRender) {\n mergedIndicatorNode = indicatorsRender(current, total);\n } else {\n mergedIndicatorNode = (0, _toConsumableArray2.default)(Array.from({\n length: total\n }).keys()).map((stepItem, index) => (/*#__PURE__*/_react.default.createElement(\"span\", {\n key: stepItem,\n className: (0, _classnames.default)(index === current && `${prefixCls}-indicator-active`, `${prefixCls}-indicator`)\n })));\n }\n const mainBtnType = mergedType === 'primary' ? 'default' : 'primary';\n const secondaryBtnProps = {\n type: 'default',\n ghost: mergedType === 'primary'\n };\n const [contextLocale] = (0, _locale.useLocale)('Tour', _en_US.default.Tour);\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-content`\n }, /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-inner`\n }, closable && mergedCloseIcon, coverNode, headerNode, descriptionNode, /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-footer`\n }, total > 1 && /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-indicators`\n }, mergedIndicatorNode), /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-buttons`\n }, current !== 0 ? (/*#__PURE__*/_react.default.createElement(_button.default, Object.assign({}, secondaryBtnProps, prevButtonProps, {\n onClick: prevBtnClick,\n size: \"small\",\n className: (0, _classnames.default)(`${prefixCls}-prev-btn`, prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.className)\n }), (_a = prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.children) !== null && _a !== void 0 ? _a : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Previous)) : null, /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({\n type: mainBtnType\n }, nextButtonProps, {\n onClick: nextBtnClick,\n size: \"small\",\n className: (0, _classnames.default)(`${prefixCls}-next-btn`, nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.className)\n }), (_b = nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.children) !== null && _b !== void 0 ? _b : isLastStep ? contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Finish : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.Next)))));\n};\nvar _default = exports.default = TourPanel;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _tinycolor = require(\"@ctrl/tinycolor\");\nvar _style = require(\"../../style\");\nvar _placementArrow = _interopRequireWildcard(require(\"../../style/placementArrow\"));\nvar _roundedArrow = require(\"../../style/roundedArrow\");\nvar _internal = require(\"../../theme/internal\");\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n padding,\n paddingXS,\n borderRadius,\n borderRadiusXS,\n colorPrimary,\n colorFill,\n indicatorHeight,\n indicatorWidth,\n boxShadowTertiary,\n zIndexPopup,\n colorBgElevated,\n fontWeightStrong,\n marginXS,\n colorTextLightSolid,\n tourBorderRadius,\n colorWhite,\n primaryNextBtnHoverBg,\n closeBtnSize,\n motionDurationSlow,\n antCls,\n primaryPrevBtnBg\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'absolute',\n zIndex: zIndexPopup,\n maxWidth: 'fit-content',\n visibility: 'visible',\n width: 520,\n '--antd-arrow-background-color': colorBgElevated,\n '&-pure': {\n maxWidth: '100%',\n position: 'relative'\n },\n [`&${componentCls}-hidden`]: {\n display: 'none'\n },\n // ============================= panel content ============================\n [`${componentCls}-content`]: {\n position: 'relative'\n },\n [`${componentCls}-inner`]: {\n textAlign: 'start',\n textDecoration: 'none',\n borderRadius: tourBorderRadius,\n boxShadow: boxShadowTertiary,\n position: 'relative',\n backgroundColor: colorBgElevated,\n border: 'none',\n backgroundClip: 'padding-box',\n [`${componentCls}-close`]: Object.assign({\n position: 'absolute',\n top: padding,\n insetInlineEnd: padding,\n color: token.colorIcon,\n background: 'none',\n border: 'none',\n width: closeBtnSize,\n height: closeBtnSize,\n borderRadius: token.borderRadiusSM,\n transition: `background-color ${token.motionDurationMid}, color ${token.motionDurationMid}`,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n cursor: 'pointer',\n '&:hover': {\n color: token.colorIconHover,\n backgroundColor: token.colorBgTextHover\n },\n '&:active': {\n backgroundColor: token.colorBgTextActive\n }\n }, (0, _style.genFocusStyle)(token)),\n [`${componentCls}-cover`]: {\n textAlign: 'center',\n padding: `${(0, _cssinjs.unit)(token.calc(padding).add(closeBtnSize).add(paddingXS).equal())} ${(0, _cssinjs.unit)(padding)} 0`,\n img: {\n width: '100%'\n }\n },\n [`${componentCls}-header`]: {\n padding: `${(0, _cssinjs.unit)(padding)} ${(0, _cssinjs.unit)(padding)} ${(0, _cssinjs.unit)(paddingXS)}`,\n width: `calc(100% - ${(0, _cssinjs.unit)(closeBtnSize)})`,\n wordBreak: 'break-word',\n [`${componentCls}-title`]: {\n fontWeight: fontWeightStrong\n }\n },\n [`${componentCls}-description`]: {\n padding: `0 ${(0, _cssinjs.unit)(padding)}`,\n wordWrap: 'break-word'\n },\n [`${componentCls}-footer`]: {\n padding: `${(0, _cssinjs.unit)(paddingXS)} ${(0, _cssinjs.unit)(padding)} ${(0, _cssinjs.unit)(padding)}`,\n textAlign: 'end',\n borderRadius: `0 0 ${(0, _cssinjs.unit)(borderRadiusXS)} ${(0, _cssinjs.unit)(borderRadiusXS)}`,\n display: 'flex',\n [`${componentCls}-indicators`]: {\n display: 'inline-block',\n [`${componentCls}-indicator`]: {\n width: indicatorWidth,\n height: indicatorHeight,\n display: 'inline-block',\n borderRadius: '50%',\n background: colorFill,\n '&:not(:last-child)': {\n marginInlineEnd: indicatorHeight\n },\n '&-active': {\n background: colorPrimary\n }\n }\n },\n [`${componentCls}-buttons`]: {\n marginInlineStart: 'auto',\n [`${antCls}-btn`]: {\n marginInlineStart: marginXS\n }\n }\n }\n },\n // ============================= primary type ===========================\n // `$` for panel, `&$` for pure panel\n [`${componentCls}-primary, &${componentCls}-primary`]: {\n '--antd-arrow-background-color': colorPrimary,\n [`${componentCls}-inner`]: {\n color: colorTextLightSolid,\n textAlign: 'start',\n textDecoration: 'none',\n backgroundColor: colorPrimary,\n borderRadius,\n boxShadow: boxShadowTertiary,\n [`${componentCls}-close`]: {\n color: colorTextLightSolid\n },\n [`${componentCls}-indicators`]: {\n [`${componentCls}-indicator`]: {\n background: primaryPrevBtnBg,\n '&-active': {\n background: colorTextLightSolid\n }\n }\n },\n [`${componentCls}-prev-btn`]: {\n color: colorTextLightSolid,\n borderColor: primaryPrevBtnBg,\n backgroundColor: colorPrimary,\n '&:hover': {\n backgroundColor: primaryPrevBtnBg,\n borderColor: 'transparent'\n }\n },\n [`${componentCls}-next-btn`]: {\n color: colorPrimary,\n borderColor: 'transparent',\n background: colorWhite,\n '&:hover': {\n background: primaryNextBtnHoverBg\n }\n }\n }\n }\n }),\n // ============================= mask ===========================\n [`${componentCls}-mask`]: {\n [`${componentCls}-placeholder-animated`]: {\n transition: `all ${motionDurationSlow}`\n }\n },\n // =========== Limit left and right placement radius ==============\n [['&-placement-left', '&-placement-leftTop', '&-placement-leftBottom', '&-placement-right', '&-placement-rightTop', '&-placement-rightBottom'].join(',')]: {\n [`${componentCls}-inner`]: {\n borderRadius: token.min(tourBorderRadius, _placementArrow.MAX_VERTICAL_CONTENT_RADIUS)\n }\n }\n },\n // ============================= Arrow ===========================\n (0, _placementArrow.default)(token, 'var(--antd-arrow-background-color)')];\n};\n// ============================== Export ==============================\nconst prepareComponentToken = token => Object.assign(Object.assign({\n zIndexPopup: token.zIndexPopupBase + 70,\n closeBtnSize: token.fontSize * token.lineHeight,\n primaryPrevBtnBg: new _tinycolor.TinyColor(token.colorTextLightSolid).setAlpha(0.15).toRgbString(),\n primaryNextBtnHoverBg: new _tinycolor.TinyColor(token.colorBgTextHover).onBackground(token.colorWhite).toRgbString()\n}, (0, _placementArrow.getArrowOffsetToken)({\n contentRadius: token.borderRadiusLG,\n limitVerticalRadius: true\n})), (0, _roundedArrow.getArrowToken)(token));\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Tour', token => {\n const {\n borderRadiusLG\n } = token;\n const TourToken = (0, _internal.mergeToken)(token, {\n indicatorWidth: 6,\n indicatorHeight: 6,\n tourBorderRadius: borderRadiusLG\n });\n return [genBaseStyle(TourToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.OmitProps = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _pagination = _interopRequireDefault(require(\"../pagination\"));\nvar _ListItem = _interopRequireDefault(require(\"./ListItem\"));\nconst OmitProps = exports.OmitProps = ['handleFilter', 'handleClear', 'checkedKeys'];\nconst parsePagination = pagination => {\n const defaultPagination = {\n simple: true,\n showSizeChanger: false,\n showLessItems: false\n };\n return Object.assign(Object.assign({}, defaultPagination), pagination);\n};\nconst TransferListBody = (props, ref) => {\n const {\n prefixCls,\n filteredRenderItems,\n selectedKeys,\n disabled: globalDisabled,\n showRemove,\n pagination,\n onScroll,\n onItemSelect,\n onItemRemove\n } = props;\n const [current, setCurrent] = React.useState(1);\n const mergedPagination = React.useMemo(() => {\n if (!pagination) {\n return null;\n }\n const convertPagination = typeof pagination === 'object' ? pagination : {};\n return parsePagination(convertPagination);\n }, [pagination]);\n const [pageSize, setPageSize] = (0, _useMergedState.default)(10, {\n value: mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize\n });\n React.useEffect(() => {\n if (mergedPagination) {\n const maxPageCount = Math.ceil(filteredRenderItems.length / pageSize);\n setCurrent(Math.min(current, maxPageCount));\n }\n }, [filteredRenderItems, mergedPagination, pageSize]);\n const onInternalClick = (item, e) => {\n onItemSelect(item.key, !selectedKeys.includes(item.key), e);\n };\n const onRemove = item => {\n onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove([item.key]);\n };\n const onPageChange = cur => {\n setCurrent(cur);\n };\n const onSizeChange = (cur, size) => {\n setCurrent(cur);\n setPageSize(size);\n };\n const memoizedItems = React.useMemo(() => {\n const displayItems = mergedPagination ? filteredRenderItems.slice((current - 1) * pageSize, current * pageSize) : filteredRenderItems;\n return displayItems;\n }, [current, filteredRenderItems, mergedPagination, pageSize]);\n React.useImperativeHandle(ref, () => ({\n items: memoizedItems\n }));\n const paginationNode = mergedPagination ? (/*#__PURE__*/React.createElement(_pagination.default, {\n size: \"small\",\n disabled: globalDisabled,\n simple: mergedPagination.simple,\n pageSize: pageSize,\n showLessItems: mergedPagination.showLessItems,\n showSizeChanger: mergedPagination.showSizeChanger,\n className: `${prefixCls}-pagination`,\n total: filteredRenderItems.length,\n current: current,\n onChange: onPageChange,\n onShowSizeChange: onSizeChange\n })) : null;\n const cls = (0, _classnames.default)(`${prefixCls}-content`, {\n [`${prefixCls}-content-show-remove`]: showRemove\n });\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"ul\", {\n className: cls,\n onScroll: onScroll\n }, (memoizedItems || []).map(_ref => {\n let {\n renderedEl,\n renderedText,\n item\n } = _ref;\n return /*#__PURE__*/React.createElement(_ListItem.default, {\n key: item.key,\n item: item,\n renderedText: renderedText,\n renderedEl: renderedEl,\n prefixCls: prefixCls,\n showRemove: showRemove,\n onClick: onInternalClick,\n onRemove: onRemove,\n checked: selectedKeys.includes(item.key),\n disabled: globalDisabled || item.disabled\n });\n })), paginationNode);\n};\nif (process.env.NODE_ENV !== 'production') {\n TransferListBody.displayName = 'TransferListBody';\n}\nvar _default = exports.default = /*#__PURE__*/React.forwardRef(TransferListBody);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _DeleteOutlined = _interopRequireDefault(require(\"@ant-design/icons/DeleteOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _checkbox = _interopRequireDefault(require(\"../checkbox\"));\nvar _locale = require(\"../locale\");\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nconst ListItem = props => {\n const {\n renderedText,\n renderedEl,\n item,\n checked,\n disabled,\n prefixCls,\n onClick,\n onRemove,\n showRemove\n } = props;\n const className = (0, _classnames.default)(`${prefixCls}-content-item`, {\n [`${prefixCls}-content-item-disabled`]: disabled || item.disabled,\n [`${prefixCls}-content-item-checked`]: checked\n });\n let title;\n if (typeof renderedText === 'string' || typeof renderedText === 'number') {\n title = String(renderedText);\n }\n const [contextLocale] = (0, _locale.useLocale)('Transfer', _en_US.default.Transfer);\n const liProps = {\n className,\n title\n };\n const labelNode = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-content-item-text`\n }, renderedEl);\n if (showRemove) {\n return /*#__PURE__*/React.createElement(\"li\", Object.assign({}, liProps), labelNode, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n disabled: disabled || item.disabled,\n className: `${prefixCls}-content-item-remove`,\n \"aria-label\": contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.remove,\n onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item)\n }, /*#__PURE__*/React.createElement(_DeleteOutlined.default, null)));\n }\n // Default click to select\n liProps.onClick = disabled || item.disabled ? undefined : event => onClick(item, event);\n return /*#__PURE__*/React.createElement(\"li\", Object.assign({}, liProps), /*#__PURE__*/React.createElement(_checkbox.default, {\n className: `${prefixCls}-checkbox`,\n checked: checked,\n disabled: disabled || item.disabled\n }), labelNode);\n};\nvar _default = exports.default = /*#__PURE__*/React.memo(ListItem);","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _transKeys = require(\"../../_util/transKeys\");\nconst useData = (dataSource, rowKey, targetKeys) => {\n const mergedDataSource = React.useMemo(() => (dataSource || []).map(record => {\n if (rowKey) {\n return Object.assign(Object.assign({}, record), {\n key: rowKey(record)\n });\n }\n return record;\n }), [dataSource, rowKey]);\n const [leftDataSource, rightDataSource] = React.useMemo(() => {\n const leftData = [];\n const rightData = new Array((targetKeys || []).length);\n const targetKeysMap = (0, _transKeys.groupKeysMap)(targetKeys || []);\n mergedDataSource.forEach(record => {\n // rightData should be ordered by targetKeys\n // leftData should be ordered by dataSource\n if (targetKeysMap.has(record.key)) {\n rightData[targetKeysMap.get(record.key)] = record;\n } else {\n leftData.push(record);\n }\n });\n return [leftData, rightData];\n }, [mergedDataSource, targetKeys, rowKey]);\n return [mergedDataSource, leftDataSource, rightDataSource];\n};\nvar _default = exports.default = useData;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useSelection;\nvar React = _interopRequireWildcard(require(\"react\"));\nconst EMPTY_KEYS = [];\nfunction filterKeys(keys, dataKeys) {\n const filteredKeys = keys.filter(key => dataKeys.has(key));\n return keys.length === filteredKeys.length ? keys : filteredKeys;\n}\nfunction flattenKeys(keys) {\n return Array.from(keys).join(';');\n}\nfunction useSelection(leftDataSource, rightDataSource) {\n let selectedKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_KEYS;\n // Prepare `dataSource` keys\n const [leftKeys, rightKeys] = React.useMemo(() => [new Set(leftDataSource.map(src => src.key)), new Set(rightDataSource.map(src => src.key))], [leftDataSource, rightDataSource]);\n // Selected Keys\n const [sourceSelectedKeys, setSourceSelectedKeys] = React.useState(() => filterKeys(selectedKeys, leftKeys));\n const [targetSelectedKeys, setTargetSelectedKeys] = React.useState(() => filterKeys(selectedKeys, rightKeys));\n // Fill selected keys\n React.useEffect(() => {\n setSourceSelectedKeys(filterKeys(selectedKeys, leftKeys));\n setTargetSelectedKeys(filterKeys(selectedKeys, rightKeys));\n }, [selectedKeys]);\n // Reset when data changed\n React.useEffect(() => {\n setSourceSelectedKeys(filterKeys(sourceSelectedKeys, leftKeys));\n setTargetSelectedKeys(filterKeys(targetSelectedKeys, rightKeys));\n }, [flattenKeys(leftKeys), flattenKeys(rightKeys)]);\n return [\n // Keys\n sourceSelectedKeys, targetSelectedKeys,\n // Updater\n setSourceSelectedKeys, setTargetSelectedKeys];\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useMultipleSelect = _interopRequireDefault(require(\"../_util/hooks/useMultipleSelect\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _transKeys = require(\"../_util/transKeys\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _defaultRenderEmpty = _interopRequireDefault(require(\"../config-provider/defaultRenderEmpty\"));\nvar _context = require(\"../form/context\");\nvar _locale = require(\"../locale\");\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _useData = _interopRequireDefault(require(\"./hooks/useData\"));\nvar _useSelection = _interopRequireDefault(require(\"./hooks/useSelection\"));\nvar _list = _interopRequireDefault(require(\"./list\"));\nvar _operation = _interopRequireDefault(require(\"./operation\"));\nvar _search = _interopRequireDefault(require(\"./search\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst Transfer = props => {\n const {\n dataSource,\n targetKeys = [],\n selectedKeys,\n selectAllLabels = [],\n operations = [],\n style = {},\n listStyle = {},\n locale = {},\n titles,\n disabled,\n showSearch = false,\n operationStyle,\n showSelectAll,\n oneWay,\n pagination,\n status: customStatus,\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n selectionsIcon,\n filterOption,\n render,\n footer,\n children,\n rowKey,\n onScroll,\n onChange,\n onSearch,\n onSelectChange\n } = props;\n const {\n getPrefixCls,\n renderEmpty,\n direction: dir,\n transfer\n } = (0, _react.useContext)(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('transfer', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n // Fill record with `key`\n const [mergedDataSource, leftDataSource, rightDataSource] = (0, _useData.default)(dataSource, rowKey, targetKeys);\n // Get direction selected keys\n const [\n // Keys\n sourceSelectedKeys, targetSelectedKeys,\n // Setters\n setSourceSelectedKeys, setTargetSelectedKeys] = (0, _useSelection.default)(leftDataSource, rightDataSource, selectedKeys);\n const [leftMultipleSelect, updateLeftPrevSelectedIndex] = (0, _useMultipleSelect.default)(item => item.key);\n const [rightMultipleSelect, updateRightPrevSelectedIndex] = (0, _useMultipleSelect.default)(item => item.key);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Transfer');\n process.env.NODE_ENV !== \"production\" ? warning(!pagination || !children, 'usage', '`pagination` not support customize render list.') : void 0;\n }\n const setStateKeys = (0, _react.useCallback)((direction, keys) => {\n if (direction === 'left') {\n const nextKeys = typeof keys === 'function' ? keys(sourceSelectedKeys || []) : keys;\n setSourceSelectedKeys(nextKeys);\n } else {\n const nextKeys = typeof keys === 'function' ? keys(targetSelectedKeys || []) : keys;\n setTargetSelectedKeys(nextKeys);\n }\n }, [sourceSelectedKeys, targetSelectedKeys]);\n const setPrevSelectedIndex = (direction, value) => {\n const isLeftDirection = direction === 'left';\n const updatePrevSelectedIndex = isLeftDirection ? updateLeftPrevSelectedIndex : updateRightPrevSelectedIndex;\n updatePrevSelectedIndex(value);\n };\n const handleSelectChange = (0, _react.useCallback)((direction, holder) => {\n if (direction === 'left') {\n onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(holder, targetSelectedKeys);\n } else {\n onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(sourceSelectedKeys, holder);\n }\n }, [sourceSelectedKeys, targetSelectedKeys]);\n const getTitles = transferLocale => {\n var _a;\n return (_a = titles !== null && titles !== void 0 ? titles : transferLocale.titles) !== null && _a !== void 0 ? _a : [];\n };\n const handleLeftScroll = e => {\n onScroll === null || onScroll === void 0 ? void 0 : onScroll('left', e);\n };\n const handleRightScroll = e => {\n onScroll === null || onScroll === void 0 ? void 0 : onScroll('right', e);\n };\n const moveTo = direction => {\n const moveKeys = direction === 'right' ? sourceSelectedKeys : targetSelectedKeys;\n const dataSourceDisabledKeysMap = (0, _transKeys.groupDisabledKeysMap)(mergedDataSource);\n // filter the disabled options\n const newMoveKeys = moveKeys.filter(key => !dataSourceDisabledKeysMap.has(key));\n const newMoveKeysMap = (0, _transKeys.groupKeysMap)(newMoveKeys);\n // move items to target box\n const newTargetKeys = direction === 'right' ? newMoveKeys.concat(targetKeys) : targetKeys.filter(targetKey => !newMoveKeysMap.has(targetKey));\n // empty checked keys\n const oppositeDirection = direction === 'right' ? 'left' : 'right';\n setStateKeys(oppositeDirection, []);\n handleSelectChange(oppositeDirection, []);\n onChange === null || onChange === void 0 ? void 0 : onChange(newTargetKeys, direction, newMoveKeys);\n };\n const moveToLeft = () => {\n moveTo('left');\n setPrevSelectedIndex('left', null);\n };\n const moveToRight = () => {\n moveTo('right');\n setPrevSelectedIndex('right', null);\n };\n const onItemSelectAll = (direction, keys, checkAll) => {\n setStateKeys(direction, prevKeys => {\n let mergedCheckedKeys = [];\n if (checkAll === 'replace') {\n mergedCheckedKeys = keys;\n } else if (checkAll) {\n // Merge current keys with origin key\n mergedCheckedKeys = Array.from(new Set([].concat((0, _toConsumableArray2.default)(prevKeys), (0, _toConsumableArray2.default)(keys))));\n } else {\n const selectedKeysMap = (0, _transKeys.groupKeysMap)(keys);\n // Remove current keys from origin keys\n mergedCheckedKeys = prevKeys.filter(key => !selectedKeysMap.has(key));\n }\n handleSelectChange(direction, mergedCheckedKeys);\n return mergedCheckedKeys;\n });\n setPrevSelectedIndex(direction, null);\n };\n const onLeftItemSelectAll = (keys, checkAll) => {\n onItemSelectAll('left', keys, checkAll);\n };\n const onRightItemSelectAll = (keys, checkAll) => {\n onItemSelectAll('right', keys, checkAll);\n };\n const leftFilter = e => onSearch === null || onSearch === void 0 ? void 0 : onSearch('left', e.target.value);\n const rightFilter = e => onSearch === null || onSearch === void 0 ? void 0 : onSearch('right', e.target.value);\n const handleLeftClear = () => onSearch === null || onSearch === void 0 ? void 0 : onSearch('left', '');\n const handleRightClear = () => onSearch === null || onSearch === void 0 ? void 0 : onSearch('right', '');\n const handleSingleSelect = (direction, holder, selectedKey, checked, currentSelectedIndex) => {\n const isSelected = holder.has(selectedKey);\n if (isSelected) {\n holder.delete(selectedKey);\n setPrevSelectedIndex(direction, null);\n }\n if (checked) {\n holder.add(selectedKey);\n setPrevSelectedIndex(direction, currentSelectedIndex);\n }\n };\n const handleMultipleSelect = (direction, data, holder, currentSelectedIndex) => {\n const isLeftDirection = direction === 'left';\n const multipleSelect = isLeftDirection ? leftMultipleSelect : rightMultipleSelect;\n multipleSelect(currentSelectedIndex, data, holder);\n };\n const onItemSelect = (direction, selectedKey, checked, multiple) => {\n const isLeftDirection = direction === 'left';\n const holder = (0, _toConsumableArray2.default)(isLeftDirection ? sourceSelectedKeys : targetSelectedKeys);\n const holderSet = new Set(holder);\n const data = (0, _toConsumableArray2.default)(isLeftDirection ? leftDataSource : rightDataSource).filter(item => !(item === null || item === void 0 ? void 0 : item.disabled));\n const currentSelectedIndex = data.findIndex(item => item.key === selectedKey);\n // multiple select by hold down the shift key\n if (multiple && holder.length > 0) {\n handleMultipleSelect(direction, data, holderSet, currentSelectedIndex);\n } else {\n handleSingleSelect(direction, holderSet, selectedKey, checked, currentSelectedIndex);\n }\n const holderArr = Array.from(holderSet);\n handleSelectChange(direction, holderArr);\n if (!props.selectedKeys) {\n setStateKeys(direction, holderArr);\n }\n };\n const onLeftItemSelect = (selectedKey, checked, e) => {\n onItemSelect('left', selectedKey, checked, e === null || e === void 0 ? void 0 : e.shiftKey);\n };\n const onRightItemSelect = (selectedKey, checked, e) => {\n onItemSelect('right', selectedKey, checked, e === null || e === void 0 ? void 0 : e.shiftKey);\n };\n const onRightItemRemove = keys => {\n setStateKeys('right', []);\n onChange === null || onChange === void 0 ? void 0 : onChange(targetKeys.filter(key => !keys.includes(key)), 'left', (0, _toConsumableArray2.default)(keys));\n };\n const handleListStyle = direction => {\n if (typeof listStyle === 'function') {\n return listStyle({\n direction\n });\n }\n return listStyle || {};\n };\n const formItemContext = (0, _react.useContext)(_context.FormItemInputContext);\n const {\n hasFeedback,\n status\n } = formItemContext;\n const getLocale = transferLocale => Object.assign(Object.assign(Object.assign({}, transferLocale), {\n notFoundContent: (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Transfer')) || /*#__PURE__*/_react.default.createElement(_defaultRenderEmpty.default, {\n componentName: \"Transfer\"\n })\n }), locale);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(status, customStatus);\n const mergedPagination = !children && pagination;\n const leftActive = targetSelectedKeys.length > 0;\n const rightActive = sourceSelectedKeys.length > 0;\n const cls = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-disabled`]: disabled,\n [`${prefixCls}-customize-list`]: !!children,\n [`${prefixCls}-rtl`]: dir === 'rtl'\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus, hasFeedback), transfer === null || transfer === void 0 ? void 0 : transfer.className, className, rootClassName, hashId, cssVarCls);\n const [contextLocale] = (0, _locale.useLocale)('Transfer', _en_US.default.Transfer);\n const listLocale = getLocale(contextLocale);\n const [leftTitle, rightTitle] = getTitles(listLocale);\n const mergedSelectionsIcon = selectionsIcon !== null && selectionsIcon !== void 0 ? selectionsIcon : transfer === null || transfer === void 0 ? void 0 : transfer.selectionsIcon;\n return wrapCSSVar(/*#__PURE__*/_react.default.createElement(\"div\", {\n className: cls,\n style: Object.assign(Object.assign({}, transfer === null || transfer === void 0 ? void 0 : transfer.style), style)\n }, /*#__PURE__*/_react.default.createElement(_list.default, Object.assign({\n prefixCls: `${prefixCls}-list`,\n titleText: leftTitle,\n dataSource: leftDataSource,\n filterOption: filterOption,\n style: handleListStyle('left'),\n checkedKeys: sourceSelectedKeys,\n handleFilter: leftFilter,\n handleClear: handleLeftClear,\n onItemSelect: onLeftItemSelect,\n onItemSelectAll: onLeftItemSelectAll,\n render: render,\n showSearch: showSearch,\n renderList: children,\n footer: footer,\n onScroll: handleLeftScroll,\n disabled: disabled,\n direction: dir === 'rtl' ? 'right' : 'left',\n showSelectAll: showSelectAll,\n selectAllLabel: selectAllLabels[0],\n pagination: mergedPagination,\n selectionsIcon: mergedSelectionsIcon\n }, listLocale)), /*#__PURE__*/_react.default.createElement(_operation.default, {\n className: `${prefixCls}-operation`,\n rightActive: rightActive,\n rightArrowText: operations[0],\n moveToRight: moveToRight,\n leftActive: leftActive,\n leftArrowText: operations[1],\n moveToLeft: moveToLeft,\n style: operationStyle,\n disabled: disabled,\n direction: dir,\n oneWay: oneWay\n }), /*#__PURE__*/_react.default.createElement(_list.default, Object.assign({\n prefixCls: `${prefixCls}-list`,\n titleText: rightTitle,\n dataSource: rightDataSource,\n filterOption: filterOption,\n style: handleListStyle('right'),\n checkedKeys: targetSelectedKeys,\n handleFilter: rightFilter,\n handleClear: handleRightClear,\n onItemSelect: onRightItemSelect,\n onItemSelectAll: onRightItemSelectAll,\n onItemRemove: onRightItemRemove,\n render: render,\n showSearch: showSearch,\n renderList: children,\n footer: footer,\n onScroll: handleRightScroll,\n disabled: disabled,\n direction: dir === 'rtl' ? 'left' : 'right',\n showSelectAll: showSelectAll,\n selectAllLabel: selectAllLabels[1],\n showRemove: oneWay,\n pagination: mergedPagination,\n selectionsIcon: mergedSelectionsIcon\n }, listLocale))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Transfer.displayName = 'Transfer';\n}\nTransfer.List = _list.default;\nTransfer.Search = _search.default;\nTransfer.Operation = _operation.default;\nvar _default = exports.default = Transfer;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _DownOutlined = _interopRequireDefault(require(\"@ant-design/icons/DownOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _transKeys = require(\"../_util/transKeys\");\nvar _checkbox = _interopRequireDefault(require(\"../checkbox\"));\nvar _dropdown = _interopRequireDefault(require(\"../dropdown\"));\nvar _ListBody = _interopRequireWildcard(require(\"./ListBody\"));\nvar _search = _interopRequireDefault(require(\"./search\"));\nconst defaultRender = () => null;\nfunction isRenderResultPlainObject(result) {\n return !!(result && ! /*#__PURE__*/_react.default.isValidElement(result) && Object.prototype.toString.call(result) === '[object Object]');\n}\nfunction getEnabledItemKeys(items) {\n return items.filter(data => !data.disabled).map(data => data.key);\n}\nconst isValidIcon = icon => icon !== undefined;\nconst TransferList = props => {\n const {\n prefixCls,\n dataSource = [],\n titleText = '',\n checkedKeys,\n disabled,\n showSearch = false,\n style,\n searchPlaceholder,\n notFoundContent,\n selectAll,\n deselectAll,\n selectCurrent,\n selectInvert,\n removeAll,\n removeCurrent,\n showSelectAll = true,\n showRemove,\n pagination,\n direction,\n itemsUnit,\n itemUnit,\n selectAllLabel,\n selectionsIcon,\n footer,\n renderList,\n onItemSelectAll,\n onItemRemove,\n handleFilter,\n handleClear,\n filterOption,\n render = defaultRender\n } = props;\n const [filterValue, setFilterValue] = (0, _react.useState)('');\n const listBodyRef = (0, _react.useRef)({});\n const internalHandleFilter = e => {\n setFilterValue(e.target.value);\n handleFilter(e);\n };\n const internalHandleClear = () => {\n setFilterValue('');\n handleClear();\n };\n const matchFilter = (text, item) => {\n if (filterOption) {\n return filterOption(filterValue, item, direction);\n }\n return text.includes(filterValue);\n };\n const renderListBody = listProps => {\n let bodyContent = renderList ? renderList(Object.assign(Object.assign({}, listProps), {\n onItemSelect: (key, check) => listProps.onItemSelect(key, check)\n })) : null;\n const customize = !!bodyContent;\n if (!customize) {\n // @ts-ignore\n bodyContent = /*#__PURE__*/_react.default.createElement(_ListBody.default, Object.assign({\n ref: listBodyRef\n }, listProps));\n }\n return {\n customize,\n bodyContent\n };\n };\n const renderItem = item => {\n const renderResult = render(item);\n const isRenderResultPlain = isRenderResultPlainObject(renderResult);\n return {\n item,\n renderedEl: isRenderResultPlain ? renderResult.label : renderResult,\n renderedText: isRenderResultPlain ? renderResult.value : renderResult\n };\n };\n const notFoundContentEle = (0, _react.useMemo)(() => Array.isArray(notFoundContent) ? notFoundContent[direction === 'left' ? 0 : 1] : notFoundContent, [notFoundContent, direction]);\n const [filteredItems, filteredRenderItems] = (0, _react.useMemo)(() => {\n const filterItems = [];\n const filterRenderItems = [];\n dataSource.forEach(item => {\n const renderedItem = renderItem(item);\n if (filterValue && !matchFilter(renderedItem.renderedText, item)) {\n return;\n }\n filterItems.push(item);\n filterRenderItems.push(renderedItem);\n });\n return [filterItems, filterRenderItems];\n }, [dataSource, filterValue]);\n const checkStatus = (0, _react.useMemo)(() => {\n if (checkedKeys.length === 0) {\n return 'none';\n }\n const checkedKeysMap = (0, _transKeys.groupKeysMap)(checkedKeys);\n if (filteredItems.every(item => checkedKeysMap.has(item.key) || !!item.disabled)) {\n return 'all';\n }\n return 'part';\n }, [checkedKeys, filteredItems]);\n const listBody = (0, _react.useMemo)(() => {\n const search = showSearch ? (/*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-body-search-wrapper`\n }, /*#__PURE__*/_react.default.createElement(_search.default, {\n prefixCls: `${prefixCls}-search`,\n onChange: internalHandleFilter,\n handleClear: internalHandleClear,\n placeholder: searchPlaceholder,\n value: filterValue,\n disabled: disabled\n }))) : null;\n const {\n customize,\n bodyContent\n } = renderListBody(Object.assign(Object.assign({}, (0, _omit.default)(props, _ListBody.OmitProps)), {\n filteredItems,\n filteredRenderItems,\n selectedKeys: checkedKeys\n }));\n let bodyNode;\n // We should wrap customize list body in a classNamed div to use flex layout.\n if (customize) {\n bodyNode = /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-body-customize-wrapper`\n }, bodyContent);\n } else {\n bodyNode = filteredItems.length ? bodyContent : (/*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-body-not-found`\n }, notFoundContentEle));\n }\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: (0, _classnames.default)(showSearch ? `${prefixCls}-body ${prefixCls}-body-with-search` : `${prefixCls}-body`)\n }, search, bodyNode);\n }, [showSearch, prefixCls, searchPlaceholder, filterValue, disabled, checkedKeys, filteredItems, filteredRenderItems, notFoundContentEle]);\n const checkBox = /*#__PURE__*/_react.default.createElement(_checkbox.default, {\n disabled: dataSource.length === 0 || disabled,\n checked: checkStatus === 'all',\n indeterminate: checkStatus === 'part',\n className: `${prefixCls}-checkbox`,\n onChange: () => {\n // Only select enabled items\n onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(filteredItems.filter(item => !item.disabled).map(_ref => {\n let {\n key\n } = _ref;\n return key;\n }), checkStatus !== 'all');\n }\n });\n const getSelectAllLabel = (selectedCount, totalCount) => {\n if (selectAllLabel) {\n return typeof selectAllLabel === 'function' ? selectAllLabel({\n selectedCount,\n totalCount\n }) : selectAllLabel;\n }\n const unit = totalCount > 1 ? itemsUnit : itemUnit;\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (selectedCount > 0 ? `${selectedCount}/` : '') + totalCount, \" \", unit);\n };\n // Custom Layout\n const footerDom = footer && (footer.length < 2 ? footer(props) : footer(props, {\n direction\n }));\n const listCls = (0, _classnames.default)(prefixCls, {\n [`${prefixCls}-with-pagination`]: !!pagination,\n [`${prefixCls}-with-footer`]: !!footerDom\n });\n // ====================== Get filtered, checked item list ======================\n const listFooter = footerDom ? /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-footer`\n }, footerDom) : null;\n const checkAllCheckbox = !showRemove && !pagination && checkBox;\n let items;\n if (showRemove) {\n items = [/* Remove Current Page */\n pagination ? {\n key: 'removeCurrent',\n label: removeCurrent,\n onClick() {\n var _a;\n const pageKeys = getEnabledItemKeys((((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || []).map(entity => entity.item));\n onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(pageKeys);\n }\n } : null, /* Remove All */\n {\n key: 'removeAll',\n label: removeAll,\n onClick() {\n onItemRemove === null || onItemRemove === void 0 ? void 0 : onItemRemove(getEnabledItemKeys(filteredItems));\n }\n }].filter(Boolean);\n } else {\n items = [{\n key: 'selectAll',\n label: checkStatus === 'all' ? deselectAll : selectAll,\n onClick() {\n const keys = getEnabledItemKeys(filteredItems);\n onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(keys, keys.length !== checkedKeys.length);\n }\n }, pagination ? {\n key: 'selectCurrent',\n label: selectCurrent,\n onClick() {\n var _a;\n const pageItems = ((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || [];\n onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(getEnabledItemKeys(pageItems.map(entity => entity.item)), true);\n }\n } : null, {\n key: 'selectInvert',\n label: selectInvert,\n onClick() {\n var _a;\n const availablePageItemKeys = getEnabledItemKeys((((_a = listBodyRef.current) === null || _a === void 0 ? void 0 : _a.items) || []).map(entity => entity.item));\n const checkedKeySet = new Set(checkedKeys);\n const newCheckedKeysSet = new Set(checkedKeySet);\n availablePageItemKeys.forEach(key => {\n if (checkedKeySet.has(key)) {\n newCheckedKeysSet.delete(key);\n } else {\n newCheckedKeysSet.add(key);\n }\n });\n onItemSelectAll === null || onItemSelectAll === void 0 ? void 0 : onItemSelectAll(Array.from(newCheckedKeysSet), 'replace');\n }\n }];\n }\n const dropdown = /*#__PURE__*/_react.default.createElement(_dropdown.default, {\n className: `${prefixCls}-header-dropdown`,\n menu: {\n items\n },\n disabled: disabled\n }, isValidIcon(selectionsIcon) ? selectionsIcon : /*#__PURE__*/_react.default.createElement(_DownOutlined.default, null));\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: listCls,\n style: style\n }, /*#__PURE__*/_react.default.createElement(\"div\", {\n className: `${prefixCls}-header`\n }, showSelectAll ? (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, checkAllCheckbox, dropdown)) : null, /*#__PURE__*/_react.default.createElement(\"span\", {\n className: `${prefixCls}-header-selected`\n }, getSelectAllLabel(checkedKeys.length, filteredItems.length)), /*#__PURE__*/_react.default.createElement(\"span\", {\n className: `${prefixCls}-header-title`\n }, titleText)), listBody, listFooter);\n};\nif (process.env.NODE_ENV !== 'production') {\n TransferList.displayName = 'TransferList';\n}\nvar _default = exports.default = TransferList;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _LeftOutlined = _interopRequireDefault(require(\"@ant-design/icons/LeftOutlined\"));\nvar _RightOutlined = _interopRequireDefault(require(\"@ant-design/icons/RightOutlined\"));\nvar _button = _interopRequireDefault(require(\"../button\"));\nconst Operation = props => {\n const {\n disabled,\n moveToLeft,\n moveToRight,\n leftArrowText = '',\n rightArrowText = '',\n leftActive,\n rightActive,\n className,\n style,\n direction,\n oneWay\n } = props;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n style: style\n }, /*#__PURE__*/React.createElement(_button.default, {\n type: \"primary\",\n size: \"small\",\n disabled: disabled || !rightActive,\n onClick: moveToRight,\n icon: direction !== 'rtl' ? /*#__PURE__*/React.createElement(_RightOutlined.default, null) : /*#__PURE__*/React.createElement(_LeftOutlined.default, null)\n }, rightArrowText), !oneWay && (/*#__PURE__*/React.createElement(_button.default, {\n type: \"primary\",\n size: \"small\",\n disabled: disabled || !leftActive,\n onClick: moveToLeft,\n icon: direction !== 'rtl' ? /*#__PURE__*/React.createElement(_LeftOutlined.default, null) : /*#__PURE__*/React.createElement(_RightOutlined.default, null)\n }, leftArrowText)));\n};\nif (process.env.NODE_ENV !== 'production') {\n Operation.displayName = 'Operation';\n}\nvar _default = exports.default = Operation;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _SearchOutlined = _interopRequireDefault(require(\"@ant-design/icons/SearchOutlined\"));\nvar _input = _interopRequireDefault(require(\"../input\"));\nconst Search = props => {\n const {\n placeholder = '',\n value,\n prefixCls,\n disabled,\n onChange,\n handleClear\n } = props;\n const handleChange = React.useCallback(e => {\n onChange === null || onChange === void 0 ? void 0 : onChange(e);\n if (e.target.value === '') {\n handleClear === null || handleClear === void 0 ? void 0 : handleClear();\n }\n }, [onChange]);\n return /*#__PURE__*/React.createElement(_input.default, {\n placeholder: placeholder,\n className: prefixCls,\n value: value,\n onChange: handleChange,\n disabled: disabled,\n allowClear: true,\n prefix: /*#__PURE__*/React.createElement(_SearchOutlined.default, null)\n });\n};\nif (process.env.NODE_ENV !== 'production') {\n Search.displayName = 'Search';\n}\nvar _default = exports.default = Search;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nconst genTransferCustomizeStyle = token => {\n const {\n antCls,\n componentCls,\n listHeight,\n controlHeightLG\n } = token;\n const tableCls = `${antCls}-table`;\n const inputCls = `${antCls}-input`;\n return {\n [`${componentCls}-customize-list`]: {\n [`${componentCls}-list`]: {\n flex: '1 1 50%',\n width: 'auto',\n height: 'auto',\n minHeight: listHeight,\n minWidth: 0\n },\n // =================== Hook Components ===================\n [`${tableCls}-wrapper`]: {\n [`${tableCls}-small`]: {\n border: 0,\n borderRadius: 0,\n [`${tableCls}-selection-column`]: {\n width: controlHeightLG,\n minWidth: controlHeightLG\n }\n },\n [`${tableCls}-pagination${tableCls}-pagination`]: {\n margin: 0,\n padding: token.paddingXS\n }\n },\n [`${inputCls}[disabled]`]: {\n backgroundColor: 'transparent'\n }\n }\n };\n};\nconst genTransferStatusColor = (token, color) => {\n const {\n componentCls,\n colorBorder\n } = token;\n return {\n [`${componentCls}-list`]: {\n borderColor: color,\n '&-search:not([disabled])': {\n borderColor: colorBorder\n }\n }\n };\n};\nconst genTransferStatusStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-status-error`]: Object.assign({}, genTransferStatusColor(token, token.colorError)),\n [`${componentCls}-status-warning`]: Object.assign({}, genTransferStatusColor(token, token.colorWarning))\n };\n};\nconst genTransferListStyle = token => {\n const {\n componentCls,\n colorBorder,\n colorSplit,\n lineWidth,\n itemHeight,\n headerHeight,\n transferHeaderVerticalPadding,\n itemPaddingBlock,\n controlItemBgActive,\n colorTextDisabled,\n colorTextSecondary,\n listHeight,\n listWidth,\n listWidthLG,\n fontSizeIcon,\n marginXS,\n paddingSM,\n lineType,\n antCls,\n iconCls,\n motionDurationSlow,\n controlItemBgHover,\n borderRadiusLG,\n colorBgContainer,\n colorText,\n controlItemBgActiveHover\n } = token;\n return {\n display: 'flex',\n flexDirection: 'column',\n width: listWidth,\n height: listHeight,\n border: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorBorder}`,\n borderRadius: token.borderRadiusLG,\n '&-with-pagination': {\n width: listWidthLG,\n height: 'auto'\n },\n '&-search': {\n [`${iconCls}-search`]: {\n color: colorTextDisabled\n }\n },\n '&-header': {\n display: 'flex',\n flex: 'none',\n alignItems: 'center',\n height: headerHeight,\n // border-top is on the transfer dom. We should minus 1px for this\n padding: `${(0, _cssinjs.unit)(token.calc(transferHeaderVerticalPadding).sub(lineWidth).equal())} ${(0, _cssinjs.unit)(paddingSM)} ${(0, _cssinjs.unit)(transferHeaderVerticalPadding)}`,\n color: colorText,\n background: colorBgContainer,\n borderBottom: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,\n borderRadius: `${(0, _cssinjs.unit)(borderRadiusLG)} ${(0, _cssinjs.unit)(borderRadiusLG)} 0 0`,\n '> *:not(:last-child)': {\n marginInlineEnd: 4 // This is magic and fixed number, DO NOT use token since it may change.\n },\n '> *': {\n flex: 'none'\n },\n '&-title': Object.assign(Object.assign({}, _style.textEllipsis), {\n flex: 'auto',\n textAlign: 'end'\n }),\n '&-dropdown': Object.assign(Object.assign({}, (0, _style.resetIcon)()), {\n fontSize: fontSizeIcon,\n transform: 'translateY(10%)',\n cursor: 'pointer',\n '&[disabled]': {\n cursor: 'not-allowed'\n }\n })\n },\n '&-body': {\n display: 'flex',\n flex: 'auto',\n flexDirection: 'column',\n fontSize: token.fontSize,\n // https://blog.csdn.net/qq449245884/article/details/107373672/\n minHeight: 0,\n '&-search-wrapper': {\n position: 'relative',\n flex: 'none',\n padding: paddingSM\n }\n },\n '&-content': {\n flex: 'auto',\n margin: 0,\n padding: 0,\n overflow: 'auto',\n listStyle: 'none',\n '&-item': {\n display: 'flex',\n alignItems: 'center',\n minHeight: itemHeight,\n padding: `${(0, _cssinjs.unit)(itemPaddingBlock)} ${(0, _cssinjs.unit)(paddingSM)}`,\n transition: `all ${motionDurationSlow}`,\n '> *:not(:last-child)': {\n marginInlineEnd: marginXS\n },\n '> *': {\n flex: 'none'\n },\n '&-text': Object.assign(Object.assign({}, _style.textEllipsis), {\n flex: 'auto'\n }),\n '&-remove': Object.assign(Object.assign({}, (0, _style.operationUnit)(token)), {\n color: colorBorder,\n '&:hover, &:focus': {\n color: colorTextSecondary\n }\n }),\n [`&:not(${componentCls}-list-content-item-disabled)`]: {\n '&:hover': {\n backgroundColor: controlItemBgHover,\n cursor: 'pointer'\n },\n [`&${componentCls}-list-content-item-checked:hover`]: {\n backgroundColor: controlItemBgActiveHover\n }\n },\n '&-checked': {\n backgroundColor: controlItemBgActive\n },\n '&-disabled': {\n color: colorTextDisabled,\n cursor: 'not-allowed'\n }\n },\n // Do not change hover style when `oneWay` mode\n [`&-show-remove ${componentCls}-list-content-item:not(${componentCls}-list-content-item-disabled):hover`]: {\n background: 'transparent',\n cursor: 'default'\n }\n },\n '&-pagination': {\n padding: token.paddingXS,\n textAlign: 'end',\n borderTop: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`,\n [`${antCls}-pagination-options`]: {\n paddingInlineEnd: token.paddingXS\n }\n },\n '&-body-not-found': {\n flex: 'none',\n width: '100%',\n margin: 'auto 0',\n color: colorTextDisabled,\n textAlign: 'center'\n },\n '&-footer': {\n borderTop: `${(0, _cssinjs.unit)(lineWidth)} ${lineType} ${colorSplit}`\n },\n // fix: https://github.com/ant-design/ant-design/issues/44489\n '&-checkbox': {\n lineHeight: 1\n }\n };\n};\nconst genTransferStyle = token => {\n const {\n antCls,\n iconCls,\n componentCls,\n marginXS,\n marginXXS,\n fontSizeIcon,\n colorBgContainerDisabled\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n position: 'relative',\n display: 'flex',\n alignItems: 'stretch',\n [`${componentCls}-disabled`]: {\n [`${componentCls}-list`]: {\n background: colorBgContainerDisabled\n }\n },\n [`${componentCls}-list`]: genTransferListStyle(token),\n [`${componentCls}-operation`]: {\n display: 'flex',\n flex: 'none',\n flexDirection: 'column',\n alignSelf: 'center',\n margin: `0 ${(0, _cssinjs.unit)(marginXS)}`,\n verticalAlign: 'middle',\n gap: marginXXS,\n [`${antCls}-btn ${iconCls}`]: {\n fontSize: fontSizeIcon\n }\n }\n })\n };\n};\nconst genTransferRTLStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-rtl`]: {\n direction: 'rtl'\n }\n };\n};\nconst prepareComponentToken = token => {\n const {\n fontSize,\n lineHeight,\n controlHeight,\n controlHeightLG,\n lineWidth\n } = token;\n const fontHeight = Math.round(fontSize * lineHeight);\n return {\n listWidth: 180,\n listHeight: 200,\n listWidthLG: 250,\n headerHeight: controlHeightLG,\n itemHeight: controlHeight,\n itemPaddingBlock: (controlHeight - fontHeight) / 2,\n transferHeaderVerticalPadding: Math.ceil((controlHeightLG - lineWidth - fontHeight) / 2)\n };\n};\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Transfer', token => {\n const transferToken = (0, _internal.mergeToken)(token);\n return [genTransferStyle(transferToken), genTransferCustomizeStyle(transferToken), genTransferStatusStyle(transferToken), genTransferRTLStyle(transferToken)];\n}, prepareComponentToken);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"TreeNode\", {\n enumerable: true,\n get: function () {\n return _rcTreeSelect.TreeNode;\n }\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTreeSelect = _interopRequireWildcard(require(\"rc-tree-select\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useZIndex = require(\"../_util/hooks/useZIndex\");\nvar _motion = require(\"../_util/motion\");\nvar _PurePanel = _interopRequireDefault(require(\"../_util/PurePanel\"));\nvar _statusUtils = require(\"../_util/statusUtils\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _defaultRenderEmpty = _interopRequireDefault(require(\"../config-provider/defaultRenderEmpty\"));\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _useCSSVarCls = _interopRequireDefault(require(\"../config-provider/hooks/useCSSVarCls\"));\nvar _useSize = _interopRequireDefault(require(\"../config-provider/hooks/useSize\"));\nvar _context = require(\"../form/context\");\nvar _useVariants = _interopRequireDefault(require(\"../form/hooks/useVariants\"));\nvar _mergedBuiltinPlacements = _interopRequireDefault(require(\"../select/mergedBuiltinPlacements\"));\nvar _style = _interopRequireDefault(require(\"../select/style\"));\nvar _useIcons = _interopRequireDefault(require(\"../select/useIcons\"));\nvar _useShowArrow = _interopRequireDefault(require(\"../select/useShowArrow\"));\nvar _Compact = require(\"../space/Compact\");\nvar _iconUtil = _interopRequireDefault(require(\"../tree/utils/iconUtil\"));\nvar _style2 = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst InternalTreeSelect = (props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n size: customizeSize,\n disabled: customDisabled,\n bordered = true,\n className,\n rootClassName,\n treeCheckable,\n multiple,\n listHeight = 256,\n listItemHeight = 26,\n placement,\n notFoundContent,\n switcherIcon,\n treeLine,\n getPopupContainer,\n popupClassName,\n dropdownClassName,\n treeIcon = false,\n transitionName,\n choiceTransitionName = '',\n status: customStatus,\n treeExpandAction,\n builtinPlacements,\n dropdownMatchSelectWidth,\n popupMatchSelectWidth,\n allowClear,\n variant: customVariant,\n dropdownStyle,\n tagRender\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"size\", \"disabled\", \"bordered\", \"className\", \"rootClassName\", \"treeCheckable\", \"multiple\", \"listHeight\", \"listItemHeight\", \"placement\", \"notFoundContent\", \"switcherIcon\", \"treeLine\", \"getPopupContainer\", \"popupClassName\", \"dropdownClassName\", \"treeIcon\", \"transitionName\", \"choiceTransitionName\", \"status\", \"treeExpandAction\", \"builtinPlacements\", \"dropdownMatchSelectWidth\", \"popupMatchSelectWidth\", \"allowClear\", \"variant\", \"dropdownStyle\", \"tagRender\"]);\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n renderEmpty,\n direction,\n virtual,\n popupMatchSelectWidth: contextPopupMatchSelectWidth,\n popupOverflow\n } = React.useContext(_configProvider.ConfigContext);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('TreeSelect');\n process.env.NODE_ENV !== \"production\" ? warning(multiple !== false || !treeCheckable, 'usage', '`multiple` will always be `true` when `treeCheckable` is true') : void 0;\n warning.deprecated(!dropdownClassName, 'dropdownClassName', 'popupClassName');\n warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');\n process.env.NODE_ENV !== \"production\" ? warning(!('showArrow' in props), 'deprecated', '`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null.') : void 0;\n warning.deprecated(!('bordered' in props), 'bordered', 'variant');\n }\n const rootPrefixCls = getPrefixCls();\n const prefixCls = getPrefixCls('select', customizePrefixCls);\n const treePrefixCls = getPrefixCls('select-tree', customizePrefixCls);\n const treeSelectPrefixCls = getPrefixCls('tree-select', customizePrefixCls);\n const {\n compactSize,\n compactItemClassnames\n } = (0, _Compact.useCompactItemContext)(prefixCls, direction);\n const rootCls = (0, _useCSSVarCls.default)(prefixCls);\n const treeSelectRootCls = (0, _useCSSVarCls.default)(treeSelectPrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, rootCls);\n const [treeSelectWrapCSSVar] = (0, _style2.default)(treeSelectPrefixCls, treePrefixCls, treeSelectRootCls);\n const [variant, enableVariantCls] = (0, _useVariants.default)('treeSelect', customVariant, bordered);\n const mergedDropdownClassName = (0, _classnames.default)(popupClassName || dropdownClassName, `${treeSelectPrefixCls}-dropdown`, {\n [`${treeSelectPrefixCls}-dropdown-rtl`]: direction === 'rtl'\n }, rootClassName, cssVarCls, rootCls, treeSelectRootCls, hashId);\n const isMultiple = !!(treeCheckable || multiple);\n const showSuffixIcon = (0, _useShowArrow.default)(props.suffixIcon, props.showArrow);\n const mergedPopupMatchSelectWidth = (_a = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _a !== void 0 ? _a : contextPopupMatchSelectWidth;\n // ===================== Form =====================\n const {\n status: contextStatus,\n hasFeedback,\n isFormItemInput,\n feedbackIcon\n } = React.useContext(_context.FormItemInputContext);\n const mergedStatus = (0, _statusUtils.getMergedStatus)(contextStatus, customStatus);\n // ===================== Icons =====================\n const {\n suffixIcon,\n removeIcon,\n clearIcon\n } = (0, _useIcons.default)(Object.assign(Object.assign({}, restProps), {\n multiple: isMultiple,\n showSuffixIcon,\n hasFeedback,\n feedbackIcon,\n prefixCls,\n componentName: 'TreeSelect'\n }));\n const mergedAllowClear = allowClear === true ? {\n clearIcon\n } : allowClear;\n // ===================== Empty =====================\n let mergedNotFound;\n if (notFoundContent !== undefined) {\n mergedNotFound = notFoundContent;\n } else {\n mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/React.createElement(_defaultRenderEmpty.default, {\n componentName: \"Select\"\n });\n }\n // ==================== Render =====================\n const selectProps = (0, _omit.default)(restProps, ['suffixIcon', 'removeIcon', 'clearIcon', 'itemIcon', 'switcherIcon']);\n // ===================== Placement =====================\n const memoizedPlacement = React.useMemo(() => {\n if (placement !== undefined) {\n return placement;\n }\n return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';\n }, [placement, direction]);\n const mergedSize = (0, _useSize.default)(ctx => {\n var _a;\n return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;\n });\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const mergedClassName = (0, _classnames.default)(!customizePrefixCls && treeSelectPrefixCls, {\n [`${prefixCls}-lg`]: mergedSize === 'large',\n [`${prefixCls}-sm`]: mergedSize === 'small',\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-${variant}`]: enableVariantCls,\n [`${prefixCls}-in-form-item`]: isFormItemInput\n }, (0, _statusUtils.getStatusClassNames)(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, className, rootClassName, cssVarCls, rootCls, treeSelectRootCls, hashId);\n const renderSwitcherIcon = nodeProps => (/*#__PURE__*/React.createElement(_iconUtil.default, {\n prefixCls: treePrefixCls,\n switcherIcon: switcherIcon,\n treeNodeProps: nodeProps,\n showLine: treeLine\n }));\n // ============================ zIndex ============================\n const [zIndex] = (0, _useZIndex.useZIndex)('SelectLike', dropdownStyle === null || dropdownStyle === void 0 ? void 0 : dropdownStyle.zIndex);\n const returnNode = /*#__PURE__*/React.createElement(_rcTreeSelect.default, Object.assign({\n virtual: virtual,\n disabled: mergedDisabled\n }, selectProps, {\n dropdownMatchSelectWidth: mergedPopupMatchSelectWidth,\n builtinPlacements: (0, _mergedBuiltinPlacements.default)(builtinPlacements, popupOverflow),\n ref: ref,\n prefixCls: prefixCls,\n className: mergedClassName,\n listHeight: listHeight,\n listItemHeight: listItemHeight,\n treeCheckable: treeCheckable ? /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-tree-checkbox-inner`\n }) : treeCheckable,\n treeLine: !!treeLine,\n suffixIcon: suffixIcon,\n multiple: isMultiple,\n placement: memoizedPlacement,\n removeIcon: removeIcon,\n allowClear: mergedAllowClear,\n switcherIcon: renderSwitcherIcon,\n showTreeIcon: treeIcon,\n notFoundContent: mergedNotFound,\n getPopupContainer: getPopupContainer || getContextPopupContainer,\n treeMotion: null,\n dropdownClassName: mergedDropdownClassName,\n dropdownStyle: Object.assign(Object.assign({}, dropdownStyle), {\n zIndex\n }),\n choiceTransitionName: (0, _motion.getTransitionName)(rootPrefixCls, '', choiceTransitionName),\n transitionName: (0, _motion.getTransitionName)(rootPrefixCls, 'slide-up', transitionName),\n treeExpandAction: treeExpandAction,\n tagRender: isMultiple ? tagRender : undefined\n }));\n return wrapCSSVar(treeSelectWrapCSSVar(returnNode));\n};\nconst TreeSelectRef = /*#__PURE__*/React.forwardRef(InternalTreeSelect);\nconst TreeSelect = TreeSelectRef;\n// We don't care debug panel\n/* istanbul ignore next */\nconst PurePanel = (0, _PurePanel.default)(TreeSelect);\nTreeSelect.TreeNode = _rcTreeSelect.TreeNode;\nTreeSelect.SHOW_ALL = _rcTreeSelect.SHOW_ALL;\nTreeSelect.SHOW_PARENT = _rcTreeSelect.SHOW_PARENT;\nTreeSelect.SHOW_CHILD = _rcTreeSelect.SHOW_CHILD;\nTreeSelect._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nif (process.env.NODE_ENV !== 'production') {\n TreeSelect.displayName = 'TreeSelect';\n}\nvar _default = exports.default = TreeSelect;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useTreeSelectStyle;\nexports.prepareComponentToken = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../checkbox/style\");\nvar _internal = require(\"../../theme/internal\");\nvar _style2 = require(\"../../tree/style\");\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n treePrefixCls,\n colorBgElevated\n } = token;\n const treeCls = `.${treePrefixCls}`;\n return [\n // ======================================================\n // == Dropdown ==\n // ======================================================\n {\n [`${componentCls}-dropdown`]: [{\n padding: `${(0, _cssinjs.unit)(token.paddingXS)} ${(0, _cssinjs.unit)(token.calc(token.paddingXS).div(2).equal())}`\n },\n // ====================== Tree ======================\n (0, _style2.genTreeStyle)(treePrefixCls, (0, _internal.mergeToken)(token, {\n colorBgContainer: colorBgElevated\n })), {\n [treeCls]: {\n borderRadius: 0,\n [`${treeCls}-list-holder-inner`]: {\n alignItems: 'stretch',\n [`${treeCls}-treenode`]: {\n [`${treeCls}-node-content-wrapper`]: {\n flex: 'auto'\n }\n }\n }\n }\n },\n // ==================== Checkbox ====================\n (0, _style.getStyle)(`${treePrefixCls}-checkbox`, token),\n // ====================== RTL =======================\n {\n '&-rtl': {\n direction: 'rtl',\n [`${treeCls}-switcher${treeCls}-switcher_close`]: {\n [`${treeCls}-switcher-icon svg`]: {\n transform: 'rotate(90deg)'\n }\n }\n }\n }]\n }];\n};\nconst prepareComponentToken = exports.prepareComponentToken = _style2.initComponentToken;\n// ============================== Export ==============================\nfunction useTreeSelectStyle(prefixCls, treePrefixCls, rootCls) {\n return (0, _internal.genStyleHooks)('TreeSelect', token => {\n const treeSelectToken = (0, _internal.mergeToken)(token, {\n treePrefixCls\n });\n return [genBaseStyle(treeSelectToken)];\n }, _style2.initComponentToken)(prefixCls, rootCls);\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _FileOutlined = _interopRequireDefault(require(\"@ant-design/icons/FileOutlined\"));\nvar _FolderOpenOutlined = _interopRequireDefault(require(\"@ant-design/icons/FolderOpenOutlined\"));\nvar _FolderOutlined = _interopRequireDefault(require(\"@ant-design/icons/FolderOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _util = require(\"rc-tree/lib/util\");\nvar _treeUtil = require(\"rc-tree/lib/utils/treeUtil\");\nvar _configProvider = require(\"../config-provider\");\nvar _Tree = _interopRequireDefault(require(\"./Tree\"));\nvar _dictUtil = require(\"./utils/dictUtil\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction getIcon(props) {\n const {\n isLeaf,\n expanded\n } = props;\n if (isLeaf) {\n return /*#__PURE__*/React.createElement(_FileOutlined.default, null);\n }\n return expanded ? /*#__PURE__*/React.createElement(_FolderOpenOutlined.default, null) : /*#__PURE__*/React.createElement(_FolderOutlined.default, null);\n}\nfunction getTreeData(_ref) {\n let {\n treeData,\n children\n } = _ref;\n return treeData || (0, _treeUtil.convertTreeToData)(children);\n}\nconst DirectoryTree = (_a, ref) => {\n var {\n defaultExpandAll,\n defaultExpandParent,\n defaultExpandedKeys\n } = _a,\n props = __rest(_a, [\"defaultExpandAll\", \"defaultExpandParent\", \"defaultExpandedKeys\"]);\n // Shift click usage\n const lastSelectedKey = React.useRef();\n const cachedSelectedKeys = React.useRef();\n const getInitExpandedKeys = () => {\n const {\n keyEntities\n } = (0, _treeUtil.convertDataToEntities)(getTreeData(props));\n let initExpandedKeys;\n // Expanded keys\n if (defaultExpandAll) {\n initExpandedKeys = Object.keys(keyEntities);\n } else if (defaultExpandParent) {\n initExpandedKeys = (0, _util.conductExpandParent)(props.expandedKeys || defaultExpandedKeys || [], keyEntities);\n } else {\n initExpandedKeys = props.expandedKeys || defaultExpandedKeys || [];\n }\n return initExpandedKeys;\n };\n const [selectedKeys, setSelectedKeys] = React.useState(props.selectedKeys || props.defaultSelectedKeys || []);\n const [expandedKeys, setExpandedKeys] = React.useState(() => getInitExpandedKeys());\n React.useEffect(() => {\n if ('selectedKeys' in props) {\n setSelectedKeys(props.selectedKeys);\n }\n }, [props.selectedKeys]);\n React.useEffect(() => {\n if ('expandedKeys' in props) {\n setExpandedKeys(props.expandedKeys);\n }\n }, [props.expandedKeys]);\n const onExpand = (keys, info) => {\n var _a;\n if (!('expandedKeys' in props)) {\n setExpandedKeys(keys);\n }\n // Call origin function\n return (_a = props.onExpand) === null || _a === void 0 ? void 0 : _a.call(props, keys, info);\n };\n const onSelect = (keys, event) => {\n var _a;\n const {\n multiple,\n fieldNames\n } = props;\n const {\n node,\n nativeEvent\n } = event;\n const {\n key = ''\n } = node;\n const treeData = getTreeData(props);\n // const newState: DirectoryTreeState = {};\n // We need wrap this event since some value is not same\n const newEvent = Object.assign(Object.assign({}, event), {\n selected: true\n });\n // Windows / Mac single pick\n const ctrlPick = (nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.ctrlKey) || (nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.metaKey);\n const shiftPick = nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.shiftKey;\n // Generate new selected keys\n let newSelectedKeys;\n if (multiple && ctrlPick) {\n // Control click\n newSelectedKeys = keys;\n lastSelectedKey.current = key;\n cachedSelectedKeys.current = newSelectedKeys;\n newEvent.selectedNodes = (0, _dictUtil.convertDirectoryKeysToNodes)(treeData, newSelectedKeys, fieldNames);\n } else if (multiple && shiftPick) {\n // Shift click\n newSelectedKeys = Array.from(new Set([].concat((0, _toConsumableArray2.default)(cachedSelectedKeys.current || []), (0, _toConsumableArray2.default)((0, _dictUtil.calcRangeKeys)({\n treeData,\n expandedKeys,\n startKey: key,\n endKey: lastSelectedKey.current,\n fieldNames\n })))));\n newEvent.selectedNodes = (0, _dictUtil.convertDirectoryKeysToNodes)(treeData, newSelectedKeys, fieldNames);\n } else {\n // Single click\n newSelectedKeys = [key];\n lastSelectedKey.current = key;\n cachedSelectedKeys.current = newSelectedKeys;\n newEvent.selectedNodes = (0, _dictUtil.convertDirectoryKeysToNodes)(treeData, newSelectedKeys, fieldNames);\n }\n (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, newSelectedKeys, newEvent);\n if (!('selectedKeys' in props)) {\n setSelectedKeys(newSelectedKeys);\n }\n };\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className,\n showIcon = true,\n expandAction = 'click'\n } = props,\n otherProps = __rest(props, [\"prefixCls\", \"className\", \"showIcon\", \"expandAction\"]);\n const prefixCls = getPrefixCls('tree', customizePrefixCls);\n const connectClassName = (0, _classnames.default)(`${prefixCls}-directory`, {\n [`${prefixCls}-directory-rtl`]: direction === 'rtl'\n }, className);\n return /*#__PURE__*/React.createElement(_Tree.default, Object.assign({\n icon: getIcon,\n ref: ref,\n blockNode: true\n }, otherProps, {\n showIcon: showIcon,\n expandAction: expandAction,\n prefixCls: prefixCls,\n className: connectClassName,\n expandedKeys: expandedKeys,\n selectedKeys: selectedKeys,\n onSelect: onSelect,\n onExpand: onExpand\n }));\n};\nconst ForwardDirectoryTree = /*#__PURE__*/React.forwardRef(DirectoryTree);\nif (process.env.NODE_ENV !== 'production') {\n ForwardDirectoryTree.displayName = 'DirectoryTree';\n}\nvar _default = exports.default = ForwardDirectoryTree;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _HolderOutlined = _interopRequireDefault(require(\"@ant-design/icons/HolderOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcTree = _interopRequireDefault(require(\"rc-tree\"));\nvar _motion = _interopRequireDefault(require(\"../_util/motion\"));\nvar _configProvider = require(\"../config-provider\");\nvar _internal = require(\"../theme/internal\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _dropIndicator = _interopRequireDefault(require(\"./utils/dropIndicator\"));\nvar _iconUtil = _interopRequireDefault(require(\"./utils/iconUtil\"));\nconst Tree = /*#__PURE__*/_react.default.forwardRef((props, ref) => {\n var _a;\n const {\n getPrefixCls,\n direction,\n virtual,\n tree\n } = _react.default.useContext(_configProvider.ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className,\n showIcon = false,\n showLine,\n switcherIcon,\n switcherLoadingIcon,\n blockNode = false,\n children,\n checkable = false,\n selectable = true,\n draggable,\n motion: customMotion,\n style\n } = props;\n const prefixCls = getPrefixCls('tree', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const motion = customMotion !== null && customMotion !== void 0 ? customMotion : Object.assign(Object.assign({}, (0, _motion.default)(rootPrefixCls)), {\n motionAppear: false\n });\n const newProps = Object.assign(Object.assign({}, props), {\n checkable,\n selectable,\n showIcon,\n motion,\n blockNode,\n showLine: Boolean(showLine),\n dropIndicatorRender: _dropIndicator.default\n });\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const [, token] = (0, _internal.useToken)();\n const itemHeight = token.paddingXS / 2 + (((_a = token.Tree) === null || _a === void 0 ? void 0 : _a.titleHeight) || token.controlHeightSM);\n const draggableConfig = _react.default.useMemo(() => {\n if (!draggable) {\n return false;\n }\n let mergedDraggable = {};\n switch (typeof draggable) {\n case 'function':\n mergedDraggable.nodeDraggable = draggable;\n break;\n case 'object':\n mergedDraggable = Object.assign({}, draggable);\n break;\n default:\n break;\n // Do nothing\n }\n if (mergedDraggable.icon !== false) {\n mergedDraggable.icon = mergedDraggable.icon || /*#__PURE__*/_react.default.createElement(_HolderOutlined.default, null);\n }\n return mergedDraggable;\n }, [draggable]);\n const renderSwitcherIcon = nodeProps => (/*#__PURE__*/_react.default.createElement(_iconUtil.default, {\n prefixCls: prefixCls,\n switcherIcon: switcherIcon,\n switcherLoadingIcon: switcherLoadingIcon,\n treeNodeProps: nodeProps,\n showLine: showLine\n }));\n return wrapCSSVar(\n /*#__PURE__*/\n // @ts-ignore\n _react.default.createElement(_rcTree.default, Object.assign({\n itemHeight: itemHeight,\n ref: ref,\n virtual: virtual\n }, newProps, {\n // newProps may contain style so declare style below it\n style: Object.assign(Object.assign({}, tree === null || tree === void 0 ? void 0 : tree.style), style),\n prefixCls: prefixCls,\n className: (0, _classnames.default)({\n [`${prefixCls}-icon-hide`]: !showIcon,\n [`${prefixCls}-block-node`]: blockNode,\n [`${prefixCls}-unselectable`]: !selectable,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, tree === null || tree === void 0 ? void 0 : tree.className, className, hashId, cssVarCls),\n direction: direction,\n checkable: checkable ? /*#__PURE__*/_react.default.createElement(\"span\", {\n className: `${prefixCls}-checkbox-inner`\n }) : checkable,\n selectable: selectable,\n switcherIcon: renderSwitcherIcon,\n draggable: draggableConfig\n }), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n Tree.displayName = 'Tree';\n}\nvar _default = exports.default = Tree;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _rcTree = require(\"rc-tree\");\nvar _DirectoryTree = _interopRequireDefault(require(\"./DirectoryTree\"));\nvar _Tree = _interopRequireDefault(require(\"./Tree\"));\nconst Tree = _Tree.default;\nTree.DirectoryTree = _DirectoryTree.default;\nTree.TreeNode = _rcTree.TreeNode;\nvar _default = exports.default = Tree;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genDirectoryStyle = void 0;\n// ============================ Directory =============================\nconst genDirectoryStyle = _ref => {\n let {\n treeCls,\n treeNodeCls,\n directoryNodeSelectedBg,\n directoryNodeSelectedColor,\n motionDurationMid,\n borderRadius,\n controlItemBgHover\n } = _ref;\n return {\n [`${treeCls}${treeCls}-directory ${treeNodeCls}`]: {\n // >>> Title\n [`${treeCls}-node-content-wrapper`]: {\n position: 'static',\n [`> *:not(${treeCls}-drop-indicator)`]: {\n position: 'relative'\n },\n '&:hover': {\n background: 'transparent'\n },\n // Expand interactive area to whole line\n '&:before': {\n position: 'absolute',\n inset: 0,\n transition: `background-color ${motionDurationMid}`,\n content: '\"\"',\n borderRadius\n },\n '&:hover:before': {\n background: controlItemBgHover\n }\n },\n [`${treeCls}-switcher`]: {\n marginInlineEnd: 0\n },\n // ============= Selected =============\n '&-selected': {\n [`${treeCls}-switcher, ${treeCls}-draggable-icon`]: {\n color: directoryNodeSelectedColor,\n zIndex: 1\n },\n // >>> Title\n [`${treeCls}-node-content-wrapper`]: {\n color: directoryNodeSelectedColor,\n background: 'transparent',\n '&:before, &:hover:before': {\n background: directoryNodeSelectedBg\n }\n }\n }\n }\n };\n};\nexports.genDirectoryStyle = genDirectoryStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.initComponentToken = exports.genTreeStyle = exports.genBaseStyle = exports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../checkbox/style\");\nvar _style2 = require(\"../../style\");\nvar _directory = require(\"./directory\");\nvar _motion = require(\"../../style/motion\");\nvar _internal = require(\"../../theme/internal\");\n// ============================ Keyframes =============================\nconst treeNodeFX = new _cssinjs.Keyframes('ant-tree-node-fx-do-not-use', {\n '0%': {\n opacity: 0\n },\n '100%': {\n opacity: 1\n }\n});\n// ============================== Switch ==============================\nconst getSwitchStyle = (prefixCls, token) => ({\n [`.${prefixCls}-switcher-icon`]: {\n display: 'inline-block',\n fontSize: 10,\n verticalAlign: 'baseline',\n svg: {\n transition: `transform ${token.motionDurationSlow}`\n }\n }\n});\n// =============================== Drop ===============================\nconst getDropIndicatorStyle = (prefixCls, token) => ({\n [`.${prefixCls}-drop-indicator`]: {\n position: 'absolute',\n // it should displayed over the following node\n zIndex: 1,\n height: 2,\n backgroundColor: token.colorPrimary,\n borderRadius: 1,\n pointerEvents: 'none',\n '&:after': {\n position: 'absolute',\n top: -3,\n insetInlineStart: -6,\n width: 8,\n height: 8,\n backgroundColor: 'transparent',\n border: `${(0, _cssinjs.unit)(token.lineWidthBold)} solid ${token.colorPrimary}`,\n borderRadius: '50%',\n content: '\"\"'\n }\n }\n});\nconst genBaseStyle = (prefixCls, token) => {\n const {\n treeCls,\n treeNodeCls,\n treeNodePadding,\n titleHeight,\n nodeSelectedBg,\n nodeHoverBg,\n colorTextQuaternary\n } = token;\n const treeCheckBoxMarginHorizontal = token.marginXXS;\n return {\n [treeCls]: Object.assign(Object.assign({}, (0, _style2.resetComponent)(token)), {\n background: token.colorBgContainer,\n borderRadius: token.borderRadius,\n transition: `background-color ${token.motionDurationSlow}`,\n '&-rtl': {\n direction: 'rtl'\n },\n [`&${treeCls}-rtl ${treeCls}-switcher_close ${treeCls}-switcher-icon svg`]: {\n transform: 'rotate(90deg)'\n },\n [`&-focused:not(:hover):not(${treeCls}-active-focused)`]: Object.assign({}, (0, _style2.genFocusOutline)(token)),\n // =================== Virtual List ===================\n [`${treeCls}-list-holder-inner`]: {\n alignItems: 'flex-start'\n },\n [`&${treeCls}-block-node`]: {\n [`${treeCls}-list-holder-inner`]: {\n alignItems: 'stretch',\n // >>> Title\n [`${treeCls}-node-content-wrapper`]: {\n flex: 'auto'\n },\n // >>> Drag\n [`${treeNodeCls}.dragging:after`]: {\n position: 'absolute',\n inset: 0,\n border: `1px solid ${token.colorPrimary}`,\n opacity: 0,\n animationName: treeNodeFX,\n animationDuration: token.motionDurationSlow,\n animationPlayState: 'running',\n animationFillMode: 'forwards',\n content: '\"\"',\n pointerEvents: 'none',\n borderRadius: token.borderRadius\n }\n }\n },\n // ===================== TreeNode =====================\n [treeNodeCls]: {\n display: 'flex',\n alignItems: 'flex-start',\n marginBottom: treeNodePadding,\n lineHeight: (0, _cssinjs.unit)(titleHeight),\n position: 'relative',\n // 非常重要,避免 drop-indicator 在拖拽过程中闪烁\n '&:before': {\n content: '\"\"',\n position: 'absolute',\n zIndex: 1,\n insetInlineStart: 0,\n width: '100%',\n top: '100%',\n height: treeNodePadding\n },\n // Disabled\n [`&-disabled ${treeCls}-node-content-wrapper`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed',\n '&:hover': {\n background: 'transparent'\n }\n },\n [`&-active ${treeCls}-node-content-wrapper`]: {\n background: token.controlItemBgHover\n },\n [`&:not(${treeNodeCls}-disabled).filter-node ${treeCls}-title`]: {\n color: token.colorPrimary,\n fontWeight: 500\n },\n '&-draggable': {\n cursor: 'grab',\n [`${treeCls}-draggable-icon`]: {\n // https://github.com/ant-design/ant-design/issues/41915\n flexShrink: 0,\n width: titleHeight,\n textAlign: 'center',\n visibility: 'visible',\n color: colorTextQuaternary\n },\n [`&${treeNodeCls}-disabled ${treeCls}-draggable-icon`]: {\n visibility: 'hidden'\n }\n }\n },\n // >>> Indent\n [`${treeCls}-indent`]: {\n alignSelf: 'stretch',\n whiteSpace: 'nowrap',\n userSelect: 'none',\n '&-unit': {\n display: 'inline-block',\n width: titleHeight\n }\n },\n // >>> Drag Handler\n [`${treeCls}-draggable-icon`]: {\n visibility: 'hidden'\n },\n // >>> Switcher\n [`${treeCls}-switcher`]: Object.assign(Object.assign({}, getSwitchStyle(prefixCls, token)), {\n position: 'relative',\n flex: 'none',\n alignSelf: 'stretch',\n width: titleHeight,\n margin: 0,\n textAlign: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n transition: `all ${token.motionDurationSlow}`,\n marginInlineEnd: token.calc(token.calc(titleHeight).sub(token.controlInteractiveSize)).div(2).equal(),\n '&-noop': {\n cursor: 'unset'\n },\n '&:before': {\n pointerEvents: 'none',\n content: '\"\"',\n width: titleHeight,\n height: titleHeight,\n position: 'absolute',\n left: {\n _skip_check_: true,\n value: 0\n },\n top: 0,\n borderRadius: token.borderRadius,\n transition: `all ${token.motionDurationSlow}`\n },\n [`&:not(${treeCls}-switcher-noop):hover:before`]: {\n backgroundColor: token.colorBgTextHover\n },\n [`&_close ${treeCls}-switcher-icon svg`]: {\n transform: 'rotate(-90deg)'\n },\n '&-loading-icon': {\n color: token.colorPrimary\n },\n '&-leaf-line': {\n position: 'relative',\n zIndex: 1,\n display: 'inline-block',\n width: '100%',\n height: '100%',\n // https://github.com/ant-design/ant-design/issues/31884\n '&:before': {\n position: 'absolute',\n top: 0,\n insetInlineEnd: token.calc(titleHeight).div(2).equal(),\n bottom: token.calc(treeNodePadding).mul(-1).equal(),\n marginInlineStart: -1,\n borderInlineEnd: `1px solid ${token.colorBorder}`,\n content: '\"\"'\n },\n '&:after': {\n position: 'absolute',\n width: token.calc(token.calc(titleHeight).div(2).equal()).mul(0.8).equal(),\n height: token.calc(titleHeight).div(2).equal(),\n borderBottom: `1px solid ${token.colorBorder}`,\n content: '\"\"'\n }\n }\n }),\n // >>> Checkbox\n [`${treeCls}-checkbox`]: {\n top: 'initial',\n marginInlineEnd: treeCheckBoxMarginHorizontal,\n alignSelf: 'flex-start',\n marginTop: token.marginXXS\n },\n // >>> Title\n // add `${treeCls}-checkbox + span` to cover checkbox `${checkboxCls} + span`\n [`${treeCls}-node-content-wrapper`]: Object.assign(Object.assign({\n position: 'relative',\n minHeight: titleHeight,\n padding: `0 ${token.paddingXS}`,\n background: 'transparent',\n borderRadius: token.borderRadius,\n cursor: 'pointer',\n transition: `all ${token.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`\n }, getDropIndicatorStyle(prefixCls, token)), {\n '&:hover': {\n backgroundColor: nodeHoverBg\n },\n [`&${treeCls}-node-selected`]: {\n backgroundColor: nodeSelectedBg\n },\n // Icon\n [`${treeCls}-iconEle`]: {\n display: 'inline-block',\n width: titleHeight,\n height: titleHeight,\n textAlign: 'center',\n verticalAlign: 'top',\n '&:empty': {\n display: 'none'\n }\n }\n }),\n // https://github.com/ant-design/ant-design/issues/28217\n [`${treeCls}-unselectable ${treeCls}-node-content-wrapper:hover`]: {\n backgroundColor: 'transparent'\n },\n [`${treeNodeCls}.drop-container > [draggable]`]: {\n boxShadow: `0 0 0 2px ${token.colorPrimary}`\n },\n // ==================== Show Line =====================\n '&-show-line': {\n // ================ Indent lines ================\n [`${treeCls}-indent-unit`]: {\n position: 'relative',\n height: '100%',\n '&:before': {\n position: 'absolute',\n top: 0,\n insetInlineEnd: token.calc(titleHeight).div(2).equal(),\n bottom: token.calc(treeNodePadding).mul(-1).equal(),\n borderInlineEnd: `1px solid ${token.colorBorder}`,\n content: '\"\"'\n },\n '&-end:before': {\n display: 'none'\n }\n },\n // ============== Cover Background ==============\n [`${treeCls}-switcher`]: {\n background: 'transparent',\n '&-line-icon': {\n // https://github.com/ant-design/ant-design/issues/32813\n verticalAlign: '-0.15em'\n }\n }\n },\n [`${treeNodeCls}-leaf-last ${treeCls}-switcher-leaf-line:before`]: {\n top: 'auto !important',\n bottom: 'auto !important',\n height: `${(0, _cssinjs.unit)(token.calc(titleHeight).div(2).equal())} !important`\n }\n })\n };\n};\n// ============================== Merged ==============================\nexports.genBaseStyle = genBaseStyle;\nconst genTreeStyle = (prefixCls, token) => {\n const treeCls = `.${prefixCls}`;\n const treeNodeCls = `${treeCls}-treenode`;\n const treeNodePadding = token.calc(token.paddingXS).div(2).equal();\n const treeToken = (0, _internal.mergeToken)(token, {\n treeCls,\n treeNodeCls,\n treeNodePadding\n });\n return [\n // Basic\n genBaseStyle(prefixCls, treeToken),\n // Directory\n (0, _directory.genDirectoryStyle)(treeToken)];\n};\nexports.genTreeStyle = genTreeStyle;\nconst initComponentToken = token => {\n const {\n controlHeightSM\n } = token;\n return {\n titleHeight: controlHeightSM,\n nodeHoverBg: token.controlItemBgHover,\n nodeSelectedBg: token.controlItemBgActive\n };\n};\nexports.initComponentToken = initComponentToken;\nconst prepareComponentToken = token => {\n const {\n colorTextLightSolid,\n colorPrimary\n } = token;\n return Object.assign(Object.assign({}, initComponentToken(token)), {\n directoryNodeSelectedColor: colorTextLightSolid,\n directoryNodeSelectedBg: colorPrimary\n });\n};\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Tree', (token, _ref) => {\n let {\n prefixCls\n } = _ref;\n return [{\n [token.componentCls]: (0, _style.getStyle)(`${prefixCls}-checkbox`, token)\n }, genTreeStyle(prefixCls, token), (0, _motion.genCollapseMotion)(token)];\n}, prepareComponentToken);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.calcRangeKeys = calcRangeKeys;\nexports.convertDirectoryKeysToNodes = convertDirectoryKeysToNodes;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _treeUtil = require(\"rc-tree/lib/utils/treeUtil\");\nconst RECORD_NONE = 0;\nconst RECORD_START = 1;\nconst RECORD_END = 2;\nfunction traverseNodesKey(treeData, callback, fieldNames) {\n const {\n key: fieldKey,\n children: fieldChildren\n } = fieldNames;\n function processNode(dataNode) {\n const key = dataNode[fieldKey];\n const children = dataNode[fieldChildren];\n if (callback(key, dataNode) !== false) {\n traverseNodesKey(children || [], callback, fieldNames);\n }\n }\n treeData.forEach(processNode);\n}\n/** 计算选中范围,只考虑expanded情况以优化性能 */\nfunction calcRangeKeys(_ref) {\n let {\n treeData,\n expandedKeys,\n startKey,\n endKey,\n fieldNames\n } = _ref;\n const keys = [];\n let record = RECORD_NONE;\n if (startKey && startKey === endKey) {\n return [startKey];\n }\n if (!startKey || !endKey) {\n return [];\n }\n function matchKey(key) {\n return key === startKey || key === endKey;\n }\n traverseNodesKey(treeData, key => {\n if (record === RECORD_END) {\n return false;\n }\n if (matchKey(key)) {\n // Match test\n keys.push(key);\n if (record === RECORD_NONE) {\n record = RECORD_START;\n } else if (record === RECORD_START) {\n record = RECORD_END;\n return false;\n }\n } else if (record === RECORD_START) {\n // Append selection\n keys.push(key);\n }\n return expandedKeys.includes(key);\n }, (0, _treeUtil.fillFieldNames)(fieldNames));\n return keys;\n}\nfunction convertDirectoryKeysToNodes(treeData, keys, fieldNames) {\n const restKeys = (0, _toConsumableArray2.default)(keys);\n const nodes = [];\n traverseNodesKey(treeData, (key, node) => {\n const index = restKeys.indexOf(key);\n if (index !== -1) {\n nodes.push(node);\n restKeys.splice(index, 1);\n }\n return !!restKeys.length;\n }, (0, _treeUtil.fillFieldNames)(fieldNames));\n return nodes;\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.offset = exports.default = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nconst offset = exports.offset = 4;\nfunction dropIndicatorRender(props) {\n const {\n dropPosition,\n dropLevelOffset,\n prefixCls,\n indent,\n direction = 'ltr'\n } = props;\n const startPosition = direction === 'ltr' ? 'left' : 'right';\n const endPosition = direction === 'ltr' ? 'right' : 'left';\n const style = {\n [startPosition]: -dropLevelOffset * indent + offset,\n [endPosition]: 0\n };\n switch (dropPosition) {\n case -1:\n style.top = -3;\n break;\n case 1:\n style.bottom = -3;\n break;\n default:\n // dropPosition === 0\n style.bottom = -3;\n style[startPosition] = indent + offset;\n break;\n }\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n style: style,\n className: `${prefixCls}-drop-indicator`\n });\n}\nvar _default = exports.default = dropIndicatorRender;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CaretDownFilled = _interopRequireDefault(require(\"@ant-design/icons/CaretDownFilled\"));\nvar _FileOutlined = _interopRequireDefault(require(\"@ant-design/icons/FileOutlined\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _MinusSquareOutlined = _interopRequireDefault(require(\"@ant-design/icons/MinusSquareOutlined\"));\nvar _PlusSquareOutlined = _interopRequireDefault(require(\"@ant-design/icons/PlusSquareOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _reactNode = require(\"../../_util/reactNode\");\nconst SwitcherIconCom = props => {\n const {\n prefixCls,\n switcherIcon,\n treeNodeProps,\n showLine,\n switcherLoadingIcon\n } = props;\n const {\n isLeaf,\n expanded,\n loading\n } = treeNodeProps;\n if (loading) {\n if (/*#__PURE__*/React.isValidElement(switcherLoadingIcon)) {\n return switcherLoadingIcon;\n }\n return /*#__PURE__*/React.createElement(_LoadingOutlined.default, {\n className: `${prefixCls}-switcher-loading-icon`\n });\n }\n let showLeafIcon;\n if (showLine && typeof showLine === 'object') {\n showLeafIcon = showLine.showLeafIcon;\n }\n if (isLeaf) {\n if (!showLine) {\n return null;\n }\n if (typeof showLeafIcon !== 'boolean' && !!showLeafIcon) {\n const leafIcon = typeof showLeafIcon === 'function' ? showLeafIcon(treeNodeProps) : showLeafIcon;\n const leafCls = `${prefixCls}-switcher-line-custom-icon`;\n if (/*#__PURE__*/React.isValidElement(leafIcon)) {\n return (0, _reactNode.cloneElement)(leafIcon, {\n className: (0, _classnames.default)(leafIcon.props.className || '', leafCls)\n });\n }\n return leafIcon;\n }\n return showLeafIcon ? (/*#__PURE__*/React.createElement(_FileOutlined.default, {\n className: `${prefixCls}-switcher-line-icon`\n })) : (/*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-switcher-leaf-line`\n }));\n }\n const switcherCls = `${prefixCls}-switcher-icon`;\n const switcher = typeof switcherIcon === 'function' ? switcherIcon(treeNodeProps) : switcherIcon;\n if (/*#__PURE__*/React.isValidElement(switcher)) {\n return (0, _reactNode.cloneElement)(switcher, {\n className: (0, _classnames.default)(switcher.props.className || '', switcherCls)\n });\n }\n if (switcher !== undefined) {\n return switcher;\n }\n if (showLine) {\n return expanded ? (/*#__PURE__*/React.createElement(_MinusSquareOutlined.default, {\n className: `${prefixCls}-switcher-line-icon`\n })) : (/*#__PURE__*/React.createElement(_PlusSquareOutlined.default, {\n className: `${prefixCls}-switcher-line-icon`\n }));\n }\n return /*#__PURE__*/React.createElement(_CaretDownFilled.default, {\n className: switcherCls\n });\n};\nvar _default = exports.default = SwitcherIconCom;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _CheckOutlined = _interopRequireDefault(require(\"@ant-design/icons/CheckOutlined\"));\nvar _CopyOutlined = _interopRequireDefault(require(\"@ant-design/icons/CopyOutlined\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _tooltip = _interopRequireDefault(require(\"../../tooltip\"));\nvar _util = require(\"./util\");\nconst CopyBtn = _ref => {\n let {\n prefixCls,\n copied,\n locale,\n iconOnly,\n tooltips,\n icon,\n tabIndex,\n onCopy,\n loading: btnLoading\n } = _ref;\n const tooltipNodes = (0, _util.toList)(tooltips);\n const iconNodes = (0, _util.toList)(icon);\n const {\n copied: copiedText,\n copy: copyText\n } = locale !== null && locale !== void 0 ? locale : {};\n const systemStr = copied ? copiedText : copyText;\n const copyTitle = (0, _util.getNode)(tooltipNodes[copied ? 1 : 0], systemStr);\n const ariaLabel = typeof copyTitle === 'string' ? copyTitle : systemStr;\n return /*#__PURE__*/React.createElement(_tooltip.default, {\n title: copyTitle\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: (0, _classnames.default)(`${prefixCls}-copy`, {\n [`${prefixCls}-copy-success`]: copied,\n [`${prefixCls}-copy-icon-only`]: iconOnly\n }),\n onClick: onCopy,\n \"aria-label\": ariaLabel,\n tabIndex: tabIndex\n }, copied ? (0, _util.getNode)(iconNodes[1], /*#__PURE__*/React.createElement(_CheckOutlined.default, null), true) : (0, _util.getNode)(iconNodes[0], btnLoading ? /*#__PURE__*/React.createElement(_LoadingOutlined.default, null) : /*#__PURE__*/React.createElement(_CopyOutlined.default, null), true)));\n};\nvar _default = exports.default = CopyBtn;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = EllipsisMeasure;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _useLayoutEffect = _interopRequireDefault(require(\"rc-util/lib/hooks/useLayoutEffect\"));\nvar _util = require(\"./util\");\nconst MeasureText = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n style,\n children\n } = _ref;\n const spanRef = React.useRef(null);\n React.useImperativeHandle(ref, () => ({\n isExceed: () => {\n const span = spanRef.current;\n return span.scrollHeight > span.clientHeight;\n },\n getHeight: () => spanRef.current.clientHeight\n }));\n return /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true,\n ref: spanRef,\n style: Object.assign({\n position: 'fixed',\n display: 'block',\n left: 0,\n top: 0,\n pointerEvents: 'none',\n backgroundColor: 'rgba(255, 0, 0, 0.65)'\n }, style)\n }, children);\n});\nconst getNodesLen = nodeList => nodeList.reduce((totalLen, node) => totalLen + ((0, _util.isValidText)(node) ? String(node).length : 1), 0);\nfunction sliceNodes(nodeList, len) {\n let currLen = 0;\n const currentNodeList = [];\n for (let i = 0; i < nodeList.length; i += 1) {\n // Match to return\n if (currLen === len) {\n return currentNodeList;\n }\n const node = nodeList[i];\n const canCut = (0, _util.isValidText)(node);\n const nodeLen = canCut ? String(node).length : 1;\n const nextLen = currLen + nodeLen;\n // Exceed but current not which means we need cut this\n // This will not happen on validate ReactElement\n if (nextLen > len) {\n const restLen = len - currLen;\n currentNodeList.push(String(node).slice(0, restLen));\n return currentNodeList;\n }\n currentNodeList.push(node);\n currLen = nextLen;\n }\n return nodeList;\n}\n// Measure for the `text` is exceed the `rows` or not\nconst STATUS_MEASURE_NONE = 0;\nconst STATUS_MEASURE_PREPARE = 1;\nconst STATUS_MEASURE_START = 2;\nconst STATUS_MEASURE_NEED_ELLIPSIS = 3;\nconst STATUS_MEASURE_NO_NEED_ELLIPSIS = 4;\nconst lineClipStyle = {\n display: '-webkit-box',\n overflow: 'hidden',\n WebkitBoxOrient: 'vertical'\n};\nfunction EllipsisMeasure(props) {\n const {\n enableMeasure,\n width,\n text,\n children,\n rows,\n expanded,\n miscDeps,\n onEllipsis\n } = props;\n const nodeList = React.useMemo(() => (0, _toArray.default)(text), [text]);\n const nodeLen = React.useMemo(() => getNodesLen(nodeList), [text]);\n // ========================= Full Content =========================\n // Used for measure only, which means it's always render as no need ellipsis\n const fullContent = React.useMemo(() => children(nodeList, false), [text]);\n // ========================= Cut Content ==========================\n const [ellipsisCutIndex, setEllipsisCutIndex] = React.useState(null);\n const cutMidRef = React.useRef(null);\n // ========================= NeedEllipsis =========================\n const measureWhiteSpaceRef = React.useRef(null);\n const needEllipsisRef = React.useRef(null);\n // Measure for `rows-1` height, to avoid operation exceed the line height\n const descRowsEllipsisRef = React.useRef(null);\n const symbolRowEllipsisRef = React.useRef(null);\n const [canEllipsis, setCanEllipsis] = React.useState(false);\n const [needEllipsis, setNeedEllipsis] = React.useState(STATUS_MEASURE_NONE);\n const [ellipsisHeight, setEllipsisHeight] = React.useState(0);\n const [parentWhiteSpace, setParentWhiteSpace] = React.useState(null);\n // Trigger start measure\n (0, _useLayoutEffect.default)(() => {\n if (enableMeasure && width && nodeLen) {\n setNeedEllipsis(STATUS_MEASURE_PREPARE);\n } else {\n setNeedEllipsis(STATUS_MEASURE_NONE);\n }\n }, [width, text, rows, enableMeasure, nodeList]);\n // Measure process\n (0, _useLayoutEffect.default)(() => {\n var _a, _b, _c, _d;\n if (needEllipsis === STATUS_MEASURE_PREPARE) {\n setNeedEllipsis(STATUS_MEASURE_START);\n // Parent ref `white-space`\n const nextWhiteSpace = measureWhiteSpaceRef.current && getComputedStyle(measureWhiteSpaceRef.current).whiteSpace;\n setParentWhiteSpace(nextWhiteSpace);\n } else if (needEllipsis === STATUS_MEASURE_START) {\n const isOverflow = !!((_a = needEllipsisRef.current) === null || _a === void 0 ? void 0 : _a.isExceed());\n setNeedEllipsis(isOverflow ? STATUS_MEASURE_NEED_ELLIPSIS : STATUS_MEASURE_NO_NEED_ELLIPSIS);\n setEllipsisCutIndex(isOverflow ? [0, nodeLen] : null);\n setCanEllipsis(isOverflow);\n // Get the basic height of ellipsis rows\n const baseRowsEllipsisHeight = ((_b = needEllipsisRef.current) === null || _b === void 0 ? void 0 : _b.getHeight()) || 0;\n // Get the height of `rows - 1` + symbol height\n const descRowsEllipsisHeight = rows === 1 ? 0 : ((_c = descRowsEllipsisRef.current) === null || _c === void 0 ? void 0 : _c.getHeight()) || 0;\n const symbolRowEllipsisHeight = ((_d = symbolRowEllipsisRef.current) === null || _d === void 0 ? void 0 : _d.getHeight()) || 0;\n const maxRowsHeight = Math.max(baseRowsEllipsisHeight,\n // height of rows with ellipsis\n descRowsEllipsisHeight + symbolRowEllipsisHeight);\n setEllipsisHeight(maxRowsHeight + 1);\n onEllipsis(isOverflow);\n }\n }, [needEllipsis]);\n // ========================= Cut Measure ==========================\n const cutMidIndex = ellipsisCutIndex ? Math.ceil((ellipsisCutIndex[0] + ellipsisCutIndex[1]) / 2) : 0;\n (0, _useLayoutEffect.default)(() => {\n var _a;\n const [minIndex, maxIndex] = ellipsisCutIndex || [0, 0];\n if (minIndex !== maxIndex) {\n const midHeight = ((_a = cutMidRef.current) === null || _a === void 0 ? void 0 : _a.getHeight()) || 0;\n const isOverflow = midHeight > ellipsisHeight;\n let targetMidIndex = cutMidIndex;\n if (maxIndex - minIndex === 1) {\n targetMidIndex = isOverflow ? minIndex : maxIndex;\n }\n setEllipsisCutIndex(isOverflow ? [minIndex, targetMidIndex] : [targetMidIndex, maxIndex]);\n }\n }, [ellipsisCutIndex, cutMidIndex]);\n // ========================= Text Content =========================\n const finalContent = React.useMemo(() => {\n // Skip everything if `enableMeasure` is disabled\n if (!enableMeasure) {\n return children(nodeList, false);\n }\n if (needEllipsis !== STATUS_MEASURE_NEED_ELLIPSIS || !ellipsisCutIndex || ellipsisCutIndex[0] !== ellipsisCutIndex[1]) {\n const content = children(nodeList, false);\n // Limit the max line count to avoid scrollbar blink unless no need ellipsis\n // https://github.com/ant-design/ant-design/issues/42958\n if ([STATUS_MEASURE_NO_NEED_ELLIPSIS, STATUS_MEASURE_NONE].includes(needEllipsis)) {\n return content;\n }\n return /*#__PURE__*/React.createElement(\"span\", {\n style: Object.assign(Object.assign({}, lineClipStyle), {\n WebkitLineClamp: rows\n })\n }, content);\n }\n return children(expanded ? nodeList : sliceNodes(nodeList, ellipsisCutIndex[0]), canEllipsis);\n }, [expanded, needEllipsis, ellipsisCutIndex, nodeList].concat((0, _toConsumableArray2.default)(miscDeps)));\n // ============================ Render ============================\n const measureStyle = {\n width,\n margin: 0,\n padding: 0,\n whiteSpace: parentWhiteSpace === 'nowrap' ? 'normal' : 'inherit'\n };\n return /*#__PURE__*/React.createElement(React.Fragment, null, finalContent, needEllipsis === STATUS_MEASURE_START && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MeasureText, {\n style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {\n WebkitLineClamp: rows\n }),\n ref: needEllipsisRef\n }, fullContent), /*#__PURE__*/React.createElement(MeasureText, {\n style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {\n WebkitLineClamp: rows - 1\n }),\n ref: descRowsEllipsisRef\n }, fullContent), /*#__PURE__*/React.createElement(MeasureText, {\n style: Object.assign(Object.assign(Object.assign({}, measureStyle), lineClipStyle), {\n WebkitLineClamp: 1\n }),\n ref: symbolRowEllipsisRef\n }, children([], true)))), needEllipsis === STATUS_MEASURE_NEED_ELLIPSIS && ellipsisCutIndex && ellipsisCutIndex[0] !== ellipsisCutIndex[1] && (/*#__PURE__*/React.createElement(MeasureText, {\n style: Object.assign(Object.assign({}, measureStyle), {\n top: 400\n }),\n ref: cutMidRef\n }, children(sliceNodes(nodeList, cutMidIndex), true))), needEllipsis === STATUS_MEASURE_PREPARE && (/*#__PURE__*/React.createElement(\"span\", {\n style: {\n whiteSpace: 'inherit'\n },\n ref: measureWhiteSpaceRef\n })));\n}","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _tooltip = _interopRequireDefault(require(\"../../tooltip\"));\nconst EllipsisTooltip = _ref => {\n let {\n enableEllipsis,\n isEllipsis,\n children,\n tooltipProps\n } = _ref;\n if (!(tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.title) || !enableEllipsis) {\n return children;\n }\n return /*#__PURE__*/React.createElement(_tooltip.default, Object.assign({\n open: isEllipsis ? undefined : false\n }, tooltipProps), children);\n};\nif (process.env.NODE_ENV !== 'production') {\n EllipsisTooltip.displayName = 'EllipsisTooltip';\n}\nvar _default = exports.default = EllipsisTooltip;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _EditOutlined = _interopRequireDefault(require(\"@ant-design/icons/EditOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcResizeObserver = _interopRequireDefault(require(\"rc-resize-observer\"));\nvar _toArray = _interopRequireDefault(require(\"rc-util/lib/Children/toArray\"));\nvar _useLayoutEffect = _interopRequireDefault(require(\"rc-util/lib/hooks/useLayoutEffect\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _ref3 = require(\"rc-util/lib/ref\");\nvar _styleChecker = require(\"../../_util/styleChecker\");\nvar _configProvider = require(\"../../config-provider\");\nvar _useLocale = _interopRequireDefault(require(\"../../locale/useLocale\"));\nvar _tooltip = _interopRequireDefault(require(\"../../tooltip\"));\nvar _Editable = _interopRequireDefault(require(\"../Editable\"));\nvar _useCopyClick = _interopRequireDefault(require(\"../hooks/useCopyClick\"));\nvar _useMergedConfig = _interopRequireDefault(require(\"../hooks/useMergedConfig\"));\nvar _usePrevious = _interopRequireDefault(require(\"../hooks/usePrevious\"));\nvar _useTooltipProps = _interopRequireDefault(require(\"../hooks/useTooltipProps\"));\nvar _Typography = _interopRequireDefault(require(\"../Typography\"));\nvar _CopyBtn = _interopRequireDefault(require(\"./CopyBtn\"));\nvar _Ellipsis = _interopRequireDefault(require(\"./Ellipsis\"));\nvar _EllipsisTooltip = _interopRequireDefault(require(\"./EllipsisTooltip\"));\nvar _util = require(\"./util\");\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nfunction wrapperDecorations(_ref, content) {\n let {\n mark,\n code,\n underline,\n delete: del,\n strong,\n keyboard,\n italic\n } = _ref;\n let currentContent = content;\n function wrap(tag, needed) {\n if (!needed) {\n return;\n }\n currentContent = /*#__PURE__*/React.createElement(tag, {}, currentContent);\n }\n wrap('strong', strong);\n wrap('u', underline);\n wrap('del', del);\n wrap('code', code);\n wrap('mark', mark);\n wrap('kbd', keyboard);\n wrap('i', italic);\n return currentContent;\n}\nconst ELLIPSIS_STR = '...';\nconst Base = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _a;\n const {\n prefixCls: customizePrefixCls,\n className,\n style,\n type,\n disabled,\n children,\n ellipsis,\n editable,\n copyable,\n component,\n title\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"style\", \"type\", \"disabled\", \"children\", \"ellipsis\", \"editable\", \"copyable\", \"component\", \"title\"]);\n const {\n getPrefixCls,\n direction\n } = React.useContext(_configProvider.ConfigContext);\n const [textLocale] = (0, _useLocale.default)('Text');\n const typographyRef = React.useRef(null);\n const editIconRef = React.useRef(null);\n // ============================ MISC ============================\n const prefixCls = getPrefixCls('typography', customizePrefixCls);\n const textProps = (0, _omit.default)(restProps, ['mark', 'code', 'delete', 'underline', 'strong', 'keyboard', 'italic']);\n // ========================== Editable ==========================\n const [enableEdit, editConfig] = (0, _useMergedConfig.default)(editable);\n const [editing, setEditing] = (0, _useMergedState.default)(false, {\n value: editConfig.editing\n });\n const {\n triggerType = ['icon']\n } = editConfig;\n const triggerEdit = edit => {\n var _a;\n if (edit) {\n (_a = editConfig.onStart) === null || _a === void 0 ? void 0 : _a.call(editConfig);\n }\n setEditing(edit);\n };\n // Focus edit icon when back\n const prevEditing = (0, _usePrevious.default)(editing);\n (0, _useLayoutEffect.default)(() => {\n var _a;\n if (!editing && prevEditing) {\n (_a = editIconRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n }\n }, [editing]);\n const onEditClick = e => {\n e === null || e === void 0 ? void 0 : e.preventDefault();\n triggerEdit(true);\n };\n const onEditChange = value => {\n var _a;\n (_a = editConfig.onChange) === null || _a === void 0 ? void 0 : _a.call(editConfig, value);\n triggerEdit(false);\n };\n const onEditCancel = () => {\n var _a;\n (_a = editConfig.onCancel) === null || _a === void 0 ? void 0 : _a.call(editConfig);\n triggerEdit(false);\n };\n // ========================== Copyable ==========================\n const [enableCopy, copyConfig] = (0, _useMergedConfig.default)(copyable);\n const {\n copied,\n copyLoading,\n onClick: onCopyClick\n } = (0, _useCopyClick.default)({\n copyConfig,\n children\n });\n // ========================== Ellipsis ==========================\n const [isLineClampSupport, setIsLineClampSupport] = React.useState(false);\n const [isTextOverflowSupport, setIsTextOverflowSupport] = React.useState(false);\n const [isJsEllipsis, setIsJsEllipsis] = React.useState(false);\n const [isNativeEllipsis, setIsNativeEllipsis] = React.useState(false);\n const [isNativeVisible, setIsNativeVisible] = React.useState(true);\n const [enableEllipsis, ellipsisConfig] = (0, _useMergedConfig.default)(ellipsis, {\n expandable: false,\n symbol: isExpanded => isExpanded ? textLocale === null || textLocale === void 0 ? void 0 : textLocale.collapse : textLocale === null || textLocale === void 0 ? void 0 : textLocale.expand\n });\n const [expanded, setExpanded] = (0, _useMergedState.default)(ellipsisConfig.defaultExpanded || false, {\n value: ellipsisConfig.expanded\n });\n const mergedEnableEllipsis = enableEllipsis && (!expanded || ellipsisConfig.expandable === 'collapsible');\n // Shared prop to reduce bundle size\n const {\n rows = 1\n } = ellipsisConfig;\n const needMeasureEllipsis = React.useMemo(() =>\n // Disable ellipsis\n mergedEnableEllipsis && (\n // Provide suffix\n ellipsisConfig.suffix !== undefined || ellipsisConfig.onEllipsis ||\n // Can't use css ellipsis since we need to provide the place for button\n ellipsisConfig.expandable || enableEdit || enableCopy), [mergedEnableEllipsis, ellipsisConfig, enableEdit, enableCopy]);\n (0, _useLayoutEffect.default)(() => {\n if (enableEllipsis && !needMeasureEllipsis) {\n setIsLineClampSupport((0, _styleChecker.isStyleSupport)('webkitLineClamp'));\n setIsTextOverflowSupport((0, _styleChecker.isStyleSupport)('textOverflow'));\n }\n }, [needMeasureEllipsis, enableEllipsis]);\n const [cssEllipsis, setCssEllipsis] = React.useState(mergedEnableEllipsis);\n const canUseCssEllipsis = React.useMemo(() => {\n if (needMeasureEllipsis) {\n return false;\n }\n if (rows === 1) {\n return isTextOverflowSupport;\n }\n return isLineClampSupport;\n }, [needMeasureEllipsis, isTextOverflowSupport, isLineClampSupport]);\n // We use effect to change from css ellipsis to js ellipsis.\n // To make SSR still can see the ellipsis.\n (0, _useLayoutEffect.default)(() => {\n setCssEllipsis(canUseCssEllipsis && mergedEnableEllipsis);\n }, [canUseCssEllipsis, mergedEnableEllipsis]);\n const isMergedEllipsis = mergedEnableEllipsis && (cssEllipsis ? isNativeEllipsis : isJsEllipsis);\n const cssTextOverflow = mergedEnableEllipsis && rows === 1 && cssEllipsis;\n const cssLineClamp = mergedEnableEllipsis && rows > 1 && cssEllipsis;\n // >>>>> Expand\n const onExpandClick = (e, info) => {\n var _a;\n setExpanded(info.expanded);\n (_a = ellipsisConfig.onExpand) === null || _a === void 0 ? void 0 : _a.call(ellipsisConfig, e, info);\n };\n const [ellipsisWidth, setEllipsisWidth] = React.useState(0);\n const onResize = _ref2 => {\n let {\n offsetWidth\n } = _ref2;\n setEllipsisWidth(offsetWidth);\n };\n // >>>>> JS Ellipsis\n const onJsEllipsis = jsEllipsis => {\n var _a;\n setIsJsEllipsis(jsEllipsis);\n // Trigger if changed\n if (isJsEllipsis !== jsEllipsis) {\n (_a = ellipsisConfig.onEllipsis) === null || _a === void 0 ? void 0 : _a.call(ellipsisConfig, jsEllipsis);\n }\n };\n // >>>>> Native ellipsis\n React.useEffect(() => {\n const textEle = typographyRef.current;\n if (enableEllipsis && cssEllipsis && textEle) {\n const currentEllipsis = (0, _util.isEleEllipsis)(textEle);\n if (isNativeEllipsis !== currentEllipsis) {\n setIsNativeEllipsis(currentEllipsis);\n }\n }\n }, [enableEllipsis, cssEllipsis, children, cssLineClamp, isNativeVisible, ellipsisWidth]);\n // https://github.com/ant-design/ant-design/issues/36786\n // Use IntersectionObserver to check if element is invisible\n React.useEffect(() => {\n const textEle = typographyRef.current;\n if (typeof IntersectionObserver === 'undefined' || !textEle || !cssEllipsis || !mergedEnableEllipsis) {\n return;\n }\n /* eslint-disable-next-line compat/compat */\n const observer = new IntersectionObserver(() => {\n setIsNativeVisible(!!textEle.offsetParent);\n });\n observer.observe(textEle);\n return () => {\n observer.disconnect();\n };\n }, [cssEllipsis, mergedEnableEllipsis]);\n // ========================== Tooltip ===========================\n const tooltipProps = (0, _useTooltipProps.default)(ellipsisConfig.tooltip, editConfig.text, children);\n const topAriaLabel = React.useMemo(() => {\n if (!enableEllipsis || cssEllipsis) {\n return undefined;\n }\n return [editConfig.text, children, title, tooltipProps.title].find(_util.isValidText);\n }, [enableEllipsis, cssEllipsis, title, tooltipProps.title, isMergedEllipsis]);\n // =========================== Render ===========================\n // >>>>>>>>>>> Editing input\n if (editing) {\n return /*#__PURE__*/React.createElement(_Editable.default, {\n value: (_a = editConfig.text) !== null && _a !== void 0 ? _a : typeof children === 'string' ? children : '',\n onSave: onEditChange,\n onCancel: onEditCancel,\n onEnd: editConfig.onEnd,\n prefixCls: prefixCls,\n className: className,\n style: style,\n direction: direction,\n component: component,\n maxLength: editConfig.maxLength,\n autoSize: editConfig.autoSize,\n enterIcon: editConfig.enterIcon\n });\n }\n // >>>>>>>>>>> Typography\n // Expand\n const renderExpand = () => {\n const {\n expandable,\n symbol\n } = ellipsisConfig;\n return expandable ? (/*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n key: \"expand\",\n className: `${prefixCls}-${expanded ? 'collapse' : 'expand'}`,\n onClick: e => onExpandClick(e, {\n expanded: !expanded\n }),\n \"aria-label\": expanded ? textLocale.collapse : textLocale === null || textLocale === void 0 ? void 0 : textLocale.expand\n }, typeof symbol === 'function' ? symbol(expanded) : symbol)) : null;\n };\n // Edit\n const renderEdit = () => {\n if (!enableEdit) {\n return;\n }\n const {\n icon,\n tooltip,\n tabIndex\n } = editConfig;\n const editTitle = (0, _toArray.default)(tooltip)[0] || (textLocale === null || textLocale === void 0 ? void 0 : textLocale.edit);\n const ariaLabel = typeof editTitle === 'string' ? editTitle : '';\n return triggerType.includes('icon') ? (/*#__PURE__*/React.createElement(_tooltip.default, {\n key: \"edit\",\n title: tooltip === false ? '' : editTitle\n }, /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n ref: editIconRef,\n className: `${prefixCls}-edit`,\n onClick: onEditClick,\n \"aria-label\": ariaLabel,\n tabIndex: tabIndex\n }, icon || /*#__PURE__*/React.createElement(_EditOutlined.default, {\n role: \"button\"\n })))) : null;\n };\n // Copy\n const renderCopy = () => {\n if (!enableCopy) {\n return null;\n }\n return /*#__PURE__*/React.createElement(_CopyBtn.default, Object.assign({\n key: \"copy\"\n }, copyConfig, {\n prefixCls: prefixCls,\n copied: copied,\n locale: textLocale,\n onCopy: onCopyClick,\n loading: copyLoading,\n iconOnly: children === null || children === undefined\n }));\n };\n const renderOperations = canEllipsis => [canEllipsis && renderExpand(), renderEdit(), renderCopy()];\n const renderEllipsis = canEllipsis => [canEllipsis && !expanded && (/*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true,\n key: \"ellipsis\"\n }, ELLIPSIS_STR)), ellipsisConfig.suffix, renderOperations(canEllipsis)];\n return /*#__PURE__*/React.createElement(_rcResizeObserver.default, {\n onResize: onResize,\n disabled: !mergedEnableEllipsis\n }, resizeRef => (/*#__PURE__*/React.createElement(_EllipsisTooltip.default, {\n tooltipProps: tooltipProps,\n enableEllipsis: mergedEnableEllipsis,\n isEllipsis: isMergedEllipsis\n }, /*#__PURE__*/React.createElement(_Typography.default, Object.assign({\n className: (0, _classnames.default)({\n [`${prefixCls}-${type}`]: type,\n [`${prefixCls}-disabled`]: disabled,\n [`${prefixCls}-ellipsis`]: enableEllipsis,\n [`${prefixCls}-ellipsis-single-line`]: cssTextOverflow,\n [`${prefixCls}-ellipsis-multiple-line`]: cssLineClamp\n }, className),\n prefixCls: customizePrefixCls,\n style: Object.assign(Object.assign({}, style), {\n WebkitLineClamp: cssLineClamp ? rows : undefined\n }),\n component: component,\n ref: (0, _ref3.composeRef)(resizeRef, typographyRef, ref),\n direction: direction,\n onClick: triggerType.includes('text') ? onEditClick : undefined,\n \"aria-label\": topAriaLabel === null || topAriaLabel === void 0 ? void 0 : topAriaLabel.toString(),\n title: title\n }, textProps), /*#__PURE__*/React.createElement(_Ellipsis.default, {\n enableMeasure: mergedEnableEllipsis && !cssEllipsis,\n text: children,\n rows: rows,\n width: ellipsisWidth,\n onEllipsis: onJsEllipsis,\n expanded: expanded,\n miscDeps: [copied, expanded, copyLoading, enableEdit, enableCopy]\n }, (node, canEllipsis) => wrapperDecorations(props, /*#__PURE__*/React.createElement(React.Fragment, null, node.length > 0 && canEllipsis && !expanded && topAriaLabel ? (/*#__PURE__*/React.createElement(\"span\", {\n key: \"show-content\",\n \"aria-hidden\": true\n }, node)) : node, renderEllipsis(canEllipsis))))))));\n});\nvar _default = exports.default = Base;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getNode = getNode;\nexports.isEleEllipsis = isEleEllipsis;\nexports.isValidText = void 0;\nexports.toList = toList;\nfunction toList(val) {\n if (val === false) {\n return [false, false];\n }\n return Array.isArray(val) ? val : [val];\n}\nfunction getNode(dom, defaultNode, needDom) {\n if (dom === true || dom === undefined) {\n return defaultNode;\n }\n return dom || needDom && defaultNode;\n}\n/**\n * Check for element is native ellipsis\n * ref:\n * - https://github.com/ant-design/ant-design/issues/50143\n * - https://github.com/ant-design/ant-design/issues/50414\n */\nfunction isEleEllipsis(ele) {\n // Create a new div to get the size\n const childDiv = document.createElement('em');\n ele.appendChild(childDiv);\n // For test case\n if (process.env.NODE_ENV !== 'production') {\n childDiv.className = 'ant-typography-css-ellipsis-content-measure';\n }\n const rect = ele.getBoundingClientRect();\n const childRect = childDiv.getBoundingClientRect();\n // Reset\n ele.removeChild(childDiv);\n // Range checker\n return (\n // Horizontal out of range\n rect.left > childRect.left || childRect.right > rect.right ||\n // Vertical out of range\n rect.top > childRect.top || childRect.bottom > rect.bottom\n );\n}\nconst isValidText = val => ['string', 'number'].includes(typeof val);\nexports.isValidText = isValidText;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _EnterOutlined = _interopRequireDefault(require(\"@ant-design/icons/EnterOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _KeyCode = _interopRequireDefault(require(\"rc-util/lib/KeyCode\"));\nvar _reactNode = require(\"../_util/reactNode\");\nvar _TextArea = _interopRequireDefault(require(\"../input/TextArea\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nconst Editable = props => {\n const {\n prefixCls,\n 'aria-label': ariaLabel,\n className,\n style,\n direction,\n maxLength,\n autoSize = true,\n value,\n onSave,\n onCancel,\n onEnd,\n component,\n enterIcon = /*#__PURE__*/React.createElement(_EnterOutlined.default, null)\n } = props;\n const ref = React.useRef(null);\n const inComposition = React.useRef(false);\n const lastKeyCode = React.useRef();\n const [current, setCurrent] = React.useState(value);\n React.useEffect(() => {\n setCurrent(value);\n }, [value]);\n React.useEffect(() => {\n var _a;\n if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.resizableTextArea) {\n const {\n textArea\n } = ref.current.resizableTextArea;\n textArea.focus();\n const {\n length\n } = textArea.value;\n textArea.setSelectionRange(length, length);\n }\n }, []);\n const onChange = _ref => {\n let {\n target\n } = _ref;\n setCurrent(target.value.replace(/[\\n\\r]/g, ''));\n };\n const onCompositionStart = () => {\n inComposition.current = true;\n };\n const onCompositionEnd = () => {\n inComposition.current = false;\n };\n const onKeyDown = _ref2 => {\n let {\n keyCode\n } = _ref2;\n // We don't record keyCode when IME is using\n if (inComposition.current) return;\n lastKeyCode.current = keyCode;\n };\n const confirmChange = () => {\n onSave(current.trim());\n };\n const onKeyUp = _ref3 => {\n let {\n keyCode,\n ctrlKey,\n altKey,\n metaKey,\n shiftKey\n } = _ref3;\n // Check if it's a real key\n if (lastKeyCode.current !== keyCode || inComposition.current || ctrlKey || altKey || metaKey || shiftKey) {\n return;\n }\n if (keyCode === _KeyCode.default.ENTER) {\n confirmChange();\n onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n } else if (keyCode === _KeyCode.default.ESC) {\n onCancel();\n }\n };\n const onBlur = () => {\n confirmChange();\n };\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const textAreaClassName = (0, _classnames.default)(prefixCls, `${prefixCls}-edit-content`, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-${component}`]: !!component\n }, className, hashId, cssVarCls);\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", {\n className: textAreaClassName,\n style: style\n }, /*#__PURE__*/React.createElement(_TextArea.default, {\n ref: ref,\n maxLength: maxLength,\n value: current,\n onChange: onChange,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n onCompositionStart: onCompositionStart,\n onCompositionEnd: onCompositionEnd,\n onBlur: onBlur,\n \"aria-label\": ariaLabel,\n rows: 1,\n autoSize: autoSize\n }), enterIcon !== null ? (0, _reactNode.cloneElement)(enterIcon, {\n className: `${prefixCls}-edit-content-confirm`\n }) : null));\n};\nvar _default = exports.default = Editable;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _warning = require(\"../_util/warning\");\nvar _Base = _interopRequireDefault(require(\"./Base\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Link = /*#__PURE__*/React.forwardRef((_a, ref) => {\n var {\n ellipsis,\n rel\n } = _a,\n restProps = __rest(_a, [\"ellipsis\", \"rel\"]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Typography.Link');\n process.env.NODE_ENV !== \"production\" ? warning(typeof ellipsis !== 'object', 'usage', '`ellipsis` only supports boolean value.') : void 0;\n }\n const mergedProps = Object.assign(Object.assign({}, restProps), {\n rel: rel === undefined && restProps.target === '_blank' ? 'noopener noreferrer' : rel\n });\n // @ts-expect-error: https://github.com/ant-design/ant-design/issues/26622\n delete mergedProps.navigate;\n return /*#__PURE__*/React.createElement(_Base.default, Object.assign({}, mergedProps, {\n ref: ref,\n ellipsis: !!ellipsis,\n component: \"a\"\n }));\n});\nvar _default = exports.default = Link;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _Base = _interopRequireDefault(require(\"./Base\"));\nconst Paragraph = /*#__PURE__*/React.forwardRef((props, ref) => (/*#__PURE__*/React.createElement(_Base.default, Object.assign({\n ref: ref\n}, props, {\n component: \"div\"\n}))));\nvar _default = exports.default = Paragraph;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _warning = require(\"../_util/warning\");\nvar _Base = _interopRequireDefault(require(\"./Base\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Text = (_a, ref) => {\n var {\n ellipsis\n } = _a,\n restProps = __rest(_a, [\"ellipsis\"]);\n const mergedEllipsis = React.useMemo(() => {\n if (ellipsis && typeof ellipsis === 'object') {\n return (0, _omit.default)(ellipsis, ['expandable', 'rows']);\n }\n return ellipsis;\n }, [ellipsis]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Typography.Text');\n process.env.NODE_ENV !== \"production\" ? warning(typeof ellipsis !== 'object' || !ellipsis || !('expandable' in ellipsis) && !('rows' in ellipsis), 'usage', '`ellipsis` do not support `expandable` or `rows` props.') : void 0;\n }\n return /*#__PURE__*/React.createElement(_Base.default, Object.assign({\n ref: ref\n }, restProps, {\n ellipsis: mergedEllipsis,\n component: \"span\"\n }));\n};\nvar _default = exports.default = /*#__PURE__*/React.forwardRef(Text);","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _warning = require(\"../_util/warning\");\nvar _Base = _interopRequireDefault(require(\"./Base\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst TITLE_ELE_LIST = [1, 2, 3, 4, 5];\nconst Title = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n level = 1\n } = props,\n restProps = __rest(props, [\"level\"]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Typography.Title');\n process.env.NODE_ENV !== \"production\" ? warning(TITLE_ELE_LIST.includes(level), 'usage', 'Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.') : void 0;\n }\n const component = TITLE_ELE_LIST.includes(level) ? `h${level}` : `h1`;\n return /*#__PURE__*/React.createElement(_Base.default, Object.assign({\n ref: ref\n }, restProps, {\n component: component\n }));\n});\nvar _default = exports.default = Title;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _ref = require(\"rc-util/lib/ref\");\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Typography = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n component: Component = 'article',\n className,\n rootClassName,\n setContentRef,\n children,\n direction: typographyDirection,\n style\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"component\", \"className\", \"rootClassName\", \"setContentRef\", \"children\", \"direction\", \"style\"]);\n const {\n getPrefixCls,\n direction: contextDirection,\n typography\n } = React.useContext(_configProvider.ConfigContext);\n const direction = typographyDirection !== null && typographyDirection !== void 0 ? typographyDirection : contextDirection;\n const mergedRef = setContentRef ? (0, _ref.composeRef)(ref, setContentRef) : ref;\n const prefixCls = getPrefixCls('typography', customizePrefixCls);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Typography');\n warning.deprecated(!setContentRef, 'setContentRef', 'ref');\n }\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);\n const componentClassName = (0, _classnames.default)(prefixCls, typography === null || typography === void 0 ? void 0 : typography.className, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId, cssVarCls);\n const mergedStyle = Object.assign(Object.assign({}, typography === null || typography === void 0 ? void 0 : typography.style), style);\n return wrapCSSVar(\n /*#__PURE__*/\n // @ts-expect-error: Expression produces a union type that is too complex to represent.\n React.createElement(Component, Object.assign({\n className: componentClassName,\n style: mergedStyle,\n ref: mergedRef\n }, restProps), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n Typography.displayName = 'Typography';\n}\nvar _default = exports.default = Typography;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _toList = _interopRequireDefault(require(\"../../_util/toList\"));\nvar __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nconst useCopyClick = _ref => {\n let {\n copyConfig,\n children\n } = _ref;\n const [copied, setCopied] = React.useState(false);\n const [copyLoading, setCopyLoading] = React.useState(false);\n const copyIdRef = React.useRef(null);\n const cleanCopyId = () => {\n if (copyIdRef.current) {\n clearTimeout(copyIdRef.current);\n }\n };\n const copyOptions = {};\n if (copyConfig.format) {\n copyOptions.format = copyConfig.format;\n }\n React.useEffect(() => cleanCopyId, []);\n // Keep copy action up to date\n const onClick = (0, _useEvent.default)(e => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n e === null || e === void 0 ? void 0 : e.preventDefault();\n e === null || e === void 0 ? void 0 : e.stopPropagation();\n setCopyLoading(true);\n try {\n const text = typeof copyConfig.text === 'function' ? yield copyConfig.text() : copyConfig.text;\n (0, _copyToClipboard.default)(text || (0, _toList.default)(children, true).join('') || '', copyOptions);\n setCopyLoading(false);\n setCopied(true);\n // Trigger tips update\n cleanCopyId();\n copyIdRef.current = setTimeout(() => {\n setCopied(false);\n }, 3000);\n (_a = copyConfig.onCopy) === null || _a === void 0 ? void 0 : _a.call(copyConfig, e);\n } catch (error) {\n setCopyLoading(false);\n throw error;\n }\n }));\n return {\n copied,\n copyLoading,\n onClick\n };\n};\nvar _default = exports.default = useCopyClick;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useMergedConfig;\nvar React = _interopRequireWildcard(require(\"react\"));\nfunction useMergedConfig(propConfig, templateConfig) {\n return React.useMemo(() => {\n const support = !!propConfig;\n return [support, Object.assign(Object.assign({}, templateConfig), support && typeof propConfig === 'object' ? propConfig : null)];\n }, [propConfig]);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nconst usePrevious = value => {\n const ref = (0, _react.useRef)();\n (0, _react.useEffect)(() => {\n ref.current = value;\n });\n return ref.current;\n};\nvar _default = exports.default = usePrevious;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _react = require(\"react\");\nconst useTooltipProps = (tooltip, editConfigText, children) => (0, _react.useMemo)(() => {\n if (tooltip === true) {\n return {\n title: editConfigText !== null && editConfigText !== void 0 ? editConfigText : children\n };\n }\n if (/*#__PURE__*/(0, _react.isValidElement)(tooltip)) {\n return {\n title: tooltip\n };\n }\n if (typeof tooltip === 'object') {\n return Object.assign({\n title: editConfigText !== null && editConfigText !== void 0 ? editConfigText : children\n }, tooltip);\n }\n return {\n title: tooltip\n };\n}, [tooltip, editConfigText, children]);\nvar _default = exports.default = useTooltipProps;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Link = _interopRequireDefault(require(\"./Link\"));\nvar _Paragraph = _interopRequireDefault(require(\"./Paragraph\"));\nvar _Text = _interopRequireDefault(require(\"./Text\"));\nvar _Title = _interopRequireDefault(require(\"./Title\"));\nvar _Typography = _interopRequireDefault(require(\"./Typography\"));\nconst Typography = _Typography.default;\nTypography.Text = _Text.default;\nTypography.Link = _Link.default;\nTypography.Title = _Title.default;\nTypography.Paragraph = _Paragraph.default;\nvar _default = exports.default = Typography;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _style = require(\"../../style\");\nvar _internal = require(\"../../theme/internal\");\nvar _mixins = require(\"./mixins\");\nconst genTypographyStyle = token => {\n const {\n componentCls,\n titleMarginTop\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({\n color: token.colorText,\n wordBreak: 'break-word',\n lineHeight: token.lineHeight,\n [`&${componentCls}-secondary`]: {\n color: token.colorTextDescription\n },\n [`&${componentCls}-success`]: {\n color: token.colorSuccess\n },\n [`&${componentCls}-warning`]: {\n color: token.colorWarning\n },\n [`&${componentCls}-danger`]: {\n color: token.colorError,\n 'a&:active, a&:focus': {\n color: token.colorErrorActive\n },\n 'a&:hover': {\n color: token.colorErrorHover\n }\n },\n [`&${componentCls}-disabled`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed',\n userSelect: 'none'\n },\n [`\n div&,\n p\n `]: {\n marginBottom: '1em'\n }\n }, (0, _mixins.getTitleStyles)(token)), {\n [`\n & + h1${componentCls},\n & + h2${componentCls},\n & + h3${componentCls},\n & + h4${componentCls},\n & + h5${componentCls}\n `]: {\n marginTop: titleMarginTop\n },\n [`\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5`]: {\n [`\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n `]: {\n marginTop: titleMarginTop\n }\n }\n }), (0, _mixins.getResetStyles)(token)), (0, _mixins.getLinkStyles)(token)), {\n // Operation\n [`\n ${componentCls}-expand,\n ${componentCls}-collapse,\n ${componentCls}-edit,\n ${componentCls}-copy\n `]: Object.assign(Object.assign({}, (0, _style.operationUnit)(token)), {\n marginInlineStart: token.marginXXS\n })\n }), (0, _mixins.getEditableStyles)(token)), (0, _mixins.getCopyableStyles)(token)), (0, _mixins.getEllipsisStyles)()), {\n '&-rtl': {\n direction: 'rtl'\n }\n })\n };\n};\nconst prepareComponentToken = () => ({\n titleMarginTop: '1.2em',\n titleMarginBottom: '0.5em'\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Typography', token => [genTypographyStyle(token)], prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getTitleStyles = exports.getResetStyles = exports.getLinkStyles = exports.getEllipsisStyles = exports.getEditableStyles = exports.getCopyableStyles = void 0;\nvar _colors = require(\"@ant-design/colors\");\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\n/*\n.typography-title(@fontSize; @fontWeight; @lineHeight; @headingColor; @headingMarginBottom;) {\n margin-bottom: @headingMarginBottom;\n color: @headingColor;\n font-weight: @fontWeight;\n fontSize: @fontSize;\n line-height: @lineHeight;\n}\n*/\n\nconst getTitleStyle = (fontSize, lineHeight, color, token) => {\n const {\n titleMarginBottom,\n fontWeightStrong\n } = token;\n return {\n marginBottom: titleMarginBottom,\n color,\n fontWeight: fontWeightStrong,\n fontSize,\n lineHeight\n };\n};\nconst getTitleStyles = token => {\n const headings = [1, 2, 3, 4, 5];\n const styles = {};\n headings.forEach(headingLevel => {\n styles[`\n h${headingLevel}&,\n div&-h${headingLevel},\n div&-h${headingLevel} > textarea,\n h${headingLevel}\n `] = getTitleStyle(token[`fontSizeHeading${headingLevel}`], token[`lineHeightHeading${headingLevel}`], token.colorTextHeading, token);\n });\n return styles;\n};\nexports.getTitleStyles = getTitleStyles;\nconst getLinkStyles = token => {\n const {\n componentCls\n } = token;\n return {\n 'a&, a': Object.assign(Object.assign({}, (0, _style.operationUnit)(token)), {\n userSelect: 'text',\n [`&[disabled], &${componentCls}-disabled`]: {\n color: token.colorTextDisabled,\n cursor: 'not-allowed',\n '&:active, &:hover': {\n color: token.colorTextDisabled\n },\n '&:active': {\n pointerEvents: 'none'\n }\n }\n })\n };\n};\nexports.getLinkStyles = getLinkStyles;\nconst getResetStyles = token => ({\n code: {\n margin: '0 0.2em',\n paddingInline: '0.4em',\n paddingBlock: '0.2em 0.1em',\n fontSize: '85%',\n fontFamily: token.fontFamilyCode,\n background: 'rgba(150, 150, 150, 0.1)',\n border: '1px solid rgba(100, 100, 100, 0.2)',\n borderRadius: 3\n },\n kbd: {\n margin: '0 0.2em',\n paddingInline: '0.4em',\n paddingBlock: '0.15em 0.1em',\n fontSize: '90%',\n fontFamily: token.fontFamilyCode,\n background: 'rgba(150, 150, 150, 0.06)',\n border: '1px solid rgba(100, 100, 100, 0.2)',\n borderBottomWidth: 2,\n borderRadius: 3\n },\n mark: {\n padding: 0,\n // FIXME hardcode in v4\n backgroundColor: _colors.gold[2]\n },\n 'u, ins': {\n textDecoration: 'underline',\n textDecorationSkipInk: 'auto'\n },\n 's, del': {\n textDecoration: 'line-through'\n },\n strong: {\n fontWeight: 600\n },\n // list\n 'ul, ol': {\n marginInline: 0,\n marginBlock: '0 1em',\n padding: 0,\n li: {\n marginInline: '20px 0',\n marginBlock: 0,\n paddingInline: '4px 0',\n paddingBlock: 0\n }\n },\n ul: {\n listStyleType: 'circle',\n ul: {\n listStyleType: 'disc'\n }\n },\n ol: {\n listStyleType: 'decimal'\n },\n // pre & block\n 'pre, blockquote': {\n margin: '1em 0'\n },\n pre: {\n padding: '0.4em 0.6em',\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word',\n background: 'rgba(150, 150, 150, 0.1)',\n border: '1px solid rgba(100, 100, 100, 0.2)',\n borderRadius: 3,\n fontFamily: token.fontFamilyCode,\n // Compatible for marked\n code: {\n display: 'inline',\n margin: 0,\n padding: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n background: 'transparent',\n border: 0\n }\n },\n blockquote: {\n paddingInline: '0.6em 0',\n paddingBlock: 0,\n borderInlineStart: '4px solid rgba(100, 100, 100, 0.2)',\n opacity: 0.85\n }\n});\nexports.getResetStyles = getResetStyles;\nconst getEditableStyles = token => {\n const {\n componentCls,\n paddingSM\n } = token;\n const inputShift = paddingSM;\n return {\n '&-edit-content': {\n position: 'relative',\n 'div&': {\n insetInlineStart: token.calc(token.paddingSM).mul(-1).equal(),\n marginTop: token.calc(inputShift).mul(-1).equal(),\n marginBottom: `calc(1em - ${(0, _cssinjs.unit)(inputShift)})`\n },\n [`${componentCls}-edit-content-confirm`]: {\n position: 'absolute',\n insetInlineEnd: token.calc(token.marginXS).add(2).equal(),\n insetBlockEnd: token.marginXS,\n color: token.colorTextDescription,\n // default style\n fontWeight: 'normal',\n fontSize: token.fontSize,\n fontStyle: 'normal',\n pointerEvents: 'none'\n },\n textarea: {\n margin: '0!important',\n // Fix Editable Textarea flash in Firefox\n MozTransition: 'none',\n height: '1em'\n }\n }\n };\n};\nexports.getEditableStyles = getEditableStyles;\nconst getCopyableStyles = token => ({\n [`${token.componentCls}-copy-success`]: {\n [`\n &,\n &:hover,\n &:focus`]: {\n color: token.colorSuccess\n }\n },\n [`${token.componentCls}-copy-icon-only`]: {\n marginInlineStart: 0\n }\n});\nexports.getCopyableStyles = getCopyableStyles;\nconst getEllipsisStyles = () => ({\n [`\n a&-ellipsis,\n span&-ellipsis\n `]: {\n display: 'inline-block',\n maxWidth: '100%'\n },\n '&-ellipsis-single-line': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n // https://blog.csdn.net/iefreer/article/details/50421025\n 'a&, span&': {\n verticalAlign: 'bottom'\n },\n '> code': {\n paddingBlock: 0,\n maxWidth: 'calc(100% - 1.2em)',\n display: 'inline-block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n verticalAlign: 'bottom',\n // https://github.com/ant-design/ant-design/issues/45953\n boxSizing: 'content-box'\n }\n },\n '&-ellipsis-multiple-line': {\n display: '-webkit-box',\n overflow: 'hidden',\n WebkitLineClamp: 3,\n WebkitBoxOrient: 'vertical'\n }\n});\nexports.getEllipsisStyles = getEllipsisStyles;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _Upload = _interopRequireDefault(require(\"./Upload\"));\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nconst Dragger = /*#__PURE__*/React.forwardRef((_a, ref) => {\n var {\n style,\n height,\n hasControlInside = false\n } = _a,\n restProps = __rest(_a, [\"style\", \"height\", \"hasControlInside\"]);\n return /*#__PURE__*/React.createElement(_Upload.default, Object.assign({\n ref: ref,\n hasControlInside: hasControlInside\n }, restProps, {\n type: \"drag\",\n style: Object.assign(Object.assign({}, style), {\n height\n })\n }));\n});\nif (process.env.NODE_ENV !== 'production') {\n Dragger.displayName = 'Dragger';\n}\nvar _default = exports.default = Dragger;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.LIST_IGNORE = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _reactDom = require(\"react-dom\");\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcUpload = _interopRequireDefault(require(\"rc-upload\"));\nvar _useMergedState = _interopRequireDefault(require(\"rc-util/lib/hooks/useMergedState\"));\nvar _warning = require(\"../_util/warning\");\nvar _configProvider = require(\"../config-provider\");\nvar _DisabledContext = _interopRequireDefault(require(\"../config-provider/DisabledContext\"));\nvar _locale = require(\"../locale\");\nvar _en_US = _interopRequireDefault(require(\"../locale/en_US\"));\nvar _style = _interopRequireDefault(require(\"./style\"));\nvar _UploadList = _interopRequireDefault(require(\"./UploadList\"));\nvar _utils = require(\"./utils\");\nvar __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nconst LIST_IGNORE = exports.LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;\nconst InternalUpload = (props, ref) => {\n const {\n fileList,\n defaultFileList,\n onRemove,\n showUploadList = true,\n listType = 'text',\n onPreview,\n onDownload,\n onChange,\n onDrop,\n previewFile,\n disabled: customDisabled,\n locale: propLocale,\n iconRender,\n isImageUrl,\n progress,\n prefixCls: customizePrefixCls,\n className,\n type = 'select',\n children,\n style,\n itemRender,\n maxCount,\n data = {},\n multiple = false,\n hasControlInside = true,\n action = '',\n accept = '',\n supportServerRender = true,\n rootClassName\n } = props;\n // ===================== Disabled =====================\n const disabled = React.useContext(_DisabledContext.default);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const [mergedFileList, setMergedFileList] = (0, _useMergedState.default)(defaultFileList || [], {\n value: fileList,\n postState: list => list !== null && list !== void 0 ? list : []\n });\n const [dragState, setDragState] = React.useState('drop');\n const upload = React.useRef(null);\n const wrapRef = React.useRef(null);\n if (process.env.NODE_ENV !== 'production') {\n const warning = (0, _warning.devUseWarning)('Upload');\n process.env.NODE_ENV !== \"production\" ? warning('fileList' in props || !('value' in props), 'usage', '`value` is not a valid prop, do you mean `fileList`?') : void 0;\n warning.deprecated(!('transformFile' in props), 'transformFile', 'beforeUpload');\n }\n // Control mode will auto fill file uid if not provided\n React.useMemo(() => {\n const timestamp = Date.now();\n (fileList || []).forEach((file, index) => {\n if (!file.uid && !Object.isFrozen(file)) {\n file.uid = `__AUTO__${timestamp}_${index}__`;\n }\n });\n }, [fileList]);\n const onInternalChange = (file, changedFileList, event) => {\n let cloneList = (0, _toConsumableArray2.default)(changedFileList);\n let exceedMaxCount = false;\n // Cut to match count\n if (maxCount === 1) {\n cloneList = cloneList.slice(-1);\n } else if (maxCount) {\n exceedMaxCount = cloneList.length > maxCount;\n cloneList = cloneList.slice(0, maxCount);\n }\n // Prevent React18 auto batch since input[upload] trigger process at same time\n // which makes fileList closure problem\n (0, _reactDom.flushSync)(() => {\n setMergedFileList(cloneList);\n });\n const changeInfo = {\n file: file,\n fileList: cloneList\n };\n if (event) {\n changeInfo.event = event;\n }\n if (!exceedMaxCount || file.status === 'removed' ||\n // We should ignore event if current file is exceed `maxCount`\n cloneList.some(f => f.uid === file.uid)) {\n (0, _reactDom.flushSync)(() => {\n onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo);\n });\n }\n };\n const mergedBeforeUpload = (file, fileListArgs) => __awaiter(void 0, void 0, void 0, function* () {\n const {\n beforeUpload,\n transformFile\n } = props;\n let parsedFile = file;\n if (beforeUpload) {\n const result = yield beforeUpload(file, fileListArgs);\n if (result === false) {\n return false;\n }\n // Hack for LIST_IGNORE, we add additional info to remove from the list\n delete file[LIST_IGNORE];\n if (result === LIST_IGNORE) {\n Object.defineProperty(file, LIST_IGNORE, {\n value: true,\n configurable: true\n });\n return false;\n }\n if (typeof result === 'object' && result) {\n parsedFile = result;\n }\n }\n if (transformFile) {\n parsedFile = yield transformFile(parsedFile);\n }\n return parsedFile;\n });\n const onBatchStart = batchFileInfoList => {\n // Skip file which marked as `LIST_IGNORE`, these file will not add to file list\n const filteredFileInfoList = batchFileInfoList.filter(info => !info.file[LIST_IGNORE]);\n // Nothing to do since no file need upload\n if (!filteredFileInfoList.length) {\n return;\n }\n const objectFileList = filteredFileInfoList.map(info => (0, _utils.file2Obj)(info.file));\n // Concat new files with prev files\n let newFileList = (0, _toConsumableArray2.default)(mergedFileList);\n objectFileList.forEach(fileObj => {\n // Replace file if exist\n newFileList = (0, _utils.updateFileList)(fileObj, newFileList);\n });\n objectFileList.forEach((fileObj, index) => {\n // Repeat trigger `onChange` event for compatible\n let triggerFileObj = fileObj;\n if (!filteredFileInfoList[index].parsedFile) {\n // `beforeUpload` return false\n const {\n originFileObj\n } = fileObj;\n let clone;\n try {\n clone = new File([originFileObj], originFileObj.name, {\n type: originFileObj.type\n });\n } catch (_a) {\n clone = new Blob([originFileObj], {\n type: originFileObj.type\n });\n clone.name = originFileObj.name;\n clone.lastModifiedDate = new Date();\n clone.lastModified = new Date().getTime();\n }\n clone.uid = fileObj.uid;\n triggerFileObj = clone;\n } else {\n // Inject `uploading` status\n fileObj.status = 'uploading';\n }\n onInternalChange(triggerFileObj, newFileList);\n });\n };\n const onSuccess = (response, file, xhr) => {\n try {\n if (typeof response === 'string') {\n // biome-ignore lint/style/noParameterAssign: we need to modify response\n response = JSON.parse(response);\n }\n } catch (_a) {\n /* do nothing */\n }\n // removed\n if (!(0, _utils.getFileItem)(file, mergedFileList)) {\n return;\n }\n const targetItem = (0, _utils.file2Obj)(file);\n targetItem.status = 'done';\n targetItem.percent = 100;\n targetItem.response = response;\n targetItem.xhr = xhr;\n const nextFileList = (0, _utils.updateFileList)(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList);\n };\n const onProgress = (e, file) => {\n // removed\n if (!(0, _utils.getFileItem)(file, mergedFileList)) {\n return;\n }\n const targetItem = (0, _utils.file2Obj)(file);\n targetItem.status = 'uploading';\n targetItem.percent = e.percent;\n const nextFileList = (0, _utils.updateFileList)(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList, e);\n };\n const onError = (error, response, file) => {\n // removed\n if (!(0, _utils.getFileItem)(file, mergedFileList)) {\n return;\n }\n const targetItem = (0, _utils.file2Obj)(file);\n targetItem.error = error;\n targetItem.response = response;\n targetItem.status = 'error';\n const nextFileList = (0, _utils.updateFileList)(targetItem, mergedFileList);\n onInternalChange(targetItem, nextFileList);\n };\n const handleRemove = file => {\n let currentFile;\n Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(ret => {\n var _a;\n // Prevent removing file\n if (ret === false) {\n return;\n }\n const removedFileList = (0, _utils.removeFileItem)(file, mergedFileList);\n if (removedFileList) {\n currentFile = Object.assign(Object.assign({}, file), {\n status: 'removed'\n });\n mergedFileList === null || mergedFileList === void 0 ? void 0 : mergedFileList.forEach(item => {\n const matchKey = currentFile.uid !== undefined ? 'uid' : 'name';\n if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) {\n item.status = 'removed';\n }\n });\n (_a = upload.current) === null || _a === void 0 ? void 0 : _a.abort(currentFile);\n onInternalChange(currentFile, removedFileList);\n }\n });\n };\n const onFileDrop = e => {\n setDragState(e.type);\n if (e.type === 'drop') {\n onDrop === null || onDrop === void 0 ? void 0 : onDrop(e);\n }\n };\n // Test needs\n React.useImperativeHandle(ref, () => ({\n onBatchStart,\n onSuccess,\n onProgress,\n onError,\n fileList: mergedFileList,\n upload: upload.current,\n nativeElement: wrapRef.current\n }));\n const {\n getPrefixCls,\n direction,\n upload: ctxUpload\n } = React.useContext(_configProvider.ConfigContext);\n const prefixCls = getPrefixCls('upload', customizePrefixCls);\n const rcUploadProps = Object.assign(Object.assign({\n onBatchStart,\n onError,\n onProgress,\n onSuccess\n }, props), {\n data,\n multiple,\n action,\n accept,\n supportServerRender,\n prefixCls,\n disabled: mergedDisabled,\n beforeUpload: mergedBeforeUpload,\n onChange: undefined,\n hasControlInside\n });\n delete rcUploadProps.className;\n delete rcUploadProps.style;\n // Remove id to avoid open by label when trigger is hidden\n // !children: https://github.com/ant-design/ant-design/issues/14298\n // disabled: https://github.com/ant-design/ant-design/issues/16478\n // https://github.com/ant-design/ant-design/issues/24197\n if (!children || mergedDisabled) {\n delete rcUploadProps.id;\n }\n const wrapperCls = `${prefixCls}-wrapper`;\n const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls, wrapperCls);\n const [contextLocale] = (0, _locale.useLocale)('Upload', _en_US.default.Upload);\n const {\n showRemoveIcon,\n showPreviewIcon,\n showDownloadIcon,\n removeIcon,\n previewIcon,\n downloadIcon,\n extra\n } = typeof showUploadList === 'boolean' ? {} : showUploadList;\n // use showRemoveIcon if it is specified explicitly\n const realShowRemoveIcon = typeof showRemoveIcon === 'undefined' ? !mergedDisabled : showRemoveIcon;\n const renderUploadList = (button, buttonVisible) => {\n if (!showUploadList) {\n return button;\n }\n return /*#__PURE__*/React.createElement(_UploadList.default, {\n prefixCls: prefixCls,\n listType: listType,\n items: mergedFileList,\n previewFile: previewFile,\n onPreview: onPreview,\n onDownload: onDownload,\n onRemove: handleRemove,\n showRemoveIcon: realShowRemoveIcon,\n showPreviewIcon: showPreviewIcon,\n showDownloadIcon: showDownloadIcon,\n removeIcon: removeIcon,\n previewIcon: previewIcon,\n downloadIcon: downloadIcon,\n iconRender: iconRender,\n extra: extra,\n locale: Object.assign(Object.assign({}, contextLocale), propLocale),\n isImageUrl: isImageUrl,\n progress: progress,\n appendAction: button,\n appendActionVisible: buttonVisible,\n itemRender: itemRender,\n disabled: mergedDisabled\n });\n };\n const mergedCls = (0, _classnames.default)(wrapperCls, className, rootClassName, hashId, cssVarCls, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.className, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-picture-card-wrapper`]: listType === 'picture-card',\n [`${prefixCls}-picture-circle-wrapper`]: listType === 'picture-circle'\n });\n const mergedStyle = Object.assign(Object.assign({}, ctxUpload === null || ctxUpload === void 0 ? void 0 : ctxUpload.style), style);\n // ======================== Render ========================\n if (type === 'drag') {\n const dragCls = (0, _classnames.default)(hashId, prefixCls, `${prefixCls}-drag`, {\n [`${prefixCls}-drag-uploading`]: mergedFileList.some(file => file.status === 'uploading'),\n [`${prefixCls}-drag-hover`]: dragState === 'dragover',\n [`${prefixCls}-disabled`]: mergedDisabled,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n });\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: dragCls,\n style: mergedStyle,\n onDrop: onFileDrop,\n onDragOver: onFileDrop,\n onDragLeave: onFileDrop\n }, /*#__PURE__*/React.createElement(_rcUpload.default, Object.assign({}, rcUploadProps, {\n ref: upload,\n className: `${prefixCls}-btn`\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-drag-container`\n }, children))), renderUploadList()));\n }\n const uploadButtonCls = (0, _classnames.default)(prefixCls, `${prefixCls}-select`, {\n [`${prefixCls}-disabled`]: mergedDisabled\n });\n const uploadButton = /*#__PURE__*/React.createElement(\"div\", {\n className: uploadButtonCls,\n style: children ? undefined : {\n display: 'none'\n }\n }, /*#__PURE__*/React.createElement(_rcUpload.default, Object.assign({}, rcUploadProps, {\n ref: upload\n })));\n if (listType === 'picture-card' || listType === 'picture-circle') {\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, renderUploadList(uploadButton, !!children)));\n }\n return wrapCSSVar(/*#__PURE__*/React.createElement(\"span\", {\n className: mergedCls,\n ref: wrapRef\n }, uploadButton, renderUploadList()));\n};\nconst Upload = /*#__PURE__*/React.forwardRef(InternalUpload);\nif (process.env.NODE_ENV !== 'production') {\n Upload.displayName = 'Upload';\n}\nvar _default = exports.default = Upload;","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _DeleteOutlined = _interopRequireDefault(require(\"@ant-design/icons/DeleteOutlined\"));\nvar _DownloadOutlined = _interopRequireDefault(require(\"@ant-design/icons/DownloadOutlined\"));\nvar _EyeOutlined = _interopRequireDefault(require(\"@ant-design/icons/EyeOutlined\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireDefault(require(\"rc-motion\"));\nvar _configProvider = require(\"../../config-provider\");\nvar _progress = _interopRequireDefault(require(\"../../progress\"));\nvar _tooltip = _interopRequireDefault(require(\"../../tooltip\"));\nconst ListItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n prefixCls,\n className,\n style,\n locale,\n listType,\n file,\n items,\n progress: progressProps,\n iconRender,\n actionIconRender,\n itemRender,\n isImgUrl,\n showPreviewIcon,\n showRemoveIcon,\n showDownloadIcon,\n previewIcon: customPreviewIcon,\n removeIcon: customRemoveIcon,\n downloadIcon: customDownloadIcon,\n extra: customExtra,\n onPreview,\n onDownload,\n onClose\n } = _ref;\n var _a, _b;\n // Status: which will ignore `removed` status\n const {\n status\n } = file;\n const [mergedStatus, setMergedStatus] = React.useState(status);\n React.useEffect(() => {\n if (status !== 'removed') {\n setMergedStatus(status);\n }\n }, [status]);\n // Delay to show the progress bar\n const [showProgress, setShowProgress] = React.useState(false);\n React.useEffect(() => {\n const timer = setTimeout(() => {\n setShowProgress(true);\n }, 300);\n return () => {\n clearTimeout(timer);\n };\n }, []);\n const iconNode = iconRender(file);\n let icon = /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-icon`\n }, iconNode);\n if (listType === 'picture' || listType === 'picture-card' || listType === 'picture-circle') {\n if (mergedStatus === 'uploading' || !file.thumbUrl && !file.url) {\n const uploadingClassName = (0, _classnames.default)(`${prefixCls}-list-item-thumbnail`, {\n [`${prefixCls}-list-item-file`]: mergedStatus !== 'uploading'\n });\n icon = /*#__PURE__*/React.createElement(\"div\", {\n className: uploadingClassName\n }, iconNode);\n } else {\n const thumbnail = (isImgUrl === null || isImgUrl === void 0 ? void 0 : isImgUrl(file)) ? (/*#__PURE__*/React.createElement(\"img\", {\n src: file.thumbUrl || file.url,\n alt: file.name,\n className: `${prefixCls}-list-item-image`,\n crossOrigin: file.crossOrigin\n })) : iconNode;\n const aClassName = (0, _classnames.default)(`${prefixCls}-list-item-thumbnail`, {\n [`${prefixCls}-list-item-file`]: isImgUrl && !isImgUrl(file)\n });\n icon = /*#__PURE__*/React.createElement(\"a\", {\n className: aClassName,\n onClick: e => onPreview(file, e),\n href: file.url || file.thumbUrl,\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, thumbnail);\n }\n }\n const listItemClassName = (0, _classnames.default)(`${prefixCls}-list-item`, `${prefixCls}-list-item-${mergedStatus}`);\n const linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;\n const removeIcon = (typeof showRemoveIcon === 'function' ? showRemoveIcon(file) : showRemoveIcon) ? actionIconRender((typeof customRemoveIcon === 'function' ? customRemoveIcon(file) : customRemoveIcon) || (/*#__PURE__*/React.createElement(_DeleteOutlined.default, null)), () => onClose(file), prefixCls, locale.removeFile,\n // acceptUploadDisabled is true, only remove icon will follow Upload disabled prop\n // https://github.com/ant-design/ant-design/issues/46171\n true) : null;\n const downloadIcon = (typeof showDownloadIcon === 'function' ? showDownloadIcon(file) : showDownloadIcon) && mergedStatus === 'done' ? actionIconRender((typeof customDownloadIcon === 'function' ? customDownloadIcon(file) : customDownloadIcon) || /*#__PURE__*/React.createElement(_DownloadOutlined.default, null), () => onDownload(file), prefixCls, locale.downloadFile) : null;\n const downloadOrDelete = listType !== 'picture-card' && listType !== 'picture-circle' && (/*#__PURE__*/React.createElement(\"span\", {\n key: \"download-delete\",\n className: (0, _classnames.default)(`${prefixCls}-list-item-actions`, {\n picture: listType === 'picture'\n })\n }, downloadIcon, removeIcon));\n const extraContent = typeof customExtra === 'function' ? customExtra(file) : customExtra;\n const extra = extraContent && (/*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-list-item-extra`\n }, extraContent));\n const listItemNameClass = (0, _classnames.default)(`${prefixCls}-list-item-name`);\n const fileName = file.url ? (/*#__PURE__*/React.createElement(\"a\", Object.assign({\n key: \"view\",\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n className: listItemNameClass,\n title: file.name\n }, linkProps, {\n href: file.url,\n onClick: e => onPreview(file, e)\n }), file.name, extra)) : (/*#__PURE__*/React.createElement(\"span\", {\n key: \"view\",\n className: listItemNameClass,\n onClick: e => onPreview(file, e),\n title: file.name\n }, file.name, extra));\n const previewIcon = (typeof showPreviewIcon === 'function' ? showPreviewIcon(file) : showPreviewIcon) && (file.url || file.thumbUrl) ? (/*#__PURE__*/React.createElement(\"a\", {\n href: file.url || file.thumbUrl,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n onClick: e => onPreview(file, e),\n title: locale.previewFile\n }, typeof customPreviewIcon === 'function' ? customPreviewIcon(file) : customPreviewIcon || /*#__PURE__*/React.createElement(_EyeOutlined.default, null))) : null;\n const pictureCardActions = (listType === 'picture-card' || listType === 'picture-circle') && mergedStatus !== 'uploading' && (/*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-list-item-actions`\n }, previewIcon, mergedStatus === 'done' && downloadIcon, removeIcon));\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n const rootPrefixCls = getPrefixCls();\n const dom = /*#__PURE__*/React.createElement(\"div\", {\n className: listItemClassName\n }, icon, fileName, downloadOrDelete, pictureCardActions, showProgress && (/*#__PURE__*/React.createElement(_rcMotion.default, {\n motionName: `${rootPrefixCls}-fade`,\n visible: mergedStatus === 'uploading',\n motionDeadline: 2000\n }, _ref2 => {\n let {\n className: motionClassName\n } = _ref2;\n // show loading icon if upload progress listener is disabled\n const loadingProgress = 'percent' in file ? (/*#__PURE__*/React.createElement(_progress.default, Object.assign({}, progressProps, {\n type: \"line\",\n percent: file.percent,\n \"aria-label\": file['aria-label'],\n \"aria-labelledby\": file['aria-labelledby']\n }))) : null;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-list-item-progress`, motionClassName)\n }, loadingProgress);\n })));\n const message = file.response && typeof file.response === 'string' ? file.response : ((_a = file.error) === null || _a === void 0 ? void 0 : _a.statusText) || ((_b = file.error) === null || _b === void 0 ? void 0 : _b.message) || locale.uploadError;\n const item = mergedStatus === 'error' ? (/*#__PURE__*/React.createElement(_tooltip.default, {\n title: message,\n getPopupContainer: node => node.parentNode\n }, dom)) : dom;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: (0, _classnames.default)(`${prefixCls}-list-item-container`, className),\n style: style,\n ref: ref\n }, itemRender ? itemRender(item, file, items, {\n download: onDownload.bind(null, file),\n preview: onPreview.bind(null, file),\n remove: onClose.bind(null, file)\n }) : item);\n});\nvar _default = exports.default = ListItem;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _FileTwoTone = _interopRequireDefault(require(\"@ant-design/icons/FileTwoTone\"));\nvar _LoadingOutlined = _interopRequireDefault(require(\"@ant-design/icons/LoadingOutlined\"));\nvar _PaperClipOutlined = _interopRequireDefault(require(\"@ant-design/icons/PaperClipOutlined\"));\nvar _PictureTwoTone = _interopRequireDefault(require(\"@ant-design/icons/PictureTwoTone\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _rcMotion = _interopRequireWildcard(require(\"rc-motion\"));\nvar _omit = _interopRequireDefault(require(\"rc-util/lib/omit\"));\nvar _useForceUpdate = _interopRequireDefault(require(\"../../_util/hooks/useForceUpdate\"));\nvar _motion = _interopRequireDefault(require(\"../../_util/motion\"));\nvar _reactNode = require(\"../../_util/reactNode\");\nvar _button = _interopRequireDefault(require(\"../../button\"));\nvar _configProvider = require(\"../../config-provider\");\nvar _utils = require(\"../utils\");\nvar _ListItem = _interopRequireDefault(require(\"./ListItem\"));\nconst InternalUploadList = (props, ref) => {\n const {\n listType = 'text',\n previewFile = _utils.previewImage,\n onPreview,\n onDownload,\n onRemove,\n locale,\n iconRender,\n isImageUrl: isImgUrl = _utils.isImageUrl,\n prefixCls: customizePrefixCls,\n items = [],\n showPreviewIcon = true,\n showRemoveIcon = true,\n showDownloadIcon = false,\n removeIcon,\n previewIcon,\n downloadIcon,\n extra,\n progress = {\n size: [-1, 2],\n showInfo: false\n },\n appendAction,\n appendActionVisible = true,\n itemRender,\n disabled\n } = props;\n const forceUpdate = (0, _useForceUpdate.default)();\n const [motionAppear, setMotionAppear] = React.useState(false);\n const isPictureCardOrCirle = ['picture-card', 'picture-circle'].includes(listType);\n // ============================= Effect =============================\n React.useEffect(() => {\n if (!listType.startsWith('picture')) {\n return;\n }\n (items || []).forEach(file => {\n if (!(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) {\n return;\n }\n file.thumbUrl = '';\n previewFile === null || previewFile === void 0 ? void 0 : previewFile(file.originFileObj).then(previewDataUrl => {\n // Need append '' to avoid dead loop\n file.thumbUrl = previewDataUrl || '';\n forceUpdate();\n });\n });\n }, [listType, items, previewFile]);\n React.useEffect(() => {\n setMotionAppear(true);\n }, []);\n // ============================= Events =============================\n const onInternalPreview = (file, e) => {\n if (!onPreview) {\n return;\n }\n e.preventDefault();\n return onPreview(file);\n };\n const onInternalDownload = file => {\n if (typeof onDownload === 'function') {\n onDownload(file);\n } else if (file.url) {\n window.open(file.url);\n }\n };\n const onInternalClose = file => {\n onRemove === null || onRemove === void 0 ? void 0 : onRemove(file);\n };\n const internalIconRender = file => {\n if (iconRender) {\n return iconRender(file, listType);\n }\n const isLoading = file.status === 'uploading';\n if (listType.startsWith('picture')) {\n const loadingIcon = listType === 'picture' ? /*#__PURE__*/React.createElement(_LoadingOutlined.default, null) : locale.uploading;\n const fileIcon = (isImgUrl === null || isImgUrl === void 0 ? void 0 : isImgUrl(file)) ? /*#__PURE__*/React.createElement(_PictureTwoTone.default, null) : /*#__PURE__*/React.createElement(_FileTwoTone.default, null);\n return isLoading ? loadingIcon : fileIcon;\n }\n return isLoading ? /*#__PURE__*/React.createElement(_LoadingOutlined.default, null) : /*#__PURE__*/React.createElement(_PaperClipOutlined.default, null);\n };\n const actionIconRender = (customIcon, callback, prefixCls, title, acceptUploadDisabled) => {\n const btnProps = {\n type: 'text',\n size: 'small',\n title,\n onClick: e => {\n var _a, _b;\n callback();\n if (/*#__PURE__*/React.isValidElement(customIcon)) {\n (_b = (_a = customIcon.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }\n },\n className: `${prefixCls}-list-item-action`\n };\n if (acceptUploadDisabled) {\n btnProps.disabled = disabled;\n }\n return /*#__PURE__*/React.isValidElement(customIcon) ? (/*#__PURE__*/React.createElement(_button.default, Object.assign({}, btnProps, {\n icon: (0, _reactNode.cloneElement)(customIcon, Object.assign(Object.assign({}, customIcon.props), {\n onClick: () => {}\n }))\n }))) : (/*#__PURE__*/React.createElement(_button.default, Object.assign({}, btnProps), /*#__PURE__*/React.createElement(\"span\", null, customIcon)));\n };\n // ============================== Ref ===============================\n // Test needs\n React.useImperativeHandle(ref, () => ({\n handlePreview: onInternalPreview,\n handleDownload: onInternalDownload\n }));\n const {\n getPrefixCls\n } = React.useContext(_configProvider.ConfigContext);\n // ============================= Render =============================\n const prefixCls = getPrefixCls('upload', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const listClassNames = (0, _classnames.default)(`${prefixCls}-list`, `${prefixCls}-list-${listType}`);\n const listItemMotion = React.useMemo(() => (0, _omit.default)((0, _motion.default)(rootPrefixCls), ['onAppearEnd', 'onEnterEnd', 'onLeaveEnd']), [rootPrefixCls]);\n const motionConfig = Object.assign(Object.assign({}, isPictureCardOrCirle ? {} : listItemMotion), {\n motionDeadline: 2000,\n motionName: `${prefixCls}-${isPictureCardOrCirle ? 'animate-inline' : 'animate'}`,\n keys: (0, _toConsumableArray2.default)(items.map(file => ({\n key: file.uid,\n file\n }))),\n motionAppear\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: listClassNames\n }, /*#__PURE__*/React.createElement(_rcMotion.CSSMotionList, Object.assign({}, motionConfig, {\n component: false\n }), _ref => {\n let {\n key,\n file,\n className: motionClassName,\n style: motionStyle\n } = _ref;\n return /*#__PURE__*/React.createElement(_ListItem.default, {\n key: key,\n locale: locale,\n prefixCls: prefixCls,\n className: motionClassName,\n style: motionStyle,\n file: file,\n items: items,\n progress: progress,\n listType: listType,\n isImgUrl: isImgUrl,\n showPreviewIcon: showPreviewIcon,\n showRemoveIcon: showRemoveIcon,\n showDownloadIcon: showDownloadIcon,\n removeIcon: removeIcon,\n previewIcon: previewIcon,\n downloadIcon: downloadIcon,\n extra: extra,\n iconRender: internalIconRender,\n actionIconRender: actionIconRender,\n itemRender: itemRender,\n onPreview: onInternalPreview,\n onDownload: onInternalDownload,\n onClose: onInternalClose\n });\n }), appendAction && (/*#__PURE__*/React.createElement(_rcMotion.default, Object.assign({}, motionConfig, {\n visible: appendActionVisible,\n forceRender: true\n }), _ref2 => {\n let {\n className: motionClassName,\n style: motionStyle\n } = _ref2;\n return (0, _reactNode.cloneElement)(appendAction, oriProps => ({\n className: (0, _classnames.default)(oriProps.className, motionClassName),\n style: Object.assign(Object.assign(Object.assign({}, motionStyle), {\n // prevent the element has hover css pseudo-class that may cause animation to end prematurely.\n pointerEvents: motionClassName ? 'none' : undefined\n }), oriProps.style)\n }));\n })));\n};\nconst UploadList = /*#__PURE__*/React.forwardRef(InternalUploadList);\nif (process.env.NODE_ENV !== 'production') {\n UploadList.displayName = 'UploadList';\n}\nvar _default = exports.default = UploadList;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _Dragger = _interopRequireDefault(require(\"./Dragger\"));\nvar _Upload = _interopRequireWildcard(require(\"./Upload\"));\nconst Upload = _Upload.default;\nUpload.Dragger = _Dragger.default;\nUpload.LIST_IGNORE = _Upload.LIST_IGNORE;\nvar _default = exports.default = Upload;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nconst genDraggerStyle = token => {\n const {\n componentCls,\n iconCls\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-drag`]: {\n position: 'relative',\n width: '100%',\n height: '100%',\n textAlign: 'center',\n background: token.colorFillAlter,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} dashed ${token.colorBorder}`,\n borderRadius: token.borderRadiusLG,\n cursor: 'pointer',\n transition: `border-color ${token.motionDurationSlow}`,\n [componentCls]: {\n padding: token.padding\n },\n [`${componentCls}-btn`]: {\n display: 'table',\n width: '100%',\n height: '100%',\n outline: 'none',\n borderRadius: token.borderRadiusLG,\n '&:focus-visible': {\n outline: `${(0, _cssinjs.unit)(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`\n }\n },\n [`${componentCls}-drag-container`]: {\n display: 'table-cell',\n verticalAlign: 'middle'\n },\n [`\n &:not(${componentCls}-disabled):hover,\n &-hover:not(${componentCls}-disabled)\n `]: {\n borderColor: token.colorPrimaryHover\n },\n [`p${componentCls}-drag-icon`]: {\n marginBottom: token.margin,\n [iconCls]: {\n color: token.colorPrimary,\n fontSize: token.uploadThumbnailSize\n }\n },\n [`p${componentCls}-text`]: {\n margin: `0 0 ${(0, _cssinjs.unit)(token.marginXXS)}`,\n color: token.colorTextHeading,\n fontSize: token.fontSizeLG\n },\n [`p${componentCls}-hint`]: {\n color: token.colorTextDescription,\n fontSize: token.fontSize\n },\n // ===================== Disabled =====================\n [`&${componentCls}-disabled`]: {\n [`p${componentCls}-drag-icon ${iconCls},\n p${componentCls}-text,\n p${componentCls}-hint\n `]: {\n color: token.colorTextDisabled\n }\n }\n }\n }\n };\n};\nvar _default = exports.default = genDraggerStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.prepareComponentToken = exports.default = void 0;\nvar _style = require(\"../../style\");\nvar _motion = require(\"../../style/motion\");\nvar _internal = require(\"../../theme/internal\");\nvar _dragger = _interopRequireDefault(require(\"./dragger\"));\nvar _list = _interopRequireDefault(require(\"./list\"));\nvar _motion2 = _interopRequireDefault(require(\"./motion\"));\nvar _picture = require(\"./picture\");\nvar _rtl = _interopRequireDefault(require(\"./rtl\"));\nconst genBaseStyle = token => {\n const {\n componentCls,\n colorTextDisabled\n } = token;\n return {\n [`${componentCls}-wrapper`]: Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), {\n [componentCls]: {\n outline: 0,\n \"input[type='file']\": {\n cursor: 'pointer'\n }\n },\n [`${componentCls}-select`]: {\n display: 'inline-block'\n },\n [`${componentCls}-disabled`]: {\n color: colorTextDisabled,\n cursor: 'not-allowed'\n }\n })\n };\n};\nconst prepareComponentToken = token => ({\n actionsColor: token.colorTextDescription\n});\n// ============================== Export ==============================\nexports.prepareComponentToken = prepareComponentToken;\nvar _default = exports.default = (0, _internal.genStyleHooks)('Upload', token => {\n const {\n fontSizeHeading3,\n fontHeight,\n lineWidth,\n controlHeightLG,\n calc\n } = token;\n const uploadToken = (0, _internal.mergeToken)(token, {\n uploadThumbnailSize: calc(fontSizeHeading3).mul(2).equal(),\n uploadProgressOffset: calc(calc(fontHeight).div(2)).add(lineWidth).equal(),\n uploadPicCardSize: calc(controlHeightLG).mul(2.55).equal()\n });\n return [genBaseStyle(uploadToken), (0, _dragger.default)(uploadToken), (0, _picture.genPictureStyle)(uploadToken), (0, _picture.genPictureCardStyle)(uploadToken), (0, _list.default)(uploadToken), (0, _motion2.default)(uploadToken), (0, _rtl.default)(uploadToken), (0, _motion.genCollapseMotion)(uploadToken)];\n}, prepareComponentToken);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nconst genListStyle = token => {\n const {\n componentCls,\n antCls,\n iconCls,\n fontSize,\n lineHeight,\n calc\n } = token;\n const itemCls = `${componentCls}-list-item`;\n const actionsCls = `${itemCls}-actions`;\n const actionCls = `${itemCls}-action`;\n const listItemHeightSM = token.fontHeightSM;\n return {\n [`${componentCls}-wrapper`]: {\n [`${componentCls}-list`]: Object.assign(Object.assign({}, (0, _style.clearFix)()), {\n lineHeight: token.lineHeight,\n [itemCls]: {\n position: 'relative',\n height: calc(token.lineHeight).mul(fontSize).equal(),\n marginTop: token.marginXS,\n fontSize,\n display: 'flex',\n alignItems: 'center',\n transition: `background-color ${token.motionDurationSlow}`,\n '&:hover': {\n backgroundColor: token.controlItemBgHover\n },\n [`${itemCls}-name`]: Object.assign(Object.assign({}, _style.textEllipsis), {\n padding: `0 ${(0, _cssinjs.unit)(token.paddingXS)}`,\n lineHeight,\n flex: 'auto',\n transition: `all ${token.motionDurationSlow}`\n }),\n [actionsCls]: {\n whiteSpace: 'nowrap',\n [actionCls]: {\n opacity: 0\n },\n [iconCls]: {\n color: token.actionsColor,\n transition: `all ${token.motionDurationSlow}`\n },\n [`\n ${actionCls}:focus-visible,\n &.picture ${actionCls}\n `]: {\n opacity: 1\n },\n [`${actionCls}${antCls}-btn`]: {\n height: listItemHeightSM,\n border: 0,\n lineHeight: 1\n }\n },\n [`${componentCls}-icon ${iconCls}`]: {\n color: token.colorTextDescription,\n fontSize\n },\n [`${itemCls}-progress`]: {\n position: 'absolute',\n bottom: token.calc(token.uploadProgressOffset).mul(-1).equal(),\n width: '100%',\n paddingInlineStart: calc(fontSize).add(token.paddingXS).equal(),\n fontSize,\n lineHeight: 0,\n pointerEvents: 'none',\n '> div': {\n margin: 0\n }\n }\n },\n [`${itemCls}:hover ${actionCls}`]: {\n opacity: 1\n },\n [`${itemCls}-error`]: {\n color: token.colorError,\n [`${itemCls}-name, ${componentCls}-icon ${iconCls}`]: {\n color: token.colorError\n },\n [actionsCls]: {\n [`${iconCls}, ${iconCls}:hover`]: {\n color: token.colorError\n },\n [actionCls]: {\n opacity: 1\n }\n }\n },\n [`${componentCls}-list-item-container`]: {\n transition: `opacity ${token.motionDurationSlow}, height ${token.motionDurationSlow}`,\n // For smooth removing animation\n '&::before': {\n display: 'table',\n width: 0,\n height: 0,\n content: '\"\"'\n }\n }\n })\n }\n };\n};\nvar _default = exports.default = genListStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _motion = require(\"../../style/motion\");\n// =========================== Motion ===========================\nconst genMotionStyle = token => {\n const {\n componentCls\n } = token;\n const uploadAnimateInlineIn = new _cssinjs.Keyframes('uploadAnimateInlineIn', {\n from: {\n width: 0,\n height: 0,\n padding: 0,\n opacity: 0,\n margin: token.calc(token.marginXS).div(-2).equal()\n }\n });\n const uploadAnimateInlineOut = new _cssinjs.Keyframes('uploadAnimateInlineOut', {\n to: {\n width: 0,\n height: 0,\n padding: 0,\n opacity: 0,\n margin: token.calc(token.marginXS).div(-2).equal()\n }\n });\n const inlineCls = `${componentCls}-animate-inline`;\n return [{\n [`${componentCls}-wrapper`]: {\n [`${inlineCls}-appear, ${inlineCls}-enter, ${inlineCls}-leave`]: {\n animationDuration: token.motionDurationSlow,\n animationTimingFunction: token.motionEaseInOutCirc,\n animationFillMode: 'forwards'\n },\n [`${inlineCls}-appear, ${inlineCls}-enter`]: {\n animationName: uploadAnimateInlineIn\n },\n [`${inlineCls}-leave`]: {\n animationName: uploadAnimateInlineOut\n }\n }\n }, {\n [`${componentCls}-wrapper`]: (0, _motion.initFadeMotion)(token)\n }, uploadAnimateInlineIn, uploadAnimateInlineOut];\n};\nvar _default = exports.default = genMotionStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.genPictureStyle = exports.genPictureCardStyle = void 0;\nvar _colors = require(\"@ant-design/colors\");\nvar _cssinjs = require(\"@ant-design/cssinjs\");\nvar _style = require(\"../../style\");\nconst genPictureStyle = token => {\n const {\n componentCls,\n iconCls,\n uploadThumbnailSize,\n uploadProgressOffset,\n calc\n } = token;\n const listCls = `${componentCls}-list`;\n const itemCls = `${listCls}-item`;\n return {\n [`${componentCls}-wrapper`]: {\n // ${listCls} 增加优先级\n [`\n ${listCls}${listCls}-picture,\n ${listCls}${listCls}-picture-card,\n ${listCls}${listCls}-picture-circle\n `]: {\n [itemCls]: {\n position: 'relative',\n height: calc(uploadThumbnailSize).add(calc(token.lineWidth).mul(2)).add(calc(token.paddingXS).mul(2)).equal(),\n padding: token.paddingXS,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderRadius: token.borderRadiusLG,\n '&:hover': {\n background: 'transparent'\n },\n [`${itemCls}-thumbnail`]: Object.assign(Object.assign({}, _style.textEllipsis), {\n width: uploadThumbnailSize,\n height: uploadThumbnailSize,\n lineHeight: (0, _cssinjs.unit)(calc(uploadThumbnailSize).add(token.paddingSM).equal()),\n textAlign: 'center',\n flex: 'none',\n [iconCls]: {\n fontSize: token.fontSizeHeading2,\n color: token.colorPrimary\n },\n img: {\n display: 'block',\n width: '100%',\n height: '100%',\n overflow: 'hidden'\n }\n }),\n [`${itemCls}-progress`]: {\n bottom: uploadProgressOffset,\n width: `calc(100% - ${(0, _cssinjs.unit)(calc(token.paddingSM).mul(2).equal())})`,\n marginTop: 0,\n paddingInlineStart: calc(uploadThumbnailSize).add(token.paddingXS).equal()\n }\n },\n [`${itemCls}-error`]: {\n borderColor: token.colorError,\n // Adjust the color of the error icon : https://github.com/ant-design/ant-design/pull/24160\n [`${itemCls}-thumbnail ${iconCls}`]: {\n [`svg path[fill='${_colors.blue[0]}']`]: {\n fill: token.colorErrorBg\n },\n [`svg path[fill='${_colors.blue.primary}']`]: {\n fill: token.colorError\n }\n }\n },\n [`${itemCls}-uploading`]: {\n borderStyle: 'dashed',\n [`${itemCls}-name`]: {\n marginBottom: uploadProgressOffset\n }\n }\n },\n [`${listCls}${listCls}-picture-circle ${itemCls}`]: {\n [`&, &::before, ${itemCls}-thumbnail`]: {\n borderRadius: '50%'\n }\n }\n }\n };\n};\nexports.genPictureStyle = genPictureStyle;\nconst genPictureCardStyle = token => {\n const {\n componentCls,\n iconCls,\n fontSizeLG,\n colorTextLightSolid,\n calc\n } = token;\n const listCls = `${componentCls}-list`;\n const itemCls = `${listCls}-item`;\n const uploadPictureCardSize = token.uploadPicCardSize;\n return {\n [`\n ${componentCls}-wrapper${componentCls}-picture-card-wrapper,\n ${componentCls}-wrapper${componentCls}-picture-circle-wrapper\n `]: Object.assign(Object.assign({}, (0, _style.clearFix)()), {\n display: 'block',\n [`${componentCls}${componentCls}-select`]: {\n width: uploadPictureCardSize,\n height: uploadPictureCardSize,\n textAlign: 'center',\n verticalAlign: 'top',\n backgroundColor: token.colorFillAlter,\n border: `${(0, _cssinjs.unit)(token.lineWidth)} dashed ${token.colorBorder}`,\n borderRadius: token.borderRadiusLG,\n cursor: 'pointer',\n transition: `border-color ${token.motionDurationSlow}`,\n [`> ${componentCls}`]: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n textAlign: 'center'\n },\n [`&:not(${componentCls}-disabled):hover`]: {\n borderColor: token.colorPrimary\n }\n },\n // list\n [`${listCls}${listCls}-picture-card, ${listCls}${listCls}-picture-circle`]: {\n display: 'flex',\n flexWrap: 'wrap',\n '@supports not (gap: 1px)': {\n '& > *': {\n marginBlockEnd: token.marginXS,\n marginInlineEnd: token.marginXS\n }\n },\n '@supports (gap: 1px)': {\n gap: token.marginXS\n },\n [`${listCls}-item-container`]: {\n display: 'inline-block',\n width: uploadPictureCardSize,\n height: uploadPictureCardSize,\n verticalAlign: 'top'\n },\n '&::after': {\n display: 'none'\n },\n '&::before': {\n display: 'none'\n },\n [itemCls]: {\n height: '100%',\n margin: 0,\n '&::before': {\n position: 'absolute',\n zIndex: 1,\n width: `calc(100% - ${(0, _cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,\n height: `calc(100% - ${(0, _cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,\n backgroundColor: token.colorBgMask,\n opacity: 0,\n transition: `all ${token.motionDurationSlow}`,\n content: '\" \"'\n }\n },\n [`${itemCls}:hover`]: {\n [`&::before, ${itemCls}-actions`]: {\n opacity: 1\n }\n },\n [`${itemCls}-actions`]: {\n position: 'absolute',\n insetInlineStart: 0,\n zIndex: 10,\n width: '100%',\n whiteSpace: 'nowrap',\n textAlign: 'center',\n opacity: 0,\n transition: `all ${token.motionDurationSlow}`,\n [`\n ${iconCls}-eye,\n ${iconCls}-download,\n ${iconCls}-delete\n `]: {\n zIndex: 10,\n width: fontSizeLG,\n margin: `0 ${(0, _cssinjs.unit)(token.marginXXS)}`,\n fontSize: fontSizeLG,\n cursor: 'pointer',\n transition: `all ${token.motionDurationSlow}`,\n color: colorTextLightSolid,\n '&:hover': {\n color: colorTextLightSolid\n },\n svg: {\n verticalAlign: 'baseline'\n }\n }\n },\n [`${itemCls}-thumbnail, ${itemCls}-thumbnail img`]: {\n position: 'static',\n display: 'block',\n width: '100%',\n height: '100%',\n objectFit: 'contain'\n },\n [`${itemCls}-name`]: {\n display: 'none',\n textAlign: 'center'\n },\n [`${itemCls}-file + ${itemCls}-name`]: {\n position: 'absolute',\n bottom: token.margin,\n display: 'block',\n width: `calc(100% - ${(0, _cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`\n },\n [`${itemCls}-uploading`]: {\n [`&${itemCls}`]: {\n backgroundColor: token.colorFillAlter\n },\n [`&::before, ${iconCls}-eye, ${iconCls}-download, ${iconCls}-delete`]: {\n display: 'none'\n }\n },\n [`${itemCls}-progress`]: {\n bottom: token.marginXL,\n width: `calc(100% - ${(0, _cssinjs.unit)(calc(token.paddingXS).mul(2).equal())})`,\n paddingInlineStart: 0\n }\n }\n }),\n [`${componentCls}-wrapper${componentCls}-picture-circle-wrapper`]: {\n [`${componentCls}${componentCls}-select`]: {\n borderRadius: '50%'\n }\n }\n };\n};\nexports.genPictureCardStyle = genPictureCardStyle;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// =========================== Motion ===========================\nconst genRtlStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-rtl`]: {\n direction: 'rtl'\n }\n };\n};\nvar _default = exports.default = genRtlStyle;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.file2Obj = file2Obj;\nexports.getFileItem = getFileItem;\nexports.isImageUrl = void 0;\nexports.previewImage = previewImage;\nexports.removeFileItem = removeFileItem;\nexports.updateFileList = updateFileList;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nfunction file2Obj(file) {\n return Object.assign(Object.assign({}, file), {\n lastModified: file.lastModified,\n lastModifiedDate: file.lastModifiedDate,\n name: file.name,\n size: file.size,\n type: file.type,\n uid: file.uid,\n percent: 0,\n originFileObj: file\n });\n}\n/** Upload fileList. Replace file if exist or just push into it. */\nfunction updateFileList(file, fileList) {\n const nextFileList = (0, _toConsumableArray2.default)(fileList);\n const fileIndex = nextFileList.findIndex(_ref => {\n let {\n uid\n } = _ref;\n return uid === file.uid;\n });\n if (fileIndex === -1) {\n nextFileList.push(file);\n } else {\n nextFileList[fileIndex] = file;\n }\n return nextFileList;\n}\nfunction getFileItem(file, fileList) {\n const matchKey = file.uid !== undefined ? 'uid' : 'name';\n return fileList.filter(item => item[matchKey] === file[matchKey])[0];\n}\nfunction removeFileItem(file, fileList) {\n const matchKey = file.uid !== undefined ? 'uid' : 'name';\n const removed = fileList.filter(item => item[matchKey] !== file[matchKey]);\n if (removed.length === fileList.length) {\n return null;\n }\n return removed;\n}\n// ==================== Default Image Preview ====================\nconst extname = function () {\n let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n const temp = url.split('/');\n const filename = temp[temp.length - 1];\n const filenameWithoutSuffix = filename.split(/#|\\?/)[0];\n return (/\\.[^./\\\\]*$/.exec(filenameWithoutSuffix) || [''])[0];\n};\nconst isImageFileType = type => type.indexOf('image/') === 0;\nconst isImageUrl = file => {\n if (file.type && !file.thumbUrl) {\n return isImageFileType(file.type);\n }\n const url = file.thumbUrl || file.url || '';\n const extension = extname(url);\n if (/^data:image\\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(extension)) {\n return true;\n }\n if (/^data:/.test(url)) {\n // other file types of base64\n return false;\n }\n if (extension) {\n // other file types which have extension\n return false;\n }\n return true;\n};\nexports.isImageUrl = isImageUrl;\nconst MEASURE_SIZE = 200;\nfunction previewImage(file) {\n return new Promise(resolve => {\n if (!file.type || !isImageFileType(file.type)) {\n resolve('');\n return;\n }\n const canvas = document.createElement('canvas');\n canvas.width = MEASURE_SIZE;\n canvas.height = MEASURE_SIZE;\n canvas.style.cssText = `position: fixed; left: 0; top: 0; width: ${MEASURE_SIZE}px; height: ${MEASURE_SIZE}px; z-index: 9999; display: none;`;\n document.body.appendChild(canvas);\n const ctx = canvas.getContext('2d');\n const img = new Image();\n img.onload = () => {\n const {\n width,\n height\n } = img;\n let drawWidth = MEASURE_SIZE;\n let drawHeight = MEASURE_SIZE;\n let offsetX = 0;\n let offsetY = 0;\n if (width > height) {\n drawHeight = height * (MEASURE_SIZE / width);\n offsetY = -(drawHeight - drawWidth) / 2;\n } else {\n drawWidth = width * (MEASURE_SIZE / height);\n offsetX = -(drawWidth - drawHeight) / 2;\n }\n ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight);\n const dataURL = canvas.toDataURL();\n document.body.removeChild(canvas);\n window.URL.revokeObjectURL(img.src);\n resolve(dataURL);\n };\n img.crossOrigin = 'anonymous';\n if (file.type.startsWith('image/svg+xml')) {\n const reader = new FileReader();\n reader.onload = () => {\n if (reader.result && typeof reader.result === 'string') {\n img.src = reader.result;\n }\n };\n reader.readAsDataURL(file);\n } else if (file.type.startsWith('image/gif')) {\n const reader = new FileReader();\n reader.onload = () => {\n if (reader.result) {\n resolve(reader.result);\n }\n };\n reader.readAsDataURL(file);\n } else {\n img.src = window.URL.createObjectURL(file);\n }\n });\n}","\"use strict\";\n\"use client\";\n\n/* eslint import/no-unresolved: 0 */\n// @ts-ignore\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _version = _interopRequireDefault(require(\"./version\"));\nvar _default = exports.default = _version.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = exports.default = '5.21.6';","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.usePanelRef = usePanelRef;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nfunction voidFunc() {}\nconst WatermarkContext = /*#__PURE__*/React.createContext({\n add: voidFunc,\n remove: voidFunc\n});\nfunction usePanelRef(panelSelector) {\n const watermark = React.useContext(WatermarkContext);\n const panelEleRef = React.useRef();\n const panelRef = (0, _useEvent.default)(ele => {\n if (ele) {\n const innerContentEle = panelSelector ? ele.querySelector(panelSelector) : ele;\n watermark.add(innerContentEle);\n panelEleRef.current = innerContentEle;\n } else {\n watermark.remove(panelEleRef.current);\n }\n });\n return panelRef;\n}\nvar _default = exports.default = WatermarkContext;","\"use strict\";\n\"use client\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\nvar _react = _interopRequireWildcard(require(\"react\"));\nvar _mutateObserver = require(\"@rc-component/mutate-observer\");\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _internal = require(\"../theme/internal\");\nvar _context = _interopRequireDefault(require(\"./context\"));\nvar _useClips = _interopRequireWildcard(require(\"./useClips\"));\nvar _useRafDebounce = _interopRequireDefault(require(\"./useRafDebounce\"));\nvar _useWatermark = _interopRequireDefault(require(\"./useWatermark\"));\nvar _utils = require(\"./utils\");\nvar _toList = _interopRequireDefault(require(\"../_util/toList\"));\n/**\n * Only return `next` when size changed.\n * This is only used for elements compare, not a shallow equal!\n */\nfunction getSizeDiff(prev, next) {\n return prev.size === next.size ? prev : next;\n}\nconst DEFAULT_GAP_X = 100;\nconst DEFAULT_GAP_Y = 100;\nconst fixedStyle = {\n position: 'relative',\n overflow: 'hidden'\n};\nconst Watermark = props => {\n var _a, _b;\n const {\n /**\n * The antd content layer zIndex is basically below 10\n * https://github.com/ant-design/ant-design/blob/6192403b2ce517c017f9e58a32d58774921c10cd/components/style/themes/default.less#L335\n */\n zIndex = 9,\n rotate = -22,\n width,\n height,\n image,\n content,\n font = {},\n style,\n className,\n rootClassName,\n gap = [DEFAULT_GAP_X, DEFAULT_GAP_Y],\n offset,\n children,\n inherit = true\n } = props;\n const mergedStyle = Object.assign(Object.assign({}, fixedStyle), style);\n const [, token] = (0, _internal.useToken)();\n const {\n color = token.colorFill,\n fontSize = token.fontSizeLG,\n fontWeight = 'normal',\n fontStyle = 'normal',\n fontFamily = 'sans-serif',\n textAlign = 'center'\n } = font;\n const [gapX = DEFAULT_GAP_X, gapY = DEFAULT_GAP_Y] = gap;\n const gapXCenter = gapX / 2;\n const gapYCenter = gapY / 2;\n const offsetLeft = (_a = offset === null || offset === void 0 ? void 0 : offset[0]) !== null && _a !== void 0 ? _a : gapXCenter;\n const offsetTop = (_b = offset === null || offset === void 0 ? void 0 : offset[1]) !== null && _b !== void 0 ? _b : gapYCenter;\n const markStyle = _react.default.useMemo(() => {\n const mergedMarkStyle = {\n zIndex,\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n backgroundRepeat: 'repeat'\n };\n /** Calculate the style of the offset */\n let positionLeft = offsetLeft - gapXCenter;\n let positionTop = offsetTop - gapYCenter;\n if (positionLeft > 0) {\n mergedMarkStyle.left = `${positionLeft}px`;\n mergedMarkStyle.width = `calc(100% - ${positionLeft}px)`;\n positionLeft = 0;\n }\n if (positionTop > 0) {\n mergedMarkStyle.top = `${positionTop}px`;\n mergedMarkStyle.height = `calc(100% - ${positionTop}px)`;\n positionTop = 0;\n }\n mergedMarkStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;\n return mergedMarkStyle;\n }, [zIndex, offsetLeft, gapXCenter, offsetTop, gapYCenter]);\n const [container, setContainer] = _react.default.useState();\n // Used for nest case like Modal, Drawer\n const [subElements, setSubElements] = _react.default.useState(new Set());\n // Nest elements should also support watermark\n const targetElements = _react.default.useMemo(() => {\n const list = container ? [container] : [];\n return [].concat(list, (0, _toConsumableArray2.default)(Array.from(subElements)));\n }, [container, subElements]);\n // ============================ Content =============================\n /**\n * Get the width and height of the watermark. The default values are as follows\n * Image: [120, 64]; Content: It's calculated by content;\n */\n const getMarkSize = ctx => {\n let defaultWidth = 120;\n let defaultHeight = 64;\n if (!image && ctx.measureText) {\n ctx.font = `${Number(fontSize)}px ${fontFamily}`;\n const contents = (0, _toList.default)(content);\n const sizes = contents.map(item => {\n const metrics = ctx.measureText(item);\n return [metrics.width, metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent];\n });\n defaultWidth = Math.ceil(Math.max.apply(Math, (0, _toConsumableArray2.default)(sizes.map(size => size[0]))));\n defaultHeight = Math.ceil(Math.max.apply(Math, (0, _toConsumableArray2.default)(sizes.map(size => size[1])))) * contents.length + (contents.length - 1) * _useClips.FontGap;\n }\n return [width !== null && width !== void 0 ? width : defaultWidth, height !== null && height !== void 0 ? height : defaultHeight];\n };\n const getClips = (0, _useClips.default)();\n const [watermarkInfo, setWatermarkInfo] = _react.default.useState(null);\n // Generate new Watermark content\n const renderWatermark = () => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n if (ctx) {\n const ratio = (0, _utils.getPixelRatio)();\n const [markWidth, markHeight] = getMarkSize(ctx);\n const drawCanvas = drawContent => {\n const [nextClips, clipWidth] = getClips(drawContent || '', rotate, ratio, markWidth, markHeight, {\n color,\n fontSize,\n fontStyle,\n fontWeight,\n fontFamily,\n textAlign\n }, gapX, gapY);\n setWatermarkInfo([nextClips, clipWidth]);\n };\n if (image) {\n const img = new Image();\n img.onload = () => {\n drawCanvas(img);\n };\n img.onerror = () => {\n drawCanvas(content);\n };\n img.crossOrigin = 'anonymous';\n img.referrerPolicy = 'no-referrer';\n img.src = image;\n } else {\n drawCanvas(content);\n }\n }\n };\n const syncWatermark = (0, _useRafDebounce.default)(renderWatermark);\n // ============================= Effect =============================\n // Append watermark to the container\n const [appendWatermark, removeWatermark, isWatermarkEle] = (0, _useWatermark.default)(markStyle);\n (0, _react.useEffect)(() => {\n if (watermarkInfo) {\n targetElements.forEach(holder => {\n appendWatermark(watermarkInfo[0], watermarkInfo[1], holder);\n });\n }\n }, [watermarkInfo, targetElements]);\n // ============================ Observe =============================\n const onMutate = (0, _useEvent.default)(mutations => {\n mutations.forEach(mutation => {\n if ((0, _utils.reRendering)(mutation, isWatermarkEle)) {\n syncWatermark();\n } else if (mutation.target === container && mutation.attributeName === 'style') {\n // We've only force container not modify.\n // Not consider nest case.\n const keyStyles = Object.keys(fixedStyle);\n for (let i = 0; i < keyStyles.length; i += 1) {\n const key = keyStyles[i];\n const oriValue = mergedStyle[key];\n const currentValue = container.style[key];\n if (oriValue && oriValue !== currentValue) {\n container.style[key] = oriValue;\n }\n }\n }\n });\n });\n (0, _mutateObserver.useMutateObserver)(targetElements, onMutate);\n (0, _react.useEffect)(syncWatermark, [rotate, zIndex, width, height, image, content, color, fontSize, fontWeight, fontStyle, fontFamily, textAlign, gapX, gapY, offsetLeft, offsetTop]);\n // ============================ Context =============================\n const watermarkContext = _react.default.useMemo(() => ({\n add: ele => {\n setSubElements(prev => {\n const clone = new Set(prev);\n clone.add(ele);\n return getSizeDiff(prev, clone);\n });\n },\n remove: ele => {\n removeWatermark(ele);\n setSubElements(prev => {\n const clone = new Set(prev);\n clone.delete(ele);\n return getSizeDiff(prev, clone);\n });\n }\n }), []);\n // ============================= Render =============================\n const childNode = inherit ? (/*#__PURE__*/_react.default.createElement(_context.default.Provider, {\n value: watermarkContext\n }, children)) : children;\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n ref: setContainer,\n className: (0, _classnames.default)(className, rootClassName),\n style: mergedStyle\n }, childNode);\n};\nif (process.env.NODE_ENV !== 'production') {\n Watermark.displayName = 'Watermark';\n}\nvar _default = exports.default = Watermark;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FontGap = void 0;\nexports.default = useClips;\nvar _toList = _interopRequireDefault(require(\"../_util/toList\"));\nconst FontGap = exports.FontGap = 3;\nfunction prepareCanvas(width, height) {\n let ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n const realWidth = width * ratio;\n const realHeight = height * ratio;\n canvas.setAttribute('width', `${realWidth}px`);\n canvas.setAttribute('height', `${realHeight}px`);\n ctx.save();\n return [ctx, canvas, realWidth, realHeight];\n}\n/**\n * Get the clips of text content.\n * This is a lazy hook function since SSR no need this\n */\nfunction useClips() {\n // Get single clips\n function getClips(content, rotate, ratio, width, height, font, gapX, gapY) {\n // ================= Text / Image =================\n const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(width, height, ratio);\n if (content instanceof HTMLImageElement) {\n // Image\n ctx.drawImage(content, 0, 0, contentWidth, contentHeight);\n } else {\n // Text\n const {\n color,\n fontSize,\n fontStyle,\n fontWeight,\n fontFamily,\n textAlign\n } = font;\n const mergedFontSize = Number(fontSize) * ratio;\n ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;\n ctx.fillStyle = color;\n ctx.textAlign = textAlign;\n ctx.textBaseline = 'top';\n const contents = (0, _toList.default)(content);\n contents === null || contents === void 0 ? void 0 : contents.forEach((item, index) => {\n ctx.fillText(item !== null && item !== void 0 ? item : '', contentWidth / 2, index * (mergedFontSize + FontGap * ratio));\n });\n }\n // ==================== Rotate ====================\n const angle = Math.PI / 180 * Number(rotate);\n const maxSize = Math.max(width, height);\n const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio);\n // Copy from `ctx` and rotate\n rCtx.translate(realMaxSize / 2, realMaxSize / 2);\n rCtx.rotate(angle);\n if (contentWidth > 0 && contentHeight > 0) {\n rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2);\n }\n // Get boundary of rotated text\n function getRotatePos(x, y) {\n const targetX = x * Math.cos(angle) - y * Math.sin(angle);\n const targetY = x * Math.sin(angle) + y * Math.cos(angle);\n return [targetX, targetY];\n }\n let left = 0;\n let right = 0;\n let top = 0;\n let bottom = 0;\n const halfWidth = contentWidth / 2;\n const halfHeight = contentHeight / 2;\n const points = [[0 - halfWidth, 0 - halfHeight], [0 + halfWidth, 0 - halfHeight], [0 + halfWidth, 0 + halfHeight], [0 - halfWidth, 0 + halfHeight]];\n points.forEach(_ref => {\n let [x, y] = _ref;\n const [targetX, targetY] = getRotatePos(x, y);\n left = Math.min(left, targetX);\n right = Math.max(right, targetX);\n top = Math.min(top, targetY);\n bottom = Math.max(bottom, targetY);\n });\n const cutLeft = left + realMaxSize / 2;\n const cutTop = top + realMaxSize / 2;\n const cutWidth = right - left;\n const cutHeight = bottom - top;\n // ================ Fill Alternate ================\n const realGapX = gapX * ratio;\n const realGapY = gapY * ratio;\n const filledWidth = (cutWidth + realGapX) * 2;\n const filledHeight = cutHeight + realGapY;\n const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight);\n function drawImg() {\n let targetX = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n let targetY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n fCtx.drawImage(rCanvas, cutLeft, cutTop, cutWidth, cutHeight, targetX, targetY, cutWidth, cutHeight);\n }\n drawImg();\n drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2);\n drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2);\n return [fCanvas.toDataURL(), filledWidth / ratio, filledHeight / ratio];\n }\n return getClips;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = useRafDebounce;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _useEvent = _interopRequireDefault(require(\"rc-util/lib/hooks/useEvent\"));\nvar _raf = _interopRequireDefault(require(\"rc-util/lib/raf\"));\n/**\n * Callback will only execute last one for each raf\n */\nfunction useRafDebounce(callback) {\n const executeRef = _react.default.useRef(false);\n const rafRef = _react.default.useRef();\n const wrapperCallback = (0, _useEvent.default)(callback);\n return () => {\n if (executeRef.current) {\n return;\n }\n executeRef.current = true;\n wrapperCallback();\n rafRef.current = (0, _raf.default)(() => {\n executeRef.current = false;\n });\n };\n}","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FontGap = exports.BaseSize = void 0;\nexports.default = useWatermark;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _utils = require(\"./utils\");\n/**\n * Base size of the canvas, 1 for parallel layout and 2 for alternate layout\n * Only alternate layout is currently supported\n */\nconst BaseSize = exports.BaseSize = 2;\nconst FontGap = exports.FontGap = 3;\n// Prevent external hidden elements from adding accent styles\nconst emphasizedStyle = {\n visibility: 'visible !important'\n};\nfunction useWatermark(markStyle) {\n const [watermarkMap] = React.useState(() => new Map());\n const appendWatermark = (base64Url, markWidth, container) => {\n if (container) {\n if (!watermarkMap.get(container)) {\n const newWatermarkEle = document.createElement('div');\n watermarkMap.set(container, newWatermarkEle);\n }\n const watermarkEle = watermarkMap.get(container);\n watermarkEle.setAttribute('style', (0, _utils.getStyleStr)(Object.assign(Object.assign(Object.assign({}, markStyle), {\n backgroundImage: `url('${base64Url}')`,\n backgroundSize: `${Math.floor(markWidth)}px`\n }), emphasizedStyle)));\n // Prevents using the browser `Hide Element` to hide watermarks\n watermarkEle.removeAttribute('class');\n if (watermarkEle.parentElement !== container) {\n container.append(watermarkEle);\n }\n }\n return watermarkMap.get(container);\n };\n const removeWatermark = container => {\n const watermarkEle = watermarkMap.get(container);\n if (watermarkEle && container) {\n container.removeChild(watermarkEle);\n }\n watermarkMap.delete(container);\n };\n const isWatermarkEle = ele => Array.from(watermarkMap.values()).includes(ele);\n return [appendWatermark, removeWatermark, isWatermarkEle];\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getPixelRatio = getPixelRatio;\nexports.getStyleStr = getStyleStr;\nexports.reRendering = void 0;\nexports.toLowercaseSeparator = toLowercaseSeparator;\n/** converting camel-cased strings to be lowercase and link it with Separator */\nfunction toLowercaseSeparator(key) {\n return key.replace(/([A-Z])/g, '-$1').toLowerCase();\n}\nfunction getStyleStr(style) {\n return Object.keys(style).map(key => `${toLowercaseSeparator(key)}: ${style[key]};`).join(' ');\n}\n/** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */\nfunction getPixelRatio() {\n return window.devicePixelRatio || 1;\n}\n/** Whether to re-render the watermark */\nconst reRendering = (mutation, isWatermarkEle) => {\n let flag = false;\n // Whether to delete the watermark node\n if (mutation.removedNodes.length) {\n flag = Array.from(mutation.removedNodes).some(node => isWatermarkEle(node));\n }\n // Whether the watermark dom property value has been modified\n if (mutation.type === 'attributes' && isWatermarkEle(mutation.target)) {\n flag = true;\n }\n return flag;\n};\nexports.reRendering = reRendering;","import warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nexport var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nvar warningFunc = function warningFunc() {\n warning(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');\n};\nvar Context = /*#__PURE__*/React.createContext({\n getFieldValue: warningFunc,\n getFieldsValue: warningFunc,\n getFieldError: warningFunc,\n getFieldWarning: warningFunc,\n getFieldsError: warningFunc,\n isFieldsTouched: warningFunc,\n isFieldTouched: warningFunc,\n isFieldValidating: warningFunc,\n isFieldsValidating: warningFunc,\n resetFields: warningFunc,\n setFields: warningFunc,\n setFieldValue: warningFunc,\n setFieldsValue: warningFunc,\n validateFields: warningFunc,\n submit: warningFunc,\n getInternalHooks: function getInternalHooks() {\n warningFunc();\n return {\n dispatch: warningFunc,\n initEntityValue: warningFunc,\n registerField: warningFunc,\n useSubscribe: warningFunc,\n setInitialValues: warningFunc,\n destroyForm: warningFunc,\n setCallbacks: warningFunc,\n registerWatch: warningFunc,\n getFields: warningFunc,\n setValidateMessages: warningFunc,\n setPreserve: warningFunc,\n getInitialValue: warningFunc\n };\n }\n});\nexport default Context;","import * as React from 'react';\nvar ListContext = /*#__PURE__*/React.createContext(null);\nexport default ListContext;","export function toArray(value) {\n if (value === undefined || value === null) {\n return [];\n }\n return Array.isArray(value) ? value : [value];\n}\nexport function isFormInstance(form) {\n return form && !!form._init;\n}","var typeTemplate = \"'${name}' is not a valid ${type}\";\nexport var defaultValidateMessages = {\n default: \"Validation error on field '${name}'\",\n required: \"'${name}' is required\",\n enum: \"'${name}' must be one of [${enum}]\",\n whitespace: \"'${name}' cannot be empty\",\n date: {\n format: \"'${name}' is invalid for format date\",\n parse: \"'${name}' could not be parsed as date\",\n invalid: \"'${name}' is invalid date\"\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: \"'${name}' must be exactly ${len} characters\",\n min: \"'${name}' must be at least ${min} characters\",\n max: \"'${name}' cannot be longer than ${max} characters\",\n range: \"'${name}' must be between ${min} and ${max} characters\"\n },\n number: {\n len: \"'${name}' must equal ${len}\",\n min: \"'${name}' cannot be less than ${min}\",\n max: \"'${name}' cannot be greater than ${max}\",\n range: \"'${name}' must be between ${min} and ${max}\"\n },\n array: {\n len: \"'${name}' must be exactly ${len} in length\",\n min: \"'${name}' cannot be less than ${min} in length\",\n max: \"'${name}' cannot be greater than ${max} in length\",\n range: \"'${name}' must be between ${min} and ${max} in length\"\n },\n pattern: {\n mismatch: \"'${name}' does not match pattern ${pattern}\"\n }\n};","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport RawAsyncValidator from '@rc-component/async-validator';\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport { defaultValidateMessages } from \"./messages\";\nimport { merge } from \"rc-util/es/utils/set\";\n\n// Remove incorrect original ts define\nvar AsyncValidator = RawAsyncValidator;\n\n/**\n * Replace with template.\n * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo\n */\nfunction replaceMessage(template, kv) {\n return template.replace(/\\\\?\\$\\{\\w+\\}/g, function (str) {\n if (str.startsWith('\\\\')) {\n return str.slice(1);\n }\n var key = str.slice(2, -1);\n return kv[key];\n });\n}\nvar CODE_LOGIC_ERROR = 'CODE_LOGIC_ERROR';\nfunction validateRule(_x, _x2, _x3, _x4, _x5) {\n return _validateRule.apply(this, arguments);\n}\n/**\n * We use `async-validator` to validate the value.\n * But only check one value in a time to avoid namePath validate issue.\n */\nfunction _validateRule() {\n _validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {\n var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n cloneRule = _objectSpread({}, rule); // Bug of `async-validator`\n // https://github.com/react-component/field-form/issues/316\n // https://github.com/react-component/field-form/issues/313\n delete cloneRule.ruleIndex;\n\n // https://github.com/ant-design/ant-design/issues/40497#issuecomment-1422282378\n AsyncValidator.warning = function () {\n return void 0;\n };\n if (cloneRule.validator) {\n originValidator = cloneRule.validator;\n cloneRule.validator = function () {\n try {\n return originValidator.apply(void 0, arguments);\n } catch (error) {\n console.error(error);\n return Promise.reject(CODE_LOGIC_ERROR);\n }\n };\n }\n\n // We should special handle array validate\n subRuleField = null;\n if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {\n subRuleField = cloneRule.defaultField;\n delete cloneRule.defaultField;\n }\n validator = new AsyncValidator(_defineProperty({}, name, [cloneRule]));\n messages = merge(defaultValidateMessages, options.validateMessages);\n validator.messages(messages);\n result = [];\n _context2.prev = 10;\n _context2.next = 13;\n return Promise.resolve(validator.validate(_defineProperty({}, name, value), _objectSpread({}, options)));\n case 13:\n _context2.next = 18;\n break;\n case 15:\n _context2.prev = 15;\n _context2.t0 = _context2[\"catch\"](10);\n if (_context2.t0.errors) {\n result = _context2.t0.errors.map(function (_ref4, index) {\n var message = _ref4.message;\n var mergedMessage = message === CODE_LOGIC_ERROR ? messages.default : message;\n return /*#__PURE__*/React.isValidElement(mergedMessage) ?\n /*#__PURE__*/\n // Wrap ReactNode with `key`\n React.cloneElement(mergedMessage, {\n key: \"error_\".concat(index)\n }) : mergedMessage;\n });\n }\n case 18:\n if (!(!result.length && subRuleField)) {\n _context2.next = 23;\n break;\n }\n _context2.next = 21;\n return Promise.all(value.map(function (subValue, i) {\n return validateRule(\"\".concat(name, \".\").concat(i), subValue, subRuleField, options, messageVariables);\n }));\n case 21:\n subResults = _context2.sent;\n return _context2.abrupt(\"return\", subResults.reduce(function (prev, errors) {\n return [].concat(_toConsumableArray(prev), _toConsumableArray(errors));\n }, []));\n case 23:\n // Replace message with variables\n kv = _objectSpread(_objectSpread({}, rule), {}, {\n name: name,\n enum: (rule.enum || []).join(', ')\n }, messageVariables);\n fillVariableResult = result.map(function (error) {\n if (typeof error === 'string') {\n return replaceMessage(error, kv);\n }\n return error;\n });\n return _context2.abrupt(\"return\", fillVariableResult);\n case 26:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[10, 15]]);\n }));\n return _validateRule.apply(this, arguments);\n}\nexport function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {\n var name = namePath.join('.');\n\n // Fill rule with context\n var filledRules = rules.map(function (currentRule, ruleIndex) {\n var originValidatorFunc = currentRule.validator;\n var cloneRule = _objectSpread(_objectSpread({}, currentRule), {}, {\n ruleIndex: ruleIndex\n });\n\n // Replace validator if needed\n if (originValidatorFunc) {\n cloneRule.validator = function (rule, val, callback) {\n var hasPromise = false;\n\n // Wrap callback only accept when promise not provided\n var wrappedCallback = function wrappedCallback() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // Wait a tick to make sure return type is a promise\n Promise.resolve().then(function () {\n warning(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');\n if (!hasPromise) {\n callback.apply(void 0, args);\n }\n });\n };\n\n // Get promise\n var promise = originValidatorFunc(rule, val, wrappedCallback);\n hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';\n\n /**\n * 1. Use promise as the first priority.\n * 2. If promise not exist, use callback with warning instead\n */\n warning(hasPromise, '`callback` is deprecated. Please return a promise instead.');\n if (hasPromise) {\n promise.then(function () {\n callback();\n }).catch(function (err) {\n callback(err || ' ');\n });\n }\n };\n }\n return cloneRule;\n }).sort(function (_ref, _ref2) {\n var w1 = _ref.warningOnly,\n i1 = _ref.ruleIndex;\n var w2 = _ref2.warningOnly,\n i2 = _ref2.ruleIndex;\n if (!!w1 === !!w2) {\n // Let keep origin order\n return i1 - i2;\n }\n if (w1) {\n return 1;\n }\n return -1;\n });\n\n // Do validate rules\n var summaryPromise;\n if (validateFirst === true) {\n // >>>>> Validate by serialization\n summaryPromise = new Promise( /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {\n var i, rule, errors;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n i = 0;\n case 1:\n if (!(i < filledRules.length)) {\n _context.next = 12;\n break;\n }\n rule = filledRules[i];\n _context.next = 5;\n return validateRule(name, value, rule, options, messageVariables);\n case 5:\n errors = _context.sent;\n if (!errors.length) {\n _context.next = 9;\n break;\n }\n reject([{\n errors: errors,\n rule: rule\n }]);\n return _context.abrupt(\"return\");\n case 9:\n i += 1;\n _context.next = 1;\n break;\n case 12:\n /* eslint-enable */\n\n resolve([]);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x6, _x7) {\n return _ref3.apply(this, arguments);\n };\n }());\n } else {\n // >>>>> Validate by parallel\n var rulePromises = filledRules.map(function (rule) {\n return validateRule(name, value, rule, options, messageVariables).then(function (errors) {\n return {\n errors: errors,\n rule: rule\n };\n });\n });\n summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) {\n // Always change to rejection for Field to catch\n return Promise.reject(errors);\n });\n }\n\n // Internal catch error to avoid console error log.\n summaryPromise.catch(function (e) {\n return e;\n });\n return summaryPromise;\n}\nfunction finishOnAllFailed(_x8) {\n return _finishOnAllFailed.apply(this, arguments);\n}\nfunction _finishOnAllFailed() {\n _finishOnAllFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(rulePromises) {\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt(\"return\", Promise.all(rulePromises).then(function (errorsList) {\n var _ref5;\n var errors = (_ref5 = []).concat.apply(_ref5, _toConsumableArray(errorsList));\n return errors;\n }));\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _finishOnAllFailed.apply(this, arguments);\n}\nfunction finishOnFirstFailed(_x9) {\n return _finishOnFirstFailed.apply(this, arguments);\n}\nfunction _finishOnFirstFailed() {\n _finishOnFirstFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(rulePromises) {\n var count;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n count = 0;\n return _context4.abrupt(\"return\", new Promise(function (resolve) {\n rulePromises.forEach(function (promise) {\n promise.then(function (ruleError) {\n if (ruleError.errors.length) {\n resolve([ruleError]);\n }\n count += 1;\n if (count === rulePromises.length) {\n resolve([]);\n }\n });\n });\n }));\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return _finishOnFirstFailed.apply(this, arguments);\n}","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport getValue from \"rc-util/es/utils/get\";\nimport setValue from \"rc-util/es/utils/set\";\nimport { toArray } from \"./typeUtil\";\nexport { getValue, setValue };\n\n/**\n * Convert name to internal supported format.\n * This function should keep since we still thinking if need support like `a.b.c` format.\n * 'a' => ['a']\n * 123 => [123]\n * ['a', 123] => ['a', 123]\n */\nexport function getNamePath(path) {\n return toArray(path);\n}\nexport function cloneByNamePathList(store, namePathList) {\n var newStore = {};\n namePathList.forEach(function (namePath) {\n var value = getValue(store, namePath);\n newStore = setValue(newStore, namePath, value);\n });\n return newStore;\n}\n\n/**\n * Check if `namePathList` includes `namePath`.\n * @param namePathList A list of `InternalNamePath[]`\n * @param namePath Compare `InternalNamePath`\n * @param partialMatch True will make `[a, b]` match `[a, b, c]`\n */\nexport function containsNamePath(namePathList, namePath) {\n var partialMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return namePathList && namePathList.some(function (path) {\n return matchNamePath(namePath, path, partialMatch);\n });\n}\n\n/**\n * Check if `namePath` is super set or equal of `subNamePath`.\n * @param namePath A list of `InternalNamePath[]`\n * @param subNamePath Compare `InternalNamePath`\n * @param partialMatch True will make `[a, b]` match `[a, b, c]`\n */\nexport function matchNamePath(namePath, subNamePath) {\n var partialMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n if (!namePath || !subNamePath) {\n return false;\n }\n if (!partialMatch && namePath.length !== subNamePath.length) {\n return false;\n }\n return subNamePath.every(function (nameUnit, i) {\n return namePath[i] === nameUnit;\n });\n}\n\n// Like `shallowEqual`, but we not check the data which may cause re-render\n\nexport function isSimilar(source, target) {\n if (source === target) {\n return true;\n }\n if (!source && target || source && !target) {\n return false;\n }\n if (!source || !target || _typeof(source) !== 'object' || _typeof(target) !== 'object') {\n return false;\n }\n var sourceKeys = Object.keys(source);\n var targetKeys = Object.keys(target);\n var keys = new Set([].concat(sourceKeys, targetKeys));\n return _toConsumableArray(keys).every(function (key) {\n var sourceValue = source[key];\n var targetValue = target[key];\n if (typeof sourceValue === 'function' && typeof targetValue === 'function') {\n return true;\n }\n return sourceValue === targetValue;\n });\n}\nexport function defaultGetValueFromEvent(valuePropName) {\n var event = arguments.length <= 1 ? undefined : arguments[1];\n if (event && event.target && _typeof(event.target) === 'object' && valuePropName in event.target) {\n return event.target[valuePropName];\n }\n return event;\n}\n\n/**\n * Moves an array item from one position in an array to another.\n *\n * Note: This is a pure function so a new array will be returned, instead\n * of altering the array argument.\n *\n * @param array Array in which to move an item. (required)\n * @param moveIndex The index of the item to move. (required)\n * @param toIndex The index to move item at moveIndex to. (required)\n */\nexport function move(array, moveIndex, toIndex) {\n var length = array.length;\n if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {\n return array;\n }\n var item = array[moveIndex];\n var diff = moveIndex - toIndex;\n if (diff > 0) {\n // move left\n return [].concat(_toConsumableArray(array.slice(0, toIndex)), [item], _toConsumableArray(array.slice(toIndex, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, length)));\n }\n if (diff < 0) {\n // move right\n return [].concat(_toConsumableArray(array.slice(0, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, toIndex + 1)), [item], _toConsumableArray(array.slice(toIndex + 1, length)));\n }\n return array;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _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\";\nvar _excluded = [\"name\"];\nimport toChildrenArray from \"rc-util/es/Children/toArray\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport FieldContext, { HOOK_MARK } from \"./FieldContext\";\nimport ListContext from \"./ListContext\";\nimport { toArray } from \"./utils/typeUtil\";\nimport { validateRules } from \"./utils/validateUtil\";\nimport { containsNamePath, defaultGetValueFromEvent, getNamePath, getValue } from \"./utils/valueUtil\";\nvar EMPTY_ERRORS = [];\nfunction requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {\n if (typeof shouldUpdate === 'function') {\n return shouldUpdate(prev, next, 'source' in info ? {\n source: info.source\n } : {});\n }\n return prevValue !== nextValue;\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style\n// We use Class instead of Hooks here since it will cost much code by using Hooks.\nvar Field = /*#__PURE__*/function (_React$Component) {\n _inherits(Field, _React$Component);\n var _super = _createSuper(Field);\n // ============================== Subscriptions ==============================\n function Field(props) {\n var _this;\n _classCallCheck(this, Field);\n _this = _super.call(this, props);\n\n // Register on init\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n resetCount: 0\n });\n _defineProperty(_assertThisInitialized(_this), \"cancelRegisterFunc\", null);\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n /**\n * Follow state should not management in State since it will async update by React.\n * This makes first render of form can not get correct state value.\n */\n _defineProperty(_assertThisInitialized(_this), \"touched\", false);\n /**\n * Mark when touched & validated. Currently only used for `dependencies`.\n * Note that we do not think field with `initialValue` is dirty\n * but this will be by `isFieldDirty` func.\n */\n _defineProperty(_assertThisInitialized(_this), \"dirty\", false);\n _defineProperty(_assertThisInitialized(_this), \"validatePromise\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"prevValidating\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"errors\", EMPTY_ERRORS);\n _defineProperty(_assertThisInitialized(_this), \"warnings\", EMPTY_ERRORS);\n _defineProperty(_assertThisInitialized(_this), \"cancelRegister\", function () {\n var _this$props = _this.props,\n preserve = _this$props.preserve,\n isListField = _this$props.isListField,\n name = _this$props.name;\n if (_this.cancelRegisterFunc) {\n _this.cancelRegisterFunc(isListField, preserve, getNamePath(name));\n }\n _this.cancelRegisterFunc = null;\n });\n // ================================== Utils ==================================\n _defineProperty(_assertThisInitialized(_this), \"getNamePath\", function () {\n var _this$props2 = _this.props,\n name = _this$props2.name,\n fieldContext = _this$props2.fieldContext;\n var _fieldContext$prefixN = fieldContext.prefixName,\n prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;\n return name !== undefined ? [].concat(_toConsumableArray(prefixName), _toConsumableArray(name)) : [];\n });\n _defineProperty(_assertThisInitialized(_this), \"getRules\", function () {\n var _this$props3 = _this.props,\n _this$props3$rules = _this$props3.rules,\n rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,\n fieldContext = _this$props3.fieldContext;\n return rules.map(function (rule) {\n if (typeof rule === 'function') {\n return rule(fieldContext);\n }\n return rule;\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"refresh\", function () {\n if (!_this.mounted) return;\n\n /**\n * Clean up current node.\n */\n _this.setState(function (_ref) {\n var resetCount = _ref.resetCount;\n return {\n resetCount: resetCount + 1\n };\n });\n });\n // Event should only trigger when meta changed\n _defineProperty(_assertThisInitialized(_this), \"metaCache\", null);\n _defineProperty(_assertThisInitialized(_this), \"triggerMetaEvent\", function (destroy) {\n var onMetaChange = _this.props.onMetaChange;\n if (onMetaChange) {\n var _meta = _objectSpread(_objectSpread({}, _this.getMeta()), {}, {\n destroy: destroy\n });\n if (!isEqual(_this.metaCache, _meta)) {\n onMetaChange(_meta);\n }\n _this.metaCache = _meta;\n } else {\n _this.metaCache = null;\n }\n });\n // ========================= Field Entity Interfaces =========================\n // Trigger by store update. Check if need update the component\n _defineProperty(_assertThisInitialized(_this), \"onStoreChange\", function (prevStore, namePathList, info) {\n var _this$props4 = _this.props,\n shouldUpdate = _this$props4.shouldUpdate,\n _this$props4$dependen = _this$props4.dependencies,\n dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,\n onReset = _this$props4.onReset;\n var store = info.store;\n var namePath = _this.getNamePath();\n var prevValue = _this.getValue(prevStore);\n var curValue = _this.getValue(store);\n var namePathMatch = namePathList && containsNamePath(namePathList, namePath);\n\n // `setFieldsValue` is a quick access to update related status\n if (info.type === 'valueUpdate' && info.source === 'external' && !isEqual(prevValue, curValue)) {\n _this.touched = true;\n _this.dirty = true;\n _this.validatePromise = null;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n }\n switch (info.type) {\n case 'reset':\n if (!namePathList || namePathMatch) {\n // Clean up state\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = undefined;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n onReset === null || onReset === void 0 || onReset();\n _this.refresh();\n return;\n }\n break;\n\n /**\n * In case field with `preserve = false` nest deps like:\n * - A = 1 => show B\n * - B = 1 => show C\n * - Reset A, need clean B, C\n */\n case 'remove':\n {\n if (shouldUpdate && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'setField':\n {\n var data = info.data;\n if (namePathMatch) {\n if ('touched' in data) {\n _this.touched = data.touched;\n }\n if ('validating' in data && !('originRCField' in data)) {\n _this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n if ('errors' in data) {\n _this.errors = data.errors || EMPTY_ERRORS;\n }\n if ('warnings' in data) {\n _this.warnings = data.warnings || EMPTY_ERRORS;\n }\n _this.dirty = true;\n _this.triggerMetaEvent();\n _this.reRender();\n return;\n } else if ('value' in data && containsNamePath(namePathList, namePath, true)) {\n // Contains path with value should also check\n _this.reRender();\n return;\n }\n\n // Handle update by `setField` with `shouldUpdate`\n if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'dependenciesUpdate':\n {\n /**\n * Trigger when marked `dependencies` updated. Related fields will all update\n */\n var dependencyList = dependencies.map(getNamePath);\n // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be\n // emitted earlier and they will work there\n // If set it may cause unnecessary twice rerendering\n if (dependencyList.some(function (dependency) {\n return containsNamePath(info.relatedFields, dependency);\n })) {\n _this.reRender();\n return;\n }\n break;\n }\n default:\n // 1. If `namePath` exists in `namePathList`, means it's related value and should update\n // For example
\n // If `namePathList` is [['list']] (List value update), Field should be updated\n // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated\n // 2.\n // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,\n // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`\n // is not provided\n // 2.2 If `shouldUpdate` provided, use customize logic to update the field\n // else to check if value changed\n if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n if (shouldUpdate === true) {\n _this.reRender();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"validateRules\", function (options) {\n // We should fixed namePath & value to avoid developer change then by form function\n var namePath = _this.getNamePath();\n var currentValue = _this.getValue();\n var _ref2 = options || {},\n triggerName = _ref2.triggerName,\n _ref2$validateOnly = _ref2.validateOnly,\n validateOnly = _ref2$validateOnly === void 0 ? false : _ref2$validateOnly;\n\n // Force change to async to avoid rule OOD under renderProps field\n var rootPromise = Promise.resolve().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {\n var _this$props5, _this$props5$validate, validateFirst, messageVariables, validateDebounce, filteredRules, promise;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (_this.mounted) {\n _context.next = 2;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 2:\n _this$props5 = _this.props, _this$props5$validate = _this$props5.validateFirst, validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate, messageVariables = _this$props5.messageVariables, validateDebounce = _this$props5.validateDebounce; // Start validate\n filteredRules = _this.getRules();\n if (triggerName) {\n filteredRules = filteredRules.filter(function (rule) {\n return rule;\n }).filter(function (rule) {\n var validateTrigger = rule.validateTrigger;\n if (!validateTrigger) {\n return true;\n }\n var triggerList = toArray(validateTrigger);\n return triggerList.includes(triggerName);\n });\n }\n\n // Wait for debounce. Skip if no `triggerName` since its from `validateFields / submit`\n if (!(validateDebounce && triggerName)) {\n _context.next = 10;\n break;\n }\n _context.next = 8;\n return new Promise(function (resolve) {\n setTimeout(resolve, validateDebounce);\n });\n case 8:\n if (!(_this.validatePromise !== rootPromise)) {\n _context.next = 10;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 10:\n promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);\n promise.catch(function (e) {\n return e;\n }).then(function () {\n var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;\n if (_this.validatePromise === rootPromise) {\n var _ruleErrors$forEach;\n _this.validatePromise = null;\n\n // Get errors & warnings\n var nextErrors = [];\n var nextWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 || _ruleErrors$forEach.call(ruleErrors, function (_ref4) {\n var warningOnly = _ref4.rule.warningOnly,\n _ref4$errors = _ref4.errors,\n errors = _ref4$errors === void 0 ? EMPTY_ERRORS : _ref4$errors;\n if (warningOnly) {\n nextWarnings.push.apply(nextWarnings, _toConsumableArray(errors));\n } else {\n nextErrors.push.apply(nextErrors, _toConsumableArray(errors));\n }\n });\n _this.errors = nextErrors;\n _this.warnings = nextWarnings;\n _this.triggerMetaEvent();\n _this.reRender();\n }\n });\n return _context.abrupt(\"return\", promise);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n })));\n if (validateOnly) {\n return rootPromise;\n }\n _this.validatePromise = rootPromise;\n _this.dirty = true;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n\n // Force trigger re-render since we need sync renderProps with new meta\n _this.reRender();\n return rootPromise;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldValidating\", function () {\n return !!_this.validatePromise;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldTouched\", function () {\n return _this.touched;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldDirty\", function () {\n // Touched or validate or has initialValue\n if (_this.dirty || _this.props.initialValue !== undefined) {\n return true;\n }\n\n // Form set initialValue\n var fieldContext = _this.props.fieldContext;\n var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),\n getInitialValue = _fieldContext$getInte.getInitialValue;\n if (getInitialValue(_this.getNamePath()) !== undefined) {\n return true;\n }\n return false;\n });\n _defineProperty(_assertThisInitialized(_this), \"getErrors\", function () {\n return _this.errors;\n });\n _defineProperty(_assertThisInitialized(_this), \"getWarnings\", function () {\n return _this.warnings;\n });\n _defineProperty(_assertThisInitialized(_this), \"isListField\", function () {\n return _this.props.isListField;\n });\n _defineProperty(_assertThisInitialized(_this), \"isList\", function () {\n return _this.props.isList;\n });\n _defineProperty(_assertThisInitialized(_this), \"isPreserve\", function () {\n return _this.props.preserve;\n });\n // ============================= Child Component =============================\n _defineProperty(_assertThisInitialized(_this), \"getMeta\", function () {\n // Make error & validating in cache to save perf\n _this.prevValidating = _this.isFieldValidating();\n var meta = {\n touched: _this.isFieldTouched(),\n validating: _this.prevValidating,\n errors: _this.errors,\n warnings: _this.warnings,\n name: _this.getNamePath(),\n validated: _this.validatePromise === null\n };\n return meta;\n });\n // Only return validate child node. If invalidate, will do nothing about field.\n _defineProperty(_assertThisInitialized(_this), \"getOnlyChild\", function (children) {\n // Support render props\n if (typeof children === 'function') {\n var _meta2 = _this.getMeta();\n return _objectSpread(_objectSpread({}, _this.getOnlyChild(children(_this.getControlled(), _meta2, _this.props.fieldContext))), {}, {\n isFunction: true\n });\n }\n\n // Filed element only\n var childList = toChildrenArray(children);\n if (childList.length !== 1 || ! /*#__PURE__*/React.isValidElement(childList[0])) {\n return {\n child: childList,\n isFunction: false\n };\n }\n return {\n child: childList[0],\n isFunction: false\n };\n });\n // ============================== Field Control ==============================\n _defineProperty(_assertThisInitialized(_this), \"getValue\", function (store) {\n var getFieldsValue = _this.props.fieldContext.getFieldsValue;\n var namePath = _this.getNamePath();\n return getValue(store || getFieldsValue(true), namePath);\n });\n _defineProperty(_assertThisInitialized(_this), \"getControlled\", function () {\n var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _this$props6 = _this.props,\n name = _this$props6.name,\n trigger = _this$props6.trigger,\n validateTrigger = _this$props6.validateTrigger,\n getValueFromEvent = _this$props6.getValueFromEvent,\n normalize = _this$props6.normalize,\n valuePropName = _this$props6.valuePropName,\n getValueProps = _this$props6.getValueProps,\n fieldContext = _this$props6.fieldContext;\n var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n var namePath = _this.getNamePath();\n var getInternalHooks = fieldContext.getInternalHooks,\n getFieldsValue = fieldContext.getFieldsValue;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n dispatch = _getInternalHooks.dispatch;\n var value = _this.getValue();\n var mergedGetValueProps = getValueProps || function (val) {\n return _defineProperty({}, valuePropName, val);\n };\n var originTriggerFunc = childProps[trigger];\n var valueProps = name !== undefined ? mergedGetValueProps(value) : {};\n\n // warning when prop value is function\n if (process.env.NODE_ENV !== 'production' && valueProps) {\n Object.keys(valueProps).forEach(function (key) {\n warning(typeof valueProps[key] !== 'function', \"It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: \".concat(key, \")\"));\n });\n }\n var control = _objectSpread(_objectSpread({}, childProps), valueProps);\n\n // Add trigger\n control[trigger] = function () {\n // Mark as touched\n _this.touched = true;\n _this.dirty = true;\n _this.triggerMetaEvent();\n var newValue;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (getValueFromEvent) {\n newValue = getValueFromEvent.apply(void 0, args);\n } else {\n newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));\n }\n if (normalize) {\n newValue = normalize(newValue, value, getFieldsValue(true));\n }\n dispatch({\n type: 'updateValue',\n namePath: namePath,\n value: newValue\n });\n if (originTriggerFunc) {\n originTriggerFunc.apply(void 0, args);\n }\n };\n\n // Add validateTrigger\n var validateTriggerList = toArray(mergedValidateTrigger || []);\n validateTriggerList.forEach(function (triggerName) {\n // Wrap additional function of component, so that we can get latest value from store\n var originTrigger = control[triggerName];\n control[triggerName] = function () {\n if (originTrigger) {\n originTrigger.apply(void 0, arguments);\n }\n\n // Always use latest rules\n var rules = _this.props.rules;\n if (rules && rules.length) {\n // We dispatch validate to root,\n // since it will update related data with other field with same name\n dispatch({\n type: 'validateField',\n namePath: namePath,\n triggerName: triggerName\n });\n }\n };\n });\n return control;\n });\n if (props.fieldContext) {\n var getInternalHooks = props.fieldContext.getInternalHooks;\n var _getInternalHooks2 = getInternalHooks(HOOK_MARK),\n initEntityValue = _getInternalHooks2.initEntityValue;\n initEntityValue(_assertThisInitialized(_this));\n }\n return _this;\n }\n _createClass(Field, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props7 = this.props,\n shouldUpdate = _this$props7.shouldUpdate,\n fieldContext = _this$props7.fieldContext;\n this.mounted = true;\n\n // Register on init\n if (fieldContext) {\n var getInternalHooks = fieldContext.getInternalHooks;\n var _getInternalHooks3 = getInternalHooks(HOOK_MARK),\n registerField = _getInternalHooks3.registerField;\n this.cancelRegisterFunc = registerField(this);\n }\n\n // One more render for component in case fields not ready\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRegister();\n this.triggerMetaEvent(true);\n this.mounted = false;\n }\n }, {\n key: \"reRender\",\n value: function reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n var resetCount = this.state.resetCount;\n var children = this.props.children;\n var _this$getOnlyChild = this.getOnlyChild(children),\n child = _this$getOnlyChild.child,\n isFunction = _this$getOnlyChild.isFunction;\n\n // Not need to `cloneElement` since user can handle this in render function self\n var returnChildNode;\n if (isFunction) {\n returnChildNode = child;\n } else if ( /*#__PURE__*/React.isValidElement(child)) {\n returnChildNode = /*#__PURE__*/React.cloneElement(child, this.getControlled(child.props));\n } else {\n warning(!child, '`children` of Field is not validate ReactElement.');\n returnChildNode = child;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: resetCount\n }, returnChildNode);\n }\n }]);\n return Field;\n}(React.Component);\n_defineProperty(Field, \"contextType\", FieldContext);\n_defineProperty(Field, \"defaultProps\", {\n trigger: 'onChange',\n valuePropName: 'value'\n});\nfunction WrapperField(_ref6) {\n var name = _ref6.name,\n restProps = _objectWithoutProperties(_ref6, _excluded);\n var fieldContext = React.useContext(FieldContext);\n var listContext = React.useContext(ListContext);\n var namePath = name !== undefined ? getNamePath(name) : undefined;\n var key = 'keep';\n if (!restProps.isListField) {\n key = \"_\".concat((namePath || []).join('_'));\n }\n\n // Warning if it's a directly list field.\n // We can still support multiple level field preserve.\n if (process.env.NODE_ENV !== 'production' && restProps.preserve === false && restProps.isListField && namePath.length <= 1) {\n warning(false, '`preserve` should not apply on Form.List fields.');\n }\n return /*#__PURE__*/React.createElement(Field, _extends({\n key: key,\n name: namePath,\n isListField: !!listContext\n }, restProps, {\n fieldContext: fieldContext\n }));\n}\nexport default WrapperField;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport FieldContext from \"./FieldContext\";\nimport Field from \"./Field\";\nimport { move as _move, getNamePath } from \"./utils/valueUtil\";\nimport ListContext from \"./ListContext\";\nfunction List(_ref) {\n var name = _ref.name,\n initialValue = _ref.initialValue,\n children = _ref.children,\n rules = _ref.rules,\n validateTrigger = _ref.validateTrigger,\n isListField = _ref.isListField;\n var context = React.useContext(FieldContext);\n var wrapperListContext = React.useContext(ListContext);\n var keyRef = React.useRef({\n keys: [],\n id: 0\n });\n var keyManager = keyRef.current;\n var prefixName = React.useMemo(function () {\n var parentPrefixName = getNamePath(context.prefixName) || [];\n return [].concat(_toConsumableArray(parentPrefixName), _toConsumableArray(getNamePath(name)));\n }, [context.prefixName, name]);\n var fieldContext = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, context), {}, {\n prefixName: prefixName\n });\n }, [context, prefixName]);\n\n // List context\n var listContext = React.useMemo(function () {\n return {\n getKey: function getKey(namePath) {\n var len = prefixName.length;\n var pathName = namePath[len];\n return [keyManager.keys[pathName], namePath.slice(len + 1)];\n }\n };\n }, [prefixName]);\n\n // User should not pass `children` as other type.\n if (typeof children !== 'function') {\n warning(false, 'Form.List only accepts function as children.');\n return null;\n }\n var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) {\n var source = _ref2.source;\n if (source === 'internal') {\n return false;\n }\n return prevValue !== nextValue;\n };\n return /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: listContext\n }, /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: fieldContext\n }, /*#__PURE__*/React.createElement(Field, {\n name: [],\n shouldUpdate: shouldUpdate,\n rules: rules,\n validateTrigger: validateTrigger,\n initialValue: initialValue,\n isList: true,\n isListField: isListField !== null && isListField !== void 0 ? isListField : !!wrapperListContext\n }, function (_ref3, meta) {\n var _ref3$value = _ref3.value,\n value = _ref3$value === void 0 ? [] : _ref3$value,\n onChange = _ref3.onChange;\n var getFieldValue = context.getFieldValue;\n var getNewValue = function getNewValue() {\n var values = getFieldValue(prefixName || []);\n return values || [];\n };\n /**\n * Always get latest value in case user update fields by `form` api.\n */\n var operations = {\n add: function add(defaultValue, index) {\n // Mapping keys\n var newValue = getNewValue();\n if (index >= 0 && index <= newValue.length) {\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys.slice(0, index)), [keyManager.id], _toConsumableArray(keyManager.keys.slice(index)));\n onChange([].concat(_toConsumableArray(newValue.slice(0, index)), [defaultValue], _toConsumableArray(newValue.slice(index))));\n } else {\n if (process.env.NODE_ENV !== 'production' && (index < 0 || index > newValue.length)) {\n warning(false, 'The second parameter of the add function should be a valid positive number.');\n }\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys), [keyManager.id]);\n onChange([].concat(_toConsumableArray(newValue), [defaultValue]));\n }\n keyManager.id += 1;\n },\n remove: function remove(index) {\n var newValue = getNewValue();\n var indexSet = new Set(Array.isArray(index) ? index : [index]);\n if (indexSet.size <= 0) {\n return;\n }\n keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {\n return !indexSet.has(keysIndex);\n });\n\n // Trigger store change\n onChange(newValue.filter(function (_, valueIndex) {\n return !indexSet.has(valueIndex);\n }));\n },\n move: function move(from, to) {\n if (from === to) {\n return;\n }\n var newValue = getNewValue();\n\n // Do not handle out of range\n if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {\n return;\n }\n keyManager.keys = _move(keyManager.keys, from, to);\n\n // Trigger store change\n onChange(_move(newValue, from, to));\n }\n };\n var listValue = value || [];\n if (!Array.isArray(listValue)) {\n listValue = [];\n if (process.env.NODE_ENV !== 'production') {\n warning(false, \"Current value of '\".concat(prefixName.join(' > '), \"' is not an array type.\"));\n }\n }\n return children(listValue.map(function (__, index) {\n var key = keyManager.keys[index];\n if (key === undefined) {\n keyManager.keys[index] = keyManager.id;\n key = keyManager.keys[index];\n keyManager.id += 1;\n }\n return {\n name: index,\n key: key,\n isListField: true\n };\n }), operations, meta);\n })));\n}\nexport default List;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar SPLIT = '__@field_split__';\n\n/**\n * Convert name path into string to fast the fetch speed of Map.\n */\nfunction normalize(namePath) {\n return namePath.map(function (cell) {\n return \"\".concat(_typeof(cell), \":\").concat(cell);\n })\n // Magic split\n .join(SPLIT);\n}\n\n/**\n * NameMap like a `Map` but accepts `string[]` as key.\n */\nvar NameMap = /*#__PURE__*/function () {\n function NameMap() {\n _classCallCheck(this, NameMap);\n _defineProperty(this, \"kvs\", new Map());\n }\n _createClass(NameMap, [{\n key: \"set\",\n value: function set(key, value) {\n this.kvs.set(normalize(key), value);\n }\n }, {\n key: \"get\",\n value: function get(key) {\n return this.kvs.get(normalize(key));\n }\n }, {\n key: \"update\",\n value: function update(key, updater) {\n var origin = this.get(key);\n var next = updater(origin);\n if (!next) {\n this.delete(key);\n } else {\n this.set(key, next);\n }\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n this.kvs.delete(normalize(key));\n }\n\n // Since we only use this in test, let simply realize this\n }, {\n key: \"map\",\n value: function map(callback) {\n return _toConsumableArray(this.kvs.entries()).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n var cells = key.split(SPLIT);\n return callback({\n key: cells.map(function (cell) {\n var _cell$match = cell.match(/^([^:]*):(.*)$/),\n _cell$match2 = _slicedToArray(_cell$match, 3),\n type = _cell$match2[1],\n unit = _cell$match2[2];\n return type === 'number' ? Number(unit) : unit;\n }),\n value: value\n });\n });\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var json = {};\n this.map(function (_ref3) {\n var key = _ref3.key,\n value = _ref3.value;\n json[key.join('.')] = value;\n return null;\n });\n return json;\n }\n }]);\n return NameMap;\n}();\nexport default NameMap;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"name\"];\nimport { merge } from \"rc-util/es/utils/set\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport { HOOK_MARK } from \"./FieldContext\";\nimport { allPromiseFinish } from \"./utils/asyncUtil\";\nimport { defaultValidateMessages } from \"./utils/messages\";\nimport NameMap from \"./utils/NameMap\";\nimport { cloneByNamePathList, containsNamePath, getNamePath, getValue, matchNamePath, setValue } from \"./utils/valueUtil\";\nexport var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {\n var _this = this;\n _classCallCheck(this, FormStore);\n _defineProperty(this, \"formHooked\", false);\n _defineProperty(this, \"forceRootUpdate\", void 0);\n _defineProperty(this, \"subscribable\", true);\n _defineProperty(this, \"store\", {});\n _defineProperty(this, \"fieldEntities\", []);\n _defineProperty(this, \"initialValues\", {});\n _defineProperty(this, \"callbacks\", {});\n _defineProperty(this, \"validateMessages\", null);\n _defineProperty(this, \"preserve\", null);\n _defineProperty(this, \"lastValidatePromise\", null);\n _defineProperty(this, \"getForm\", function () {\n return {\n getFieldValue: _this.getFieldValue,\n getFieldsValue: _this.getFieldsValue,\n getFieldError: _this.getFieldError,\n getFieldWarning: _this.getFieldWarning,\n getFieldsError: _this.getFieldsError,\n isFieldsTouched: _this.isFieldsTouched,\n isFieldTouched: _this.isFieldTouched,\n isFieldValidating: _this.isFieldValidating,\n isFieldsValidating: _this.isFieldsValidating,\n resetFields: _this.resetFields,\n setFields: _this.setFields,\n setFieldValue: _this.setFieldValue,\n setFieldsValue: _this.setFieldsValue,\n validateFields: _this.validateFields,\n submit: _this.submit,\n _init: true,\n getInternalHooks: _this.getInternalHooks\n };\n });\n // ======================== Internal Hooks ========================\n _defineProperty(this, \"getInternalHooks\", function (key) {\n if (key === HOOK_MARK) {\n _this.formHooked = true;\n return {\n dispatch: _this.dispatch,\n initEntityValue: _this.initEntityValue,\n registerField: _this.registerField,\n useSubscribe: _this.useSubscribe,\n setInitialValues: _this.setInitialValues,\n destroyForm: _this.destroyForm,\n setCallbacks: _this.setCallbacks,\n setValidateMessages: _this.setValidateMessages,\n getFields: _this.getFields,\n setPreserve: _this.setPreserve,\n getInitialValue: _this.getInitialValue,\n registerWatch: _this.registerWatch\n };\n }\n warning(false, '`getInternalHooks` is internal usage. Should not call directly.');\n return null;\n });\n _defineProperty(this, \"useSubscribe\", function (subscribable) {\n _this.subscribable = subscribable;\n });\n /**\n * Record prev Form unmount fieldEntities which config preserve false.\n * This need to be refill with initialValues instead of store value.\n */\n _defineProperty(this, \"prevWithoutPreserves\", null);\n /**\n * First time `setInitialValues` should update store with initial value\n */\n _defineProperty(this, \"setInitialValues\", function (initialValues, init) {\n _this.initialValues = initialValues || {};\n if (init) {\n var _this$prevWithoutPres;\n var nextStore = merge(initialValues, _this.store);\n\n // We will take consider prev form unmount fields.\n // When the field is not `preserve`, we need fill this with initialValues instead of store.\n // eslint-disable-next-line array-callback-return\n (_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 || _this$prevWithoutPres.map(function (_ref) {\n var namePath = _ref.key;\n nextStore = setValue(nextStore, namePath, getValue(initialValues, namePath));\n });\n _this.prevWithoutPreserves = null;\n _this.updateStore(nextStore);\n }\n });\n _defineProperty(this, \"destroyForm\", function (clearOnDestroy) {\n if (clearOnDestroy) {\n // destroy form reset store\n _this.updateStore({});\n } else {\n // Fill preserve fields\n var prevWithoutPreserves = new NameMap();\n _this.getFieldEntities(true).forEach(function (entity) {\n if (!_this.isMergedPreserve(entity.isPreserve())) {\n prevWithoutPreserves.set(entity.getNamePath(), true);\n }\n });\n _this.prevWithoutPreserves = prevWithoutPreserves;\n }\n });\n _defineProperty(this, \"getInitialValue\", function (namePath) {\n var initValue = getValue(_this.initialValues, namePath);\n\n // Not cloneDeep when without `namePath`\n return namePath.length ? merge(initValue) : initValue;\n });\n _defineProperty(this, \"setCallbacks\", function (callbacks) {\n _this.callbacks = callbacks;\n });\n _defineProperty(this, \"setValidateMessages\", function (validateMessages) {\n _this.validateMessages = validateMessages;\n });\n _defineProperty(this, \"setPreserve\", function (preserve) {\n _this.preserve = preserve;\n });\n // ============================= Watch ============================\n _defineProperty(this, \"watchList\", []);\n _defineProperty(this, \"registerWatch\", function (callback) {\n _this.watchList.push(callback);\n return function () {\n _this.watchList = _this.watchList.filter(function (fn) {\n return fn !== callback;\n });\n };\n });\n _defineProperty(this, \"notifyWatch\", function () {\n var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // No need to cost perf when nothing need to watch\n if (_this.watchList.length) {\n var values = _this.getFieldsValue();\n var allValues = _this.getFieldsValue(true);\n _this.watchList.forEach(function (callback) {\n callback(values, allValues, namePath);\n });\n }\n });\n // ========================== Dev Warning =========================\n _defineProperty(this, \"timeoutId\", null);\n _defineProperty(this, \"warningUnhooked\", function () {\n if (process.env.NODE_ENV !== 'production' && !_this.timeoutId && typeof window !== 'undefined') {\n _this.timeoutId = setTimeout(function () {\n _this.timeoutId = null;\n if (!_this.formHooked) {\n warning(false, 'Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?');\n }\n });\n }\n });\n // ============================ Store =============================\n _defineProperty(this, \"updateStore\", function (nextStore) {\n _this.store = nextStore;\n });\n // ============================ Fields ============================\n /**\n * Get registered field entities.\n * @param pure Only return field which has a `name`. Default: false\n */\n _defineProperty(this, \"getFieldEntities\", function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (!pure) {\n return _this.fieldEntities;\n }\n return _this.fieldEntities.filter(function (field) {\n return field.getNamePath().length;\n });\n });\n _defineProperty(this, \"getFieldsMap\", function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cache = new NameMap();\n _this.getFieldEntities(pure).forEach(function (field) {\n var namePath = field.getNamePath();\n cache.set(namePath, field);\n });\n return cache;\n });\n _defineProperty(this, \"getFieldEntitiesForNamePathList\", function (nameList) {\n if (!nameList) {\n return _this.getFieldEntities(true);\n }\n var cache = _this.getFieldsMap(true);\n return nameList.map(function (name) {\n var namePath = getNamePath(name);\n return cache.get(namePath) || {\n INVALIDATE_NAME_PATH: getNamePath(name)\n };\n });\n });\n _defineProperty(this, \"getFieldsValue\", function (nameList, filterFunc) {\n _this.warningUnhooked();\n\n // Fill args\n var mergedNameList;\n var mergedFilterFunc;\n var mergedStrict;\n if (nameList === true || Array.isArray(nameList)) {\n mergedNameList = nameList;\n mergedFilterFunc = filterFunc;\n } else if (nameList && _typeof(nameList) === 'object') {\n mergedStrict = nameList.strict;\n mergedFilterFunc = nameList.filter;\n }\n if (mergedNameList === true && !mergedFilterFunc) {\n return _this.store;\n }\n var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(mergedNameList) ? mergedNameList : null);\n var filteredNameList = [];\n fieldEntities.forEach(function (entity) {\n var _isListField, _ref3;\n var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();\n\n // Ignore when it's a list item and not specific the namePath,\n // since parent field is already take in count\n if (mergedStrict) {\n var _isList, _ref2;\n if ((_isList = (_ref2 = entity).isList) !== null && _isList !== void 0 && _isList.call(_ref2)) {\n return;\n }\n } else if (!mergedNameList && (_isListField = (_ref3 = entity).isListField) !== null && _isListField !== void 0 && _isListField.call(_ref3)) {\n return;\n }\n if (!mergedFilterFunc) {\n filteredNameList.push(namePath);\n } else {\n var meta = 'getMeta' in entity ? entity.getMeta() : null;\n if (mergedFilterFunc(meta)) {\n filteredNameList.push(namePath);\n }\n }\n });\n return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath));\n });\n _defineProperty(this, \"getFieldValue\", function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n return getValue(_this.store, namePath);\n });\n _defineProperty(this, \"getFieldsError\", function (nameList) {\n _this.warningUnhooked();\n var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList);\n return fieldEntities.map(function (entity, index) {\n if (entity && !('INVALIDATE_NAME_PATH' in entity)) {\n return {\n name: entity.getNamePath(),\n errors: entity.getErrors(),\n warnings: entity.getWarnings()\n };\n }\n return {\n name: getNamePath(nameList[index]),\n errors: [],\n warnings: []\n };\n });\n });\n _defineProperty(this, \"getFieldError\", function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n var fieldError = _this.getFieldsError([namePath])[0];\n return fieldError.errors;\n });\n _defineProperty(this, \"getFieldWarning\", function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n var fieldError = _this.getFieldsError([namePath])[0];\n return fieldError.warnings;\n });\n _defineProperty(this, \"isFieldsTouched\", function () {\n _this.warningUnhooked();\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var arg0 = args[0],\n arg1 = args[1];\n var namePathList;\n var isAllFieldsTouched = false;\n if (args.length === 0) {\n namePathList = null;\n } else if (args.length === 1) {\n if (Array.isArray(arg0)) {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = false;\n } else {\n namePathList = null;\n isAllFieldsTouched = arg0;\n }\n } else {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = arg1;\n }\n var fieldEntities = _this.getFieldEntities(true);\n var isFieldTouched = function isFieldTouched(field) {\n return field.isFieldTouched();\n };\n\n // ===== Will get fully compare when not config namePathList =====\n if (!namePathList) {\n return isAllFieldsTouched ? fieldEntities.every(function (entity) {\n return isFieldTouched(entity) || entity.isList();\n }) : fieldEntities.some(isFieldTouched);\n }\n\n // Generate a nest tree for validate\n var map = new NameMap();\n namePathList.forEach(function (shortNamePath) {\n map.set(shortNamePath, []);\n });\n fieldEntities.forEach(function (field) {\n var fieldNamePath = field.getNamePath();\n\n // Find matched entity and put into list\n namePathList.forEach(function (shortNamePath) {\n if (shortNamePath.every(function (nameUnit, i) {\n return fieldNamePath[i] === nameUnit;\n })) {\n map.update(shortNamePath, function (list) {\n return [].concat(_toConsumableArray(list), [field]);\n });\n }\n });\n });\n\n // Check if NameMap value is touched\n var isNamePathListTouched = function isNamePathListTouched(entities) {\n return entities.some(isFieldTouched);\n };\n var namePathListEntities = map.map(function (_ref4) {\n var value = _ref4.value;\n return value;\n });\n return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);\n });\n _defineProperty(this, \"isFieldTouched\", function (name) {\n _this.warningUnhooked();\n return _this.isFieldsTouched([name]);\n });\n _defineProperty(this, \"isFieldsValidating\", function (nameList) {\n _this.warningUnhooked();\n var fieldEntities = _this.getFieldEntities();\n if (!nameList) {\n return fieldEntities.some(function (testField) {\n return testField.isFieldValidating();\n });\n }\n var namePathList = nameList.map(getNamePath);\n return fieldEntities.some(function (testField) {\n var fieldNamePath = testField.getNamePath();\n return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();\n });\n });\n _defineProperty(this, \"isFieldValidating\", function (name) {\n _this.warningUnhooked();\n return _this.isFieldsValidating([name]);\n });\n /**\n * Reset Field with field `initialValue` prop.\n * Can pass `entities` or `namePathList` or just nothing.\n */\n _defineProperty(this, \"resetWithFieldInitialValue\", function () {\n var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Create cache\n var cache = new NameMap();\n var fieldEntities = _this.getFieldEntities(true);\n fieldEntities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n var namePath = field.getNamePath();\n\n // Record only if has `initialValue`\n if (initialValue !== undefined) {\n var records = cache.get(namePath) || new Set();\n records.add({\n entity: field,\n value: initialValue\n });\n cache.set(namePath, records);\n }\n });\n\n // Reset\n var resetWithFields = function resetWithFields(entities) {\n entities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n if (initialValue !== undefined) {\n var namePath = field.getNamePath();\n var formInitialValue = _this.getInitialValue(namePath);\n if (formInitialValue !== undefined) {\n // Warning if conflict with form initialValues and do not modify value\n warning(false, \"Form already set 'initialValues' with path '\".concat(namePath.join('.'), \"'. Field can not overwrite it.\"));\n } else {\n var records = cache.get(namePath);\n if (records && records.size > 1) {\n // Warning if multiple field set `initialValue`and do not modify value\n warning(false, \"Multiple Field with path '\".concat(namePath.join('.'), \"' set 'initialValue'. Can not decide which one to pick.\"));\n } else if (records) {\n var originValue = _this.getFieldValue(namePath);\n var isListField = field.isListField();\n\n // Set `initialValue`\n if (!isListField && (!info.skipExist || originValue === undefined)) {\n _this.updateStore(setValue(_this.store, namePath, _toConsumableArray(records)[0].value));\n }\n }\n }\n }\n });\n };\n var requiredFieldEntities;\n if (info.entities) {\n requiredFieldEntities = info.entities;\n } else if (info.namePathList) {\n requiredFieldEntities = [];\n info.namePathList.forEach(function (namePath) {\n var records = cache.get(namePath);\n if (records) {\n var _requiredFieldEntitie;\n (_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, _toConsumableArray(_toConsumableArray(records).map(function (r) {\n return r.entity;\n })));\n }\n });\n } else {\n requiredFieldEntities = fieldEntities;\n }\n resetWithFields(requiredFieldEntities);\n });\n _defineProperty(this, \"resetFields\", function (nameList) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n if (!nameList) {\n _this.updateStore(merge(_this.initialValues));\n _this.resetWithFieldInitialValue();\n _this.notifyObservers(prevStore, null, {\n type: 'reset'\n });\n _this.notifyWatch();\n return;\n }\n\n // Reset by `nameList`\n var namePathList = nameList.map(getNamePath);\n namePathList.forEach(function (namePath) {\n var initialValue = _this.getInitialValue(namePath);\n _this.updateStore(setValue(_this.store, namePath, initialValue));\n });\n _this.resetWithFieldInitialValue({\n namePathList: namePathList\n });\n _this.notifyObservers(prevStore, namePathList, {\n type: 'reset'\n });\n _this.notifyWatch(namePathList);\n });\n _defineProperty(this, \"setFields\", function (fields) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n var namePathList = [];\n fields.forEach(function (fieldData) {\n var name = fieldData.name,\n data = _objectWithoutProperties(fieldData, _excluded);\n var namePath = getNamePath(name);\n namePathList.push(namePath);\n\n // Value\n if ('value' in data) {\n _this.updateStore(setValue(_this.store, namePath, data.value));\n }\n _this.notifyObservers(prevStore, [namePath], {\n type: 'setField',\n data: fieldData\n });\n });\n _this.notifyWatch(namePathList);\n });\n _defineProperty(this, \"getFields\", function () {\n var entities = _this.getFieldEntities(true);\n var fields = entities.map(function (field) {\n var namePath = field.getNamePath();\n var meta = field.getMeta();\n var fieldData = _objectSpread(_objectSpread({}, meta), {}, {\n name: namePath,\n value: _this.getFieldValue(namePath)\n });\n Object.defineProperty(fieldData, 'originRCField', {\n value: true\n });\n return fieldData;\n });\n return fields;\n });\n // =========================== Observer ===========================\n /**\n * This only trigger when a field is on constructor to avoid we get initialValue too late\n */\n _defineProperty(this, \"initEntityValue\", function (entity) {\n var initialValue = entity.props.initialValue;\n if (initialValue !== undefined) {\n var namePath = entity.getNamePath();\n var prevValue = getValue(_this.store, namePath);\n if (prevValue === undefined) {\n _this.updateStore(setValue(_this.store, namePath, initialValue));\n }\n }\n });\n _defineProperty(this, \"isMergedPreserve\", function (fieldPreserve) {\n var mergedPreserve = fieldPreserve !== undefined ? fieldPreserve : _this.preserve;\n return mergedPreserve !== null && mergedPreserve !== void 0 ? mergedPreserve : true;\n });\n _defineProperty(this, \"registerField\", function (entity) {\n _this.fieldEntities.push(entity);\n var namePath = entity.getNamePath();\n _this.notifyWatch([namePath]);\n\n // Set initial values\n if (entity.props.initialValue !== undefined) {\n var prevStore = _this.store;\n _this.resetWithFieldInitialValue({\n entities: [entity],\n skipExist: true\n });\n _this.notifyObservers(prevStore, [entity.getNamePath()], {\n type: 'valueUpdate',\n source: 'internal'\n });\n }\n\n // un-register field callback\n return function (isListField, preserve) {\n var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n _this.fieldEntities = _this.fieldEntities.filter(function (item) {\n return item !== entity;\n });\n\n // Clean up store value if not preserve\n if (!_this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {\n var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);\n if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {\n return (\n // Only reset when no namePath exist\n !matchNamePath(field.getNamePath(), namePath)\n );\n })) {\n var _prevStore = _this.store;\n _this.updateStore(setValue(_prevStore, namePath, defaultValue, true));\n\n // Notify that field is unmount\n _this.notifyObservers(_prevStore, [namePath], {\n type: 'remove'\n });\n\n // Dependencies update\n _this.triggerDependenciesUpdate(_prevStore, namePath);\n }\n }\n _this.notifyWatch([namePath]);\n };\n });\n _defineProperty(this, \"dispatch\", function (action) {\n switch (action.type) {\n case 'updateValue':\n {\n var namePath = action.namePath,\n value = action.value;\n _this.updateValue(namePath, value);\n break;\n }\n case 'validateField':\n {\n var _namePath = action.namePath,\n triggerName = action.triggerName;\n _this.validateFields([_namePath], {\n triggerName: triggerName\n });\n break;\n }\n default:\n // Currently we don't have other action. Do nothing.\n }\n });\n _defineProperty(this, \"notifyObservers\", function (prevStore, namePathList, info) {\n if (_this.subscribable) {\n var mergedInfo = _objectSpread(_objectSpread({}, info), {}, {\n store: _this.getFieldsValue(true)\n });\n _this.getFieldEntities().forEach(function (_ref5) {\n var onStoreChange = _ref5.onStoreChange;\n onStoreChange(prevStore, namePathList, mergedInfo);\n });\n } else {\n _this.forceRootUpdate();\n }\n });\n /**\n * Notify dependencies children with parent update\n * We need delay to trigger validate in case Field is under render props\n */\n _defineProperty(this, \"triggerDependenciesUpdate\", function (prevStore, namePath) {\n var childrenFields = _this.getDependencyChildrenFields(namePath);\n if (childrenFields.length) {\n _this.validateFields(childrenFields);\n }\n _this.notifyObservers(prevStore, childrenFields, {\n type: 'dependenciesUpdate',\n relatedFields: [namePath].concat(_toConsumableArray(childrenFields))\n });\n return childrenFields;\n });\n _defineProperty(this, \"updateValue\", function (name, value) {\n var namePath = getNamePath(name);\n var prevStore = _this.store;\n _this.updateStore(setValue(_this.store, namePath, value));\n _this.notifyObservers(prevStore, [namePath], {\n type: 'valueUpdate',\n source: 'internal'\n });\n _this.notifyWatch([namePath]);\n\n // Dependencies update\n var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);\n\n // trigger callback function\n var onValuesChange = _this.callbacks.onValuesChange;\n if (onValuesChange) {\n var changedValues = cloneByNamePathList(_this.store, [namePath]);\n onValuesChange(changedValues, _this.getFieldsValue());\n }\n _this.triggerOnFieldsChange([namePath].concat(_toConsumableArray(childrenFields)));\n });\n // Let all child Field get update.\n _defineProperty(this, \"setFieldsValue\", function (store) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n if (store) {\n var nextStore = merge(_this.store, store);\n _this.updateStore(nextStore);\n }\n _this.notifyObservers(prevStore, null, {\n type: 'valueUpdate',\n source: 'external'\n });\n _this.notifyWatch();\n });\n _defineProperty(this, \"setFieldValue\", function (name, value) {\n _this.setFields([{\n name: name,\n value: value\n }]);\n });\n _defineProperty(this, \"getDependencyChildrenFields\", function (rootNamePath) {\n var children = new Set();\n var childrenFields = [];\n var dependencies2fields = new NameMap();\n\n /**\n * Generate maps\n * Can use cache to save perf if user report performance issue with this\n */\n _this.getFieldEntities().forEach(function (field) {\n var dependencies = field.props.dependencies;\n (dependencies || []).forEach(function (dependency) {\n var dependencyNamePath = getNamePath(dependency);\n dependencies2fields.update(dependencyNamePath, function () {\n var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set();\n fields.add(field);\n return fields;\n });\n });\n });\n var fillChildren = function fillChildren(namePath) {\n var fields = dependencies2fields.get(namePath) || new Set();\n fields.forEach(function (field) {\n if (!children.has(field)) {\n children.add(field);\n var fieldNamePath = field.getNamePath();\n if (field.isFieldDirty() && fieldNamePath.length) {\n childrenFields.push(fieldNamePath);\n fillChildren(fieldNamePath);\n }\n }\n });\n };\n fillChildren(rootNamePath);\n return childrenFields;\n });\n _defineProperty(this, \"triggerOnFieldsChange\", function (namePathList, filedErrors) {\n var onFieldsChange = _this.callbacks.onFieldsChange;\n if (onFieldsChange) {\n var fields = _this.getFields();\n\n /**\n * Fill errors since `fields` may be replaced by controlled fields\n */\n if (filedErrors) {\n var cache = new NameMap();\n filedErrors.forEach(function (_ref6) {\n var name = _ref6.name,\n errors = _ref6.errors;\n cache.set(name, errors);\n });\n fields.forEach(function (field) {\n // eslint-disable-next-line no-param-reassign\n field.errors = cache.get(field.name) || field.errors;\n });\n }\n var changedFields = fields.filter(function (_ref7) {\n var fieldName = _ref7.name;\n return containsNamePath(namePathList, fieldName);\n });\n if (changedFields.length) {\n onFieldsChange(changedFields, fields);\n }\n }\n });\n // =========================== Validate ===========================\n _defineProperty(this, \"validateFields\", function (arg1, arg2) {\n _this.warningUnhooked();\n var nameList;\n var options;\n if (Array.isArray(arg1) || typeof arg1 === 'string' || typeof arg2 === 'string') {\n nameList = arg1;\n options = arg2;\n } else {\n options = arg1;\n }\n var provideNameList = !!nameList;\n var namePathList = provideNameList ? nameList.map(getNamePath) : [];\n\n // Collect result in promise list\n var promiseList = [];\n\n // We temp save the path which need trigger for `onFieldsChange`\n var TMP_SPLIT = String(Date.now());\n var validateNamePathList = new Set();\n var _ref8 = options || {},\n recursive = _ref8.recursive,\n dirty = _ref8.dirty;\n _this.getFieldEntities(true).forEach(function (field) {\n // Add field if not provide `nameList`\n if (!provideNameList) {\n namePathList.push(field.getNamePath());\n }\n\n // Skip if without rule\n if (!field.props.rules || !field.props.rules.length) {\n return;\n }\n\n // Skip if only validate dirty field\n if (dirty && !field.isFieldDirty()) {\n return;\n }\n var fieldNamePath = field.getNamePath();\n validateNamePathList.add(fieldNamePath.join(TMP_SPLIT));\n\n // Add field validate rule in to promise list\n if (!provideNameList || containsNamePath(namePathList, fieldNamePath, recursive)) {\n var promise = field.validateRules(_objectSpread({\n validateMessages: _objectSpread(_objectSpread({}, defaultValidateMessages), _this.validateMessages)\n }, options));\n\n // Wrap promise with field\n promiseList.push(promise.then(function () {\n return {\n name: fieldNamePath,\n errors: [],\n warnings: []\n };\n }).catch(function (ruleErrors) {\n var _ruleErrors$forEach;\n var mergedErrors = [];\n var mergedWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 || _ruleErrors$forEach.call(ruleErrors, function (_ref9) {\n var warningOnly = _ref9.rule.warningOnly,\n errors = _ref9.errors;\n if (warningOnly) {\n mergedWarnings.push.apply(mergedWarnings, _toConsumableArray(errors));\n } else {\n mergedErrors.push.apply(mergedErrors, _toConsumableArray(errors));\n }\n });\n if (mergedErrors.length) {\n return Promise.reject({\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n });\n }\n return {\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n };\n }));\n }\n });\n var summaryPromise = allPromiseFinish(promiseList);\n _this.lastValidatePromise = summaryPromise;\n\n // Notify fields with rule that validate has finished and need update\n summaryPromise.catch(function (results) {\n return results;\n }).then(function (results) {\n var resultNamePathList = results.map(function (_ref10) {\n var name = _ref10.name;\n return name;\n });\n _this.notifyObservers(_this.store, resultNamePathList, {\n type: 'validateFinish'\n });\n _this.triggerOnFieldsChange(resultNamePathList, results);\n });\n var returnPromise = summaryPromise.then(function () {\n if (_this.lastValidatePromise === summaryPromise) {\n return Promise.resolve(_this.getFieldsValue(namePathList));\n }\n return Promise.reject([]);\n }).catch(function (results) {\n var errorList = results.filter(function (result) {\n return result && result.errors.length;\n });\n return Promise.reject({\n values: _this.getFieldsValue(namePathList),\n errorFields: errorList,\n outOfDate: _this.lastValidatePromise !== summaryPromise\n });\n });\n\n // Do not throw in console\n returnPromise.catch(function (e) {\n return e;\n });\n\n // `validating` changed. Trigger `onFieldsChange`\n var triggerNamePathList = namePathList.filter(function (namePath) {\n return validateNamePathList.has(namePath.join(TMP_SPLIT));\n });\n _this.triggerOnFieldsChange(triggerNamePathList);\n return returnPromise;\n });\n // ============================ Submit ============================\n _defineProperty(this, \"submit\", function () {\n _this.warningUnhooked();\n _this.validateFields().then(function (values) {\n var onFinish = _this.callbacks.onFinish;\n if (onFinish) {\n try {\n onFinish(values);\n } catch (err) {\n // Should print error if user `onFinish` callback failed\n console.error(err);\n }\n }\n }).catch(function (e) {\n var onFinishFailed = _this.callbacks.onFinishFailed;\n if (onFinishFailed) {\n onFinishFailed(e);\n }\n });\n });\n this.forceRootUpdate = forceRootUpdate;\n});\nfunction useForm(form) {\n var formRef = React.useRef();\n var _React$useState = React.useState({}),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n forceUpdate = _React$useState2[1];\n if (!formRef.current) {\n if (form) {\n formRef.current = form;\n } else {\n // Create a new FormStore if not provided\n var forceReRender = function forceReRender() {\n forceUpdate({});\n };\n var formStore = new FormStore(forceReRender);\n formRef.current = formStore.getForm();\n }\n }\n return [formRef.current];\n}\nexport default useForm;","export function allPromiseFinish(promiseList) {\n var hasError = false;\n var count = promiseList.length;\n var results = [];\n if (!promiseList.length) {\n return Promise.resolve([]);\n }\n return new Promise(function (resolve, reject) {\n promiseList.forEach(function (promise, index) {\n promise.catch(function (e) {\n hasError = true;\n return e;\n }).then(function (result) {\n count -= 1;\n results[index] = result;\n if (count > 0) {\n return;\n }\n if (hasError) {\n reject(results);\n }\n resolve(results);\n });\n });\n });\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nvar FormContext = /*#__PURE__*/React.createContext({\n triggerFormChange: function triggerFormChange() {},\n triggerFormFinish: function triggerFormFinish() {},\n registerForm: function registerForm() {},\n unregisterForm: function unregisterForm() {}\n});\nvar FormProvider = function FormProvider(_ref) {\n var validateMessages = _ref.validateMessages,\n onFormChange = _ref.onFormChange,\n onFormFinish = _ref.onFormFinish,\n children = _ref.children;\n var formContext = React.useContext(FormContext);\n var formsRef = React.useRef({});\n return /*#__PURE__*/React.createElement(FormContext.Provider, {\n value: _objectSpread(_objectSpread({}, formContext), {}, {\n validateMessages: _objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages),\n // =========================================================\n // = Global Form Control =\n // =========================================================\n triggerFormChange: function triggerFormChange(name, changedFields) {\n if (onFormChange) {\n onFormChange(name, {\n changedFields: changedFields,\n forms: formsRef.current\n });\n }\n formContext.triggerFormChange(name, changedFields);\n },\n triggerFormFinish: function triggerFormFinish(name, values) {\n if (onFormFinish) {\n onFormFinish(name, {\n values: values,\n forms: formsRef.current\n });\n }\n formContext.triggerFormFinish(name, values);\n },\n registerForm: function registerForm(name, form) {\n if (name) {\n formsRef.current = _objectSpread(_objectSpread({}, formsRef.current), {}, _defineProperty({}, name, form));\n }\n formContext.registerForm(name, form);\n },\n unregisterForm: function unregisterForm(name) {\n var newForms = _objectSpread({}, formsRef.current);\n delete newForms[name];\n formsRef.current = newForms;\n formContext.unregisterForm(name);\n }\n })\n }, children);\n};\nexport { FormProvider };\nexport default FormContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"name\", \"initialValues\", \"fields\", \"form\", \"preserve\", \"children\", \"component\", \"validateMessages\", \"validateTrigger\", \"onValuesChange\", \"onFieldsChange\", \"onFinish\", \"onFinishFailed\", \"clearOnDestroy\"];\nimport * as React from 'react';\nimport useForm from \"./useForm\";\nimport FieldContext, { HOOK_MARK } from \"./FieldContext\";\nimport FormContext from \"./FormContext\";\nimport { isSimilar } from \"./utils/valueUtil\";\nimport ListContext from \"./ListContext\";\nvar Form = function Form(_ref, ref) {\n var name = _ref.name,\n initialValues = _ref.initialValues,\n fields = _ref.fields,\n form = _ref.form,\n preserve = _ref.preserve,\n children = _ref.children,\n _ref$component = _ref.component,\n Component = _ref$component === void 0 ? 'form' : _ref$component,\n validateMessages = _ref.validateMessages,\n _ref$validateTrigger = _ref.validateTrigger,\n validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger,\n onValuesChange = _ref.onValuesChange,\n _onFieldsChange = _ref.onFieldsChange,\n _onFinish = _ref.onFinish,\n onFinishFailed = _ref.onFinishFailed,\n clearOnDestroy = _ref.clearOnDestroy,\n restProps = _objectWithoutProperties(_ref, _excluded);\n var nativeElementRef = React.useRef(null);\n var formContext = React.useContext(FormContext);\n\n // We customize handle event since Context will makes all the consumer re-render:\n // https://reactjs.org/docs/context.html#contextprovider\n var _useForm = useForm(form),\n _useForm2 = _slicedToArray(_useForm, 1),\n formInstance = _useForm2[0];\n var _getInternalHooks = formInstance.getInternalHooks(HOOK_MARK),\n useSubscribe = _getInternalHooks.useSubscribe,\n setInitialValues = _getInternalHooks.setInitialValues,\n setCallbacks = _getInternalHooks.setCallbacks,\n setValidateMessages = _getInternalHooks.setValidateMessages,\n setPreserve = _getInternalHooks.setPreserve,\n destroyForm = _getInternalHooks.destroyForm;\n\n // Pass ref with form instance\n React.useImperativeHandle(ref, function () {\n return _objectSpread(_objectSpread({}, formInstance), {}, {\n nativeElement: nativeElementRef.current\n });\n });\n\n // Register form into Context\n React.useEffect(function () {\n formContext.registerForm(name, formInstance);\n return function () {\n formContext.unregisterForm(name);\n };\n }, [formContext, formInstance, name]);\n\n // Pass props to store\n setValidateMessages(_objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages));\n setCallbacks({\n onValuesChange: onValuesChange,\n onFieldsChange: function onFieldsChange(changedFields) {\n formContext.triggerFormChange(name, changedFields);\n if (_onFieldsChange) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n _onFieldsChange.apply(void 0, [changedFields].concat(rest));\n }\n },\n onFinish: function onFinish(values) {\n formContext.triggerFormFinish(name, values);\n if (_onFinish) {\n _onFinish(values);\n }\n },\n onFinishFailed: onFinishFailed\n });\n setPreserve(preserve);\n\n // Set initial value, init store value when first mount\n var mountRef = React.useRef(null);\n setInitialValues(initialValues, !mountRef.current);\n if (!mountRef.current) {\n mountRef.current = true;\n }\n React.useEffect(function () {\n return function () {\n return destroyForm(clearOnDestroy);\n };\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n\n // Prepare children by `children` type\n var childrenNode;\n var childrenRenderProps = typeof children === 'function';\n if (childrenRenderProps) {\n var _values = formInstance.getFieldsValue(true);\n childrenNode = children(_values, formInstance);\n } else {\n childrenNode = children;\n }\n\n // Not use subscribe when using render props\n useSubscribe(!childrenRenderProps);\n\n // Listen if fields provided. We use ref to save prev data here to avoid additional render\n var prevFieldsRef = React.useRef();\n React.useEffect(function () {\n if (!isSimilar(prevFieldsRef.current || [], fields || [])) {\n formInstance.setFields(fields || []);\n }\n prevFieldsRef.current = fields;\n }, [fields, formInstance]);\n var formContextValue = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, formInstance), {}, {\n validateTrigger: validateTrigger\n });\n }, [formInstance, validateTrigger]);\n var wrapperNode = /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: null\n }, /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: formContextValue\n }, childrenNode));\n if (Component === false) {\n return wrapperNode;\n }\n return /*#__PURE__*/React.createElement(Component, _extends({}, restProps, {\n ref: nativeElementRef,\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n event.stopPropagation();\n formInstance.submit();\n },\n onReset: function onReset(event) {\n var _restProps$onReset;\n event.preventDefault();\n formInstance.resetFields();\n (_restProps$onReset = restProps.onReset) === null || _restProps$onReset === void 0 || _restProps$onReset.call(restProps, event);\n }\n }), wrapperNode);\n};\nexport default Form;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport warning from \"rc-util/es/warning\";\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport FieldContext, { HOOK_MARK } from \"./FieldContext\";\nimport { isFormInstance } from \"./utils/typeUtil\";\nimport { getNamePath, getValue } from \"./utils/valueUtil\";\nexport function stringify(value) {\n try {\n return JSON.stringify(value);\n } catch (err) {\n return Math.random();\n }\n}\nvar useWatchWarning = process.env.NODE_ENV !== 'production' ? function (namePath) {\n var fullyStr = namePath.join('__RC_FIELD_FORM_SPLIT__');\n var nameStrRef = useRef(fullyStr);\n warning(nameStrRef.current === fullyStr, '`useWatch` is not support dynamic `namePath`. Please provide static instead.');\n} : function () {};\n\n// ------- selector type -------\n\n// ------- selector type end -------\n\nfunction useWatch() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var dependencies = args[0],\n _args$ = args[1],\n _form = _args$ === void 0 ? {} : _args$;\n var options = isFormInstance(_form) ? {\n form: _form\n } : _form;\n var form = options.form;\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n value = _useState2[0],\n setValue = _useState2[1];\n var valueStr = useMemo(function () {\n return stringify(value);\n }, [value]);\n var valueStrRef = useRef(valueStr);\n valueStrRef.current = valueStr;\n var fieldContext = useContext(FieldContext);\n var formInstance = form || fieldContext;\n var isValidForm = formInstance && formInstance._init;\n\n // Warning if not exist form instance\n if (process.env.NODE_ENV !== 'production') {\n warning(args.length === 2 ? form ? isValidForm : true : isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');\n }\n var namePath = getNamePath(dependencies);\n var namePathRef = useRef(namePath);\n namePathRef.current = namePath;\n useWatchWarning(namePath);\n useEffect(function () {\n // Skip if not exist form instance\n if (!isValidForm) {\n return;\n }\n var getFieldsValue = formInstance.getFieldsValue,\n getInternalHooks = formInstance.getInternalHooks;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n registerWatch = _getInternalHooks.registerWatch;\n var getWatchValue = function getWatchValue(values, allValues) {\n var watchValue = options.preserve ? allValues : values;\n return typeof dependencies === 'function' ? dependencies(watchValue) : getValue(watchValue, namePathRef.current);\n };\n var cancelRegister = registerWatch(function (values, allValues) {\n var newValue = getWatchValue(values, allValues);\n var nextValueStr = stringify(newValue);\n\n // Compare stringify in case it's nest object\n if (valueStrRef.current !== nextValueStr) {\n valueStrRef.current = nextValueStr;\n setValue(newValue);\n }\n });\n\n // TODO: We can improve this perf in future\n var initialValue = getWatchValue(getFieldsValue(), getFieldsValue(true));\n\n // React 18 has the bug that will queue update twice even the value is not changed\n // ref: https://github.com/facebook/react/issues/27213\n if (value !== initialValue) {\n setValue(initialValue);\n }\n return cancelRegister;\n },\n // We do not need re-register since namePath content is the same\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isValidForm]);\n return value;\n}\nexport default useWatch;","import * as React from 'react';\nimport Field from \"./Field\";\nimport List from \"./List\";\nimport useForm from \"./useForm\";\nimport FieldForm from \"./Form\";\nimport { FormProvider } from \"./FormContext\";\nimport FieldContext from \"./FieldContext\";\nimport ListContext from \"./ListContext\";\nimport useWatch from \"./useWatch\";\nvar InternalForm = /*#__PURE__*/React.forwardRef(FieldForm);\nvar RefForm = InternalForm;\nRefForm.FormProvider = FormProvider;\nRefForm.Field = Field;\nRefForm.List = List;\nRefForm.useForm = useForm;\nRefForm.useWatch = useWatch;\nexport { Field, List, useForm, FormProvider, FieldContext, ListContext, useWatch };\nexport default RefForm;","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isoWeek=t()}(this,(function(){\"use strict\";var e=\"day\";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf(\"year\"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,\"week\")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return\"isoweek\"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf(\"day\"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(\"day\"):n.bind(this)(e,t)}}}));","!function(n,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(n=\"undefined\"!=typeof globalThis?globalThis:n||self).dayjs_plugin_localeData=e()}(this,(function(){\"use strict\";return function(n,e,t){var r=e.prototype,o=function(n){return n&&(n.indexOf?n:n.s)},u=function(n,e,t,r,u){var i=n.name?n:n.$locale(),a=o(i[e]),s=o(i[t]),f=a||s.map((function(n){return n.slice(0,r)}));if(!u)return f;var d=i.weekStart;return f.map((function(n,e){return f[(e+(d||0))%7]}))},i=function(){return t.Ls[t.locale()]},a=function(n,e){return n.formats[e]||function(n){return n.replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,e,t){return e||t.slice(1)}))}(n.formats[e.toUpperCase()])},s=function(){var n=this;return{months:function(e){return e?e.format(\"MMMM\"):u(n,\"months\")},monthsShort:function(e){return e?e.format(\"MMM\"):u(n,\"monthsShort\",\"months\",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdays:function(e){return e?e.format(\"dddd\"):u(n,\"weekdays\")},weekdaysMin:function(e){return e?e.format(\"dd\"):u(n,\"weekdaysMin\",\"weekdays\",2)},weekdaysShort:function(e){return e?e.format(\"ddd\"):u(n,\"weekdaysShort\",\"weekdays\",3)},longDateFormat:function(e){return a(n.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},t.localeData=function(){var n=i();return{firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return t.weekdays()},weekdaysShort:function(){return t.weekdaysShort()},weekdaysMin:function(){return t.weekdaysMin()},months:function(){return t.months()},monthsShort:function(){return t.monthsShort()},longDateFormat:function(e){return a(n,e)},meridiem:n.meridiem,ordinal:n.ordinal}},t.months=function(){return u(i(),\"months\")},t.monthsShort=function(){return u(i(),\"monthsShort\",\"months\",3)},t.weekdays=function(n){return u(i(),\"weekdays\",null,null,n)},t.weekdaysShort=function(n){return u(i(),\"weekdaysShort\",\"weekdays\",3,n)},t.weekdaysMin=function(n){return u(i(),\"weekdaysMin\",\"weekdays\",2,n)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_quarterOfYear=n()}(this,(function(){\"use strict\";var t=\"month\",n=\"quarter\";return function(e,i){var r=i.prototype;r.quarter=function(t){return this.$utils().u(t)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(t-1))};var s=r.add;r.add=function(e,i){return e=Number(e),this.$utils().p(i)===n?this.add(3*e,t):s.bind(this)(e,i)};var u=r.startOf;r.startOf=function(e,i){var r=this.$utils(),s=!!r.u(i)||i;if(r.p(e)===n){var o=this.quarter()-1;return s?this.month(3*o).startOf(t).startOf(\"day\"):this.month(3*o+2).endOf(t).endOf(\"day\")}return u.bind(this)(e,i)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],m=h.length,c=0;c0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t()}(this,(function(){\"use strict\";var e=\"week\",t=\"year\";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),\"day\");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekYear=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekday=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,i=this.$W,n=(i 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","module.exports = require('./forEach');\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n","var baseForOwn = require('./_baseForOwn'),\n castFunction = require('./_castFunction');\n\n/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forOwn(object, iteratee) {\n return object && baseForOwn(object, castFunction(iteratee));\n}\n\nmodule.exports = forOwn;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '' + func(text) + '
';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles
'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '